Repository navigation
Add system protocols for caching, encryption, compliance, messaging, search, and masking #384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,33 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| title: Search Engine | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description: Search Engine protocol schemas | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Search Engine | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <Callout type="info"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| **Source:** `packages/spec/src/data/search-engine.zod.ts` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </Callout> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## TypeScript Usage | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ```typescript | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { SearchConfigSchema } from '@objectstack/spec/data'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import type { SearchConfig } from '@objectstack/spec/data'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Validate data | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const result = SearchConfigSchema.parse(data); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## SearchConfig | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Properties | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | Property | Type | Required | Description | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | :--- | :--- | :--- | :--- | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | **fields** | `string[]` | ✅ | Fields to index for full-text search weighting | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | **displayFields** | `string[]` | optional | Fields to display in search result cards | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | **filters** | `string[]` | optional | Default filters for search results | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+1
to
+33
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --- | |
| title: Search Engine | |
| description: Search Engine protocol schemas | |
| --- | |
| # Search Engine | |
| <Callout type="info"> | |
| **Source:** `packages/spec/src/data/search-engine.zod.ts` | |
| </Callout> | |
| ## TypeScript Usage | |
| ```typescript | |
| import { SearchConfigSchema } from '@objectstack/spec/data'; | |
| import type { SearchConfig } from '@objectstack/spec/data'; | |
| // Validate data | |
| const result = SearchConfigSchema.parse(data); | |
| ``` | |
| --- | |
| ## SearchConfig | |
| ### Properties | |
| | Property | Type | Required | Description | | |
| | :--- | :--- | :--- | :--- | | |
| | **fields** | `string[]` | ✅ | Fields to index for full-text search weighting | | |
| | **displayFields** | `string[]` | optional | Fields to display in search result cards | | |
| | **filters** | `string[]` | optional | Default filters for search results | |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| --- | ||
| title: Message Queue | ||
| description: Message Queue protocol schemas | ||
| --- | ||
|
|
||
| # Message Queue | ||
|
|
||
| <Callout type="info"> | ||
| **Source:** `packages/spec/src/integration/message-queue.zod.ts` | ||
| </Callout> | ||
|
|
||
| ## TypeScript Usage | ||
|
|
||
| ```typescript | ||
| import { ConsumerConfigSchema, MessageQueueProviderSchema } from '@objectstack/spec/integration'; | ||
| import type { ConsumerConfig, MessageQueueProvider } from '@objectstack/spec/integration'; | ||
|
|
||
| // Validate data | ||
| const result = ConsumerConfigSchema.parse(data); | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## ConsumerConfig | ||
|
|
||
| ### Properties | ||
|
|
||
| | Property | Type | Required | Description | | ||
| | :--- | :--- | :--- | :--- | | ||
| | **enabled** | `boolean` | optional | Enable consumer | | ||
| | **consumerGroup** | `string` | optional | Consumer group ID | | ||
| | **concurrency** | `number` | optional | Number of concurrent consumers | | ||
| | **prefetchCount** | `number` | optional | Prefetch count | | ||
| | **ackMode** | `Enum<'auto' \| 'manual' \| 'client'>` | optional | Message acknowledgment mode | | ||
| | **autoCommit** | `boolean` | optional | Auto-commit offsets | | ||
| | **autoCommitIntervalMs** | `number` | optional | Auto-commit interval in ms | | ||
| | **sessionTimeoutMs** | `number` | optional | Session timeout in ms | | ||
| | **rebalanceTimeoutMs** | `number` | optional | Rebalance timeout in ms | | ||
|
|
||
| --- | ||
|
|
||
| ## MessageQueueProvider | ||
|
|
||
| Message queue provider type | ||
|
|
||
| ### Allowed Values | ||
|
|
||
| * `rabbitmq` | ||
| * `kafka` | ||
| * `redis_pubsub` | ||
| * `redis_streams` | ||
| * `aws_sqs` | ||
| * `aws_sns` | ||
| * `google_pubsub` | ||
| * `azure_service_bus` | ||
| * `azure_event_hubs` | ||
| * `nats` | ||
| * `pulsar` | ||
| * `activemq` | ||
| * `custom` | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| --- | ||
| title: Cache | ||
| description: Cache protocol schemas | ||
| --- | ||
|
|
||
| # Cache | ||
|
|
||
| <Callout type="info"> | ||
| **Source:** `packages/spec/src/system/cache.zod.ts` | ||
| </Callout> | ||
|
|
||
| ## TypeScript Usage | ||
|
|
||
| ```typescript | ||
| import { CacheConfigSchema, CacheInvalidationSchema, CacheStrategySchema, CacheTierSchema } from '@objectstack/spec/system'; | ||
| import type { CacheConfig, CacheInvalidation, CacheStrategy, CacheTier } from '@objectstack/spec/system'; | ||
|
|
||
| // Validate data | ||
| const result = CacheConfigSchema.parse(data); | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## CacheConfig | ||
|
|
||
| ### Properties | ||
|
|
||
| | Property | Type | Required | Description | | ||
| | :--- | :--- | :--- | :--- | | ||
| | **enabled** | `boolean` | optional | | | ||
| | **tiers** | `object[]` | ✅ | | | ||
| | **invalidation** | `object[]` | ✅ | | | ||
| | **prefetch** | `boolean` | optional | | | ||
| | **compression** | `boolean` | optional | | | ||
| | **encryption** | `boolean` | optional | | | ||
|
|
||
| --- | ||
|
|
||
| ## CacheInvalidation | ||
|
|
||
| ### Properties | ||
|
|
||
| | Property | Type | Required | Description | | ||
| | :--- | :--- | :--- | :--- | | ||
| | **trigger** | `Enum<'create' \| 'update' \| 'delete' \| 'manual'>` | ✅ | | | ||
| | **scope** | `Enum<'key' \| 'pattern' \| 'tag' \| 'all'>` | ✅ | | | ||
| | **pattern** | `string` | optional | | | ||
| | **tags** | `string[]` | optional | | | ||
|
|
||
| --- | ||
|
|
||
| ## CacheStrategy | ||
|
|
||
| ### Allowed Values | ||
|
|
||
| * `lru` | ||
| * `lfu` | ||
| * `fifo` | ||
| * `ttl` | ||
| * `adaptive` | ||
|
|
||
| --- | ||
|
|
||
| ## CacheTier | ||
|
|
||
| ### Properties | ||
|
|
||
| | Property | Type | Required | Description | | ||
| | :--- | :--- | :--- | :--- | | ||
| | **name** | `string` | ✅ | | | ||
| | **type** | `Enum<'memory' \| 'redis' \| 'memcached' \| 'cdn'>` | ✅ | | | ||
| | **maxSize** | `number` | optional | Max size in MB | | ||
| | **ttl** | `number` | optional | Default TTL in seconds | | ||
| | **strategy** | `Enum<'lru' \| 'lfu' \| 'fifo' \| 'ttl' \| 'adaptive'>` | optional | | | ||
| | **warmup** | `boolean` | optional | | | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| --- | ||
| title: Compliance | ||
| description: Compliance protocol schemas | ||
| --- | ||
|
|
||
| # Compliance | ||
|
|
||
| <Callout type="info"> | ||
| **Source:** `packages/spec/src/system/compliance.zod.ts` | ||
| </Callout> | ||
|
|
||
| ## TypeScript Usage | ||
|
|
||
| ```typescript | ||
| import { AuditLogConfigSchema, ComplianceConfigSchema, GDPRConfigSchema, HIPAAConfigSchema, PCIDSSConfigSchema } from '@objectstack/spec/system'; | ||
| import type { AuditLogConfig, ComplianceConfig, GDPRConfig, HIPAAConfig, PCIDSSConfig } from '@objectstack/spec/system'; | ||
|
|
||
| // Validate data | ||
| const result = AuditLogConfigSchema.parse(data); | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## AuditLogConfig | ||
|
|
||
| ### Properties | ||
|
|
||
| | Property | Type | Required | Description | | ||
| | :--- | :--- | :--- | :--- | | ||
| | **enabled** | `boolean` | optional | | | ||
| | **retentionDays** | `number` | optional | | | ||
| | **immutable** | `boolean` | optional | | | ||
| | **signLogs** | `boolean` | optional | | | ||
| | **events** | `Enum<'create' \| 'read' \| 'update' \| 'delete' \| 'export' \| 'permission-change' \| 'login' \| 'logout' \| 'failed-login'>[]` | ✅ | | | ||
|
|
||
| --- | ||
|
|
||
| ## ComplianceConfig | ||
|
|
||
| ### Properties | ||
|
|
||
| | Property | Type | Required | Description | | ||
| | :--- | :--- | :--- | :--- | | ||
| | **gdpr** | `object` | optional | | | ||
| | **hipaa** | `object` | optional | | | ||
| | **pciDss** | `object` | optional | | | ||
| | **auditLog** | `object` | ✅ | | | ||
|
|
||
| --- | ||
|
|
||
| ## GDPRConfig | ||
|
|
||
| ### Properties | ||
|
|
||
| | Property | Type | Required | Description | | ||
| | :--- | :--- | :--- | :--- | | ||
| | **enabled** | `boolean` | ✅ | | | ||
| | **dataSubjectRights** | `object` | ✅ | | | ||
| | **legalBasis** | `Enum<'consent' \| 'contract' \| 'legal-obligation' \| 'vital-interests' \| 'public-task' \| 'legitimate-interests'>` | ✅ | | | ||
| | **consentTracking** | `boolean` | optional | | | ||
| | **dataRetentionDays** | `number` | optional | | | ||
| | **dataProcessingAgreement** | `string` | optional | | | ||
|
|
||
| --- | ||
|
|
||
| ## HIPAAConfig | ||
|
|
||
| ### Properties | ||
|
|
||
| | Property | Type | Required | Description | | ||
| | :--- | :--- | :--- | :--- | | ||
| | **enabled** | `boolean` | ✅ | | | ||
| | **phi** | `object` | ✅ | | | ||
| | **businessAssociateAgreement** | `boolean` | optional | | | ||
|
|
||
| --- | ||
|
|
||
| ## PCIDSSConfig | ||
|
|
||
| ### Properties | ||
|
|
||
| | Property | Type | Required | Description | | ||
| | :--- | :--- | :--- | :--- | | ||
| | **enabled** | `boolean` | ✅ | | | ||
| | **level** | `Enum<'1' \| '2' \| '3' \| '4'>` | ✅ | | | ||
| | **cardDataFields** | `string[]` | ✅ | | | ||
| | **tokenization** | `boolean` | optional | | | ||
| | **encryptionInTransit** | `boolean` | optional | | | ||
| | **encryptionAtRest** | `boolean` | optional | | | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This documentation file references a non-existent source file. The file claims to document
packages/spec/src/data/search-engine.zod.ts, but this file does not exist in the data layer.The
SearchConfigSchemais actually defined inpackages/spec/src/data/object.zod.tsand is part of the Object protocol. This documentation file should either: