@tailor-platform/sdk 1.8.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  /// <reference path="./user-defined.d.ts" />
2
- import { $ as TailorDBInstance, C as ScheduleTriggerInput, Ct as output$1, Et as TailorActor, J as UserAttributeListKey, Mt as AllowedValuesOutput, N as DefinedAuth, S as ResolverExecutedTrigger$1, St as JsonCompatible, T as WorkflowOperation$1, Tt as TailorEnv, Y as UserAttributeMap, _ as FunctionOperation$1, b as IncomingWebhookTrigger$1, ct as DefinedFieldMetadata, dt as FieldOutput, et as TailorDBType, f as AuthAccessTokenTrigger$1, ft as TailorFieldType, j as AuthServiceInput, jt as AllowedValues, k as AuthInvoker$1, kt as TailorUser, lt as FieldMetadata, m as ExecutorInput, mt as TailorField, n as GeneratorConfig, o as IdPInput, pt as TailorAnyField, r as AppConfig, s as IdpDefinitionBrand, st as ArrayFieldOutput, ut as FieldOptions, v as GqlOperation$1, vt as ResolverInput, w as WebhookOperation$1, x as RecordTrigger$1, xt as InferFieldsOutput, y as IdpUserTrigger$1 } from "./index-Dkm2qwmF.mjs";
3
- import * as zod38 from "zod";
2
+ import { $ as TailorDBInstance, C as ScheduleTriggerInput, Ct as output$1, Et as TailorActor, J as UserAttributeListKey, Mt as AllowedValuesOutput, N as DefinedAuth, S as ResolverExecutedTrigger$1, St as JsonCompatible, T as WorkflowOperation$1, Tt as TailorEnv, Y as UserAttributeMap, _ as FunctionOperation$1, b as IncomingWebhookTrigger$1, ct as DefinedFieldMetadata, dt as FieldOutput, et as TailorDBType, f as AuthAccessTokenTrigger$1, ft as TailorFieldType, j as AuthServiceInput, jt as AllowedValues, k as AuthInvoker$1, kt as TailorUser, lt as FieldMetadata, m as ExecutorInput, mt as TailorField, n as GeneratorConfig, o as IdPInput, pt as TailorAnyField, r as AppConfig, s as IdpDefinitionBrand, st as ArrayFieldOutput, ut as FieldOptions, v as GqlOperation$1, vt as ResolverInput, w as WebhookOperation$1, x as RecordTrigger$1, xt as InferFieldsOutput, y as IdpUserTrigger$1 } from "./index-DFEsnnHR.mjs";
3
+ import * as zod0 from "zod";
4
4
  import { JsonPrimitive, Jsonifiable, Jsonify } from "type-fest";
5
- import * as zod_v4_core33 from "zod/v4/core";
5
+ import * as zod_v4_core0 from "zod/v4/core";
6
6
  import { Client } from "@urql/core";
7
7
  import { StandardCRON } from "ts-cron-validator";
8
8
 
@@ -498,12 +498,12 @@ declare function defineGenerators(...configs: GeneratorConfig[]): (["@tailor-pla
498
498
  id: string;
499
499
  description: string;
500
500
  dependencies: ("executor" | "tailordb" | "resolver")[];
501
- aggregate: zod_v4_core33.$InferInnerFunctionType<zod_v4_core33.$ZodFunctionArgs, zod38.ZodAny>;
502
- processType?: zod_v4_core33.$InferInnerFunctionType<zod_v4_core33.$ZodFunctionArgs, zod_v4_core33.$ZodFunctionOut> | undefined;
503
- processResolver?: zod_v4_core33.$InferInnerFunctionType<zod_v4_core33.$ZodFunctionArgs, zod_v4_core33.$ZodFunctionOut> | undefined;
504
- processExecutor?: zod_v4_core33.$InferInnerFunctionType<zod_v4_core33.$ZodFunctionArgs, zod_v4_core33.$ZodFunctionOut> | undefined;
505
- processTailorDBNamespace?: zod_v4_core33.$InferInnerFunctionType<zod_v4_core33.$ZodFunctionArgs, zod_v4_core33.$ZodFunctionOut> | undefined;
506
- processResolverNamespace?: zod_v4_core33.$InferInnerFunctionType<zod_v4_core33.$ZodFunctionArgs, zod_v4_core33.$ZodFunctionOut> | undefined;
501
+ aggregate: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod0.ZodAny>;
502
+ processType?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
503
+ processResolver?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
504
+ processExecutor?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
505
+ processTailorDBNamespace?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
506
+ processResolverNamespace?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
507
507
  })[];
