@tailor-platform/sdk 1.6.3 → 1.8.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 (42) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/{application-4cO5Zvfo.mjs → application-HIu5peO4.mjs} +111 -46
  3. package/dist/application-HIu5peO4.mjs.map +1 -0
  4. package/dist/application-ViV4dYwI.mjs +4 -0
  5. package/dist/cli/index.mjs +65 -53
  6. package/dist/cli/index.mjs.map +1 -1
  7. package/dist/cli/lib.d.mts +134 -25
  8. package/dist/cli/lib.mjs +3 -4
  9. package/dist/cli/lib.mjs.map +1 -1
  10. package/dist/configure/index.d.mts +3 -3
  11. package/dist/configure/index.mjs +778 -2
  12. package/dist/configure/index.mjs.map +1 -1
  13. package/dist/{index-DRFnAgt_.d.mts → index-BwJ7-efr.d.mts} +74 -30
  14. package/dist/{index-BqMqXRal.d.mts → index-Dkm2qwmF.d.mts} +153 -191
  15. package/dist/{jiti-SMSW3TA0.mjs → jiti-ygK9KoRA.mjs} +1 -1
  16. package/dist/{jiti-SMSW3TA0.mjs.map → jiti-ygK9KoRA.mjs.map} +1 -1
  17. package/dist/{job-8XfvLyxH.mjs → job-l-pIR9IY.mjs} +1 -1
  18. package/dist/{job-8XfvLyxH.mjs.map → job-l-pIR9IY.mjs.map} +1 -1
  19. package/dist/{list-DFvkudMF.mjs → list-D1K7WwpV.mjs} +3084 -2362
  20. package/dist/list-D1K7WwpV.mjs.map +1 -0
  21. package/dist/{src-qLXX6nub.mjs → src-CG8kJBI9.mjs} +1 -1
  22. package/dist/{src-qLXX6nub.mjs.map → src-CG8kJBI9.mjs.map} +1 -1
  23. package/dist/utils/test/index.d.mts +2 -2
  24. package/dist/utils/test/index.mjs +1 -1
  25. package/docs/cli/application.md +114 -35
  26. package/docs/cli/auth.md +101 -44
  27. package/docs/cli/executor.md +149 -0
  28. package/docs/cli/secret.md +133 -51
  29. package/docs/cli/staticwebsite.md +78 -41
  30. package/docs/cli/tailordb.md +227 -155
  31. package/docs/cli/user.md +164 -66
  32. package/docs/cli/workflow.md +132 -73
  33. package/docs/cli/workspace.md +126 -45
  34. package/docs/cli-reference.md +9 -0
  35. package/docs/generator/custom.md +2 -2
  36. package/docs/services/auth.md +88 -1
  37. package/package.json +3 -1
  38. package/dist/application-3rIUD7cq.mjs +0 -5
  39. package/dist/application-4cO5Zvfo.mjs.map +0 -1
  40. package/dist/auth-0Zh4xp4z.mjs +0 -772
  41. package/dist/auth-0Zh4xp4z.mjs.map +0 -1
  42. package/dist/list-DFvkudMF.mjs.map +0 -1
@@ -1,12 +1,12 @@
1
1
  /// <reference path="./../user-defined.d.ts" />
2
- import { L as IdProviderConfig, N as ParsedTailorDBType, _t as Resolver, h as Executor, r as AppConfig, t as Generator, z as OAuth2ClientInput } from "../index-BqMqXRal.mjs";
2
+ import { E as TailorDBType, F as IdProviderConfig, L as OAuth2ClientInput, gt as Resolver, p as Executor, r as AppConfig, t as Generator } from "../index-Dkm2qwmF.mjs";
3
3
  import "politty";
4
4
  import { z } from "zod";
5
5
  import { OAuth2Client } from "@badgateway/oauth2-client";
6
6
  import "@bufbuild/protobuf/wkt";
7
7
  import "@connectrpc/connect";
8
8
  import "@bufbuild/protobuf/codegenv2";
9
- import "@bufbuild/protobuf";
9
+ import { JsonObject } from "@bufbuild/protobuf";
10
10
  import { Jsonifiable } from "type-fest";
11
11
 
12
12
  //#region src/cli/config-loader.d.ts
