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
18 changes: 2 additions & 16 deletions content/docs/references/auth/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ description: Config protocol schemas
## TypeScript Usage

```typescript
import { AccountLinkingConfigSchema, AuthConfigSchema, AuthPluginConfigSchema, AuthStrategySchema, CSRFConfigSchema, DatabaseAdapterSchema, DatabaseMappingSchema, EmailPasswordConfigSchema, EnterpriseAuthConfigSchema, LDAPConfigSchema, MagicLinkConfigSchema, OAuthProviderSchema, OIDCConfigSchema, PasskeyConfigSchema, RateLimitConfigSchema, SAMLConfigSchema, SessionConfigSchema, StandardAuthProviderSchema, TwoFactorConfigSchema, UserFieldMappingSchema } from '@objectstack/spec/auth';
import type { AccountLinkingConfig, AuthConfig, AuthPluginConfig, AuthStrategy, CSRFConfig, DatabaseAdapter, DatabaseMapping, EmailPasswordConfig, EnterpriseAuthConfig, LDAPConfig, MagicLinkConfig, OAuthProvider, OIDCConfig, PasskeyConfig, RateLimitConfig, SAMLConfig, SessionConfig, StandardAuthProvider, TwoFactorConfig, UserFieldMapping } from '@objectstack/spec/auth';
import { AccountLinkingConfigSchema, AuthConfigSchema, AuthPluginConfigSchema, AuthStrategySchema, CSRFConfigSchema, DatabaseAdapterSchema, DatabaseMappingSchema, EmailPasswordConfigSchema, EnterpriseAuthConfigSchema, LDAPConfigSchema, MagicLinkConfigSchema, OAuthProviderSchema, OIDCConfigSchema, PasskeyConfigSchema, SAMLConfigSchema, SessionConfigSchema, StandardAuthProviderSchema, TwoFactorConfigSchema, UserFieldMappingSchema } from '@objectstack/spec/auth';
import type { AccountLinkingConfig, AuthConfig, AuthPluginConfig, AuthStrategy, CSRFConfig, DatabaseAdapter, DatabaseMapping, EmailPasswordConfig, EnterpriseAuthConfig, LDAPConfig, MagicLinkConfig, OAuthProvider, OIDCConfig, PasskeyConfig, SAMLConfig, SessionConfig, StandardAuthProvider, TwoFactorConfig, UserFieldMapping } from '@objectstack/spec/auth';

// Validate data
const result = AccountLinkingConfigSchema.parse(data);
Expand Down Expand Up @@ -238,20 +238,6 @@ const result = AccountLinkingConfigSchema.parse(data);

---

## RateLimitConfig

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **enabled** | `boolean` | optional | |
| **maxAttempts** | `number` | optional | Maximum login attempts |
| **windowMs** | `number` | optional | Time window in milliseconds (default 15 min) |
| **blockDuration** | `number` | optional | Block duration after max attempts in ms |
| **skipSuccessfulRequests** | `boolean` | optional | Only count failed requests |

---

## SAMLConfig

### Properties
Expand Down
35 changes: 35 additions & 0 deletions content/docs/references/auth/connector.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Connector
description: Connector protocol schemas
---

# Connector

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

## TypeScript Usage

```typescript
import { RateLimitConfigSchema } from '@objectstack/spec/auth';
import type { RateLimitConfig } from '@objectstack/spec/auth';

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

---

## RateLimitConfig

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **enabled** | `boolean` | optional | |
| **maxAttempts** | `number` | optional | Maximum login attempts |
| **windowMs** | `number` | optional | Time window in milliseconds (default 15 min) |
| **blockDuration** | `number` | optional | Block duration after max attempts in ms |
| **skipSuccessfulRequests** | `boolean` | optional | Only count failed requests |

58 changes: 56 additions & 2 deletions content/docs/references/automation/connector.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ description: Connector protocol schemas
## TypeScript Usage