508
508
  //#endregion
509
509
  //#region src/configure/index.d.ts
@@ -578,4 +578,4 @@ declare namespace t {
578
578
  }
579
579
  //#endregion
580
580
  export { idpUserDeletedTrigger as A, WorkflowOperation as B, RecordUpdatedArgs as C, authAccessTokenRefreshedTrigger as D, authAccessTokenIssuedTrigger as E, resolverExecutedTrigger as F, WorkflowJob as G, WorkflowConfig as H, FunctionOperation as I, WorkflowJobOutput as J, WorkflowJobContext as K, GqlOperation as L, recordCreatedTrigger as M, recordDeletedTrigger as N, authAccessTokenRevokedTrigger as O, recordUpdatedTrigger as P, defineAuth as Q, Operation as R, RecordTrigger as S, ResolverExecutedTrigger as T, createWorkflow as U, Workflow as V, WORKFLOW_TEST_ENV_KEY as W, createResolver as X, createWorkflowJob as Y, AuthInvoker as Z, AuthAccessTokenTrigger as _, defineGenerators as a, RecordCreatedArgs as b, Trigger as c, IncomingWebhookTrigger as d, incomingWebhookTrigger as f, AuthAccessTokenArgs as g, scheduleTrigger as h, defineConfig as i, idpUserUpdatedTrigger as j, idpUserCreatedTrigger as k, IncomingWebhookArgs as l, ScheduleTrigger as m, output as n, defineIdp as o, ScheduleArgs as p, WorkflowJobInput as q, t as r, createExecutor as s, infer as t, IncomingWebhookRequest as u, IdpUserArgs as v, ResolverExecutedArgs as w, RecordDeletedArgs as x, IdpUserTrigger as y, WebhookOperation as z };
581
- //# sourceMappingURL=index-BwJ7-efr.d.mts.map
581
+ //# sourceMappingURL=index-Bd255ayy.d.mts.map
@@ -14,6 +14,64 @@ declare const relationTypes: {
14
14
  };
15
15
  type RelationType = keyof typeof relationTypes;
16
16
  //#endregion
17
+ //#region src/parser/service/tailordb/schema.d.ts
18
+
19
+ /**
20
+ * Schema for TailorDB type settings.
21
+ * Normalizes gqlOperations from alias ("query") to object format.
22
+ */
23
+ declare const TailorDBTypeSettingsSchema: z.ZodObject<{
24
+ pluralForm: z.ZodOptional<z.ZodString>;
25
+ aggregation: z.ZodOptional<z.ZodBoolean>;
26
+ bulkUpsert: z.ZodOptional<z.ZodBoolean>;
27
+ gqlOperations: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"query">, z.ZodObject<{
28
+ create: z.ZodOptional<z.ZodBoolean>;
29
+ update: z.ZodOptional<z.ZodBoolean>;
30
+ delete: z.ZodOptional<z.ZodBoolean>;
31
+ read: z.ZodOptional<z.ZodBoolean>;
32
+ }, z.core.$strip>]>, z.ZodTransform<GqlOperations, "query" | {
33
+ create?: boolean | undefined;
34
+ update?: boolean | undefined;
35
+ delete?: boolean | undefined;
36
+ read?: boolean | undefined;
37
+ }>>>;
38
+ }, z.core.$strip>;
39
+ /**
40
+ * Schema for TailorDB service configuration.
41
+ * Normalizes gqlOperations from alias ("query") to object format.
42
+ */
43
+ declare const TailorDBServiceConfigSchema: z.ZodObject<{
44
+ files: z.ZodArray<z.ZodString>;
45
+ ignores: z.ZodOptional<z.ZodArray<z.ZodString>>;
46
+ erdSite: z.ZodOptional<z.ZodString>;
47
+ migration: z.ZodOptional<z.ZodObject<{
48
+ directory: z.ZodString;
49
+ machineUser: z.ZodOptional<z.ZodString>;
50
+ }, z.core.$strip>>;
51
+ gqlOperations: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"query">, z.ZodObject<{
52
+ create: z.ZodOptional<z.ZodBoolean>;
53
+ update: z.ZodOptional<z.ZodBoolean>;
54
+ delete: z.ZodOptional<z.ZodBoolean>;
55
+ read: z.ZodOptional<z.ZodBoolean>;
56
+ }, z.core.$strip>]>, z.ZodTransform<GqlOperations, "query" | {
57
+ create?: boolean | undefined;
58
+ update?: boolean | undefined;
59
+ delete?: boolean | undefined;
60
+ read?: boolean | undefined;
61
+ }>>>;
62
+ }, z.core.$strip>;
63
+ /**
64
+ * Input type for TailorDB service configuration (before schema parsing).
65
+ * gqlOperations accepts both alias ("query") and object format.
66
+ */
67
+ type TailorDBServiceConfigInput = z.input<typeof TailorDBServiceConfigSchema>;
68
+ type TailorDBExternalConfig = {
69
+ external: true;
70
+ };
71
+ type TailorDBServiceInput = {
72
+ [namespace: string]: TailorDBServiceConfigInput | TailorDBExternalConfig;
73
+ };
74
+ //#endregion
17
75
  //#region src/configure/types/field.d.ts
