@tailor-platform/sdk 1.32.1 → 1.33.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.
Files changed (47) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/{application-p2GujXmg.mjs → application-CfAom-vi.mjs} +33 -25
  3. package/dist/application-CfAom-vi.mjs.map +1 -0
  4. package/dist/{application-Cwt_ifTT.mjs → application-ChVyhwe-.mjs} +4 -4
  5. package/dist/cli/index.mjs +9 -9
  6. package/dist/cli/index.mjs.map +1 -1
  7. package/dist/cli/lib.d.mts +9 -6
  8. package/dist/cli/lib.mjs +7 -7
  9. package/dist/configure/index.d.mts +5 -5
  10. package/dist/configure/index.mjs +81 -11
  11. package/dist/configure/index.mjs.map +1 -1
  12. package/dist/{enum-constants-CkKARYb7.mjs → enum-constants-Piv_E-2M.mjs} +2 -1
  13. package/dist/{enum-constants-CkKARYb7.mjs.map → enum-constants-Piv_E-2M.mjs.map} +1 -1
  14. package/dist/{env-BZLTIlIo.d.mts → env-CSZ9CKg7.d.mts} +2 -2
  15. package/dist/{file-utils-D2TxR_kj.mjs → file-utils-B7xME5IK.mjs} +2 -1
  16. package/dist/{file-utils-D2TxR_kj.mjs.map → file-utils-B7xME5IK.mjs.map} +1 -1
  17. package/dist/{index-BYk_9R3S.d.mts → index-BdlrrjvD.d.mts} +133 -24
  18. package/dist/{index-BQKAzTPA.d.mts → index-Dlpe_4Nd.d.mts} +3 -2
  19. package/dist/{index-vVGamLOw.d.mts → index-IHl7P_9I.d.mts} +3 -2
  20. package/dist/{index-CgMytw2A.d.mts → index-dg3Sf-No.d.mts} +3 -2
  21. package/dist/{index-CoReoodF.d.mts → index-uNv9YJgx.d.mts} +3 -2
  22. package/dist/{kysely-type-BK0b4Rqt.mjs → kysely-type-t5MbP7iJ.mjs} +2 -1
  23. package/dist/{kysely-type-BK0b4Rqt.mjs.map → kysely-type-t5MbP7iJ.mjs.map} +1 -1
  24. package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
  25. package/dist/plugin/builtin/enum-constants/index.mjs +1 -1
  26. package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
  27. package/dist/plugin/builtin/file-utils/index.mjs +1 -1
  28. package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
  29. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  30. package/dist/plugin/builtin/seed/index.d.mts +1 -1
  31. package/dist/plugin/builtin/seed/index.mjs +1 -1
  32. package/dist/plugin/index.d.mts +2 -2
  33. package/dist/{plugin-IIDZW9GG.d.mts → plugin-BC7WQrjm.d.mts} +24 -13
  34. package/dist/{runtime-7DOyTTxR.mjs → runtime-3P9JFpe9.mjs} +1018 -303
  35. package/dist/runtime-3P9JFpe9.mjs.map +1 -0
  36. package/dist/{schema-BITbkmq3.mjs → schema-D27cW0Ca.mjs} +2 -1
  37. package/dist/{schema-BITbkmq3.mjs.map → schema-D27cW0Ca.mjs.map} +1 -1
  38. package/dist/{seed-BXrSEJbv.mjs → seed-DtYgudLq.mjs} +11 -3
  39. package/dist/seed-DtYgudLq.mjs.map +1 -0
  40. package/dist/utils/test/index.d.mts +2 -2
  41. package/dist/{workflow.generated-C2A5Ye0m.d.mts → workflow.generated-Cd5dsFnf.d.mts} +2 -2
  42. package/docs/cli/application.md +17 -0
  43. package/docs/services/executor.md +54 -0
  44. package/package.json +8 -8
  45. package/dist/application-p2GujXmg.mjs.map +0 -1
  46. package/dist/runtime-7DOyTTxR.mjs.map +0 -1
  47. package/dist/seed-BXrSEJbv.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
 
2
2
  import "../../../chunk-COzJYswC.mjs";
