Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions content/docs/references/data/connector.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: Connector
description: Connector protocol schemas
---

# Connector

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

## TypeScript Usage

```typescript
import { FieldMappingSchema } from '@objectstack/spec/data';
import type { FieldMapping } from '@objectstack/spec/data';

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

---

## FieldMapping

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **externalField** | `string` | ✅ | External field name |
| **localField** | `string` | ✅ | Local field name |
| **type** | `string` | ✅ | Field type |
| **readonly** | `boolean` | optional | Read-only field |

Comment on lines +1 to +34
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This documentation file appears to be incorrect. There is no packages/spec/src/data/connector.zod.ts file in the codebase. The FieldMappingSchema is actually exported from packages/spec/src/data/external-lookup.zod.ts, not from a connector module.

Additionally, there is a naming collision: FieldMappingSchema is defined in both:

  1. packages/spec/src/data/external-lookup.zod.ts (newly added in this PR)
  2. packages/spec/src/data/mapping.zod.ts (existing)

The schema in external-lookup.zod.ts should be renamed to avoid this conflict, perhaps to ExternalFieldMappingSchema, and this documentation file should either be removed or updated to reference the correct schema location.

Copilot uses AI. Check for mistakes.
87 changes: 87 additions & 0 deletions content/docs/references/data/document.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
title: Document
description: Document protocol schemas
---

# Document

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

## TypeScript Usage

```typescript
import { DocumentSchema, DocumentTemplateSchema, DocumentVersionSchema, ESignatureConfigSchema } from '@objectstack/spec/data';
import type { Document, DocumentTemplate, DocumentVersion, ESignatureConfig } from '@objectstack/spec/data';

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

---

## Document

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Document ID |
| **name** | `string` | ✅ | Document name |
| **description** | `string` | optional | Document description |
| **fileType** | `string` | ✅ | File MIME type |
| **fileSize** | `number` | ✅ | File size in bytes |
| **category** | `string` | optional | Document category |
| **tags** | `string[]` | optional | Document tags |
| **versioning** | `object` | optional | Version control |
| **template** | `object` | optional | Document template |
| **eSignature** | `object` | optional | E-signature config |
| **access** | `object` | optional | Access control |
| **metadata** | `Record<string, any>` | optional | Custom metadata |

---

## DocumentTemplate

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Template ID |
| **name** | `string` | ✅ | Template name |
| **description** | `string` | optional | Template description |
| **fileUrl** | `string` | ✅ | Template file URL |
| **fileType** | `string` | ✅ | File MIME type |
| **placeholders** | `object[]` | ✅ | Template placeholders |

---

## DocumentVersion

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **versionNumber** | `number` | ✅ | Version number |
| **createdAt** | `number` | ✅ | Creation timestamp |
| **createdBy** | `string` | ✅ | Creator user ID |
| **size** | `number` | ✅ | File size in bytes |
| **checksum** | `string` | ✅ | File checksum |
| **downloadUrl** | `string` | ✅ | Download URL |
| **isLatest** | `boolean` | optional | Is latest version |

---

## ESignatureConfig

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **provider** | `Enum<'docusign' \| 'adobe-sign' \| 'hellosign' \| 'custom'>` | ✅ | E-signature provider |
| **enabled** | `boolean` | optional | E-signature enabled |
| **signers** | `object[]` | ✅ | Document signers |
| **expirationDays** | `number` | optional | Expiration days |
| **reminderDays** | `number` | optional | Reminder interval days |

51 changes: 51 additions & 0 deletions content/docs/references/data/external-lookup.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: External Lookup
description: External Lookup protocol schemas
---

# External Lookup

<Callout type="info">
**Source:** `packages/spec/src/data/external-lookup.zod.ts`
</Callout>

## TypeScript Usage

```typescript
import { ExternalDataSourceSchema, ExternalLookupSchema } from '@objectstack/spec/data';
import type { ExternalDataSource, ExternalLookup } from '@objectstack/spec/data';

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

---

## ExternalDataSource

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Data source ID |
| **name** | `string` | ✅ | Data source name |
| **type** | `Enum<'odata' \| 'rest-api' \| 'graphql' \| 'custom'>` | ✅ | Protocol type |
| **endpoint** | `string` | ✅ | API endpoint URL |
| **authentication** | `object` | ✅ | Authentication |

---

## ExternalLookup

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **fieldName** | `string` | ✅ | Field name |
| **dataSource** | `object` | ✅ | External data source |
| **query** | `object` | ✅ | Query configuration |
| **fieldMappings** | `object[]` | ✅ | Field mappings |
| **caching** | `object` | optional | Caching configuration |
| **fallback** | `object` | optional | Fallback configuration |
| **rateLimit** | `object` | optional | Rate limiting |

2 changes: 2 additions & 0 deletions content/docs/references/data/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ This section contains all protocol schemas for the data layer of ObjectStack.

<Cards>
<Card href="./dataset" title="Dataset" description="Source: packages/spec/src/data/dataset.zod.ts" />
<Card href="./document" title="Document" description="Source: packages/spec/src/data/document.zod.ts" />
<Card href="./external-lookup" title="External Lookup" description="Source: packages/spec/src/data/external-lookup.zod.ts" />
<Card href="./field" title="Field" description="Source: packages/spec/src/data/field.zod.ts" />
<Card href="./filter" title="Filter" description="Source: packages/spec/src/data/filter.zod.ts" />
<Card href="./hook" title="Hook" description="Source: packages/spec/src/data/hook.zod.ts" />
Expand Down
2 changes: 2 additions & 0 deletions content/docs/references/data/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"title": "Data Protocol",
"pages": [
"dataset",
"document",
"external-lookup",
"field",
"filter",
"hook",
Expand Down
108 changes: 108 additions & 0 deletions content/docs/references/system/change-management.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
---
title: Change Management
description: Change Management protocol schemas
---

# Change Management

<Callout type="info">
**Source:** `packages/spec/src/system/change-management.zod.ts`
</Callout>

## TypeScript Usage

```typescript
import { ChangeImpactSchema, ChangePrioritySchema, ChangeRequestSchema, ChangeStatusSchema, ChangeTypeSchema, RollbackPlanSchema } from '@objectstack/spec/system';
import type { ChangeImpact, ChangePriority, ChangeRequest, ChangeStatus, ChangeType, RollbackPlan } from '@objectstack/spec/system';

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

