@tailor-platform/sdk 1.32.0 → 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 (88) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/dist/{application-B8vok3w2.mjs → application-CfAom-vi.mjs} +38 -29
  3. package/dist/application-CfAom-vi.mjs.map +1 -0
  4. package/dist/application-ChVyhwe-.mjs +12 -0
  5. package/dist/{brand-GZnI4eYb.mjs → brand-0SscafcY.mjs} +2 -1
  6. package/dist/{brand-GZnI4eYb.mjs.map → brand-0SscafcY.mjs.map} +1 -1
  7. package/dist/{chunk-DEt8GZDa.mjs → chunk-COzJYswC.mjs} +1 -0
  8. package/dist/cli/index.d.mts +1 -0
  9. package/dist/cli/index.mjs +30 -29
  10. package/dist/cli/index.mjs.map +1 -1
  11. package/dist/cli/lib.d.mts +10 -6
  12. package/dist/cli/lib.mjs +14 -13
  13. package/dist/cli/lib.mjs.map +1 -1
  14. package/dist/cli/skills.d.mts +1 -0
  15. package/dist/cli/skills.mjs +2 -1
  16. package/dist/cli/skills.mjs.map +1 -1
  17. package/dist/{client-DfdgRZlQ.mjs → client-D5P1myz0.mjs} +6 -5
  18. package/dist/{client-DfdgRZlQ.mjs.map → client-D5P1myz0.mjs.map} +1 -1
  19. package/dist/{client-B0wrLUVK.mjs → client-gpRgZl1b.mjs} +5 -4
  20. package/dist/configure/index.d.mts +6 -5
  21. package/dist/configure/index.mjs +85 -14
  22. package/dist/configure/index.mjs.map +1 -1
  23. package/dist/crash-report-Cm9vFmTN.mjs +7 -0
  24. package/dist/{crash-report-wNxS0IUJ.mjs → crash-report-DnwITWeV.mjs} +5 -4
  25. package/dist/{crash-report-wNxS0IUJ.mjs.map → crash-report-DnwITWeV.mjs.map} +1 -1
  26. package/dist/{enum-constants-D1nfn0qD.mjs → enum-constants-Piv_E-2M.mjs} +3 -1
  27. package/dist/{enum-constants-D1nfn0qD.mjs.map → enum-constants-Piv_E-2M.mjs.map} +1 -1
  28. package/dist/{env-BgdHfWDn.d.mts → env-CSZ9CKg7.d.mts} +3 -2
  29. package/dist/{file-utils-Bctuzn3x.mjs → file-utils-B7xME5IK.mjs} +3 -1
  30. package/dist/{file-utils-Bctuzn3x.mjs.map → file-utils-B7xME5IK.mjs.map} +1 -1
  31. package/dist/{index-BAud4CE7.d.mts → index-BdlrrjvD.d.mts} +145 -35
  32. package/dist/{index-D4Y81vh1.d.mts → index-Dlpe_4Nd.d.mts} +4 -2
  33. package/dist/{index-FZMBoUWm.d.mts → index-IHl7P_9I.d.mts} +4 -2
  34. package/dist/{index-CxgBnxKM.d.mts → index-dg3Sf-No.d.mts} +4 -2
  35. package/dist/{index-CdDzh-T2.d.mts → index-uNv9YJgx.d.mts} +4 -2
  36. package/dist/{interceptor-DgQNmwWJ.mjs → interceptor-1LL1gBsF.mjs} +3 -2
  37. package/dist/{interceptor-DgQNmwWJ.mjs.map → interceptor-1LL1gBsF.mjs.map} +1 -1
  38. package/dist/{job-DdfW7vH3.mjs → job-CPKYCk_e.mjs} +3 -2
  39. package/dist/{job-DdfW7vH3.mjs.map → job-CPKYCk_e.mjs.map} +1 -1
  40. package/dist/kysely/index.d.mts +1 -0
  41. package/dist/kysely/index.mjs +2 -1
  42. package/dist/kysely/index.mjs.map +1 -1
  43. package/dist/{kysely-type-B_IecdK9.mjs → kysely-type-t5MbP7iJ.mjs} +3 -1
  44. package/dist/{kysely-type-B_IecdK9.mjs.map → kysely-type-t5MbP7iJ.mjs.map} +1 -1
  45. package/dist/{logger-CqezTedh.mjs → logger-qz-Y4sBV.mjs} +2 -1
  46. package/dist/{logger-CqezTedh.mjs.map → logger-qz-Y4sBV.mjs.map} +1 -1
  47. package/dist/package-json-88x7bPKC.mjs +5 -0
  48. package/dist/{package-json-D3x2nBPB.mjs → package-json-VqyFvGiP.mjs} +2 -1
  49. package/dist/{package-json-D3x2nBPB.mjs.map → package-json-VqyFvGiP.mjs.map} +1 -1
  50. package/dist/plugin/builtin/enum-constants/index.d.mts +2 -1
  51. package/dist/plugin/builtin/enum-constants/index.mjs +3 -2
  52. package/dist/plugin/builtin/file-utils/index.d.mts +2 -1
  53. package/dist/plugin/builtin/file-utils/index.mjs +3 -2
  54. package/dist/plugin/builtin/kysely-type/index.d.mts +2 -1
  55. package/dist/plugin/builtin/kysely-type/index.mjs +3 -2
  56. package/dist/plugin/builtin/seed/index.d.mts +2 -1
  57. package/dist/plugin/builtin/seed/index.mjs +3 -2
  58. package/dist/plugin/index.d.mts +3 -2
  59. package/dist/plugin/index.mjs +2 -1
  60. package/dist/plugin/index.mjs.map +1 -1
  61. package/dist/{plugin-DyVYXZWz.d.mts → plugin-BC7WQrjm.d.mts} +25 -13
  62. package/dist/{runtime-DbX_UxlC.mjs → runtime-3P9JFpe9.mjs} +1036 -321
  63. package/dist/runtime-3P9JFpe9.mjs.map +1 -0
  64. package/dist/{schema-CNWt2FKQ.mjs → schema-D27cW0Ca.mjs} +4 -2
  65. package/dist/{schema-CNWt2FKQ.mjs.map → schema-D27cW0Ca.mjs.map} +1 -1
  66. package/dist/seed/index.d.mts +1 -0
  67. package/dist/seed/index.mjs +2 -1
  68. package/dist/seed/index.mjs.map +1 -1
  69. package/dist/{seed-CWkIDWMb.mjs → seed-DtYgudLq.mjs} +12 -3
  70. package/dist/seed-DtYgudLq.mjs.map +1 -0
  71. package/dist/{telemetry-BSUlYTs-.mjs → telemetry-B4sp-dD2.mjs} +3 -2
  72. package/dist/{telemetry-BSUlYTs-.mjs.map → telemetry-B4sp-dD2.mjs.map} +1 -1
  73. package/dist/telemetry-DXIGGa6A.mjs +5 -0
  74. package/dist/utils/test/index.d.mts +3 -2
  75. package/dist/utils/test/index.mjs +4 -3
  76. package/dist/utils/test/index.mjs.map +1 -1
  77. package/dist/{workflow.generated-DMQ-cjyT.d.mts → workflow.generated-Cd5dsFnf.d.mts} +3 -2
  78. package/docs/cli/application.md +17 -0
  79. package/docs/generator/builtin.md +0 -8
  80. package/docs/services/executor.md +54 -0
  81. package/package.json +18 -17
  82. package/dist/application-B8vok3w2.mjs.map +0 -1
  83. package/dist/application-DHifc-oA.mjs +0 -11
  84. package/dist/crash-report-BMEhRxeg.mjs +0 -6
  85. package/dist/package-json-DiZWrkIA.mjs +0 -4
  86. package/dist/runtime-DbX_UxlC.mjs.map +0 -1
  87. package/dist/seed-CWkIDWMb.mjs.map +0 -1
  88. package/dist/telemetry-BtN2l0f1.mjs +0 -4
