Skip to content

Commit 91314b1

Browse files
authored
Merge pull request #433 from objectstack-ai/copilot/resolve-job-step-issue
2 parents 07bdf36 + dbc25a6 commit 91314b1

File tree

15 files changed

+384
-8
lines changed

15 files changed

+384
-8
lines changed

content/docs/references/api/batch.mdx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,27 @@ description: Batch protocol schemas
1212
## TypeScript Usage
1313

1414
```typescript
15-
import { BatchOperationResultSchema, BatchOperationTypeSchema, BatchOptionsSchema, BatchRecordSchema, BatchUpdateRequestSchema, BatchUpdateResponseSchema, DeleteManyRequestSchema, UpdateManyRequestSchema } from '@objectstack/spec/api';
16-
import type { BatchOperationResult, BatchOperationType, BatchOptions, BatchRecord, BatchUpdateRequest, BatchUpdateResponse, DeleteManyRequest, UpdateManyRequest } from '@objectstack/spec/api';
15+
import { BatchConfigSchema, BatchOperationResultSchema, BatchOperationTypeSchema, BatchOptionsSchema, BatchRecordSchema, BatchUpdateRequestSchema, BatchUpdateResponseSchema, DeleteManyRequestSchema, UpdateManyRequestSchema } from '@objectstack/spec/api';
16+
import type { BatchConfig, BatchOperationResult, BatchOperationType, BatchOptions, BatchRecord, BatchUpdateRequest, BatchUpdateResponse, DeleteManyRequest, UpdateManyRequest } from '@objectstack/spec/api';
1717

1818
// Validate data
19-
const result = BatchOperationResultSchema.parse(data);
19+
const result = BatchConfigSchema.parse(data);
2020
```
2121

2222
---
2323

24+
## BatchConfig
25+
26+
### Properties
27+
28+
| Property | Type | Required | Description |
29+
| :--- | :--- | :--- | :--- |
30+
| **enabled** | `boolean` | optional | Enable batch operations |
31+
| **maxRecordsPerBatch** | `integer` | optional | Maximum records per batch |
32+
| **defaultOptions** | `object` | optional | Default batch options |
33+
34+
---
35+
2436
## BatchOperationResult
2537

2638
### Properties

content/docs/references/api/odata.mdx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,27 @@ description: Odata protocol schemas
1212
## TypeScript Usage
1313

1414
```typescript
15-
import { ODataErrorSchema, ODataFilterFunctionSchema, ODataFilterOperatorSchema, ODataMetadataSchema, ODataQuerySchema, ODataResponseSchema } from '@objectstack/spec/api';
16-
import type { ODataError, ODataFilterFunction, ODataFilterOperator, ODataMetadata, ODataQuery, ODataResponse } from '@objectstack/spec/api';
15+
import { ODataConfigSchema, ODataErrorSchema, ODataFilterFunctionSchema, ODataFilterOperatorSchema, ODataMetadataSchema, ODataQuerySchema, ODataResponseSchema } from '@objectstack/spec/api';
16+
import type { ODataConfig, ODataError, ODataFilterFunction, ODataFilterOperator, ODataMetadata, ODataQuery, ODataResponse } from '@objectstack/spec/api';
1717

1818
// Validate data
19-
const result = ODataErrorSchema.parse(data);
19+
const result = ODataConfigSchema.parse(data);
2020
```
2121

2222
---
2323

24+
## ODataConfig
25+
26+
### Properties
27+
28+
| Property | Type | Required | Description |
29+
| :--- | :--- | :--- | :--- |
30+
| **enabled** | `boolean` | optional | Enable OData API |
31+
| **path** | `string` | optional | OData endpoint path |
32+
| **metadata** | `object` | optional | OData metadata configuration |
33+
34+
---
35+
2436
## ODataError
2537

2638
### Properties

content/docs/references/api/realtime.mdx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ description: Realtime protocol schemas
1212
## TypeScript Usage
1313

