Skip to content

Commit 8af1a25

Browse files
authored
Merge pull request #384 from objectstack-ai/copilot/add-graphql-schema-protocol
2 parents 446c73f + e1a9341 commit 8af1a25

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2629
-56
lines changed

content/docs/references/data/object.mdx

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

1414
```typescript
15-
import { IndexSchema, ObjectSchema, ObjectCapabilitiesSchema, SearchConfigSchema } from '@objectstack/spec/data';
16-
import type { Index, Object, ObjectCapabilities, SearchConfig } from '@objectstack/spec/data';
15+
import { IndexSchema, ObjectSchema, ObjectCapabilitiesSchema } from '@objectstack/spec/data';
16+
import type { Index, Object, ObjectCapabilities } from '@objectstack/spec/data';
1717

1818
// Validate data
1919
const result = IndexSchema.parse(data);
@@ -78,15 +78,3 @@ const result = IndexSchema.parse(data);
7878
| **mru** | `boolean` | optional | Track Most Recently Used (MRU) list for users |
7979
| **clone** | `boolean` | optional | Allow record deep cloning |
8080

81-
---
82-
83-
## SearchConfig
84-
85-
### Properties
86-
87-
| Property | Type | Required | Description |
88-
| :--- | :--- | :--- | :--- |
89-
| **fields** | `string[]` || Fields to index for full-text search weighting |
90-
| **displayFields** | `string[]` | optional | Fields to display in search result cards |
91-
| **filters** | `string[]` | optional | Default filters for search results |
92-
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: Search Engine
3+
description: Search Engine protocol schemas
4+
---
5+
6+
# Search Engine
7+
8+
<Callout type="info">
9+
**Source:** `packages/spec/src/data/search-engine.zod.ts`
10+
</Callout>
11+
12+
## TypeScript Usage
13+
14+
```typescript
15+
import { SearchConfigSchema } from '@objectstack/spec/data';
16+
import type { SearchConfig } from '@objectstack/spec/data';
17+
18+
// Validate data
19+
const result = SearchConfigSchema.parse(data);
20+
```
21+
22+
---
23+
24+
## SearchConfig
25+
26+
### Properties
27+
28+
| Property | Type | Required | Description |
29+
| :--- | :--- | :--- | :--- |
30+
| **fields** | `string[]` || Fields to index for full-text search weighting |
31+
| **displayFields** | `string[]` | optional | Fields to display in search result cards |
32+
| **filters** | `string[]` | optional | Default filters for search results |
33+
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: Message Queue
3+
description: Message Queue protocol schemas
4+
---
5+
6+
# Message Queue
7+
8+
<Callout type="info">
9+
**Source:** `packages/spec/src/integration/message-queue.zod.ts`
10+
</Callout>
11+
12+
## TypeScript Usage
13+
14+
```typescript
15+
import { ConsumerConfigSchema, MessageQueueProviderSchema } from '@objectstack/spec/integration';
16+
import type { ConsumerConfig, MessageQueueProvider } from '@objectstack/spec/integration';
17+
18+
// Validate data
19+
const result = ConsumerConfigSchema.parse(data);
20+
```
21+
22+
---
23+
24+
## ConsumerConfig
25+
26+
### Properties
27+
28+
| Property | Type | Required | Description |
29+
| :--- | :--- | :--- | :--- |
30+
| **enabled** | `boolean` | optional | Enable consumer |
31+
| **consumerGroup** | `string` | optional | Consumer group ID |
32+
| **concurrency** | `number` | optional | Number of concurrent consumers |
33+
| **prefetchCount** | `number` | optional | Prefetch count |
34+
| **ackMode** | `Enum<'auto' \| 'manual' \| 'client'>` | optional | Message acknowledgment mode |
35+
| **autoCommit** | `boolean` | optional | Auto-commit offsets |
36+
| **autoCommitIntervalMs** | `number` | optional | Auto-commit interval in ms |
37+
| **sessionTimeoutMs** | `number` | optional | Session timeout in ms |
38+
| **rebalanceTimeoutMs** | `number` | optional | Rebalance timeout in ms |
39+
40+
---
41+
42+
## MessageQueueProvider
43+
44+
Message queue provider type
45+
46+
### Allowed Values
47+
48+
* `rabbitmq`
49+
* `kafka`
50+
* `redis_pubsub`
51+
* `redis_streams`
52+
* `aws_sqs`
53+
* `aws_sns`
54+
* `google_pubsub`
55+
* `azure_service_bus`
56+
* `azure_event_hubs`
57+
* `nats`
58+
* `pulsar`
59+
* `activemq`
60+
* `custom`
61+

content/docs/references/integration/misc.mdx

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

1414
```typescript
15-
import { AckModeSchema, ApiVersionConfigSchema, CdcConfigSchema, ConsumerConfigSchema, DatabaseConnectorSchema, DatabasePoolConfigSchema, DatabaseProviderSchema, DatabaseTableSchema, DeliveryGuaranteeSchema, DlqConfigSchema, FileAccessPatternSchema, FileFilterConfigSchema, FileMetadataConfigSchema, FileStorageConnectorSchema, FileStorageProviderSchema, FileVersioningConfigSchema, MessageFormatSchema, MessageQueueConnectorSchema, MessageQueueProviderSchema, ProducerConfigSchema, SaasConnectorSchema, SaasObjectTypeSchema, SaasProviderSchema, SslConfigSchema, StorageBucketSchema, TopicQueueSchema } from '@objectstack/spec/integration';
16-
import type { AckMode, ApiVersionConfig, CdcConfig, ConsumerConfig, DatabaseConnector, DatabasePoolConfig, DatabaseProvider, DatabaseTable, DeliveryGuarantee, DlqConfig, FileAccessPattern, FileFilterConfig, FileMetadataConfig, FileStorageConnector, FileStorageProvider, FileVersioningConfig, MessageFormat, MessageQueueConnector, MessageQueueProvider, ProducerConfig, SaasConnector, SaasObjectType, SaasProvider, SslConfig, StorageBucket, TopicQueue } from '@objectstack/spec/integration';
15+
import { AckModeSchema, ApiVersionConfigSchema, CdcConfigSchema, DatabaseConnectorSchema, DatabasePoolConfigSchema, DatabaseProviderSchema, DatabaseTableSchema, DeliveryGuaranteeSchema, DlqConfigSchema, FileAccessPatternSchema, FileFilterConfigSchema, FileMetadataConfigSchema, FileStorageConnectorSchema, FileStorageProviderSchema, FileVersioningConfigSchema, MessageFormatSchema, MessageQueueConnectorSchema, ProducerConfigSchema, SaasConnectorSchema, SaasObjectTypeSchema, SaasProviderSchema, SslConfigSchema, StorageBucketSchema, TopicQueueSchema } from '@objectstack/spec/integration';
16+
import type { AckMode, ApiVersionConfig, CdcConfig, DatabaseConnector, DatabasePoolConfig, DatabaseProvider, DatabaseTable, DeliveryGuarantee, DlqConfig, FileAccessPattern, FileFilterConfig, FileMetadataConfig, FileStorageConnector, FileStorageProvider, FileVersioningConfig, MessageFormat, MessageQueueConnector, ProducerConfig, SaasConnector, SaasObjectType, SaasProvider, SslConfig, StorageBucket, TopicQueue } from '@objectstack/spec/integration';
1717