@@ -1,3 +1,4 @@
1
+ /// <reference types="@tailor-platform/function-types" />
1
2
  import { z } from "zod";
2
3
  import { StandardSchemaV1 } from "@standard-schema/spec";
3
4
  import { IsAny, JsonObject, NonEmptyObject } from "type-fest";
@@ -176,8 +177,9 @@ type TenantProvider = {
176
177
  };
177
178
  //#endregion
178
179
  //#region src/types/executor.generated.d.ts
179
- type RecordTrigger = {
180
- /** 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 */
181
183
  typeName: string; /** Condition function to filter events */
182
184
  condition?: Function | undefined;
183
185
  };
@@ -195,10 +197,12 @@ type IncomingWebhookTrigger = {
195
197
  kind: "incomingWebhook";
196
198
  };
197
199
  type IdpUserTrigger = {
198
- /** 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")[];
199
202
  };
200
203
  type AuthAccessTokenTrigger = {
201
- /** 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")[];
202
206
  };
203
207
  type FunctionOperation = {
204
208
  kind: "function" | "jobFunction"; /** Function implementation */
@@ -243,7 +247,8 @@ type WorkflowOperation = {
243
247
  type ExecutorInput = {
244
248
  /** Executor name */name: string; /** Event trigger configuration */
245
249
  trigger: {
246
- kind: "recordCreated" | "recordUpdated" | "recordDeleted";
250
+ kind: "tailordb";
251
+ events: ("tailordb.type_record.created" | "tailordb.type_record.updated" | "tailordb.type_record.deleted")[];
247
252
  typeName: string;
248
253
  condition?: Function | undefined;
249
254
  } | {
@@ -257,9 +262,11 @@ type ExecutorInput = {
257
262
  } | {
258
263
  kind: "incomingWebhook";
259
264
  } | {
260
- kind: "idpUserCreated" | "idpUserUpdated" | "idpUserDeleted";
265
+ kind: "idpUser";
266
+ events: ("idp.user.created" | "idp.user.updated" | "idp.user.deleted")[];
261
267
  } | {
262
- kind: "authAccessTokenIssued" | "authAccessTokenRefreshed" | "authAccessTokenRevoked";
268
+ kind: "authAccessToken";
269
+ events: ("auth.access_token.issued" | "auth.access_token.refreshed" | "auth.access_token.revoked")[];
263
270
  }; /** Operation to execute when triggered */
264
271
  operation: unknown; /** Executor description */
265
272
  description?: string | undefined; /** Whether the executor is disabled */
@@ -269,7 +276,8 @@ type Executor = {
269
276
  /** Executor name */name: string; /** Whether the executor is disabled */
270
277
  disabled: boolean; /** Event trigger configuration */
271
278
  trigger: {
272
- kind: "recordCreated" | "recordUpdated" | "recordDeleted";
279
+ kind: "tailordb";
280
+ events: ("tailordb.type_record.created" | "tailordb.type_record.updated" | "tailordb.type_record.deleted")[];
273
281
  typeName: string;
274
282
  condition?: Function | undefined;
275
283
  } | {
@@ -283,9 +291,11 @@ type Executor = {
283
291
  } | {
284
292
  kind: "incomingWebhook";
285
293
  } | {
286
- kind: "idpUserCreated" | "idpUserUpdated" | "idpUserDeleted";
294
+ kind: "idpUser";
295
+ events: ("idp.user.created" | "idp.user.updated" | "idp.user.deleted")[];
287
296
  } | {
288
- kind: "authAccessTokenIssued" | "authAccessTokenRefreshed" | "authAccessTokenRevoked";
297
+ kind: "authAccessToken";
298
+ events: ("auth.access_token.issued" | "auth.access_token.refreshed" | "auth.access_token.revoked")[];
289
299
  }; /** Operation to execute when triggered */
290
300
  operation: {
291
301
  kind: "workflow";
@@ -1457,6 +1467,7 @@ declare function dbType<const F extends {
1457
1467
  declare function dbType<const F extends {
1458
1468
  id?: never;
1459
1469
  } & Record<string, TailorAnyDBField>>(name: string | [string, string], description: string, fields: F): DBType<F>;
1470
+ /** TailorDB schema builder utilities for defining types and fields. */
1460
1471
  declare const db: {
1461
1472
  type: typeof dbType;
1462
1473
  uuid: typeof uuid;
@@ -1936,7 +1947,8 @@ interface PluginGeneratedResolver {
1936
1947
  body: string;
1937
1948
  }
1938
1949
  interface PluginRecordTriggerConfig {
1939
- kind: "recordCreated" | "recordUpdated" | "recordDeleted";
1950
+ kind: "tailordb";
1951
+ events: ("tailordb.type_record.created" | "tailordb.type_record.updated" | "tailordb.type_record.deleted")[];
1940
1952
  typeName: string;
1941
1953
  }
1942
1954
  interface PluginScheduleTriggerConfig {
@@ -2023,5 +2035,5 @@ interface Plugin<TypeConfig = unknown, PluginConfig = unknown> {
2023
2035
  onExecutorReady?(context: ExecutorReadyContext<PluginConfig>): GeneratorResult | Promise<GeneratorResult>;
2024
2036
  }
2025
2037
  //#endregion
2026
- 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 };
2027
- //# sourceMappingURL=plugin-DyVYXZWz.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