@tailor-platform/sdk 2.35.0 → 2.37.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 (135) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/dist/{application-Bj2MtL-d.mjs → application-83WVdH85.mjs} +1 -1
  3. package/dist/{application-DIsQSnj3.mjs → application-Cida-j1g.mjs} +36 -36
  4. package/dist/application-Cida-j1g.mjs.map +1 -0
  5. package/dist/cli/commands/deploy/deploy.d.mts +6 -1
  6. package/dist/cli/commands/deploy/tailordb/migration-validation.d.mts +1 -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 +5 -3
  22. package/dist/cli/lib.d.mts +2 -2
  23. package/dist/cli/lib.mjs +1 -1
  24. package/dist/cli/lib.mjs.map +1 -1
  25. package/dist/cli/main.mjs +52 -51
  26. package/dist/cli/main.mjs.map +1 -1
  27. package/dist/cli/shared/client.d.mts +26 -0
  28. package/dist/cli/shared/function-execution.d.mts +2 -0
  29. package/dist/cli/shared/prompt.d.mts +9 -4
  30. package/dist/completion/zsh-worker.zsh +21 -13
  31. package/dist/configure/config/index.d.mts +2 -0
  32. package/dist/configure/config/types.d.mts +2 -0
  33. package/dist/configure/index.mjs.map +1 -1
  34. package/dist/configure/services/executor/trigger/webhook.d.mts +1 -0
  35. package/dist/configure/services/tailordb/schema.d.mts +7 -2
  36. package/dist/configure/services/tailordb/types.d.mts +3 -0
  37. package/dist/crashreport-C2AcQNTe.mjs +1 -0
  38. package/dist/{crashreport-DGU6lwiX.mjs → crashreport-D_wf4GZh.mjs} +4 -4
  39. package/dist/{crashreport-DGU6lwiX.mjs.map → crashreport-D_wf4GZh.mjs.map} +1 -1
  40. package/dist/date-representation-Cr7W7Pn2.mjs.map +1 -1
  41. package/dist/{errors-BXmGBX-7.mjs → errors-Dmdnq0zi.mjs} +2 -2
  42. package/dist/errors-Dmdnq0zi.mjs.map +1 -0
  43. package/dist/{kysely-type-B0ri1-Xs.mjs → kysely-type-DVL90_oX.mjs} +6 -6
  44. package/dist/kysely-type-DVL90_oX.mjs.map +1 -0
  45. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  46. package/dist/plugin/builtin/seed/seed-type-processor.d.mts +4 -3
  47. package/dist/plugin/get-generated-table.d.mts +4 -0
  48. package/dist/plugin/index.mjs.map +1 -1
  49. package/dist/plugin/types.d.mts +55 -3
  50. package/dist/plugin/with-context.d.mts +16 -0
  51. package/dist/register-ts-hook-Ht4zCseV.mjs +1115 -0
  52. package/dist/register-ts-hook-Ht4zCseV.mjs.map +1 -0
  53. package/dist/schema-BU1aIQ63.mjs.map +1 -1
  54. package/dist/{secret-file-BxZ-J_Nz.mjs → secret-file-DiuEcLFP.mjs} +2 -2
  55. package/dist/{secret-file-BxZ-J_Nz.mjs.map → secret-file-DiuEcLFP.mjs.map} +1 -1
  56. package/dist/service-CZ0EdD2-.mjs +10 -0
  57. package/dist/service-CZ0EdD2-.mjs.map +1 -0
  58. package/dist/service-DDrbdyd-.mjs +2 -0
  59. package/dist/{service-CaGmqg0r.mjs.map → service-DDrbdyd-.mjs.map} +1 -1
  60. package/dist/service-WhSyhaho.mjs +1 -0
  61. package/dist/service_pb-BMHhVot2.mjs +1 -0
  62. package/dist/service_pb-BxMSK0gg.mjs +2 -0
  63. package/dist/service_pb-BxMSK0gg.mjs.map +1 -0
  64. package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +3 -3
  65. package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +92 -0
  66. package/dist/tailor-proto/src/tailor/v1/notification_pb.d.mts +176 -0
  67. package/dist/tailor-proto/src/tailor/v1/notification_resource_pb.d.mts +172 -0
  68. package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +78 -0
  69. package/dist/types/app-config.generated.d.mts +1 -1
  70. package/dist/types/auth-connection.generated.d.mts +2 -2
  71. package/dist/types/auth.generated.d.mts +13 -13
  72. package/dist/types/executor.generated.d.mts +25 -25
  73. package/dist/types/field.generated.d.mts +2 -2
  74. package/dist/types/http-adapter.generated.d.mts +4 -4
  75. package/dist/types/idp.generated.d.mts +272 -272
  76. package/dist/types/resolver.generated.d.mts +10 -10
  77. package/dist/types/tailordb.generated.d.mts +84 -80
  78. package/dist/types/workflow.generated.d.mts +2 -2
  79. package/dist/vitest/date-representation.d.mts +2 -0
  80. package/dist/vitest/environment.d.mts +1 -0
  81. package/dist/vitest/environment.mjs.map +1 -1
  82. package/dist/vitest/index.mjs +1 -1
  83. package/dist/vitest/index.mjs.map +1 -1
  84. package/dist/vitest/migration-steps.d.mts +13 -2
  85. package/dist/vitest/mock-kysely.d.mts +12 -2
  86. package/dist/vitest/mocks/aigateway.d.mts +7 -1
  87. package/dist/vitest/mocks/authconnection.d.mts +7 -1
  88. package/dist/vitest/mocks/file.d.mts +7 -1
  89. package/dist/vitest/mocks/iconv.d.mts +7 -1
  90. package/dist/vitest/mocks/idp.d.mts +7 -1
  91. package/dist/vitest/mocks/logger.d.mts +7 -1
  92. package/dist/vitest/mocks/secretmanager.d.mts +7 -1
  93. package/dist/vitest/mocks/tailordb-pglite.d.mts +12 -2
  94. package/dist/vitest/mocks/tailordb.d.mts +22 -4
  95. package/dist/vitest/mocks/workflow.d.mts +2 -1
  96. package/dist/vitest/pglite-kysely.d.mts +23 -2
  97. package/dist/vitest/pglite-temporal.d.mts +5 -1
  98. package/dist/vitest/workflow-local.d.mts +7 -0
  99. package/dist/{workspace_resource_pb-C4CkoYww.mjs → workspace_resource_pb-7smKERdZ.mjs} +2 -2
  100. package/dist/workspace_resource_pb-7smKERdZ.mjs.map +1 -0
  101. package/docs/cli/application.md +52 -22
  102. package/docs/cli/executor.md +2 -0
  103. package/docs/cli/function.md +3 -1
  104. package/docs/cli/tailordb.md +31 -23
  105. package/docs/cli/user.md +1 -1
  106. package/docs/cli/workflow.md +2 -0
  107. package/docs/cli/workspace.md +20 -18
  108. package/docs/cli-reference.md +10 -7
  109. package/docs/configuration.md +2 -2
  110. package/docs/data-clone.md +1 -1
  111. package/docs/github-actions.md +104 -15
  112. package/docs/plugin/custom.md +4 -4
  113. package/docs/runtime.md +1 -1
  114. package/docs/services/auth.md +2 -0
  115. package/docs/services/executor.md +12 -5
  116. package/docs/services/idp.md +2 -0
  117. package/docs/services/tailordb/index.md +12 -3
  118. package/docs/services/tailordb/migration.md +90 -38
  119. package/docs/services/workflow.md +1 -1
  120. package/docs/testing.md +9 -9
  121. package/package.json +22 -22
  122. package/dist/application-DIsQSnj3.mjs.map +0 -1
  123. package/dist/crashreport-WsYAWARW.mjs +0 -1
  124. package/dist/errors-BXmGBX-7.mjs.map +0 -1
  125. package/dist/kysely-type-B0ri1-Xs.mjs.map +0 -1
  126. package/dist/register-ts-hook-CQ7shKO5.mjs +0 -1055
  127. package/dist/register-ts-hook-CQ7shKO5.mjs.map +0 -1
  128. package/dist/service-CaGmqg0r.mjs +0 -2
  129. package/dist/service-DEq_hdht.mjs +0 -1
  130. package/dist/service-eeXdVrDK.mjs +0 -8
  131. package/dist/service-eeXdVrDK.mjs.map +0 -1
  132. package/dist/service_pb-6EkMfdOb.mjs +0 -2
  133. package/dist/service_pb-6EkMfdOb.mjs.map +0 -1
  134. package/dist/service_pb-CsJKokDl.mjs +0 -1
  135. package/dist/workspace_resource_pb-C4CkoYww.mjs.map +0 -1