1414
```typescript
15-
import { PresenceSchema, PresenceStatusSchema, RealtimeActionSchema, RealtimeEventSchema, RealtimeEventTypeSchema, SubscriptionSchema, SubscriptionEventSchema, TransportProtocolSchema } from '@objectstack/spec/api';
16-
import type { Presence, PresenceStatus, RealtimeAction, RealtimeEvent, RealtimeEventType, Subscription, SubscriptionEvent, TransportProtocol } from '@objectstack/spec/api';
15+
import { PresenceSchema, PresenceStatusSchema, RealtimeActionSchema, RealtimeConfigSchema, RealtimeEventSchema, RealtimeEventTypeSchema, SubscriptionSchema, SubscriptionEventSchema, TransportProtocolSchema } from '@objectstack/spec/api';
16+
import type { Presence, PresenceStatus, RealtimeAction, RealtimeConfig, RealtimeEvent, RealtimeEventType, Subscription, SubscriptionEvent, TransportProtocol } from '@objectstack/spec/api';
1717

1818
// Validate data
1919
const result = PresenceSchema.parse(data);
@@ -54,6 +54,18 @@ const result = PresenceSchema.parse(data);
5454

5555
---
5656

57+
## RealtimeConfig
58+
59+
### Properties
60+
61+
| Property | Type | Required | Description |
62+
| :--- | :--- | :--- | :--- |
63+
| **enabled** | `boolean` | optional | Enable realtime synchronization |
64+
| **transport** | `Enum<'websocket' \| 'sse' \| 'polling'>` | optional | Transport protocol |
65+
| **subscriptions** | `object[]` | optional | Default subscriptions |
66+
67+
---
68+
5769
## RealtimeEvent
5870

5971
### Properties
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"$ref": "#/definitions/BatchConfig",
3+
"definitions": {
4+
"BatchConfig": {
5+
"type": "object",
6+
"properties": {
7+
"enabled": {
8+
"type": "boolean",
9+
"default": true,
10+
"description": "Enable batch operations"
11+
},
12+
"maxRecordsPerBatch": {
13+
"type": "integer",
14+
"minimum": 1,
15+
"maximum": 1000,
16+
"default": 200,
17+
"description": "Maximum records per batch"
18+
},
19+
"defaultOptions": {
20+
"type": "object",
21+
"properties": {
22+
"atomic": {
23+
"type": "boolean",
24+
"default": true,
25+
"description": "If true, rollback entire batch on any failure (transaction mode)"
26+
},
27+
"returnRecords": {
28+
"type": "boolean",
29+
"default": false,
30+
"description": "If true, return full record data in response"
31+
},
32+
"continueOnError": {
33+
"type": "boolean",
34+
"default": false,
35+
"description": "If true (and atomic=false), continue processing remaining records after errors"
36+
},
37+
"validateOnly": {
38+
"type": "boolean",
39+
"default": false,
40+
"description": "If true, validate records without persisting changes (dry-run mode)"
41+
}
42+
},
43+
"additionalProperties": false,
44+
"description": "Default batch options"
45+
}
46+
},
47+
"additionalProperties": true
48+
}
49+
},
50+
"$schema": "http://json-schema.org/draft-07/schema#"
51+
}
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
{
2+
"$ref": "#/definitions/ODataConfig",
3+
"definitions": {
4+
"ODataConfig": {
5+
"type": "object",
6+
"properties": {
7+
"enabled": {
8+
"type": "boolean",
9+
"default": true,
10+
"description": "Enable OData API"
11+
},
12+
"path": {
13+
"type": "string",
14+
"default": "/odata",
15+
"description": "OData endpoint path"
16+
},
17+
"metadata": {
18+
"type": "object",
19+
"properties": {
20+
"namespace": {
21+
"type": "string",
22+
"description": "Service namespace"
23+
},
24+
"entityTypes": {
25+
"type": "array",
26+
"items": {
27+
"type": "object",
28+
"properties": {
29+
"name": {
30+
"type": "string",
31+
"description": "Entity type name"
32+
},
33+
"key": {
34+
"type": "array",
35+
"items": {
36+
"type": "string"
37+
},
38+
"description": "Key fields"
39+
},
40+
"properties": {
41+
"type": "array",
42+
"items": {
43+
"type": "object",
44+
"properties": {
45+
"name": {
46+
"type": "string"
47+
},
48+
"type": {
49+
"type": "string",
50+
"description": "OData type (Edm.String, Edm.Int32, etc.)"
51+
},
52+
"nullable": {
53+
"type": "boolean",
54+
"default": true
55+
}
56+
},
57+
"required": [
58+
"name",
59+
"type"
60+
],
61+
"additionalProperties": false
62+
}
63+
},
64+
"navigationProperties": {
65+
"type": "array",
66+
"items": {
67+
"type": "object",
68+
"properties": {
69+
"name": {
70+
"type": "string"
71+
},
72+
"type": {
73+
"type": "string"
74+
},
75+
"partner": {
76+
"type": "string"
77+
}
78+
},
79+
"required": [
80+
"name",
81+
"type"
82+
],
83+
"additionalProperties": false
84+
}
85+
}
86+
},
87+
"required": [
88+
"name",
89+
"key",
90+
"properties"
91+
],
92+
"additionalProperties": false
93+
},
94+
"description": "Entity types"
95+
},
96+
"entitySets": {
97+
"type": "array",
98+
"items": {
99+
"type": "object",
100+
"properties": {
101+
"name": {
102+
"type": "string",
103+
"description": "Entity set name"
104+
},
105+
"entityType": {
106+
"type": "string",
107+
"description": "Entity type"
108+
}
109+
},
110+
"required": [
111+
"name",
112+
"entityType"
113+
],
114+
"additionalProperties": false
115+
},
116+
"description": "Entity sets"
117+
}
118+
},
119+
"required": [
120+
"namespace",
121+
"entityTypes",
122+
"entitySets"
123+
],
124+
"additionalProperties": false,
125+
"description": "OData metadata configuration"
126+
}
127+
},
128+
"additionalProperties": true
129+
}
130+
},
131+
"$schema": "http://json-schema.org/draft-07/schema#"
132+
}
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"$ref": "#/definitions/RealtimeConfig",
3+
"definitions": {
4+
"RealtimeConfig": {
5+
"type": "object",
6+
"properties": {
7+
"enabled": {
8+
"type": "boolean",
9+
"default": true,
10+
"description": "Enable realtime synchronization"
11+
},
12+
"transport": {
13+
"type": "string",
14+
"enum": [
15+
"websocket",
16+
"sse",
17+
"polling"
18+
],
19+
"default": "websocket",
20+
"description": "Transport protocol"
21+
},
22+
"subscriptions": {
23+
"type": "array",
24+
"items": {
25+
"type": "object",
26+
"properties": {
27+
"id": {
28+
"type": "string",
29+
"format": "uuid",
30+
"description": "Unique subscription identifier"
31+
},
32+
"events": {
33+
"type": "array",
34+
"items": {
35+
"type": "object",
36+
"properties": {
37+
"type": {
38+
"type": "string",
39+
"enum": [
40+
"record.created",
41+
"record.updated",
42+
"record.deleted",
43+
"field.changed"
44+
],
45+
"description": "Type of event to subscribe to"
46+
},
47+
"object": {
48+
"type": "string",
49+
"description": "Object name to subscribe to"
50+
},
51+
"filters": {
52+
"description": "Filter conditions"
53+
}
54+
},
55+
"required": [
56+
"type"
57+
],
58+
"additionalProperties": false
59+
},
60+
"description": "Array of events to subscribe to"
61+
},
62+
"transport": {
63+
"type": "string",
64+
"enum": [
65+
"websocket",
66+
"sse",
67+
"polling"
68+
],
69+
"description": "Transport protocol to use"
70+
},
71+
"channel": {
72+
"type": "string",
73+
"description": "Optional channel name for grouping subscriptions"
74+
}
75+
},
76+
"required": [
77+
"id",
78+
"events",
79+
"transport"
80+
],
81+
"additionalProperties": false
82+
},
83+
"description": "Default subscriptions"
84+
}
85+
},
86+
"additionalProperties": true
87+
}
88+
},
89+
"$schema": "http://json-schema.org/draft-07/schema#"
90+
}

packages/spec/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@
5252
"./contracts": {
5353
"types": "./dist/contracts/index.d.ts",
5454
"default": "./dist/contracts/index.js"
55+
},
56+
"./integration": {
57+
"types": "./dist/integration/index.d.ts",
58+
"default": "./dist/integration/index.js"
59+
},
60+
"./permission": {
61+
"types": "./dist/permission/index.d.ts",
62+
"default": "./dist/permission/index.js"
5563
}
5664
},
5765
"files": [

0 commit comments

Comments
 (0)