@tailor-platform/sdk 1.48.0 → 1.50.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 (51) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +1 -1
  3. package/dist/{application-DUENhx4Y.mjs → application-CZMzt9jL.mjs} +3 -2
  4. package/dist/application-CZMzt9jL.mjs.map +1 -0
  5. package/dist/application-v_E2W-Fz.mjs +4 -0
  6. package/dist/brand-D-d15jx3.mjs.map +1 -1
  7. package/dist/cli/index.mjs +137 -25
  8. package/dist/cli/index.mjs.map +1 -1
  9. package/dist/cli/lib.d.mts +1409 -1373
  10. package/dist/cli/lib.mjs +4 -4
  11. package/dist/cli/lib.mjs.map +1 -1
  12. package/dist/cli/skills.mjs.map +1 -1
  13. package/dist/client-_kHh0Pip.mjs.map +1 -1
  14. package/dist/configure/index.mjs.map +1 -1
  15. package/dist/crashreport-CvmdFs4i.mjs.map +1 -1
  16. package/dist/enum-constants-C3KSpsYj.mjs.map +1 -1
  17. package/dist/errors-pMPXghkO.mjs.map +1 -1
  18. package/dist/field-DLSIuMTu.mjs.map +1 -1
  19. package/dist/file-utils-DjNi_3U_.mjs.map +1 -1
  20. package/dist/interceptor-DTNS0EtF.mjs.map +1 -1
  21. package/dist/job-M3Avv_SV.mjs.map +1 -1
  22. package/dist/kysely/index.mjs.map +1 -1
  23. package/dist/kysely-type-B8aRz_oC.mjs.map +1 -1
  24. package/dist/logger-DTNAMYGy.mjs.map +1 -1
  25. package/dist/mock-BfL09ULZ.mjs.map +1 -1
  26. package/dist/multiline-e3IpANmS.mjs.map +1 -1
  27. package/dist/package-json-6Px8bDpG.mjs.map +1 -1
  28. package/dist/plugin/index.mjs.map +1 -1
  29. package/dist/repl-editor-jZ493eQI.mjs.map +1 -1
  30. package/dist/{runtime-CNg0w27y.mjs → runtime-B2K6JW7V.mjs} +543 -164
  31. package/dist/runtime-B2K6JW7V.mjs.map +1 -0
  32. package/dist/schema-C5QjYEc-.mjs.map +1 -1
  33. package/dist/secret-file-BHpxGyNf.mjs.map +1 -1
  34. package/dist/seed/index.mjs.map +1 -1
  35. package/dist/seed-DjfAn0BC.mjs.map +1 -1
  36. package/dist/service-DCgJxdg1.mjs.map +1 -1
  37. package/dist/telemetry-C1Y56L5E.mjs.map +1 -1
  38. package/dist/types-sir9UPht.mjs.map +1 -1
  39. package/dist/utils/test/index.mjs.map +1 -1
  40. package/dist/vitest/environment.mjs.map +1 -1
  41. package/dist/vitest/index.mjs.map +1 -1
  42. package/dist/vitest/setup.mjs.map +1 -1
  43. package/docs/cli/tailordb.md +50 -0
  44. package/docs/cli/workspace.md +20 -17
  45. package/docs/cli-reference.md +1 -0
  46. package/docs/services/tailordb-migration.md +49 -31
  47. package/package.json +8 -8
  48. package/dist/application-BNkNt47b.mjs +0 -4
  49. package/dist/application-DUENhx4Y.mjs.map +0 -1
  50. package/dist/runtime-CNg0w27y.mjs.map +0 -1
  51. /package/{skills → agent-skills}/tailor-sdk/SKILL.md +0 -0
@@ -17593,1635 +17593,1671 @@ type BundledScripts = {
17593
17593
  authHooks: Map<string, string>;
17594
17594
  };
17595
17595
  //#endregion
17596
- //#region src/cli/commands/deploy/deploy.d.ts
17597
- interface DeployOptions {
17598
- workspaceId?: string;
17599
- profile?: string;
17600
- configPath?: string;
17601
- dryRun?: boolean;
17602
- yes?: boolean;
17603
- noSchemaCheck?: boolean;
17604
- noCache?: boolean;
17605
- cleanCache?: boolean;
17606
- buildOnly?: boolean;
17607
- }
17608
- /**
17609
- * Deploy the configured application to the Tailor platform.
17610
- * @param options - Options for deploy execution
17611
- * @returns Promise that resolves to `{ bundledScripts }` when `buildOnly` is true, otherwise void
17612
- */
17613
- declare function deploy(options?: DeployOptions): Promise<{
17614
- bundledScripts: BundledScripts;
17615
- } | undefined>;
17616
- //#endregion
17617
- //#region src/cli/commands/generate/types.d.ts
17618
- interface GeneratedFile {
17619
- path: string;
17620
- content: string;
17621
- skipIfExists?: boolean;
17622
- executable?: boolean;
17623
- }
17624
- interface GeneratorResult {
17625
- files: GeneratedFile[];
17626
- errors?: string[];
17627
- }
17628
- interface TailorDBNamespaceResult<T> {
17629
- namespace: string;
17630
- types: T;
17631
- }
17632
- interface ResolverNamespaceResult<R> {
17633
- namespace: string;
17634
- resolvers: R;
17635
- }
17636
- interface GeneratorAuthInput {
17637
- name: string;
17638
- userProfile?: {
17639
- typeName: string;
17640
- namespace: string;
17641
- usernameField: string;
17642
- };
17643
- machineUsers?: Record<string, {
17644
- attributes: Record<string, unknown>;
17645
- }>;
17646
- oauth2Clients?: Record<string, OAuth2ClientInput>;
17647
- idProvider?: IdProvider;
17648
- }
17649
- type DependencyKind = "tailordb" | "resolver" | "executor";
17650
- type ArrayIncludes<T extends readonly unknown[], U> = T extends readonly [infer First, ...infer Rest] ? First extends U ? true : ArrayIncludes<Rest, U> : false;
17651
- type HasDependency<Deps extends readonly DependencyKind[], D extends DependencyKind> = ArrayIncludes<Deps, D>;
17652
- interface TailorDBProcessMethods<T, Ts> {
17653
- processType(args: {
17654
- type: TailorDBType;
17655
- namespace: string;
17656
- source: TypeSourceInfoEntry; /** Plugin attachments configured on this type via .plugin() method */
17657
- plugins: readonly PluginAttachment[];
17658
- }): T | Promise<T>;
17659
- processTailorDBNamespace?(args: {
17660
- namespace: string;
17661
- types: Record<string, T>;
17662
- }): Ts | Promise<Ts>;
17663
- }
17664
- interface ResolverProcessMethods<R, Rs> {
17665
- processResolver(args: {
17666
- resolver: Resolver;
17667
- namespace: string;
17668
- }): R | Promise<R>;
17669
- processResolverNamespace?(args: {
17670
- namespace: string;
17671
- resolvers: Record<string, R>;
17672
- }): Rs | Promise<Rs>;
17673
- }
17674
- interface ExecutorProcessMethods<E> {
17675
- processExecutor(executor: Executor): E | Promise<E>;
17676
- }
17677
- type SelectMethods<Deps extends readonly DependencyKind[], T, R, E, Ts, Rs> = (HasDependency<Deps, "tailordb"> extends true ? TailorDBProcessMethods<T, Ts> : object) & (HasDependency<Deps, "resolver"> extends true ? ResolverProcessMethods<R, Rs> : object) & (HasDependency<Deps, "executor"> extends true ? ExecutorProcessMethods<E> : object);
17678
- interface TailorDBInputPart<Ts> {
17679
- tailordb: TailorDBNamespaceResult<Ts>[];
17680
- }
17681
- interface ResolverInputPart<Rs> {
17682
- resolver: ResolverNamespaceResult<Rs>[];
17683
- }
17684
- interface ExecutorInputPart<E> {
17685
- executor: E[];
17686
- }
17687
- interface AuthPart {
17688
- auth?: GeneratorAuthInput;
17689
- }
17690
- type SelectInput<Deps extends readonly DependencyKind[], Ts, Rs, E> = (HasDependency<Deps, "tailordb"> extends true ? TailorDBInputPart<Ts> : object) & (HasDependency<Deps, "resolver"> extends true ? ResolverInputPart<Rs> : object) & (HasDependency<Deps, "executor"> extends true ? ExecutorInputPart<E> : object) & AuthPart;
17691
- /** Input type for TailorDB-only generators */
17692
- type TailorDBInput<Ts> = TailorDBInputPart<Ts> & AuthPart;
17693
- /** Input type for Resolver-only generators */
17694
- type ResolverInput<Rs> = ResolverInputPart<Rs> & AuthPart;
17695
- /** Input type for Executor-only generators */
17696
- type ExecutorInput<E> = ExecutorInputPart<E> & AuthPart;
17697
- /** Input type for full generators (TailorDB + Resolver + Executor) */
17698
- type FullInput<Ts, Rs, E> = TailorDBInputPart<Ts> & ResolverInputPart<Rs> & ExecutorInputPart<E> & AuthPart;
17699
- /** Arguments type for aggregate method */
17700
- interface AggregateArgs<Input> {
17701
- input: Input;
17702
- baseDir: string;
17703
- configPath: string;
17704
- }
17705
- interface CodeGeneratorCore {
17706
- readonly id: string;
17707
- readonly description: string;
17708
- }
17709
- /**
17710
- * Generator interface with dependencies-based conditional methods.
17711
- * @template Deps - Dependencies array (e.g., ['tailordb'], ['tailordb', 'resolver'])
17712
- * @template T - Return type of processType
17713
- * @template R - Return type of processResolver
17714
- * @template E - Return type of processExecutor
17715
- * @template Ts - Return type of processTailorDBNamespace (default: Record<string, T>)
17716
- * @template Rs - Return type of processResolverNamespace (default: Record<string, R>)
17717
- */
17718
- type CodeGenerator<Deps extends readonly DependencyKind[], T = unknown, R = unknown, E = unknown, Ts = Record<string, T>, Rs = Record<string, R>> = CodeGeneratorCore & SelectMethods<Deps, T, R, E, Ts, Rs> & {
17719
- readonly dependencies: Deps;
17720
- aggregate(args: {
17721
- input: SelectInput<Deps, Ts, Rs, E>;
17722
- baseDir: string;
17723
- configPath: string;
17724
- }): GeneratorResult | Promise<GeneratorResult>;
17725
- };
17726
- /** TailorDB-only generator */
17727
- type TailorDBGenerator<T = unknown, Ts = Record<string, T>> = CodeGenerator<readonly ["tailordb"], T, never, never, Ts, never>;
17728
- /** Resolver-only generator */
17729
- type ResolverGenerator<R = unknown, Rs = Record<string, R>> = CodeGenerator<readonly ["resolver"], never, R, never, never, Rs>;
17730
- /** Executor-only generator */
17731
- type ExecutorGenerator<E = unknown> = CodeGenerator<readonly ["executor"], never, never, E, never, never>;
17732
- /** TailorDB + Resolver generator */
17733
- type TailorDBResolverGenerator<T = unknown, R = unknown, Ts = Record<string, T>, Rs = Record<string, R>> = CodeGenerator<readonly ["tailordb", "resolver"], T, R, never, Ts, Rs>;
17734
- /** Full generator (all dependencies) */
17735
- type FullCodeGenerator<T = unknown, R = unknown, E = unknown, Ts = Record<string, T>, Rs = Record<string, R>> = CodeGenerator<readonly ["tailordb", "resolver", "executor"], T, R, E, Ts, Rs>;
17736
- //#endregion
17737
- //#region src/cli/commands/generate/options.d.ts
17738
- type GenerateOptions = {
17739
- configPath?: string;
17740
- watch?: boolean;
17741
- };
17742
- //#endregion
17743
- //#region src/cli/commands/generate/service.d.ts
17744
- /**
17745
- * Run code generation using the Tailor configuration and generators.
17746
- * @param options - Generation options
17747
- * @returns Promise that resolves when generation (and watch, if enabled) completes
17748
- */
17749
- declare function generate(options?: GenerateOptions): Promise<void>;
17750
- //#endregion
17751
- //#region src/cli/shared/type-generator.d.ts
17596
+ //#region src/cli/commands/tailordb/migrate/diff-calculator.d.ts
17752
17597
  /**
17753
- * Options for generating user type definitions
17598
+ * Diff calculator and formatter for TailorDB schema migrations
17599
+ *
17600
+ * This module provides utilities for formatting and displaying migration diffs.
17601
+ * The actual diff calculation is performed by snapshot.ts.
17754
17602
  */
17755
- interface GenerateUserTypesOptions {
17756
- /** Application config */
17757
- config: AppConfig;
17758
- /** Path to Tailor config file */
17759
- configPath: string;
17760
- }
17761
17603
  /**
17762
- * Generate user type definitions from the app config and write them to disk.
17763
- * @param options - Generation options
17764
- * @returns Promise that resolves when types are generated
17604
+ * Current schema snapshot format version
17765
17605
  */
17766
- declare function generateUserTypes(options: GenerateUserTypesOptions): Promise<void>;
17767
- //#endregion
17768
- //#region src/cli/commands/show.d.ts
17769
- interface ShowOptions {
17770
- workspaceId?: string;
17771
- profile?: string;
17772
- configPath?: string;
17773
- }
17774
- interface WorkspaceInfo$1 {
17775
- workspaceId: string;
17776
- workspaceName: string;
17777
- workspaceRegion?: string;
17778
- }
17779
- interface ApplicationInfo {
17780
- name: string;
17781
- domain: string;
17782
- url: string;
17783
- auth: string;
17784
- cors: string[];
17785
- allowedIpAddresses: string[];
17786
- disableIntrospection: boolean;
17787
- createdAt: Date | null;
17788
- updatedAt: Date | null;
17789
- }
17790
- interface ShowInfo extends ApplicationInfo, WorkspaceInfo$1 {}
17606
+ declare const SCHEMA_SNAPSHOT_VERSION: 1;
17791
17607
  /**
17792
- * Show applied application information for the current workspace.
17793
- * @param options - Show options
17794
- * @returns Application information
17608
+ * Change kind in migration diff
17795
17609
  */
17796
- declare function show(options?: ShowOptions): Promise<ShowInfo>;
17797
- //#endregion
17798
- //#region src/cli/commands/remove.d.ts
17799
- interface RemoveOptions {
17800
- workspaceId?: string;
17801
- profile?: string;
17802
- configPath?: string;
17803
- }
17610
+ type DiffChangeKind = "type_added" | "type_removed" | "type_modified" | "field_added" | "field_removed" | "field_modified" | "index_added" | "index_removed" | "index_modified" | "file_added" | "file_removed" | "file_modified" | "relationship_added" | "relationship_removed" | "relationship_modified" | "permission_modified";
17804
17611
  /**
17805
- * Remove all resources managed by the current application.
17806
- * @param options - Remove options
17807
- * @returns Promise that resolves when removal completes
17612
+ * Single change in migration diff
17808
17613
  */