1818
// Validate data
1919
const result = AckModeSchema.parse(data);
@@ -62,24 +62,6 @@ Message acknowledgment mode
6262

6363
---
6464

65-
## ConsumerConfig
66-
67-
### Properties
68-
69-
| Property | Type | Required | Description |
70-
| :--- | :--- | :--- | :--- |
71-
| **enabled** | `boolean` | optional | Enable consumer |
72-
| **consumerGroup** | `string` | optional | Consumer group ID |
73-
| **concurrency** | `number` | optional | Number of concurrent consumers |
74-
| **prefetchCount** | `number` | optional | Prefetch count |
75-
| **ackMode** | `Enum<'auto' \| 'manual' \| 'client'>` | optional | Message acknowledgment mode |
76-
| **autoCommit** | `boolean` | optional | Auto-commit offsets |
77-
| **autoCommitIntervalMs** | `number` | optional | Auto-commit interval in ms |
78-
| **sessionTimeoutMs** | `number` | optional | Session timeout in ms |
79-
| **rebalanceTimeoutMs** | `number` | optional | Rebalance timeout in ms |
80-
81-
---
82-
8365
## DatabaseConnector
8466

8567
### Properties
@@ -352,28 +334,6 @@ Message format/serialization
352334

353335
---
354336

355-
## MessageQueueProvider
356-
357-
Message queue provider type
358-
359-
### Allowed Values
360-
361-
* `rabbitmq`
362-
* `kafka`
363-
* `redis_pubsub`
364-
* `redis_streams`
365-
* `aws_sqs`
366-
* `aws_sns`
367-
* `google_pubsub`
368-
* `azure_service_bus`
369-
* `azure_event_hubs`
370-
* `nats`
371-
* `pulsar`
372-
* `activemq`
373-
* `custom`
374-
375-
---
376-
377337
## ProducerConfig
378338