---

## ChangeImpact

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **level** | `Enum<'low' \| 'medium' \| 'high' \| 'critical'>` | ✅ | Impact level |
| **affectedSystems** | `string[]` | ✅ | Affected systems |
| **affectedUsers** | `number` | optional | Affected user count |
| **downtime** | `object` | optional | Downtime information |

---

## ChangePriority

### Allowed Values

* `critical`
* `high`
* `medium`
* `low`

---

## ChangeRequest

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Change request ID |
| **title** | `string` | ✅ | Change title |
| **description** | `string` | ✅ | Change description |
| **type** | `Enum<'standard' \| 'normal' \| 'emergency' \| 'major'>` | ✅ | Change type |
| **priority** | `Enum<'critical' \| 'high' \| 'medium' \| 'low'>` | ✅ | Change priority |
| **status** | `Enum<'draft' \| 'submitted' \| 'in-review' \| 'approved' \| 'scheduled' \| 'in-progress' \| 'completed' \| 'failed' \| 'rolled-back' \| 'cancelled'>` | ✅ | Change status |
| **requestedBy** | `string` | ✅ | Requester user ID |
| **requestedAt** | `number` | ✅ | Request timestamp |
| **impact** | `object` | ✅ | Impact assessment |
| **implementation** | `object` | ✅ | Implementation plan |
| **rollbackPlan** | `object` | ✅ | Rollback plan |
| **schedule** | `object` | optional | Schedule |
| **approval** | `object` | optional | Approval workflow |
| **attachments** | `object[]` | optional | Attachments |

---

## ChangeStatus

### Allowed Values

* `draft`
* `submitted`
* `in-review`
* `approved`
* `scheduled`
* `in-progress`
* `completed`
* `failed`
* `rolled-back`
* `cancelled`

---

## ChangeType

### Allowed Values

* `standard`
* `normal`
* `emergency`
* `major`

---

## RollbackPlan

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **description** | `string` | ✅ | Rollback description |
| **steps** | `object[]` | ✅ | Rollback steps |
| **testProcedure** | `string` | optional | Test procedure |

2 changes: 2 additions & 0 deletions content/docs/references/system/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This section contains all protocol schemas for the system layer of ObjectStack.
<Cards>
<Card href="./audit" title="Audit" description="Source: packages/spec/src/system/audit.zod.ts" />
<Card href="./cache" title="Cache" description="Source: packages/spec/src/system/cache.zod.ts" />
<Card href="./change-management" title="Change Management" description="Source: packages/spec/src/system/change-management.zod.ts" />
<Card href="./collaboration" title="Collaboration" description="Source: packages/spec/src/system/collaboration.zod.ts" />
<Card href="./compliance" title="Compliance" description="Source: packages/spec/src/system/compliance.zod.ts" />
<Card href="./context" title="Context" description="Source: packages/spec/src/system/context.zod.ts" />
Expand All @@ -28,6 +29,7 @@ This section contains all protocol schemas for the system layer of ObjectStack.
<Card href="./masking" title="Masking" description="Source: packages/spec/src/system/masking.zod.ts" />
<Card href="./message-queue" title="Message Queue" description="Source: packages/spec/src/system/message-queue.zod.ts" />
<Card href="./metrics" title="Metrics" description="Source: packages/spec/src/system/metrics.zod.ts" />
<Card href="./notification" title="Notification" description="Source: packages/spec/src/system/notification.zod.ts" />
<Card href="./object-storage" title="Object Storage" description="Source: packages/spec/src/system/object-storage.zod.ts" />
<Card href="./plugin" title="Plugin" description="Source: packages/spec/src/system/plugin.zod.ts" />
<Card href="./plugin-capability" title="Plugin Capability" description="Source: packages/spec/src/system/plugin-capability.zod.ts" />
Expand Down
2 changes: 2 additions & 0 deletions content/docs/references/system/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"pages": [
"audit",
"cache",
"change-management",
"collaboration",
"compliance",
"context",
Expand All @@ -21,6 +22,7 @@
"masking",
"message-queue",
"metrics",
"notification",
"object-storage",
"plugin",
"plugin-capability",
Expand Down
Loading
Loading