3
- import { n as seedPlugin, t as SeedGeneratorID } from "../../../seed-BXrSEJbv.mjs";
3
+ import { n as seedPlugin, t as SeedGeneratorID } from "../../../seed-DtYgudLq.mjs";
4
4
 
5
5
  export { SeedGeneratorID, seedPlugin };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="@tailor-platform/function-types" />
2
- import { z as TailorAnyDBType } from "../plugin-IIDZW9GG.mjs";
3
- import { n as TailorEnv, r as TailorActor } from "../env-BZLTIlIo.mjs";
2
+ import { z as TailorAnyDBType } from "../plugin-BC7WQrjm.mjs";
3
+ import { n as TailorEnv, r as TailorActor } from "../env-CSZ9CKg7.mjs";
4
4
 
5
5
  //#region src/plugin/with-context.d.ts
6
6
  /**
@@ -177,8 +177,9 @@ type TenantProvider = {
177
177
  };
178
178
  //#endregion
179
179
  //#region src/types/executor.generated.d.ts
180
- type RecordTrigger = {
181
- /** Record event type */kind: "recordCreated" | "recordUpdated" | "recordDeleted"; /** TailorDB type name to watch for events */
180
+ type TailorDBTrigger = {
181
+ /** TailorDB record event trigger */kind: "tailordb"; /** TailorDB event types to trigger on */
182
+ events: ("tailordb.type_record.created" | "tailordb.type_record.updated" | "tailordb.type_record.deleted")[]; /** TailorDB type name to watch for events */
182
183
  typeName: string; /** Condition function to filter events */
183
184
  condition?: Function | undefined;
184
185
  };
@@ -196,10 +197,12 @@ type IncomingWebhookTrigger = {
196
197
  kind: "incomingWebhook";
197
198
  };
198
199
  type IdpUserTrigger = {
199
- /** IdP user event type */kind: "idpUserCreated" | "idpUserUpdated" | "idpUserDeleted";
200
+ /** IdP user event trigger */kind: "idpUser"; /** IdP user event types to trigger on */
201
+ events: ("idp.user.created" | "idp.user.updated" | "idp.user.deleted")[];
200
202
  };
201
203
  type AuthAccessTokenTrigger = {
202
- /** Auth access token event type */kind: "authAccessTokenIssued" | "authAccessTokenRefreshed" | "authAccessTokenRevoked";
204
+ /** Auth access token event trigger */kind: "authAccessToken"; /** Auth access token event types to trigger on */
205
+ events: ("auth.access_token.issued" | "auth.access_token.refreshed" | "auth.access_token.revoked")[];
203
206
  };
