@tailor-platform/sdk 2.36.0 → 2.38.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 (164) hide show
  1. package/CHANGELOG.md +132 -0
  2. package/dist/{application-DaJbleMi.mjs → application-Bz80INH4.mjs} +1 -1
  3. package/dist/application-CeqD1OK-.mjs +207 -0
  4. package/dist/application-CeqD1OK-.mjs.map +1 -0
  5. package/dist/cli/commands/deploy/deploy.d.mts +7 -1
  6. package/dist/cli/commands/deploy/tailordb/migration-validation.d.mts +3 -0
  7. package/dist/cli/commands/executor/jobs.d.mts +3 -0
  8. package/dist/cli/commands/tailordb/migrate/bundler.d.mts +3 -0
  9. package/dist/cli/commands/tailordb/migrate/config.d.mts +4 -0
  10. package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +10 -0
  11. package/dist/cli/commands/tailordb/migrate/generate.d.mts +28 -2
  12. package/dist/cli/commands/tailordb/migrate/hints.d.mts +1 -0
  13. package/dist/cli/commands/tailordb/migrate/remote-state.d.mts +3 -0
  14. package/dist/cli/commands/tailordb/migrate/schema-checks.d.mts +3 -1
  15. package/dist/cli/commands/tailordb/migrate/snapshot-comparison.d.mts +4 -0
  16. package/dist/cli/commands/tailordb/migrate/snapshot-files.d.mts +44 -6
  17. package/dist/cli/commands/tailordb/migrate/snapshot-local.d.mts +2 -0
  18. package/dist/cli/commands/tailordb/migrate/snapshot-migrations.d.mts +2 -0
  19. package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +8 -0
  20. package/dist/cli/commands/tailordb/migrate/types.d.mts +2 -0
  21. package/dist/cli/commands/workspace/create.d.mts +1 -1
  22. package/dist/cli/lib.d.mts +3 -3
  23. package/dist/cli/lib.mjs +1 -1
  24. package/dist/cli/lib.mjs.map +1 -1
  25. package/dist/cli/main.mjs +65 -58
  26. package/dist/cli/main.mjs.map +1 -1
  27. package/dist/cli/shared/args.d.mts +14 -5
  28. package/dist/cli/shared/client.d.mts +40 -3
  29. package/dist/cli/shared/error-json.d.mts +12 -26
  30. package/dist/cli/shared/function-execution.d.mts +2 -0
  31. package/dist/cli/shared/prompt.d.mts +9 -4
  32. package/dist/client-CHXix4LD.mjs +1 -0
  33. package/dist/client-DOQv-BP8.mjs +2 -0
  34. package/dist/client-DOQv-BP8.mjs.map +1 -0
  35. package/dist/completion/zsh-worker.zsh +151 -79
  36. package/dist/configure/config/index.d.mts +2 -0
  37. package/dist/configure/config/types.d.mts +2 -0
  38. package/dist/configure/index.mjs.map +1 -1
  39. package/dist/configure/services/executor/operation.d.mts +5 -4
  40. package/dist/configure/services/http-adapter/http-adapter.d.mts +1 -1
  41. package/dist/configure/services/index.d.mts +0 -1
  42. package/dist/configure/services/tailordb/schema.d.mts +1 -0
  43. package/dist/configure/services/tailordb/types.d.mts +12 -0
  44. package/dist/context-DSi5kfqr.mjs +23 -0
  45. package/dist/context-DSi5kfqr.mjs.map +1 -0
  46. package/dist/context-OOASEQLA.mjs +1 -0
  47. package/dist/{crashreport-DGU6lwiX.mjs → crashreport-CQTAlnbA.mjs} +4 -4
  48. package/dist/{crashreport-DGU6lwiX.mjs.map → crashreport-CQTAlnbA.mjs.map} +1 -1
  49. package/dist/crashreport-GRnWyDnF.mjs +1 -0
  50. package/dist/date-representation-Cr7W7Pn2.mjs.map +1 -1
  51. package/dist/{errors-BXmGBX-7.mjs → errors-9OOL3xOM.mjs} +6 -5
  52. package/dist/errors-9OOL3xOM.mjs.map +1 -0
  53. package/dist/field_behavior_pb-B196sUx6.mjs +2 -0
  54. package/dist/field_behavior_pb-B196sUx6.mjs.map +1 -0
  55. package/dist/{kysely-type-B0ri1-Xs.mjs → kysely-type-DhAZqdQg.mjs} +14 -10
  56. package/dist/kysely-type-DhAZqdQg.mjs.map +1 -0
  57. package/dist/notification_resource_pb-BZ0hCA01.mjs +1 -0
  58. package/dist/notification_resource_pb-Dwzah7gO.mjs +2 -0
  59. package/dist/notification_resource_pb-Dwzah7gO.mjs.map +1 -0
  60. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  61. package/dist/plugin/builtin/seed/seed-type-processor.d.mts +4 -3
  62. package/dist/plugin/get-generated-table.d.mts +4 -0
  63. package/dist/plugin/index.mjs.map +1 -1
  64. package/dist/plugin/types.d.mts +55 -3
  65. package/dist/plugin/with-context.d.mts +16 -0
  66. package/dist/register-ts-hook-CXYYYgCl.mjs +1094 -0
  67. package/dist/register-ts-hook-CXYYYgCl.mjs.map +1 -0
  68. package/dist/repl-editor-Bposemei.mjs +2 -0
  69. package/dist/repl-editor-Bposemei.mjs.map +1 -0
  70. package/dist/resource_pb-elY668ZB.mjs +2 -0
  71. package/dist/resource_pb-elY668ZB.mjs.map +1 -0
  72. package/dist/schema-BU1aIQ63.mjs.map +1 -1
  73. package/dist/{secret-file-BxZ-J_Nz.mjs → secret-file-CSXzcg4c.mjs} +2 -2
  74. package/dist/{secret-file-BxZ-J_Nz.mjs.map → secret-file-CSXzcg4c.mjs.map} +1 -1
  75. package/dist/{service-CaGmqg0r.mjs → service-B2vx6CGM.mjs} +2 -2
  76. package/dist/{service-CaGmqg0r.mjs.map → service-B2vx6CGM.mjs.map} +1 -1
  77. package/dist/service-DB-RHn25.mjs +9 -0
  78. package/dist/service-DB-RHn25.mjs.map +1 -0
  79. package/dist/service-DsAWXbVX.mjs +1 -0
  80. package/dist/service_pb-Bethc2NW.mjs +1 -0
  81. package/dist/service_pb-CfpSriCy.mjs +2 -0
  82. package/dist/service_pb-CfpSriCy.mjs.map +1 -0
  83. package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +3 -3
  84. package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +92 -0
  85. package/dist/tailor-proto/src/tailor/v1/notification_pb.d.mts +176 -0
  86. package/dist/tailor-proto/src/tailor/v1/notification_resource_pb.d.mts +172 -0
  87. package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +78 -0
  88. package/dist/types/app-config.generated.d.mts +1 -1
  89. package/dist/types/auth-connection.generated.d.mts +2 -2
  90. package/dist/types/auth.generated.d.mts +13 -13
  91. package/dist/types/executor.generated.d.mts +25 -25
  92. package/dist/types/field.generated.d.mts +2 -2
  93. package/dist/types/http-adapter.generated.d.mts +4 -4
  94. package/dist/types/idp.generated.d.mts +272 -272
  95. package/dist/types/resolver.generated.d.mts +10 -10
  96. package/dist/types/tailordb.generated.d.mts +84 -80
  97. package/dist/types/workflow.generated.d.mts +2 -2
  98. package/dist/validation-errors-DqCeUW4L.mjs +3 -0
  99. package/dist/validation-errors-DqCeUW4L.mjs.map +1 -0
  100. package/{LICENSE → dist/vendor/graphql/LICENSE} +6 -6
  101. package/dist/vendor/graphql/language/KindTypeMap.d.mts +3 -0
  102. package/dist/vendor/graphql/language/ast.d.mts +784 -0
  103. package/dist/vendor/graphql/language/kinds_.d.mts +203 -0
  104. package/dist/vendor/graphql/language/source.d.mts +46 -0
  105. package/dist/vendor/graphql/language/tokenKind.d.mts +35 -0
  106. package/dist/vitest/date-representation.d.mts +2 -0
  107. package/dist/vitest/environment.d.mts +1 -0
  108. package/dist/vitest/environment.mjs.map +1 -1
  109. package/dist/vitest/index.mjs.map +1 -1
  110. package/dist/vitest/migration-steps.d.mts +13 -2
  111. package/dist/vitest/mock-kysely.d.mts +12 -2
  112. package/dist/vitest/mocks/aigateway.d.mts +7 -1
  113. package/dist/vitest/mocks/authconnection.d.mts +7 -1
  114. package/dist/vitest/mocks/file.d.mts +8 -2
  115. package/dist/vitest/mocks/iconv.d.mts +7 -1
  116. package/dist/vitest/mocks/idp.d.mts +7 -1
  117. package/dist/vitest/mocks/logger.d.mts +7 -1
  118. package/dist/vitest/mocks/secretmanager.d.mts +7 -1
  119. package/dist/vitest/mocks/tailordb-pglite.d.mts +12 -2
  120. package/dist/vitest/mocks/tailordb.d.mts +22 -4
  121. package/dist/vitest/mocks/workflow.d.mts +2 -1
  122. package/dist/vitest/pglite-kysely.d.mts +18 -2
  123. package/dist/vitest/pglite-temporal.d.mts +5 -1
  124. package/dist/vitest/workflow-local.d.mts +7 -0
  125. package/dist/workspace_resource_pb-Cow7mrJY.mjs +2 -0
  126. package/dist/workspace_resource_pb-Cow7mrJY.mjs.map +1 -0
  127. package/docs/cli/application.md +63 -29
  128. package/docs/cli/executor.md +2 -0
  129. package/docs/cli/function.md +3 -1
  130. package/docs/cli/notification.md +128 -0
  131. package/docs/cli/tailordb.md +45 -68
  132. package/docs/cli/workflow.md +2 -0
  133. package/docs/cli/workspace.md +20 -18
  134. package/docs/cli-reference.md +231 -50
  135. package/docs/configuration.md +2 -2
  136. package/docs/data-clone.md +1 -1
  137. package/docs/github-actions.md +266 -41
  138. package/docs/plugin/custom.md +4 -4
  139. package/docs/runtime.md +1 -1
  140. package/docs/services/auth.md +2 -0
  141. package/docs/services/idp.md +2 -0
  142. package/docs/services/tailordb/index.md +13 -4
  143. package/docs/services/tailordb/migration.md +109 -71
  144. package/docs/services/workflow.md +1 -1
  145. package/docs/testing.md +9 -10
  146. package/package.json +23 -19
  147. package/dist/application-BbORWCj-.mjs +0 -207
  148. package/dist/application-BbORWCj-.mjs.map +0 -1
  149. package/dist/configure/services/http-adapter/index.d.mts +0 -2
  150. package/dist/crashreport-WsYAWARW.mjs +0 -1
  151. package/dist/errors-BXmGBX-7.mjs.map +0 -1
  152. package/dist/kysely-type-B0ri1-Xs.mjs.map +0 -1
  153. package/dist/register-ts-hook-iAcG1dfz.mjs +0 -1057
  154. package/dist/register-ts-hook-iAcG1dfz.mjs.map +0 -1
  155. package/dist/repl-editor-DkrCZmmg.mjs +0 -2
  156. package/dist/repl-editor-DkrCZmmg.mjs.map +0 -1
  157. package/dist/service-DTrVVaDJ.mjs +0 -1
  158. package/dist/service-hIarp2Gl.mjs +0 -8
  159. package/dist/service-hIarp2Gl.mjs.map +0 -1
  160. package/dist/service_pb-6EkMfdOb.mjs +0 -2
  161. package/dist/service_pb-6EkMfdOb.mjs.map +0 -1
  162. package/dist/service_pb-CsJKokDl.mjs +0 -1
  163. package/dist/workspace_resource_pb-C4CkoYww.mjs +0 -2
  164. package/dist/workspace_resource_pb-C4CkoYww.mjs.map +0 -1