```typescript
import { AuthFieldSchema, AuthenticationSchema, AuthenticationTypeSchema, ConnectorSchema, ConnectorCategorySchema, ConnectorInstanceSchema, ConnectorOperationSchema, ConnectorTriggerSchema, OAuth2ConfigSchema, OperationParameterSchema, OperationTypeSchema } from '@objectstack/spec/automation';
import type { AuthField, Authentication, AuthenticationType, Connector, ConnectorCategory, ConnectorInstance, ConnectorOperation, ConnectorTrigger, OAuth2Config, OperationParameter, OperationType } from '@objectstack/spec/automation';
import { AuthFieldSchema, AuthenticationSchema, AuthenticationTypeSchema, ConflictResolutionSchema, ConnectorSchema, ConnectorCategorySchema, ConnectorInstanceSchema, ConnectorOperationSchema, ConnectorTriggerSchema, DataSyncConfigSchema, FieldMappingSchema, OAuth2ConfigSchema, OperationParameterSchema, OperationTypeSchema } from '@objectstack/spec/automation';
import type { AuthField, Authentication, AuthenticationType, ConflictResolution, Connector, ConnectorCategory, ConnectorInstance, ConnectorOperation, ConnectorTrigger, DataSyncConfig, FieldMapping, OAuth2Config, OperationParameter, OperationType } from '@objectstack/spec/automation';

// Validate data
const result = AuthFieldSchema.parse(data);
Expand Down Expand Up @@ -65,6 +65,18 @@ const result = AuthFieldSchema.parse(data);

---

## ConflictResolution

### Allowed Values

* `source_wins`
* `destination_wins`
* `latest_wins`
* `manual`
* `merge`

---

## Connector

### Properties
Expand Down Expand Up @@ -167,6 +179,48 @@ const result = AuthFieldSchema.parse(data);

---

## DataSyncConfig

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **name** | `string` | ✅ | Sync configuration name (snake_case) |
| **label** | `string` | optional | Sync display name |
| **description** | `string` | optional | Sync description |
| **source** | `object` | ✅ | Data source |
| **destination** | `object` | ✅ | Data destination |
| **direction** | `Enum<'push' \| 'pull' \| 'bidirectional'>` | optional | Sync direction |
| **syncMode** | `Enum<'full' \| 'incremental' \| 'realtime'>` | optional | Sync mode |
| **conflictResolution** | `Enum<'source_wins' \| 'destination_wins' \| 'latest_wins' \| 'manual' \| 'merge'>` | optional | Conflict resolution |
| **schedule** | `string` | optional | Cron schedule |
| **enabled** | `boolean` | optional | Sync enabled |
| **changeTrackingField** | `string` | optional | Field for change tracking |
| **batchSize** | `integer` | optional | Batch size for processing |
| **retry** | `object` | optional | Retry configuration |
| **validation** | `object` | optional | Validation rules |
| **errorHandling** | `object` | optional | Error handling |
| **optimization** | `object` | optional | Performance optimization |
| **audit** | `object` | optional | Audit configuration |
| **tags** | `string[]` | optional | Sync tags |
| **metadata** | `Record<string, any>` | optional | Custom metadata |

---

## FieldMapping

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **sourceField** | `string` | ✅ | Source field name |
| **destinationField** | `string` | ✅ | Destination field name |
| **transform** | `string` | optional | Transformation formula |
| **default** | `any` | optional | Default value |
| **syncNull** | `boolean` | optional | Sync null values |

---

## OAuth2Config

### Properties
Expand Down
35 changes: 0 additions & 35 deletions content/docs/references/automation/mapping.mdx

This file was deleted.

46 changes: 3 additions & 43 deletions content/docs/references/automation/sync.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,15 @@ description: Sync protocol schemas
## TypeScript Usage

```typescript
import { ConflictResolutionSchema, DataDestinationConfigSchema, DataSourceConfigSchema, DataSyncConfigSchema, SyncDirectionSchema, SyncExecutionResultSchema, SyncExecutionStatusSchema, SyncModeSchema } from '@objectstack/spec/automation';
import type { ConflictResolution, DataDestinationConfig, DataSourceConfig, DataSyncConfig, SyncDirection, SyncExecutionResult, SyncExecutionStatus, SyncMode } from '@objectstack/spec/automation';
import { DataDestinationConfigSchema, DataSourceConfigSchema, SyncDirectionSchema, SyncExecutionResultSchema, SyncExecutionStatusSchema, SyncModeSchema } from '@objectstack/spec/automation';
import type { DataDestinationConfig, DataSourceConfig, SyncDirection, SyncExecutionResult, SyncExecutionStatus, SyncMode } from '@objectstack/spec/automation';

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

---

## ConflictResolution

### Allowed Values

* `source_wins`
* `destination_wins`
* `latest_wins`
* `manual`
* `merge`

---

## DataDestinationConfig

### Properties
Expand Down Expand Up @@ -62,34 +50,6 @@ const result = ConflictResolutionSchema.parse(data);

---

## DataSyncConfig

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **name** | `string` | ✅ | Sync configuration name (snake_case) |
| **label** | `string` | optional | Sync display name |
| **description** | `string` | optional | Sync description |
| **source** | `object` | ✅ | Data source |
| **destination** | `object` | ✅ | Data destination |
| **direction** | `Enum<'push' \| 'pull' \| 'bidirectional'>` | optional | Sync direction |
| **syncMode** | `Enum<'full' \| 'incremental' \| 'realtime'>` | optional | Sync mode |
| **conflictResolution** | `Enum<'source_wins' \| 'destination_wins' \| 'latest_wins' \| 'manual' \| 'merge'>` | optional | Conflict resolution |
| **schedule** | `string` | optional | Cron schedule |
| **enabled** | `boolean` | optional | Sync enabled |
| **changeTrackingField** | `string` | optional | Field for change tracking |
| **batchSize** | `integer` | optional | Batch size for processing |
| **retry** | `object` | optional | Retry configuration |
| **validation** | `object` | optional | Validation rules |
| **errorHandling** | `object` | optional | Error handling |
| **optimization** | `object` | optional | Performance optimization |
| **audit** | `object` | optional | Audit configuration |
| **tags** | `string[]` | optional | Sync tags |
| **metadata** | `Record<string, any>` | optional | Custom metadata |

---

## SyncDirection

### Allowed Values
Expand Down
Loading
Loading