@@ -86,7 +86,7 @@ type ArrayIncludes<T extends readonly unknown[], U> = T extends readonly [infer
86
86
  type HasDependency<Deps extends readonly DependencyKind[], D extends DependencyKind> = ArrayIncludes<Deps, D>;
87
87
  interface TailorDBProcessMethods<T, Ts> {
88
88
  processType(args: {
89
- type: ParsedTailorDBType;
89
+ type: TailorDBType;
90
90
  namespace: string;
91
91
  source: {
92
92
  filePath: string;
@@ -194,6 +194,11 @@ interface ShowOptions {
194
194
  profile?: string;
195
195
  configPath?: string;
196
196
  }
197
+ interface WorkspaceInfo$1 {
198
+ workspaceId: string;
199
+ workspaceName: string;
200
+ workspaceRegion?: string;
201
+ }
197
202
  interface ApplicationInfo {
198
203
  name: string;
199
204
  domain: string;
@@ -202,15 +207,16 @@ interface ApplicationInfo {
202
207
  cors: string[];
203
208
  allowedIpAddresses: string[];
204
209
  disableIntrospection: boolean;
205
- createdAt: string;
206
- updatedAt: string;
210
+ createdAt: Date | null;
211
+ updatedAt: Date | null;
207
212
  }
213
+ interface ShowInfo extends ApplicationInfo, WorkspaceInfo$1 {}
208
214
  /**
209
215
  * Show applied application information for the current workspace.
210
216
  * @param options - Show options
211
217
  * @returns Application information
212
218
  */
213
- declare function show(options?: ShowOptions): Promise<ApplicationInfo>;
219
+ declare function show(options?: ShowOptions): Promise<ShowInfo>;
214
220
  //#endregion
215
221
  //#region src/cli/remove.d.ts
216
222
  interface RemoveOptions {
@@ -230,8 +236,8 @@ interface WorkspaceInfo {
230
236
  id: string;
231
237
  name: string;
232
238
  region: string;
233
- createdAt: string;
234
- updatedAt: string;
239
+ createdAt: Date | null;
240
+ updatedAt: Date | null;
235
241
  }
236
242
  //#endregion
237
243
  //#region src/cli/workspace/create.d.ts
@@ -288,8 +294,9 @@ interface MachineUserInfo {
288
294
  name: string;
289
295
  clientId: string;
290
296
  clientSecret: string;
291
- createdAt: string;
292
- updatedAt: string;
297
+ createdAt: Date | null;
298
+ updatedAt: Date | null;
299
+ attributes: Record<string, unknown>;
293
300
  }
294
301
  /**
295
302
  * List machine users for the current application.
@@ -324,7 +331,7 @@ interface OAuth2ClientInfo {
324
331
  clientId: string;
325
332
  grantTypes: string[];
326
333
  redirectUris: string[];
327
- createdAt: string;
334
+ createdAt: Date | null;
328
335
  }
329
336
  interface OAuth2ClientCredentials {
330
337
  name: string;
@@ -333,7 +340,7 @@ interface OAuth2ClientCredentials {
333
340
  clientSecret: string;
334
341
  grantTypes: string[];
335
342
  redirectUris: string[];
336
- createdAt: string;
343
+ createdAt: Date | null;
337
344
  }
338
345
  //#endregion
339
346
  //#region src/cli/oauth2client/get.d.ts
@@ -368,31 +375,31 @@ interface WorkflowListInfo {
368
375
  name: string;
369
376
  mainJob: string;
370
377
  jobFunctions: number;
371
- updatedAt: string;
378
+ updatedAt: Date | null;
372
379
  }
373
380
  interface WorkflowInfo {
374
381
  name: string;
375
382
  id: string;
376
383
  mainJob: string;
377
- jobFunctions: string;
378
- createdAt: string;
379
- updatedAt: string;
384
+ jobFunctions: Record<string, string>;
385
+ createdAt: Date | null;
386
+ updatedAt: Date | null;
380
387
  }
381
388
  interface WorkflowJobExecutionInfo {
382
389
  id: string;
383
390
  stackedJobName: string;
384
391
  status: string;
385
392
  executionId: string;
386
- startedAt: string;
387
- finishedAt: string;
393
+ startedAt: Date | null;
394
+ finishedAt: Date | null;
388
395
  }
389
396
  interface WorkflowExecutionInfo {
390
397
  id: string;
391
398
  workflowName: string;
392
399
  status: string;
393
400
  jobExecutions: number;
394
- startedAt: string;
395
- finishedAt: string;
401
+ startedAt: Date | null;
402
+ finishedAt: Date | null;
396
403
  }
397
404
  //#endregion
398
405
  //#region src/cli/workflow/list.d.ts
@@ -499,6 +506,108 @@ interface ResumeWorkflowResultWithWait {
499
506
  */
500
507
  declare function resumeWorkflow(options: ResumeWorkflowOptions): Promise<ResumeWorkflowResultWithWait>;
501
508
  //#endregion
509
+ //#region src/cli/executor/trigger.d.ts
510
+ interface TriggerExecutorOptions {
511
+ executorName: string;
512
+ payload?: JsonObject;
513
+ workspaceId?: string;
514
+ profile?: string;
515
+ }
516
+ interface TriggerExecutorResult {
517
+ jobId?: string;
518
+ }
519
+ /**
520
+ * Trigger an executor and return the job ID.
521
+ * @param options - Options for triggering executor
522
+ * @returns Result containing the job ID if available
523
+ */
524
+ declare function triggerExecutor(options: TriggerExecutorOptions): Promise<TriggerExecutorResult>;
525
+ //#endregion
526
+ //#region src/cli/executor/transform.d.ts
527
+ interface ExecutorJobListInfo {
528
+ id: string;
529
+ executorName: string;
530
+ status: string;
531
+ createdAt: string;
532
+ }
533
+ interface ExecutorJobInfo {
534
+ id: string;
535
+ executorName: string;
536
+ status: string;
537
+ scheduledAt: string;
538
+ createdAt: string;
539
+ updatedAt: string;
540
+ }
541
+ interface ExecutorJobAttemptInfo {
542
+ id: string;
543
+ jobId: string;
544
+ status: string;
545
+ error: string;
546
+ startedAt: string;
547
+ finishedAt: string;
548
+ operationReference: string;
549
+ }
550
+ //#endregion
551
+ //#region src/cli/executor/jobs.d.ts
552
+ interface ListExecutorJobsOptions {
553
+ executorName: string;
554
+ status?: string;
555
+ limit?: number;
556
+ workspaceId?: string;
557
+ profile?: string;
558
+ }
559
+ interface GetExecutorJobOptions {
560
+ executorName: string;
561
+ jobId: string;
562
+ attempts?: boolean;
563
+ workspaceId?: string;
564
+ profile?: string;
565
+ }
566
+ interface WatchExecutorJobOptions {
567
+ executorName: string;
568
+ jobId: string;
569
+ workspaceId?: string;
570
+ profile?: string;
571
+ interval?: number;
572
+ logs?: boolean;
573
+ }
574
+ interface ExecutorJobDetailInfo extends ExecutorJobInfo {
575
+ attempts?: ExecutorJobAttemptInfo[];
576
+ }
577
+ interface WorkflowJobLog {
578
+ jobName: string;
579
+ logs?: string;
580
+ result?: string;
581
+ }
582
+ interface WatchExecutorJobResult {
583
+ job: ExecutorJobDetailInfo;
584
+ targetType: string;
585
+ workflowExecutionId?: string;
586
+ workflowStatus?: string;
587
+ workflowJobLogs?: WorkflowJobLog[];
588
+ functionExecutionId?: string;
589
+ functionStatus?: string;
590
+ functionLogs?: string;
591
+ }
592
+ /**
593
+ * List executor jobs for a given executor.
594
+ * @param options - Options for listing executor jobs
595
+ * @returns List of executor job information
596
+ */
597
+ declare function listExecutorJobs(options: ListExecutorJobsOptions): Promise<ExecutorJobListInfo[]>;
598
+ /**
599
+ * Get details of a specific executor job.
600
+ * @param options - Options for getting executor job details
601
+ * @returns Executor job detail information
602
+ */
603
+ declare function getExecutorJob(options: GetExecutorJobOptions): Promise<ExecutorJobDetailInfo>;
604
+ /**
605
+ * Watch an executor job until completion, including downstream executions.
606
+ * @param options - Options for watching executor job
607
+ * @returns Result including job details and downstream execution info
608
+ */
609
+ declare function watchExecutorJob(options: WatchExecutorJobOptions): Promise<WatchExecutorJobResult>;
610
+ //#endregion
502
611
  //#region src/cli/context.d.ts
503
612
  type LoadWorkspaceIdOptions = {
504
613
  workspaceId?: string;
@@ -752,11 +861,11 @@ declare function getMigrationDirPath(migrationsDir: string, num: number): string
752
861
  declare function getMigrationFilePath(migrationsDir: string, num: number, type: MigrationFileType): string;
753
862
  /**
754
863
  * Create a schema snapshot from local type definitions
755
- * @param {Record<string, ParsedTailorDBType>} types - Local type definitions
864
+ * @param {Record<string, TailorDBType>} types - Local type definitions
756
865
  * @param {string} namespace - Namespace for the snapshot
757
866
  * @returns {SchemaSnapshot} Schema snapshot
758
867
  */
759
- declare function createSnapshotFromLocalTypes(types: Record<string, ParsedTailorDBType>, namespace: string): SchemaSnapshot;
868
+ declare function createSnapshotFromLocalTypes(types: Record<string, TailorDBType>, namespace: string): SchemaSnapshot;
760
869
  /**
761
870
  * Get all migration directories and their files, sorted by number
762
871
  * @param {string} migrationsDir - Migrations directory path
@@ -799,11 +908,11 @@ declare function compareSnapshots(previous: SchemaSnapshot, current: SchemaSnaps
799
908
  /**
800
909
  * Compare local types with a snapshot and generate a diff
801
910
  * @param {SchemaSnapshot} snapshot - Schema snapshot to compare against
802
- * @param {Record<string, ParsedTailorDBType>} localTypes - Local type definitions
911
+ * @param {Record<string, TailorDBType>} localTypes - Local type definitions
803
912
  * @param {string} namespace - Namespace for comparison
804
913
  * @returns {MigrationDiff} Migration diff
805
914
  */
806
- declare function compareLocalTypesWithSnapshot(snapshot: SchemaSnapshot, localTypes: Record<string, ParsedTailorDBType>, namespace: string): MigrationDiff;
915
+ declare function compareLocalTypesWithSnapshot(snapshot: SchemaSnapshot, localTypes: Record<string, TailorDBType>, namespace: string): MigrationDiff;
807
916
  //#endregion
808
917
  //#region src/cli/tailordb/migrate/config.d.ts
809
918
  /**
@@ -821,5 +930,5 @@ interface NamespaceWithMigrations {
821
930
  */
822
931
  declare function getNamespacesWithMigrations(config: AppConfig, configDir: string): NamespaceWithMigrations[];
823
932
  //#endregion
824
- export { type AggregateArgs, type ApiCallOptions, type ApiCallResult, type ApplicationInfo, type ApplyOptions, type BreakingChangeInfo, type CodeGenerator, type CreateWorkspaceOptions, DB_TYPES_FILE_NAME, DIFF_FILE_NAME, type DeleteWorkspaceOptions, type DependencyKind, type Executor, type ExecutorGenerator, type ExecutorInput, type FullCodeGenerator, type FullInput, type GenerateOptions, type GeneratorResult, type GetMachineUserTokenOptions, type GetOAuth2ClientOptions, type GetWorkflowExecutionOptions, type GetWorkflowExecutionResult, type GetWorkflowOptions, INITIAL_SCHEMA_NUMBER, type ListMachineUsersOptions, type ListOAuth2ClientsOptions, type ListWorkflowExecutionsOptions, type ListWorkflowsOptions, type ListWorkspacesOptions, type LoadedConfig, MIGRATE_FILE_NAME, MIGRATION_LABEL_KEY, type MachineUserInfo, type MachineUserTokenInfo, type GenerateOptions$1 as MigrateGenerateOptions, type MigrationDiff, type MigrationInfo, type NamespaceWithMigrations, type OAuth2ClientCredentials, type OAuth2ClientInfo, type RemoveOptions, type Resolver, type ResolverGenerator, type ResolverInput, type ResumeWorkflowOptions, type ResumeWorkflowResultWithWait, SCHEMA_FILE_NAME, type SchemaSnapshot, type ShowOptions, type SnapshotFieldConfig, type SnapshotType, type StartWorkflowOptions, type StartWorkflowResultWithWait, type TailorDBGenerator, type TailorDBInput, type TailorDBResolverGenerator, type ParsedTailorDBType as TailorDBType, type TruncateOptions, type WaitOptions, type WorkflowExecutionInfo, type WorkflowInfo, type WorkflowJobExecutionInfo, type WorkflowListInfo, type WorkspaceInfo, apiCall, apply, compareLocalTypesWithSnapshot, compareSnapshots, createSnapshotFromLocalTypes, createWorkspace, deleteWorkspace, formatDiffSummary, formatMigrationDiff, generate, generateUserTypes, getLatestMigrationNumber, getMachineUserToken, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNamespacesWithMigrations, getNextMigrationNumber, getOAuth2Client, getWorkflow, getWorkflowExecution, hasChanges, listMachineUsers, listOAuth2Clients, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadWorkspaceId, generate$1 as migrateGenerate, reconstructSnapshotFromMigrations, remove, resumeWorkflow, show, startWorkflow, truncate };
933
+ export { type AggregateArgs, type ApiCallOptions, type ApiCallResult, type ApplicationInfo, type ApplyOptions, type BreakingChangeInfo, type CodeGenerator, type CreateWorkspaceOptions, DB_TYPES_FILE_NAME, DIFF_FILE_NAME, type DeleteWorkspaceOptions, type DependencyKind, type Executor, type ExecutorGenerator, type ExecutorInput, type ExecutorJobAttemptInfo, type ExecutorJobDetailInfo, type ExecutorJobInfo, type ExecutorJobListInfo, type FullCodeGenerator, type FullInput, type GenerateOptions, type GeneratorResult, type GetExecutorJobOptions, type GetMachineUserTokenOptions, type GetOAuth2ClientOptions, type GetWorkflowExecutionOptions, type GetWorkflowExecutionResult, type GetWorkflowOptions, INITIAL_SCHEMA_NUMBER, type ListExecutorJobsOptions, type ListMachineUsersOptions, type ListOAuth2ClientsOptions, type ListWorkflowExecutionsOptions, type ListWorkflowsOptions, type ListWorkspacesOptions, type LoadedConfig, MIGRATE_FILE_NAME, MIGRATION_LABEL_KEY, type MachineUserInfo, type MachineUserTokenInfo, type GenerateOptions$1 as MigrateGenerateOptions, type MigrationDiff, type MigrationInfo, type NamespaceWithMigrations, type OAuth2ClientCredentials, type OAuth2ClientInfo, type RemoveOptions, type Resolver, type ResolverGenerator, type ResolverInput, type ResumeWorkflowOptions, type ResumeWorkflowResultWithWait, SCHEMA_FILE_NAME, type SchemaSnapshot, type ShowOptions, type SnapshotFieldConfig, type SnapshotType, type StartWorkflowOptions, type StartWorkflowResultWithWait, type TailorDBGenerator, type TailorDBInput, type TailorDBResolverGenerator, type TailorDBType, type TriggerExecutorOptions, type TriggerExecutorResult, type TruncateOptions, type WaitOptions, type WatchExecutorJobOptions, type WatchExecutorJobResult, type WorkflowExecutionInfo, type WorkflowInfo, type WorkflowJobExecutionInfo, type WorkflowListInfo, type WorkspaceInfo, apiCall, apply, compareLocalTypesWithSnapshot, compareSnapshots, createSnapshotFromLocalTypes, createWorkspace, deleteWorkspace, formatDiffSummary, formatMigrationDiff, generate, generateUserTypes, getExecutorJob, getLatestMigrationNumber, getMachineUserToken, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNamespacesWithMigrations, getNextMigrationNumber, getOAuth2Client, getWorkflow, getWorkflowExecution, hasChanges, listExecutorJobs, listMachineUsers, listOAuth2Clients, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadWorkspaceId, generate$1 as migrateGenerate, reconstructSnapshotFromMigrations, remove, resumeWorkflow, show, startWorkflow, triggerExecutor, truncate, watchExecutorJob };
825
934
  //# sourceMappingURL=lib.d.mts.map
package/dist/cli/lib.mjs CHANGED
@@ -1,12 +1,11 @@
1
1
  import "../chunk-CIV_ash9.mjs";
2
- import "../auth-0Zh4xp4z.mjs";
3
- import { $ as getMigrationFiles, A as getOAuth2Client, C as show, F as generate, G as SCHEMA_FILE_NAME, H as DIFF_FILE_NAME, J as createSnapshotFromLocalTypes, K as compareLocalTypesWithSnapshot, L as apply, O as listOAuth2Clients, P as listMachineUsers, Q as getMigrationFilePath, T as remove, U as INITIAL_SCHEMA_NUMBER, V as DB_TYPES_FILE_NAME, W as MIGRATE_FILE_NAME, X as getLatestMigrationNumber, Z as getMigrationDirPath, _ as listWorkflowExecutions, at as formatMigrationDiff, b as generate$1, c as resumeWorkflow, dt as apiCall, et as getNextMigrationNumber, f as listWorkflows, g as getWorkflowExecution, ht as loadWorkspaceId, i as deleteWorkspace, it as formatDiffSummary, j as getMachineUserToken, lt as generateUserTypes, m as getWorkflow, mt as loadAccessToken, n as listWorkspaces, o as createWorkspace, ot as hasChanges, q as compareSnapshots, rt as reconstructSnapshotFromMigrations, st as getNamespacesWithMigrations, u as startWorkflow, ut as loadConfig, v as truncate, z as MIGRATION_LABEL_KEY } from "../list-DFvkudMF.mjs";
4
- import "../application-4cO5Zvfo.mjs";
2
+ import { $ as compareSnapshots, C as getOAuth2Client, D as listMachineUsers, F as watchExecutorJob, G as MIGRATION_LABEL_KEY, H as listWorkflowExecutions, J as DIFF_FILE_NAME, L as startWorkflow, M as getExecutorJob, O as generate, P as listExecutorJobs, Q as compareLocalTypesWithSnapshot, U as apply, V as getWorkflowExecution, X as MIGRATE_FILE_NAME, Y as INITIAL_SCHEMA_NUMBER, Z as SCHEMA_FILE_NAME, _t as apiCall, at as getMigrationFiles, bt as loadAccessToken, c as resumeWorkflow, d as truncate, dt as formatMigrationDiff, et as createSnapshotFromLocalTypes, ft as hasChanges, g as show, gt as loadConfig, ht as generateUserTypes, i as deleteWorkspace, it as getMigrationFilePath, j as triggerExecutor, lt as reconstructSnapshotFromMigrations, n as listWorkspaces, nt as getLatestMigrationNumber, o as createWorkspace, ot as getNextMigrationNumber, p as generate$1, pt as getNamespacesWithMigrations, q as DB_TYPES_FILE_NAME, rt as getMigrationDirPath, u as listWorkflows, ut as formatDiffSummary, v as remove, w as getMachineUserToken, x as listOAuth2Clients, xt as loadWorkspaceId, z as getWorkflow } from "../list-D1K7WwpV.mjs";
3
+ import "../application-HIu5peO4.mjs";
5
4
  import { register } from "node:module";
6
5
 
7
6
  //#region src/cli/lib.ts
8
7
  register("tsx", import.meta.url, { data: {} });
9
8
 
10
9
  //#endregion
11
- export { DB_TYPES_FILE_NAME, DIFF_FILE_NAME, INITIAL_SCHEMA_NUMBER, MIGRATE_FILE_NAME, MIGRATION_LABEL_KEY, SCHEMA_FILE_NAME, apiCall, apply, compareLocalTypesWithSnapshot, compareSnapshots, createSnapshotFromLocalTypes, createWorkspace, deleteWorkspace, formatDiffSummary, formatMigrationDiff, generate, generateUserTypes, getLatestMigrationNumber, getMachineUserToken, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNamespacesWithMigrations, getNextMigrationNumber, getOAuth2Client, getWorkflow, getWorkflowExecution, hasChanges, listMachineUsers, listOAuth2Clients, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadWorkspaceId, generate$1 as migrateGenerate, reconstructSnapshotFromMigrations, remove, resumeWorkflow, show, startWorkflow, truncate };
10
+ export { DB_TYPES_FILE_NAME, DIFF_FILE_NAME, INITIAL_SCHEMA_NUMBER, MIGRATE_FILE_NAME, MIGRATION_LABEL_KEY, SCHEMA_FILE_NAME, apiCall, apply, compareLocalTypesWithSnapshot, compareSnapshots, createSnapshotFromLocalTypes, createWorkspace, deleteWorkspace, formatDiffSummary, formatMigrationDiff, generate, generateUserTypes, getExecutorJob, getLatestMigrationNumber, getMachineUserToken, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNamespacesWithMigrations, getNextMigrationNumber, getOAuth2Client, getWorkflow, getWorkflowExecution, hasChanges, listExecutorJobs, listMachineUsers, listOAuth2Clients, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadWorkspaceId, generate$1 as migrateGenerate, reconstructSnapshotFromMigrations, remove, resumeWorkflow, show, startWorkflow, triggerExecutor, truncate, watchExecutorJob };
12
11
  //# sourceMappingURL=lib.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"lib.mjs","names":[],"sources":["../../src/cli/lib.ts"],"sourcesContent":["// CLI API exports for programmatic usage\nimport { register } from \"node:module\";\n\n// Register tsx to handle TypeScript files when using CLI API programmatically\nregister(\"tsx\", import.meta.url, { data: {} });\n\nexport { apply } from \"./apply/index\";\nexport type { ApplyOptions } from \"./apply/index\";\nexport { generate } from \"./generator/index\";\nexport type { GenerateOptions } from \"./generator/options\";\nexport { loadConfig, type LoadedConfig } from \"./config-loader\";\nexport { generateUserTypes } from \"./type-generator\";\nexport type {\n CodeGenerator,\n TailorDBGenerator,\n ResolverGenerator,\n ExecutorGenerator,\n TailorDBResolverGenerator,\n FullCodeGenerator,\n TailorDBInput,\n ResolverInput,\n ExecutorInput,\n FullInput,\n AggregateArgs,\n GeneratorResult,\n DependencyKind,\n} from \"./generator/types\";\nexport type { ParsedTailorDBType as TailorDBType } from \"@/parser/service/tailordb/types\";\nexport type { Resolver } from \"@/parser/service/resolver\";\nexport type { Executor } from \"@/parser/service/executor\";\n\nexport { show, type ShowOptions, type ApplicationInfo } from \"./show\";\nexport { remove, type RemoveOptions } from \"./remove\";\nexport { createWorkspace, type CreateWorkspaceOptions } from \"./workspace/create\";\nexport { listWorkspaces, type ListWorkspacesOptions } from \"./workspace/list\";\nexport { deleteWorkspace, type DeleteWorkspaceOptions } from \"./workspace/delete\";\nexport type { WorkspaceInfo } from \"./workspace/transform\";\nexport {\n listMachineUsers,\n type ListMachineUsersOptions,\n type MachineUserInfo,\n} from \"./machineuser/list\";\nexport {\n getMachineUserToken,\n type GetMachineUserTokenOptions,\n type MachineUserTokenInfo,\n} from \"./machineuser/token\";\nexport { getOAuth2Client, type GetOAuth2ClientOptions } from \"./oauth2client/get\";\nexport { listOAuth2Clients, type ListOAuth2ClientsOptions } from \"./oauth2client/list\";\nexport type { OAuth2ClientInfo, OAuth2ClientCredentials } from \"./oauth2client/transform\";\nexport { listWorkflows, type ListWorkflowsOptions } from \"./workflow/list\";\nexport { getWorkflow, type GetWorkflowOptions } from \"./workflow/get\";\nexport {\n startWorkflow,\n type StartWorkflowOptions,\n type StartWorkflowResultWithWait,\n type WaitOptions,\n} from \"./workflow/start\";\nexport {\n listWorkflowExecutions,\n getWorkflowExecution,\n type ListWorkflowExecutionsOptions,\n type GetWorkflowExecutionOptions,\n type GetWorkflowExecutionResult,\n} from \"./workflow/executions\";\nexport {\n resumeWorkflow,\n type ResumeWorkflowOptions,\n type ResumeWorkflowResultWithWait,\n} from \"./workflow/resume\";\nexport type {\n WorkflowListInfo,\n WorkflowInfo,\n WorkflowExecutionInfo,\n WorkflowJobExecutionInfo,\n} from \"./workflow/transform\";\nexport { loadAccessToken, loadWorkspaceId } from \"./context\";\nexport { apiCall, type ApiCallOptions, type ApiCallResult } from \"./api\";\nexport { truncate, type TruncateOptions } from \"./tailordb/truncate\";\n\n// Migration exports\nexport {\n generate as migrateGenerate,\n type GenerateOptions as MigrateGenerateOptions,\n} from \"./tailordb/migrate/generate\";\nexport {\n createSnapshotFromLocalTypes,\n reconstructSnapshotFromMigrations,\n compareSnapshots,\n getNextMigrationNumber,\n getLatestMigrationNumber,\n getMigrationFiles,\n compareLocalTypesWithSnapshot,\n} from \"./tailordb/migrate/snapshot\";\nexport {\n getNamespacesWithMigrations,\n type NamespaceWithMigrations,\n} from \"./tailordb/migrate/config\";\nexport {\n hasChanges,\n formatMigrationDiff,\n formatDiffSummary,\n type MigrationDiff,\n type BreakingChangeInfo,\n} from \"./tailordb/migrate/diff-calculator\";\nexport {\n SCHEMA_FILE_NAME,\n DIFF_FILE_NAME,\n MIGRATE_FILE_NAME,\n DB_TYPES_FILE_NAME,\n INITIAL_SCHEMA_NUMBER,\n getMigrationDirPath,\n getMigrationFilePath,\n type SchemaSnapshot,\n type SnapshotType,\n type SnapshotFieldConfig,\n type MigrationInfo,\n} from \"./tailordb/migrate/snapshot\";\nexport { MIGRATION_LABEL_KEY } from \"./tailordb/migrate/types\";\n"],"mappings":";;;;;;;AAIA,SAAS,OAAO,OAAO,KAAK,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC"}
1
+ {"version":3,"file":"lib.mjs","names":[],"sources":["../../src/cli/lib.ts"],"sourcesContent":["// CLI API exports for programmatic usage\nimport { register } from \"node:module\";\n\n// Register tsx to handle TypeScript files when using CLI API programmatically\nregister(\"tsx\", import.meta.url, { data: {} });\n\nexport { apply } from \"./apply/index\";\nexport type { ApplyOptions } from \"./apply/index\";\nexport { generate } from \"./generator/index\";\nexport type { GenerateOptions } from \"./generator/options\";\nexport { loadConfig, type LoadedConfig } from \"./config-loader\";\nexport { generateUserTypes } from \"./type-generator\";\nexport type {\n CodeGenerator,\n TailorDBGenerator,\n ResolverGenerator,\n ExecutorGenerator,\n TailorDBResolverGenerator,\n FullCodeGenerator,\n TailorDBInput,\n ResolverInput,\n ExecutorInput,\n FullInput,\n AggregateArgs,\n GeneratorResult,\n DependencyKind,\n} from \"./generator/types\";\nexport type { TailorDBType } from \"@/parser/service/tailordb/types\";\nexport type { Resolver } from \"@/parser/service/resolver\";\nexport type { Executor } from \"@/parser/service/executor\";\n\nexport { show, type ShowOptions, type ApplicationInfo } from \"./show\";\nexport { remove, type RemoveOptions } from \"./remove\";\nexport { createWorkspace, type CreateWorkspaceOptions } from \"./workspace/create\";\nexport { listWorkspaces, type ListWorkspacesOptions } from \"./workspace/list\";\nexport { deleteWorkspace, type DeleteWorkspaceOptions } from \"./workspace/delete\";\nexport type { WorkspaceInfo } from \"./workspace/transform\";\nexport {\n listMachineUsers,\n type ListMachineUsersOptions,\n type MachineUserInfo,\n} from \"./machineuser/list\";\nexport {\n getMachineUserToken,\n type GetMachineUserTokenOptions,\n type MachineUserTokenInfo,\n} from \"./machineuser/token\";\nexport { getOAuth2Client, type GetOAuth2ClientOptions } from \"./oauth2client/get\";\nexport { listOAuth2Clients, type ListOAuth2ClientsOptions } from \"./oauth2client/list\";\nexport type { OAuth2ClientInfo, OAuth2ClientCredentials } from \"./oauth2client/transform\";\nexport { listWorkflows, type ListWorkflowsOptions } from \"./workflow/list\";\nexport { getWorkflow, type GetWorkflowOptions } from \"./workflow/get\";\nexport {\n startWorkflow,\n type StartWorkflowOptions,\n type StartWorkflowResultWithWait,\n type WaitOptions,\n} from \"./workflow/start\";\nexport {\n listWorkflowExecutions,\n getWorkflowExecution,\n type ListWorkflowExecutionsOptions,\n type GetWorkflowExecutionOptions,\n type GetWorkflowExecutionResult,\n} from \"./workflow/executions\";\nexport {\n resumeWorkflow,\n type ResumeWorkflowOptions,\n type ResumeWorkflowResultWithWait,\n} from \"./workflow/resume\";\nexport type {\n WorkflowListInfo,\n WorkflowInfo,\n WorkflowExecutionInfo,\n WorkflowJobExecutionInfo,\n} from \"./workflow/transform\";\nexport {\n triggerExecutor,\n type TriggerExecutorOptions,\n type TriggerExecutorResult,\n} from \"./executor/trigger\";\nexport {\n listExecutorJobs,\n getExecutorJob,\n watchExecutorJob,\n type ListExecutorJobsOptions,\n type GetExecutorJobOptions,\n type WatchExecutorJobOptions,\n type ExecutorJobDetailInfo,\n type WatchExecutorJobResult,\n} from \"./executor/jobs\";\nexport type {\n ExecutorJobListInfo,\n ExecutorJobInfo,\n ExecutorJobAttemptInfo,\n} from \"./executor/transform\";\nexport { loadAccessToken, loadWorkspaceId } from \"./context\";\nexport { apiCall, type ApiCallOptions, type ApiCallResult } from \"./api\";\nexport { truncate, type TruncateOptions } from \"./tailordb/truncate\";\n\n// Migration exports\nexport {\n generate as migrateGenerate,\n type GenerateOptions as MigrateGenerateOptions,\n} from \"./tailordb/migrate/generate\";\nexport {\n createSnapshotFromLocalTypes,\n reconstructSnapshotFromMigrations,\n compareSnapshots,\n getNextMigrationNumber,\n getLatestMigrationNumber,\n getMigrationFiles,\n compareLocalTypesWithSnapshot,\n} from \"./tailordb/migrate/snapshot\";\nexport {\n getNamespacesWithMigrations,\n type NamespaceWithMigrations,\n} from \"./tailordb/migrate/config\";\nexport {\n hasChanges,\n formatMigrationDiff,\n formatDiffSummary,\n type MigrationDiff,\n type BreakingChangeInfo,\n} from \"./tailordb/migrate/diff-calculator\";\nexport {\n SCHEMA_FILE_NAME,\n DIFF_FILE_NAME,\n MIGRATE_FILE_NAME,\n DB_TYPES_FILE_NAME,\n INITIAL_SCHEMA_NUMBER,\n getMigrationDirPath,\n getMigrationFilePath,\n type SchemaSnapshot,\n type SnapshotType,\n type SnapshotFieldConfig,\n type MigrationInfo,\n} from \"./tailordb/migrate/snapshot\";\nexport { MIGRATION_LABEL_KEY } from \"./tailordb/migrate/types\";\n"],"mappings":";;;;;;AAIA,SAAS,OAAO,OAAO,KAAK,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
1
  /// <reference path="./../user-defined.d.ts" />
2
- import { $ as ValueOperand, A as AuthInvoker, B as OIDC, Ct as AttributeMap, Dt as unauthenticatedTailorUser, Et as TailorUser, F as BuiltinIdP, G as SCIMAuthorization, H as SCIMAttribute, I as IDToken, J as TenantProviderConfig, K as SCIMConfig, L as IdProviderConfig, M as defineAuth, O as AuthConfig, P as AuthServiceInput, Q as UsernameFieldKey, R as OAuth2ClientGrantType, St as AttributeList, U as SCIMAttributeMapping, V as SAML, W as SCIMAttributeType, X as UserAttributeListKey, Y as UserAttributeKey, Z as UserAttributeMap, _ as ExecutorServiceConfig, _t as Resolver, a as WorkflowServiceInput, at as TailorTypeGqlPermission, c as IdPConfig, ct as unsafeAllowAllTypePermission, d as ResolverExternalConfig, et as TailorDBField, f as ResolverServiceConfig, gt as QueryType, ht as TailorField, i as WorkflowServiceConfig, it as PermissionCondition, j as AuthOwnConfig, k as AuthExternalConfig, l as IdPExternalConfig, nt as TailorDBType, o as StaticWebsiteConfig, ot as TailorTypePermission, p as ResolverServiceInput, q as SCIMResource, rt as db, s as defineStaticWebSite, st as unsafeAllowAllGqlPermission, tt as TailorDBInstance, u as defineIdp, v as ExecutorServiceInput, z as OAuth2ClientInput } from "../index-BqMqXRal.mjs";
3
- import { A as idpUserUpdatedTrigger, B as Workflow, C as ResolverExecutedArgs, D as authAccessTokenRevokedTrigger, E as authAccessTokenRefreshedTrigger, F as FunctionOperation, G as WorkflowJobContext, H as createWorkflow, I as GqlOperation, J as createWorkflowJob, K as WorkflowJobInput, L as Operation, M as recordDeletedTrigger, N as recordUpdatedTrigger, O as idpUserCreatedTrigger, P as resolverExecutedTrigger, R as WebhookOperation, S as RecordUpdatedArgs, T as authAccessTokenIssuedTrigger, U as WORKFLOW_TEST_ENV_KEY, V as WorkflowConfig, W as WorkflowJob, X as Env, Y as createResolver, _ as IdpUserArgs, a as defineGenerators, b as RecordDeletedArgs, c as IncomingWebhookArgs, d as incomingWebhookTrigger, f as ScheduleArgs, g as AuthAccessTokenTrigger, h as AuthAccessTokenArgs, i as defineConfig, j as recordCreatedTrigger, k as idpUserDeletedTrigger, l as IncomingWebhookRequest, m as scheduleTrigger, n as output, o as createExecutor, p as ScheduleTrigger, q as WorkflowJobOutput, r as t, s as Trigger, t as infer, u as IncomingWebhookTrigger, v as IdpUserTrigger, w as ResolverExecutedTrigger, x as RecordTrigger, y as RecordCreatedArgs, z as WorkflowOperation } from "../index-DRFnAgt_.mjs";
4
- export { AttributeList, AttributeMap, AuthAccessTokenArgs, AuthAccessTokenTrigger, AuthConfig, AuthExternalConfig, AuthInvoker, AuthOwnConfig, AuthServiceInput, BuiltinIdP, Env, ExecutorServiceConfig, ExecutorServiceInput, FunctionOperation, GqlOperation, IDToken, IdPConfig, IdPExternalConfig, IdProviderConfig, IdpUserArgs, IdpUserTrigger, IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookTrigger, OAuth2ClientInput as OAuth2Client, OAuth2ClientGrantType, OIDC, Operation, PermissionCondition, QueryType, RecordCreatedArgs, RecordDeletedArgs, RecordTrigger, RecordUpdatedArgs, Resolver, ResolverExecutedArgs, ResolverExecutedTrigger, ResolverExternalConfig, ResolverServiceConfig, ResolverServiceInput, SAML, SCIMAttribute, SCIMAttributeMapping, SCIMAttributeType, SCIMAuthorization, SCIMConfig, SCIMResource, ScheduleArgs, ScheduleTrigger, StaticWebsiteConfig, TailorDBField, TailorDBInstance, TailorDBType, TailorField, TailorTypeGqlPermission, TailorTypePermission, TailorUser, TenantProviderConfig, Trigger, UserAttributeKey, UserAttributeListKey, UserAttributeMap, UsernameFieldKey, ValueOperand, WORKFLOW_TEST_ENV_KEY, WebhookOperation, Workflow, WorkflowConfig, WorkflowJob, WorkflowJobContext, WorkflowJobInput, WorkflowJobOutput, WorkflowOperation, WorkflowServiceConfig, WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, createExecutor, createResolver, createWorkflow, createWorkflowJob, db, defineAuth, defineConfig, defineGenerators, defineIdp, defineStaticWebSite, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, infer, output, recordCreatedTrigger, recordDeletedTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unauthenticatedTailorUser, unsafeAllowAllGqlPermission, unsafeAllowAllTypePermission };
2
+ import { $ as TailorDBInstance, A as AuthOwnConfig, At as unauthenticatedTailorUser, B as SCIMAttribute, D as AuthConfig, Dt as AttributeList, F as IdProviderConfig, G as SCIMResource, H as SCIMAttributeType, I as OAuth2ClientGrantType, J as UserAttributeListKey, K as TenantProviderConfig, L as OAuth2ClientInput, M as BuiltinIdP, N as DefinedAuth, O as AuthExternalConfig, Ot as AttributeMap, P as IDToken, Q as TailorDBField, R as OIDC, U as SCIMAuthorization, V as SCIMAttributeMapping, W as SCIMConfig, X as UsernameFieldKey, Y as UserAttributeMap, Z as ValueOperand, _t as ResolverExternalConfig, a as IdPExternalConfig, at as unsafeAllowAllGqlPermission, bt as ResolverServiceInput, c as WorkflowServiceConfig, d as defineStaticWebSite, et as TailorDBType, g as ExecutorServiceInput, gt as Resolver, h as ExecutorServiceConfig, ht as QueryType, i as IdPConfig, it as TailorTypePermission, j as AuthServiceInput, kt as TailorUser, l as WorkflowServiceInput, mt as TailorField, nt as PermissionCondition, ot as unsafeAllowAllTypePermission, q as UserAttributeKey, rt as TailorTypeGqlPermission, tt as db, u as StaticWebsiteConfig, wt as Env, yt as ResolverServiceConfig, z as SAML } from "../index-Dkm2qwmF.mjs";
3
+ import { A as idpUserDeletedTrigger, B as WorkflowOperation, C as RecordUpdatedArgs, D as authAccessTokenRefreshedTrigger, E as authAccessTokenIssuedTrigger, F as resolverExecutedTrigger, G as WorkflowJob, H as WorkflowConfig, I as FunctionOperation, J as WorkflowJobOutput, K as WorkflowJobContext, L as GqlOperation, M as recordCreatedTrigger, N as recordDeletedTrigger, O as authAccessTokenRevokedTrigger, P as recordUpdatedTrigger, Q as defineAuth, R as Operation, S as RecordTrigger, T as ResolverExecutedTrigger, U as createWorkflow, V as Workflow, W as WORKFLOW_TEST_ENV_KEY, X as createResolver, Y as createWorkflowJob, Z as AuthInvoker, _ as AuthAccessTokenTrigger, a as defineGenerators, b as RecordCreatedArgs, c as Trigger, d as IncomingWebhookTrigger, f as incomingWebhookTrigger, g as AuthAccessTokenArgs, h as scheduleTrigger, i as defineConfig, j as idpUserUpdatedTrigger, k as idpUserCreatedTrigger, l as IncomingWebhookArgs, m as ScheduleTrigger, n as output, o as defineIdp, p as ScheduleArgs, q as WorkflowJobInput, r as t, s as createExecutor, t as infer, u as IncomingWebhookRequest, v as IdpUserArgs, w as ResolverExecutedArgs, x as RecordDeletedArgs, y as IdpUserTrigger, z as WebhookOperation } from "../index-BwJ7-efr.mjs";
4
+ export { AttributeList, AttributeMap, AuthAccessTokenArgs, AuthAccessTokenTrigger, AuthConfig, AuthExternalConfig, AuthInvoker, AuthOwnConfig, AuthServiceInput, BuiltinIdP, DefinedAuth, Env, ExecutorServiceConfig, ExecutorServiceInput, FunctionOperation, GqlOperation, IDToken, IdPConfig, IdPExternalConfig, IdProviderConfig, IdpUserArgs, IdpUserTrigger, IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookTrigger, OAuth2ClientInput as OAuth2Client, OAuth2ClientGrantType, OIDC, Operation, PermissionCondition, QueryType, RecordCreatedArgs, RecordDeletedArgs, RecordTrigger, RecordUpdatedArgs, Resolver, ResolverExecutedArgs, ResolverExecutedTrigger, ResolverExternalConfig, ResolverServiceConfig, ResolverServiceInput, SAML, SCIMAttribute, SCIMAttributeMapping, SCIMAttributeType, SCIMAuthorization, SCIMConfig, SCIMResource, ScheduleArgs, ScheduleTrigger, StaticWebsiteConfig, TailorDBField, TailorDBInstance, TailorDBType, TailorField, TailorTypeGqlPermission, TailorTypePermission, TailorUser, TenantProviderConfig, Trigger, UserAttributeKey, UserAttributeListKey, UserAttributeMap, UsernameFieldKey, ValueOperand, WORKFLOW_TEST_ENV_KEY, WebhookOperation, Workflow, WorkflowConfig, WorkflowJob, WorkflowJobContext, WorkflowJobInput, WorkflowJobOutput, WorkflowOperation, WorkflowServiceConfig, WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, createExecutor, createResolver, createWorkflow, createWorkflowJob, db, defineAuth, defineConfig, defineGenerators, defineIdp, defineStaticWebSite, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, infer, output, recordCreatedTrigger, recordDeletedTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unauthenticatedTailorUser, unsafeAllowAllGqlPermission, unsafeAllowAllTypePermission };