18
76
  type AllowedValue = EnumValue;
19
77
  type AllowedValues = [string | EnumValue, ...(string | EnumValue)[]];
@@ -524,10 +582,35 @@ type IndexDef<T extends {
524
582
  unique?: boolean;
525
583
  name?: string;
526
584
  };
585
+ /**
586
+ * Configuration for GraphQL operations on a TailorDB type.
587
+ * All operations are enabled by default (undefined or true = enabled, false = disabled).
588
+ */
589
+ interface GqlOperations {
590
+ /** Enable create mutation (default: true) */
591
+ create?: boolean;
592
+ /** Enable update mutation (default: true) */
593
+ update?: boolean;
594
+ /** Enable delete mutation (default: true) */
595
+ delete?: boolean;
596
+ /** Enable read queries - get, list, aggregation (default: true) */
597
+ read?: boolean;
598
+ }
599
+ /**
600
+ * Alias for common GqlOperations configurations.
601
+ * - "query": Read-only mode - disables all mutations (create, update, delete)
602
+ */
603
+ type GqlOperationsAliasQuery = "query";
604
+ /**
605
+ * Configuration for GraphQL operations - either an alias string or detailed object.
606
+ */
607
+ type GqlOperationsConfig = GqlOperationsAliasQuery | GqlOperations;
527
608
  interface TypeFeatures {
528
609
  pluralForm?: string;
529
610
  aggregation?: true;
530
611
  bulkUpsert?: true;
612
+ /** Configure GraphQL operations for this type. Use "query" for read-only mode, or an object for granular control. */
613
+ gqlOperations?: GqlOperationsConfig;
531
614
  }
532
615
  //#endregion
533
616
  //#region src/configure/services/tailordb/schema.d.ts
@@ -1149,27 +1232,11 @@ type AuthConfig = AuthOwnConfig | AuthExternalConfig;
1149
1232
  //#endregion
1150
1233
  //#region src/parser/service/tailordb/types.d.ts
1151
1234
  /**
1152
- * Migration configuration for TailorDB
1235
+ * Parsed and normalized settings for TailorDB type.
1236
+ * gqlOperations is normalized from alias to object format.
1237
+ * @public
1153
1238
  */
1154
- type TailorDBMigrationConfig = {
1155
- /** Directory path for migration files */
1156
- directory: string;
1157
- /** Machine user name for executing migration scripts (must be defined in auth.machineUsers) */
1158
- machineUser?: string;
1159
- };
1160
- type TailorDBServiceConfig = {
1161
- files: string[];
1162
- ignores?: string[];
1163
- erdSite?: string;
1164
- /** Migration configuration */
1165
- migration?: TailorDBMigrationConfig;
1166
- };
1167
- type TailorDBExternalConfig = {
1168
- external: true;
1169
- };
1170
- type TailorDBServiceInput = {
1171
- [namespace: string]: TailorDBServiceConfig | TailorDBExternalConfig;
1172
- };
1239
+ type TailorDBTypeParsedSettings = z.output<typeof TailorDBTypeSettingsSchema>;
1173
1240
  interface Script {
1174
1241
  expr: string;
1175
1242
  }