@@ -13,8 +13,13 @@ export interface DeployOptions {
13
13
  configPath?: string;
14
14
  dryRun?: boolean;
15
15
  yes?: boolean;
16
+ /** **Beta:** This API may change in future releases. */
16
17
  noSchemaCheck?: boolean;
17
- /** Steps of an in-progress multi-step migration to skip, keyed by namespace. */
18
+ /**
19
+ * Steps of an in-progress multi-step migration to skip, keyed by namespace.
20
+ *
21
+ * **Beta:** This API may change in future releases.
22
+ */
18
23
  migrationSkipSteps?: ReadonlyMap<string, readonly string[]>;
19
24
  noValidate?: boolean;
20
25
  noCache?: boolean;
@@ -2,4 +2,5 @@ import "../../../shared/client.mjs";
2
2
  import "../../../shared/config-loader.mjs";
3
3
  import "../../tailordb/migrate/snapshot.mjs";
4
4
  import "../../tailordb/migrate/config.mjs";
5
+ import "../../tailordb/migrate/remote-state.mjs";
5
6
  import "../../tailordb/migrate/schema-checks.mjs";
@@ -1,5 +1,6 @@
1
1
  import { Order } from "../../shared/args.mjs";
2
2
  import "../../shared/errors.mjs";
3
+ import { FunctionLogEntryInfo } from "../../shared/function-execution.mjs";
3
4
  import { ExecutorJobAttemptInfo, ExecutorJobInfo, ExecutorJobListInfo } from "./transform.mjs";
4
5
  import { z } from "zod";
5
6
  type ExecutorLike = {
@@ -36,6 +37,7 @@ export interface ExecutorJobDetailInfo extends ExecutorJobInfo {
36
37
  interface WorkflowJobLog {
37
38
  jobName: string;
38
39
  logs?: string;
40
+ logEntries?: FunctionLogEntryInfo[];
39
41
  result?: string;
40
42
  }
41
43
  export interface WatchExecutorJobResult {
@@ -51,6 +53,7 @@ export interface WatchExecutorJobResult {
51
53
  functionExecutionId?: string;
52
54
  functionStatus?: string;
53
55
  functionLogs?: string;
56
+ functionLogEntries?: FunctionLogEntryInfo[];
54
57
  }
55
58
  /**
56
59
  * List executor jobs for a given executor.
@@ -1,4 +1,5 @@
1
1
  import { EffectiveDateDefault } from "../../../../runtime/types.mjs";
2
+ /** **Beta:** This API may change in future releases. */
2
3
  export interface MigrationBundleResult {
3
4
  namespace: string;
4
5
  migrationNumber: number;
@@ -7,6 +8,8 @@ export interface MigrationBundleResult {
7
8
  /**
8
9
  * Bundle a single migration script
9
10
  *
11
+ * **Beta:** This API may change in future releases.
12
+ *
10
13
  * Creates an entry that:
11
14
  * 1. Imports the migration script's main function
12
15
  * 2. Defines getDB() function inline
@@ -2,6 +2,8 @@ import { AppConfig } from "../../../../configure/config/types.mjs";
2
2
  import "../../../shared/errors.mjs";
3
3
  /**
4
4
  * Namespace with migrations configuration
5
+ *
6
+ * **Beta:** This API may change in future releases.
5
7
  */
6
8
  export interface NamespaceWithMigrations {
7
9
  namespace: string;
@@ -9,6 +11,8 @@ export interface NamespaceWithMigrations {
9
11
  }
10
12
  /**
11
13
  * Get namespaces that have migrations configured
14
+ *
15
+ * **Beta:** This API may change in future releases.
12
16
  * @param {AppConfig} config - Application configuration
13
17
  * @param {string} configDir - Configuration directory path
14
18
  * @returns {NamespaceWithMigrations[]} Array of namespaces with migrations configured
@@ -213,6 +213,8 @@ export type DiffChange = TableAddedChange | TableRemovedChange | TableRenamedCha
213
213
  /**
214
214
  * Migration diff - changes between two schema versions
215
215
  * Stored as XXXX/diff.json (e.g., 0001/diff.json)
216
+ *
217
+ * **Beta:** This API may change in future releases.
216
218
  */
217
219
  export interface MigrationDiff {
218
220
  /** Format version for future compatibility */
@@ -256,6 +258,8 @@ export interface ScriptSkippedInfo {
256
258
  }
257
259
  /**
258
260
  * Breaking change information in migration diff
261
+ *
262
+ * **Beta:** This API may change in future releases.
259
263
  */
260
264
  export interface BreakingChangeInfo {
261
265
  tableName: string;
@@ -282,18 +286,24 @@ export interface WarningChangeInfo {
282
286
  }
283
287
  /**
284
288
  * Check if a migration diff has any changes
289
+ *
290
+ * **Beta:** This API may change in future releases.
285
291
  * @param {MigrationDiff} diff - Migration diff to check
286
292
  * @returns {boolean} True if diff has changes
287
293
  */
288
294
  export declare function hasChanges(diff: MigrationDiff): boolean;
289
295
  /**
290
296
  * Format a migration diff for display
297
+ *
298
+ * **Beta:** This API may change in future releases.
291
299
  * @param {MigrationDiff} diff - Migration diff to format
292
300
  * @returns {string} Formatted diff string
293
301
  */
294
302
  export declare function formatMigrationDiff(diff: MigrationDiff): string;
295
303
  /**
296
304
  * Format a summary of the migration diff
305
+ *
306
+ * **Beta:** This API may change in future releases.
297
307
  * @param {MigrationDiff} diff - Migration diff to summarize
298
308
  * @returns {string} Formatted summary string
299
309
  */
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ /** **Beta:** This API may change in future releases. */
2
3
  export interface GenerateOptions {
3
4
  configPath?: string;
4
5
  name?: string;
@@ -18,9 +19,34 @@ export interface GenerateOptions {
18
19
  /** `--expand-contract Table.field` values approving a field type conversion. */
19
20
  expandContracts?: string[];
20
21
  }
22
+ /** A migration this run wrote; paths are null for files it did not write. */
23
+ type GeneratedMigration = {
24
+ namespace: string;
25
+ migrationNumber: number;
26
+ schemaPath: string | null;
27
+ diffPath: string | null;
28
+ migratePath: string | null;
29
+ dbTypesPath: string | null;
30
+ pgliteSchemaPath: string | null;
31
+ pgliteSchemaError: string | null;
32
+ };
33
+ /** **Beta:** The outcome of generating TailorDB migrations. */
34
+ export type GenerateResult = {
35
+ changed: boolean;
36
+ /** Namespaces whose migration directory --init deleted */
37
+ clearedNamespaces: string[];
38
+ /** Namespaces whose breaking changes the user declined to generate */
39
+ skippedNamespaces: string[];
40
+ migrations: GeneratedMigration[];
41
+ };
21
42
  /**
22
43
  * Generate migration files for TailorDB schema changes
44
+ *
45
+ * **Beta:** This API may change in future releases.
46
+ * Declining a breaking-change confirmation skips that namespace and resolves successfully.
47
+ * Declining the `--init` confirmation rejects with `MIGRATION_GENERATE_CANCELLED`.
23
48
  * @param {GenerateOptions} options - Generation options
24
- * @returns {Promise<void>} Promise that resolves when generation is complete
49
+ * @returns {Promise<GenerateResult>} The migrations written, the directories cleared, and the namespaces skipped
25
50
  */
26
- export declare function generate(options: GenerateOptions): Promise<void>;
51
+ export declare function generate(options: GenerateOptions): Promise<GenerateResult>;
52
+ export {};
@@ -0,0 +1 @@
1
+ import "../../../shared/args.mjs";
@@ -0,0 +1,3 @@
1
+ import "../../../shared/client.mjs";
2
+ import "../../../shared/errors.mjs";
3
+ import "./hints.mjs";
@@ -2,4 +2,6 @@ import "../../../services/tailordb/service.mjs";
2
2
  import "../../../shared/client.mjs";
3
3
  import "../../../shared/config-loader.mjs";
4
4
  import "./snapshot.mjs";
5
- import "./config.mjs";
5
+ import "./config.mjs";
6
+ import "./hints.mjs";
7
+ import "./remote-state.mjs";
@@ -26,6 +26,8 @@ export interface CompareSnapshotsOptions {
26
26
  }
27
27
  /**
28
28
  * Compare two normalized snapshots and generate a diff
29
+ *
30
+ * **Beta:** This API may change in future releases.
29
31
  * @param {NormalizedSchemaSnapshot} previous - Previous normalized snapshot
30
32
  * @param {NormalizedSchemaSnapshot} current - Current normalized snapshot
31
33
  * @param {CompareSnapshotsOptions} [options] - Comparison options
@@ -38,6 +40,8 @@ export declare function compareSnapshots(previous: NormalizedSchemaSnapshot, cur
38
40
  * `createSnapshotType`. As a safety net, both sides are re-run through idempotent
39
41
  * normalization here, so a caller that forgets will still get correct
40
42
  * comparisons (no silent false drift).
43
+ *
44
+ * **Beta:** This API may change in future releases.
41
45
  * @param {SchemaSnapshot} snapshot - Schema snapshot to compare against
42
46
  * @param {Record<string, TailorDBSnapshotType>} localTypes - Local snapshot-shaped tables
43
47
  * @param {string} namespace - Namespace for comparison
@@ -1,22 +1,50 @@
1
1
  /**
2
2
  * Initial schema migration number (0000)
3
+ *
4
+ * **Beta:** This API may change in future releases.
3
5
  */
4
6
  export declare const INITIAL_SCHEMA_NUMBER = 0;
5
7
  /**
6
8
  * Migration file names (used within migration directories)
9
+ *
10
+ * **Beta:** This API may change in future releases.
7
11
  */
8
12
  export declare const SCHEMA_FILE_NAME = "schema.json";
9
- /** File name for migration diff metadata. */
13
+ /**
14
+ * File name for migration diff metadata.
15
+ *
16
+ * **Beta:** This API may change in future releases.
17
+ */
10
18
  export declare const DIFF_FILE_NAME = "diff.json";
11
- /** File name for migration script. */
19
+ /**
20
+ * File name for migration script.
21
+ *
22
+ * **Beta:** This API may change in future releases.
23
+ */
12
24
  export declare const MIGRATE_FILE_NAME = "migrate.ts";
13
- /** File name for migration script unit test. */
25
+ /**
26
+ * File name for migration script unit test.
27
+ *
28
+ * **Beta:** This API may change in future releases.
29
+ */
14
30
  export declare const MIGRATE_TEST_FILE_NAME = "migrate.test.ts";
15
- /** File name for generated DB type definitions. */
31
+ /**
32
+ * File name for generated DB type definitions.
33
+ *
34
+ * **Beta:** This API may change in future releases.
35
+ */
16
36
  export declare const DB_TYPES_FILE_NAME = "db.ts";
17
- /** File name for the generated PGlite schema script module. */
37
+ /**
38
+ * File name for the generated PGlite schema script module.
39
+ *
40
+ * **Beta:** This API may change in future releases.
41
+ */
18
42
  export declare const DB_PGLITE_SCHEMA_FILE_NAME = "db.pglite.ts";
19
- /** File name for the migration script PGlite test. */
43
+ /**
44
+ * File name for the migration script PGlite test.
45
+ *
46
+ * **Beta:** This API may change in future releases.
47
+ */
20
48
  export declare const MIGRATE_PGLITE_TEST_FILE_NAME = "migrate.pglite.test.ts";
21
49
  /**
22
50
  * Migration file type
@@ -24,6 +52,8 @@ export declare const MIGRATE_PGLITE_TEST_FILE_NAME = "migrate.pglite.test.ts";
24
52
  export type MigrationFileType = "schema" | "diff" | "migrate" | "test" | "db" | "pgliteSchema" | "pgliteTest";
25
53
  /**
26
54
  * Get migration directory path for a given number
55
+ *
56
+ * **Beta:** This API may change in future releases.
27
57
  * @param {string} migrationsDir - Base migrations directory path
28
58
  * @param {number} num - Migration number
29
59
  * @returns {string} Full directory path for the migration
@@ -31,6 +61,8 @@ export type MigrationFileType = "schema" | "diff" | "migrate" | "test" | "db" |
31
61
  export declare function getMigrationDirPath(migrationsDir: string, num: number): string;
32
62
  /**
33
63
  * Get migration file path for a given number and type
64
+ *
65
+ * **Beta:** This API may change in future releases.
34
66
  * @param {string} migrationsDir - Migrations directory path
35
67
  * @param {number} num - Migration number
36
68
  * @param {MigrationFileType} type - File type
@@ -39,6 +71,8 @@ export declare function getMigrationDirPath(migrationsDir: string, num: number):
39
71
  export declare function getMigrationFilePath(migrationsDir: string, num: number, type: MigrationFileType): string;
40
72
  /**
41
73
  * Get all migration directories and their files, sorted by number
74
+ *
75
+ * **Beta:** This API may change in future releases.
42
76
  * @param {string} migrationsDir - Migrations directory path
43
77
  * @returns {Array<{number: number, type: "schema" | "diff", path: string}>} Migration files sorted by number
44
78
  */
@@ -50,6 +84,8 @@ export declare function getMigrationFiles(migrationsDir: string): {
50
84
  /**
51
85
  * Get the next migration number for a directory
52
86
  * Returns INITIAL_SCHEMA_NUMBER (0) if no migrations exist
87
+ *
88
+ * **Beta:** This API may change in future releases.
53
89
  * @param {string} migrationsDir - Migrations directory path
54
90
  * @returns {number} Next migration number
55
91
  */
@@ -57,6 +93,8 @@ export declare function getNextMigrationNumber(migrationsDir: string): number;
57
93
  /**
58
94
  * Get the latest migration number from a directory
59
95
  * Returns 0 if no migrations exist
96
+ *
97
+ * **Beta:** This API may change in future releases.
60
98
  * @param {string} migrationsDir - Migrations directory path
61
99
  * @returns {number} Latest migration number or 0 if no migrations exist
62
100
  */
@@ -2,6 +2,8 @@ import { TailorDBType } from "../../../../parser/service/tailordb/types.mjs";
2
2
  import { NormalizedSchemaSnapshot } from "./snapshot-types.mjs";
3
3
  /**
4
4
  * Create a schema snapshot from local table definitions
5
+ *
6
+ * **Beta:** This API may change in future releases.
5
7
  * @param {Record<string, TailorDBType>} types - Local table definitions
6
8
  * @param {string} namespace - Namespace for the snapshot
7
9
  * @returns {NormalizedSchemaSnapshot} Normalized schema snapshot
@@ -2,6 +2,8 @@ import { NormalizedSchemaSnapshot } from "./snapshot-types.mjs";
2
2
  /**
3
3
  * Reconstruct the latest schema snapshot from all migration files
4
4
  * Returns null if no migrations exist
5
+ *
6
+ * **Beta:** This API may change in future releases.
5
7
  * @param {string} migrationsDir - Migrations directory path
6
8
  * @param {number} [maxVersion] - Optional maximum migration version to apply
7
9
  * @returns {NormalizedSchemaSnapshot | null} Reconstructed normalized snapshot or null if no migrations exist
@@ -39,6 +39,8 @@ export interface SnapshotEnumValue {
39
39
  }
40
40
  /**
41
41
  * Field configuration in schema snapshot
42
+ *
43
+ * **Beta:** This API may change in future releases.
42
44
  */
43
45
  export interface SnapshotFieldConfig {
44
46
  type: string;
@@ -153,6 +155,8 @@ export type SnapshotGqlPermission = readonly SnapshotGqlPermissionPolicy[];
153
155
  * `pluralForm` is always materialized — either set by the SDK user, derived
154
156
  * via inflection at snapshot construction, or backfilled when loading legacy
155
157
  * snapshots in `loadSnapshot`.
158
+ *
159
+ * **Beta:** This API may change in future releases.
156
160
  */
157
161
  export interface TailorDBSnapshotType {
158
162
  name: string;
@@ -194,6 +198,8 @@ export interface RebaselineMarker {
194
198
  * Schema snapshot - full schema state at a point in time.
195
199
  * Stored as XXXX/schema.json. Defined here (leaf module) so that
196
200
  * snapshot-schema.ts can reference it without importing snapshot.ts.
201
+ *
202
+ * **Beta:** This API may change in future releases.
197
203
  */
198
204
  export interface SchemaSnapshot {
199
205
  /** Format version for future compatibility */
@@ -207,6 +213,8 @@ declare const normalizedSchemaSnapshotBrand: unique symbol;
207
213
  /**
208
214
  * Schema snapshot normalized to a canonical form for consistent comparison.
209
215
  *
216
+ * **Beta:** This API may change in future releases.
217
+ *
210
218
  * Returned by snapshot creation and loading functions so drift detection stays
211
219
  * stable when local definitions omit defaults that the platform materializes.
212
220
  */
@@ -1,4 +1,6 @@
1
1
  /**
2
2
  * Label key for storing migration state in TailorDB Service metadata
3
+ *
4
+ * **Beta:** This API may change in future releases.
3
5
  */
4
6
  export declare const MIGRATION_LABEL_KEY = "sdk-migration";
@@ -14,7 +14,7 @@ declare const createWorkspaceOptionsSchema: z.ZodObject<{
14
14
  deleteProtection: z.ZodOptional<z.ZodBoolean>;
15
15
  organizationId: z.ZodOptional<z.ZodUUID>;
16
16
  folderId: z.ZodOptional<z.ZodUUID>;
17
- ttl: z.ZodOptional<z.ZodString>;
17
+ ttl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodString>>;
18
18
  profile: z.ZodOptional<z.ZodString>;
19
19
  }, z.core.$strip>;
20
20
  export type CreateWorkspaceOptions = z.input<typeof createWorkspaceOptionsSchema>;
@@ -23,8 +23,10 @@ export type CreatedWorkspaceInfo = WorkspaceInfo & {
23
23
  ttl?: TtlWriteResult;
24
24
  };
25
25
  /**
26
- * Create a new workspace with the given options. When neither location ID is provided,
27
- * use the selected user's defaults unless an environment token is set.
26
+ * Create a new workspace with the given options. Every workspace belongs to an organization.
27
+ * When neither location ID is provided, use the selected user's defaults unless an environment
28
+ * token is set. Throws `WORKSPACE_ORGANIZATION_REQUIRED` before contacting the Platform when no
29
+ * organization is resolved.
28
30
  * @param options - Workspace creation options
29
31
  * @returns Created workspace info
30
32
  */
@@ -91,7 +91,7 @@ import { ApiCallOptions, ApiCallResult, apiCall } from "./commands/api/api-call.
91
91
  import "./commands/api/index.mjs";
92
92
  import { query } from "./query/index.mjs";
93
93
  import { TruncateOptions, truncate } from "./commands/tailordb/truncate.mjs";
94
- import { GenerateOptions as GenerateOptions$1, generate as generate$1 } from "./commands/tailordb/migrate/generate.mjs";
94
+ import { GenerateOptions as GenerateOptions$1, GenerateResult, generate as generate$1 } from "./commands/tailordb/migrate/generate.mjs";
95
95
  import { SeedNamespaceConfig } from "../plugin/builtin/seed/seed-type-processor.mjs";
96
96
  import { LoadSeedContextOptions, SeedContext, SeedIdpUserContext, loadSeedContext } from "./shared/seed-context.mjs";
97
97
  import { ChunkSeedDataOptions, SeedChunk, SeedData, chunkSeedData } from "./shared/seed-chunker.mjs";
@@ -100,4 +100,4 @@ import { MigrationBundleResult, bundleMigrationScript } from "./commands/tailord
100
100
  import { ExecutionWaitResult, ScriptExecutionOptions, ScriptExecutionResult, ScriptInvoker, executeScript, waitForExecution } from "./shared/script-executor.mjs";
101
101
  import { arg, defineCommand, runCommand, runMain } from "@politty/zod";
102
102
  import { MachineUserName } from "@tailor-platform/sdk";
103
- export { type AIGatewayInfo, type ApiCallOptions, type ApiCallResult, type AppHealthInfo, type AppIdEntry, type AppIdEntryInput, type AppIdLock, type AppIdPlan, type AppIdPlanMode, type AppIds, type AppInfo, type ApplicationInfo, type DeployOptions as ApplyOptions, type AuthInvoker, type BreakingChangeInfo, type BundledScripts, type ChunkSeedDataOptions, type CommonArgsType, type CreateFolderOptions, type CreateWorkspaceOptions, DB_PGLITE_SCHEMA_FILE_NAME, DB_TYPES_FILE_NAME, DIFF_FILE_NAME, type DeleteFolderOptions, type DeleteWorkspaceOptions, type DeployOptions, type ErrorSourceLocation, type ErrorToJsonOptions, type ExecutionWaitResult, type Executor, type ExecutorInfo, type ExecutorJobAttemptInfo, type ExecutorJobDetailInfo, type ExecutorJobInfo, type ExecutorJobListInfo, type ExecutorListInfo, type FolderInfo, type FolderListInfo, type FunctionLogEntryInfo, type FunctionRegistryInfo, type GenerateOptions, type GeneratorResult, type HealthOptions as GetAppHealthOptions, type GetExecutorJobTypedOptions, type GetExecutorTypedOptions, type GetFolderOptions, type GetFunctionRegistryOptions, type GetMachineUserTokenOptions, type GetOAuth2ClientOptions, type GetOrganizationOptions, type GetWorkflowExecutionOptions, type GetWorkflowExecutionResult, type GetWorkflowTypedOptions, type GetWorkspaceOptions, INITIAL_SCHEMA_NUMBER, type InviteUserOptions, type ListAppsOptions, type ListExecutorJobsTypedOptions, type ListExecutorsOptions, type ListFoldersOptions, type ListFunctionRegistriesOptions, type ListMachineUsersOptions, type ListOAuth2ClientsOptions, type ListOrganizationsOptions, type ListUsersOptions, type ListWebhookExecutorsOptions, type ListWorkflowExecutionsTypedOptions, type ListWorkflowsOptions, type ListWorkspacesOptions, type LoadSeedContextOptions, type LoadTailorDBNamespacesOptions, type LoadedConfig, type LoadedTailorDBNamespaces, type LogMode, type LogOptions, MIGRATE_FILE_NAME, MIGRATE_PGLITE_TEST_FILE_NAME, MIGRATE_TEST_FILE_NAME, MIGRATION_LABEL_KEY, type MachineUserInfo, type MachineUserName, type MachineUserTokenInfo, type GenerateOptions$1 as MigrateGenerateOptions, type MigrationBundleResult, type MigrationDiff, type NamespaceWithMigrations, type NormalizedSchemaSnapshot, type OAuth2ClientCredentials, type OAuth2ClientInfo, type OperatorClient, type OperatorFieldConfig, type OrganizationInfo, type OrganizationTreeOptions, type OutOptions, type ParsedField, type PlanAppIdsParams, type Plugin, type PluginAttachment, type PluginGeneratedTableSource, type RemoveAdoptedConfigIdsResult, type RemoveOptions, type RemoveUserOptions, type ResolveAppIdParams, type Resolver, type RestoreWorkspaceOptions, type ResumeWorkflowOptions, type ResumeWorkflowResultWithWait, SCHEMA_FILE_NAME, type SchemaSnapshot, type ScriptExecutionOptions, type ScriptExecutionResult, type ScriptInvoker, type SeedBundleResult, type SeedChunk, type SeedContext, type SeedData, type SeedDumpBundleResult, type SeedIdpUserContext, type SeedNamespaceConfig, type ShowInfo, type ShowOAuth2ClientInfo, type ShowOptions, type ShowStaticWebsiteInfo, type SnapshotFieldConfig, type StartWorkflowResultWithWait, type StartWorkflowTypedOptions, type DeployResult as StaticWebsiteDeployResult, TAILOR_LOCK_FILENAME, TAILOR_LOCK_VERSION, type TailorDBNamespaceData, type TailorDBNamespaceSelector, type TailorDBSnapshotType, type TailorDBType, type TriggerExecutorResult, type TriggerExecutorTypedOptions, type TruncateOptions, type TypeSourceInfoEntry, type UpdateFolderOptions, type UpdateOrganizationOptions, type UpdateUserOptions, type UserInfo, type UserOrganizationInfo, WORKSPACE_NAME_MAX_LENGTH, type WaitOptions, type WaitWorkflowExecutionOptions, type WatchExecutorJobResult, type WatchExecutorJobTypedOptions, type WebhookExecutorInfo, type WorkflowExecutionInfo, type WorkflowExecutionWaitInfo, type WorkflowInfo, type WorkflowJobExecutionInfo, type WorkflowListInfo, type WorkflowWaitOutput, type WorkflowWaitResult, type WorkspaceDetails, type WorkspaceInfo, annotateTerminalError, apiCall, appIdLockKey, deploy as apply, arg, assertWritable, bundleMigrationScript, bundleSeedDumpScript, bundleSeedScript, chunkSeedData, compareLocalTypesWithSnapshot, compareSnapshots, configArg, confirmationArgs, createCommonArgs, createFolder, createSnapshotFromLocalTypes, createWorkspace, defineAppCommand, defineCommand, deleteFolder, deleteWorkspace, deploy, deployStaticWebsite, deploymentArgs, ensureConfigId, errorToJson, executeScript, extractOwnedNamespaces, findAppIdLock, formatDiffSummary, formatMigrationDiff, generate, generateUserTypes, getAppHealth, getExecutor, getExecutorJob, getExecutorWaitFailureMessage, getFolder, getFunctionRegistry, getLatestMigrationNumber, getMachineUserToken, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNamespacesWithMigrations, getNextMigrationNumber, getOAuth2Client, getOrganization, getWorkflow, getWorkflowExecution, getWorkspace, hasChanges, initOperatorClient, inviteUser, isPluginGeneratedTable, listApps, listExecutorJobs, listExecutors, listFolders, listFunctionRegistries, listMachineUsers, listOAuth2Clients, listOrganizations, listUsers, listWebhookExecutors, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadEnvFiles, loadSeedContext, loadTailorDBNamespaces, loadWorkspaceId, logBetaWarning, logger, generate$1 as migrateGenerate, organizationTree, parseAppIds, planAppIds, prompt, query, reconstructSnapshotFromMigrations, remove, removeAdoptedConfigIds, removeUser, resolveAppId, restoreWorkspace, resumeWorkflow, runCommand, runMain, serializeError, show, startWorkflow, styles, triggerExecutor, truncate, updateFolder, updateOrganization, updateUser, waitForExecution, waitWorkflowExecution, watchExecutorJob, withSourceLocation, workspaceArgs, workspaceNameSchema };
103
+ export { type AIGatewayInfo, type ApiCallOptions, type ApiCallResult, type AppHealthInfo, type AppIdEntry, type AppIdEntryInput, type AppIdLock, type AppIdPlan, type AppIdPlanMode, type AppIds, type AppInfo, type ApplicationInfo, type DeployOptions as ApplyOptions, type AuthInvoker, type BreakingChangeInfo, type BundledScripts, type ChunkSeedDataOptions, type CommonArgsType, type CreateFolderOptions, type CreateWorkspaceOptions, DB_PGLITE_SCHEMA_FILE_NAME, DB_TYPES_FILE_NAME, DIFF_FILE_NAME, type DeleteFolderOptions, type DeleteWorkspaceOptions, type DeployOptions, type ErrorSourceLocation, type ErrorToJsonOptions, type ExecutionWaitResult, type Executor, type ExecutorInfo, type ExecutorJobAttemptInfo, type ExecutorJobDetailInfo, type ExecutorJobInfo, type ExecutorJobListInfo, type ExecutorListInfo, type FolderInfo, type FolderListInfo, type FunctionLogEntryInfo, type FunctionRegistryInfo, type GenerateOptions, type GeneratorResult, type HealthOptions as GetAppHealthOptions, type GetExecutorJobTypedOptions, type GetExecutorTypedOptions, type GetFolderOptions, type GetFunctionRegistryOptions, type GetMachineUserTokenOptions, type GetOAuth2ClientOptions, type GetOrganizationOptions, type GetWorkflowExecutionOptions, type GetWorkflowExecutionResult, type GetWorkflowTypedOptions, type GetWorkspaceOptions, INITIAL_SCHEMA_NUMBER, type InviteUserOptions, type ListAppsOptions, type ListExecutorJobsTypedOptions, type ListExecutorsOptions, type ListFoldersOptions, type ListFunctionRegistriesOptions, type ListMachineUsersOptions, type ListOAuth2ClientsOptions, type ListOrganizationsOptions, type ListUsersOptions, type ListWebhookExecutorsOptions, type ListWorkflowExecutionsTypedOptions, type ListWorkflowsOptions, type ListWorkspacesOptions, type LoadSeedContextOptions, type LoadTailorDBNamespacesOptions, type LoadedConfig, type LoadedTailorDBNamespaces, type LogMode, type LogOptions, MIGRATE_FILE_NAME, MIGRATE_PGLITE_TEST_FILE_NAME, MIGRATE_TEST_FILE_NAME, MIGRATION_LABEL_KEY, type MachineUserInfo, type MachineUserName, type MachineUserTokenInfo, type GenerateOptions$1 as MigrateGenerateOptions, type GenerateResult as MigrateGenerateResult, type MigrationBundleResult, type MigrationDiff, type NamespaceWithMigrations, type NormalizedSchemaSnapshot, type OAuth2ClientCredentials, type OAuth2ClientInfo, type OperatorClient, type OperatorFieldConfig, type OrganizationInfo, type OrganizationTreeOptions, type OutOptions, type ParsedField, type PlanAppIdsParams, type Plugin, type PluginAttachment, type PluginGeneratedTableSource, type RemoveAdoptedConfigIdsResult, type RemoveOptions, type RemoveUserOptions, type ResolveAppIdParams, type Resolver, type RestoreWorkspaceOptions, type ResumeWorkflowOptions, type ResumeWorkflowResultWithWait, SCHEMA_FILE_NAME, type SchemaSnapshot, type ScriptExecutionOptions, type ScriptExecutionResult, type ScriptInvoker, type SeedBundleResult, type SeedChunk, type SeedContext, type SeedData, type SeedDumpBundleResult, type SeedIdpUserContext, type SeedNamespaceConfig, type ShowInfo, type ShowOAuth2ClientInfo, type ShowOptions, type ShowStaticWebsiteInfo, type SnapshotFieldConfig, type StartWorkflowResultWithWait, type StartWorkflowTypedOptions, type DeployResult as StaticWebsiteDeployResult, TAILOR_LOCK_FILENAME, TAILOR_LOCK_VERSION, type TailorDBNamespaceData, type TailorDBNamespaceSelector, type TailorDBSnapshotType, type TailorDBType, type TriggerExecutorResult, type TriggerExecutorTypedOptions, type TruncateOptions, type TypeSourceInfoEntry, type UpdateFolderOptions, type UpdateOrganizationOptions, type UpdateUserOptions, type UserInfo, type UserOrganizationInfo, WORKSPACE_NAME_MAX_LENGTH, type WaitOptions, type WaitWorkflowExecutionOptions, type WatchExecutorJobResult, type WatchExecutorJobTypedOptions, type WebhookExecutorInfo, type WorkflowExecutionInfo, type WorkflowExecutionWaitInfo, type WorkflowInfo, type WorkflowJobExecutionInfo, type WorkflowListInfo, type WorkflowWaitOutput, type WorkflowWaitResult, type WorkspaceDetails, type WorkspaceInfo, annotateTerminalError, apiCall, appIdLockKey, deploy as apply, arg, assertWritable, bundleMigrationScript, bundleSeedDumpScript, bundleSeedScript, chunkSeedData, compareLocalTypesWithSnapshot, compareSnapshots, configArg, confirmationArgs, createCommonArgs, createFolder, createSnapshotFromLocalTypes, createWorkspace, defineAppCommand, defineCommand, deleteFolder, deleteWorkspace, deploy, deployStaticWebsite, deploymentArgs, ensureConfigId, errorToJson, executeScript, extractOwnedNamespaces, findAppIdLock, formatDiffSummary, formatMigrationDiff, generate, generateUserTypes, getAppHealth, getExecutor, getExecutorJob, getExecutorWaitFailureMessage, getFolder, getFunctionRegistry, getLatestMigrationNumber, getMachineUserToken, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNamespacesWithMigrations, getNextMigrationNumber, getOAuth2Client, getOrganization, getWorkflow, getWorkflowExecution, getWorkspace, hasChanges, initOperatorClient, inviteUser, isPluginGeneratedTable, listApps, listExecutorJobs, listExecutors, listFolders, listFunctionRegistries, listMachineUsers, listOAuth2Clients, listOrganizations, listUsers, listWebhookExecutors, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadEnvFiles, loadSeedContext, loadTailorDBNamespaces, loadWorkspaceId, logBetaWarning, logger, generate$1 as migrateGenerate, organizationTree, parseAppIds, planAppIds, prompt, query, reconstructSnapshotFromMigrations, remove, removeAdoptedConfigIds, removeUser, resolveAppId, restoreWorkspace, resumeWorkflow, runCommand, runMain, serializeError, show, startWorkflow, styles, triggerExecutor, truncate, updateFolder, updateOrganization, updateUser, waitForExecution, waitWorkflowExecution, watchExecutorJob, withSourceLocation, workspaceArgs, workspaceNameSchema };
package/dist/cli/lib.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{_ as ee,f as te}from"../errors-BXmGBX-7.mjs";import{$ as e,$i as t,$r as n,$t as r,A as i,An as a,At as o,B as s,Br as c,Bt as l,C as u,Ci as d,Ct as f,Dn as p,E as m,En as h,Et as g,Fr as _,Ft as v,Gt as y,Ht as b,Ii as x,In as S,Ir as C,Ji as w,Jr as T,Jt as E,Kr as D,L as O,Lr as k,Lt as A,Mn as j,Mt as M,N,Nn as P,Nt as F,O as I,On as L,Ot as R,Pn as z,Pr as B,Qi as V,Qt as H,R as U,Rr as W,Si as G,Sn as K,St as q,Tn as J,U as Y,Ut as X,Vr as Z,W as Q,Wr as ne,Xr as re,Xt as ie,Y as ae,Yr as oe,Yt as $,Z as se,Zi as ce,Zt as le,_ as ue,at as de,bt as fe,ci as pe,d as me,ea as he,gr as ge,gt as _e,h as ve,ht as ye,i as be,ia as xe,in as Se,j as Ce,jn as we,jr as Te,ki as Ee,kn as De,kt as Oe,l as ke,li as Ae,lt as je,ma as Me,mt as Ne,n as Pe,ni as Fe,p as Ie,pt as Le,q as Re,qr as ze,r as Be,ri as Ve,rt as He,s as Ue,sn as We,st as Ge,t as Ke,tt as qe,ui as Je,ut as Ye,vt as Xe,wi as Ze,wr as Qe,x as $e,xn as et,y as tt,yi as nt,zr as rt,zt as it}from"../register-ts-hook-CQ7shKO5.mjs";import{mt as at}from"../application-DIsQSnj3.mjs";import{t as ot}from"../type-source--ZNcV8RJ.mjs";import{arg as st,defineCommand as ct,runCommand as lt,runMain as ut}from"@politty/zod";await Ke(new URL(`./ts-hook.mjs`,import.meta.url));export{_ as DB_PGLITE_SCHEMA_FILE_NAME,C as DB_TYPES_FILE_NAME,k as DIFF_FILE_NAME,W as INITIAL_SCHEMA_NUMBER,rt as MIGRATE_FILE_NAME,c as MIGRATE_PGLITE_TEST_FILE_NAME,Z as MIGRATE_TEST_FILE_NAME,n as MIGRATION_LABEL_KEY,ne as SCHEMA_FILE_NAME,J as TAILOR_LOCK_FILENAME,h as TAILOR_LOCK_VERSION,et as WORKSPACE_NAME_MAX_LENGTH,Pe as annotateTerminalError,G as apiCall,p as appIdLockKey,r as apply,r as deploy,st as arg,d as assertWritable,ge as bundleMigrationScript,le as bundleSeedDumpScript,H as bundleSeedScript,E as chunkSeedData,Fe as compareLocalTypesWithSnapshot,Ve as compareSnapshots,ce as configArg,V as confirmationArgs,t as createCommonArgs,de as createFolder,Te as createSnapshotFromLocalTypes,We as createWorkspace,w as defineAppCommand,ct as defineCommand,He as deleteFolder,tt as deleteWorkspace,S as deployStaticWebsite,he as deploymentArgs,P as ensureConfigId,ye as errorToJson,$ as executeScript,Xe as extractOwnedNamespaces,L as findAppIdLock,pe as formatDiffSummary,Ae as formatMigrationDiff,Ne as generate,z as generateUserTypes,u as getAppHealth,b as getExecutor,Oe as getExecutorJob,o as getExecutorWaitFailureMessage,qe as getFolder,q as getFunctionRegistry,D as getLatestMigrationNumber,Ye as getMachineUserToken,ze as getMigrationDirPath,T as getMigrationFilePath,oe as getMigrationFiles,Qe as getNamespacesWithMigrations,re as getNextMigrationNumber,je as getOAuth2Client,ae as getOrganization,A as getWorkflow,it as getWorkflowExecution,ue as getWorkspace,Je as hasChanges,at as initOperatorClient,Ie as inviteUser,ot as isPluginGeneratedTable,$e as listApps,M as listExecutorJobs,R as listExecutors,e as listFolders,fe as listFunctionRegistries,Le as listMachineUsers,Ge as listOAuth2Clients,Re as listOrganizations,me as listUsers,f as listWebhookExecutors,l as listWorkflowExecutions,i as listWorkflows,Se as listWorkspaces,Ee as loadAccessToken,Ze as loadConfig,xe as loadEnvFiles,X as loadSeedContext,y as loadTailorDBNamespaces,x as loadWorkspaceId,O as logBetaWarning,te as logger,N as migrateGenerate,Q as organizationTree,De as parseAppIds,a as planAppIds,nt as prompt,be as query,B as reconstructSnapshotFromMigrations,s as remove,we as removeAdoptedConfigIds,ke as removeUser,j as resolveAppId,ve as restoreWorkspace,I as resumeWorkflow,lt as runCommand,ut as runMain,_e as serializeError,U as show,v as startWorkflow,ee as styles,g as triggerExecutor,Ce as truncate,se as updateFolder,Y as updateOrganization,Ue as updateUser,ie as waitForExecution,m as waitWorkflowExecution,F as watchExecutorJob,Be as withSourceLocation,Me as workspaceArgs,K as workspaceNameSchema};
1
+ import{p as ee,v as te}from"../errors-Dmdnq0zi.mjs";import{$ as e,A as t,An as n,At as r,B as i,Bt as a,C as o,Ct as s,Dn as c,E as l,En as u,Et as d,Fi as f,Ft as p,Gt as m,Hr as h,Ht as g,Ii as _,In as v,Ji as y,Jr as b,Jt as x,Kr as S,L as C,Lt as w,Mn as T,Mr as E,Mt as D,N as O,Nn as k,Nt as A,O as j,Oa as M,On as N,Ot as P,Pi as F,Pn as I,Qr as L,Qt as R,R as z,Si as B,Sn as V,St as H,Tn as U,U as W,Ut as G,Vi as K,W as q,Xr as J,Xt as Y,Y as X,Yr as Z,Yt as Q,Z as ne,Zr as re,Zt as ie,_ as ae,_a as oe,ai as $,at as se,bi as ce,bt as le,d as ue,da as de,fa as fe,gt as pe,h as me,ht as he,i as ge,ii as _e,ir as ve,j as ye,ji as be,jn as xe,kn as Se,kt as Ce,l as we,lt as Te,mi as Ee,mt as De,n as Oe,oa as ke,oi as Ae,on as je,p as Me,pa as Ne,pi as Pe,pt as Fe,q as Ie,qr as Le,qt as Re,r as ze,ri as Be,rn as Ve,rt as He,s as Ue,si as We,st as Ge,t as Ke,ti as qe,tt as Je,ua as Ye,ui as Xe,ut as Ze,vt as Qe,x as $e,xi as et,xn as tt,y as nt,zr as rt,zt as it}from"../register-ts-hook-Ht4zCseV.mjs";import{mt as at}from"../application-Cida-j1g.mjs";import{t as ot}from"../type-source--ZNcV8RJ.mjs";import{arg as st,defineCommand as ct,runCommand as lt,runMain as ut}from"@politty/zod";await Ke(new URL(`./ts-hook.mjs`,import.meta.url));export{S as DB_PGLITE_SCHEMA_FILE_NAME,Le as DB_TYPES_FILE_NAME,b as DIFF_FILE_NAME,Z as INITIAL_SCHEMA_NUMBER,J as MIGRATE_FILE_NAME,re as MIGRATE_PGLITE_TEST_FILE_NAME,L as MIGRATE_TEST_FILE_NAME,Xe as MIGRATION_LABEL_KEY,qe as SCHEMA_FILE_NAME,U as TAILOR_LOCK_FILENAME,u as TAILOR_LOCK_VERSION,tt as WORKSPACE_NAME_MAX_LENGTH,Oe as annotateTerminalError,F as apiCall,c as appIdLockKey,R as apply,R as deploy,st as arg,f as assertWritable,ve as bundleMigrationScript,Y as bundleSeedDumpScript,ie as bundleSeedScript,Re as chunkSeedData,Pe as compareLocalTypesWithSnapshot,Ee as compareSnapshots,Ye as configArg,de as confirmationArgs,fe as createCommonArgs,se as createFolder,rt as createSnapshotFromLocalTypes,je as createWorkspace,ke as defineAppCommand,ct as defineCommand,He as deleteFolder,nt as deleteWorkspace,v as deployStaticWebsite,Ne as deploymentArgs,k as ensureConfigId,he as errorToJson,x as executeScript,Qe as extractOwnedNamespaces,N as findAppIdLock,ce as formatDiffSummary,et as formatMigrationDiff,De as generate,I as generateUserTypes,o as getAppHealth,g as getExecutor,Ce as getExecutorJob,r as getExecutorWaitFailureMessage,Je as getFolder,H as getFunctionRegistry,Be as getLatestMigrationNumber,Ze as getMachineUserToken,_e as getMigrationDirPath,$ as getMigrationFilePath,Ae as getMigrationFiles,E as getNamespacesWithMigrations,We as getNextMigrationNumber,Te as getOAuth2Client,X as getOrganization,w as getWorkflow,it as getWorkflowExecution,ae as getWorkspace,B as hasChanges,at as initOperatorClient,Me as inviteUser,ot as isPluginGeneratedTable,$e as listApps,D as listExecutorJobs,P as listExecutors,e as listFolders,le as listFunctionRegistries,Fe as listMachineUsers,Ge as listOAuth2Clients,Ie as listOrganizations,ue as listUsers,s as listWebhookExecutors,a as listWorkflowExecutions,t as listWorkflows,Ve as listWorkspaces,K as loadAccessToken,_ as loadConfig,oe as loadEnvFiles,G as loadSeedContext,m as loadTailorDBNamespaces,y as loadWorkspaceId,C as logBetaWarning,ee as logger,O as migrateGenerate,q as organizationTree,Se as parseAppIds,n as planAppIds,be as prompt,ge as query,h as reconstructSnapshotFromMigrations,i as remove,xe as removeAdoptedConfigIds,we as removeUser,T as resolveAppId,me as restoreWorkspace,j as resumeWorkflow,lt as runCommand,ut as runMain,pe as serializeError,z as show,p as startWorkflow,te as styles,d as triggerExecutor,ye as truncate,ne as updateFolder,W as updateOrganization,Ue as updateUser,Q as waitForExecution,l as waitWorkflowExecution,A as watchExecutorJob,ze as withSourceLocation,M as workspaceArgs,V as workspaceNameSchema};
2
2
  //# sourceMappingURL=lib.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"lib.mjs","names":["styles","logger","listFolders","createCommonArgs","MIGRATION_LABEL_KEY","deploy","listWorkflows","planAppIds","getExecutorWaitFailureMessage","remove","MIGRATE_PGLITE_TEST_FILE_NAME","listWorkflowExecutions","getAppHealth","assertWritable","listWebhookExecutors","appIdLockKey","waitWorkflowExecution","TAILOR_LOCK_VERSION","triggerExecutor","DB_PGLITE_SCHEMA_FILE_NAME","startWorkflow","loadTailorDBNamespaces","getExecutor","loadWorkspaceId","deployStaticWebsite","DB_TYPES_FILE_NAME","defineAppCommand","getMigrationFilePath","chunkSeedData","getLatestMigrationNumber","logBetaWarning","DIFF_FILE_NAME","getWorkflow","resolveAppId","listExecutorJobs","ensureConfigId","watchExecutorJob","resumeWorkflow","findAppIdLock","listExecutors","generateUserTypes","reconstructSnapshotFromMigrations","confirmationArgs","bundleSeedScript","show","INITIAL_SCHEMA_NUMBER","apiCall","workspaceNameSchema","getFunctionRegistry","TAILOR_LOCK_FILENAME","updateOrganization","loadSeedContext","MIGRATE_TEST_FILE_NAME","organizationTree","SCHEMA_FILE_NAME","getNextMigrationNumber","waitForExecution","getOrganization","getMigrationFiles","executeScript","updateFolder","configArg","bundleSeedDumpScript","getWorkspace","createFolder","listFunctionRegistries","formatDiffSummary","listUsers","deploymentArgs","bundleMigrationScript","serializeError","restoreWorkspace","errorToJson","query","loadEnvFiles","listWorkspaces","truncate","removeAdoptedConfigIds","createSnapshotFromLocalTypes","loadAccessToken","parseAppIds","getExecutorJob","removeUser","formatMigrationDiff","getOAuth2Client","workspaceArgs","generate","annotateTerminalError","compareLocalTypesWithSnapshot","inviteUser","listMachineUsers","listOrganizations","getMigrationDirPath","withSourceLocation","compareSnapshots","deleteFolder","updateUser","createWorkspace","listOAuth2Clients","registerTsHook","getFolder","hasChanges","getMachineUserToken","extractOwnedNamespaces","loadConfig","getNamespacesWithMigrations","listApps","WORKSPACE_NAME_MAX_LENGTH","deleteWorkspace","prompt","MIGRATE_FILE_NAME","getWorkflowExecution","initOperatorClient","isPluginGeneratedTable","arg","defineCommand","generate$1","runCommand","runMain"],"sources":["../../src/cli/lib.ts"],"sourcesContent":["// CLI API exports for programmatic usage\nimport { registerTsHook } from \"./shared/register-ts-hook\";\n\nawait registerTsHook(new URL(\"./ts-hook.mjs\", import.meta.url));\n\n// CLI foundation shared with plugins. Plugins resolve this package at runtime,\n// so logger state (--json / --verbose) set through these args reaches the SDK\n// code paths they call into. The @politty/zod surface is re-exported for the\n// same reason: arg metadata (aliases, env bindings, effects) lives in a\n// @politty/zod module-level registry, so registration and parsing must use\n// one @politty/zod copy.\nexport { arg, defineCommand, runCommand, runMain } from \"@politty/zod\";\nexport { logger, styles, type LogMode, type LogOptions, type OutOptions } from \"./shared/logger\";\nexport { defineAppCommand } from \"./shared/command\";\nexport { logBetaWarning } from \"./shared/beta\";\nexport { prompt } from \"./shared/prompt\";\nexport { WORKSPACE_NAME_MAX_LENGTH, workspaceNameSchema } from \"./shared/workspace-name\";\nexport {\n createCommonArgs,\n workspaceArgs,\n configArg,\n confirmationArgs,\n deploymentArgs,\n loadEnvFiles,\n type CommonArgsType,\n} from \"./shared/args\";\nexport { deploy, deploy as apply } from \"./commands/deploy/deploy\";\nexport type { DeployOptions, DeployOptions as ApplyOptions } from \"./commands/deploy/deploy\";\nexport type { BundledScripts } from \"./commands/deploy/function-registry\";\nexport { ensureConfigId } from \"./commands/deploy/config-id-injector\";\nexport {\n TAILOR_LOCK_FILENAME,\n TAILOR_LOCK_VERSION,\n appIdLockKey,\n findAppIdLock,\n parseAppIds,\n planAppIds,\n removeAdoptedConfigIds,\n resolveAppId,\n type AppIdEntry,\n type AppIdEntryInput,\n type AppIdLock,\n type AppIdPlan,\n type AppIdPlanMode,\n type AppIds,\n type PlanAppIdsParams,\n type RemoveAdoptedConfigIdsResult,\n type ResolveAppIdParams,\n} from \"./commands/deploy/app-id-lock\";\nexport { generate } from \"./commands/generate/service\";\nexport type { GenerateOptions } from \"./commands/generate/options\";\nexport { loadConfig, type LoadedConfig } from \"./shared/config-loader\";\nexport { extractOwnedNamespaces } from \"./shared/config\";\nexport { errorToJson, serializeError, type ErrorToJsonOptions } from \"./shared/error-json\";\nexport { annotateTerminalError, withSourceLocation } from \"./shared/github-actions\";\nexport type { ErrorSourceLocation } from \"./shared/error-diagnostics\";\nexport { generateUserTypes } from \"./shared/type-generator\";\nexport {\n loadTailorDBNamespaces,\n type TailorDBNamespaceSelector,\n type LoadTailorDBNamespacesOptions,\n type LoadedTailorDBNamespaces,\n} from \"./shared/tailordb-namespaces\";\nexport {\n deployStaticWebsite,\n type DeployResult as StaticWebsiteDeployResult,\n} from \"./commands/staticwebsite/deploy\";\nexport { assertWritable } from \"./shared/readonly-guard\";\nexport { isPluginGeneratedTable } from \"#/parser/service/tailordb/type-source\";\nexport type {\n GeneratorResult,\n Plugin,\n PluginAttachment,\n TailorDBNamespaceData,\n} from \"#/plugin/types\";\nexport type {\n TailorDBType,\n TypeSourceInfoEntry,\n ParsedField,\n OperatorFieldConfig,\n PluginGeneratedTableSource,\n} from \"#/parser/service/tailordb/types\";\nexport type { Resolver } from \"#/types/resolver.generated\";\nexport type { Executor } from \"#/types/executor.generated\";\n\nexport {\n show,\n type ShowOptions,\n type ApplicationInfo,\n type ShowInfo,\n type AIGatewayInfo,\n type ShowStaticWebsiteInfo,\n type ShowOAuth2ClientInfo,\n} from \"./commands/show\";\nexport { remove, type RemoveOptions } from \"./commands/remove\";\nexport { createWorkspace, type CreateWorkspaceOptions } from \"./commands/workspace/create\";\nexport { listWorkspaces, type ListWorkspacesOptions } from \"./commands/workspace/list\";\nexport { deleteWorkspace, type DeleteWorkspaceOptions } from \"./commands/workspace/delete\";\nexport { getWorkspace, type GetWorkspaceOptions } from \"./commands/workspace/get\";\nexport { restoreWorkspace, type RestoreWorkspaceOptions } from \"./commands/workspace/restore\";\nexport type { WorkspaceInfo, WorkspaceDetails } from \"./commands/workspace/transform\";\nexport { listUsers, type ListUsersOptions } from \"./commands/workspace/user/list\";\nexport { inviteUser, type InviteUserOptions } from \"./commands/workspace/user/invite\";\nexport { updateUser, type UpdateUserOptions } from \"./commands/workspace/user/update\";\nexport { removeUser, type RemoveUserOptions } from \"./commands/workspace/user/remove\";\nexport type { UserInfo } from \"./commands/workspace/user/transform\";\nexport { listApps, type ListAppsOptions } from \"./commands/workspace/app/list\";\nexport {\n getAppHealth,\n type HealthOptions as GetAppHealthOptions,\n} from \"./commands/workspace/app/health\";\nexport type { AppInfo, AppHealthInfo } from \"./commands/workspace/app/transform\";\nexport { getFunctionRegistry, type GetFunctionRegistryOptions } from \"./commands/function/get\";\nexport {\n listFunctionRegistries,\n type ListFunctionRegistriesOptions,\n} from \"./commands/function/list\";\nexport type { FunctionRegistryInfo } from \"./commands/function/transform\";\nexport {\n listMachineUsers,\n type ListMachineUsersOptions,\n type MachineUserInfo,\n} from \"./commands/machineuser/list\";\nexport {\n getMachineUserToken,\n type GetMachineUserTokenOptions,\n type MachineUserTokenInfo,\n} from \"./commands/machineuser/token\";\nexport { getOAuth2Client, type GetOAuth2ClientOptions } from \"./commands/oauth2client/get\";\nexport { listOAuth2Clients, type ListOAuth2ClientsOptions } from \"./commands/oauth2client/list\";\nexport type { OAuth2ClientInfo, OAuth2ClientCredentials } from \"./commands/oauth2client/transform\";\nexport { listWorkflows, type ListWorkflowsOptions } from \"./commands/workflow/list\";\nexport { getWorkflow, type GetWorkflowTypedOptions } from \"./commands/workflow/get\";\nexport type { MachineUserName } from \"@tailor-platform/sdk\";\nexport {\n startWorkflow,\n type StartWorkflowTypedOptions,\n type StartWorkflowResultWithWait,\n type WaitOptions,\n} from \"./commands/workflow/start\";\nexport {\n listWorkflowExecutions,\n getWorkflowExecution,\n type ListWorkflowExecutionsTypedOptions,\n type GetWorkflowExecutionOptions,\n type GetWorkflowExecutionResult,\n type WorkflowExecutionWaitInfo,\n} from \"./commands/workflow/executions\";\nexport { waitWorkflowExecution, type WorkflowWaitOutput } from \"./commands/workflow/wait\";\nexport type { WaitWorkflowExecutionOptions, WorkflowWaitResult } from \"./commands/workflow/waiter\";\nexport {\n resumeWorkflow,\n type ResumeWorkflowOptions,\n type ResumeWorkflowResultWithWait,\n} from \"./commands/workflow/resume\";\nexport type {\n WorkflowListInfo,\n WorkflowInfo,\n WorkflowExecutionInfo,\n WorkflowJobExecutionInfo,\n} from \"./commands/workflow/transform\";\nexport type { FunctionLogEntryInfo } from \"./shared/function-execution\";\nexport {\n triggerExecutor,\n type TriggerExecutorTypedOptions,\n type TriggerExecutorResult,\n} from \"./commands/executor/trigger\";\nexport {\n listExecutorJobs,\n getExecutorJob,\n getExecutorWaitFailureMessage,\n watchExecutorJob,\n type ListExecutorJobsTypedOptions,\n type GetExecutorJobTypedOptions,\n type WatchExecutorJobTypedOptions,\n type ExecutorJobDetailInfo,\n type WatchExecutorJobResult,\n} from \"./commands/executor/jobs\";\nexport { listExecutors, type ListExecutorsOptions } from \"./commands/executor/list\";\nexport { getExecutor, type GetExecutorTypedOptions } from \"./commands/executor/get\";\nexport {\n listWebhookExecutors,\n type ListWebhookExecutorsOptions,\n type WebhookExecutorInfo,\n} from \"./commands/executor/webhook\";\nexport type {\n ExecutorJobListInfo,\n ExecutorJobInfo,\n ExecutorJobAttemptInfo,\n ExecutorListInfo,\n ExecutorInfo,\n} from \"./commands/executor/transform\";\nexport { listOrganizations, type ListOrganizationsOptions } from \"./commands/organization/list\";\nexport { getOrganization, type GetOrganizationOptions } from \"./commands/organization/get\";\nexport { updateOrganization, type UpdateOrganizationOptions } from \"./commands/organization/update\";\nexport { organizationTree, type OrganizationTreeOptions } from \"./commands/organization/tree\";\nexport type {\n UserOrganizationInfo,\n OrganizationInfo,\n FolderListInfo,\n FolderInfo,\n} from \"./commands/organization/transform\";\nexport { listFolders, type ListFoldersOptions } from \"./commands/organization/folder/list\";\nexport { getFolder, type GetFolderOptions } from \"./commands/organization/folder/get\";\nexport { createFolder, type CreateFolderOptions } from \"./commands/organization/folder/create\";\nexport { updateFolder, type UpdateFolderOptions } from \"./commands/organization/folder/update\";\nexport { deleteFolder, type DeleteFolderOptions } from \"./commands/organization/folder/delete\";\nexport { loadAccessToken, loadWorkspaceId } from \"./shared/context\";\nexport { apiCall, type ApiCallOptions, type ApiCallResult } from \"./commands/api\";\nexport { query } from \"./query\";\nexport { truncate, type TruncateOptions } from \"./commands/tailordb/truncate\";\n\n// Migration exports\nexport {\n generate as migrateGenerate,\n type GenerateOptions as MigrateGenerateOptions,\n} from \"./commands/tailordb/migrate/generate\";\nexport {\n createSnapshotFromLocalTypes,\n reconstructSnapshotFromMigrations,\n compareSnapshots,\n getNextMigrationNumber,\n getLatestMigrationNumber,\n getMigrationFiles,\n compareLocalTypesWithSnapshot,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport {\n getNamespacesWithMigrations,\n type NamespaceWithMigrations,\n} from \"./commands/tailordb/migrate/config\";\nexport {\n hasChanges,\n formatMigrationDiff,\n formatDiffSummary,\n type MigrationDiff,\n type BreakingChangeInfo,\n} from \"./commands/tailordb/migrate/diff-calculator\";\nexport {\n SCHEMA_FILE_NAME,\n DIFF_FILE_NAME,\n MIGRATE_FILE_NAME,\n MIGRATE_TEST_FILE_NAME,\n MIGRATE_PGLITE_TEST_FILE_NAME,\n DB_TYPES_FILE_NAME,\n DB_PGLITE_SCHEMA_FILE_NAME,\n INITIAL_SCHEMA_NUMBER,\n getMigrationDirPath,\n getMigrationFilePath,\n type SchemaSnapshot,\n type NormalizedSchemaSnapshot,\n type TailorDBSnapshotType,\n type SnapshotFieldConfig,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport { MIGRATION_LABEL_KEY } from \"./commands/tailordb/migrate/types\";\n\n// Seed exports\nexport {\n loadSeedContext,\n type LoadSeedContextOptions,\n type SeedContext,\n type SeedIdpUserContext,\n type SeedNamespaceConfig,\n} from \"./shared/seed-context\";\nexport {\n chunkSeedData,\n type SeedChunk,\n type ChunkSeedDataOptions,\n type SeedData,\n} from \"./shared/seed-chunker\";\nexport {\n bundleSeedScript,\n bundleSeedDumpScript,\n type SeedBundleResult,\n type SeedDumpBundleResult,\n} from \"./commands/generate/seed/bundler\";\nexport {\n bundleMigrationScript,\n type MigrationBundleResult,\n} from \"./commands/tailordb/migrate/bundler\";\nexport {\n executeScript,\n waitForExecution,\n type ScriptExecutionOptions,\n type ScriptExecutionResult,\n type ScriptInvoker,\n type ExecutionWaitResult,\n} from \"./shared/script-executor\";\nexport { initOperatorClient, type OperatorClient } from \"./shared/client\";\nexport type { AuthInvoker } from \"@tailor-platform/tailor-proto/auth_resource_pb\";\n"],"mappings":"A,6qCAGA,MAAMmG,GAAe,IAAI,IAAI,gBAAiB,YAAY,GAAG,CAAC,E"}
1
+ {"version":3,"file":"lib.mjs","names":["logger","styles","listFolders","listWorkflows","planAppIds","getExecutorWaitFailureMessage","remove","listWorkflowExecutions","getAppHealth","listWebhookExecutors","appIdLockKey","waitWorkflowExecution","TAILOR_LOCK_VERSION","triggerExecutor","assertWritable","startWorkflow","loadTailorDBNamespaces","reconstructSnapshotFromMigrations","getExecutor","loadConfig","deployStaticWebsite","loadWorkspaceId","DIFF_FILE_NAME","executeScript","DB_PGLITE_SCHEMA_FILE_NAME","logBetaWarning","getWorkflow","resolveAppId","getNamespacesWithMigrations","listExecutorJobs","generate$1","ensureConfigId","watchExecutorJob","resumeWorkflow","workspaceArgs","findAppIdLock","listExecutors","apiCall","generateUserTypes","MIGRATE_TEST_FILE_NAME","deploy","show","hasChanges","workspaceNameSchema","getFunctionRegistry","TAILOR_LOCK_FILENAME","updateOrganization","loadSeedContext","loadAccessToken","organizationTree","MIGRATE_FILE_NAME","bundleSeedDumpScript","getOrganization","INITIAL_SCHEMA_NUMBER","waitForExecution","updateFolder","MIGRATE_PGLITE_TEST_FILE_NAME","bundleSeedScript","getWorkspace","loadEnvFiles","getMigrationFilePath","createFolder","formatDiffSummary","listFunctionRegistries","listUsers","confirmationArgs","createCommonArgs","serializeError","restoreWorkspace","errorToJson","query","getMigrationDirPath","bundleMigrationScript","truncate","prompt","removeAdoptedConfigIds","parseAppIds","getExecutorJob","removeUser","getOAuth2Client","compareSnapshots","generate","annotateTerminalError","defineAppCommand","getMigrationFiles","createWorkspace","inviteUser","deploymentArgs","compareLocalTypesWithSnapshot","listMachineUsers","listOrganizations","DB_TYPES_FILE_NAME","chunkSeedData","withSourceLocation","getLatestMigrationNumber","listWorkspaces","deleteFolder","updateUser","getNextMigrationNumber","listOAuth2Clients","registerTsHook","SCHEMA_FILE_NAME","getFolder","configArg","MIGRATION_LABEL_KEY","getMachineUserToken","extractOwnedNamespaces","listApps","formatMigrationDiff","WORKSPACE_NAME_MAX_LENGTH","deleteWorkspace","createSnapshotFromLocalTypes","getWorkflowExecution","initOperatorClient","isPluginGeneratedTable","arg","defineCommand","runCommand","runMain"],"sources":["../../src/cli/lib.ts"],"sourcesContent":["// CLI API exports for programmatic usage\nimport { registerTsHook } from \"./shared/register-ts-hook\";\n\nawait registerTsHook(new URL(\"./ts-hook.mjs\", import.meta.url));\n\n// CLI foundation shared with plugins. Plugins resolve this package at runtime,\n// so logger state (--json / --verbose) set through these args reaches the SDK\n// code paths they call into. The @politty/zod surface is re-exported for the\n// same reason: arg metadata (aliases, env bindings, effects) lives in a\n// @politty/zod module-level registry, so registration and parsing must use\n// one @politty/zod copy.\nexport { arg, defineCommand, runCommand, runMain } from \"@politty/zod\";\nexport { logger, styles, type LogMode, type LogOptions, type OutOptions } from \"./shared/logger\";\nexport { defineAppCommand } from \"./shared/command\";\nexport { logBetaWarning } from \"./shared/beta\";\nexport { prompt } from \"./shared/prompt\";\nexport { WORKSPACE_NAME_MAX_LENGTH, workspaceNameSchema } from \"./shared/workspace-name\";\nexport {\n createCommonArgs,\n workspaceArgs,\n configArg,\n confirmationArgs,\n deploymentArgs,\n loadEnvFiles,\n type CommonArgsType,\n} from \"./shared/args\";\nexport { deploy, deploy as apply } from \"./commands/deploy/deploy\";\nexport type { DeployOptions, DeployOptions as ApplyOptions } from \"./commands/deploy/deploy\";\nexport type { BundledScripts } from \"./commands/deploy/function-registry\";\nexport { ensureConfigId } from \"./commands/deploy/config-id-injector\";\nexport {\n TAILOR_LOCK_FILENAME,\n TAILOR_LOCK_VERSION,\n appIdLockKey,\n findAppIdLock,\n parseAppIds,\n planAppIds,\n removeAdoptedConfigIds,\n resolveAppId,\n type AppIdEntry,\n type AppIdEntryInput,\n type AppIdLock,\n type AppIdPlan,\n type AppIdPlanMode,\n type AppIds,\n type PlanAppIdsParams,\n type RemoveAdoptedConfigIdsResult,\n type ResolveAppIdParams,\n} from \"./commands/deploy/app-id-lock\";\nexport { generate } from \"./commands/generate/service\";\nexport type { GenerateOptions } from \"./commands/generate/options\";\nexport { loadConfig, type LoadedConfig } from \"./shared/config-loader\";\nexport { extractOwnedNamespaces } from \"./shared/config\";\nexport { errorToJson, serializeError, type ErrorToJsonOptions } from \"./shared/error-json\";\nexport { annotateTerminalError, withSourceLocation } from \"./shared/github-actions\";\nexport type { ErrorSourceLocation } from \"./shared/error-diagnostics\";\nexport { generateUserTypes } from \"./shared/type-generator\";\nexport {\n loadTailorDBNamespaces,\n type TailorDBNamespaceSelector,\n type LoadTailorDBNamespacesOptions,\n type LoadedTailorDBNamespaces,\n} from \"./shared/tailordb-namespaces\";\nexport {\n deployStaticWebsite,\n type DeployResult as StaticWebsiteDeployResult,\n} from \"./commands/staticwebsite/deploy\";\nexport { assertWritable } from \"./shared/readonly-guard\";\nexport { isPluginGeneratedTable } from \"#/parser/service/tailordb/type-source\";\nexport type {\n GeneratorResult,\n Plugin,\n PluginAttachment,\n TailorDBNamespaceData,\n} from \"#/plugin/types\";\nexport type {\n TailorDBType,\n TypeSourceInfoEntry,\n ParsedField,\n OperatorFieldConfig,\n PluginGeneratedTableSource,\n} from \"#/parser/service/tailordb/types\";\nexport type { Resolver } from \"#/types/resolver.generated\";\nexport type { Executor } from \"#/types/executor.generated\";\n\nexport {\n show,\n type ShowOptions,\n type ApplicationInfo,\n type ShowInfo,\n type AIGatewayInfo,\n type ShowStaticWebsiteInfo,\n type ShowOAuth2ClientInfo,\n} from \"./commands/show\";\nexport { remove, type RemoveOptions } from \"./commands/remove\";\nexport { createWorkspace, type CreateWorkspaceOptions } from \"./commands/workspace/create\";\nexport { listWorkspaces, type ListWorkspacesOptions } from \"./commands/workspace/list\";\nexport { deleteWorkspace, type DeleteWorkspaceOptions } from \"./commands/workspace/delete\";\nexport { getWorkspace, type GetWorkspaceOptions } from \"./commands/workspace/get\";\nexport { restoreWorkspace, type RestoreWorkspaceOptions } from \"./commands/workspace/restore\";\nexport type { WorkspaceInfo, WorkspaceDetails } from \"./commands/workspace/transform\";\nexport { listUsers, type ListUsersOptions } from \"./commands/workspace/user/list\";\nexport { inviteUser, type InviteUserOptions } from \"./commands/workspace/user/invite\";\nexport { updateUser, type UpdateUserOptions } from \"./commands/workspace/user/update\";\nexport { removeUser, type RemoveUserOptions } from \"./commands/workspace/user/remove\";\nexport type { UserInfo } from \"./commands/workspace/user/transform\";\nexport { listApps, type ListAppsOptions } from \"./commands/workspace/app/list\";\nexport {\n getAppHealth,\n type HealthOptions as GetAppHealthOptions,\n} from \"./commands/workspace/app/health\";\nexport type { AppInfo, AppHealthInfo } from \"./commands/workspace/app/transform\";\nexport { getFunctionRegistry, type GetFunctionRegistryOptions } from \"./commands/function/get\";\nexport {\n listFunctionRegistries,\n type ListFunctionRegistriesOptions,\n} from \"./commands/function/list\";\nexport type { FunctionRegistryInfo } from \"./commands/function/transform\";\nexport {\n listMachineUsers,\n type ListMachineUsersOptions,\n type MachineUserInfo,\n} from \"./commands/machineuser/list\";\nexport {\n getMachineUserToken,\n type GetMachineUserTokenOptions,\n type MachineUserTokenInfo,\n} from \"./commands/machineuser/token\";\nexport { getOAuth2Client, type GetOAuth2ClientOptions } from \"./commands/oauth2client/get\";\nexport { listOAuth2Clients, type ListOAuth2ClientsOptions } from \"./commands/oauth2client/list\";\nexport type { OAuth2ClientInfo, OAuth2ClientCredentials } from \"./commands/oauth2client/transform\";\nexport { listWorkflows, type ListWorkflowsOptions } from \"./commands/workflow/list\";\nexport { getWorkflow, type GetWorkflowTypedOptions } from \"./commands/workflow/get\";\nexport type { MachineUserName } from \"@tailor-platform/sdk\";\nexport {\n startWorkflow,\n type StartWorkflowTypedOptions,\n type StartWorkflowResultWithWait,\n type WaitOptions,\n} from \"./commands/workflow/start\";\nexport {\n listWorkflowExecutions,\n getWorkflowExecution,\n type ListWorkflowExecutionsTypedOptions,\n type GetWorkflowExecutionOptions,\n type GetWorkflowExecutionResult,\n type WorkflowExecutionWaitInfo,\n} from \"./commands/workflow/executions\";\nexport { waitWorkflowExecution, type WorkflowWaitOutput } from \"./commands/workflow/wait\";\nexport type { WaitWorkflowExecutionOptions, WorkflowWaitResult } from \"./commands/workflow/waiter\";\nexport {\n resumeWorkflow,\n type ResumeWorkflowOptions,\n type ResumeWorkflowResultWithWait,\n} from \"./commands/workflow/resume\";\nexport type {\n WorkflowListInfo,\n WorkflowInfo,\n WorkflowExecutionInfo,\n WorkflowJobExecutionInfo,\n} from \"./commands/workflow/transform\";\nexport type { FunctionLogEntryInfo } from \"./shared/function-execution\";\nexport {\n triggerExecutor,\n type TriggerExecutorTypedOptions,\n type TriggerExecutorResult,\n} from \"./commands/executor/trigger\";\nexport {\n listExecutorJobs,\n getExecutorJob,\n getExecutorWaitFailureMessage,\n watchExecutorJob,\n type ListExecutorJobsTypedOptions,\n type GetExecutorJobTypedOptions,\n type WatchExecutorJobTypedOptions,\n type ExecutorJobDetailInfo,\n type WatchExecutorJobResult,\n} from \"./commands/executor/jobs\";\nexport { listExecutors, type ListExecutorsOptions } from \"./commands/executor/list\";\nexport { getExecutor, type GetExecutorTypedOptions } from \"./commands/executor/get\";\nexport {\n listWebhookExecutors,\n type ListWebhookExecutorsOptions,\n type WebhookExecutorInfo,\n} from \"./commands/executor/webhook\";\nexport type {\n ExecutorJobListInfo,\n ExecutorJobInfo,\n ExecutorJobAttemptInfo,\n ExecutorListInfo,\n ExecutorInfo,\n} from \"./commands/executor/transform\";\nexport { listOrganizations, type ListOrganizationsOptions } from \"./commands/organization/list\";\nexport { getOrganization, type GetOrganizationOptions } from \"./commands/organization/get\";\nexport { updateOrganization, type UpdateOrganizationOptions } from \"./commands/organization/update\";\nexport { organizationTree, type OrganizationTreeOptions } from \"./commands/organization/tree\";\nexport type {\n UserOrganizationInfo,\n OrganizationInfo,\n FolderListInfo,\n FolderInfo,\n} from \"./commands/organization/transform\";\nexport { listFolders, type ListFoldersOptions } from \"./commands/organization/folder/list\";\nexport { getFolder, type GetFolderOptions } from \"./commands/organization/folder/get\";\nexport { createFolder, type CreateFolderOptions } from \"./commands/organization/folder/create\";\nexport { updateFolder, type UpdateFolderOptions } from \"./commands/organization/folder/update\";\nexport { deleteFolder, type DeleteFolderOptions } from \"./commands/organization/folder/delete\";\nexport { loadAccessToken, loadWorkspaceId } from \"./shared/context\";\nexport { apiCall, type ApiCallOptions, type ApiCallResult } from \"./commands/api\";\nexport { query } from \"./query\";\nexport { truncate, type TruncateOptions } from \"./commands/tailordb/truncate\";\n\n// Migration exports\nexport {\n generate as migrateGenerate,\n type GenerateOptions as MigrateGenerateOptions,\n type GenerateResult as MigrateGenerateResult,\n} from \"./commands/tailordb/migrate/generate\";\nexport {\n createSnapshotFromLocalTypes,\n reconstructSnapshotFromMigrations,\n compareSnapshots,\n getNextMigrationNumber,\n getLatestMigrationNumber,\n getMigrationFiles,\n compareLocalTypesWithSnapshot,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport {\n getNamespacesWithMigrations,\n type NamespaceWithMigrations,\n} from \"./commands/tailordb/migrate/config\";\nexport {\n hasChanges,\n formatMigrationDiff,\n formatDiffSummary,\n type MigrationDiff,\n type BreakingChangeInfo,\n} from \"./commands/tailordb/migrate/diff-calculator\";\nexport {\n SCHEMA_FILE_NAME,\n DIFF_FILE_NAME,\n MIGRATE_FILE_NAME,\n MIGRATE_TEST_FILE_NAME,\n MIGRATE_PGLITE_TEST_FILE_NAME,\n DB_TYPES_FILE_NAME,\n DB_PGLITE_SCHEMA_FILE_NAME,\n INITIAL_SCHEMA_NUMBER,\n getMigrationDirPath,\n getMigrationFilePath,\n type SchemaSnapshot,\n type NormalizedSchemaSnapshot,\n type TailorDBSnapshotType,\n type SnapshotFieldConfig,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport { MIGRATION_LABEL_KEY } from \"./commands/tailordb/migrate/types\";\n\n// Seed exports\nexport {\n loadSeedContext,\n type LoadSeedContextOptions,\n type SeedContext,\n type SeedIdpUserContext,\n type SeedNamespaceConfig,\n} from \"./shared/seed-context\";\nexport {\n chunkSeedData,\n type SeedChunk,\n type ChunkSeedDataOptions,\n type SeedData,\n} from \"./shared/seed-chunker\";\nexport {\n bundleSeedScript,\n bundleSeedDumpScript,\n type SeedBundleResult,\n type SeedDumpBundleResult,\n} from \"./commands/generate/seed/bundler\";\nexport {\n bundleMigrationScript,\n type MigrationBundleResult,\n} from \"./commands/tailordb/migrate/bundler\";\nexport {\n executeScript,\n waitForExecution,\n type ScriptExecutionOptions,\n type ScriptExecutionResult,\n type ScriptInvoker,\n type ExecutionWaitResult,\n} from \"./shared/script-executor\";\nexport { initOperatorClient, type OperatorClient } from \"./shared/client\";\nexport type { AuthInvoker } from \"@tailor-platform/tailor-proto/auth_resource_pb\";\n"],"mappings":"A,krCAGA,MAAMoG,GAAe,IAAI,IAAI,gBAAiB,YAAY,GAAG,CAAC,E"}