Skip to content

Commit 7888821

Browse files
Copilothotlong
andcommitted
Add generated documentation and JSON schemas for new protocols
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent c0935fb commit 7888821

28 files changed

Lines changed: 2248 additions & 0 deletions
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Connector
3+
description: Connector protocol schemas
4+
---
5+
6+
# Connector
7+
8+
<Callout type="info">
9+
**Source:** `packages/spec/src/data/connector.zod.ts`
10+
</Callout>
11+
12+
## TypeScript Usage
13+
14+
```typescript
15+
import { FieldMappingSchema } from '@objectstack/spec/data';
16+
import type { FieldMapping } from '@objectstack/spec/data';
17+
18+
// Validate data
19+
const result = FieldMappingSchema.parse(data);
20+
```
21+
22+
---
23+
24+
## FieldMapping
25+
26+
### Properties
27+
28+
| Property | Type | Required | Description |
29+
| :--- | :--- | :--- | :--- |
30+
| **externalField** | `string` || External field name |
31+
| **localField** | `string` || Local field name |
32+
| **type** | `string` || Field type |
33+
| **readonly** | `boolean` | optional | Read-only field |
34+
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
title: Document
3+
description: Document protocol schemas
4+
---
5+
6+
# Document
7+
8+
<Callout type="info">
9+
**Source:** `packages/spec/src/data/document.zod.ts`
10+
</Callout>
11+
12+
## TypeScript Usage
13+
14+
```typescript
15+
import { DocumentSchema, DocumentTemplateSchema, DocumentVersionSchema, ESignatureConfigSchema } from '@objectstack/spec/data';
16+
import type { Document, DocumentTemplate, DocumentVersion, ESignatureConfig } from '@objectstack/spec/data';
17+
18+
// Validate data
19+
const result = DocumentSchema.parse(data);
20+
```
21+
22+
---
23+
24+
## Document
25+
26+
### Properties
27+
28+
| Property | Type | Required | Description |
29+
| :--- | :--- | :--- | :--- |
30+
| **id** | `string` || Document ID |
31+
| **name** | `string` || Document name |
32+
| **description** | `string` | optional | Document description |
33+
| **fileType** | `string` || File MIME type |
34+
| **fileSize** | `number` || File size in bytes |
35+
| **category** | `string` | optional | Document category |
36+
| **tags** | `string[]` | optional | Document tags |
37+
| **versioning** | `object` | optional | Version control |
38+
| **template** | `object` | optional | Document template |
39+
| **eSignature** | `object` | optional | E-signature config |
40+
| **access** | `object` | optional | Access control |
41+
| **metadata** | `Record<string, any>` | optional | Custom metadata |
42+
43+
---
44+
45+
## DocumentTemplate
46+
47+
### Properties
48+
49+
| Property | Type | Required | Description |
50+
| :--- | :--- | :--- | :--- |
51+
| **id** | `string` || Template ID |
52+
| **name** | `string` || Template name |
53+
| **description** | `string` | optional | Template description |
54+
| **fileUrl** | `string` || Template file URL |
55+
| **fileType** | `string` || File MIME type |
56+
| **placeholders** | `object[]` || Template placeholders |
57+
58+
---
59+
60+
## DocumentVersion
61+
62+
### Properties
63+
64+
| Property | Type | Required | Description |
65+
| :--- | :--- | :--- | :--- |
66+
| **versionNumber** | `number` || Version number |
67+
| **createdAt** | `number` || Creation timestamp |
68+
| **createdBy** | `string` || Creator user ID |
69+
| **size** | `number` || File size in bytes |
70+
| **checksum** | `string` || File checksum |
71+
| **downloadUrl** | `string` || Download URL |
72+
| **isLatest** | `boolean` | optional | Is latest version |
73+
74+
---
75+
76+
## ESignatureConfig
77+
78+
### Properties
79+
80+
| Property | Type | Required | Description |
81+
| :--- | :--- | :--- | :--- |
82+
| **provider** | `Enum<'docusign' \| 'adobe-sign' \| 'hellosign' \| 'custom'>` || E-signature provider |
83+
| **enabled** | `boolean` | optional | E-signature enabled |
84+
| **signers** | `object[]` || Document signers |
85+
| **expirationDays** | `number` | optional | Expiration days |
86+
| **reminderDays** | `number` | optional | Reminder interval days |
87+
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: External Lookup
3+
description: External Lookup protocol schemas
4+
---
5+
6+
# External Lookup
7+
8+
<Callout type="info">
9+
**Source:** `packages/spec/src/data/external-lookup.zod.ts`
10+
</Callout>
11+
12+
## TypeScript Usage
13+
14+
```typescript
15+
import { ExternalDataSourceSchema, ExternalLookupSchema } from '@objectstack/spec/data';
16+
import type { ExternalDataSource, ExternalLookup } from '@objectstack/spec/data';
17+
18+
// Validate data
19+
const result = ExternalDataSourceSchema.parse(data);
20+
```
21+
22+
---
23+
24+
## ExternalDataSource
25+
26+
### Properties
27+
28+
| Property | Type | Required | Description |
29+
| :--- | :--- | :--- | :--- |
30+
| **id** | `string` || Data source ID |
31+
| **name** | `string` || Data source name |
32+
| **type** | `Enum<'odata' \| 'rest-api' \| 'graphql' \| 'custom'>` || Protocol type |
33+
| **endpoint** | `string` || API endpoint URL |
34+
| **authentication** | `object` || Authentication |
35+
36+
---
37+
38+
## ExternalLookup
39+
40+
### Properties
41+
42+
| Property | Type | Required | Description |
43+
| :--- | :--- | :--- | :--- |
44+
| **fieldName** | `string` || Field name |
45+
| **dataSource** | `object` || External data source |
46+
| **query** | `object` || Query configuration |
47+
| **fieldMappings** | `object[]` || Field mappings |
48+
| **caching** | `object` | optional | Caching configuration |
49+
| **fallback** | `object` | optional | Fallback configuration |
50+
| **rateLimit** | `object` | optional | Rate limiting |
51+