@@ -1268,6 +1335,7 @@ interface TailorDBTypeMetadata {
1268
1335
  pluralForm?: string;
1269
1336
  aggregation?: boolean;
1270
1337
  bulkUpsert?: boolean;
1338
+ gqlOperations?: GqlOperationsConfig;
1271
1339
  };
1272
1340
  permissions: RawPermissions;
1273
1341
  files: Record<string, string>;
@@ -1311,7 +1379,7 @@ interface TailorDBType {
1311
1379
  fields: Record<string, ParsedField>;
1312
1380
  forwardRelationships: Record<string, ParsedRelationship>;
1313
1381
  backwardRelationships: Record<string, ParsedRelationship>;
1314
- settings: TailorDBTypeMetadata["settings"];
1382
+ settings: TailorDBTypeParsedSettings;
1315
1383
  permissions: Permissions;
1316
1384
  indexes?: TailorDBTypeMetadata["indexes"];
1317
1385
  files?: TailorDBTypeMetadata["files"];
@@ -1702,4 +1770,4 @@ type GeneratorConfigSchemaType = ReturnType<typeof createGeneratorConfigSchema>;
1702
1770
  type Generator = z.output<GeneratorConfigSchemaType>;
1703
1771
  //#endregion
1704
1772
  export { TailorDBInstance as $, AuthOwnConfig as A, unauthenticatedTailorUser as At, SCIMAttribute as B, ScheduleTriggerInput as C, output as Ct, AuthConfig as D, AttributeList as Dt, TailorDBType as E, TailorActor as Et, IdProviderConfig as F, SCIMResource as G, SCIMAttributeType as H, OAuth2ClientGrantType as I, UserAttributeListKey as J, TenantProviderConfig as K, OAuth2ClientInput as L, BuiltinIdP as M, AllowedValuesOutput as Mt, DefinedAuth as N, AuthExternalConfig as O, AttributeMap as Ot, IDToken as P, TailorDBField as Q, OIDC as R, ResolverExecutedTrigger as S, JsonCompatible as St, WorkflowOperation as T, TailorEnv as Tt, SCIMAuthorization as U, SCIMAttributeMapping as V, SCIMConfig as W, UsernameFieldKey as X, UserAttributeMap as Y, ValueOperand as Z, FunctionOperation as _, ResolverExternalConfig as _t, IdPExternalConfig as a, unsafeAllowAllGqlPermission as at, IncomingWebhookTrigger as b, ResolverServiceInput as bt, WorkflowServiceConfig as c, DefinedFieldMetadata as ct, defineStaticWebSite as d, FieldOutput$1 as dt, TailorDBType$1 as et, AuthAccessTokenTrigger as f, TailorFieldType as ft, ExecutorServiceInput as g, Resolver as gt, ExecutorServiceConfig as h, QueryType as ht, IdPConfig as i, TailorTypePermission as it, AuthServiceInput as j, AllowedValues as jt, AuthInvoker as k, TailorUser as kt, WorkflowServiceInput as l, FieldMetadata as lt, ExecutorInput as m, TailorField as mt, GeneratorConfig as n, PermissionCondition as nt, IdPInput as o, unsafeAllowAllTypePermission as ot, Executor as p, TailorAnyField as pt, UserAttributeKey as q, AppConfig as r, TailorTypeGqlPermission as rt, IdpDefinitionBrand as s, ArrayFieldOutput as st, Generator as t, db as tt, StaticWebsiteConfig as u, FieldOptions as ut, GqlOperation as v, ResolverInput as vt, WebhookOperation as w, Env as wt, RecordTrigger as x, InferFieldsOutput as xt, IdpUserTrigger as y, ResolverServiceConfig as yt, SAML as z };
1705
- //# sourceMappingURL=index-Dkm2qwmF.d.mts.map
1773
+ //# sourceMappingURL=index-DFEsnnHR.d.mts.map