@tailor-platform/sdk 2.14.0 → 2.14.2

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 (245) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/{application-CiN_er9X.mjs → application-BAqZFMWP.mjs} +9 -9
  3. package/dist/application-BAqZFMWP.mjs.map +1 -0
  4. package/dist/application-BKlOiD1x.mjs +1 -0
  5. package/dist/cli/commands/api/api-call.d.mts +4 -5
  6. package/dist/cli/commands/deploy/config-id-injector.d.mts +3 -4
  7. package/dist/cli/commands/deploy/deploy.d.mts +3 -4
  8. package/dist/cli/commands/deploy/function-registry-types.d.mts +2 -3
  9. package/dist/cli/commands/executor/get.d.mts +3 -4
  10. package/dist/cli/commands/executor/jobs.d.mts +10 -11
  11. package/dist/cli/commands/executor/list.d.mts +3 -4
  12. package/dist/cli/commands/executor/transform.d.mts +6 -7
  13. package/dist/cli/commands/executor/trigger.d.mts +4 -5
  14. package/dist/cli/commands/executor/webhook.d.mts +4 -5
  15. package/dist/cli/commands/function/get.d.mts +3 -4
  16. package/dist/cli/commands/function/list.d.mts +3 -4
  17. package/dist/cli/commands/function/transform.d.mts +2 -3
  18. package/dist/cli/commands/generate/options.d.mts +2 -3
  19. package/dist/cli/commands/generate/seed/bundler.d.mts +3 -4
  20. package/dist/cli/commands/generate/service.d.mts +2 -3
  21. package/dist/cli/commands/machineuser/list.d.mts +4 -5
  22. package/dist/cli/commands/machineuser/token.d.mts +4 -5
  23. package/dist/cli/commands/oauth2client/get.d.mts +3 -4
  24. package/dist/cli/commands/oauth2client/list.d.mts +3 -4
  25. package/dist/cli/commands/oauth2client/transform.d.mts +3 -4
  26. package/dist/cli/commands/organization/folder/create.d.mts +3 -4
  27. package/dist/cli/commands/organization/folder/delete.d.mts +3 -4
  28. package/dist/cli/commands/organization/folder/get.d.mts +3 -4
  29. package/dist/cli/commands/organization/folder/list.d.mts +3 -4
  30. package/dist/cli/commands/organization/folder/update.d.mts +3 -4
  31. package/dist/cli/commands/organization/get.d.mts +3 -4
  32. package/dist/cli/commands/organization/list.d.mts +3 -4
  33. package/dist/cli/commands/organization/transform.d.mts +5 -6
  34. package/dist/cli/commands/organization/tree.d.mts +3 -4
  35. package/dist/cli/commands/organization/update.d.mts +3 -4
  36. package/dist/cli/commands/remove.d.mts +3 -4
  37. package/dist/cli/commands/show.d.mts +6 -7
  38. package/dist/cli/commands/staticwebsite/deploy.d.mts +3 -4
  39. package/dist/cli/commands/tailordb/migrate/bundler.d.mts +3 -4
  40. package/dist/cli/commands/tailordb/migrate/config.d.mts +3 -4
  41. package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +34 -35
  42. package/dist/cli/commands/tailordb/migrate/generate.d.mts +3 -4
  43. package/dist/cli/commands/tailordb/migrate/rename-detection.d.mts +3 -4
  44. package/dist/cli/commands/tailordb/migrate/snapshot-comparison.d.mts +4 -5
  45. package/dist/cli/commands/tailordb/migrate/snapshot-files.d.mts +13 -14
  46. package/dist/cli/commands/tailordb/migrate/snapshot-local.d.mts +2 -3
  47. package/dist/cli/commands/tailordb/migrate/snapshot-migrations.d.mts +2 -3
  48. package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +21 -22
  49. package/dist/cli/commands/tailordb/migrate/types.d.mts +2 -3
  50. package/dist/cli/commands/tailordb/truncate.d.mts +3 -4
  51. package/dist/cli/commands/workflow/executions.d.mts +8 -9
  52. package/dist/cli/commands/workflow/get.d.mts +3 -4
  53. package/dist/cli/commands/workflow/list.d.mts +3 -4
  54. package/dist/cli/commands/workflow/resume.d.mts +4 -5
  55. package/dist/cli/commands/workflow/start.d.mts +5 -6
  56. package/dist/cli/commands/workflow/status.d.mts +3 -4
  57. package/dist/cli/commands/workflow/transform.d.mts +5 -6
  58. package/dist/cli/commands/workflow/wait.d.mts +3 -4
  59. package/dist/cli/commands/workflow/waiter.d.mts +3 -4
  60. package/dist/cli/commands/workspace/app/health.d.mts +3 -4
  61. package/dist/cli/commands/workspace/app/list.d.mts +3 -4
  62. package/dist/cli/commands/workspace/app/transform.d.mts +3 -4
  63. package/dist/cli/commands/workspace/create.d.mts +3 -4
  64. package/dist/cli/commands/workspace/delete.d.mts +3 -4
  65. package/dist/cli/commands/workspace/get.d.mts +3 -4
  66. package/dist/cli/commands/workspace/list.d.mts +3 -4
  67. package/dist/cli/commands/workspace/restore.d.mts +3 -4
  68. package/dist/cli/commands/workspace/transform.d.mts +3 -4
  69. package/dist/cli/commands/workspace/user/invite.d.mts +3 -4
  70. package/dist/cli/commands/workspace/user/list.d.mts +3 -4
  71. package/dist/cli/commands/workspace/user/remove.d.mts +3 -4
  72. package/dist/cli/commands/workspace/user/transform.d.mts +2 -3
  73. package/dist/cli/commands/workspace/user/update.d.mts +3 -4
  74. package/dist/cli/lib.mjs +1 -1
  75. package/dist/cli/main.d.mts +2 -3
  76. package/dist/cli/main.mjs +18 -18
  77. package/dist/cli/main.mjs.map +1 -1
  78. package/dist/cli/query/index.d.mts +2 -3
  79. package/dist/cli/shared/args.d.mts +11 -12
  80. package/dist/cli/shared/beta.d.mts +2 -3
  81. package/dist/cli/shared/client.d.mts +4 -5
  82. package/dist/cli/shared/command.d.mts +2 -3
  83. package/dist/cli/shared/config-loader.d.mts +5 -6
  84. package/dist/cli/shared/config.d.mts +2 -3
  85. package/dist/cli/shared/context.d.mts +3 -4
  86. package/dist/cli/shared/error-json.d.mts +4 -5
  87. package/dist/cli/shared/logger.d.mts +7 -8
  88. package/dist/cli/shared/prompt.d.mts +7 -8
  89. package/dist/cli/shared/readonly-guard.d.mts +2 -3
  90. package/dist/cli/shared/script-executor.d.mts +7 -8
  91. package/dist/cli/shared/seed-chunker.d.mts +5 -6
  92. package/dist/cli/shared/seed-context.d.mts +5 -5
  93. package/dist/cli/shared/tailordb-namespaces.d.mts +5 -6
  94. package/dist/cli/shared/type-generator.d.mts +2 -3
  95. package/dist/cli/shared/workspace-name.d.mts +2 -3
  96. package/dist/completion/zsh-worker.zsh +1 -1
  97. package/dist/configure/config/index.d.mts +3 -4
  98. package/dist/configure/config/types.d.mts +14 -15
  99. package/dist/configure/index.d.mts +6 -6
  100. package/dist/configure/services/aigateway/index.d.mts +2 -2
  101. package/dist/configure/services/aigateway/types.d.mts +4 -5
  102. package/dist/configure/services/auth/index.d.mts +3 -3
  103. package/dist/configure/services/auth/types.d.mts +24 -25
  104. package/dist/configure/services/executor/executor.d.mts +3 -4
  105. package/dist/configure/services/executor/operation.d.mts +6 -7
  106. package/dist/configure/services/executor/trigger/event.d.mts +56 -57
  107. package/dist/configure/services/executor/trigger/index.d.mts +2 -2
  108. package/dist/configure/services/executor/trigger/schedule.d.mts +4 -5
  109. package/dist/configure/services/executor/trigger/webhook.d.mts +8 -9
  110. package/dist/configure/services/http-adapter/http-adapter.d.mts +12 -13
  111. package/dist/configure/services/idp/index.d.mts +2 -2
  112. package/dist/configure/services/idp/permission.d.mts +4 -5
  113. package/dist/configure/services/idp/types.d.mts +5 -6
  114. package/dist/configure/services/resolver/permission.d.mts +4 -5
  115. package/dist/configure/services/resolver/resolver.d.mts +3 -4
  116. package/dist/configure/services/resolver/types.d.mts +2 -3
  117. package/dist/configure/services/secrets/index.d.mts +3 -3
  118. package/dist/configure/services/secrets/types.d.mts +3 -4
  119. package/dist/configure/services/staticwebsite/index.d.mts +2 -2
  120. package/dist/configure/services/staticwebsite/types.d.mts +3 -4
  121. package/dist/configure/services/tailordb/permission.d.mts +6 -7
  122. package/dist/configure/services/tailordb/schema.d.mts +7 -8
  123. package/dist/configure/services/tailordb/types.d.mts +25 -26
  124. package/dist/configure/services/workflow/execution-policy.d.mts +3 -3
  125. package/dist/configure/services/workflow/execution-policy.types.d.mts +8 -9
  126. package/dist/configure/services/workflow/job.d.mts +4 -5
  127. package/dist/configure/services/workflow/wait-point.d.mts +5 -6
  128. package/dist/configure/services/workflow/workflow.d.mts +4 -4
  129. package/dist/configure/types/aigateway-name.d.mts +3 -4
  130. package/dist/configure/types/auth-namespace-name.d.mts +3 -4
  131. package/dist/configure/types/connection-name.d.mts +3 -4
  132. package/dist/configure/types/field.d.mts +3 -4
  133. package/dist/configure/types/field.types.d.mts +13 -14
  134. package/dist/configure/types/idp-name.d.mts +3 -4
  135. package/dist/configure/types/permission-operand.types.d.mts +7 -8
  136. package/dist/configure/types/type.d.mts +3 -4
  137. package/dist/kysely/index.d.mts +18 -18
  138. package/dist/parser/service/idp/types.d.mts +2 -3
  139. package/dist/parser/service/tailordb/type-source.d.mts +2 -3
  140. package/dist/parser/service/tailordb/types.d.mts +13 -14
  141. package/dist/plugin/builtin/enum-constants/index.d.mts +3 -4
  142. package/dist/plugin/builtin/file-utils/index.d.mts +3 -4
  143. package/dist/plugin/builtin/kysely-type/index.d.mts +4 -5
  144. package/dist/plugin/builtin/seed/index.d.mts +4 -5
  145. package/dist/plugin/builtin/seed/seed-type-processor.d.mts +2 -3
  146. package/dist/plugin/get-generated-table.d.mts +2 -3
  147. package/dist/plugin/index.mjs +1 -1
  148. package/dist/plugin/index.mjs.map +1 -1
  149. package/dist/plugin/types.d.mts +29 -29
  150. package/dist/plugin/with-context.d.mts +9 -10
  151. package/dist/{register-ts-hook-DS1zYiCV.mjs → register-ts-hook-Cphn4r8s.mjs} +44 -44
  152. package/dist/register-ts-hook-Cphn4r8s.mjs.map +1 -0
  153. package/dist/runtime/aigateway.d.mts +4 -5
  154. package/dist/runtime/authconnection.d.mts +3 -4
  155. package/dist/runtime/context.d.mts +6 -7
  156. package/dist/runtime/date.d.mts +2 -3
  157. package/dist/runtime/field-parse.d.mts +2 -3
  158. package/dist/runtime/file.d.mts +14 -15
  159. package/dist/runtime/globals.d.mts +2 -1
  160. package/dist/runtime/iconv.d.mts +5 -6
  161. package/dist/runtime/idp.d.mts +14 -15
  162. package/dist/runtime/index.d.mts +7 -7
  163. package/dist/runtime/logger.d.mts +10 -11
  164. package/dist/runtime/secretmanager.d.mts +3 -4
  165. package/dist/runtime/types.d.mts +7 -8
  166. package/dist/runtime/workflow.d.mts +7 -8
  167. package/dist/seed/index.d.mts +3 -3
  168. package/dist/{service_pb-CxHztLk1.mjs → service_pb-BdzjiHfC.mjs} +2 -2
  169. package/dist/{service_pb-CxHztLk1.mjs.map → service_pb-BdzjiHfC.mjs.map} +1 -1
  170. package/dist/service_pb-p68oLtp9.mjs +1 -0
  171. package/dist/shared/src/color.d.mts +2 -3
  172. package/dist/tailor-proto/src/tailor/v1/aigateway_pb.d.mts +21 -22
  173. package/dist/tailor-proto/src/tailor/v1/aigateway_resource_pb.d.mts +2 -3
  174. package/dist/tailor-proto/src/tailor/v1/application_pb.d.mts +35 -36
  175. package/dist/tailor-proto/src/tailor/v1/application_resource_pb.d.mts +6 -7
  176. package/dist/tailor-proto/src/tailor/v1/auth_pb.d.mts +229 -230
  177. package/dist/tailor-proto/src/tailor/v1/auth_resource_pb.d.mts +40 -41
  178. package/dist/tailor-proto/src/tailor/v1/events_pb.d.mts +9 -10
  179. package/dist/tailor-proto/src/tailor/v1/events_resource_pb.d.mts +3 -4
  180. package/dist/tailor-proto/src/tailor/v1/executor_pb.d.mts +45 -46
  181. package/dist/tailor-proto/src/tailor/v1/executor_resource_pb.d.mts +24 -25
  182. package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +17 -18
  183. package/dist/tailor-proto/src/tailor/v1/function_registry_pb.d.mts +29 -30
  184. package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +8 -9
  185. package/dist/tailor-proto/src/tailor/v1/http_adapter_resource_pb.d.mts +2 -3
  186. package/dist/tailor-proto/src/tailor/v1/idp_pb.d.mts +37 -38
  187. package/dist/tailor-proto/src/tailor/v1/idp_resource_pb.d.mts +18 -15
  188. package/dist/tailor-proto/src/tailor/v1/metadata_pb.d.mts +19 -20
  189. package/dist/tailor-proto/src/tailor/v1/metadata_resource_pb.d.mts +2 -3
  190. package/dist/tailor-proto/src/tailor/v1/meter_pb.d.mts +25 -26
  191. package/dist/tailor-proto/src/tailor/v1/pipeline_pb.d.mts +59 -60
  192. package/dist/tailor-proto/src/tailor/v1/pipeline_resource_pb.d.mts +10 -11
  193. package/dist/tailor-proto/src/tailor/v1/resource_pb.d.mts +7 -8
  194. package/dist/tailor-proto/src/tailor/v1/secret_manager_pb.d.mts +37 -38
  195. package/dist/tailor-proto/src/tailor/v1/secret_manager_resource_pb.d.mts +4 -5
  196. package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +6 -7
  197. package/dist/tailor-proto/src/tailor/v1/stateflow_pb.d.mts +21 -22
  198. package/dist/tailor-proto/src/tailor/v1/stateflow_resource_pb.d.mts +3 -4
  199. package/dist/tailor-proto/src/tailor/v1/staticwebsite_pb.d.mts +50 -51
  200. package/dist/tailor-proto/src/tailor/v1/staticwebsite_resource_pb.d.mts +4 -5
  201. package/dist/tailor-proto/src/tailor/v1/tailordb_pb.d.mts +74 -75
  202. package/dist/tailor-proto/src/tailor/v1/tailordb_resource_pb.d.mts +35 -36
  203. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_pb.d.mts +41 -42
  204. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_resource_pb.d.mts +11 -12
  205. package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +97 -98
  206. package/dist/tailor-proto/src/tailor/v1/workflow_resource_pb.d.mts +11 -12
  207. package/dist/tailor-proto/src/tailor/v1/workspace_pb.d.mts +209 -210
  208. package/dist/tailor-proto/src/tailor/v1/workspace_resource_pb.d.mts +24 -25
  209. package/dist/types/aigateway.generated.d.mts +3 -4
  210. package/dist/types/app-config.generated.d.mts +2 -3
  211. package/dist/types/auth-connection.generated.d.mts +3 -4
  212. package/dist/types/auth.generated.d.mts +15 -16
  213. package/dist/types/executor.generated.d.mts +26 -27
  214. package/dist/types/helpers.d.mts +15 -13
  215. package/dist/types/http-adapter.generated.d.mts +2 -3
  216. package/dist/types/idp.generated.d.mts +7 -8
  217. package/dist/types/resolver.generated.d.mts +4 -5
  218. package/dist/types/secrets.generated.d.mts +3 -4
  219. package/dist/types/staticwebsite.generated.d.mts +3 -4
  220. package/dist/types/tailordb.generated.d.mts +7 -8
  221. package/dist/types/workflow.generated.d.mts +3 -4
  222. package/dist/utils/test/index.d.mts +3 -4
  223. package/dist/vitest/index.d.mts +2 -2
  224. package/dist/vitest/mock-kysely.d.mts +4 -5
  225. package/dist/vitest/mocks/aigateway.d.mts +3 -4
  226. package/dist/vitest/mocks/authconnection.d.mts +3 -4
  227. package/dist/vitest/mocks/file.d.mts +3 -4
  228. package/dist/vitest/mocks/iconv.d.mts +3 -4
  229. package/dist/vitest/mocks/idp.d.mts +3 -4
  230. package/dist/vitest/mocks/logger.d.mts +3 -4
  231. package/dist/vitest/mocks/secretmanager.d.mts +3 -4
  232. package/dist/vitest/mocks/tailordb-pglite.d.mts +4 -5
  233. package/dist/vitest/mocks/tailordb.d.mts +6 -7
  234. package/dist/vitest/mocks/workflow.d.mts +2 -3
  235. package/dist/vitest/pglite-kysely.d.mts +5 -6
  236. package/dist/vitest/setup.d.mts +6 -7
  237. package/dist/vitest/workflow-local.d.mts +5 -6
  238. package/dist/{workspace_resource_pb-u9bj6p3i.mjs → workspace_resource_pb-C4EY-Gns.mjs} +2 -2
  239. package/dist/{workspace_resource_pb-u9bj6p3i.mjs.map → workspace_resource_pb-C4EY-Gns.mjs.map} +1 -1
  240. package/docs/services/idp.md +6 -3
  241. package/package.json +12 -12
  242. package/dist/application-CiN_er9X.mjs.map +0 -1
  243. package/dist/application-_8rjQRx8.mjs +0 -1
  244. package/dist/register-ts-hook-DS1zYiCV.mjs.map +0 -1
  245. package/dist/service_pb-CFVlGYdr.mjs +0 -1