content/docs/references/data/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ This section contains all protocol schemas for the data layer of ObjectStack.
99

1010
<Cards>
1111
<Card href="./dataset" title="Dataset" description="Source: packages/spec/src/data/dataset.zod.ts" />
12+
<Card href="./document" title="Document" description="Source: packages/spec/src/data/document.zod.ts" />
13+
<Card href="./external-lookup" title="External Lookup" description="Source: packages/spec/src/data/external-lookup.zod.ts" />
1214
<Card href="./field" title="Field" description="Source: packages/spec/src/data/field.zod.ts" />
1315
<Card href="./filter" title="Filter" description="Source: packages/spec/src/data/filter.zod.ts" />
1416
<Card href="./hook" title="Hook" description="Source: packages/spec/src/data/hook.zod.ts" />

content/docs/references/data/meta.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"title": "Data Protocol",
33
"pages": [
44
"dataset",
5+
"document",
6+
"external-lookup",
57
"field",
68
"filter",
79
"hook",
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
title: Change Management
3+
description: Change Management protocol schemas
4+
---
5+
6+
# Change Management
7+
8+
<Callout type="info">
9+
**Source:** `packages/spec/src/system/change-management.zod.ts`
10+
</Callout>
11+
12+
## TypeScript Usage
13+
14+
```typescript
15+
import { ChangeImpactSchema, ChangePrioritySchema, ChangeRequestSchema, ChangeStatusSchema, ChangeTypeSchema, RollbackPlanSchema } from '@objectstack/spec/system';
16+
import type { ChangeImpact, ChangePriority, ChangeRequest, ChangeStatus, ChangeType, RollbackPlan } from '@objectstack/spec/system';
17+
18+
// Validate data
19+
const result = ChangeImpactSchema.parse(data);
20+
```
21+
22+
---
23+
24+
## ChangeImpact
25+
26+
### Properties
27+
28+
| Property | Type | Required | Description |
29+
| :--- | :--- | :--- | :--- |
30+
| **level** | `Enum<'low' \| 'medium' \| 'high' \| 'critical'>` || Impact level |
31+
| **affectedSystems** | `string[]` || Affected systems |
32+
| **affectedUsers** | `number` | optional | Affected user count |
33+
| **downtime** | `object` | optional | Downtime information |
34+
35+
---
36+
37+
## ChangePriority
38+
39+
### Allowed Values
40+
41+
* `critical`
42+
* `high`
43+
* `medium`
44+
* `low`
45+
46+
---
47+
48+
## ChangeRequest
49+
50+
### Properties
51+
52+
| Property | Type | Required | Description |
53+
| :--- | :--- | :--- | :--- |
54+
| **id** | `string` || Change request ID |
55+
| **title** | `string` || Change title |
56+
| **description** | `string` || Change description |
57+
| **type** | `Enum<'standard' \| 'normal' \| 'emergency' \| 'major'>` || Change type |
58+
| **priority** | `Enum<'critical' \| 'high' \| 'medium' \| 'low'>` || Change priority |
59+
| **status** | `Enum<'draft' \| 'submitted' \| 'in-review' \| 'approved' \| 'scheduled' \| 'in-progress' \| 'completed' \| 'failed' \| 'rolled-back' \| 'cancelled'>` || Change status |
60+
| **requestedBy** | `string` || Requester user ID |
61+
| **requestedAt** | `number` || Request timestamp |
62+
| **impact** | `object` || Impact assessment |
63+
| **implementation** | `object` || Implementation plan |
64+
| **rollbackPlan** | `object` || Rollback plan |
65+
| **schedule** | `object` | optional | Schedule |
66+
| **approval** | `object` | optional | Approval workflow |
67+
| **attachments** | `object[]` | optional | Attachments |
68+
69+
---
70+
71+
## ChangeStatus
72+
73+
### Allowed Values
74+
75+
* `draft`
76+
* `submitted`
77+
* `in-review`
78+
* `approved`
79+
* `scheduled`
80+
* `in-progress`
81+
* `completed`
82+
* `failed`
83+
* `rolled-back`
84+
* `cancelled`
85+
86+
---
87+
88+
## ChangeType
89+
90+
### Allowed Values
91+
92+
* `standard`
93+
* `normal`
94+
* `emergency`
95+
* `major`
96+
97+
---
98+
99+
## RollbackPlan
100+
101+
### Properties
102+
103+
| Property | Type | Required | Description |
104+
| :--- | :--- | :--- | :--- |
105+
| **description** | `string` || Rollback description |
106+
| **steps** | `object[]` || Rollback steps |
107+
| **testProcedure** | `string` | optional | Test procedure |
108+

content/docs/references/system/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This section contains all protocol schemas for the system layer of ObjectStack.
1010
<Cards>
1111
<Card href="./audit" title="Audit" description="Source: packages/spec/src/system/audit.zod.ts" />
1212
<Card href="./cache" title="Cache" description="Source: packages/spec/src/system/cache.zod.ts" />
13+
<Card href="./change-management" title="Change Management" description="Source: packages/spec/src/system/change-management.zod.ts" />
1314
<Card href="./collaboration" title="Collaboration" description="Source: packages/spec/src/system/collaboration.zod.ts" />
1415
<Card href="./compliance" title="Compliance" description="Source: packages/spec/src/system/compliance.zod.ts" />
1516
<Card href="./context" title="Context" description="Source: packages/spec/src/system/context.zod.ts" />
@@ -28,6 +29,7 @@ This section contains all protocol schemas for the system layer of ObjectStack.
2829
<Card href="./masking" title="Masking" description="Source: packages/spec/src/system/masking.zod.ts" />
2930
<Card href="./message-queue" title="Message Queue" description="Source: packages/spec/src/system/message-queue.zod.ts" />
3031
<Card href="./metrics" title="Metrics" description="Source: packages/spec/src/system/metrics.zod.ts" />
32+
<Card href="./notification" title="Notification" description="Source: packages/spec/src/system/notification.zod.ts" />
3133
<Card href="./object-storage" title="Object Storage" description="Source: packages/spec/src/system/object-storage.zod.ts" />
3234
<Card href="./plugin" title="Plugin" description="Source: packages/spec/src/system/plugin.zod.ts" />
3335
<Card href="./plugin-capability" title="Plugin Capability" description="Source: packages/spec/src/system/plugin-capability.zod.ts" />

content/docs/references/system/meta.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"pages": [
44
"audit",
55
"cache",
6+
"change-management",
67
"collaboration",
78
"compliance",
89
"context",
@@ -21,6 +22,7 @@
2122
"masking",
2223
"message-queue",
2324
"metrics",
25+
"notification",
2426
"object-storage",
2527
"plugin",
2628
"plugin-capability",

0 commit comments

Comments
 (0)