@@ -10,10 +10,11 @@ interface GeneratedFile {
10
10
  path: string;
11
11
  content: string;
12
12
  skipIfExists?: boolean;
13
- executable?: boolean;
14
13
  }
15
14
  /**
16
15
  * Result returned by generation-time hooks.
16
+ *
17
+ * **Beta:** This API may change in future releases.
17
18
  */
18
19
  export interface GeneratorResult {
19
20
  files: GeneratedFile[];
@@ -37,6 +38,8 @@ export interface GeneratorAuthInput {
37
38
  }
38
39
  /**
39
40
  * Namespace-level TailorDB data available to generation-time hooks.
41
+ *
42
+ * **Beta:** This API may change in future releases.
40
43
  */
41
44
  export interface TailorDBNamespaceData {
42
45
  /** Namespace name */
@@ -50,6 +53,8 @@ export interface TailorDBNamespaceData {
50
53
  }
51
54
  /**
52
55
  * Namespace-level resolver data available to generation-time hooks.
56
+ *
57
+ * **Beta:** This API may change in future releases.
53
58
  */
54
59
  export interface ResolverNamespaceData {
55
60
  /** Namespace name */
@@ -59,6 +64,8 @@ export interface ResolverNamespaceData {
59
64
  }
60
65
  /**
61
66
  * Context passed to plugin's onTailorDBReady hook.
67
+ *
68
+ * **Beta:** This API may change in future releases.
62
69
  * @template PluginConfig - Plugin-level configuration type
63
70
  */
64
71
  export interface TailorDBReadyContext<PluginConfig = unknown> {
@@ -75,6 +82,8 @@ export interface TailorDBReadyContext<PluginConfig = unknown> {
75
82
  }
76
83
  /**
77
84
  * Context passed to plugin's onResolverReady hook.
85
+ *
86
+ * **Beta:** This API may change in future releases.
78
87
  * @template PluginConfig - Plugin-level configuration type
79
88
  */
80
89
  export interface ResolverReadyContext<PluginConfig = unknown> {
@@ -93,6 +102,8 @@ export interface ResolverReadyContext<PluginConfig = unknown> {
93
102
  }
94
103
  /**
95
104
  * Context passed to plugin's onExecutorReady hook.
105
+ *
106
+ * **Beta:** This API may change in future releases.
96
107
  * @template PluginConfig - Plugin-level configuration type
97
108
  */
98
109
  export interface ExecutorReadyContext<PluginConfig = unknown> {
@@ -116,6 +127,8 @@ export type TableConfigRequired<PluginConfig = unknown> = boolean | ((pluginConf
116
127
  /**
117
128
  * Interface for plugin configuration mapping.
118
129
  * Extend this interface via declaration merging to add typed plugin configs.
130
+ *
131
+ * **Beta:** This API may change in future releases.
119
132
  */
120
133
  export interface PluginConfigs<Fields extends string = string> {}
121
134
  /**
@@ -125,16 +138,22 @@ export interface PluginConfigs<Fields extends string = string> {}
125
138
  * by the same `id` used in {@link PluginConfigs}. The value must be a
126
139
  * `Record<string, TailorAnyDBField>` of the fields to add — it is merged
127
140
  * into the table's existing fields, not a replacement for them.
141
+ *
142
+ * **Beta:** This API may change in future releases.
128
143
  */
129
144
  export interface PluginFieldExtensions<Fields extends string = string, Config = unknown> {}
130
145
  /**
131
146
  * Registry mapping a plugin's `id` literal to its plugin-level config type.
132
147
  * Extend via declaration merging, keyed by the `id` string, from the
133
148
  * owning plugin's own module.
149
+ *
150
+ * **Beta:** This API may change in future releases.
134
151
  */
135
152
  export interface PluginConfigRegistry {}
136
153
  /**
137
154
  * Context passed to plugin's process method
155
+ *
156
+ * **Beta:** This API may change in future releases.
138
157
  */
139
158
  export interface PluginTableProcessContext<TableConfig = unknown, PluginConfig = unknown> {
140
159
  table: TailorAnyDBType;
@@ -144,6 +163,8 @@ export interface PluginTableProcessContext<TableConfig = unknown, PluginConfig =
144
163
  }
145
164
  /**
146
165
  * Context passed to plugin's onNamespaceLoaded hook.
166
+ *
167
+ * **Beta:** This API may change in future releases.
147
168
  */
148
169
  export interface PluginNamespaceProcessContext<PluginConfig = unknown> {
149
170
  pluginConfig: PluginConfig;
@@ -151,13 +172,17 @@ export interface PluginNamespaceProcessContext<PluginConfig = unknown> {
151
172
  }
152
173
  /**
153
174
  * Interface representing a TailorDB table for plugin output.
175
+ *
176
+ * **Beta:** This API may change in future releases.
154
177
  */
155
178
  export interface TailorDBTableForPlugin {
156
179
  readonly name: string;
157
180
  readonly fields: Record<string, unknown>;
158
181
  }
182
+ /** **Beta:** This API may change in future releases. */
159
183
  export type PluginGeneratedTable = TailorDBTableForPlugin;
160
184
  type PluginGeneratedTables = Record<string, PluginGeneratedTable>;
185
+ /** **Beta:** This API may change in future releases. */
161
186
  export interface PluginGeneratedResolver {
162
187
  name: string;
163
188
  operation: "query" | "mutation";
@@ -205,16 +230,19 @@ interface PluginWorkflowOperationConfig {
205
230
  }
206
231
  export type PluginOperationConfig = PluginFunctionOperationConfig | PluginGraphQLOperationConfig | PluginWebhookOperationConfig | PluginWorkflowOperationConfig;
207
232
  type PluginExecutorContextValue = TailorAnyDBType | string | number | boolean | null | undefined;
233
+ /** **Beta:** This API may change in future releases. */
208
234
  export interface PluginExecutorContextBase {
209
235
  sourceTable: TailorAnyDBType | null;
210
236
  namespace: string;
211
237
  }
238
+ /** **Beta:** This API may change in future releases. */
212
239
  export type PluginExecutorContext = PluginExecutorContextBase & {
213
240
  [key: string]: PluginExecutorContextValue;
214
241
  };
215
242
  interface PluginExecutorModule {
216
243
  default: unknown;
217
244
  }
245
+ /** **Beta:** This API may change in future releases. */
218
246
  export interface PluginGeneratedExecutorWithFile<Ctx = PluginExecutorContext> {
219
247
  name: string;
220
248
  resolve: () => Promise<PluginExecutorModule>;
@@ -226,21 +254,27 @@ export interface PluginGeneratedExecutorLegacy {
226
254
  trigger: PluginTriggerConfig;
227
255
  operation: PluginOperationConfig;
228
256
  }
257
+ /** **Beta:** This API may change in future releases. */
229
258
  export type PluginGeneratedExecutor = PluginGeneratedExecutorWithFile | PluginGeneratedExecutorLegacy;
230
259
  interface PluginExtends<FieldExtension extends Record<string, TailorAnyDBField>> {
231
260
  fields?: FieldExtension;
232
261
  }
262
+ /** **Beta:** This API may change in future releases. */
233
263
  export interface PluginOutput {
234
264
  tables?: PluginGeneratedTables;
235
265
  resolvers?: PluginGeneratedResolver[];
236
266
  executors?: PluginGeneratedExecutor[];
237
267
  }
268
+ /** **Beta:** This API may change in future releases. */
238
269
  export interface TablePluginOutput<FieldExtension extends Record<string, TailorAnyDBField> = Record<string, TailorAnyDBField>> extends PluginOutput {
239
270
  extends?: PluginExtends<FieldExtension>;
240
271
  }
272
+ /** **Beta:** This API may change in future releases. */
241
273
  export type NamespacePluginOutput = PluginOutput;
242
274
  /**
243
275
  * Plugin interface that all plugins must implement.
276
+ *
277
+ * **Beta:** This API may change in future releases.
244
278
  * @template TableConfig - Type for per-table configuration passed via .plugin() method
245
279
  * @template PluginConfig - Type for plugin-level configuration passed via definePlugins()
246
280
  * @template FieldExtension - Type of the fields injected into the attached table via `extends.fields`. Should match the corresponding {@link PluginFieldExtensions} entry.
@@ -259,23 +293,31 @@ export interface Plugin<TableConfig = unknown, PluginConfig = unknown, FieldExte
259
293
  /** Runs after a successful deploy, including deploys with no resource changes. */
260
294
  onDeployed?(context: DeployedContext<PluginConfig>): void | DeployedHookResult | Promise<void | DeployedHookResult>;
261
295
  }
296
+ /** **Beta:** This API may change in future releases. */
262
297
  export interface PublishStaticWebsiteResult {
263
298
  url: string;
264
299
  skippedFiles: string[];
265
300
  }
301
+ /** **Beta:** This API may change in future releases. */
266
302
  export interface DeployedStaticWebsite {
267
303
  name: string;
268
304
  url: string;
269
305
  }
270
- /** A static website declared in the config that registers the plugin, which the plugin can publish to. */
306
+ /**
307
+ * A static website declared in the config that registers the plugin, which the plugin can publish to.
308
+ *
309
+ * **Beta:** This API may change in future releases.
310
+ */
271
311
  export interface PublishableStaticWebsite extends DeployedStaticWebsite {
272
312
  /** Uploads the directory at the absolute path `dir` and publishes it to this website. */
273
313
  publish(dir: string): Promise<PublishStaticWebsiteResult>;
274
314
  }
315
+ /** **Beta:** This API may change in future releases. */
275
316
  export interface DeployedOAuth2Client {
276
317
  name: string;
277
318
  clientId: string;
278
319
  }
320
+ /** **Beta:** This API may change in future releases. */
279
321
  export interface DeployedApplication<StaticWebsite extends DeployedStaticWebsite = DeployedStaticWebsite> {
280
322
  /** SDK-managed application ID from defineConfig(); undefined when the config has none. */
281
323
  id?: string;
@@ -295,11 +337,13 @@ export interface DeployedApplication<StaticWebsite extends DeployedStaticWebsite
295
337
  oauth2Clients: DeployedOAuth2Client[];
296
338
  };
297
339
  }
340
+ /** **Beta:** This API may change in future releases. */
298
341
  export interface PluginLogger {
299
342
  info(message: string): void;
300
343
  warn(message: string): void;
301
344
  success(message: string): void;
302
345
  }
346
+ /** **Beta:** This API may change in future releases. */
303
347
  export interface PluginExecOptions {
304
348
  /** Directory to run the command in. */
305
349
  workingDir: string;
@@ -311,13 +355,18 @@ export interface PluginExecOptions {
311
355
  */
312
356
  output?: "stream" | "capture" | "ignore";
313
357
  }
358
+ /** **Beta:** This API may change in future releases. */
314
359
  export interface PluginExecResult {
315
360
  /** Captured stdout. Empty unless `output` is `"capture"`. */
316
361
  stdout: string;
317
362
  /** Captured stderr. Empty unless `output` is `"capture"`. */
318
363
  stderr: string;
319
364
  }
320
- /** Values available after all applications in this deploy run have been applied. */
365
+ /**
366
+ * Values available after all applications in this deploy run have been applied.
367
+ *
368
+ * **Beta:** This API may change in future releases.
369
+ */
321
370
  export interface DeployedContext<PluginConfig = unknown> {
322
371
  workspaceId: string;
323
372
  /** Application whose config registers this plugin. Only its static websites can be published. */
@@ -346,10 +395,13 @@ type OutputObject = object & {
346
395
  /**
347
396
  * A value a plugin hook can return in `outputs`. Interface-typed objects are accepted;
348
397
  * a `Date` or class instance nested inside one is rejected when the deploy runs.
398
+ *
399
+ * **Beta:** This API may change in future releases.
349
400
  */
350
401
  export type PluginOutputValue = string | number | boolean | null | readonly PluginOutputValue[] | {
351
402
  [key: string]: PluginOutputValue;
352
403
  } | OutputObject;
404
+ /** **Beta:** This API may change in future releases. */
353
405
  export interface DeployedHookResult {
354
406
  /** Values included in deploy's JSON result. Interface-typed values are accepted, but a `Date` or class instance nested inside one fails the deploy instead of the type check. */
355
407
  outputs?: Record<string, PluginOutputValue>;
@@ -3,11 +3,15 @@ import { TailorEnv, TailorPrincipal } from "../runtime/types.mjs";
3
3
  * Plugin executor factory function type.
4
4
  * Takes context and returns an executor configuration.
5
5
  * Returns unknown since the exact return type depends on createExecutor's generic params.
6
+ *
7
+ * **Beta:** This API may change in future releases.
6
8
  */
7
9
  export type PluginExecutorFactory<Ctx> = (ctx: Ctx) => unknown;
8
10
  /**
9
11
  * Base args for plugin executor function operations.
10
12
  * Provides typed access to runtime context without requiring specific record types.
13
+ *
14
+ * **Beta:** This API may change in future releases.
11
15
  */
12
16
  export interface PluginFunctionArgs {
13
17
  /** Workspace ID where the executor runs */
@@ -25,6 +29,8 @@ export interface PluginFunctionArgs {
25
29
  }
26
30
  /**
27
31
  * Args for plugin executors triggered on record creation.
32
+ *
33
+ * **Beta:** This API may change in future releases.
28
34
  */
29
35
  export interface PluginRecordCreatedArgs extends PluginFunctionArgs {
30
36
  /** The newly created record */
@@ -32,6 +38,8 @@ export interface PluginRecordCreatedArgs extends PluginFunctionArgs {
32
38
  }
33
39
  /**
34
40
  * Args for plugin executors triggered on record update.
41
+ *
42
+ * **Beta:** This API may change in future releases.
35
43
  */
36
44
  export interface PluginRecordUpdatedArgs extends PluginFunctionArgs {
37
45
  /** The record after update */
@@ -41,6 +49,8 @@ export interface PluginRecordUpdatedArgs extends PluginFunctionArgs {
41
49
  }
42
50
  /**
43
51
  * Args for plugin executors triggered on record deletion.
52
+ *
53
+ * **Beta:** This API may change in future releases.
44
54
  */
45
55
  export interface PluginRecordDeletedArgs extends PluginFunctionArgs {
46
56
  /** The deleted record */
@@ -49,11 +59,15 @@ export interface PluginRecordDeletedArgs extends PluginFunctionArgs {
49
59
  /**
50
60
  * Database schema type for plugins.
51
61
  * Since plugins work with dynamic types, the schema uses Record types.
62
+ *
63
+ * **Beta:** This API may change in future releases.
52
64
  */
53
65
  export type PluginDBSchema = Record<string, Record<string, unknown>>;
54
66
  /**
55
67
  * Base record type for TailorDB records.
56
68
  * All records have an id field.
69
+ *
70
+ * **Beta:** This API may change in future releases.
57
71
  */
58
72
  export type PluginRecord = {
59
73
  id: string;
@@ -62,6 +76,8 @@ export type PluginRecord = {
62
76
  * Define a plugin executor that receives context at runtime.
63
77
  * This allows executor definitions to be in separate files while
64
78
  * still receiving dynamic values like typeName, generated types, and namespace.
79
+ *
80
+ * **Beta:** This API may change in future releases.
65
81
  * @param factory - Function that takes context and returns executor configuration
66
82
  * @returns The same factory function (for type inference)
67
83
  * @example