@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,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  //#region src/cli/commands/organization/tree.d.ts
3
- interface OrganizationTreeOptions {
3
+ export interface OrganizationTreeOptions {
4
4
  organizationId?: string;
5
5
  depth?: number;
6
6
  }
@@ -19,6 +19,5 @@ interface FolderTreeJson {
19
19
  * @param options - Tree display options
20
20
  * @returns Organization tree as structured data
21
21
  */
22
- declare function organizationTree(options?: OrganizationTreeOptions): Promise<OrganizationTreeJson[]>;
23
- //#endregion
24
- export { OrganizationTreeOptions, organizationTree };
22
+ export declare function organizationTree(options?: OrganizationTreeOptions): Promise<OrganizationTreeJson[]>;
23
+ //#endregion
@@ -5,12 +5,11 @@ declare const updateOrganizationOptionsSchema: z.ZodObject<{
5
5
  organizationId: z.ZodUUID;
6
6
  name: z.ZodString;
7
7
  }, z.core.$strip>;
8
- type UpdateOrganizationOptions = z.input<typeof updateOrganizationOptionsSchema>;
8
+ export type UpdateOrganizationOptions = z.input<typeof updateOrganizationOptionsSchema>;
9
9
  /**
10
10
  * Update an organization's name.
11
11
  * @param options - Organization update options
12
12
  * @returns Updated organization details
13
13
  */
14
- declare function updateOrganization(options: UpdateOrganizationOptions): Promise<OrganizationInfo>;
15
- //#endregion
16
- export { UpdateOrganizationOptions, updateOrganization };
14
+ export declare function updateOrganization(options: UpdateOrganizationOptions): Promise<OrganizationInfo>;
15
+ //#endregion
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  //#region src/cli/commands/remove.d.ts
3
- interface RemoveOptions {
3
+ export interface RemoveOptions {
4
4
  workspaceId?: string;
5
5
  profile?: string;
6
6
  configPath?: string;
@@ -10,6 +10,5 @@ interface RemoveOptions {
10
10
  * @param options - Remove options
11
11
  * @returns Promise that resolves when removal completes
12
12
  */
13
- declare function remove(options?: RemoveOptions): Promise<void>;
14
- //#endregion
15
- export { RemoveOptions, remove };
13
+ export declare function remove(options?: RemoveOptions): Promise<void>;
14
+ //#endregion
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  //#region src/cli/commands/show.d.ts
3
- interface ShowOptions {
3
+ export interface ShowOptions {
4
4
  workspaceId?: string;
5
5
  profile?: string;
6
6
  configPath?: string;
@@ -11,7 +11,7 @@ interface WorkspaceInfo {
11
11
  workspaceFolderName?: string;
12
12
  workspaceRegion?: string;
13
13
  }
14
- interface ApplicationInfo {
14
+ export interface ApplicationInfo {
15
15
  name: string;
16
16
  domain: string;
17
17
  url: string;
@@ -22,11 +22,11 @@ interface ApplicationInfo {
22
22
  createdAt: Date | null;
23
23
  updatedAt: Date | null;
24
24
  }
25
- interface AIGatewayInfo {
25
+ export interface AIGatewayInfo {
26
26
  name: string;
27
27
  url: string;
28
28
  }
29
- interface ShowInfo extends ApplicationInfo, WorkspaceInfo {
29
+ export interface ShowInfo extends ApplicationInfo, WorkspaceInfo {
30
30
  aiGateways: AIGatewayInfo[];
31
31
  }
32
32
  /**
@@ -34,6 +34,5 @@ interface ShowInfo extends ApplicationInfo, WorkspaceInfo {
34
34
  * @param options - Show options
35
35
  * @returns Deployed application, workspace, and AI Gateway information
36
36
  */
37
- declare function show(options?: ShowOptions): Promise<ShowInfo>;
38
- //#endregion
39
- export { AIGatewayInfo, ApplicationInfo, ShowInfo, ShowOptions, show };
37
+ export declare function show(options?: ShowOptions): Promise<ShowInfo>;
38
+ //#endregion
@@ -1,7 +1,7 @@
1
1
  import { OperatorClient } from "../../shared/client.mjs";
2
2
  import { z } from "zod";
3
3
  //#region src/cli/commands/staticwebsite/deploy.d.ts
4
- type DeployResult = {
4
+ export type DeployResult = {
5
5
  url: string;
6
6
  skippedFiles: string[];
7
7
  };
@@ -14,6 +14,5 @@ type DeployResult = {
14
14
  * @param showProgress - Whether to show upload progress
15
15
  * @returns Deployment result with URL and skipped files
16
16
  */
17
- declare function deployStaticWebsite(client: OperatorClient, workspaceId: string, name: string, distDir: string, showProgress?: boolean): Promise<DeployResult>;
18
- //#endregion
19
- export { DeployResult, deployStaticWebsite };
17
+ export declare function deployStaticWebsite(client: OperatorClient, workspaceId: string, name: string, distDir: string, showProgress?: boolean): Promise<DeployResult>;
18
+ //#endregion
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * Bundles migration scripts for server-side execution
6
6
  */
7
- interface MigrationBundleResult {
7
+ export interface MigrationBundleResult {
8
8
  namespace: string;
9
9
  migrationNumber: number;
10
10
  bundledCode: string;
@@ -24,6 +24,5 @@ interface MigrationBundleResult {
24
24
  * @param {string} [baseDir] - Directory to resolve the bundler's tsconfig against; defaults to the migration script's directory
25
25
  * @returns {Promise<MigrationBundleResult>} Bundled migration result
26
26
  */
27
- declare function bundleMigrationScript(sourceFile: string, namespace: string, migrationNumber: number, env?: Record<string, string | number | boolean>, baseDir?: string): Promise<MigrationBundleResult>;
28
- //#endregion
29
- export { MigrationBundleResult, bundleMigrationScript };
27
+ export declare function bundleMigrationScript(sourceFile: string, namespace: string, migrationNumber: number, env?: Record<string, string | number | boolean>, baseDir?: string): Promise<MigrationBundleResult>;
28
+ //#endregion
@@ -3,7 +3,7 @@ import { AppConfig } from "../../../../configure/config/types.mjs";
3
3
  /**
4
4
  * Namespace with migrations configuration
5
5
  */
6
- interface NamespaceWithMigrations {
6
+ export interface NamespaceWithMigrations {
7
7
  namespace: string;
8
8
  migrationsDir: string;
9
9
  }
@@ -13,6 +13,5 @@ interface NamespaceWithMigrations {
13
13
  * @param {string} configDir - Configuration directory path
14
14
  * @returns {NamespaceWithMigrations[]} Array of namespaces with migrations configured
15
15
  */
16
- declare function getNamespacesWithMigrations(config: AppConfig, configDir: string): NamespaceWithMigrations[];
17
- //#endregion
18
- export { NamespaceWithMigrations, getNamespacesWithMigrations };
16
+ export declare function getNamespacesWithMigrations(config: AppConfig, configDir: string): NamespaceWithMigrations[];
17
+ //#endregion
@@ -12,12 +12,12 @@ interface DiffChangeBase {
12
12
  * Current SDK versions no longer produce this kind, but persisted
13
13
  * diff.json files written by older versions may still contain it.
14
14
  */
15
- interface TypeSettingsPatch {
15
+ export interface TypeSettingsPatch {
16
16
  indexes?: Record<string, SnapshotIndexConfig>;
17
17
  files?: Record<string, string>;
18
18
  }
19
19
  /** Table-level settings and metadata state used by current diffs. */
20
- interface SnapshotTypeSettingsState {
20
+ export interface SnapshotTypeSettingsState {
21
21
  description?: string;
22
22
  pluralForm: string;
23
23
  settings?: TailorDBSnapshotType["settings"];
@@ -25,17 +25,17 @@ interface SnapshotTypeSettingsState {
25
25
  /**
26
26
  * Permission state carried by `permission_modified` changes.
27
27
  */
28
- interface SnapshotPermissionState {
28
+ export interface SnapshotPermissionState {
29
29
  recordPermission?: SnapshotRecordPermission;
30
30
  gqlPermission?: SnapshotGqlPermission;
31
31
  }
32
32
  /** A new table was added to the schema. */
33
- interface TableAddedChange extends DiffChangeBase {
33
+ export interface TableAddedChange extends DiffChangeBase {
34
34
  kind: "table_added";
35
35
  after: TailorDBSnapshotType;
36
36
  }
37
37
  /** An existing table was removed from the schema. */
38
- interface TableRemovedChange extends DiffChangeBase {
38
+ export interface TableRemovedChange extends DiffChangeBase {
39
39
  kind: "table_removed";
40
40
  before: TailorDBSnapshotType;
41
41
  }
@@ -44,7 +44,7 @@ interface TableRemovedChange extends DiffChangeBase {
44
44
  * table pair is a rename (interactively or via `--rename`).
45
45
  * `tableName` is the new name; `previousTableName` is the old name.
46
46
  */
47
- interface TableRenamedChange extends DiffChangeBase {
47
+ export interface TableRenamedChange extends DiffChangeBase {
48
48
  kind: "table_renamed";
49
49
  previousTableName: string;
50
50
  before: TailorDBSnapshotType;
@@ -55,31 +55,31 @@ interface TableRenamedChange extends DiffChangeBase {
55
55
  * diff.json files written by older SDK versions; `before`/`after` may be
56
56
  * absent in those files, hence optional.
57
57
  */
58
- interface TableModifiedChange extends DiffChangeBase {
58
+ export interface TableModifiedChange extends DiffChangeBase {
59
59
  kind: "table_modified";
60
60
  before?: TypeSettingsPatch;
61
61
  after?: TypeSettingsPatch;
62
62
  }
63
63
  /** Table-level settings or metadata changed. */
64
- interface TableSettingsModifiedChange extends DiffChangeBase {
64
+ export interface TableSettingsModifiedChange extends DiffChangeBase {
65
65
  kind: "table_settings_modified";
66
66
  before: SnapshotTypeSettingsState;
67
67
  after: SnapshotTypeSettingsState;
68
68
  }
69
69
  /** A field was added to a table. */
70
- interface FieldAddedChange extends DiffChangeBase {
70
+ export interface FieldAddedChange extends DiffChangeBase {
71
71
  kind: "field_added";
72
72
  fieldName: string;
73
73
  after: SnapshotFieldConfig;
74
74
  }
75
75
  /** A field was removed from a table. */
76
- interface FieldRemovedChange extends DiffChangeBase {
76
+ export interface FieldRemovedChange extends DiffChangeBase {
77
77
  kind: "field_removed";
78
78
  fieldName: string;
79
79
  before: SnapshotFieldConfig;
80
80
  }
81
81
  /** A field configuration was modified. */
82
- interface FieldModifiedChange extends DiffChangeBase {
82
+ export interface FieldModifiedChange extends DiffChangeBase {
83
83
  kind: "field_modified";
84
84
  fieldName: string;
85
85
  before: SnapshotFieldConfig;
@@ -90,7 +90,7 @@ interface FieldModifiedChange extends DiffChangeBase {
90
90
  * removed + added field pair is a rename (interactively or via `--rename`).
91
91
  * `fieldName` is the new name; `previousFieldName` is the old name.
92
92
  */
93
- interface FieldRenamedChange extends DiffChangeBase {
93
+ export interface FieldRenamedChange extends DiffChangeBase {
94
94
  kind: "field_renamed";
95
95
  fieldName: string;
96
96
  previousFieldName: string;
@@ -98,45 +98,45 @@ interface FieldRenamedChange extends DiffChangeBase {
98
98
  after: SnapshotFieldConfig;
99
99
  }
100
100
  /** A field type changed and must remain on the previous type until Post-phase. */
101
- interface FieldTypeModifiedChange extends DiffChangeBase {
101
+ export interface FieldTypeModifiedChange extends DiffChangeBase {
102
102
  kind: "field_type_modified";
103
103
  fieldName: string;
104
104
  before: SnapshotFieldConfig;
105
105
  after: SnapshotFieldConfig;
106
106
  }
107
107
  /** An index was added to a table. */
108
- interface IndexAddedChange extends DiffChangeBase {
108
+ export interface IndexAddedChange extends DiffChangeBase {
109
109
  kind: "index_added";
110
110
  indexName: string;
111
111
  after: SnapshotIndexConfig;
112
112
  }
113
113
  /** An index was removed from a table. */
114
- interface IndexRemovedChange extends DiffChangeBase {
114
+ export interface IndexRemovedChange extends DiffChangeBase {
115
115
  kind: "index_removed";
116
116
  indexName: string;
117
117
  before: SnapshotIndexConfig;
118
118
  }
119
119
  /** An index configuration was modified. */
120
- interface IndexModifiedChange extends DiffChangeBase {
120
+ export interface IndexModifiedChange extends DiffChangeBase {
121
121
  kind: "index_modified";
122
122
  indexName: string;
123
123
  before: SnapshotIndexConfig;
124
124
  after: SnapshotIndexConfig;
125
125
  }
126
126
  /** A file field was added to a table. `before`/`after` hold the description. */
127
- interface FileAddedChange extends DiffChangeBase {
127
+ export interface FileAddedChange extends DiffChangeBase {
128
128
  kind: "file_added";
129
129
  fieldName: string;
130
130
  after: string;
131
131
  }
132
132
  /** A file field was removed from a table. */
133
- interface FileRemovedChange extends DiffChangeBase {
133
+ export interface FileRemovedChange extends DiffChangeBase {
134
134
  kind: "file_removed";
135
135
  fieldName: string;
136
136
  before: string;
137
137
  }
138
138
  /** A file field description was modified. */
139
- interface FileModifiedChange extends DiffChangeBase {
139
+ export interface FileModifiedChange extends DiffChangeBase {
140
140
  kind: "file_modified";
141
141
  fieldName: string;
142
142
  before: string;
@@ -147,21 +147,21 @@ interface FileModifiedChange extends DiffChangeBase {
147
147
  * backward compatibility: diff.json files written by older SDK versions
148
148
  * predate the field.
149
149
  */
150
- interface RelationshipAddedChange extends DiffChangeBase {
150
+ export interface RelationshipAddedChange extends DiffChangeBase {
151
151
  kind: "relationship_added";
152
152
  relationshipName: string;
153
153
  relationshipType?: "forward" | "backward";
154
154
  after: SnapshotRelationship;
155
155
  }
156
156
  /** A relationship was removed from a table. */
157
- interface RelationshipRemovedChange extends DiffChangeBase {
157
+ export interface RelationshipRemovedChange extends DiffChangeBase {
158
158
  kind: "relationship_removed";
159
159
  relationshipName: string;
160
160
  relationshipType?: "forward" | "backward";
161
161
  before: SnapshotRelationship;
162
162
  }
163
163
  /** A relationship configuration was modified. */
164
- interface RelationshipModifiedChange extends DiffChangeBase {
164
+ export interface RelationshipModifiedChange extends DiffChangeBase {
165
165
  kind: "relationship_modified";
166
166
  relationshipName: string;
167
167
  relationshipType?: "forward" | "backward";
@@ -173,13 +173,13 @@ interface RelationshipModifiedChange extends DiffChangeBase {
173
173
  * robustness against hand-edited or legacy diff.json files; consumers guard
174
174
  * on their presence.
175
175
  */
176
- interface PermissionModifiedChange extends DiffChangeBase {
176
+ export interface PermissionModifiedChange extends DiffChangeBase {
177
177
  kind: "permission_modified";
178
178
  before?: SnapshotPermissionState;
179
179
  after?: SnapshotPermissionState;
180
180
  }
181
181
  /** Table-level hook/validate script state for diff tracking. */
182
- interface TypeScriptsState {
182
+ export interface TypeScriptsState {
183
183
  typeHookExpr?: {
184
184
  create?: string;
185
185
  update?: string;
@@ -187,7 +187,7 @@ interface TypeScriptsState {
187
187
  typeValidateExpr?: string;
188
188
  }
189
189
  /** Table-level hook/validate scripts changed. */
190
- interface TableScriptsModifiedChange extends DiffChangeBase {
190
+ export interface TableScriptsModifiedChange extends DiffChangeBase {
191
191
  kind: "table_scripts_modified";
192
192
  before: TypeScriptsState;
193
193
  after: TypeScriptsState;
@@ -196,12 +196,12 @@ interface TableScriptsModifiedChange extends DiffChangeBase {
196
196
  * Single change in migration diff, discriminated by `kind` so that
197
197
  * `before`/`after` are typed per change kind.
198
198
  */
199
- type DiffChange = TableAddedChange | TableRemovedChange | TableRenamedChange | TableModifiedChange | TableSettingsModifiedChange | FieldAddedChange | FieldRemovedChange | FieldModifiedChange | FieldRenamedChange | FieldTypeModifiedChange | IndexAddedChange | IndexRemovedChange | IndexModifiedChange | FileAddedChange | FileRemovedChange | FileModifiedChange | RelationshipAddedChange | RelationshipRemovedChange | RelationshipModifiedChange | PermissionModifiedChange | TableScriptsModifiedChange;
199
+ export type DiffChange = TableAddedChange | TableRemovedChange | TableRenamedChange | TableModifiedChange | TableSettingsModifiedChange | FieldAddedChange | FieldRemovedChange | FieldModifiedChange | FieldRenamedChange | FieldTypeModifiedChange | IndexAddedChange | IndexRemovedChange | IndexModifiedChange | FileAddedChange | FileRemovedChange | FileModifiedChange | RelationshipAddedChange | RelationshipRemovedChange | RelationshipModifiedChange | PermissionModifiedChange | TableScriptsModifiedChange;
200
200
  /**
201
201
  * Migration diff - changes between two schema versions
202
202
  * Stored as XXXX/diff.json (e.g., 0001/diff.json)
203
203
  */
204
- interface MigrationDiff {
204
+ export interface MigrationDiff {
205
205
  /** Format version for future compatibility */
206
206
  version: number;
207
207
  namespace: string;
@@ -225,14 +225,14 @@ interface MigrationDiff {
225
225
  * Acknowledgment that a migration requiring or recommending a script intentionally has none.
226
226
  * Recorded by `tailordb migration script <n> --no-script --reason "..."`.
227
227
  */
228
- interface ScriptSkippedInfo {
228
+ export interface ScriptSkippedInfo {
229
229
  reason: string;
230
230
  acknowledgedAt: string;
231
231
  }
232
232
  /**
233
233
  * Breaking change information in migration diff
234
234
  */
235
- interface BreakingChangeInfo {
235
+ export interface BreakingChangeInfo {
236
236
  tableName: string;
237
237
  fieldName?: string;
238
238
  reason: string;
@@ -249,7 +249,7 @@ interface BreakingChangeInfo {
249
249
  * script is not required, but writing one is recommended if you need to
250
250
  * preserve or transform data before the change applies.
251
251
  */
252
- interface WarningChangeInfo {
252
+ export interface WarningChangeInfo {
253
253
  tableName: string;
254
254
  /** Field name, or the dotted path of a member inside a nested field (e.g. `address.zip`). */
255
255
  fieldName?: string;
@@ -260,18 +260,17 @@ interface WarningChangeInfo {
260
260
  * @param {MigrationDiff} diff - Migration diff to check
261
261
  * @returns {boolean} True if diff has changes
262
262
  */
263
- declare function hasChanges(diff: MigrationDiff): boolean;
263
+ export declare function hasChanges(diff: MigrationDiff): boolean;
264
264
  /**
265
265
  * Format a migration diff for display
266
266
  * @param {MigrationDiff} diff - Migration diff to format
267
267
  * @returns {string} Formatted diff string
268
268
  */
269
- declare function formatMigrationDiff(diff: MigrationDiff): string;
269
+ export declare function formatMigrationDiff(diff: MigrationDiff): string;
270
270
  /**
271
271
  * Format a summary of the migration diff
272
272
  * @param {MigrationDiff} diff - Migration diff to summarize
273
273
  * @returns {string} Formatted summary string
274
274
  */
275
- declare function formatDiffSummary(diff: MigrationDiff): string;
276
- //#endregion
277
- export { BreakingChangeInfo, DiffChange, FieldAddedChange, FieldModifiedChange, FieldRemovedChange, FieldRenamedChange, FieldTypeModifiedChange, FileAddedChange, FileModifiedChange, FileRemovedChange, IndexAddedChange, IndexModifiedChange, IndexRemovedChange, MigrationDiff, PermissionModifiedChange, RelationshipAddedChange, RelationshipModifiedChange, RelationshipRemovedChange, ScriptSkippedInfo, SnapshotPermissionState, SnapshotTypeSettingsState, TableAddedChange, TableModifiedChange, TableRemovedChange, TableRenamedChange, TableScriptsModifiedChange, TableSettingsModifiedChange, TypeScriptsState, TypeSettingsPatch, WarningChangeInfo, formatDiffSummary, formatMigrationDiff, hasChanges };
275
+ export declare function formatDiffSummary(diff: MigrationDiff): string;
276
+ //#endregion
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  //#region src/cli/commands/tailordb/migrate/generate.d.ts
3
- interface GenerateOptions {
3
+ export interface GenerateOptions {
4
4
  configPath?: string;
5
5
  name?: string;
6
6
  yes?: boolean;
@@ -21,6 +21,5 @@ interface GenerateOptions {
21
21
  * @param {GenerateOptions} options - Generation options
22
22
  * @returns {Promise<void>} Promise that resolves when generation is complete
23
23
  */
24
- declare function generate(options: GenerateOptions): Promise<void>;
25
- //#endregion
26
- export { GenerateOptions, generate };
24
+ export declare function generate(options: GenerateOptions): Promise<void>;
25
+ //#endregion
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * A confirmed field rename to record in the migration diff.
4
4
  */
5
- interface FieldRenameSpec {
5
+ export interface FieldRenameSpec {
6
6
  tableName: string;
7
7
  /** Field name before the rename. */
8
8
  previousFieldName: string;
@@ -12,11 +12,10 @@ interface FieldRenameSpec {
12
12
  /**
13
13
  * A confirmed table rename to record in the migration diff.
14
14
  */
15
- interface TypeRenameSpec {
15
+ export interface TypeRenameSpec {
16
16
  /** Type name before the rename. */
17
17
  previousTableName: string;
18
18
  /** Type name after the rename. */
19
19
  tableName: string;
20
20
  }
21
- //#endregion
22
- export { FieldRenameSpec, TypeRenameSpec };
21
+ //#endregion
@@ -5,7 +5,7 @@ import { FieldRenameSpec, TypeRenameSpec } from "./rename-detection.mjs";
5
5
  /**
6
6
  * Options for {@link compareSnapshots}.
7
7
  */
8
- interface CompareSnapshotsOptions {
8
+ export interface CompareSnapshotsOptions {
9
9
  /**
10
10
  * Confirmed field renames. Each spec replaces the corresponding
11
11
  * `field_removed` + `field_added` pair with a single breaking
@@ -26,7 +26,7 @@ interface CompareSnapshotsOptions {
26
26
  * @param {CompareSnapshotsOptions} [options] - Comparison options
27
27
  * @returns {MigrationDiff} Migration diff between snapshots
28
28
  */
29
- declare function compareSnapshots(previous: NormalizedSchemaSnapshot, current: NormalizedSchemaSnapshot, options?: CompareSnapshotsOptions): MigrationDiff;
29
+ export declare function compareSnapshots(previous: NormalizedSchemaSnapshot, current: NormalizedSchemaSnapshot, options?: CompareSnapshotsOptions): MigrationDiff;
30
30
  /**
31
31
  * Compare a snapshot against canonical TailorDBSnapshotType-shaped local tables.
32
32
  * Callers are expected to pre-convert TailorDBService.types to TailorDBSnapshotType via
@@ -38,6 +38,5 @@ declare function compareSnapshots(previous: NormalizedSchemaSnapshot, current: N
38
38
  * @param {string} namespace - Namespace for comparison
39
39
  * @returns {MigrationDiff} Migration diff
40
40
  */
41
- declare function compareLocalTypesWithSnapshot(snapshot: SchemaSnapshot, localTypes: Record<string, TailorDBSnapshotType>, namespace: string): MigrationDiff;
42
- //#endregion
43
- export { CompareSnapshotsOptions, compareLocalTypesWithSnapshot, compareSnapshots };
41
+ export declare function compareLocalTypesWithSnapshot(snapshot: SchemaSnapshot, localTypes: Record<string, TailorDBSnapshotType>, namespace: string): MigrationDiff;
42
+ //#endregion
@@ -2,30 +2,30 @@
2
2
  /**
3
3
  * Initial schema migration number (0000)
4
4
  */
5
- declare const INITIAL_SCHEMA_NUMBER = 0;
5
+ export declare const INITIAL_SCHEMA_NUMBER = 0;
6
6
  /**
7
7
  * Migration file names (used within migration directories)
8
8
  */
9
- declare const SCHEMA_FILE_NAME = "schema.json";
9
+ export declare const SCHEMA_FILE_NAME = "schema.json";
10
10
  /** File name for migration diff metadata. */
11
- declare const DIFF_FILE_NAME = "diff.json";
11
+ export declare const DIFF_FILE_NAME = "diff.json";
12
12
  /** File name for migration script. */
13
- declare const MIGRATE_FILE_NAME = "migrate.ts";
13
+ export declare const MIGRATE_FILE_NAME = "migrate.ts";
14
14
  /** File name for migration script unit test. */
15
- declare const MIGRATE_TEST_FILE_NAME = "migrate.test.ts";
15
+ export declare const MIGRATE_TEST_FILE_NAME = "migrate.test.ts";
16
16
  /** File name for generated DB type definitions. */
17
- declare const DB_TYPES_FILE_NAME = "db.ts";
17
+ export declare const DB_TYPES_FILE_NAME = "db.ts";
18
18
  /**
19
19
  * Migration file type
20
20
  */
21
- type MigrationFileType = "schema" | "diff" | "migrate" | "test" | "db";
21
+ export type MigrationFileType = "schema" | "diff" | "migrate" | "test" | "db";
22
22
  /**
23
23
  * Get migration directory path for a given number
24
24
  * @param {string} migrationsDir - Base migrations directory path
25
25
  * @param {number} num - Migration number
26
26
  * @returns {string} Full directory path for the migration
27
27
  */
28
- declare function getMigrationDirPath(migrationsDir: string, num: number): string;
28
+ export declare function getMigrationDirPath(migrationsDir: string, num: number): string;
29
29
  /**
30
30
  * Get migration file path for a given number and type
31
31
  * @param {string} migrationsDir - Migrations directory path
@@ -33,13 +33,13 @@ declare function getMigrationDirPath(migrationsDir: string, num: number): string
33
33
  * @param {MigrationFileType} type - File type
34
34
  * @returns {string} Full file path
35
35
  */
36
- declare function getMigrationFilePath(migrationsDir: string, num: number, type: MigrationFileType): string;
36
+ export declare function getMigrationFilePath(migrationsDir: string, num: number, type: MigrationFileType): string;
37
37
  /**
38
38
  * Get all migration directories and their files, sorted by number
39
39
  * @param {string} migrationsDir - Migrations directory path
40
40
  * @returns {Array<{number: number, type: "schema" | "diff", path: string}>} Migration files sorted by number
41
41
  */
42
- declare function getMigrationFiles(migrationsDir: string): {
42
+ export declare function getMigrationFiles(migrationsDir: string): {
43
43
  number: number;
44
44
  type: "schema" | "diff";
45
45
  path: string;
@@ -50,13 +50,12 @@ declare function getMigrationFiles(migrationsDir: string): {
50
50
  * @param {string} migrationsDir - Migrations directory path
51
51
  * @returns {number} Next migration number
52
52
  */
53
- declare function getNextMigrationNumber(migrationsDir: string): number;
53
+ export declare function getNextMigrationNumber(migrationsDir: string): number;
54
54
  /**
55
55
  * Get the latest migration number from a directory
56
56
  * Returns 0 if no migrations exist
57
57
  * @param {string} migrationsDir - Migrations directory path
58
58
  * @returns {number} Latest migration number or 0 if no migrations exist
59
59
  */
60
- declare function getLatestMigrationNumber(migrationsDir: string): number;
61
- //#endregion
62
- export { DB_TYPES_FILE_NAME, DIFF_FILE_NAME, INITIAL_SCHEMA_NUMBER, MIGRATE_FILE_NAME, MIGRATE_TEST_FILE_NAME, MigrationFileType, SCHEMA_FILE_NAME, getLatestMigrationNumber, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNextMigrationNumber };
60
+ export declare function getLatestMigrationNumber(migrationsDir: string): number;
61
+ //#endregion
@@ -7,6 +7,5 @@ import { NormalizedSchemaSnapshot } from "./snapshot-types.mjs";
7
7
  * @param {string} namespace - Namespace for the snapshot
8
8
  * @returns {NormalizedSchemaSnapshot} Normalized schema snapshot
9
9
  */
10
- declare function createSnapshotFromLocalTypes(types: Record<string, TailorDBType>, namespace: string): NormalizedSchemaSnapshot;
11
- //#endregion
12
- export { createSnapshotFromLocalTypes };
10
+ export declare function createSnapshotFromLocalTypes(types: Record<string, TailorDBType>, namespace: string): NormalizedSchemaSnapshot;
11
+ //#endregion
@@ -7,6 +7,5 @@ import { NormalizedSchemaSnapshot } from "./snapshot-types.mjs";
7
7
  * @param {number} [maxVersion] - Optional maximum migration version to apply
8
8
  * @returns {NormalizedSchemaSnapshot | null} Reconstructed normalized snapshot or null if no migrations exist
9
9
  */
10
- declare function reconstructSnapshotFromMigrations(migrationsDir: string, maxVersion?: number): NormalizedSchemaSnapshot | null;
11
- //#endregion
12
- export { reconstructSnapshotFromMigrations };
10
+ export declare function reconstructSnapshotFromMigrations(migrationsDir: string, maxVersion?: number): NormalizedSchemaSnapshot | null;
11
+ //#endregion