204
207
  type FunctionOperation = {
205
208
  kind: "function" | "jobFunction"; /** Function implementation */
@@ -244,7 +247,8 @@ type WorkflowOperation = {
244
247
  type ExecutorInput = {
245
248
  /** Executor name */name: string; /** Event trigger configuration */
246
249
  trigger: {
247
- kind: "recordCreated" | "recordUpdated" | "recordDeleted";
250
+ kind: "tailordb";
251
+ events: ("tailordb.type_record.created" | "tailordb.type_record.updated" | "tailordb.type_record.deleted")[];
248
252
  typeName: string;
249
253
  condition?: Function | undefined;
250
254
  } | {
@@ -258,9 +262,11 @@ type ExecutorInput = {
258
262
  } | {
259
263
  kind: "incomingWebhook";
260
264
  } | {
261
- kind: "idpUserCreated" | "idpUserUpdated" | "idpUserDeleted";
265
+ kind: "idpUser";
266
+ events: ("idp.user.created" | "idp.user.updated" | "idp.user.deleted")[];
262
267
  } | {
263
- kind: "authAccessTokenIssued" | "authAccessTokenRefreshed" | "authAccessTokenRevoked";
268
+ kind: "authAccessToken";
269
+ events: ("auth.access_token.issued" | "auth.access_token.refreshed" | "auth.access_token.revoked")[];
264
270
  }; /** Operation to execute when triggered */
265
271
  operation: unknown; /** Executor description */
266
272
  description?: string | undefined; /** Whether the executor is disabled */
@@ -270,7 +276,8 @@ type Executor = {
270
276
  /** Executor name */name: string; /** Whether the executor is disabled */
271
277
  disabled: boolean; /** Event trigger configuration */
272
278
  trigger: {
273
- kind: "recordCreated" | "recordUpdated" | "recordDeleted";
279
+ kind: "tailordb";
280
+ events: ("tailordb.type_record.created" | "tailordb.type_record.updated" | "tailordb.type_record.deleted")[];
274
281
  typeName: string;
275
282
  condition?: Function | undefined;
276
283
  } | {
@@ -284,9 +291,11 @@ type Executor = {
284
291
  } | {
285
292
  kind: "incomingWebhook";
286
293
  } | {
287
- kind: "idpUserCreated" | "idpUserUpdated" | "idpUserDeleted";
294
+ kind: "idpUser";
295
+ events: ("idp.user.created" | "idp.user.updated" | "idp.user.deleted")[];
288
296
  } | {
289
- kind: "authAccessTokenIssued" | "authAccessTokenRefreshed" | "authAccessTokenRevoked";
297
+ kind: "authAccessToken";
298
+ events: ("auth.access_token.issued" | "auth.access_token.refreshed" | "auth.access_token.revoked")[];
290
299
  }; /** Operation to execute when triggered */
291
300
  operation: {
292
301
  kind: "workflow";
@@ -1458,6 +1467,7 @@ declare function dbType<const F extends {
1458
1467
  declare function dbType<const F extends {
1459
1468
  id?: never;
1460
1469
  } & Record<string, TailorAnyDBField>>(name: string | [string, string], description: string, fields: F): DBType<F>;
1470
+ /** TailorDB schema builder utilities for defining types and fields. */
1461
1471
  declare const db: {
1462
1472
  type: typeof dbType;
1463
1473
  uuid: typeof uuid;
@@ -1937,7 +1947,8 @@ interface PluginGeneratedResolver {
1937
1947
  body: string;
1938
1948
  }
1939
1949
  interface PluginRecordTriggerConfig {
1940
- kind: "recordCreated" | "recordUpdated" | "recordDeleted";
1950
+ kind: "tailordb";
1951
+ events: ("tailordb.type_record.created" | "tailordb.type_record.updated" | "tailordb.type_record.deleted")[];
1941
1952
  typeName: string;
1942
1953
  }
1943
1954
  interface PluginScheduleTriggerConfig {
@@ -2024,5 +2035,5 @@ interface Plugin<TypeConfig = unknown, PluginConfig = unknown> {
2024
2035
  onExecutorReady?(context: ExecutorReadyContext<PluginConfig>): GeneratorResult | Promise<GeneratorResult>;
2025
2036
  }
2026
2037
  //#endregion
2027
- export { FieldOutput$1 as $, DefinedAuth as A, BuiltinIdP as At, TailorDBField as B, SCIMResource as Bt, TailorDBType as C, IncomingWebhookTrigger as Ct, AuthOwnConfig as D, WebhookOperation as Dt, AuthExternalConfig as E, ScheduleTriggerInput as Et, UserAttributeMap as F, SAML as Ft, TailorTypeGqlPermission as G, TailorDBType$1 as H, UsernameFieldKey as I, SCIMAttribute as It, unsafeAllowAllTypePermission as J, TailorTypePermission as K, ValueOperand as L, SCIMAttributeMapping as Lt, SCIMAttributeType as M, IdProvider as Mt, UserAttributeKey as N, OAuth2ClientInput as Nt, AuthServiceInput as O, WorkflowOperation as Ot, UserAttributeListKey as P, OIDC as Pt, FieldOptions as Q, TailorAnyDBField as R, SCIMAuthorization as Rt, TailorDBServiceInput as S, IdpUserTrigger as St, AuthConfig as T, ResolverExecutedTrigger as Tt, db as U, TailorDBInstance as V, TenantProvider as Vt, PermissionCondition as W, DefinedFieldMetadata as X, ArrayFieldOutput as Y, FieldMetadata as Z, GeneratorResult as _, AuthAccessTokenTrigger as _t, PluginExecutorContext as a, output as at, TailorDBNamespaceData as b, FunctionOperation as bt, PluginGeneratedExecutorWithFile as c, InferredAttributeList as ct, PluginNamespaceProcessContext as d, unauthenticatedTailorUser as dt, TailorFieldType as et, PluginOutput as f, AllowedValues as ft, ExecutorReadyContext as g, GeneratorConfig as gt, TypePluginOutput as h, ResolverInput as ht, PluginConfigs as i, JsonCompatible as it, OAuth2ClientGrantType as j, IDToken as jt, BeforeLoginHookArgs as k, AuthInvoker as kt, PluginGeneratedResolver as l, InferredAttributeMap as lt, TailorDBTypeForPlugin as m, Resolver as mt, Plugin as n, TailorField as nt, PluginExecutorContextBase as o, AttributeList as ot, PluginProcessContext as p, AllowedValuesOutput as pt, unsafeAllowAllGqlPermission as q, PluginAttachment as r, InferFieldsOutput as rt, PluginGeneratedExecutor as s, AttributeMap as st, NamespacePluginOutput as t, TailorAnyField as tt, PluginGeneratedType as u, TailorUser as ut, ResolverNamespaceData as v, Executor as vt, TypeSourceInfoEntry as w, RecordTrigger as wt, TailorDBReadyContext as x, GqlOperation as xt, ResolverReadyContext as y, ExecutorInput as yt, TailorAnyDBType as z, SCIMConfig as zt };
2028
- //# sourceMappingURL=plugin-IIDZW9GG.d.mts.map
2038
+ export { FieldOutput$1 as $, DefinedAuth as A, BuiltinIdP as At, TailorDBField as B, SCIMResource as Bt, TailorDBType as C, IncomingWebhookTrigger as Ct, AuthOwnConfig as D, WebhookOperation as Dt, AuthExternalConfig as E, TailorDBTrigger as Et, UserAttributeMap as F, SAML as Ft, TailorTypeGqlPermission as G, TailorDBType$1 as H, UsernameFieldKey as I, SCIMAttribute as It, unsafeAllowAllTypePermission as J, TailorTypePermission as K, ValueOperand as L, SCIMAttributeMapping as Lt, SCIMAttributeType as M, IdProvider as Mt, UserAttributeKey as N, OAuth2ClientInput as Nt, AuthServiceInput as O, WorkflowOperation as Ot, UserAttributeListKey as P, OIDC as Pt, FieldOptions as Q, TailorAnyDBField as R, SCIMAuthorization as Rt, TailorDBServiceInput as S, IdpUserTrigger as St, AuthConfig as T, ScheduleTriggerInput as Tt, db as U, TailorDBInstance as V, TenantProvider as Vt, PermissionCondition as W, DefinedFieldMetadata as X, ArrayFieldOutput as Y, FieldMetadata as Z, GeneratorResult as _, AuthAccessTokenTrigger as _t, PluginExecutorContext as a, output as at, TailorDBNamespaceData as b, FunctionOperation as bt, PluginGeneratedExecutorWithFile as c, InferredAttributeList as ct, PluginNamespaceProcessContext as d, unauthenticatedTailorUser as dt, TailorFieldType as et, PluginOutput as f, AllowedValues as ft, ExecutorReadyContext as g, GeneratorConfig as gt, TypePluginOutput as h, ResolverInput as ht, PluginConfigs as i, JsonCompatible as it, OAuth2ClientGrantType as j, IDToken as jt, BeforeLoginHookArgs as k, AuthInvoker as kt, PluginGeneratedResolver as l, InferredAttributeMap as lt, TailorDBTypeForPlugin as m, Resolver as mt, Plugin as n, TailorField as nt, PluginExecutorContextBase as o, AttributeList as ot, PluginProcessContext as p, AllowedValuesOutput as pt, unsafeAllowAllGqlPermission as q, PluginAttachment as r, InferFieldsOutput as rt, PluginGeneratedExecutor as s, AttributeMap as st, NamespacePluginOutput as t, TailorAnyField as tt, PluginGeneratedType as u, TailorUser as ut, ResolverNamespaceData as v, Executor as vt, TypeSourceInfoEntry as w, ResolverExecutedTrigger as wt, TailorDBReadyContext as x, GqlOperation as xt, ResolverReadyContext as y, ExecutorInput as yt, TailorAnyDBType as z, SCIMConfig as zt };
2039
+ //# sourceMappingURL=plugin-BC7WQrjm.d.mts.map