@@ -1,7 +1,7 @@
1
1
  import { AIGatewayName } from "@tailor-platform/sdk";
2
2
  //#region src/runtime/aigateway.d.ts
3
3
  /** Result of {@link TailorAigatewayAPI.get}. */
4
- interface GetAIGatewayResult {
4
+ export interface GetAIGatewayResult {
5
5
  /** The platform-assigned URL of the AI Gateway. */
6
6
  url: string;
7
7
  }
@@ -9,7 +9,7 @@ interface GetAIGatewayResult {
9
9
  * Platform API surface for `tailor.aigateway`. Describes the shape the
10
10
  * platform runtime injects on `globalThis.tailor.aigateway`.
11
11
  */
12
- interface TailorAigatewayAPI {
12
+ export interface TailorAigatewayAPI {
13
13
  /**
14
14
  * Resolves an AI Gateway defined in the caller's own workspace.
15
15
  * @param name - AI Gateway name, as passed to `defineAIGateway()`
@@ -18,8 +18,7 @@ interface TailorAigatewayAPI {
18
18
  get(name: AIGatewayName): Promise<GetAIGatewayResult>;
19
19
  }
20
20
  /** Runtime wrapper namespace for `tailor.aigateway`. */
21
- declare const aigateway: {
21
+ export declare const aigateway: {
22
22
  readonly get: (name: AIGatewayName) => Promise<GetAIGatewayResult>;
23
23
  };
24
- //#endregion
25
- export { GetAIGatewayResult, TailorAigatewayAPI, aigateway };
24
+ //#endregion
@@ -5,7 +5,7 @@ import { ConnectionName } from "@tailor-platform/sdk";
5
5
  * Platform API surface for `tailor.authconnection`. Describes the shape the
6
6
  * platform runtime injects on `globalThis.tailor.authconnection`.
7
7
  */
8
- interface TailorAuthconnectionAPI {
8
+ export interface TailorAuthconnectionAPI {
9
9
  /**
10
10
  * Returns the access token for the given auth connection.
11
11
  * @param connectionName - Auth connection name as defined in tailor.config
@@ -14,8 +14,7 @@ interface TailorAuthconnectionAPI {
14
14
  getConnectionToken(connectionName: ConnectionName): Promise<AuthConnectionTokenResult$1>;
15
15
  }
16
16
  /** Runtime wrapper namespace for `tailor.authconnection`. */
17
- declare const authconnection: {
17
+ export declare const authconnection: {
18
18
  readonly getConnectionToken: (connectionName: ConnectionName) => Promise<AuthConnectionTokenResult$1>;
19
19
  };
20
- //#endregion
21
- export { TailorAuthconnectionAPI, authconnection };
20
+ //#endregion
@@ -6,13 +6,13 @@ import { TailorPrincipal } from "./types.mjs";
6
6
  * Matches the public `TailorPrincipal` shape — `attributes` is the attribute
7
7
  * map and `attributeList` is the array of attribute IDs.
8
8
  */
9
- type Invoker = TailorPrincipal;
9
+ export type Invoker = TailorPrincipal;
10
10
  /**
11
11
  * Raw platform-side invoker payload returned by `tailor.context.getInvoker()`.
12
12
  * The wrapper normalizes this into {@link Invoker}.
13
13
  * @internal
14
14
  */
15
- interface ContextInvoker {
15
+ export interface ContextInvoker {
16
16
  /** The invoker's ID */
17
17
  id: string;
18
18
  /** The invoker's type */
@@ -29,11 +29,11 @@ interface ContextInvoker {
29
29
  * runtime injects on `globalThis.tailor.context`.
30
30
  * @internal
31
31
  */
32
- interface PlatformContextAPI {
32
+ export interface PlatformContextAPI {
33
33
  getInvoker(): ContextInvoker | null;
34
34
  }
35
35
  /** Runtime wrapper API for execution context utilities. */
36
- interface TailorContextAPI {
36
+ export interface TailorContextAPI {
37
37
  /**
38
38
  * Returns information about the current invoker.
39
39
  * @returns Invoker details, or `null` for anonymous invocations
@@ -47,8 +47,7 @@ interface TailorContextAPI {
47
47
  */
48
48
  declare function getInvoker(): Invoker | null;
49
49
  /** Runtime wrapper namespace for `tailor.context`. */
50
- declare const context: {
50
+ export declare const context: {
51
51
  readonly getInvoker: typeof getInvoker;
52
52
  };
53
- //#endregion
54
- export { ContextInvoker, Invoker, PlatformContextAPI, TailorContextAPI, context };
53
+ //#endregion
@@ -12,6 +12,5 @@ type DateField = {
12
12
  * @returns Value with Date fields converted to strings
13
13
  * @internal
14
14
  */
15
- declare function serializeDateFields(field: DateField, value: unknown): unknown;
16
- //#endregion
17
- export { serializeDateFields };
15
+ export declare function serializeDateFields(field: DateField, value: unknown): unknown;
16
+ //#endregion
@@ -1,10 +1,9 @@
1
1
  import { TailorPrincipal } from "./types.mjs";
2
2
  import { StandardSchemaV1 } from "@standard-schema/spec";
3
3
  //#region src/runtime/field-parse.d.ts
4
- type FieldParseArgs = {
4
+ export type FieldParseArgs = {
5
5
  value: unknown;
6
6
  data: unknown;
7
7
  invoker: TailorPrincipal | null;
8
8
  };
9
- //#endregion
10
- export { FieldParseArgs };
9
+ //#endregion
@@ -17,19 +17,19 @@
17
17
  * );
18
18
  */
19
19
  /** Upload response metadata. */
20
- interface UploadMetadata {
20
+ export interface UploadMetadata {
21
21
  fileSize: number;
22
22
  sha256sum: string;
23
23
  }
24
24
  /** Download response metadata. */
25
- interface DownloadMetadata {
25
+ export interface DownloadMetadata {
26
26
  contentType: string;
27
27
  fileSize: number;
28
28
  sha256sum: string;
29
29
  lastUploadedAt: string;
30
30
  }
31
31
  /** File metadata (for {@link TailorDBFileAPI.getMetadata}). */
32
- interface FileMetadata {
32
+ export interface FileMetadata {
33
33
  contentType: string;
34
34
  fileSize: number;
35
35
  sha256sum: string;
@@ -37,42 +37,42 @@ interface FileMetadata {
37
37
  lastUploadedAt?: string;
38
38
  }
39
39
  /** Upload options. */
40
- interface FileUploadOptions {
40
+ export interface FileUploadOptions {
41
41
  contentType?: string;
42
42
  }
43
43
  /** Upload stream options. */
44
- interface FileUploadStreamOptions {
44
+ export interface FileUploadStreamOptions {
45
45
  contentType?: string;
46
46
  fileSize?: number;
47
47
  }
48
48
  /** Upload response. */
49
- interface FileUploadResponse {
49
+ export interface FileUploadResponse {
50
50
  metadata: UploadMetadata;
51
51
  }
52
52
  /** Download response. */
53
- interface FileDownloadResponse {
53
+ export interface FileDownloadResponse {
54
54
  data: Uint8Array;
55
55
  metadata: DownloadMetadata;
56
56
  }
57
57
  /** Download-as-Base64 response. */
58
- interface FileDownloadAsBase64Response {
58
+ export interface FileDownloadAsBase64Response {
59
59
  data: string;
60
60
  metadata: DownloadMetadata;
61
61
  }
62
62
  /** Download stream response. */
63
- interface FileDownloadStreamResponse {
63
+ export interface FileDownloadStreamResponse {
64
64
  body: ReadableStream<Uint8Array>;
65
65
  metadata: DownloadMetadata;
66
66
  }
67
67
  /** Error code emitted by {@link TailorDBFileError}. */
68
- type TailorDBFileErrorCode = "INVALID_PARAMS" | "INVALID_DATA_TYPE" | "OPERATION_FAILED" | "DELETE_FAILED" | "STREAM_OPEN_FAILED" | "STREAM_READ_ERROR" | "STREAM_ERROR" | "FILE_TOO_LARGE";
68
+ export type TailorDBFileErrorCode = "INVALID_PARAMS" | "INVALID_DATA_TYPE" | "OPERATION_FAILED" | "DELETE_FAILED" | "STREAM_OPEN_FAILED" | "STREAM_READ_ERROR" | "STREAM_ERROR" | "FILE_TOO_LARGE";
69
69
  /**
70
70
  * Type-only shape of the `TailorDBFileError` runtime class. The class itself
71
71
  * is provided by the platform runtime (and by `injectMocks` in tests); this
72
72
  * interface mirrors it so callers can `import type { TailorDBFileError }` from
73
73
  * the wrapper module without depending on any ambient declaration.
74
74
  */
75
- interface TailorDBFileError extends Error {
75
+ export interface TailorDBFileError extends Error {
76
76
  name: "TailorDBFileError";
77
77
  code?: TailorDBFileErrorCode;
78
78
  cause?: unknown;
@@ -81,7 +81,7 @@ interface TailorDBFileError extends Error {
81
81
  * Platform API surface for `tailordb.file`. Describes the shape the platform
82
82
  * runtime injects on `globalThis.tailordb.file`.
83
83
  */
84
- interface TailorDBFileAPI {
84
+ export interface TailorDBFileAPI {
85
85
  /**
86
86
  * Upload a file to TailorDB.
87
87
  * @param namespace - TailorDB namespace
@@ -157,7 +157,7 @@ interface TailorDBFileAPI {
157
157
  uploadStream(namespace: string, tableName: string, fieldName: string, recordId: string, readableStream: ReadableStream<Uint8Array | ArrayBuffer>, options?: FileUploadStreamOptions): Promise<FileUploadResponse>;
158
158
  }
159
159
  /** Runtime wrapper namespace for `tailordb.file`. */
160
- declare const file: {
160
+ export declare const file: {
161
161
  readonly upload: (namespace: string, tableName: string, fieldName: string, recordId: string, data: string | ArrayBuffer | Uint8Array | number[], options?: FileUploadOptions) => Promise<FileUploadResponse>;
162
162
  readonly download: (namespace: string, tableName: string, fieldName: string, recordId: string) => Promise<FileDownloadResponse>;
163
163
  readonly downloadAsBase64: (namespace: string, tableName: string, fieldName: string, recordId: string) => Promise<FileDownloadAsBase64Response>;
@@ -166,5 +166,4 @@ declare const file: {
166
166
  readonly downloadStream: (namespace: string, tableName: string, fieldName: string, recordId: string) => Promise<FileDownloadStreamResponse>;
167
167
  readonly uploadStream: (namespace: string, tableName: string, fieldName: string, recordId: string, readableStream: ReadableStream<Uint8Array | ArrayBuffer>, options?: FileUploadStreamOptions) => Promise<FileUploadResponse>;
168
168
  };
169
- //#endregion
170
- export { DownloadMetadata, FileDownloadAsBase64Response, FileDownloadResponse, FileDownloadStreamResponse, FileMetadata, FileUploadOptions, FileUploadResponse, FileUploadStreamOptions, TailorDBFileAPI, TailorDBFileError, TailorDBFileErrorCode, UploadMetadata, file };
169
+ //#endregion
@@ -78,4 +78,5 @@ declare global {
78
78
  name: "TailorErrors";
79
79
  errors: TailorErrorItem[];
80
80
  }
81
- }
81
+ }
82
+ //#endregion
@@ -16,11 +16,11 @@
16
16
  * const out = conv.convert(sjisBuffer);
17
17
  */
18
18
  /** Instance methods exposed by `tailor.iconv.Iconv`. */
19
- interface IconvInstance {
19
+ export interface IconvInstance {
20
20
  convert(input: string | Uint8Array | ArrayBuffer): string | Uint8Array;
21
21
  }
22
22
  /** Constructor shape for `tailor.iconv.Iconv`. */
23
- interface IconvConstructor {
23
+ export interface IconvConstructor {
24
24
  new (fromEncoding: string, toEncoding: string): IconvInstance;
25
25
  }
26
26
  /**
@@ -28,7 +28,7 @@ interface IconvConstructor {
28
28
  * runtime injects on `globalThis.tailor.iconv` so the wrapper and ambient
29
29
  * globals stay in sync.
30
30
  */
31
- interface TailorIconvAPI {
31
+ export interface TailorIconvAPI {
32
32
  /**
33
33
  * Convert a string or buffer between encodings.
34
34
  * @param str - Input data to convert
@@ -68,6 +68,5 @@ interface TailorIconvAPI {
68
68
  Iconv: IconvConstructor;
69
69
  }
70
70
  /** Runtime API for `tailor.iconv`. */
71
- declare const iconv: TailorIconvAPI;
72
- //#endregion
73
- export { IconvConstructor, IconvInstance, TailorIconvAPI, iconv };
71
+ export declare const iconv: TailorIconvAPI;
72
+ //#endregion
@@ -12,11 +12,11 @@
12
12
  * const { users } = await client.users({ first: 10 });
13
13
  */
14
14
  /** Configuration object for `idp.Client`. */
15
- interface ClientConfig {
15
+ export interface ClientConfig {
16
16
  namespace: string;
17
17
  }
18
18
  /** User record returned by IDP operations. */
19
- interface User {
19
+ export interface User {
20
20
  id: string;
21
21
  name: string;
22
22
  disabled: boolean;
@@ -33,14 +33,14 @@ interface User {
33
33
  mfaFactorIds: string[];
34
34
  }
35
35
  /** Filter options for `idp.Client.users()`. */
36
- interface UserQuery {
36
+ export interface UserQuery {
37
37
  /** Filter by user IDs */
38
38
  ids?: string[];
39
39
  /** Filter by user names */
40
40
  names?: string[];
41
41
  }
42
42
  /** Pagination/filter options for `idp.Client.users()`. */
43
- interface ListUsersOptions {
43
+ export interface ListUsersOptions {
44
44
  /** Maximum number of users to return */
45
45
  first?: number;
46
46
  /** Page token for pagination */
@@ -49,13 +49,13 @@ interface ListUsersOptions {
49
49
  query?: UserQuery;
50
50
  }
51
51
  /** Response shape for `idp.Client.users()`. */
52
- interface ListUsersResponse {
52
+ export interface ListUsersResponse {
53
53
  users: User[];
54
54
  nextPageToken: string | null;
55
55
  totalCount: number;
56
56
  }
57
57
  /** Input for `idp.Client.createUser()`. */
58
- interface CreateUserInput {
58
+ export interface CreateUserInput {
59
59
  /** The user's name (typically email) */
60
60
  name: string;
61
61
  /** The user's password. If omitted, the user is created without a password (cannot log in with any password). */
@@ -64,7 +64,7 @@ interface CreateUserInput {
64
64
  disabled?: boolean;
65
65
  }
66
66
  /** Input for `idp.Client.updateUser()`. */
67
- interface UpdateUserInput {
67
+ export interface UpdateUserInput {
68
68
  /** The user's ID */
69
69
  id: string;
70
70
  /** New name for the user */
@@ -77,7 +77,7 @@ interface UpdateUserInput {
77
77
  disabled?: boolean;
78
78
  }
79
79
  /** Input for `idp.Client.sendPasswordResetEmail()`. */
80
- interface SendPasswordResetEmailInput {
80
+ export interface SendPasswordResetEmailInput {
81
81
  /** The ID of the user */
82
82
  userId: string;
83
83
  /** The URI to redirect to after password reset */
@@ -88,7 +88,7 @@ interface SendPasswordResetEmailInput {
88
88
  subject?: string;
89
89
  }
90
90
  /** Input for `idp.Client.unenrollMfa()`. */
91
- interface UnenrollMfaInput {
91
+ export interface UnenrollMfaInput {
92
92
  /** The ID of the user whose factor will be unenrolled. */
93
93
  userId: string;
94
94
  /**
@@ -98,7 +98,7 @@ interface UnenrollMfaInput {
98
98
  mfaFactorId: string;
99
99
  }
100
100
  /** Instance methods exposed by `tailor.idp.Client`. */
101
- interface IdpClientInstance {
101
+ export interface IdpClientInstance {
102
102
  users(options?: ListUsersOptions): Promise<ListUsersResponse>;
103
103
  user(userId: string): Promise<User>;
104
104
  userByName(name: string): Promise<User>;
@@ -112,7 +112,7 @@ interface IdpClientInstance {
112
112
  * Constructor shape for `tailor.idp.Client`.
113
113
  * @internal
114
114
  */
115
- interface IdpClientConstructor {
115
+ export interface IdpClientConstructor {
116
116
  new (config: ClientConfig): IdpClientInstance;
117
117
  }
118
118
  /**
@@ -120,10 +120,9 @@ interface IdpClientConstructor {
120
120
  * runtime injects on `globalThis.tailor.idp`.
121
121
  * @internal
122
122
  */
123
- interface TailorIdpAPI {
123
+ export interface TailorIdpAPI {
124
124
  Client: IdpClientConstructor;
125
125
  }
126
126
  /** Runtime API for `tailor.idp`. */
127
- declare const idp: TailorIdpAPI;
128
- //#endregion
129
- export { ClientConfig, CreateUserInput, IdpClientConstructor, IdpClientInstance, ListUsersOptions, ListUsersResponse, SendPasswordResetEmailInput, TailorIdpAPI, UnenrollMfaInput, UpdateUserInput, User, UserQuery, idp };
127
+ export declare const idp: TailorIdpAPI;
128
+ //#endregion
@@ -10,27 +10,27 @@ import { TailorSecretmanagerAPI, secretmanager } from "./secretmanager.mjs";
10
10
  import { serializeDateFields } from "./date.mjs";
11
11
  //#region src/runtime/index.d.ts
12
12
  /** SQL command type recorded on a {@link TailordbQueryResult}. */
13
- type TailordbCommandType = "INSERT" | "DELETE" | "UPDATE" | "SELECT" | "MOVE" | "FETCH" | "COPY" | "CREATE";
13
+ export type TailordbCommandType = "INSERT" | "DELETE" | "UPDATE" | "SELECT" | "MOVE" | "FETCH" | "COPY" | "CREATE";
14
14
  /** Result of a single `queryObject` call against the TailorDB driver. */
15
- interface TailordbQueryResult<T> {
15
+ export interface TailordbQueryResult<T> {
16
16
  rows: T[];
17
17
  command: TailordbCommandType;
18
18
  rowCount: number;
19
19
  }
20
20
  /** Instance methods exposed by `tailordb.Client`. */
21
- interface TailordbClientInstance {
21
+ export interface TailordbClientInstance {
22
22
  connect(): Promise<void>;
23
23
  end(): Promise<void>;
24
24
  queryObject<O>(sql: string, args?: readonly unknown[]): Promise<TailordbQueryResult<O>>;
25
25
  }
26
26
  /** Constructor shape for `tailordb.Client`. */
27
- interface TailordbClientConstructor {
27
+ export interface TailordbClientConstructor {
28
28
  new (config: {
29
29
  namespace: string;
30
30
  }): TailordbClientInstance;
31
31
  }
32
32
  /** Top-level `tailor` runtime object. */
33
- interface TailorRuntime {
33
+ export interface TailorRuntime {
34
34
  secretmanager: TailorSecretmanagerAPI;
35
35
  authconnection: TailorAuthconnectionAPI;
36
36
  iconv: TailorIconvAPI;
@@ -41,9 +41,9 @@ interface TailorRuntime {
41
41
  logger: TailorLoggerAPI;
42
42
  }
43
43
  /** Top-level `tailordb` runtime object. */
44
- interface TailordbRuntime {
44
+ export interface TailordbRuntime {
45
45
  Client: TailordbClientConstructor;
46
46
  file: TailorDBFileAPI;
47
47
  }
48
48
  //#endregion
49
- export { TailorRuntime, TailordbClientConstructor, TailordbClientInstance, TailordbCommandType, TailordbQueryResult, TailordbRuntime, aigateway, authconnection, context, file, iconv, idp, logger, secretmanager, serializeDateFields, workflow };
49
+ export { aigateway, authconnection, context, file, iconv, idp, logger, secretmanager, serializeDateFields, workflow };
@@ -19,13 +19,13 @@
19
19
  * A single log attribute value. Values outside this union (`null`, nested
20
20
  * objects, mixed-type arrays) are silently dropped by the platform.
21
21
  */
22
- type LogAttributeValue = string | number | boolean | readonly string[] | readonly number[] | readonly boolean[];
22
+ export type LogAttributeValue = string | number | boolean | readonly string[] | readonly number[] | readonly boolean[];
23
23
  /**
24
24
  * Structured attributes attached to a log entry. The platform keeps at most 32
25
25
  * entries, drops any entry whose key exceeds 128 bytes, and truncates string
26
26
  * values over 4096 bytes and arrays over 64 elements.
27
27
  */
28
- type LogAttributes = Record<string, LogAttributeValue>;
28
+ export type LogAttributes = Record<string, LogAttributeValue>;
29
29
  /**
30
30
  * Platform API surface for `tailor.logger`. Describes the shape the platform
31
31
  * runtime injects on `globalThis.tailor.logger`.
@@ -34,7 +34,7 @@ type LogAttributes = Record<string, LogAttributeValue>;
34
34
  * module so callers can either `import * as logger from
35
35
  * "@tailor-platform/sdk/runtime/logger"` or pick individual methods.
36
36
  */
37
- interface TailorLoggerAPI {
37
+ export interface TailorLoggerAPI {
38
38
  /**
39
39
  * Emits a `debug`-severity log entry.
40
40
  * @param message - The log message
@@ -71,28 +71,27 @@ interface TailorLoggerAPI {
71
71
  * See {@link TailorLoggerAPI.debug}.
72
72
  * @param args - Forwarded to {@link TailorLoggerAPI.debug}
73
73
  */
74
- declare const debug: TailorLoggerAPI["debug"];
74
+ export declare const debug: TailorLoggerAPI["debug"];
75
75
  /**
76
76
  * See {@link TailorLoggerAPI.info}.
77
77
  * @param args - Forwarded to {@link TailorLoggerAPI.info}
78
78
  */
79
- declare const info: TailorLoggerAPI["info"];
79
+ export declare const info: TailorLoggerAPI["info"];
80
80
  /**
81
81
  * See {@link TailorLoggerAPI.warn}.
82
82
  * @param args - Forwarded to {@link TailorLoggerAPI.warn}
83
83
  */
84
- declare const warn: TailorLoggerAPI["warn"];
84
+ export declare const warn: TailorLoggerAPI["warn"];
85
85
  /**
86
86
  * See {@link TailorLoggerAPI.error}.
87
87
  * @param args - Forwarded to {@link TailorLoggerAPI.error}
88
88
  */
89
- declare const error: TailorLoggerAPI["error"];
89
+ export declare const error: TailorLoggerAPI["error"];
90
90
  /**
91
91
  * See {@link TailorLoggerAPI.setAttributes}.
92
92
  * @param args - Forwarded to {@link TailorLoggerAPI.setAttributes}
93
93
  */
94
- declare const setAttributes: TailorLoggerAPI["setAttributes"];
94
+ export declare const setAttributes: TailorLoggerAPI["setAttributes"];
95
95
  /** `tailor.logger` API object. See {@link TailorLoggerAPI} for method docs. */
96
- declare const logger: TailorLoggerAPI;
97
- //#endregion
98
- export { LogAttributeValue, LogAttributes, TailorLoggerAPI, debug, error, info, logger, setAttributes, warn };
96
+ export declare const logger: TailorLoggerAPI;
97
+ //#endregion
@@ -16,7 +16,7 @@
16
16
  * Platform API surface for `tailor.secretmanager`. Describes the shape the
17
17
  * platform runtime injects on `globalThis.tailor.secretmanager`.
18
18
  */
19
- interface TailorSecretmanagerAPI {
19
+ export interface TailorSecretmanagerAPI {
20
20
  /**
21
21
  * Returns multiple secrets from a vault. Missing names are omitted from the result.
22
22
  * @param vault - Vault name
@@ -33,9 +33,8 @@ interface TailorSecretmanagerAPI {
33
33
  getSecret(vault: string, name: string): Promise<string | undefined>;
34
34
  }
35
35
  /** Runtime wrapper namespace for `tailor.secretmanager`. */
36
- declare const secretmanager: {
36
+ export declare const secretmanager: {
37
37
  readonly getSecrets: <const T extends readonly string[]>(vault: string, names: T) => Promise<Partial<Record<T[number], string>>>;
38
38
  readonly getSecret: (vault: string, name: string) => Promise<string | undefined>;
39
39
  };
40
- //#endregion
41
- export { TailorSecretmanagerAPI, secretmanager };
40
+ //#endregion
@@ -1,12 +1,12 @@
1
1
  //#region src/runtime/types.d.ts
2
- interface Attributes {}
3
- interface AttributeList {
2
+ export interface Attributes {}
3
+ export interface AttributeList {
4
4
  __tuple?: [];
5
5
  }
6
- type InferredAttributes = keyof Attributes extends never ? Record<string, string | string[] | boolean | boolean[] | undefined> : Attributes;
6
+ export type InferredAttributes = keyof Attributes extends never ? Record<string, string | string[] | boolean | boolean[] | undefined> : Attributes;
7
7
  type InferredAttributeList = AttributeList["__tuple"] extends [] ? string[] : AttributeList["__tuple"];
8
8
  /** Represents a user or machine user principal in the Tailor Platform. */
9
- type TailorPrincipal = {
9
+ export type TailorPrincipal = {
10
10
  /** The ID of the principal. */
11
11
  id: string;
12
12
  /** The type of the principal. */
@@ -18,8 +18,7 @@ type TailorPrincipal = {
18
18
  /** A list of the principal's attribute IDs. */
19
19
  attributeList: InferredAttributeList;
20
20
  };
21
- interface Env {}
21
+ export interface Env {}
22
22
  /** Represents environment variables in the Tailor platform. */
23
- type TailorEnv = keyof Env extends never ? Record<string, string | number | boolean> : Env;
24
- //#endregion
25
- export { AttributeList, Attributes, Env, InferredAttributes, TailorEnv, TailorPrincipal };
23
+ export type TailorEnv = keyof Env extends never ? Record<string, string | number | boolean> : Env;
24
+ //#endregion
@@ -17,14 +17,14 @@
17
17
  * Specifies the machine user that should be used to execute the workflow.
18
18
  * This allows workflows to run with specific authentication context.
19
19
  */
20
- interface Invoker {
20
+ export interface Invoker {
21
21
  /** The namespace where the machine user is defined */
22
22
  namespace: string;
23
23
  /** The name of the machine user to use for workflow execution */
24
24
  machineUserName: string;
25
25
  }
26
26
  /** Options for {@link startWorkflow}. */
27
- interface StartWorkflowOptions {
27
+ export interface StartWorkflowOptions {
28
28
  /** Optional authentication invoker to specify which machine user should execute the workflow */
29
29
  authInvoker?: Invoker;
30
30
  }
@@ -35,11 +35,11 @@ declare const executionPolicyKeyBrand: unique symbol;
35
35
  * `defineWorkflowExecutionPolicies`). Branded so an arbitrary string that
36
36
  * wasn't derived from a declared policy can't be passed as `executionPolicyKey`.
37
37
  */
38
- type ExecutionPolicyKey = string & {
38
+ export type ExecutionPolicyKey = string & {
39
39
  readonly [executionPolicyKeyBrand]: never;
40
40
  };
41
41
  /** Options for {@link execJobFunction}. */
42
- interface ExecJobFunctionOptions {
42
+ export interface ExecJobFunctionOptions {
43
43
  /**
44
44
  * Execution policy key matched by the platform against the policies
45
45
  * declared with `defineWorkflowExecutionPolicies` in `tailor.config.ts`.
@@ -50,7 +50,7 @@ interface ExecJobFunctionOptions {
50
50
  * Platform API surface for `tailor.workflow`. Describes the shape the platform
51
51
  * runtime injects on `globalThis.tailor.workflow`.
52
52
  */
53
- interface PlatformWorkflowAPI {
53
+ export interface PlatformWorkflowAPI {
54
54
  /**
55
55
  * Starts a workflow and returns its execution ID.
56
56
  * @param workflowName - Workflow name as defined in tailor.config
@@ -90,12 +90,11 @@ interface PlatformWorkflowAPI {
90
90
  resolve(executionId: string, key: string, callback: (waitPayload: any) => any): Promise<void>;
91
91
  }
92
92
  /** Runtime wrapper namespace for `tailor.workflow`. */
93
- declare const workflow: {
93
+ export declare const workflow: {
94
94
  readonly startWorkflow: (workflowName: string, args?: any, options?: StartWorkflowOptions) => Promise<string>;
95
95
  readonly resumeWorkflowExecution: (executionId: string) => Promise<string>;
96
96
  readonly execJobFunction: (jobName: string, args?: any, options?: ExecJobFunctionOptions) => any;
97
97
  readonly wait: (key: string, payload?: any) => any;
98
98
  readonly resolve: (executionId: string, key: string, callback: (waitPayload: any) => any) => Promise<void>;
99
99
  };
100
- //#endregion
101
- export { ExecJobFunctionOptions, ExecutionPolicyKey, Invoker, PlatformWorkflowAPI, StartWorkflowOptions, workflow };
100
+ //#endregion
@@ -44,7 +44,7 @@ type FillSeedDataResult = {
44
44
  * @param options - Validation options including path and verbose flag
45
45
  * @returns Validation result with output messages and optional error details
46
46
  */
47
- declare function validateSeedData(options: ValidateSeedDataOptions): Promise<ValidateSeedResult>;
47
+ export declare function validateSeedData(options: ValidateSeedDataOptions): Promise<ValidateSeedResult>;
48
48
  /**
49
49
  * Fill in the values a record gets on create for the JSONL seed data rows that
50
50
  * are missing them, so a row can be referenced by `id` or carry a timestamp
@@ -70,6 +70,6 @@ declare function validateSeedData(options: ValidateSeedDataOptions): Promise<Val
70
70
  * @param options - Fill options including path and fields
71
71
  * @returns Which files received which fields
72
72
  */
73
- declare function fillSeedData(options: FillSeedDataOptions): Promise<FillSeedDataResult>;
73
+ export declare function fillSeedData(options: FillSeedDataOptions): Promise<FillSeedDataResult>;
74
74
  //#endregion
75
- export { type ForeignKeyDefinition, type IndexDefinition, defineSchema, fillSeedData, validateSeedData };
75
+ export { type ForeignKeyDefinition, type IndexDefinition, defineSchema };