---
title: Sharing
description: Sharing protocol schemas
---

{/* ⚠️  AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs go in content/docs/guides/. */}

Organization-Wide Defaults (OWD)

The baseline security posture for an object.

<Callout type="info">
**Source:** `packages/spec/src/security/sharing.zod.ts`
</Callout>

## TypeScript Usage

```typescript
import { OWDModel, OwnerSharingRule, ShareRecipientType, SharingLevel, SharingRuleType } from '@objectstack/spec/security';
import type { OWDModel, OwnerSharingRule, ShareRecipientType, SharingLevel, SharingRuleType } from '@objectstack/spec/security';

// Validate data
const result = OWDModel.parse(data);
```

---

## OWDModel

### Allowed Values

* `private`
* `public_read`
* `public_read_write`
* `controlled_by_parent`


---

## OwnerSharingRule

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **name** | `string` | ✅ | Unique rule name (snake_case) |
| **label** | `string` | optional | Human-readable label |
| **description** | `string` | optional | Administrative notes |
| **object** | `string` | ✅ | Target Object Name |
| **active** | `boolean` | ✅ |  |
| **accessLevel** | `Enum<'read' \| 'edit' \| 'full'>` | ✅ |  |
| **sharedWith** | `Object` | ✅ | The recipient of the shared access |
| **type** | `string` | ✅ |  |
| **ownedBy** | `Object` | ✅ | Source group/role whose records are being shared |


---

## ShareRecipientType

### Allowed Values

* `user`
* `group`
* `role`
* `role_and_subordinates`
* `guest`


---

## SharingLevel

### Allowed Values

* `read`
* `edit`
* `full`


---

## SharingRuleType

### Allowed Values

* `owner`
* `criteria`


---