17809
- declare function remove(options?: RemoveOptions): Promise<void>;
17810
- //#endregion
17811
- //#region src/cli/commands/workspace/transform.d.ts
17812
- interface WorkspaceInfo {
17813
- id: string;
17814
- name: string;
17815
- region: string;
17816
- createdAt: Date | null;
17817
- updatedAt: Date | null;
17818
- }
17819
- interface WorkspaceDetails extends WorkspaceInfo {
17820
- deleteProtection: boolean;
17821
- organizationId: string;
17822
- folderId: string;
17614
+ interface DiffChange {
17615
+ kind: DiffChangeKind;
17616
+ typeName: string;
17617
+ fieldName?: string;
17618
+ /** Index name for index_* changes */
17619
+ indexName?: string;
17620
+ /** Relationship name for relationship_* changes */
17621
+ relationshipName?: string;
17622
+ /** Relationship type for relationship_* changes */
17623
+ relationshipType?: "forward" | "backward";
17624
+ before?: unknown;
17625
+ after?: unknown;
17626
+ reason?: string;
17823
17627
  }
17824
- //#endregion
17825
- //#region src/cli/commands/workspace/create.d.ts
17826
17628
  /**
17827
- * Schema for workspace creation options
17828
- * - name: 3-63 chars, lowercase alphanumeric and hyphens, cannot start/end with hyphen
17829
- * - organizationId, folderId: optional UUIDs
17830
- */
17831
- declare const createWorkspaceOptionsSchema: z.ZodObject<{
17832
- name: z.ZodString;
17833
- region: z.ZodString;
17834
- deleteProtection: z.ZodOptional<z.ZodBoolean>;
17835
- organizationId: z.ZodOptional<z.ZodUUID>;
17836
- folderId: z.ZodOptional<z.ZodUUID>;
17837
- }, z.core.$strip>;
17838
- type CreateWorkspaceOptions = z.input<typeof createWorkspaceOptionsSchema>;
17839
- /**
17840
- * Create a new workspace with the given options.
17841
- * @param options - Workspace creation options
17842
- * @returns Created workspace info
17843
- */
17844
- declare function createWorkspace(options: CreateWorkspaceOptions): Promise<WorkspaceInfo>;
17845
- //#endregion
17846
- //#region src/cli/shared/args.d.ts
17847
- /**
17848
- * Schema for sort order (`asc` or `desc`).
17629
+ * Migration diff - changes between two schema versions
17630
+ * Stored as XXXX/diff.json (e.g., 0001/diff.json)
17849
17631
  */
17850
- declare const orderArg: z.ZodEnum<{
17851
- asc: "asc";
17852
- desc: "desc";
17853
- }>;
17854
- type Order = z.infer<typeof orderArg>;
17855
- //#endregion
17856
- //#region src/cli/commands/workspace/list.d.ts
17857
- interface ListWorkspacesOptions {
17858
- order?: Order;
17859
- limit?: number;
17632
+ interface MigrationDiff {
17633
+ /** Format version for future compatibility */
17634
+ version: typeof SCHEMA_SNAPSHOT_VERSION;
17635
+ namespace: string;
17636
+ createdAt: string;
17637
+ description?: string;
17638
+ changes: DiffChange[];
17639
+ /** Whether there are breaking changes (data loss or constraint violations possible) */
17640
+ hasBreakingChanges: boolean;
17641
+ /** List of breaking changes */
17642
+ breakingChanges: BreakingChangeInfo[];
17643
+ /** Whether there are non-breaking changes that may cause data loss (e.g. field/type removal) */
17644
+ hasWarnings: boolean;
17645
+ /** List of non-breaking warnings */
17646
+ warnings: WarningChangeInfo[];
17647
+ /** Whether a migration script is required to handle data migration */
17648
+ requiresMigrationScript: boolean;
17860
17649
  }
17861
17650
  /**
17862
- * List workspaces with an optional order and limit.
17863
- * @param options - Workspace listing options
17864
- * @returns List of workspaces
17865
- */
17866
- declare function listWorkspaces(options?: ListWorkspacesOptions): Promise<WorkspaceInfo[]>;
17867
- //#endregion
17868
- //#region src/cli/commands/workspace/delete.d.ts
17869
- declare const deleteWorkspaceOptionsSchema: z.ZodObject<{
17870
- workspaceId: z.ZodUUID;
17871
- }, z.core.$strip>;
17872
- type DeleteWorkspaceOptions = z.input<typeof deleteWorkspaceOptionsSchema>;
17873
- /**
17874
- * Delete a workspace by ID.
17875
- * @param options - Workspace deletion options
17876
- * @returns Promise that resolves when deletion completes
17877
- */
17878
- declare function deleteWorkspace(options: DeleteWorkspaceOptions): Promise<void>;
17879
- //#endregion
17880
- //#region src/cli/commands/workspace/get.d.ts
17881
- declare const getWorkspaceOptionsSchema: z.ZodObject<{
17882
- workspaceId: z.ZodOptional<z.ZodUUID>;
17883
- profile: z.ZodOptional<z.ZodString>;
17884
- }, z.core.$strip>;
17885
- type GetWorkspaceOptions = z.input<typeof getWorkspaceOptionsSchema>;
17886
- /**
17887
- * Get detailed information about a workspace.
17888
- * @param options - Workspace get options
17889
- * @returns Workspace details
17890
- */
17891
- declare function getWorkspace(options: GetWorkspaceOptions): Promise<WorkspaceDetails>;
17892
- //#endregion
17893
- //#region src/cli/commands/workspace/restore.d.ts
17894
- declare const restoreWorkspaceOptionsSchema: z.ZodObject<{
17895
- workspaceId: z.ZodUUID;
17896
- }, z.core.$strip>;
17897
- type RestoreWorkspaceOptions = z.input<typeof restoreWorkspaceOptionsSchema>;
17898
- /**
17899
- * Restore a deleted workspace by ID.
17900
- * @param options - Workspace restore options
17901
- * @returns Promise that resolves when restoration completes
17651
+ * Breaking change information in migration diff
17902
17652
  */
17903
- declare function restoreWorkspace(options: RestoreWorkspaceOptions): Promise<void>;
17904
- //#endregion
17905
- //#region src/cli/commands/workspace/user/transform.d.ts
17906
- interface UserInfo {
17907
- userId: string;
17908
- email: string;
17909
- role: string;
17653
+ interface BreakingChangeInfo {
17654
+ typeName: string;
17655
+ fieldName?: string;
17656
+ reason: string;
17657
+ /** If true, this change is not supported and migration generation will fail */
17658
+ unsupported?: boolean;
17659
+ /** If true, show 3-step migration instructions for this unsupported change */
17660
+ showThreeStepHint?: boolean;
17910
17661
  }
17911
- //#endregion
17912
- //#region src/cli/commands/workspace/user/list.d.ts
17913
- declare const listUsersOptionsSchema: z.ZodObject<{
17914
- workspaceId: z.ZodOptional<z.ZodUUID>;
17915
- profile: z.ZodOptional<z.ZodString>;
17916
- order: z.ZodOptional<z.ZodEnum<{
17917
- asc: "asc";
17918
- desc: "desc";
17919
- }>>;
17920
- limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
17921
- }, z.core.$strip>;
17922
- type ListUsersOptions = z.input<typeof listUsersOptionsSchema>;
17923
- /**
17924
- * List users in a workspace with an optional order and limit.
17925
- * @param options - User listing options
17926
- * @returns List of workspace users
17927
- */
17928
- declare function listUsers(options: ListUsersOptions): Promise<UserInfo[]>;
17929
- //#endregion
17930
- //#region src/cli/commands/workspace/user/invite.d.ts
17931
- declare const inviteUserOptionsSchema: z.ZodObject<{
17932
- workspaceId: z.ZodOptional<z.ZodUUID>;
17933
- profile: z.ZodOptional<z.ZodString>;
17934
- email: z.ZodEmail;
17935
- role: z.ZodEnum<{
17936
- admin: "admin";
17937
- editor: "editor";
17938
- viewer: "viewer";
17939
- }>;
17940
- }, z.core.$strip>;
17941
- type InviteUserOptions = z.input<typeof inviteUserOptionsSchema>;
17942
- /**
17943
- * Invite a user to a workspace.
17944
- * @param options - User invite options
17945
- * @returns Promise that resolves when invitation is sent
17946
- */
17947
- declare function inviteUser(options: InviteUserOptions): Promise<void>;
17948
- //#endregion
17949
- //#region src/cli/commands/workspace/user/update.d.ts
17950
- declare const updateUserOptionsSchema: z.ZodObject<{
17951
- workspaceId: z.ZodOptional<z.ZodUUID>;
17952
- profile: z.ZodOptional<z.ZodString>;
17953
- email: z.ZodString;
17954
- role: z.ZodEnum<{
17955
- admin: "admin";
17956
- editor: "editor";
17957
- viewer: "viewer";
17958
- }>;
17959
- }, z.core.$strip>;
17960
- type UpdateUserOptions = z.input<typeof updateUserOptionsSchema>;
17961
- /**
17962
- * Update a user's role in a workspace.
17963
- * @param options - User update options
17964
- * @returns Promise that resolves when update completes
17965
- */
17966
- declare function updateUser(options: UpdateUserOptions): Promise<void>;
17967
- //#endregion
17968
- //#region src/cli/commands/workspace/user/remove.d.ts
17969
- declare const removeUserOptionsSchema: z.ZodObject<{
17970
- workspaceId: z.ZodOptional<z.ZodUUID>;
17971
- profile: z.ZodOptional<z.ZodString>;
17972
- email: z.ZodString;
17973
- }, z.core.$strip>;
17974
- type RemoveUserOptions = z.input<typeof removeUserOptionsSchema>;
17975
17662
  /**
17976
- * Remove a user from a workspace.
17977
- * @param options - User remove options
17978
- * @returns Promise that resolves when removal completes
17979
- */
17980
- declare function removeUser(options: RemoveUserOptions): Promise<void>;
17981
- //#endregion
17982
- //#region src/cli/commands/workspace/app/transform.d.ts
17983
- interface AppInfo {
17984
- name: string;
17985
- domain: string;
17986
- authNamespace: string;
17987
- createdAt: Date | null;
17988
- updatedAt: Date | null;
17989
- }
17990
- interface AppHealthInfo {
17991
- name: string;
17992
- status: string;
17993
- currentServingSchemaUpdatedAt: Date | null;
17994
- lastAttemptStatus: string;
17995
- lastAttemptAt: Date | null;
17996
- lastAttemptError: string;
17663
+ * Warning change information in migration diff.
17664
+ *
17665
+ * Warnings are non-breaking changes that may still cause data loss
17666
+ * (e.g. removing a field or type). Unlike breaking changes, a migration
17667
+ * script is not required, but writing one is recommended if you need to
17668
+ * preserve or transform data before the change applies.
17669
+ */
17670
+ interface WarningChangeInfo {
17671
+ typeName: string;
17672
+ fieldName?: string;
17673
+ reason: string;
17997
17674
  }
17998
- //#endregion
17999
- //#region src/cli/commands/workspace/app/list.d.ts
18000
- declare const listAppsOptionsSchema: z.ZodObject<{
18001
- workspaceId: z.ZodOptional<z.ZodUUID>;
18002
- profile: z.ZodOptional<z.ZodString>;
18003
- order: z.ZodOptional<z.ZodEnum<{
18004
- asc: "asc";
18005
- desc: "desc";
18006
- }>>;
18007
- limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
18008
- }, z.core.$strip>;
18009
- type ListAppsOptions = z.input<typeof listAppsOptionsSchema>;
18010
17675
  /**
18011
- * List applications in a workspace with an optional order and limit.
18012
- * @param options - Application listing options
18013
- * @returns List of applications
17676
+ * Check if a migration diff has any changes
17677
+ * @param {MigrationDiff} diff - Migration diff to check
17678
+ * @returns {boolean} True if diff has changes
18014
17679
  */
18015
- declare function listApps(options: ListAppsOptions): Promise<AppInfo[]>;
18016
- //#endregion
18017
- //#region src/cli/commands/workspace/app/health.d.ts
18018
- declare const healthOptionsSchema: z.ZodObject<{
18019
- workspaceId: z.ZodOptional<z.ZodUUID>;
18020
- profile: z.ZodOptional<z.ZodString>;
18021
- name: z.ZodString;
18022
- }, z.core.$strip>;
18023
- type HealthOptions = z.input<typeof healthOptionsSchema>;
17680
+ declare function hasChanges(diff: MigrationDiff): boolean;
18024
17681
  /**
18025
- * Get application schema health status.
18026
- * @param options - Health check options
18027
- * @returns Application health information
17682
+ * Format a migration diff for display
17683
+ * @param {MigrationDiff} diff - Migration diff to format
17684
+ * @returns {string} Formatted diff string
18028
17685
  */
18029
- declare function getAppHealth(options: HealthOptions): Promise<AppHealthInfo>;
18030
- //#endregion
18031
- //#region src/cli/commands/function/transform.d.ts
18032
- interface FunctionRegistryInfo {
18033
- name: string;
18034
- description: string;
18035
- sizeBytes: string;
18036
- contentHash: string;
18037
- createdAt: Date | null;
18038
- updatedAt: Date | null;
18039
- }
18040
- //#endregion
18041
- //#region src/cli/commands/function/get.d.ts
18042
- declare const getFunctionRegistryOptionsSchema: z.ZodObject<{
18043
- workspaceId: z.ZodOptional<z.ZodUUID>;
18044
- profile: z.ZodOptional<z.ZodString>;
18045
- name: z.ZodString;
18046
- }, z.core.$strip>;
18047
- type GetFunctionRegistryOptions = z.input<typeof getFunctionRegistryOptionsSchema>;
17686
+ declare function formatMigrationDiff(diff: MigrationDiff): string;
18048
17687
  /**
18049
- * Get a function registry by name.
18050
- * @param options - Function registry get options
18051
- * @returns Function registry info
17688
+ * Format a summary of the migration diff
17689
+ * @param {MigrationDiff} diff - Migration diff to summarize
17690
+ * @returns {string} Formatted summary string
18052
17691
  */
18053
- declare function getFunctionRegistry(options: GetFunctionRegistryOptions): Promise<FunctionRegistryInfo>;
17692
+ declare function formatDiffSummary(diff: MigrationDiff): string;
18054
17693
  //#endregion
18055
- //#region src/cli/commands/function/list.d.ts
18056
- declare const listFunctionRegistriesOptionsSchema: z.ZodObject<{
18057
- workspaceId: z.ZodOptional<z.ZodUUID>;
18058
- profile: z.ZodOptional<z.ZodString>;
18059
- order: z.ZodOptional<z.ZodEnum<{
18060
- asc: "asc";
18061
- desc: "desc";
18062
- }>>;
18063
- limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
18064
- }, z.core.$strip>;
18065
- type ListFunctionRegistriesOptions = z.input<typeof listFunctionRegistriesOptionsSchema>;
17694
+ //#region src/cli/commands/tailordb/migrate/types.d.ts
18066
17695
  /**
18067
- * List function registries in a workspace with optional pagination.
18068
- * @param options - Function registry listing options
18069
- * @returns List of function registries
17696
+ * Label key for storing migration state in TailorDB Service metadata
18070
17697
  */
18071
- declare function listFunctionRegistries(options: ListFunctionRegistriesOptions): Promise<FunctionRegistryInfo[]>;
17698
+ declare const MIGRATION_LABEL_KEY = "sdk-migration";
18072
17699
  //#endregion
18073
- //#region src/cli/commands/machineuser/list.d.ts
18074
- interface ListMachineUsersOptions {
18075
- workspaceId?: string;
18076
- profile?: string;
18077
- configPath?: string;
18078
- order?: Order;
18079
- limit?: number;
18080
- }
18081
- interface MachineUserInfo {
18082
- name: string;
18083
- clientId: string;
18084
- clientSecret: string;
18085
- createdAt: Date | null;
18086
- updatedAt: Date | null;
18087
- attributes: Record<string, unknown>;
18088
- }
17700
+ //#region src/cli/commands/tailordb/migrate/snapshot.d.ts
18089
17701
  /**
18090
- * List machine users for the current application.
18091
- * @param options - Machine user listing options
18092
- * @returns List of machine users
17702
+ * Initial schema migration number (0000)
18093
17703
  */
18094
- declare function listMachineUsers(options?: ListMachineUsersOptions): Promise<MachineUserInfo[]>;
18095
- //#endregion
18096
- //#region src/cli/commands/machineuser/token.d.ts
18097
- interface GetMachineUserTokenOptions {
18098
- name: string;
18099
- workspaceId?: string;
18100
- profile?: string;
18101
- configPath?: string;
18102
- }
18103
- interface MachineUserTokenInfo {
18104
- accessToken: string;
18105
- tokenType: string;
18106
- expiresAt: string;
18107
- }
17704
+ declare const INITIAL_SCHEMA_NUMBER = 0;
18108
17705
  /**
18109
- * Get a machine user access token for the current application.
18110
- * @param options - Token retrieval options
18111
- * @returns Machine user token info
17706
+ * Migration file names (used within migration directories)
18112
17707
  */
18113
- declare function getMachineUserToken(options: GetMachineUserTokenOptions): Promise<MachineUserTokenInfo>;
18114
- //#endregion
18115
- //#region src/cli/commands/oauth2client/transform.d.ts
18116
- interface OAuth2ClientInfo {
18117
- name: string;
18118
- description: string;
18119
- clientId: string;
18120
- grantTypes: string[];
18121
- redirectUris: string[];
18122
- createdAt: Date | null;
18123
- }
18124
- interface OAuth2ClientCredentials {
18125
- name: string;
18126
- description: string;
18127
- clientId: string;
18128
- clientSecret: string;
18129
- grantTypes: string[];
18130
- redirectUris: string[];
18131
- createdAt: Date | null;
18132
- }
18133
- //#endregion
18134
- //#region src/cli/commands/oauth2client/get.d.ts
18135
- interface GetOAuth2ClientOptions {
18136
- name: string;
18137
- workspaceId?: string;
18138
- profile?: string;
18139
- configPath?: string;
18140
- }
17708
+ declare const SCHEMA_FILE_NAME = "schema.json";
17709
+ /** File name for migration diff metadata. */
17710
+ declare const DIFF_FILE_NAME = "diff.json";
17711
+ /** File name for migration script. */
17712
+ declare const MIGRATE_FILE_NAME = "migrate.ts";
17713
+ /** File name for generated DB type definitions. */
17714
+ declare const DB_TYPES_FILE_NAME = "db.ts";
18141
17715
  /**
18142
- * Get OAuth2 client credentials for the current application.
18143
- * @param options - OAuth2 client lookup options
18144
- * @returns OAuth2 client credentials
17716
+ * Hook configuration in schema snapshot
18145
17717
  */
18146
- declare function getOAuth2Client(options: GetOAuth2ClientOptions): Promise<OAuth2ClientCredentials>;
18147
- //#endregion
18148
- //#region src/cli/commands/oauth2client/list.d.ts
18149
- interface ListOAuth2ClientsOptions {
18150
- workspaceId?: string;
18151
- profile?: string;
18152
- configPath?: string;
18153
- order?: Order;
18154
- limit?: number;
17718
+ interface SnapshotHook {
17719
+ expr: string;
18155
17720
  }
18156
17721
  /**
18157
- * List OAuth2 clients for the current application.
18158
- * @param options - OAuth2 client listing options
18159
- * @returns List of OAuth2 clients
17722
+ * Validation configuration in schema snapshot
18160
17723
  */
18161
- declare function listOAuth2Clients(options?: ListOAuth2ClientsOptions): Promise<OAuth2ClientInfo[]>;
18162
- //#endregion
18163
- //#region src/cli/commands/workflow/transform.d.ts
18164
- interface WorkflowListInfo {
18165
- name: string;
18166
- mainJob: string;
18167
- jobFunctions: number;
18168
- updatedAt: Date | null;
18169
- }
18170
- interface WorkflowInfo {
18171
- name: string;
18172
- id: string;
18173
- mainJob: string;
18174
- jobFunctions: Record<string, string>;
18175
- createdAt: Date | null;
18176
- updatedAt: Date | null;
17724
+ interface SnapshotValidation {
17725
+ script: {
17726
+ expr: string;
17727
+ };
17728
+ errorMessage: string;
18177
17729
  }
18178
- interface WorkflowJobExecutionInfo {
18179
- id: string;
18180
- stackedJobName: string;
18181
- status: string;
18182
- executionId: string;
18183
- startedAt: Date | null;
18184
- finishedAt: Date | null;
17730
+ /**
17731
+ * Serial configuration in schema snapshot
17732
+ */
17733
+ interface SnapshotSerial {
17734
+ start: number;
17735
+ maxValue?: number;
17736
+ format?: string;
18185
17737
  }
18186
- interface WorkflowExecutionInfo {
18187
- id: string;
18188
- workflowName: string;
18189
- status: string;
18190
- jobExecutions: number;
18191
- startedAt: Date | null;
18192
- finishedAt: Date | null;
17738
+ /**
17739
+ * Enum value with optional description in schema snapshot
17740
+ */
17741
+ interface SnapshotEnumValue {
17742
+ value: string;
17743
+ description?: string;
18193
17744
  }
18194
- //#endregion
18195
- //#region src/cli/commands/workflow/list.d.ts
18196
- interface ListWorkflowsOptions {
18197
- workspaceId?: string;
18198
- profile?: string;
18199
- order?: Order;
18200
- limit?: number;
17745
+ /**
17746
+ * Field configuration in schema snapshot
17747
+ */
17748
+ interface SnapshotFieldConfig {
17749
+ type: string;
17750
+ required: boolean;
17751
+ array?: boolean;
17752
+ index?: boolean;
17753
+ unique?: boolean;
17754
+ allowedValues?: SnapshotEnumValue[];
17755
+ foreignKey?: boolean;
17756
+ foreignKeyType?: string;
17757
+ foreignKeyField?: string;
17758
+ description?: string;
17759
+ vector?: boolean;
17760
+ hooks?: {
17761
+ create?: SnapshotHook;
17762
+ update?: SnapshotHook;
17763
+ };
17764
+ validate?: SnapshotValidation[];
17765
+ serial?: SnapshotSerial;
17766
+ scale?: number;
17767
+ /** Nested fields (recursive) */
17768
+ fields?: Record<string, SnapshotFieldConfig>;
18201
17769
  }
18202
17770
  /**
18203
- * List workflows in the workspace and return CLI-friendly info.
18204
- * @param options - Workflow listing options
18205
- * @returns List of workflows
17771
+ * Index configuration in schema snapshot
18206
17772
  */
18207
- declare function listWorkflows(options?: ListWorkflowsOptions): Promise<WorkflowListInfo[]>;
18208
- //#endregion
18209
- //#region src/cli/commands/workflow/get.d.ts
18210
- type WorkflowLike$2 = {
18211
- name: string;
18212
- };
18213
- type GetWorkflowTypedOptions<W extends WorkflowLike$2 = WorkflowLike$2> = {
18214
- workflow: W;
18215
- workspaceId?: string;
18216
- profile?: string;
18217
- };
17773
+ interface SnapshotIndexConfig {
17774
+ fields: string[];
17775
+ unique?: boolean;
17776
+ }
18218
17777
  /**
18219
- * @deprecated Use GetWorkflowTypedOptions instead.
17778
+ * Relationship configuration in schema snapshot
18220
17779
  */
18221
- interface GetWorkflowOptions {
18222
- name: string;
18223
- workspaceId?: string;
18224
- profile?: string;
17780
+ interface SnapshotRelationship {
17781
+ targetType: string;
17782
+ targetField: string;
17783
+ sourceField: string;
17784
+ isArray: boolean;
17785
+ description: string;
18225
17786
  }
18226
17787
  /**
18227
- * Get a workflow by name and return CLI-friendly info.
18228
- * @param options - Workflow lookup options
18229
- * @returns Workflow information
17788
+ * Field-reference operand in a permission condition. Always an object with
17789
+ * exactly one of `user` / `record` / `newRecord` / `oldRecord` keys.
18230
17790
  */
18231
- declare function getWorkflow<W extends WorkflowLike$2>(options: GetWorkflowTypedOptions<W>): Promise<WorkflowInfo>;
18232
- declare function getWorkflow(options: GetWorkflowOptions): Promise<WorkflowInfo>;
18233
- //#endregion
18234
- //#region src/cli/commands/workflow/start.d.ts
18235
- type WorkflowLike$1 = {
18236
- name: string;
18237
- mainJob: {
18238
- body: unknown;
18239
- };
18240
- };
18241
- type AuthInvoker$1<M extends string = string> = {
18242
- namespace: string;
18243
- machineUserName: M;
18244
- };
18245
- type WorkflowInput<W extends WorkflowLike$1> = W extends WorkflowLike$1 ? W["mainJob"]["body"] extends ((...args: infer Args) => unknown) ? Args[0] : never : never;
18246
- type StartWorkflowArgOptionForSingleWorkflow<W extends WorkflowLike$1> = WorkflowLike$1 extends W ? {
18247
- arg?: Jsonifiable;
18248
- } : undefined extends WorkflowInput<W> ? {
18249
- arg?: WorkflowInput<W>;
18250
- } : {
18251
- arg: WorkflowInput<W>;
17791
+ type SnapshotFieldRefOperand = {
17792
+ user: string;
17793
+ } | {
17794
+ record: string;
17795
+ } | {
17796
+ newRecord: string;
17797
+ } | {
17798
+ oldRecord: string;
18252
17799
  };
18253
- type StartWorkflowArgOption<W extends WorkflowLike$1> = W extends WorkflowLike$1 ? StartWorkflowArgOptionForSingleWorkflow<W> : never;
18254
17800
  /**
18255
- * @deprecated Use StartWorkflowTypedOptions instead.
17801
+ * Literal value operand (right-hand side of a permission condition). Matches
17802
+ * the SDK-level value operand surface — primitives and their arrays — as
17803
+ * defined in the Zod parser schema (RecordPermissionOperandSchema /
17804
+ * GqlPermissionOperandSchema in parser/service/tailordb/schema.ts).
18256
17805
  */
18257
- interface StartWorkflowOptions {
18258
- name: string;
18259
- machineUser: string;
18260
- arg?: Jsonifiable;
18261
- workspaceId?: string;
18262
- profile?: string;
18263
- configPath?: string;
18264
- interval?: number;
18265
- }
18266
- type StartWorkflowTypedBaseOptions<W extends WorkflowLike$1> = {
18267
- workflow: W;
18268
- authInvoker: AuthInvoker$1<string>;
18269
- workspaceId?: string;
18270
- profile?: string;
18271
- interval?: number;
18272
- };
18273
- type StartWorkflowTypedOptions<W extends WorkflowLike$1 = WorkflowLike$1> = W extends WorkflowLike$1 ? StartWorkflowTypedBaseOptions<W> & StartWorkflowArgOption<W> : never;
18274
- interface WaitOptions {
18275
- showProgress?: boolean;
17806
+ type SnapshotValueOperand = string | boolean | string[] | boolean[];
17807
+ /**
17808
+ * Permission operand union. Either a field-ref object or a literal value.
17809
+ */
17810
+ type SnapshotPermissionOperand = SnapshotFieldRefOperand | SnapshotValueOperand;
17811
+ /**
17812
+ * Permission operators
17813
+ */
17814
+ type SnapshotPermissionOperator = "eq" | "ne" | "in" | "nin" | "hasAny" | "nhasAny";
17815
+ /**
17816
+ * Permission condition tuple
17817
+ */
17818
+ type SnapshotPermissionCondition = readonly [SnapshotPermissionOperand, SnapshotPermissionOperator, SnapshotPermissionOperand];
17819
+ /**
17820
+ * Action permission policy
17821
+ */
17822
+ interface SnapshotActionPermission {
17823
+ conditions: readonly SnapshotPermissionCondition[];
17824
+ description?: string;
17825
+ permit: "allow" | "deny";
18276
17826
  }
18277
- interface StartWorkflowResultWithWait {
18278
- executionId: string;
18279
- wait: (options?: WaitOptions) => Promise<WorkflowExecutionInfo>;
17827
+ /**
17828
+ * Record-level permission configuration
17829
+ */
17830
+ interface SnapshotRecordPermission {
17831
+ create: readonly SnapshotActionPermission[];
17832
+ read: readonly SnapshotActionPermission[];
17833
+ update: readonly SnapshotActionPermission[];
17834
+ delete: readonly SnapshotActionPermission[];
18280
17835
  }
18281
17836
  /**
18282
- * Start a workflow and return a handle to wait for completion.
18283
- * @param options - Start options
18284
- * @returns Start result with wait helper
17837
+ * GQL permission actions
18285
17838
  */
18286
- declare function startWorkflow<W extends WorkflowLike$1>(options: StartWorkflowTypedOptions<W>): Promise<StartWorkflowResultWithWait>;
18287
- declare function startWorkflow(options: StartWorkflowOptions): Promise<StartWorkflowResultWithWait>;
18288
- //#endregion
18289
- //#region src/cli/commands/workflow/executions.d.ts
18290
- type WorkflowLike = {
18291
- name: string;
18292
- };
18293
- type ListWorkflowExecutionsTypedOptions<W extends WorkflowLike = WorkflowLike> = {
18294
- workflow?: W;
18295
- status?: string;
18296
- workspaceId?: string;
18297
- profile?: string;
18298
- order?: Order;
18299
- limit?: number;
18300
- };
17839
+ type SnapshotGqlAction = "read" | "create" | "update" | "delete" | "aggregate" | "bulkUpsert" | "all";
18301
17840
  /**
18302
- * @deprecated Use ListWorkflowExecutionsTypedOptions instead.
17841
+ * GQL permission policy
18303
17842
  */
18304
- interface ListWorkflowExecutionsOptions {
18305
- workspaceId?: string;
18306
- profile?: string;
18307
- workflowName?: string;
18308
- status?: string;
18309
- order?: Order;
18310
- limit?: number;
17843
+ interface SnapshotGqlPermissionPolicy {
17844
+ conditions: readonly SnapshotPermissionCondition[];
17845
+ actions: readonly SnapshotGqlAction[];
17846
+ permit: "allow" | "deny";
17847
+ description?: string;
18311
17848
  }
18312
- interface GetWorkflowExecutionOptions {
18313
- executionId: string;
18314
- workspaceId?: string;
18315
- profile?: string;
18316
- interval?: number;
18317
- logs?: boolean;
17849
+ /**
17850
+ * GQL permission configuration
17851
+ */
17852
+ type SnapshotGqlPermission = readonly SnapshotGqlPermissionPolicy[];
17853
+ /**
17854
+ * Type definition in schema snapshot.
17855
+ * `pluralForm` is always materialized — either set by the SDK user, derived
17856
+ * via inflection at snapshot construction, or backfilled when loading legacy
17857
+ * snapshots in `loadSnapshot`.
17858
+ */
17859
+ interface TailorDBSnapshotType {
17860
+ name: string;
17861
+ pluralForm: string;
17862
+ description?: string;
17863
+ fields: Record<string, SnapshotFieldConfig>;
17864
+ settings?: {
17865
+ aggregation?: boolean;
17866
+ bulkUpsert?: boolean;
17867
+ gqlOperations?: {
17868
+ create?: boolean;
17869
+ update?: boolean;
17870
+ delete?: boolean;
17871
+ read?: boolean;
17872
+ };
17873
+ publishEvents?: boolean;
17874
+ };
17875
+ indexes?: Record<string, SnapshotIndexConfig>;
17876
+ files?: Record<string, string>;
17877
+ forwardRelationships?: Record<string, SnapshotRelationship>;
17878
+ backwardRelationships?: Record<string, SnapshotRelationship>;
17879
+ permissions?: {
17880
+ record?: SnapshotRecordPermission;
17881
+ gql?: SnapshotGqlPermission;
17882
+ };
18318
17883
  }
18319
- interface WorkflowExecutionDetailInfo extends WorkflowExecutionInfo {
18320
- jobDetails?: (WorkflowJobExecutionInfo & {
18321
- logs?: string;
18322
- result?: string;
18323
- })[];
17884
+ /**
17885
+ * Schema snapshot - full schema state at a point in time
17886
+ * Stored as XXXX/schema.json (e.g., 0000/schema.json for initial snapshot)
17887
+ */
17888
+ interface SchemaSnapshot {
17889
+ /** Format version for future compatibility */
17890
+ version: typeof SCHEMA_SNAPSHOT_VERSION;
17891
+ namespace: string;
17892
+ createdAt: string;
17893
+ types: Record<string, TailorDBSnapshotType>;
18324
17894
  }
18325
- interface GetWorkflowExecutionResult {
18326
- execution: WorkflowExecutionDetailInfo;
18327
- wait: () => Promise<WorkflowExecutionDetailInfo>;
17895
+ /**
17896
+ * Migration file type
17897
+ */
17898
+ type MigrationFileType = "schema" | "diff" | "migrate" | "db";
17899
+ /**
17900
+ * Information about a migration
17901
+ */
17902
+ interface MigrationInfo {
17903
+ /** Migration number (e.g., 1, 2, 3) */
17904
+ number: number;
17905
+ /** Migration number as 4-digit string (e.g., "0001", "0002") */
17906
+ numberStr: string;
17907
+ /** Migration file type */
17908
+ type: MigrationFileType;
17909
+ /** Path to migration file */
17910
+ path: string;
17911
+ /** Parsed content (schema snapshot or diff) */
17912
+ content: SchemaSnapshot | MigrationDiff;
18328
17913
  }
18329
17914
  /**
18330
- * List workflow executions with optional filters.
18331
- *
18332
- * Returns at most `options.limit` items. When `limit` is omitted or 0 the
18333
- * function pages through every execution. The CLI caps this at 50 by
18334
- * default via `pagedLogArgs`; programmatic callers that want the same
18335
- * cap should pass `limit: 50` explicitly.
18336
- * @param options - Workflow execution listing options
18337
- * @returns List of workflow executions
17915
+ * Get migration directory path for a given number
17916
+ * @param {string} migrationsDir - Base migrations directory path
17917
+ * @param {number} num - Migration number
17918
+ * @returns {string} Full directory path for the migration
17919
+ */
17920
+ declare function getMigrationDirPath(migrationsDir: string, num: number): string;
17921
+ /**
17922
+ * Get migration file path for a given number and type
17923
+ * @param {string} migrationsDir - Migrations directory path
17924
+ * @param {number} num - Migration number
17925
+ * @param {MigrationFileType} type - File type
17926
+ * @returns {string} Full file path
17927
+ */
17928
+ declare function getMigrationFilePath(migrationsDir: string, num: number, type: MigrationFileType): string;
17929
+ /**
17930
+ * Create a schema snapshot from local type definitions
17931
+ * @param {Record<string, TailorDBType>} types - Local type definitions
17932
+ * @param {string} namespace - Namespace for the snapshot
17933
+ * @returns {SchemaSnapshot} Schema snapshot
17934
+ */
17935
+ declare function createSnapshotFromLocalTypes(types: Record<string, TailorDBType>, namespace: string): SchemaSnapshot;
17936
+ /**
17937
+ * Get all migration directories and their files, sorted by number
17938
+ * @param {string} migrationsDir - Migrations directory path
17939
+ * @returns {Array<{number: number, type: "schema" | "diff", path: string}>} Migration files sorted by number
17940
+ */
17941
+ declare function getMigrationFiles(migrationsDir: string): {
17942
+ number: number;
17943
+ type: "schema" | "diff";
17944
+ path: string;
17945
+ }[];
17946
+ /**
17947
+ * Get the next migration number for a directory
17948
+ * Returns INITIAL_SCHEMA_NUMBER (0) if no migrations exist
17949
+ * @param {string} migrationsDir - Migrations directory path
17950
+ * @returns {number} Next migration number
18338
17951
  */
18339
- declare function listWorkflowExecutions<W extends WorkflowLike>(options?: ListWorkflowExecutionsTypedOptions<W>): Promise<WorkflowExecutionInfo[]>;
18340
- declare function listWorkflowExecutions(options?: ListWorkflowExecutionsOptions): Promise<WorkflowExecutionInfo[]>;
17952
+ declare function getNextMigrationNumber(migrationsDir: string): number;
18341
17953
  /**
18342
- * Get a single workflow execution with optional logs.
18343
- * @param options - Workflow execution lookup options
18344
- * @returns Workflow execution with optional logs
17954
+ * Reconstruct the latest schema snapshot from all migration files
17955
+ * Returns null if no migrations exist
17956
+ * @param {string} migrationsDir - Migrations directory path
17957
+ * @param {number} [maxVersion] - Optional maximum migration version to apply
17958
+ * @returns {SchemaSnapshot | null} Reconstructed snapshot or null if no migrations exist
18345
17959
  */
18346
- declare function getWorkflowExecution(options: GetWorkflowExecutionOptions): Promise<GetWorkflowExecutionResult>;
18347
- //#endregion
18348
- //#region src/cli/commands/workflow/resume.d.ts
18349
- interface ResumeWorkflowOptions {
18350
- executionId: string;
18351
- workspaceId?: string;
18352
- profile?: string;
18353
- interval?: number;
18354
- }
18355
- interface ResumeWorkflowResultWithWait {
18356
- executionId: string;
18357
- wait: (options?: WaitOptions) => Promise<WorkflowExecutionInfo>;
18358
- }
17960
+ declare function reconstructSnapshotFromMigrations(migrationsDir: string, maxVersion?: number): SchemaSnapshot | null;
18359
17961
  /**
18360
- * Resume a suspended workflow execution and return a handle to wait for completion.
18361
- * @param options - Resume options
18362
- * @returns Resume result with wait helper
17962
+ * Get the latest migration number from a directory
17963
+ * Returns 0 if no migrations exist
17964
+ * @param {string} migrationsDir - Migrations directory path
17965
+ * @returns {number} Latest migration number or 0 if no migrations exist
18363
17966
  */
18364
- declare function resumeWorkflow(options: ResumeWorkflowOptions): Promise<ResumeWorkflowResultWithWait>;
18365
- //#endregion
18366
- //#region src/cli/commands/executor/trigger.d.ts
18367
- type ManualTrigger = IncomingWebhookTrigger | ScheduleTriggerInput;
18368
- type ManualTriggerExecutor<T extends ManualTrigger = ManualTrigger> = T extends ManualTrigger ? {
18369
- name: string;
18370
- trigger: T;
18371
- } : never;
18372
- type TriggerExecutorBaseOptions<E extends ManualTriggerExecutor> = {
18373
- executor: E;
18374
- workspaceId?: string;
18375
- profile?: string;
18376
- };
17967
+ declare function getLatestMigrationNumber(migrationsDir: string): number;
18377
17968
  /**
18378
- * @deprecated Use TriggerExecutorTypedOptions instead.
17969
+ * Compare two snapshots and generate a diff
17970
+ * @param {SchemaSnapshot} previous - Previous schema snapshot
17971
+ * @param {SchemaSnapshot} current - Current schema snapshot
17972
+ * @returns {MigrationDiff} Migration diff between snapshots
18379
17973
  */
18380
- interface TriggerExecutorOptions {
18381
- executorName: string;
18382
- payload?: JsonObject;
17974
+ declare function compareSnapshots(previous: SchemaSnapshot, current: SchemaSnapshot): MigrationDiff;
17975
+ /**
17976
+ * Compare a snapshot against canonical TailorDBSnapshotType-shaped local types.
17977
+ * Callers are expected to pre-convert TailorDBService.types to TailorDBSnapshotType via
17978
+ * `createSnapshotType`. As a safety net, `compareSnapshots` re-runs idempotent
17979
+ * normalization on both sides, so a caller that forgets will still get correct
17980
+ * comparisons (no silent false drift).
17981
+ * @param {SchemaSnapshot} snapshot - Schema snapshot to compare against
17982
+ * @param {Record<string, TailorDBSnapshotType>} localTypes - Local snapshot-shaped types
17983
+ * @param {string} namespace - Namespace for comparison
17984
+ * @returns {MigrationDiff} Migration diff
17985
+ */
17986
+ declare function compareLocalTypesWithSnapshot(snapshot: SchemaSnapshot, localTypes: Record<string, TailorDBSnapshotType>, namespace: string): MigrationDiff;
17987
+ //#endregion
17988
+ //#region src/cli/commands/deploy/deploy.d.ts
17989
+ interface DeployOptions {
18383
17990
  workspaceId?: string;
18384
17991
  profile?: string;
18385
- }
18386
- type TriggerExecutorTypedOptions<E extends ManualTriggerExecutor = ManualTriggerExecutor> = E extends ManualTriggerExecutor<IncomingWebhookTrigger> ? TriggerExecutorBaseOptions<E> & {
18387
- payload?: JsonObject;
18388
- } : TriggerExecutorBaseOptions<E> & {
18389
- payload?: never;
18390
- };
18391
- interface TriggerExecutorResult {
18392
- jobId?: string;
17992
+ configPath?: string;
17993
+ dryRun?: boolean;
17994
+ yes?: boolean;
17995
+ noSchemaCheck?: boolean;
17996
+ noCache?: boolean;
17997
+ cleanCache?: boolean;
17998
+ buildOnly?: boolean;
18393
17999
  }
18394
18000
  /**
18395
- * Trigger an executor and return the job ID.
18396
- * @param options - Options for triggering executor
18397
- * @returns Result containing the job ID if available
18001
+ * Deploy the configured application to the Tailor platform.
18002
+ * @param options - Options for deploy execution
18003
+ * @returns Promise that resolves to `{ bundledScripts }` when `buildOnly` is true, otherwise void
18398
18004
  */
18399
- declare function triggerExecutor<E extends ManualTriggerExecutor>(options: TriggerExecutorTypedOptions<E>): Promise<TriggerExecutorResult>;
18400
- declare function triggerExecutor(options: TriggerExecutorOptions): Promise<TriggerExecutorResult>;
18005
+ declare function deploy(options?: DeployOptions): Promise<{
18006
+ bundledScripts: BundledScripts;
18007
+ } | undefined>;
18401
18008
  //#endregion
18402
- //#region src/cli/commands/executor/transform.d.ts
18403
- interface ExecutorJobListInfo {
18404
- id: string;
18405
- executorName: string;
18406
- status: string;
18407
- createdAt: string;
18009
+ //#region src/cli/commands/generate/types.d.ts
18010
+ interface GeneratedFile {
18011
+ path: string;
18012
+ content: string;
18013
+ skipIfExists?: boolean;
18014
+ executable?: boolean;
18408
18015
  }
18409
- interface ExecutorJobInfo {
18410
- id: string;
18411
- executorName: string;
18412
- status: string;
18413
- scheduledAt: string;
18414
- createdAt: string;
18415
- updatedAt: string;
18016
+ interface GeneratorResult {
18017
+ files: GeneratedFile[];
18018
+ errors?: string[];
18416
18019
  }
18417
- interface ExecutorJobAttemptInfo {
18418
- id: string;
18419
- jobId: string;
18420
- status: string;
18421
- error: string;
18422
- startedAt: string;
18423
- finishedAt: string;
18424
- operationReference: string;
18020
+ interface TailorDBNamespaceResult<T> {
18021
+ namespace: string;
18022
+ types: T;
18425
18023
  }
18426
- interface ExecutorListInfo {
18427
- name: string;
18428
- triggerType: string;
18429
- targetType: string;
18430
- disabled: boolean;
18024
+ interface ResolverNamespaceResult<R> {
18025
+ namespace: string;
18026
+ resolvers: R;
18431
18027
  }
18432
- interface ExecutorInfo {
18028
+ interface GeneratorAuthInput {
18433
18029
  name: string;
18434
- description: string;
18435
- triggerType: string;
18436
- targetType: string;
18437
- disabled: boolean;
18438
- triggerConfig: string;
18439
- targetConfig: string;
18030
+ userProfile?: {
18031
+ typeName: string;
18032
+ namespace: string;
18033
+ usernameField: string;
18034
+ };
18035
+ machineUsers?: Record<string, {
18036
+ attributes: Record<string, unknown>;
18037
+ }>;
18038
+ oauth2Clients?: Record<string, OAuth2ClientInput>;
18039
+ idProvider?: IdProvider;
18440
18040
  }
18441
- //#endregion
18442
- //#region src/cli/commands/executor/jobs.d.ts
18443
- type ExecutorLike$1 = {
18444
- name: string;
18445
- };
18446
- type ListExecutorJobsTypedOptions<E extends ExecutorLike$1 = ExecutorLike$1> = {
18447
- executor: E;
18448
- status?: string;
18449
- order?: Order;
18450
- limit?: number;
18451
- workspaceId?: string;
18452
- profile?: string;
18453
- };
18454
- type GetExecutorJobTypedOptions<E extends ExecutorLike$1 = ExecutorLike$1> = {
18455
- executor: E;
18456
- jobId: string;
18457
- attempts?: boolean;
18458
- workspaceId?: string;
18459
- profile?: string;
18041
+ type DependencyKind = "tailordb" | "resolver" | "executor";
18042
+ type ArrayIncludes<T extends readonly unknown[], U> = T extends readonly [infer First, ...infer Rest] ? First extends U ? true : ArrayIncludes<Rest, U> : false;
18043
+ type HasDependency<Deps extends readonly DependencyKind[], D extends DependencyKind> = ArrayIncludes<Deps, D>;
18044
+ interface TailorDBProcessMethods<T, Ts> {
18045
+ processType(args: {
18046
+ type: TailorDBType;
18047
+ namespace: string;
18048
+ source: TypeSourceInfoEntry; /** Plugin attachments configured on this type via .plugin() method */
18049
+ plugins: readonly PluginAttachment[];
18050
+ }): T | Promise<T>;
18051
+ processTailorDBNamespace?(args: {
18052
+ namespace: string;
18053
+ types: Record<string, T>;
18054
+ }): Ts | Promise<Ts>;
18055
+ }
18056
+ interface ResolverProcessMethods<R, Rs> {
18057
+ processResolver(args: {
18058
+ resolver: Resolver;
18059
+ namespace: string;
18060
+ }): R | Promise<R>;
18061
+ processResolverNamespace?(args: {
18062
+ namespace: string;
18063
+ resolvers: Record<string, R>;
18064
+ }): Rs | Promise<Rs>;
18065
+ }
18066
+ interface ExecutorProcessMethods<E> {
18067
+ processExecutor(executor: Executor): E | Promise<E>;
18068
+ }
18069
+ type SelectMethods<Deps extends readonly DependencyKind[], T, R, E, Ts, Rs> = (HasDependency<Deps, "tailordb"> extends true ? TailorDBProcessMethods<T, Ts> : object) & (HasDependency<Deps, "resolver"> extends true ? ResolverProcessMethods<R, Rs> : object) & (HasDependency<Deps, "executor"> extends true ? ExecutorProcessMethods<E> : object);
18070
+ interface TailorDBInputPart<Ts> {
18071
+ tailordb: TailorDBNamespaceResult<Ts>[];
18072
+ }
18073
+ interface ResolverInputPart<Rs> {
18074
+ resolver: ResolverNamespaceResult<Rs>[];
18075
+ }
18076
+ interface ExecutorInputPart<E> {
18077
+ executor: E[];
18078
+ }
18079
+ interface AuthPart {
18080
+ auth?: GeneratorAuthInput;
18081
+ }
18082
+ type SelectInput<Deps extends readonly DependencyKind[], Ts, Rs, E> = (HasDependency<Deps, "tailordb"> extends true ? TailorDBInputPart<Ts> : object) & (HasDependency<Deps, "resolver"> extends true ? ResolverInputPart<Rs> : object) & (HasDependency<Deps, "executor"> extends true ? ExecutorInputPart<E> : object) & AuthPart;
18083
+ /** Input type for TailorDB-only generators */
18084
+ type TailorDBInput<Ts> = TailorDBInputPart<Ts> & AuthPart;
18085
+ /** Input type for Resolver-only generators */
18086
+ type ResolverInput<Rs> = ResolverInputPart<Rs> & AuthPart;
18087
+ /** Input type for Executor-only generators */
18088
+ type ExecutorInput<E> = ExecutorInputPart<E> & AuthPart;
18089
+ /** Input type for full generators (TailorDB + Resolver + Executor) */
18090
+ type FullInput<Ts, Rs, E> = TailorDBInputPart<Ts> & ResolverInputPart<Rs> & ExecutorInputPart<E> & AuthPart;
18091
+ /** Arguments type for aggregate method */
18092
+ interface AggregateArgs<Input> {
18093
+ input: Input;
18094
+ baseDir: string;
18095
+ configPath: string;
18096
+ }
18097
+ interface CodeGeneratorCore {
18098
+ readonly id: string;
18099
+ readonly description: string;
18100
+ }
18101
+ /**
18102
+ * Generator interface with dependencies-based conditional methods.
18103
+ * @template Deps - Dependencies array (e.g., ['tailordb'], ['tailordb', 'resolver'])
18104
+ * @template T - Return type of processType
18105
+ * @template R - Return type of processResolver
18106
+ * @template E - Return type of processExecutor
18107
+ * @template Ts - Return type of processTailorDBNamespace (default: Record<string, T>)
18108
+ * @template Rs - Return type of processResolverNamespace (default: Record<string, R>)
18109
+ */
18110
+ type CodeGenerator<Deps extends readonly DependencyKind[], T = unknown, R = unknown, E = unknown, Ts = Record<string, T>, Rs = Record<string, R>> = CodeGeneratorCore & SelectMethods<Deps, T, R, E, Ts, Rs> & {
18111
+ readonly dependencies: Deps;
18112
+ aggregate(args: {
18113
+ input: SelectInput<Deps, Ts, Rs, E>;
18114
+ baseDir: string;
18115
+ configPath: string;
18116
+ }): GeneratorResult | Promise<GeneratorResult>;
18460
18117
  };
18461
- type WatchExecutorJobTypedOptions<E extends ExecutorLike$1 = ExecutorLike$1> = {
18462
- executor: E;
18463
- jobId: string;
18464
- workspaceId?: string;
18465
- profile?: string;
18466
- interval?: number;
18467
- logs?: boolean;
18118
+ /** TailorDB-only generator */
18119
+ type TailorDBGenerator<T = unknown, Ts = Record<string, T>> = CodeGenerator<readonly ["tailordb"], T, never, never, Ts, never>;
18120
+ /** Resolver-only generator */
18121
+ type ResolverGenerator<R = unknown, Rs = Record<string, R>> = CodeGenerator<readonly ["resolver"], never, R, never, never, Rs>;
18122
+ /** Executor-only generator */
18123
+ type ExecutorGenerator<E = unknown> = CodeGenerator<readonly ["executor"], never, never, E, never, never>;
18124
+ /** TailorDB + Resolver generator */
18125
+ type TailorDBResolverGenerator<T = unknown, R = unknown, Ts = Record<string, T>, Rs = Record<string, R>> = CodeGenerator<readonly ["tailordb", "resolver"], T, R, never, Ts, Rs>;
18126
+ /** Full generator (all dependencies) */
18127
+ type FullCodeGenerator<T = unknown, R = unknown, E = unknown, Ts = Record<string, T>, Rs = Record<string, R>> = CodeGenerator<readonly ["tailordb", "resolver", "executor"], T, R, E, Ts, Rs>;
18128
+ //#endregion
18129
+ //#region src/cli/commands/generate/options.d.ts
18130
+ type GenerateOptions = {
18131
+ configPath?: string;
18132
+ watch?: boolean;
18468
18133
  };
18134
+ //#endregion
18135
+ //#region src/cli/commands/generate/service.d.ts
18469
18136
  /**
18470
- * @deprecated Use ListExecutorJobsTypedOptions instead.
18137
+ * Run code generation using the Tailor configuration and generators.
18138
+ * @param options - Generation options
18139
+ * @returns Promise that resolves when generation (and watch, if enabled) completes
18471
18140
  */
18472
- interface ListExecutorJobsOptions {
18473
- executorName: string;
18474
- status?: string;
18475
- order?: Order;
18476
- limit?: number;
18477
- workspaceId?: string;
18478
- profile?: string;
18141
+ declare function generate(options?: GenerateOptions): Promise<void>;
18142
+ //#endregion
18143
+ //#region src/cli/shared/type-generator.d.ts
18144
+ /**
18145
+ * Options for generating user type definitions
18146
+ */
18147
+ interface GenerateUserTypesOptions {
18148
+ /** Application config */
18149
+ config: AppConfig;
18150
+ /** Path to Tailor config file */
18151
+ configPath: string;
18479
18152
  }
18480
18153
  /**
18481
- * @deprecated Use GetExecutorJobTypedOptions instead.
18154
+ * Generate user type definitions from the app config and write them to disk.
18155
+ * @param options - Generation options
18156
+ * @returns Promise that resolves when types are generated
18482
18157
  */
18483
- interface GetExecutorJobOptions {
18484
- executorName: string;
18485
- jobId: string;
18486
- attempts?: boolean;
18158
+ declare function generateUserTypes(options: GenerateUserTypesOptions): Promise<void>;
18159
+ //#endregion
18160
+ //#region src/cli/commands/show.d.ts
18161
+ interface ShowOptions {
18487
18162
  workspaceId?: string;
18488
18163
  profile?: string;
18164
+ configPath?: string;
18165
+ }
18166
+ interface WorkspaceInfo$1 {
18167
+ workspaceId: string;
18168
+ workspaceName: string;
18169
+ workspaceRegion?: string;
18170
+ }
18171
+ interface ApplicationInfo {
18172
+ name: string;
18173
+ domain: string;
18174
+ url: string;
18175
+ auth: string;
18176
+ cors: string[];
18177
+ allowedIpAddresses: string[];
18178
+ disableIntrospection: boolean;
18179
+ createdAt: Date | null;
18180
+ updatedAt: Date | null;
18489
18181
  }
18182
+ interface ShowInfo extends ApplicationInfo, WorkspaceInfo$1 {}
18490
18183
  /**
18491
- * @deprecated Use WatchExecutorJobTypedOptions instead.
18184
+ * Show applied application information for the current workspace.
18185
+ * @param options - Show options
18186
+ * @returns Application information
18492
18187
  */
18493
- interface WatchExecutorJobOptions {
18494
- executorName: string;
18495
- jobId: string;
18188
+ declare function show(options?: ShowOptions): Promise<ShowInfo>;
18189
+ //#endregion
18190
+ //#region src/cli/commands/remove.d.ts
18191
+ interface RemoveOptions {
18496
18192
  workspaceId?: string;
18497
18193
  profile?: string;
18498
- interval?: number;
18499
- logs?: boolean;
18500
- }
18501
- interface ExecutorJobDetailInfo extends ExecutorJobInfo {
18502
- attempts?: ExecutorJobAttemptInfo[];
18194
+ configPath?: string;
18503
18195
  }
18504
- interface WorkflowJobLog {
18505
- jobName: string;
18506
- logs?: string;
18507
- result?: string;
18196
+ /**
18197
+ * Remove all resources managed by the current application.
18198
+ * @param options - Remove options
18199
+ * @returns Promise that resolves when removal completes
18200
+ */
18201
+ declare function remove(options?: RemoveOptions): Promise<void>;
18202
+ //#endregion
18203
+ //#region src/cli/commands/workspace/transform.d.ts
18204
+ interface WorkspaceInfo {
18205
+ id: string;
18206
+ name: string;
18207
+ region: string;
18208
+ createdAt: Date | null;
18209
+ updatedAt: Date | null;
18508
18210
  }
18509
- interface WatchExecutorJobResult {
18510
- job: ExecutorJobDetailInfo;
18511
- targetType: string;
18512
- workflowExecutionId?: string;
18513
- workflowStatus?: string;
18514
- workflowJobLogs?: WorkflowJobLog[];
18515
- functionExecutionId?: string;
18516
- functionStatus?: string;
18517
- functionLogs?: string;
18211
+ interface WorkspaceDetails extends WorkspaceInfo {
18212
+ deleteProtection: boolean;
18213
+ organizationId: string;
18214
+ folderId: string;
18518
18215
  }
18216
+ //#endregion
18217
+ //#region src/cli/commands/workspace/create.d.ts
18519
18218
  /**
18520
- * List executor jobs for a given executor.
18521
- *
18522
- * Returns at most `options.limit` items. When `limit` is omitted or 0 the
18523
- * function pages through every job. The CLI caps this at 50 by default
18524
- * via `pagedLogArgs`; programmatic callers that want the same cap should
18525
- * pass `limit: 50` explicitly.
18526
- * @param options - Options for listing executor jobs
18527
- * @returns List of executor job information
18219
+ * Schema for workspace creation options
18220
+ * - name: 3-63 chars, lowercase alphanumeric and hyphens, cannot start/end with hyphen
18221
+ * - organizationId, folderId: optional UUIDs
18528
18222
  */
18529
- declare function listExecutorJobs<E extends ExecutorLike$1>(options: ListExecutorJobsTypedOptions<E>): Promise<ExecutorJobListInfo[]>;
18530
- declare function listExecutorJobs(options: ListExecutorJobsOptions): Promise<ExecutorJobListInfo[]>;
18223
+ declare const createWorkspaceOptionsSchema: z.ZodObject<{
18224
+ name: z.ZodString;
18225
+ region: z.ZodString;
18226
+ deleteProtection: z.ZodOptional<z.ZodBoolean>;
18227
+ organizationId: z.ZodOptional<z.ZodUUID>;
18228
+ folderId: z.ZodOptional<z.ZodUUID>;
18229
+ }, z.core.$strip>;
18230
+ type CreateWorkspaceOptions = z.input<typeof createWorkspaceOptionsSchema>;
18531
18231
  /**
18532
- * Get details of a specific executor job.
18533
- * @param options - Options for getting executor job details
18534
- * @returns Executor job detail information
18232
+ * Create a new workspace with the given options.
18233
+ * @param options - Workspace creation options
18234
+ * @returns Created workspace info
18535
18235
  */
18536
- declare function getExecutorJob<E extends ExecutorLike$1>(options: GetExecutorJobTypedOptions<E>): Promise<ExecutorJobDetailInfo>;
18537
- declare function getExecutorJob(options: GetExecutorJobOptions): Promise<ExecutorJobDetailInfo>;
18236
+ declare function createWorkspace(options: CreateWorkspaceOptions): Promise<WorkspaceInfo>;
18237
+ //#endregion
18238
+ //#region src/cli/shared/args.d.ts
18538
18239
  /**
18539
- * Watch an executor job until completion, including downstream executions.
18540
- * @param options - Options for watching executor job
18541
- * @returns Result including job details and downstream execution info
18240
+ * Schema for sort order (`asc` or `desc`).
18542
18241
  */
18543
- declare function watchExecutorJob<E extends ExecutorLike$1>(options: WatchExecutorJobTypedOptions<E>): Promise<WatchExecutorJobResult>;
18544
- declare function watchExecutorJob(options: WatchExecutorJobOptions): Promise<WatchExecutorJobResult>;
18242
+ declare const orderArg: z.ZodEnum<{
18243
+ asc: "asc";
18244
+ desc: "desc";
18245
+ }>;
18246
+ type Order = z.infer<typeof orderArg>;
18545
18247
  //#endregion
18546
- //#region src/cli/commands/executor/list.d.ts
18547
- interface ListExecutorsOptions {
18548
- workspaceId?: string;
18549
- profile?: string;
18248
+ //#region src/cli/commands/workspace/list.d.ts
18249
+ interface ListWorkspacesOptions {
18550
18250
  order?: Order;
18551
18251
  limit?: number;
18552
18252
  }
18553
18253
  /**
18554
- * List executors in the workspace and return CLI-friendly info.
18555
- * @param options - Executor listing options
18556
- * @returns List of executors
18254
+ * List workspaces with an optional order and limit.
18255
+ * @param options - Workspace listing options
18256
+ * @returns List of workspaces
18557
18257
  */
18558
- declare function listExecutors(options?: ListExecutorsOptions): Promise<ExecutorListInfo[]>;
18258
+ declare function listWorkspaces(options?: ListWorkspacesOptions): Promise<WorkspaceInfo[]>;
18559
18259
  //#endregion
18560
- //#region src/cli/commands/executor/get.d.ts
18561
- type ExecutorLike = {
18562
- name: string;
18563
- };
18564
- type GetExecutorTypedOptions<E extends ExecutorLike = ExecutorLike> = {
18565
- executor: E;
18566
- workspaceId?: string;
18567
- profile?: string;
18568
- };
18260
+ //#region src/cli/commands/workspace/delete.d.ts
18261
+ declare const deleteWorkspaceOptionsSchema: z.ZodObject<{
18262
+ workspaceId: z.ZodUUID;
18263
+ }, z.core.$strip>;
18264
+ type DeleteWorkspaceOptions = z.input<typeof deleteWorkspaceOptionsSchema>;
18265
+ /**
18266
+ * Delete a workspace by ID.
18267
+ * @param options - Workspace deletion options
18268
+ * @returns Promise that resolves when deletion completes
18269
+ */
18270
+ declare function deleteWorkspace(options: DeleteWorkspaceOptions): Promise<void>;
18271
+ //#endregion
18272
+ //#region src/cli/commands/workspace/get.d.ts
18273
+ declare const getWorkspaceOptionsSchema: z.ZodObject<{
18274
+ workspaceId: z.ZodOptional<z.ZodUUID>;
18275
+ profile: z.ZodOptional<z.ZodString>;
18276
+ }, z.core.$strip>;
18277
+ type GetWorkspaceOptions = z.input<typeof getWorkspaceOptionsSchema>;
18278
+ /**
18279
+ * Get detailed information about a workspace.
18280
+ * @param options - Workspace get options
18281
+ * @returns Workspace details
18282
+ */
18283
+ declare function getWorkspace(options: GetWorkspaceOptions): Promise<WorkspaceDetails>;
18284
+ //#endregion
18285
+ //#region src/cli/commands/workspace/restore.d.ts
18286
+ declare const restoreWorkspaceOptionsSchema: z.ZodObject<{
18287
+ workspaceId: z.ZodUUID;
18288
+ }, z.core.$strip>;
18289
+ type RestoreWorkspaceOptions = z.input<typeof restoreWorkspaceOptionsSchema>;
18290
+ /**
18291
+ * Restore a deleted workspace by ID.
18292
+ * @param options - Workspace restore options
18293
+ * @returns Promise that resolves when restoration completes
18294
+ */
18295
+ declare function restoreWorkspace(options: RestoreWorkspaceOptions): Promise<void>;
18296
+ //#endregion
18297
+ //#region src/cli/commands/workspace/user/transform.d.ts
18298
+ interface UserInfo {
18299
+ userId: string;
18300
+ email: string;
18301
+ role: string;
18302
+ }
18303
+ //#endregion
18304
+ //#region src/cli/commands/workspace/user/list.d.ts
18305
+ declare const listUsersOptionsSchema: z.ZodObject<{
18306
+ workspaceId: z.ZodOptional<z.ZodUUID>;
18307
+ profile: z.ZodOptional<z.ZodString>;
18308
+ order: z.ZodOptional<z.ZodEnum<{
18309
+ asc: "asc";
18310
+ desc: "desc";
18311
+ }>>;
18312
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
18313
+ }, z.core.$strip>;
18314
+ type ListUsersOptions = z.input<typeof listUsersOptionsSchema>;
18315
+ /**
18316
+ * List users in a workspace with an optional order and limit.
18317
+ * @param options - User listing options
18318
+ * @returns List of workspace users
18319
+ */
18320
+ declare function listUsers(options: ListUsersOptions): Promise<UserInfo[]>;
18321
+ //#endregion
18322
+ //#region src/cli/commands/workspace/user/invite.d.ts
18323
+ declare const inviteUserOptionsSchema: z.ZodObject<{
18324
+ workspaceId: z.ZodOptional<z.ZodUUID>;
18325
+ profile: z.ZodOptional<z.ZodString>;
18326
+ email: z.ZodEmail;
18327
+ role: z.ZodEnum<{
18328
+ admin: "admin";
18329
+ editor: "editor";
18330
+ viewer: "viewer";
18331
+ }>;
18332
+ }, z.core.$strip>;
18333
+ type InviteUserOptions = z.input<typeof inviteUserOptionsSchema>;
18569
18334
  /**
18570
- * @deprecated Use GetExecutorTypedOptions instead.
18335
+ * Invite a user to a workspace.
18336
+ * @param options - User invite options
18337
+ * @returns Promise that resolves when invitation is sent
18571
18338
  */
18572
- interface GetExecutorOptions {
18573
- name: string;
18574
- workspaceId?: string;
18575
- profile?: string;
18576
- }
18339
+ declare function inviteUser(options: InviteUserOptions): Promise<void>;
18340
+ //#endregion
18341
+ //#region src/cli/commands/workspace/user/update.d.ts
18342
+ declare const updateUserOptionsSchema: z.ZodObject<{
18343
+ workspaceId: z.ZodOptional<z.ZodUUID>;
18344
+ profile: z.ZodOptional<z.ZodString>;
18345
+ email: z.ZodString;
18346
+ role: z.ZodEnum<{
18347
+ admin: "admin";
18348
+ editor: "editor";
18349
+ viewer: "viewer";
18350
+ }>;
18351
+ }, z.core.$strip>;
18352
+ type UpdateUserOptions = z.input<typeof updateUserOptionsSchema>;
18577
18353
  /**
18578
- * Get an executor by name and return CLI-friendly info.
18579
- * @param options - Executor lookup options
18580
- * @returns Executor information
18354
+ * Update a user's role in a workspace.
18355
+ * @param options - User update options
18356
+ * @returns Promise that resolves when update completes
18581
18357
  */
18582
- declare function getExecutor<E extends ExecutorLike>(options: GetExecutorTypedOptions<E>): Promise<ExecutorInfo>;
18583
- declare function getExecutor(options: GetExecutorOptions): Promise<ExecutorInfo>;
18358
+ declare function updateUser(options: UpdateUserOptions): Promise<void>;
18584
18359
  //#endregion
18585
- //#region src/cli/commands/executor/webhook.d.ts
18586
- interface WebhookExecutorInfo {
18587
- name: string;
18588
- webhookUrl: string;
18589
- disabled: boolean;
18590
- }
18591
- interface ListWebhookExecutorsOptions {
18592
- workspaceId?: string;
18593
- profile?: string;
18594
- order?: Order;
18595
- limit?: number;
18596
- }
18360
+ //#region src/cli/commands/workspace/user/remove.d.ts
18361
+ declare const removeUserOptionsSchema: z.ZodObject<{
18362
+ workspaceId: z.ZodOptional<z.ZodUUID>;
18363
+ profile: z.ZodOptional<z.ZodString>;
18364
+ email: z.ZodString;
18365
+ }, z.core.$strip>;
18366
+ type RemoveUserOptions = z.input<typeof removeUserOptionsSchema>;
18597
18367
  /**
18598
- * List executors with incoming webhook triggers and return CLI-friendly info.
18599
- * @param options - Listing options
18600
- * @returns List of webhook executors with URLs
18368
+ * Remove a user from a workspace.
18369
+ * @param options - User remove options
18370
+ * @returns Promise that resolves when removal completes
18601
18371
  */
18602
- declare function listWebhookExecutors(options?: ListWebhookExecutorsOptions): Promise<WebhookExecutorInfo[]>;
18372
+ declare function removeUser(options: RemoveUserOptions): Promise<void>;
18603
18373
  //#endregion
18604
- //#region src/cli/commands/organization/transform.d.ts
18605
- interface UserOrganizationInfo {
18606
- organizationId: string;
18607
- organizationName: string;
18608
- rootFolderId: string;
18609
- rootFolderName: string;
18610
- displayName: string;
18611
- }
18612
- interface OrganizationInfo {
18613
- id: string;
18374
+ //#region src/cli/commands/workspace/app/transform.d.ts
18375
+ interface AppInfo {
18614
18376
  name: string;
18377
+ domain: string;
18378
+ authNamespace: string;
18615
18379
  createdAt: Date | null;
18616
18380
  updatedAt: Date | null;
18617
18381
  }
18618
- interface FolderListInfo {
18619
- id: string;
18382
+ interface AppHealthInfo {
18620
18383
  name: string;
18621
- organizationId: string;
18622
- parentFolderId: string;
18623
- hasChildren: boolean;
18624
- createdAt: Date | null;
18625
- }
18626
- interface FolderInfo extends FolderListInfo {
18627
- updatedAt: Date | null;
18628
- }
18629
- //#endregion
18630
- //#region src/cli/commands/organization/list.d.ts
18631
- interface ListOrganizationsOptions {
18632
- limit?: number;
18384
+ status: string;
18385
+ currentServingSchemaUpdatedAt: Date | null;
18386
+ lastAttemptStatus: string;
18387
+ lastAttemptAt: Date | null;
18388
+ lastAttemptError: string;
18633
18389
  }
18634
- /**
18635
- * List organizations the current user belongs to.
18636
- * @param options - Organization listing options
18637
- * @returns List of user organizations
18638
- */
18639
- declare function listOrganizations(options?: ListOrganizationsOptions): Promise<UserOrganizationInfo[]>;
18640
18390
  //#endregion
18641
- //#region src/cli/commands/organization/get.d.ts
18642
- declare const getOrganizationOptionsSchema: z.ZodObject<{
18643
- organizationId: z.ZodUUID;
18391
+ //#region src/cli/commands/workspace/app/list.d.ts
18392
+ declare const listAppsOptionsSchema: z.ZodObject<{
18393
+ workspaceId: z.ZodOptional<z.ZodUUID>;
18394
+ profile: z.ZodOptional<z.ZodString>;
18395
+ order: z.ZodOptional<z.ZodEnum<{
18396
+ asc: "asc";
18397
+ desc: "desc";
18398
+ }>>;
18399
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
18644
18400
  }, z.core.$strip>;
18645
- type GetOrganizationOptions = z.input<typeof getOrganizationOptionsSchema>;
18401
+ type ListAppsOptions = z.input<typeof listAppsOptionsSchema>;
18646
18402
  /**
18647
- * Get detailed information about an organization.
18648
- * @param options - Organization get options
18649
- * @returns Organization details
18403
+ * List applications in a workspace with an optional order and limit.
18404
+ * @param options - Application listing options
18405
+ * @returns List of applications
18650
18406
  */
18651
- declare function getOrganization(options: GetOrganizationOptions): Promise<OrganizationInfo>;
18407
+ declare function listApps(options: ListAppsOptions): Promise<AppInfo[]>;
18652
18408
  //#endregion
18653
- //#region src/cli/commands/organization/update.d.ts
18654
- declare const updateOrganizationOptionsSchema: z.ZodObject<{
18655
- organizationId: z.ZodUUID;
18409
+ //#region src/cli/commands/workspace/app/health.d.ts
18410
+ declare const healthOptionsSchema: z.ZodObject<{
18411
+ workspaceId: z.ZodOptional<z.ZodUUID>;
18412
+ profile: z.ZodOptional<z.ZodString>;
18656
18413
  name: z.ZodString;
18657
18414
  }, z.core.$strip>;
18658
- type UpdateOrganizationOptions = z.input<typeof updateOrganizationOptionsSchema>;
18415
+ type HealthOptions = z.input<typeof healthOptionsSchema>;
18659
18416
  /**
18660
- * Update an organization's name.
18661
- * @param options - Organization update options
18662
- * @returns Updated organization details
18417
+ * Get application schema health status.
18418
+ * @param options - Health check options
18419
+ * @returns Application health information
18663
18420
  */
18664
- declare function updateOrganization(options: UpdateOrganizationOptions): Promise<OrganizationInfo>;
18421
+ declare function getAppHealth(options: HealthOptions): Promise<AppHealthInfo>;
18665
18422
  //#endregion
18666
- //#region src/cli/commands/organization/tree.d.ts
18667
- interface OrganizationTreeOptions {
18668
- organizationId?: string;
18669
- depth?: number;
18670
- }
18671
- interface OrganizationTreeJson {
18672
- organizationId: string;
18673
- organizationName: string;
18674
- folders: FolderTreeJson[];
18675
- }
18676
- interface FolderTreeJson {
18677
- id: string;
18423
+ //#region src/cli/commands/function/transform.d.ts
18424
+ interface FunctionRegistryInfo {
18678
18425
  name: string;
18679
- children: FolderTreeJson[];
18426
+ description: string;
18427
+ sizeBytes: string;
18428
+ contentHash: string;
18429
+ createdAt: Date | null;
18430
+ updatedAt: Date | null;
18680
18431
  }
18432
+ //#endregion
18433
+ //#region src/cli/commands/function/get.d.ts
18434
+ declare const getFunctionRegistryOptionsSchema: z.ZodObject<{
18435
+ workspaceId: z.ZodOptional<z.ZodUUID>;
18436
+ profile: z.ZodOptional<z.ZodString>;
18437
+ name: z.ZodString;
18438
+ }, z.core.$strip>;
18439
+ type GetFunctionRegistryOptions = z.input<typeof getFunctionRegistryOptionsSchema>;
18681
18440
  /**
18682
- * Display a tree view of organizations and their folder hierarchy.
18683
- * @param options - Tree display options
18684
- * @returns Organization tree as structured data
18441
+ * Get a function registry by name.
18442
+ * @param options - Function registry get options
18443
+ * @returns Function registry info
18685
18444
  */
18686
- declare function organizationTree(options?: OrganizationTreeOptions): Promise<OrganizationTreeJson[]>;
18445
+ declare function getFunctionRegistry(options: GetFunctionRegistryOptions): Promise<FunctionRegistryInfo>;
18687
18446
  //#endregion
18688
- //#region src/cli/commands/organization/folder/list.d.ts
18689
- declare const listFoldersOptionsSchema: z.ZodObject<{
18690
- organizationId: z.ZodUUID;
18691
- parentFolderId: z.ZodOptional<z.ZodString>;
18447
+ //#region src/cli/commands/function/list.d.ts
18448
+ declare const listFunctionRegistriesOptionsSchema: z.ZodObject<{
18449
+ workspaceId: z.ZodOptional<z.ZodUUID>;
18450
+ profile: z.ZodOptional<z.ZodString>;
18692
18451
  order: z.ZodOptional<z.ZodEnum<{
18693
18452
  asc: "asc";
18694
18453
  desc: "desc";
18695
18454
  }>>;
18696
- limit: z.ZodOptional<z.ZodNumber>;
18455
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
18697
18456
  }, z.core.$strip>;
18698
- type ListFoldersOptions = z.input<typeof listFoldersOptionsSchema>;
18457
+ type ListFunctionRegistriesOptions = z.input<typeof listFunctionRegistriesOptionsSchema>;
18699
18458
  /**
18700
- * List folders in an organization.
18701
- * @param options - Folder listing options
18702
- * @returns List of folders
18459
+ * List function registries in a workspace with optional pagination.
18460
+ * @param options - Function registry listing options
18461
+ * @returns List of function registries
18703
18462
  */
18704
- declare function listFolders(options: ListFoldersOptions): Promise<FolderListInfo[]>;
18463
+ declare function listFunctionRegistries(options: ListFunctionRegistriesOptions): Promise<FunctionRegistryInfo[]>;
18705
18464
  //#endregion
18706
- //#region src/cli/commands/organization/folder/get.d.ts
18707
- declare const getFolderOptionsSchema: z.ZodObject<{
18708
- organizationId: z.ZodUUID;
18709
- folderId: z.ZodUUID;
18710
- }, z.core.$strip>;
18711
- type GetFolderOptions = z.input<typeof getFolderOptionsSchema>;
18465
+ //#region src/cli/commands/machineuser/list.d.ts
18466
+ interface ListMachineUsersOptions {
18467
+ workspaceId?: string;
18468
+ profile?: string;
18469
+ configPath?: string;
18470
+ order?: Order;
18471
+ limit?: number;
18472
+ }
18473
+ interface MachineUserInfo {
18474
+ name: string;
18475
+ clientId: string;
18476
+ clientSecret: string;
18477
+ createdAt: Date | null;
18478
+ updatedAt: Date | null;
18479
+ attributes: Record<string, unknown>;
18480
+ }
18712
18481
  /**
18713
- * Get detailed information about a folder.
18714
- * @param options - Folder get options
18715
- * @returns Folder details
18482
+ * List machine users for the current application.
18483
+ * @param options - Machine user listing options
18484
+ * @returns List of machine users
18716
18485
  */
18717
- declare function getFolder(options: GetFolderOptions): Promise<FolderInfo>;
18486
+ declare function listMachineUsers(options?: ListMachineUsersOptions): Promise<MachineUserInfo[]>;
18487
+ //#endregion
18488
+ //#region src/cli/commands/machineuser/token.d.ts
18489
+ interface GetMachineUserTokenOptions {
18490
+ name: string;
18491
+ workspaceId?: string;
18492
+ profile?: string;
18493
+ configPath?: string;
18494
+ }
18495
+ interface MachineUserTokenInfo {
18496
+ accessToken: string;
18497
+ tokenType: string;
18498
+ expiresAt: string;
18499
+ }
18500
+ /**
18501
+ * Get a machine user access token for the current application.
18502
+ * @param options - Token retrieval options
18503
+ * @returns Machine user token info
18504
+ */
18505
+ declare function getMachineUserToken(options: GetMachineUserTokenOptions): Promise<MachineUserTokenInfo>;
18506
+ //#endregion
18507
+ //#region src/cli/commands/oauth2client/transform.d.ts
18508
+ interface OAuth2ClientInfo {
18509
+ name: string;
18510
+ description: string;
18511
+ clientId: string;
18512
+ grantTypes: string[];
18513
+ redirectUris: string[];
18514
+ createdAt: Date | null;
18515
+ }
18516
+ interface OAuth2ClientCredentials {
18517
+ name: string;
18518
+ description: string;
18519
+ clientId: string;
18520
+ clientSecret: string;
18521
+ grantTypes: string[];
18522
+ redirectUris: string[];
18523
+ createdAt: Date | null;
18524
+ }
18718
18525
  //#endregion
18719
- //#region src/cli/commands/organization/folder/create.d.ts
18720
- declare const createFolderOptionsSchema: z.ZodObject<{
18721
- organizationId: z.ZodUUID;
18722
- parentFolderId: z.ZodOptional<z.ZodString>;
18723
- name: z.ZodString;
18724
- }, z.core.$strip>;
18725
- type CreateFolderOptions = z.input<typeof createFolderOptionsSchema>;
18526
+ //#region src/cli/commands/oauth2client/get.d.ts
18527
+ interface GetOAuth2ClientOptions {
18528
+ name: string;
18529
+ workspaceId?: string;
18530
+ profile?: string;
18531
+ configPath?: string;
18532
+ }
18726
18533
  /**
18727
- * Create a new folder in an organization.
18728
- * @param options - Folder creation options
18729
- * @returns Created folder details
18534
+ * Get OAuth2 client credentials for the current application.
18535
+ * @param options - OAuth2 client lookup options
18536
+ * @returns OAuth2 client credentials
18730
18537
  */
18731
- declare function createFolder(options: CreateFolderOptions): Promise<FolderInfo>;
18538
+ declare function getOAuth2Client(options: GetOAuth2ClientOptions): Promise<OAuth2ClientCredentials>;
18732
18539
  //#endregion
18733
- //#region src/cli/commands/organization/folder/update.d.ts
18734
- declare const updateFolderOptionsSchema: z.ZodObject<{
18735
- organizationId: z.ZodUUID;
18736
- folderId: z.ZodUUID;
18737
- name: z.ZodString;
18738
- }, z.core.$strip>;
18739
- type UpdateFolderOptions = z.input<typeof updateFolderOptionsSchema>;
18540
+ //#region src/cli/commands/oauth2client/list.d.ts
18541
+ interface ListOAuth2ClientsOptions {
18542
+ workspaceId?: string;
18543
+ profile?: string;
18544
+ configPath?: string;
18545
+ order?: Order;
18546
+ limit?: number;
18547
+ }
18740
18548
  /**
18741
- * Update a folder's name.
18742
- * @param options - Folder update options
18743
- * @returns Updated folder details
18549
+ * List OAuth2 clients for the current application.
18550
+ * @param options - OAuth2 client listing options
18551
+ * @returns List of OAuth2 clients
18744
18552
  */
18745
- declare function updateFolder(options: UpdateFolderOptions): Promise<FolderInfo>;
18553
+ declare function listOAuth2Clients(options?: ListOAuth2ClientsOptions): Promise<OAuth2ClientInfo[]>;
18746
18554
  //#endregion
18747
- //#region src/cli/commands/organization/folder/delete.d.ts
18748
- declare const deleteFolderOptionsSchema: z.ZodObject<{
18749
- organizationId: z.ZodUUID;
18750
- folderId: z.ZodUUID;
18751
- }, z.core.$strip>;
18752
- type DeleteFolderOptions = z.input<typeof deleteFolderOptionsSchema>;
18753
- /**
18754
- * Delete a folder from an organization.
18755
- * @param options - Folder deletion options
18756
- * @returns Promise that resolves when deletion completes
18757
- */
18758
- declare function deleteFolder(options: DeleteFolderOptions): Promise<void>;
18555
+ //#region src/cli/commands/workflow/transform.d.ts
18556
+ interface WorkflowListInfo {
18557
+ name: string;
18558
+ mainJob: string;
18559
+ jobFunctions: number;
18560
+ updatedAt: Date | null;
18561
+ }
18562
+ interface WorkflowInfo {
18563
+ name: string;
18564
+ id: string;
18565
+ mainJob: string;
18566
+ jobFunctions: Record<string, string>;
18567
+ createdAt: Date | null;
18568
+ updatedAt: Date | null;
18569
+ }
18570
+ interface WorkflowJobExecutionInfo {
18571
+ id: string;
18572
+ stackedJobName: string;
18573
+ status: string;
18574
+ executionId: string;
18575
+ startedAt: Date | null;
18576
+ finishedAt: Date | null;
18577
+ }
18578
+ interface WorkflowExecutionInfo {
18579
+ id: string;
18580
+ workflowName: string;
18581
+ status: string;
18582
+ jobExecutions: number;
18583
+ startedAt: Date | null;
18584
+ finishedAt: Date | null;
18585
+ }
18759
18586
  //#endregion
18760
- //#region src/cli/shared/context.d.ts
18761
- type LoadWorkspaceIdOptions = {
18587
+ //#region src/cli/commands/workflow/list.d.ts
18588
+ interface ListWorkflowsOptions {
18762
18589
  workspaceId?: string;
18763
18590
  profile?: string;
18591
+ order?: Order;
18592
+ limit?: number;
18593
+ }
18594
+ /**
18595
+ * List workflows in the workspace and return CLI-friendly info.
18596
+ * @param options - Workflow listing options
18597
+ * @returns List of workflows
18598
+ */
18599
+ declare function listWorkflows(options?: ListWorkflowsOptions): Promise<WorkflowListInfo[]>;
18600
+ //#endregion
18601
+ //#region src/cli/commands/workflow/get.d.ts
18602
+ type WorkflowLike$2 = {
18603
+ name: string;
18764
18604
  };
18765
- type LoadAccessTokenOptions = {
18766
- useProfile?: boolean;
18605
+ type GetWorkflowTypedOptions<W extends WorkflowLike$2 = WorkflowLike$2> = {
18606
+ workflow: W;
18607
+ workspaceId?: string;
18767
18608
  profile?: string;
18768
18609
  };
18769
18610
  /**
18770
- * Read Tailor Platform CLI configuration, migrating from tailorctl or v1 if necessary.
18771
- * @returns Parsed platform configuration
18772
- */
18773
- /**
18774
- * Load workspace ID from command options, environment variables, or platform config.
18775
- * In CLI context, env fallback is also handled by politty's arg env option.
18776
- * Priority: opts/workspaceId > env/workspaceId > opts/profile > error
18777
- * @param opts - Workspace and profile options
18778
- * @returns Resolved workspace ID
18779
- */
18780
- declare function loadWorkspaceId(opts?: LoadWorkspaceIdOptions): Promise<string>;
18781
- /**
18782
- * Load access token from environment variables, command options, or platform config.
18783
- * In CLI context, profile env fallback is also handled by politty's arg env option.
18784
- * Priority: env/TAILOR_PLATFORM_TOKEN > env/TAILOR_TOKEN (deprecated) > opts/profile > env/profile > config/currentUser > error
18785
- * @param opts - Profile options
18786
- * @returns Resolved access token
18611
+ * @deprecated Use GetWorkflowTypedOptions instead.
18787
18612
  */
18788
- declare function loadAccessToken(opts?: LoadAccessTokenOptions): Promise<string>;
18789
- //#endregion
18790
- //#region src/cli/commands/api/api-call.d.ts
18791
- interface ApiCallOptions {
18613
+ interface GetWorkflowOptions {
18614
+ name: string;
18615
+ workspaceId?: string;
18792
18616
  profile?: string;
18793
- endpoint: string;
18794
- body?: string;
18795
- }
18796
- interface ApiCallResult {
18797
- status: number;
18798
- data: unknown;
18799
18617
  }
18800
18618
  /**
18801
- * Call Tailor Platform API endpoints directly.
18802
- * If the endpoint doesn't contain "/", it defaults to `tailor.v1.OperatorService/{endpoint}`.
18803
- * @param options - API call options (profile, endpoint, body)
18804
- * @returns Response status and data
18619
+ * Get a workflow by name and return CLI-friendly info.
18620
+ * @param options - Workflow lookup options
18621
+ * @returns Workflow information
18805
18622
  */
18806
- declare function apiCall(options: ApiCallOptions): Promise<ApiCallResult>;
18623
+ declare function getWorkflow<W extends WorkflowLike$2>(options: GetWorkflowTypedOptions<W>): Promise<WorkflowInfo>;
18624
+ declare function getWorkflow(options: GetWorkflowOptions): Promise<WorkflowInfo>;
18807
18625
  //#endregion
18808
- //#region src/cli/query/index.d.ts
18809
- declare const queryOptionsSchema: z.ZodObject<{
18810
- workspaceId: z.ZodOptional<z.ZodString>;
18811
- profile: z.ZodOptional<z.ZodString>;
18812
- configPath: z.ZodOptional<z.ZodString>;
18813
- engine: z.ZodEnum<{
18814
- sql: "sql";
18815
- gql: "gql";
18816
- }>;
18817
- machineUser: z.ZodString;
18818
- query: z.ZodString;
18819
- }, z.core.$strip>;
18820
- type QueryOptions = z.input<typeof queryOptionsSchema>;
18821
- type SQLQueryDispatchResult = {
18822
- engine: "sql";
18626
+ //#region src/cli/commands/workflow/start.d.ts
18627
+ type WorkflowLike$1 = {
18628
+ name: string;
18629
+ mainJob: {
18630
+ body: unknown;
18631
+ };
18632
+ };
18633
+ type AuthInvoker$1<M extends string = string> = {
18823
18634
  namespace: string;
18824
- query: string;
18825
- result: unknown;
18635
+ machineUserName: M;
18826
18636
  };
18827
- type GQLQueryDispatchResult = {
18828
- engine: "gql";
18829
- query: string;
18830
- result: unknown;
18637
+ type WorkflowInput<W extends WorkflowLike$1> = W extends WorkflowLike$1 ? W["mainJob"]["body"] extends ((...args: infer Args) => unknown) ? Args[0] : never : never;
18638
+ type StartWorkflowArgOptionForSingleWorkflow<W extends WorkflowLike$1> = WorkflowLike$1 extends W ? {
18639
+ arg?: Jsonifiable;
18640
+ } : undefined extends WorkflowInput<W> ? {
18641
+ arg?: WorkflowInput<W>;
18642
+ } : {
18643
+ arg: WorkflowInput<W>;
18831
18644
  };
18832
- type QueryDispatchResult = SQLQueryDispatchResult | GQLQueryDispatchResult;
18645
+ type StartWorkflowArgOption<W extends WorkflowLike$1> = W extends WorkflowLike$1 ? StartWorkflowArgOptionForSingleWorkflow<W> : never;
18833
18646
  /**
18834
- * Dispatch query execution.
18835
- * @param options - Query command options
18836
- * @returns Dispatch result
18647
+ * @deprecated Use StartWorkflowTypedOptions instead.
18837
18648
  */
18838
- declare function query(options: QueryOptions): Promise<QueryDispatchResult>;
18839
- //#endregion
18840
- //#region src/cli/commands/tailordb/truncate.d.ts
18841
- interface TruncateOptions {
18649
+ interface StartWorkflowOptions {
18650
+ name: string;
18651
+ machineUser: string;
18652
+ arg?: Jsonifiable;
18842
18653
  workspaceId?: string;
18843
18654
  profile?: string;
18844
18655
  configPath?: string;
18845
- all?: boolean;
18846
- namespace?: string;
18847
- types?: string[];
18656
+ interval?: number;
18848
18657
  }
18849
- /**
18850
- * Truncate TailorDB data based on the given options.
18851
- * @param options - Truncate options (all, namespace, or types)
18852
- * @returns Promise that resolves when truncation completes
18853
- */
18854
- declare function truncate(options?: TruncateOptions): Promise<void>;
18855
- //#endregion
18856
- //#region src/cli/commands/tailordb/migrate/generate.d.ts
18857
- interface GenerateOptions$1 {
18858
- configPath?: string;
18859
- name?: string;
18860
- yes?: boolean;
18861
- init?: boolean;
18658
+ type StartWorkflowTypedBaseOptions<W extends WorkflowLike$1> = {
18659
+ workflow: W;
18660
+ authInvoker: AuthInvoker$1<string>;
18661
+ workspaceId?: string;
18662
+ profile?: string;
18663
+ interval?: number;
18664
+ };
18665
+ type StartWorkflowTypedOptions<W extends WorkflowLike$1 = WorkflowLike$1> = W extends WorkflowLike$1 ? StartWorkflowTypedBaseOptions<W> & StartWorkflowArgOption<W> : never;
18666
+ interface WaitOptions {
18667
+ showProgress?: boolean;
18668
+ }
18669
+ interface StartWorkflowResultWithWait {
18670
+ executionId: string;
18671
+ wait: (options?: WaitOptions) => Promise<WorkflowExecutionInfo>;
18862
18672
  }
18863
18673
  /**
18864
- * Generate migration files for TailorDB schema changes
18865
- * @param {GenerateOptions} options - Generation options
18866
- * @returns {Promise<void>} Promise that resolves when generation is complete
18867
- */
18868
- declare function generate$1(options: GenerateOptions$1): Promise<void>;
18869
- //#endregion
18870
- //#region src/cli/commands/tailordb/migrate/diff-calculator.d.ts
18871
- /**
18872
- * Diff calculator and formatter for TailorDB schema migrations
18873
- *
18874
- * This module provides utilities for formatting and displaying migration diffs.
18875
- * The actual diff calculation is performed by snapshot.ts.
18876
- */
18877
- /**
18878
- * Current schema snapshot format version
18879
- */
18880
- declare const SCHEMA_SNAPSHOT_VERSION: 1;
18881
- /**
18882
- * Change kind in migration diff
18674
+ * Start a workflow and return a handle to wait for completion.
18675
+ * @param options - Start options
18676
+ * @returns Start result with wait helper
18883
18677
  */
18884
- type DiffChangeKind = "type_added" | "type_removed" | "type_modified" | "field_added" | "field_removed" | "field_modified" | "index_added" | "index_removed" | "index_modified" | "file_added" | "file_removed" | "file_modified" | "relationship_added" | "relationship_removed" | "relationship_modified" | "permission_modified";
18678
+ declare function startWorkflow<W extends WorkflowLike$1>(options: StartWorkflowTypedOptions<W>): Promise<StartWorkflowResultWithWait>;
18679
+ declare function startWorkflow(options: StartWorkflowOptions): Promise<StartWorkflowResultWithWait>;
18680
+ //#endregion
18681
+ //#region src/cli/commands/workflow/executions.d.ts
18682
+ type WorkflowLike = {
18683
+ name: string;
18684
+ };
18685
+ type ListWorkflowExecutionsTypedOptions<W extends WorkflowLike = WorkflowLike> = {
18686
+ workflow?: W;
18687
+ status?: string;
18688
+ workspaceId?: string;
18689
+ profile?: string;
18690
+ order?: Order;
18691
+ limit?: number;
18692
+ };
18885
18693
  /**
18886
- * Single change in migration diff
18694
+ * @deprecated Use ListWorkflowExecutionsTypedOptions instead.
18887
18695
  */
18888
- interface DiffChange {
18889
- kind: DiffChangeKind;
18890
- typeName: string;
18891
- fieldName?: string;
18892
- /** Index name for index_* changes */
18893
- indexName?: string;
18894
- /** Relationship name for relationship_* changes */
18895
- relationshipName?: string;
18896
- /** Relationship type for relationship_* changes */
18897
- relationshipType?: "forward" | "backward";
18898
- before?: unknown;
18899
- after?: unknown;
18900
- reason?: string;
18696
+ interface ListWorkflowExecutionsOptions {
18697
+ workspaceId?: string;
18698
+ profile?: string;
18699
+ workflowName?: string;
18700
+ status?: string;
18701
+ order?: Order;
18702
+ limit?: number;
18901
18703
  }
18902
- /**
18903
- * Migration diff - changes between two schema versions
18904
- * Stored as XXXX/diff.json (e.g., 0001/diff.json)
18905
- */
18906
- interface MigrationDiff {
18907
- /** Format version for future compatibility */
18908
- version: typeof SCHEMA_SNAPSHOT_VERSION;
18909
- namespace: string;
18910
- createdAt: string;
18911
- description?: string;
18912
- changes: DiffChange[];
18913
- /** Whether there are breaking changes (data loss or constraint violations possible) */
18914
- hasBreakingChanges: boolean;
18915
- /** List of breaking changes */
18916
- breakingChanges: BreakingChangeInfo[];
18917
- /** Whether a migration script is required to handle data migration */
18918
- requiresMigrationScript: boolean;
18704
+ interface GetWorkflowExecutionOptions {
18705
+ executionId: string;
18706
+ workspaceId?: string;
18707
+ profile?: string;
18708
+ interval?: number;
18709
+ logs?: boolean;
18919
18710
  }
18920
- /**
18921
- * Breaking change information in migration diff
18922
- */
18923
- interface BreakingChangeInfo {
18924
- typeName: string;
18925
- fieldName?: string;
18926
- reason: string;
18927
- /** If true, this change is not supported and migration generation will fail */
18928
- unsupported?: boolean;
18929
- /** If true, show 3-step migration instructions for this unsupported change */
18930
- showThreeStepHint?: boolean;
18711
+ interface WorkflowExecutionDetailInfo extends WorkflowExecutionInfo {
18712
+ jobDetails?: (WorkflowJobExecutionInfo & {
18713
+ logs?: string;
18714
+ result?: string;
18715
+ })[];
18716
+ }
18717
+ interface GetWorkflowExecutionResult {
18718
+ execution: WorkflowExecutionDetailInfo;
18719
+ wait: () => Promise<WorkflowExecutionDetailInfo>;
18931
18720
  }
18932
18721
  /**
18933
- * Check if a migration diff has any changes
18934
- * @param {MigrationDiff} diff - Migration diff to check
18935
- * @returns {boolean} True if diff has changes
18936
- */
18937
- declare function hasChanges(diff: MigrationDiff): boolean;
18938
- /**
18939
- * Format a migration diff for display
18940
- * @param {MigrationDiff} diff - Migration diff to format
18941
- * @returns {string} Formatted diff string
18722
+ * List workflow executions with optional filters.
18723
+ *
18724
+ * Returns at most `options.limit` items. When `limit` is omitted or 0 the
18725
+ * function pages through every execution. The CLI caps this at 50 by
18726
+ * default via `pagedLogArgs`; programmatic callers that want the same
18727
+ * cap should pass `limit: 50` explicitly.
18728
+ * @param options - Workflow execution listing options
18729
+ * @returns List of workflow executions
18942
18730
  */
18943
- declare function formatMigrationDiff(diff: MigrationDiff): string;
18731
+ declare function listWorkflowExecutions<W extends WorkflowLike>(options?: ListWorkflowExecutionsTypedOptions<W>): Promise<WorkflowExecutionInfo[]>;
18732
+ declare function listWorkflowExecutions(options?: ListWorkflowExecutionsOptions): Promise<WorkflowExecutionInfo[]>;
18944
18733
  /**
18945
- * Format a summary of the migration diff
18946
- * @param {MigrationDiff} diff - Migration diff to summarize
18947
- * @returns {string} Formatted summary string
18734
+ * Get a single workflow execution with optional logs.
18735
+ * @param options - Workflow execution lookup options
18736
+ * @returns Workflow execution with optional logs
18948
18737
  */
18949
- declare function formatDiffSummary(diff: MigrationDiff): string;
18738
+ declare function getWorkflowExecution(options: GetWorkflowExecutionOptions): Promise<GetWorkflowExecutionResult>;
18950
18739
  //#endregion
18951
- //#region src/cli/commands/tailordb/migrate/types.d.ts
18740
+ //#region src/cli/commands/workflow/resume.d.ts
18741
+ interface ResumeWorkflowOptions {
18742
+ executionId: string;
18743
+ workspaceId?: string;
18744
+ profile?: string;
18745
+ interval?: number;
18746
+ }
18747
+ interface ResumeWorkflowResultWithWait {
18748
+ executionId: string;
18749
+ wait: (options?: WaitOptions) => Promise<WorkflowExecutionInfo>;
18750
+ }
18952
18751
  /**
18953
- * Label key for storing migration state in TailorDB Service metadata
18752
+ * Resume a suspended workflow execution and return a handle to wait for completion.
18753
+ * @param options - Resume options
18754
+ * @returns Resume result with wait helper
18954
18755
  */
18955
- declare const MIGRATION_LABEL_KEY = "sdk-migration";
18756
+ declare function resumeWorkflow(options: ResumeWorkflowOptions): Promise<ResumeWorkflowResultWithWait>;
18956
18757
  //#endregion
18957
- //#region src/cli/commands/tailordb/migrate/snapshot.d.ts
18958
- /**
18959
- * Initial schema migration number (0000)
18960
- */
18961
- declare const INITIAL_SCHEMA_NUMBER = 0;
18962
- /**
18963
- * Migration file names (used within migration directories)
18964
- */
18965
- declare const SCHEMA_FILE_NAME = "schema.json";
18966
- /** File name for migration diff metadata. */
18967
- declare const DIFF_FILE_NAME = "diff.json";
18968
- /** File name for migration script. */
18969
- declare const MIGRATE_FILE_NAME = "migrate.ts";
18970
- /** File name for generated DB type definitions. */
18971
- declare const DB_TYPES_FILE_NAME = "db.ts";
18758
+ //#region src/cli/commands/executor/trigger.d.ts
18759
+ type ManualTrigger = IncomingWebhookTrigger | ScheduleTriggerInput;
18760
+ type ManualTriggerExecutor<T extends ManualTrigger = ManualTrigger> = T extends ManualTrigger ? {
18761
+ name: string;
18762
+ trigger: T;
18763
+ } : never;
18764
+ type TriggerExecutorBaseOptions<E extends ManualTriggerExecutor> = {
18765
+ executor: E;
18766
+ workspaceId?: string;
18767
+ profile?: string;
18768
+ };
18972
18769
  /**
18973
- * Hook configuration in schema snapshot
18770
+ * @deprecated Use TriggerExecutorTypedOptions instead.
18974
18771
  */
18975
- interface SnapshotHook {
18976
- expr: string;
18772
+ interface TriggerExecutorOptions {
18773
+ executorName: string;
18774
+ payload?: JsonObject;
18775
+ workspaceId?: string;
18776
+ profile?: string;
18977
18777
  }
18978
- /**
18979
- * Validation configuration in schema snapshot
18980
- */
18981
- interface SnapshotValidation {
18982
- script: {
18983
- expr: string;
18984
- };
18985
- errorMessage: string;
18778
+ type TriggerExecutorTypedOptions<E extends ManualTriggerExecutor = ManualTriggerExecutor> = E extends ManualTriggerExecutor<IncomingWebhookTrigger> ? TriggerExecutorBaseOptions<E> & {
18779
+ payload?: JsonObject;
18780
+ } : TriggerExecutorBaseOptions<E> & {
18781
+ payload?: never;
18782
+ };
18783
+ interface TriggerExecutorResult {
18784
+ jobId?: string;
18986
18785
  }
18987
18786
  /**
18988
- * Serial configuration in schema snapshot
18787
+ * Trigger an executor and return the job ID.
18788
+ * @param options - Options for triggering executor
18789
+ * @returns Result containing the job ID if available
18989
18790
  */
18990
- interface SnapshotSerial {
18991
- start: number;
18992
- maxValue?: number;
18993
- format?: string;
18791
+ declare function triggerExecutor<E extends ManualTriggerExecutor>(options: TriggerExecutorTypedOptions<E>): Promise<TriggerExecutorResult>;
18792
+ declare function triggerExecutor(options: TriggerExecutorOptions): Promise<TriggerExecutorResult>;
18793
+ //#endregion
18794
+ //#region src/cli/commands/executor/transform.d.ts
18795
+ interface ExecutorJobListInfo {
18796
+ id: string;
18797
+ executorName: string;
18798
+ status: string;
18799
+ createdAt: string;
18800
+ }
18801
+ interface ExecutorJobInfo {
18802
+ id: string;
18803
+ executorName: string;
18804
+ status: string;
18805
+ scheduledAt: string;
18806
+ createdAt: string;
18807
+ updatedAt: string;
18808
+ }
18809
+ interface ExecutorJobAttemptInfo {
18810
+ id: string;
18811
+ jobId: string;
18812
+ status: string;
18813
+ error: string;
18814
+ startedAt: string;
18815
+ finishedAt: string;
18816
+ operationReference: string;
18817
+ }
18818
+ interface ExecutorListInfo {
18819
+ name: string;
18820
+ triggerType: string;
18821
+ targetType: string;
18822
+ disabled: boolean;
18823
+ }
18824
+ interface ExecutorInfo {
18825
+ name: string;
18826
+ description: string;
18827
+ triggerType: string;
18828
+ targetType: string;
18829
+ disabled: boolean;
18830
+ triggerConfig: string;
18831
+ targetConfig: string;
18994
18832
  }
18833
+ //#endregion
18834
+ //#region src/cli/commands/executor/jobs.d.ts
18835
+ type ExecutorLike$1 = {
18836
+ name: string;
18837
+ };
18838
+ type ListExecutorJobsTypedOptions<E extends ExecutorLike$1 = ExecutorLike$1> = {
18839
+ executor: E;
18840
+ status?: string;
18841
+ order?: Order;
18842
+ limit?: number;
18843
+ workspaceId?: string;
18844
+ profile?: string;
18845
+ };
18846
+ type GetExecutorJobTypedOptions<E extends ExecutorLike$1 = ExecutorLike$1> = {
18847
+ executor: E;
18848
+ jobId: string;
18849
+ attempts?: boolean;
18850
+ workspaceId?: string;
18851
+ profile?: string;
18852
+ };
18853
+ type WatchExecutorJobTypedOptions<E extends ExecutorLike$1 = ExecutorLike$1> = {
18854
+ executor: E;
18855
+ jobId: string;
18856
+ workspaceId?: string;
18857
+ profile?: string;
18858
+ interval?: number;
18859
+ logs?: boolean;
18860
+ };
18995
18861
  /**
18996
- * Enum value with optional description in schema snapshot
18862
+ * @deprecated Use ListExecutorJobsTypedOptions instead.
18997
18863
  */
18998
- interface SnapshotEnumValue {
18999
- value: string;
19000
- description?: string;
18864
+ interface ListExecutorJobsOptions {
18865
+ executorName: string;
18866
+ status?: string;
18867
+ order?: Order;
18868
+ limit?: number;
18869
+ workspaceId?: string;
18870
+ profile?: string;
19001
18871
  }
19002
18872
  /**
19003
- * Field configuration in schema snapshot
18873
+ * @deprecated Use GetExecutorJobTypedOptions instead.
19004
18874
  */
19005
- interface SnapshotFieldConfig {
19006
- type: string;
19007
- required: boolean;
19008
- array?: boolean;
19009
- index?: boolean;
19010
- unique?: boolean;
19011
- allowedValues?: SnapshotEnumValue[];
19012
- foreignKey?: boolean;
19013
- foreignKeyType?: string;
19014
- foreignKeyField?: string;
19015
- description?: string;
19016
- vector?: boolean;
19017
- hooks?: {
19018
- create?: SnapshotHook;
19019
- update?: SnapshotHook;
19020
- };
19021
- validate?: SnapshotValidation[];
19022
- serial?: SnapshotSerial;
19023
- scale?: number;
19024
- /** Nested fields (recursive) */
19025
- fields?: Record<string, SnapshotFieldConfig>;
18875
+ interface GetExecutorJobOptions {
18876
+ executorName: string;
18877
+ jobId: string;
18878
+ attempts?: boolean;
18879
+ workspaceId?: string;
18880
+ profile?: string;
19026
18881
  }
19027
18882
  /**
19028
- * Index configuration in schema snapshot
18883
+ * @deprecated Use WatchExecutorJobTypedOptions instead.
19029
18884
  */
19030
- interface SnapshotIndexConfig {
19031
- fields: string[];
19032
- unique?: boolean;
18885
+ interface WatchExecutorJobOptions {
18886
+ executorName: string;
18887
+ jobId: string;
18888
+ workspaceId?: string;
18889
+ profile?: string;
18890
+ interval?: number;
18891
+ logs?: boolean;
19033
18892
  }
19034
- /**
19035
- * Relationship configuration in schema snapshot
19036
- */
19037
- interface SnapshotRelationship {
18893
+ interface ExecutorJobDetailInfo extends ExecutorJobInfo {
18894
+ attempts?: ExecutorJobAttemptInfo[];
18895
+ }
18896
+ interface WorkflowJobLog {
18897
+ jobName: string;
18898
+ logs?: string;
18899
+ result?: string;
18900
+ }
18901
+ interface WatchExecutorJobResult {
18902
+ job: ExecutorJobDetailInfo;
19038
18903
  targetType: string;
19039
- targetField: string;
19040
- sourceField: string;
19041
- isArray: boolean;
19042
- description: string;
18904
+ workflowExecutionId?: string;
18905
+ workflowStatus?: string;
18906
+ workflowJobLogs?: WorkflowJobLog[];
18907
+ functionExecutionId?: string;
18908
+ functionStatus?: string;
18909
+ functionLogs?: string;
19043
18910
  }
19044
18911
  /**
19045
- * Permission operand types
18912
+ * List executor jobs for a given executor.
18913
+ *
18914
+ * Returns at most `options.limit` items. When `limit` is omitted or 0 the
18915
+ * function pages through every job. The CLI caps this at 50 by default
18916
+ * via `pagedLogArgs`; programmatic callers that want the same cap should
18917
+ * pass `limit: 50` explicitly.
18918
+ * @param options - Options for listing executor jobs
18919
+ * @returns List of executor job information
19046
18920
  */
19047
- type SnapshotPermissionOperand = {
19048
- user: string;
19049
- } | {
19050
- record: string;
19051
- } | {
19052
- newRecord: string;
19053
- } | {
19054
- oldRecord: string;
19055
- } | unknown;
18921
+ declare function listExecutorJobs<E extends ExecutorLike$1>(options: ListExecutorJobsTypedOptions<E>): Promise<ExecutorJobListInfo[]>;
18922
+ declare function listExecutorJobs(options: ListExecutorJobsOptions): Promise<ExecutorJobListInfo[]>;
19056
18923
  /**
19057
- * Permission operators
18924
+ * Get details of a specific executor job.
18925
+ * @param options - Options for getting executor job details
18926
+ * @returns Executor job detail information
19058
18927
  */
19059
- type SnapshotPermissionOperator = "eq" | "ne" | "in" | "nin" | "hasAny" | "nhasAny";
18928
+ declare function getExecutorJob<E extends ExecutorLike$1>(options: GetExecutorJobTypedOptions<E>): Promise<ExecutorJobDetailInfo>;
18929
+ declare function getExecutorJob(options: GetExecutorJobOptions): Promise<ExecutorJobDetailInfo>;
19060
18930
  /**
19061
- * Permission condition tuple
18931
+ * Watch an executor job until completion, including downstream executions.
18932
+ * @param options - Options for watching executor job
18933
+ * @returns Result including job details and downstream execution info
19062
18934
  */
19063
- type SnapshotPermissionCondition = readonly [SnapshotPermissionOperand, SnapshotPermissionOperator, SnapshotPermissionOperand];
18935
+ declare function watchExecutorJob<E extends ExecutorLike$1>(options: WatchExecutorJobTypedOptions<E>): Promise<WatchExecutorJobResult>;
18936
+ declare function watchExecutorJob(options: WatchExecutorJobOptions): Promise<WatchExecutorJobResult>;
18937
+ //#endregion
18938
+ //#region src/cli/commands/executor/list.d.ts
18939
+ interface ListExecutorsOptions {
18940
+ workspaceId?: string;
18941
+ profile?: string;
18942
+ order?: Order;
18943
+ limit?: number;
18944
+ }
19064
18945
  /**
19065
- * Action permission policy
18946
+ * List executors in the workspace and return CLI-friendly info.
18947
+ * @param options - Executor listing options
18948
+ * @returns List of executors
19066
18949
  */
19067
- interface SnapshotActionPermission {
19068
- conditions: readonly SnapshotPermissionCondition[];
19069
- description?: string;
19070
- permit: "allow" | "deny";
19071
- }
18950
+ declare function listExecutors(options?: ListExecutorsOptions): Promise<ExecutorListInfo[]>;
18951
+ //#endregion
18952
+ //#region src/cli/commands/executor/get.d.ts
18953
+ type ExecutorLike = {
18954
+ name: string;
18955
+ };
18956
+ type GetExecutorTypedOptions<E extends ExecutorLike = ExecutorLike> = {
18957
+ executor: E;
18958
+ workspaceId?: string;
18959
+ profile?: string;
18960
+ };
19072
18961
  /**
19073
- * Record-level permission configuration
18962
+ * @deprecated Use GetExecutorTypedOptions instead.
19074
18963
  */
19075
- interface SnapshotRecordPermission {
19076
- create: readonly SnapshotActionPermission[];
19077
- read: readonly SnapshotActionPermission[];
19078
- update: readonly SnapshotActionPermission[];
19079
- delete: readonly SnapshotActionPermission[];
18964
+ interface GetExecutorOptions {
18965
+ name: string;
18966
+ workspaceId?: string;
18967
+ profile?: string;
19080
18968
  }
19081
18969
  /**
19082
- * GQL permission actions
18970
+ * Get an executor by name and return CLI-friendly info.
18971
+ * @param options - Executor lookup options
18972
+ * @returns Executor information
19083
18973
  */
19084
- type SnapshotGqlAction = "read" | "create" | "update" | "delete" | "aggregate" | "bulkUpsert" | "all";
18974
+ declare function getExecutor<E extends ExecutorLike>(options: GetExecutorTypedOptions<E>): Promise<ExecutorInfo>;
18975
+ declare function getExecutor(options: GetExecutorOptions): Promise<ExecutorInfo>;
18976
+ //#endregion
18977
+ //#region src/cli/commands/executor/webhook.d.ts
18978
+ interface WebhookExecutorInfo {
18979
+ name: string;
18980
+ webhookUrl: string;
18981
+ disabled: boolean;
18982
+ }
18983
+ interface ListWebhookExecutorsOptions {
18984
+ workspaceId?: string;
18985
+ profile?: string;
18986
+ order?: Order;
18987
+ limit?: number;
18988
+ }
19085
18989
  /**
19086
- * GQL permission policy
18990
+ * List executors with incoming webhook triggers and return CLI-friendly info.
18991
+ * @param options - Listing options
18992
+ * @returns List of webhook executors with URLs
19087
18993
  */
19088
- interface SnapshotGqlPermissionPolicy {
19089
- conditions: readonly SnapshotPermissionCondition[];
19090
- actions: readonly SnapshotGqlAction[];
19091
- permit: "allow" | "deny";
19092
- description?: string;
18994
+ declare function listWebhookExecutors(options?: ListWebhookExecutorsOptions): Promise<WebhookExecutorInfo[]>;
18995
+ //#endregion
18996
+ //#region src/cli/commands/organization/transform.d.ts
18997
+ interface UserOrganizationInfo {
18998
+ organizationId: string;
18999
+ organizationName: string;
19000
+ rootFolderId: string;
19001
+ rootFolderName: string;
19002
+ displayName: string;
19003
+ }
19004
+ interface OrganizationInfo {
19005
+ id: string;
19006
+ name: string;
19007
+ createdAt: Date | null;
19008
+ updatedAt: Date | null;
19009
+ }
19010
+ interface FolderListInfo {
19011
+ id: string;
19012
+ name: string;
19013
+ organizationId: string;
19014
+ parentFolderId: string;
19015
+ hasChildren: boolean;
19016
+ createdAt: Date | null;
19017
+ }
19018
+ interface FolderInfo extends FolderListInfo {
19019
+ updatedAt: Date | null;
19020
+ }
19021
+ //#endregion
19022
+ //#region src/cli/commands/organization/list.d.ts
19023
+ interface ListOrganizationsOptions {
19024
+ limit?: number;
19093
19025
  }
19094
19026
  /**
19095
- * GQL permission configuration
19027
+ * List organizations the current user belongs to.
19028
+ * @param options - Organization listing options
19029
+ * @returns List of user organizations
19096
19030
  */
19097
- type SnapshotGqlPermission = readonly SnapshotGqlPermissionPolicy[];
19031
+ declare function listOrganizations(options?: ListOrganizationsOptions): Promise<UserOrganizationInfo[]>;
19032
+ //#endregion
19033
+ //#region src/cli/commands/organization/get.d.ts
19034
+ declare const getOrganizationOptionsSchema: z.ZodObject<{
19035
+ organizationId: z.ZodUUID;
19036
+ }, z.core.$strip>;
19037
+ type GetOrganizationOptions = z.input<typeof getOrganizationOptionsSchema>;
19098
19038
  /**
19099
- * Type definition in schema snapshot
19039
+ * Get detailed information about an organization.
19040
+ * @param options - Organization get options
19041
+ * @returns Organization details
19100
19042
  */
19101
- interface SnapshotType {
19102
- name: string;
19103
- pluralForm?: string;
19104
- description?: string;
19105
- fields: Record<string, SnapshotFieldConfig>;
19106
- settings?: {
19107
- aggregation?: boolean;
19108
- bulkUpsert?: boolean;
19109
- gqlOperations?: {
19110
- create?: boolean;
19111
- update?: boolean;
19112
- delete?: boolean;
19113
- read?: boolean;
19114
- };
19115
- publishEvents?: boolean;
19116
- };
19117
- indexes?: Record<string, SnapshotIndexConfig>;
19118
- files?: Record<string, string>;
19119
- forwardRelationships?: Record<string, SnapshotRelationship>;
19120
- backwardRelationships?: Record<string, SnapshotRelationship>;
19121
- permissions?: {
19122
- record?: SnapshotRecordPermission;
19123
- gql?: SnapshotGqlPermission;
19124
- };
19125
- }
19043
+ declare function getOrganization(options: GetOrganizationOptions): Promise<OrganizationInfo>;
19044
+ //#endregion
19045
+ //#region src/cli/commands/organization/update.d.ts
19046
+ declare const updateOrganizationOptionsSchema: z.ZodObject<{
19047
+ organizationId: z.ZodUUID;
19048
+ name: z.ZodString;
19049
+ }, z.core.$strip>;
19050
+ type UpdateOrganizationOptions = z.input<typeof updateOrganizationOptionsSchema>;
19126
19051
  /**
19127
- * Schema snapshot - full schema state at a point in time
19128
- * Stored as XXXX/schema.json (e.g., 0000/schema.json for initial snapshot)
19052
+ * Update an organization's name.
19053
+ * @param options - Organization update options
19054
+ * @returns Updated organization details
19129
19055
  */
19130
- interface SchemaSnapshot {
19131
- /** Format version for future compatibility */
19132
- version: typeof SCHEMA_SNAPSHOT_VERSION;
19133
- namespace: string;
19134
- createdAt: string;
19135
- types: Record<string, SnapshotType>;
19056
+ declare function updateOrganization(options: UpdateOrganizationOptions): Promise<OrganizationInfo>;
19057
+ //#endregion
19058
+ //#region src/cli/commands/organization/tree.d.ts
19059
+ interface OrganizationTreeOptions {
19060
+ organizationId?: string;
19061
+ depth?: number;
19062
+ }
19063
+ interface OrganizationTreeJson {
19064
+ organizationId: string;
19065
+ organizationName: string;
19066
+ folders: FolderTreeJson[];
19067
+ }
19068
+ interface FolderTreeJson {
19069
+ id: string;
19070
+ name: string;
19071
+ children: FolderTreeJson[];
19136
19072
  }
19137
19073
  /**
19138
- * Migration file type
19074
+ * Display a tree view of organizations and their folder hierarchy.
19075
+ * @param options - Tree display options
19076
+ * @returns Organization tree as structured data
19139
19077
  */
19140
- type MigrationFileType = "schema" | "diff" | "migrate" | "db";
19078
+ declare function organizationTree(options?: OrganizationTreeOptions): Promise<OrganizationTreeJson[]>;
19079
+ //#endregion
19080
+ //#region src/cli/commands/organization/folder/list.d.ts
19081
+ declare const listFoldersOptionsSchema: z.ZodObject<{
19082
+ organizationId: z.ZodUUID;
19083
+ parentFolderId: z.ZodOptional<z.ZodString>;
19084
+ order: z.ZodOptional<z.ZodEnum<{
19085
+ asc: "asc";
19086
+ desc: "desc";
19087
+ }>>;
19088
+ limit: z.ZodOptional<z.ZodNumber>;
19089
+ }, z.core.$strip>;
19090
+ type ListFoldersOptions = z.input<typeof listFoldersOptionsSchema>;
19141
19091
  /**
19142
- * Information about a migration
19092
+ * List folders in an organization.
19093
+ * @param options - Folder listing options
19094
+ * @returns List of folders
19143
19095
  */
19144
- interface MigrationInfo {
19145
- /** Migration number (e.g., 1, 2, 3) */
19146
- number: number;
19147
- /** Migration number as 4-digit string (e.g., "0001", "0002") */
19148
- numberStr: string;
19149
- /** Migration file type */
19150
- type: MigrationFileType;
19151
- /** Path to migration file */
19152
- path: string;
19153
- /** Parsed content (schema snapshot or diff) */
19154
- content: SchemaSnapshot | MigrationDiff;
19155
- }
19096
+ declare function listFolders(options: ListFoldersOptions): Promise<FolderListInfo[]>;
19097
+ //#endregion
19098
+ //#region src/cli/commands/organization/folder/get.d.ts
19099
+ declare const getFolderOptionsSchema: z.ZodObject<{
19100
+ organizationId: z.ZodUUID;
19101
+ folderId: z.ZodUUID;
19102
+ }, z.core.$strip>;
19103
+ type GetFolderOptions = z.input<typeof getFolderOptionsSchema>;
19156
19104
  /**
19157
- * Get migration directory path for a given number
19158
- * @param {string} migrationsDir - Base migrations directory path
19159
- * @param {number} num - Migration number
19160
- * @returns {string} Full directory path for the migration
19105
+ * Get detailed information about a folder.
19106
+ * @param options - Folder get options
19107
+ * @returns Folder details
19161
19108
  */
19162
- declare function getMigrationDirPath(migrationsDir: string, num: number): string;
19109
+ declare function getFolder(options: GetFolderOptions): Promise<FolderInfo>;
19110
+ //#endregion
19111
+ //#region src/cli/commands/organization/folder/create.d.ts
19112
+ declare const createFolderOptionsSchema: z.ZodObject<{
19113
+ organizationId: z.ZodUUID;
19114
+ parentFolderId: z.ZodOptional<z.ZodString>;
19115
+ name: z.ZodString;
19116
+ }, z.core.$strip>;
19117
+ type CreateFolderOptions = z.input<typeof createFolderOptionsSchema>;
19163
19118
  /**
19164
- * Get migration file path for a given number and type
19165
- * @param {string} migrationsDir - Migrations directory path
19166
- * @param {number} num - Migration number
19167
- * @param {MigrationFileType} type - File type
19168
- * @returns {string} Full file path
19119
+ * Create a new folder in an organization.
19120
+ * @param options - Folder creation options
19121
+ * @returns Created folder details
19169
19122
  */
19170
- declare function getMigrationFilePath(migrationsDir: string, num: number, type: MigrationFileType): string;
19123
+ declare function createFolder(options: CreateFolderOptions): Promise<FolderInfo>;
19124
+ //#endregion
19125
+ //#region src/cli/commands/organization/folder/update.d.ts
19126
+ declare const updateFolderOptionsSchema: z.ZodObject<{
19127
+ organizationId: z.ZodUUID;
19128
+ folderId: z.ZodUUID;
19129
+ name: z.ZodString;
19130
+ }, z.core.$strip>;
19131
+ type UpdateFolderOptions = z.input<typeof updateFolderOptionsSchema>;
19171
19132
  /**
19172
- * Create a schema snapshot from local type definitions
19173
- * @param {Record<string, TailorDBType>} types - Local type definitions
19174
- * @param {string} namespace - Namespace for the snapshot
19175
- * @returns {SchemaSnapshot} Schema snapshot
19133
+ * Update a folder's name.
19134
+ * @param options - Folder update options
19135
+ * @returns Updated folder details
19176
19136
  */
19177
- declare function createSnapshotFromLocalTypes(types: Record<string, TailorDBType>, namespace: string): SchemaSnapshot;
19137
+ declare function updateFolder(options: UpdateFolderOptions): Promise<FolderInfo>;
19138
+ //#endregion
19139
+ //#region src/cli/commands/organization/folder/delete.d.ts
19140
+ declare const deleteFolderOptionsSchema: z.ZodObject<{
19141
+ organizationId: z.ZodUUID;
19142
+ folderId: z.ZodUUID;
19143
+ }, z.core.$strip>;
19144
+ type DeleteFolderOptions = z.input<typeof deleteFolderOptionsSchema>;
19178
19145
  /**
19179
- * Get all migration directories and their files, sorted by number
19180
- * @param {string} migrationsDir - Migrations directory path
19181
- * @returns {Array<{number: number, type: "schema" | "diff", path: string}>} Migration files sorted by number
19146
+ * Delete a folder from an organization.
19147
+ * @param options - Folder deletion options
19148
+ * @returns Promise that resolves when deletion completes
19182
19149
  */
19183
- declare function getMigrationFiles(migrationsDir: string): {
19184
- number: number;
19185
- type: "schema" | "diff";
19186
- path: string;
19187
- }[];
19150
+ declare function deleteFolder(options: DeleteFolderOptions): Promise<void>;
19151
+ //#endregion
19152
+ //#region src/cli/shared/context.d.ts
19153
+ type LoadWorkspaceIdOptions = {
19154
+ workspaceId?: string;
19155
+ profile?: string;
19156
+ };
19157
+ type LoadAccessTokenOptions = {
19158
+ useProfile?: boolean;
19159
+ profile?: string;
19160
+ };
19188
19161
  /**
19189
- * Get the next migration number for a directory
19190
- * Returns INITIAL_SCHEMA_NUMBER (0) if no migrations exist
19191
- * @param {string} migrationsDir - Migrations directory path
19192
- * @returns {number} Next migration number
19162
+ * Read Tailor Platform CLI configuration, migrating from tailorctl or v1 if necessary.
19163
+ * @returns Parsed platform configuration
19193
19164
  */
19194
- declare function getNextMigrationNumber(migrationsDir: string): number;
19195
19165
  /**
19196
- * Reconstruct the latest schema snapshot from all migration files
19197
- * Returns null if no migrations exist
19198
- * @param {string} migrationsDir - Migrations directory path
19199
- * @param {number} [maxVersion] - Optional maximum migration version to apply
19200
- * @returns {SchemaSnapshot | null} Reconstructed snapshot or null if no migrations exist
19166
+ * Load workspace ID from command options, environment variables, or platform config.
19167
+ * In CLI context, env fallback is also handled by politty's arg env option.
19168
+ * Priority: opts/workspaceId > env/workspaceId > opts/profile > error
19169
+ * @param opts - Workspace and profile options
19170
+ * @returns Resolved workspace ID
19201
19171
  */
19202
- declare function reconstructSnapshotFromMigrations(migrationsDir: string, maxVersion?: number): SchemaSnapshot | null;
19172
+ declare function loadWorkspaceId(opts?: LoadWorkspaceIdOptions): Promise<string>;
19203
19173
  /**
19204
- * Get the latest migration number from a directory
19205
- * Returns 0 if no migrations exist
19206
- * @param {string} migrationsDir - Migrations directory path
19207
- * @returns {number} Latest migration number or 0 if no migrations exist
19174
+ * Load access token from environment variables, command options, or platform config.
19175
+ * In CLI context, profile env fallback is also handled by politty's arg env option.
19176
+ * Priority: env/TAILOR_PLATFORM_TOKEN > env/TAILOR_TOKEN (deprecated) > opts/profile > env/profile > config/currentUser > error
19177
+ * @param opts - Profile options
19178
+ * @returns Resolved access token
19208
19179
  */
19209
- declare function getLatestMigrationNumber(migrationsDir: string): number;
19180
+ declare function loadAccessToken(opts?: LoadAccessTokenOptions): Promise<string>;
19181
+ //#endregion
19182
+ //#region src/cli/commands/api/api-call.d.ts
19183
+ interface ApiCallOptions {
19184
+ profile?: string;
19185
+ endpoint: string;
19186
+ body?: string;
19187
+ }
19188
+ interface ApiCallResult {
19189
+ status: number;
19190
+ data: unknown;
19191
+ }
19210
19192
  /**
19211
- * Compare two snapshots and generate a diff
19212
- * @param {SchemaSnapshot} previous - Previous schema snapshot
19213
- * @param {SchemaSnapshot} current - Current schema snapshot
19214
- * @returns {MigrationDiff} Migration diff between snapshots
19193
+ * Call Tailor Platform API endpoints directly.
19194
+ * If the endpoint doesn't contain "/", it defaults to `tailor.v1.OperatorService/{endpoint}`.
19195
+ * @param options - API call options (profile, endpoint, body)
19196
+ * @returns Response status and data
19215
19197
  */
19216
- declare function compareSnapshots(previous: SchemaSnapshot, current: SchemaSnapshot): MigrationDiff;
19198
+ declare function apiCall(options: ApiCallOptions): Promise<ApiCallResult>;
19199
+ //#endregion
19200
+ //#region src/cli/query/index.d.ts
19201
+ declare const queryOptionsSchema: z.ZodObject<{
19202
+ workspaceId: z.ZodOptional<z.ZodString>;
19203
+ profile: z.ZodOptional<z.ZodString>;
19204
+ configPath: z.ZodOptional<z.ZodString>;
19205
+ engine: z.ZodEnum<{
19206
+ sql: "sql";
19207
+ gql: "gql";
19208
+ }>;
19209
+ machineUser: z.ZodString;
19210
+ query: z.ZodString;
19211
+ }, z.core.$strip>;
19212
+ type QueryOptions = z.input<typeof queryOptionsSchema>;
19213
+ type SQLQueryDispatchResult = {
19214
+ engine: "sql";
19215
+ namespace: string;
19216
+ query: string;
19217
+ result: unknown;
19218
+ };
19219
+ type GQLQueryDispatchResult = {
19220
+ engine: "gql";
19221
+ query: string;
19222
+ result: unknown;
19223
+ };
19224
+ type QueryDispatchResult = SQLQueryDispatchResult | GQLQueryDispatchResult;
19217
19225
  /**
19218
- * Compare local types with a snapshot and generate a diff
19219
- * @param {SchemaSnapshot} snapshot - Schema snapshot to compare against
19220
- * @param {Record<string, TailorDBType>} localTypes - Local type definitions
19221
- * @param {string} namespace - Namespace for comparison
19222
- * @returns {MigrationDiff} Migration diff
19226
+ * Dispatch query execution.
19227
+ * @param options - Query command options
19228
+ * @returns Dispatch result
19229
+ */
19230
+ declare function query(options: QueryOptions): Promise<QueryDispatchResult>;
19231
+ //#endregion
19232
+ //#region src/cli/commands/tailordb/truncate.d.ts
19233
+ interface TruncateOptions {
19234
+ workspaceId?: string;
19235
+ profile?: string;
19236
+ configPath?: string;
19237
+ all?: boolean;
19238
+ namespace?: string;
19239
+ types?: string[];
19240
+ }
19241
+ /**
19242
+ * Truncate TailorDB data based on the given options.
19243
+ * @param options - Truncate options (all, namespace, or types)
19244
+ * @returns Promise that resolves when truncation completes
19245
+ */
19246
+ declare function truncate(options?: TruncateOptions): Promise<void>;
19247
+ //#endregion
19248
+ //#region src/cli/commands/tailordb/migrate/generate.d.ts
19249
+ interface GenerateOptions$1 {
19250
+ configPath?: string;
19251
+ name?: string;
19252
+ yes?: boolean;
19253
+ init?: boolean;
19254
+ }
19255
+ /**
19256
+ * Generate migration files for TailorDB schema changes
19257
+ * @param {GenerateOptions} options - Generation options
19258
+ * @returns {Promise<void>} Promise that resolves when generation is complete
19223
19259
  */
19224
- declare function compareLocalTypesWithSnapshot(snapshot: SchemaSnapshot, localTypes: Record<string, TailorDBType>, namespace: string): MigrationDiff;
19260
+ declare function generate$1(options: GenerateOptions$1): Promise<void>;
19225
19261
  //#endregion
19226
19262
  //#region src/cli/commands/tailordb/migrate/config.d.ts
19227
19263
  /**
@@ -19404,5 +19440,5 @@ declare function waitForExecution(client: OperatorClient, workspaceId: string, e
19404
19440
  */
19405
19441
  declare function executeScript(options: ScriptExecutionOptions): Promise<ScriptExecutionResult>;
19406
19442
  //#endregion
19407
- export { type AggregateArgs, type ApiCallOptions, type ApiCallResult, type AppHealthInfo, type AppInfo, type ApplicationInfo, type DeployOptions as ApplyOptions, type DeployOptions, type AuthInvoker, type BreakingChangeInfo, type BundledScripts, type ChunkSeedDataOptions, type CodeGenerator, type CreateFolderOptions, type CreateWorkspaceOptions, DB_TYPES_FILE_NAME, DIFF_FILE_NAME, type DeleteFolderOptions, type DeleteWorkspaceOptions, type DependencyKind, type ExecutionWaitResult, type Executor, type ExecutorGenerator, type ExecutorInfo, type ExecutorInput, type ExecutorJobAttemptInfo, type ExecutorJobDetailInfo, type ExecutorJobInfo, type ExecutorJobListInfo, type ExecutorListInfo, type FolderInfo, type FolderListInfo, type FullCodeGenerator, type FullInput, type FunctionRegistryInfo, type GenerateOptions, type GeneratorResult, type HealthOptions as GetAppHealthOptions, type GetExecutorJobOptions, type GetExecutorJobTypedOptions, type GetExecutorOptions, type GetExecutorTypedOptions, type GetFolderOptions, type GetFunctionRegistryOptions, type GetMachineUserTokenOptions, type GetOAuth2ClientOptions, type GetOrganizationOptions, type GetWorkflowExecutionOptions, type GetWorkflowExecutionResult, type GetWorkflowOptions, type GetWorkflowTypedOptions, type GetWorkspaceOptions, INITIAL_SCHEMA_NUMBER, type InviteUserOptions, type ListAppsOptions, type ListExecutorJobsOptions, type ListExecutorJobsTypedOptions, type ListExecutorsOptions, type ListFoldersOptions, type ListFunctionRegistriesOptions, type ListMachineUsersOptions, type ListOAuth2ClientsOptions, type ListOrganizationsOptions, type ListUsersOptions, type ListWebhookExecutorsOptions, type ListWorkflowExecutionsOptions, type ListWorkflowExecutionsTypedOptions, type ListWorkflowsOptions, type ListWorkspacesOptions, type LoadedConfig, MIGRATE_FILE_NAME, MIGRATION_LABEL_KEY, type MachineUserInfo, type MachineUserTokenInfo, type GenerateOptions$1 as MigrateGenerateOptions, type MigrationBundleResult, type MigrationDiff, type MigrationInfo, type NamespaceWithMigrations, type OAuth2ClientCredentials, type OAuth2ClientInfo, type OperatorClient, type OrganizationInfo, type OrganizationTreeOptions, type PluginAttachment, type RemoveOptions, type RemoveUserOptions, type Resolver, type ResolverGenerator, type ResolverInput, type RestoreWorkspaceOptions, type ResumeWorkflowOptions, type ResumeWorkflowResultWithWait, SCHEMA_FILE_NAME, type SchemaSnapshot, type ScriptExecutionOptions, type ScriptExecutionResult, type SeedBundleResult, type SeedChunk, type ShowOptions, type SnapshotFieldConfig, type SnapshotType, type StartWorkflowOptions, type StartWorkflowResultWithWait, type StartWorkflowTypedOptions, type TailorDBGenerator, type TailorDBInput, type TailorDBResolverGenerator, type TailorDBType, type TriggerExecutorOptions, type TriggerExecutorResult, type TriggerExecutorTypedOptions, type TruncateOptions, type TypeSourceInfoEntry, type UpdateFolderOptions, type UpdateOrganizationOptions, type UpdateUserOptions, type UserInfo, type UserOrganizationInfo, type WaitOptions, type WatchExecutorJobOptions, type WatchExecutorJobResult, type WatchExecutorJobTypedOptions, type WebhookExecutorInfo, type WorkflowExecutionInfo, type WorkflowInfo, type WorkflowJobExecutionInfo, type WorkflowListInfo, type WorkspaceDetails, type WorkspaceInfo, apiCall, deploy as apply, deploy, bundleMigrationScript, bundleSeedScript, chunkSeedData, compareLocalTypesWithSnapshot, compareSnapshots, createFolder, createSnapshotFromLocalTypes, createWorkspace, deleteFolder, deleteWorkspace, enumConstantsPlugin, executeScript, fileUtilsPlugin, formatDiffSummary, formatMigrationDiff, generate, generateUserTypes, getAppHealth, getExecutor, getExecutorJob, getFolder, getFunctionRegistry, getLatestMigrationNumber, getMachineUserToken, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNamespacesWithMigrations, getNextMigrationNumber, getOAuth2Client, getOrganization, getWorkflow, getWorkflowExecution, getWorkspace, hasChanges, initOperatorClient, inviteUser, kyselyTypePlugin, listApps, listExecutorJobs, listExecutors, listFolders, listFunctionRegistries, listMachineUsers, listOAuth2Clients, listOrganizations, listUsers, listWebhookExecutors, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadWorkspaceId, generate$1 as migrateGenerate, organizationTree, query, reconstructSnapshotFromMigrations, remove, removeUser, restoreWorkspace, resumeWorkflow, seedPlugin, show, startWorkflow, triggerExecutor, truncate, updateFolder, updateOrganization, updateUser, waitForExecution, watchExecutorJob };
19443
+ export { type AggregateArgs, type ApiCallOptions, type ApiCallResult, type AppHealthInfo, type AppInfo, type ApplicationInfo, type DeployOptions as ApplyOptions, type DeployOptions, type AuthInvoker, type BreakingChangeInfo, type BundledScripts, type ChunkSeedDataOptions, type CodeGenerator, type CreateFolderOptions, type CreateWorkspaceOptions, DB_TYPES_FILE_NAME, DIFF_FILE_NAME, type DeleteFolderOptions, type DeleteWorkspaceOptions, type DependencyKind, type ExecutionWaitResult, type Executor, type ExecutorGenerator, type ExecutorInfo, type ExecutorInput, type ExecutorJobAttemptInfo, type ExecutorJobDetailInfo, type ExecutorJobInfo, type ExecutorJobListInfo, type ExecutorListInfo, type FolderInfo, type FolderListInfo, type FullCodeGenerator, type FullInput, type FunctionRegistryInfo, type GenerateOptions, type GeneratorResult, type HealthOptions as GetAppHealthOptions, type GetExecutorJobOptions, type GetExecutorJobTypedOptions, type GetExecutorOptions, type GetExecutorTypedOptions, type GetFolderOptions, type GetFunctionRegistryOptions, type GetMachineUserTokenOptions, type GetOAuth2ClientOptions, type GetOrganizationOptions, type GetWorkflowExecutionOptions, type GetWorkflowExecutionResult, type GetWorkflowOptions, type GetWorkflowTypedOptions, type GetWorkspaceOptions, INITIAL_SCHEMA_NUMBER, type InviteUserOptions, type ListAppsOptions, type ListExecutorJobsOptions, type ListExecutorJobsTypedOptions, type ListExecutorsOptions, type ListFoldersOptions, type ListFunctionRegistriesOptions, type ListMachineUsersOptions, type ListOAuth2ClientsOptions, type ListOrganizationsOptions, type ListUsersOptions, type ListWebhookExecutorsOptions, type ListWorkflowExecutionsOptions, type ListWorkflowExecutionsTypedOptions, type ListWorkflowsOptions, type ListWorkspacesOptions, type LoadedConfig, MIGRATE_FILE_NAME, MIGRATION_LABEL_KEY, type MachineUserInfo, type MachineUserTokenInfo, type GenerateOptions$1 as MigrateGenerateOptions, type MigrationBundleResult, type MigrationDiff, type MigrationInfo, type NamespaceWithMigrations, type OAuth2ClientCredentials, type OAuth2ClientInfo, type OperatorClient, type OrganizationInfo, type OrganizationTreeOptions, type PluginAttachment, type RemoveOptions, type RemoveUserOptions, type Resolver, type ResolverGenerator, type ResolverInput, type RestoreWorkspaceOptions, type ResumeWorkflowOptions, type ResumeWorkflowResultWithWait, SCHEMA_FILE_NAME, type SchemaSnapshot, type ScriptExecutionOptions, type ScriptExecutionResult, type SeedBundleResult, type SeedChunk, type ShowOptions, type SnapshotFieldConfig, type StartWorkflowOptions, type StartWorkflowResultWithWait, type StartWorkflowTypedOptions, type TailorDBGenerator, type TailorDBInput, type TailorDBResolverGenerator, type TailorDBSnapshotType, type TailorDBType, type TriggerExecutorOptions, type TriggerExecutorResult, type TriggerExecutorTypedOptions, type TruncateOptions, type TypeSourceInfoEntry, type UpdateFolderOptions, type UpdateOrganizationOptions, type UpdateUserOptions, type UserInfo, type UserOrganizationInfo, type WaitOptions, type WatchExecutorJobOptions, type WatchExecutorJobResult, type WatchExecutorJobTypedOptions, type WebhookExecutorInfo, type WorkflowExecutionInfo, type WorkflowInfo, type WorkflowJobExecutionInfo, type WorkflowListInfo, type WorkspaceDetails, type WorkspaceInfo, apiCall, deploy as apply, deploy, bundleMigrationScript, bundleSeedScript, chunkSeedData, compareLocalTypesWithSnapshot, compareSnapshots, createFolder, createSnapshotFromLocalTypes, createWorkspace, deleteFolder, deleteWorkspace, enumConstantsPlugin, executeScript, fileUtilsPlugin, formatDiffSummary, formatMigrationDiff, generate, generateUserTypes, getAppHealth, getExecutor, getExecutorJob, getFolder, getFunctionRegistry, getLatestMigrationNumber, getMachineUserToken, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNamespacesWithMigrations, getNextMigrationNumber, getOAuth2Client, getOrganization, getWorkflow, getWorkflowExecution, getWorkspace, hasChanges, initOperatorClient, inviteUser, kyselyTypePlugin, listApps, listExecutorJobs, listExecutors, listFolders, listFunctionRegistries, listMachineUsers, listOAuth2Clients, listOrganizations, listUsers, listWebhookExecutors, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadWorkspaceId, generate$1 as migrateGenerate, organizationTree, query, reconstructSnapshotFromMigrations, remove, removeUser, restoreWorkspace, resumeWorkflow, seedPlugin, show, startWorkflow, triggerExecutor, truncate, updateFolder, updateOrganization, updateUser, waitForExecution, watchExecutorJob };
19408
19444
  //# sourceMappingURL=lib.d.mts.map