import type * as Rulebricks from "../index.js"; /** * Rule object accepted by /admin/rules/import. If `id` is provided, the matching rule is partially updated (all other fields optional). If `id` is omitted, a new rule is created with all other fields required. This object intentionally preserves raw rule document casing (for example, `requestSchema`, `sampleRequest`, and `createdAt`) to support `.rbm` round-tripping. */ export interface RuleImportPayload { /** Optional. If omitted, a new rule is created with an auto-generated UUID. If provided, the endpoint performs a partial update on the matching rule. */ id?: string | undefined; /** Optional stable ID for cross-workspace import/export identity. */ stable_id?: string | undefined; /** Optional. Auto-generated if omitted during creation. Accepted if provided. */ slug?: string | undefined; /** Rule name. */ name?: string | undefined; /** Rule description. */ description?: string | undefined; /** Creation timestamp. */ createdAt?: string | undefined; /** Last update timestamp. */ updatedAt?: string | undefined; /** Current publish state. Set with `_publish`/`_unpublish` to control publish transitions on import. */ published?: boolean | undefined; /** Optional user-defined metadata for external IDs or implementation mappings. */ metadata?: Record | undefined; /** If true, backend publishes this rule and snapshots published_* fields from draft fields. */ _publish?: boolean | undefined; /** If true, backend unpublishes this rule. */ _unpublish?: boolean | undefined; /** Draft request schema. */ requestSchema?: Rulebricks.RuleImportSchemaField[] | undefined; /** Draft response schema. */ responseSchema?: Rulebricks.RuleImportSchemaField[] | undefined; /** Sample request JSON. */ sampleRequest?: Record | undefined; /** Request payload used by editor test tab. */ testRequest?: Record | undefined; /** Sample response JSON. */ sampleResponse?: Record | undefined; /** Draft condition rows. */ conditions?: Rulebricks.RuleImportConditionRow[] | undefined; /** Optional row grouping definitions. */ groups?: Record> | undefined; /** Optional rule-level settings. */ settings?: Record | undefined; /** Optional rule test suite. */ testSuite?: Record[] | undefined; /** Rule history entries. */ history?: Record[] | undefined; /** Publish timestamp. */ publishedAt?: (string | null) | undefined; /** Optional published request schema override. */ published_requestSchema?: (Rulebricks.RuleImportSchemaField[] | null) | undefined; /** Optional published response schema override. */ published_responseSchema?: (Rulebricks.RuleImportSchemaField[] | null) | undefined; /** Optional published conditions override. */ published_conditions?: (Rulebricks.RuleImportConditionRow[] | null) | undefined; /** Optional published groups override. */ published_groups?: (Record | null> | null) | undefined; /** Accepts any additional properties */ [key: string]: any; }