379339
### Properties
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
title: Cache
3+
description: Cache protocol schemas
4+
---
5+
6+
# Cache
7+
8+
<Callout type="info">
9+
**Source:** `packages/spec/src/system/cache.zod.ts`
10+
</Callout>
11+
12+
## TypeScript Usage
13+
14+
```typescript
15+
import { CacheConfigSchema, CacheInvalidationSchema, CacheStrategySchema, CacheTierSchema } from '@objectstack/spec/system';
16+
import type { CacheConfig, CacheInvalidation, CacheStrategy, CacheTier } from '@objectstack/spec/system';
17+
18+
// Validate data
19+
const result = CacheConfigSchema.parse(data);
20+
```
21+
22+
---
23+
24+
## CacheConfig
25+
26+
### Properties
27+
28+
| Property | Type | Required | Description |
29+
| :--- | :--- | :--- | :--- |
30+
| **enabled** | `boolean` | optional | |
31+
| **tiers** | `object[]` || |
32+
| **invalidation** | `object[]` || |
33+
| **prefetch** | `boolean` | optional | |
34+
| **compression** | `boolean` | optional | |
35+
| **encryption** | `boolean` | optional | |
36+
37+
---
38+
39+
## CacheInvalidation
40+
41+
### Properties
42+
43+
| Property | Type | Required | Description |
44+
| :--- | :--- | :--- | :--- |
45+
| **trigger** | `Enum<'create' \| 'update' \| 'delete' \| 'manual'>` || |
46+
| **scope** | `Enum<'key' \| 'pattern' \| 'tag' \| 'all'>` || |
47+
| **pattern** | `string` | optional | |
48+
| **tags** | `string[]` | optional | |
49+
50+
---
51+
52+
## CacheStrategy
53+
54+
### Allowed Values
55+
56+
* `lru`
57+
* `lfu`
58+
* `fifo`
59+
* `ttl`
60+
* `adaptive`
61+
62+
---
63+
64+
## CacheTier
65+
66+
### Properties
67+
68+
| Property | Type | Required | Description |
69+
| :--- | :--- | :--- | :--- |
70+
| **name** | `string` || |
71+
| **type** | `Enum<'memory' \| 'redis' \| 'memcached' \| 'cdn'>` || |
72+
| **maxSize** | `number` | optional | Max size in MB |
73+
| **ttl** | `number` | optional | Default TTL in seconds |
74+
| **strategy** | `Enum<'lru' \| 'lfu' \| 'fifo' \| 'ttl' \| 'adaptive'>` | optional | |
75+
| **warmup** | `boolean` | optional | |
76+
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
title: Compliance
3+
description: Compliance protocol schemas
4+
---
5+
6+
# Compliance
7+
8+
<Callout type="info">
9+
**Source:** `packages/spec/src/system/compliance.zod.ts`
10+
</Callout>
11+
12+
## TypeScript Usage
13+
14+
```typescript
15+
import { AuditLogConfigSchema, ComplianceConfigSchema, GDPRConfigSchema, HIPAAConfigSchema, PCIDSSConfigSchema } from '@objectstack/spec/system';
16+
import type { AuditLogConfig, ComplianceConfig, GDPRConfig, HIPAAConfig, PCIDSSConfig } from '@objectstack/spec/system';
17+
18+
// Validate data
19+
const result = AuditLogConfigSchema.parse(data);
20+
```
21+
22+
---
23+
24+
## AuditLogConfig
25+
26+
### Properties
27+
28+
| Property | Type | Required | Description |
29+
| :--- | :--- | :--- | :--- |
30+
| **enabled** | `boolean` | optional | |
31+
| **retentionDays** | `number` | optional | |
32+
| **immutable** | `boolean` | optional | |
33+
| **signLogs** | `boolean` | optional | |
34+
| **events** | `Enum<'create' \| 'read' \| 'update' \| 'delete' \| 'export' \| 'permission-change' \| 'login' \| 'logout' \| 'failed-login'>[]` || |
35+
36+
---
37+
38+
## ComplianceConfig
39+
40+
### Properties
41+
42+
| Property | Type | Required | Description |
43+
| :--- | :--- | :--- | :--- |
44+
| **gdpr** | `object` | optional | |
45+
| **hipaa** | `object` | optional | |
46+
| **pciDss** | `object` | optional | |
47+
| **auditLog** | `object` || |
48+
49+
---
50+
51+
## GDPRConfig
52+
53+
### Properties
54+
55+
| Property | Type | Required | Description |
56+
| :--- | :--- | :--- | :--- |
57+
| **enabled** | `boolean` || |
58+
| **dataSubjectRights** | `object` || |
59+
| **legalBasis** | `Enum<'consent' \| 'contract' \| 'legal-obligation' \| 'vital-interests' \| 'public-task' \| 'legitimate-interests'>` || |
60+
| **consentTracking** | `boolean` | optional | |
61+
| **dataRetentionDays** | `number` | optional | |
62+
| **dataProcessingAgreement** | `string` | optional | |
63+
64+
---
65+
66+
## HIPAAConfig
67+
68+
### Properties
69+
70+
| Property | Type | Required | Description |
71+
| :--- | :--- | :--- | :--- |
72+
| **enabled** | `boolean` || |
73+
| **phi** | `object` || |
74+
| **businessAssociateAgreement** | `boolean` | optional | |
75+
76+
---
77+
78+
## PCIDSSConfig
79+
80+
### Properties
81+
82+
| Property | Type | Required | Description |
83+
| :--- | :--- | :--- | :--- |
84+
| **enabled** | `boolean` || |
85+
| **level** | `Enum<'1' \| '2' \| '3' \| '4'>` || |
86+
| **cardDataFields** | `string[]` || |
87+
| **tokenization** | `boolean` | optional | |
88+
| **encryptionInTransit** | `boolean` | optional | |
89+
| **encryptionAtRest** | `boolean` | optional | |
90+

0 commit comments

Comments
 (0)