@tailor-platform/sdk 0.20.0 → 0.21.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.
@@ -8,12 +8,12 @@ import { IsAny, NonEmptyObject } from "type-fest";
8
8
  import * as zod_v4_core50 from "zod/v4/core";
9
9
 
10
10
  //#region src/configure/types/helpers.d.ts
11
- type Prettify<T> = { [K in keyof T as string extends K ? never : K]: T[K] } & {};
12
- type DeepWritable<T> = T extends Date | RegExp | Function ? T : T extends object ? { -readonly [P in keyof T]: DeepWritable<T[P]> } & {} : T;
13
- type output<T> = T extends {
11
+ type Prettify<T$1> = { [K in keyof T$1 as string extends K ? never : K]: T$1[K] } & {};
12
+ type DeepWritable<T$1> = T$1 extends Date | RegExp | Function ? T$1 : T$1 extends object ? { -readonly [P in keyof T$1]: DeepWritable<T$1[P]> } & {} : T$1;
13
+ type output<T$1> = T$1 extends {
14
14
  _output: infer U;
15
15
  } ? DeepWritable<U> : never;
16
- type NullableToOptional<T> = { [K in keyof T as null extends T[K] ? never : K]: T[K] } & { [K in keyof T as null extends T[K] ? K : never]?: T[K] };
16
+ type NullableToOptional<T$1> = { [K in keyof T$1 as null extends T$1[K] ? never : K]: T$1[K] } & { [K in keyof T$1 as null extends T$1[K] ? K : never]?: T$1[K] };
17
17
  type InferFieldsOutput<F extends Record<string, {
18
18
  _output: any;
19
19
  [key: string]: any;
@@ -24,9 +24,9 @@ type InferFieldsOutput<F extends Record<string, {
24
24
  * so they can't be assigned to JsonValue's {[Key in string]: JsonValue}.
25
25
  * This type uses a recursive check instead.
26
26
  */
27
- type JsonCompatible<T> = T extends string | number | boolean | null | undefined ? T : T extends readonly (infer U)[] ? JsonCompatible<U>[] : T extends object ? T extends {
27
+ type JsonCompatible<T$1> = T$1 extends string | number | boolean | null | undefined ? T$1 : T$1 extends readonly (infer U)[] ? JsonCompatible<U>[] : T$1 extends object ? T$1 extends {
28
28
  toJSON: () => unknown;
29
- } ? never : { [K in keyof T]: JsonCompatible<T[K]> } : never;
29
+ } ? never : { [K in keyof T$1]: JsonCompatible<T$1[K]> } : never;
30
30
  //#endregion
31
31
  //#region src/parser/service/resolver/schema.d.ts
32
32
  declare const QueryTypeSchema: z.ZodUnion<readonly [z.ZodLiteral<"query">, z.ZodLiteral<"mutation">]>;
@@ -185,12 +185,12 @@ declare class TailorField<const Defined extends DefinedFieldMetadata = DefinedFi
185
185
  }
186
186
  //#endregion
187
187
  //#region src/configure/types/user.d.ts
188
- interface AttributeMap$1 {}
189
- interface AttributeList$1 {
188
+ interface AttributeMap {}
189
+ interface AttributeList {
190
190
  __tuple?: [];
191
191
  }
192
- type InferredAttributeMap = keyof AttributeMap$1 extends never ? Record<string, string | string[] | boolean | boolean[] | undefined> : AttributeMap$1;
193
- type InferredAttributeList = AttributeList$1["__tuple"] extends [] ? string[] : AttributeList$1["__tuple"];
192
+ type InferredAttributeMap = keyof AttributeMap extends never ? Record<string, string | string[] | boolean | boolean[] | undefined> : AttributeMap;
193
+ type InferredAttributeList = AttributeList["__tuple"] extends [] ? string[] : AttributeList["__tuple"];
194
194
  /** Represents a user in the Tailor platform. */
195
195
  type TailorUser = {
196
196
  /**
@@ -219,19 +219,24 @@ type TailorUser = {
219
219
  /** Represents an unauthenticated user in the Tailor platform. */
220
220
  declare const unauthenticatedTailorUser: TailorUser;
221
221
  //#endregion
222
+ //#region src/configure/types/env.d.ts
223
+ interface Env {}
224
+ /** Represents environment variables in the Tailor platform. */
225
+ type TailorEnv = keyof Env extends never ? Record<string, string> : Env;
226
+ //#endregion
222
227
  //#region src/configure/types/validation.d.ts
223
228
  /**
224
229
  * Validation function type
225
230
  */
226
- type ValidateFn<O, D = unknown> = (args: {
231
+ type ValidateFn<O, D$1 = unknown> = (args: {
227
232
  value: O;
228
- data: D;
233
+ data: D$1;
229
234
  user: TailorUser;
230
235
  }) => boolean;
231
236
  /**
232
237
  * Validation configuration with custom error message
233
238
  */
234
- type ValidateConfig<O, D = unknown> = [ValidateFn<O, D>, string];
239
+ type ValidateConfig<O, D$1 = unknown> = [ValidateFn<O, D$1>, string];
235
240
  /**
236
241
  * Field-level validation function
237
242
  */
@@ -307,11 +312,11 @@ type FieldOptions = {
307
312
  optional?: boolean;
308
313
  array?: boolean;
309
314
  };
310
- type FieldOutput<T, O extends FieldOptions> = OptionalFieldOutput<ArrayFieldOutput<T, O>, O>;
311
- type OptionalFieldOutput<T, O extends FieldOptions> = O["optional"] extends true ? T | null : T;
312
- type ArrayFieldOutput<T, O extends FieldOptions> = [O] extends [{
315
+ type FieldOutput<T$1, O extends FieldOptions> = OptionalFieldOutput<ArrayFieldOutput<T$1, O>, O>;
316
+ type OptionalFieldOutput<T$1, O extends FieldOptions> = O["optional"] extends true ? T$1 | null : T$1;
317
+ type ArrayFieldOutput<T$1, O extends FieldOptions> = [O] extends [{
313
318
  array: true;
314
- }] ? T[] : T;
319
+ }] ? T$1[] : T$1;
315
320
  //#endregion
316
321
  //#region src/configure/types/field.d.ts
317
322
  type AllowedValue = EnumValue;
@@ -571,31 +576,31 @@ type UsernameFieldKey<User extends TailorDBInstance> = IsAny<User> extends true
571
576
  type UserAttributeKey<User extends TailorDBInstance> = { [K in UserFieldKeys<User>]: K extends "id" ? never : FieldSupportsValueOperand<User, K> extends true ? FieldIsOfType<User, K, "datetime" | "date" | "time"> extends true ? never : K : never }[UserFieldKeys<User>];
572
577
  type UserAttributeListKey<User extends TailorDBInstance> = { [K in UserFieldKeys<User>]: K extends "id" ? never : FieldIsOfType<User, K, "uuid"> extends true ? FieldIsArray<User, K> extends true ? never : K : never }[UserFieldKeys<User>];
573
578
  type UserAttributeMap<User extends TailorDBInstance> = { [K in UserAttributeKey<User>]?: true };
574
- type DisallowExtraKeys<T, Allowed extends PropertyKey> = T & { [K in Exclude<keyof T, Allowed>]: never };
579
+ type DisallowExtraKeys<T$1, Allowed extends PropertyKey> = T$1 & { [K in Exclude<keyof T$1, Allowed>]: never };
575
580
  type AttributeListValue<User extends TailorDBInstance, Key extends UserAttributeListKey<User>> = Key extends keyof output<User> ? output<User>[Key] : never;
576
- type AttributeListToTuple<User extends TailorDBInstance, AttributeList extends readonly UserAttributeListKey<User>[]> = { [Index in keyof AttributeList]: AttributeList[Index] extends UserAttributeListKey<User> ? AttributeListValue<User, AttributeList[Index]> : never };
577
- type AttributeMapSelectedKeys<User extends TailorDBInstance, AttributeMap extends UserAttributeMap<User>> = Extract<{ [K in keyof AttributeMap]-?: undefined extends AttributeMap[K] ? never : K }[keyof AttributeMap], UserAttributeKey<User>>;
578
- type UserProfile<User extends TailorDBInstance, AttributeMap extends UserAttributeMap<User>, AttributeList extends UserAttributeListKey<User>[]> = {
581
+ type AttributeListToTuple<User extends TailorDBInstance, AttributeList$1 extends readonly UserAttributeListKey<User>[]> = { [Index in keyof AttributeList$1]: AttributeList$1[Index] extends UserAttributeListKey<User> ? AttributeListValue<User, AttributeList$1[Index]> : never };
582
+ type AttributeMapSelectedKeys<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User>> = Extract<{ [K in keyof AttributeMap$1]-?: undefined extends AttributeMap$1[K] ? never : K }[keyof AttributeMap$1], UserAttributeKey<User>>;
583
+ type UserProfile<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[]> = {
579
584
  type: User;
580
585
  usernameField: UsernameFieldKey<User>;
581
- attributes?: DisallowExtraKeys<AttributeMap, UserAttributeKey<User>>;
582
- attributeList?: AttributeList;
586
+ attributes?: DisallowExtraKeys<AttributeMap$1, UserAttributeKey<User>>;
587
+ attributeList?: AttributeList$1;
583
588
  };
584
- type MachineUser<User extends TailorDBInstance, AttributeMap extends UserAttributeMap<User> = UserAttributeMap<User>, AttributeList extends UserAttributeListKey<User>[] = []> = IsAny<User> extends true ? {
589
+ type MachineUser<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User> = UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[] = []> = IsAny<User> extends true ? {
585
590
  attributes: Record<string, AuthAttributeValue>;
586
591
  attributeList?: string[];
587
- } : (AttributeMapSelectedKeys<User, AttributeMap> extends never ? {
592
+ } : (AttributeMapSelectedKeys<User, AttributeMap$1> extends never ? {
588
593
  attributes?: never;
589
594
  } : {
590
- attributes: { [K in AttributeMapSelectedKeys<User, AttributeMap>]: K extends keyof output<User> ? output<User>[K] : never } & { [K in Exclude<keyof output<User>, AttributeMapSelectedKeys<User, AttributeMap>>]?: never };
591
- }) & ([] extends AttributeList ? {
595
+ attributes: { [K in AttributeMapSelectedKeys<User, AttributeMap$1>]: K extends keyof output<User> ? output<User>[K] : never } & { [K in Exclude<keyof output<User>, AttributeMapSelectedKeys<User, AttributeMap$1>>]?: never };
596
+ }) & ([] extends AttributeList$1 ? {
592
597
  attributeList?: never;
593
598
  } : {
594
- attributeList: AttributeListToTuple<User, AttributeList>;
599
+ attributeList: AttributeListToTuple<User, AttributeList$1>;
595
600
  });
596
- type AuthServiceInput<User extends TailorDBInstance, AttributeMap extends UserAttributeMap<User>, AttributeList extends UserAttributeListKey<User>[], MachineUserNames extends string> = {
597
- userProfile?: UserProfile<User, AttributeMap, AttributeList>;
598
- machineUsers?: Record<MachineUserNames, MachineUser<User, AttributeMap, AttributeList>>;
601
+ type AuthServiceInput<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[], MachineUserNames extends string> = {
602
+ userProfile?: UserProfile<User, AttributeMap$1, AttributeList$1>;
603
+ machineUsers?: Record<MachineUserNames, MachineUser<User, AttributeMap$1, AttributeList$1>>;
599
604
  oauth2Clients?: Record<string, OAuth2ClientInput>;
600
605
  idProvider?: IdProviderConfig;
601
606
  scim?: SCIMConfig;
@@ -615,7 +620,7 @@ type AuthDefinitionBrand = {
615
620
  type AuthInvoker$1<M extends string> = Omit<AuthInvoker, "machineUserName"> & {
616
621
  machineUserName: M;
617
622
  };
618
- declare function defineAuth<const Name extends string, const User extends TailorDBInstance, const AttributeMap extends UserAttributeMap<User>, const AttributeList extends UserAttributeListKey<User>[], const MachineUserNames extends string>(name: Name, config: AuthServiceInput<User, AttributeMap, AttributeList, MachineUserNames>): {
623
+ declare function defineAuth<const Name extends string, const User extends TailorDBInstance, const AttributeMap$1 extends UserAttributeMap<User>, const AttributeList$1 extends UserAttributeListKey<User>[], const MachineUserNames extends string>(name: Name, config: AuthServiceInput<User, AttributeMap$1, AttributeList$1, MachineUserNames>): {
619
624
  readonly name: Name;
620
625
  readonly invoker: <M extends MachineUserNames>(machineUser: M) => {
621
626
  readonly namespace: Name;
@@ -624,20 +629,20 @@ declare function defineAuth<const Name extends string, const User extends Tailor
624
629
  readonly userProfile?: {
625
630
  type: User;
626
631
  usernameField: UsernameFieldKey<User>;
627
- attributes?: (AttributeMap & { [K in Exclude<keyof AttributeMap, UserAttributeKey<User>>]: never }) | undefined;
628
- attributeList?: AttributeList | undefined;
632
+ attributes?: (AttributeMap$1 & { [K in Exclude<keyof AttributeMap$1, UserAttributeKey<User>>]: never }) | undefined;
633
+ attributeList?: AttributeList$1 | undefined;
629
634
  } | undefined;
630
635
  readonly machineUsers?: Record<MachineUserNames, type_fest0.IsAny<User> extends true ? {
631
636
  attributes: Record<string, AuthAttributeValue>;
632
637
  attributeList?: string[];
633
- } : (Extract<{ [K_1 in keyof AttributeMap]-?: undefined extends AttributeMap[K_1] ? never : K_1 }[keyof AttributeMap], UserAttributeKey<User>> extends never ? {
638
+ } : (Extract<{ [K_1 in keyof AttributeMap$1]-?: undefined extends AttributeMap$1[K_1] ? never : K_1 }[keyof AttributeMap$1], UserAttributeKey<User>> extends never ? {
634
639
  attributes?: never;
635
640
  } : {
636
- attributes: { [K_2 in Extract<{ [K_1 in keyof AttributeMap]-?: undefined extends AttributeMap[K_1] ? never : K_1 }[keyof AttributeMap], UserAttributeKey<User>>]: K_2 extends keyof output<User> ? output<User>[K_2] : never } & { [K_3 in Exclude<keyof output<User>, Extract<{ [K_1 in keyof AttributeMap]-?: undefined extends AttributeMap[K_1] ? never : K_1 }[keyof AttributeMap], UserAttributeKey<User>>>]?: undefined };
637
- }) & ([] extends AttributeList ? {
641
+ attributes: { [K_2 in Extract<{ [K_1 in keyof AttributeMap$1]-?: undefined extends AttributeMap$1[K_1] ? never : K_1 }[keyof AttributeMap$1], UserAttributeKey<User>>]: K_2 extends keyof output<User> ? output<User>[K_2] : never } & { [K_3 in Exclude<keyof output<User>, Extract<{ [K_1 in keyof AttributeMap$1]-?: undefined extends AttributeMap$1[K_1] ? never : K_1 }[keyof AttributeMap$1], UserAttributeKey<User>>>]?: undefined };
642
+ }) & ([] extends AttributeList$1 ? {
638
643
  attributeList?: never;
639
644
  } : {
640
- attributeList: { [Index in keyof AttributeList]: AttributeList[Index] extends UserAttributeListKey<User> ? AttributeList[Index] extends infer T ? T extends AttributeList[Index] ? T extends keyof output<User> ? output<User>[T] : never : never : never : never };
645
+ attributeList: { [Index in keyof AttributeList$1]: AttributeList$1[Index] extends UserAttributeListKey<User> ? AttributeList$1[Index] extends infer T ? T extends AttributeList$1[Index] ? T extends keyof output<User> ? output<User>[T] : never : never : never : never };
641
646
  })> | undefined;
642
647
  readonly oauth2Clients?: Record<string, OAuth2ClientInput>;
643
648
  readonly idProvider?: IdProviderConfig;
@@ -753,10 +758,10 @@ interface TailorDBTypeConfig {
753
758
  }
754
759
  //#endregion
755
760
  //#region src/configure/services/tailordb/types.d.ts
756
- type SerialConfig<T extends "string" | "integer" = "string" | "integer"> = Prettify<{
761
+ type SerialConfig<T$1 extends "string" | "integer" = "string" | "integer"> = Prettify<{
757
762
  start: number;
758
763
  maxValue?: number;
759
- } & (T extends "string" ? {
764
+ } & (T$1 extends "string" ? {
760
765
  format?: string;
761
766
  } : object)>;
762
767
  interface DBFieldMetadata extends FieldMetadata {
@@ -784,10 +789,10 @@ interface DefinedDBFieldMetadata extends DefinedFieldMetadata {
784
789
  serial?: boolean;
785
790
  relation?: boolean;
786
791
  }
787
- type ExcludeNestedDBFields<T extends Record<string, TailorDBField<any, any>>> = { [K in keyof T]: T[K] extends TailorDBField<{
792
+ type ExcludeNestedDBFields<T$1 extends Record<string, TailorDBField<any, any>>> = { [K in keyof T$1]: T$1[K] extends TailorDBField<{
788
793
  type: "nested";
789
794
  array: boolean;
790
- }, any> ? never : T[K] };
795
+ }, any> ? never : T$1[K] };
791
796
  type HookFn<TValue, TData, TReturn> = (args: {
792
797
  value: TValue;
793
798
  data: TData extends Record<string, unknown> ? { readonly [K in keyof TData]?: TData[K] | null | undefined } : unknown;
@@ -812,10 +817,10 @@ type TailorDBExternalConfig = {
812
817
  type TailorDBServiceInput = {
813
818
  [namespace: string]: TailorDBServiceConfig | TailorDBExternalConfig;
814
819
  };
815
- type IndexDef<T extends {
820
+ type IndexDef<T$1 extends {
816
821
  fields: Record<PropertyKey, unknown>;
817
822
  }> = {
818
- fields: [keyof T["fields"], keyof T["fields"], ...(keyof T["fields"])[]];
823
+ fields: [keyof T$1["fields"], keyof T$1["fields"], ...(keyof T$1["fields"])[]];
819
824
  unique?: boolean;
820
825
  name?: string;
821
826
  };
@@ -827,12 +832,12 @@ interface TypeFeatures {
827
832
  //#endregion
828
833
  //#region src/configure/services/tailordb/schema.d.ts
829
834
  type RelationType = "oneToOne" | "1-1" | "manyToOne" | "n-1" | "N-1" | "keyOnly";
830
- interface RelationConfig<S extends RelationType, T extends TailorDBType> {
835
+ interface RelationConfig<S extends RelationType, T$1 extends TailorDBType> {
831
836
  type: S;
832
837
  toward: {
833
- type: T;
838
+ type: T$1;
834
839
  as?: string;
835
- key?: keyof T["fields"] & string;
840
+ key?: keyof T$1["fields"] & string;
836
841
  };
837
842
  backward?: string;
838
843
  }
@@ -845,9 +850,9 @@ type RelationSelfConfig = {
845
850
  };
846
851
  backward?: string;
847
852
  };
848
- interface ReferenceConfig<T extends TailorDBType<any, any>> {
853
+ interface ReferenceConfig<T$1 extends TailorDBType<any, any>> {
849
854
  type: TailorDBType<any, any>;
850
- key: keyof T["fields"] & string;
855
+ key: keyof T$1["fields"] & string;
851
856
  nameMap: [string | undefined, string];
852
857
  }
853
858
  declare class TailorDBField<const Defined extends DefinedDBFieldMetadata, const Output> extends TailorField<Defined, Output, DBFieldMetadata> {
@@ -873,8 +878,8 @@ declare class TailorDBField<const Defined extends DefinedDBFieldMetadata, const
873
878
  };
874
879
  get config(): OperatorFieldConfig;
875
880
  private constructor();
876
- static create<const T extends TailorFieldType, const TOptions extends FieldOptions, const OutputBase = TailorToTs[T]>(type: T, options?: TOptions, fields?: Record<string, TailorDBField<any, any>>, values?: AllowedValues): TailorDBField<{
877
- type: T;
881
+ static create<const T$1 extends TailorFieldType, const TOptions extends FieldOptions, const OutputBase = TailorToTs[T$1]>(type: T$1, options?: TOptions, fields?: Record<string, TailorDBField<any, any>>, values?: AllowedValues): TailorDBField<{
882
+ type: T$1;
878
883
  array: TOptions extends {
879
884
  array: true;
880
885
  } ? true : false;
@@ -884,9 +889,9 @@ declare class TailorDBField<const Defined extends DefinedDBFieldMetadata, const
884
889
  } ? never : TailorField<CurrentDefined, Output>, description: string): TailorDBField<Prettify<CurrentDefined & {
885
890
  description: true;
886
891
  }>, Output>;
887
- relation<S extends RelationType, T extends TailorDBType<any, any>, CurrentDefined extends Defined>(this: CurrentDefined extends {
892
+ relation<S extends RelationType, T$1 extends TailorDBType<any, any>, CurrentDefined extends Defined>(this: CurrentDefined extends {
888
893
  relation: unknown;
889
- } ? never : TailorDBField<CurrentDefined, Output>, config: RelationConfig<S, T>): TailorDBField<S extends "oneToOne" | "1-1" ? Prettify<CurrentDefined & {
894
+ } ? never : TailorDBField<CurrentDefined, Output>, config: RelationConfig<S, T$1>): TailorDBField<S extends "oneToOne" | "1-1" ? Prettify<CurrentDefined & {
890
895
  unique: true;
891
896
  index: true;
892
897
  relation: true;
@@ -1045,8 +1050,8 @@ declare class TailorDBType<const Fields extends Record<string, TailorDBField<any
1045
1050
  features(features: Omit<TypeFeatures, "pluralForm">): this;
1046
1051
  indexes(...indexes: IndexDef<this>[]): this;
1047
1052
  files<const F extends string>(files: Record<F, string> & Partial<Record<keyof output<this>, never>>): this;
1048
- permission<U extends object = User, P extends TailorTypePermission<U, output<this>> = TailorTypePermission<U, output<this>>>(permission: P): TailorDBType<Fields, U>;
1049
- gqlPermission<U extends object = User, P extends TailorTypeGqlPermission<U> = TailorTypeGqlPermission<U>>(permission: P): TailorDBType<Fields, U>;
1053
+ permission<U$1 extends object = User, P$1 extends TailorTypePermission<U$1, output<this>> = TailorTypePermission<U$1, output<this>>>(permission: P$1): TailorDBType<Fields, U$1>;
1054
+ gqlPermission<U$1 extends object = User, P$1 extends TailorTypeGqlPermission<U$1> = TailorTypeGqlPermission<U$1>>(permission: P$1): TailorDBType<Fields, U$1>;
1050
1055
  description(description: string): this;
1051
1056
  /**
1052
1057
  * Pick specific fields from the type
@@ -1054,7 +1059,7 @@ declare class TailorDBType<const Fields extends Record<string, TailorDBField<any
1054
1059
  * @param options - Optional field options to apply to picked fields
1055
1060
  * @returns An object containing only the specified fields
1056
1061
  */
1057
- pickFields<K extends keyof Fields, const Opt extends FieldOptions>(keys: K[], options: Opt): { [P in K]: Fields[P] extends TailorDBField<infer D, infer _O> ? TailorDBField<Omit<D, "array"> & {
1062
+ pickFields<K$1 extends keyof Fields, const Opt extends FieldOptions>(keys: K$1[], options: Opt): { [P in K$1]: Fields[P$1] extends TailorDBField<infer D, infer _O> ? TailorDBField<Omit<D, "array"> & {
1058
1063
  array: Opt extends {
1059
1064
  array: true;
1060
1065
  } ? true : D["array"];
@@ -1064,7 +1069,7 @@ declare class TailorDBType<const Fields extends Record<string, TailorDBField<any
1064
1069
  * @param keys - Array of field keys to omit
1065
1070
  * @returns An object containing all fields except the specified ones
1066
1071
  */
1067
- omitFields<K extends keyof Fields>(keys: K[]): Omit<Fields, K>;
1072
+ omitFields<K$1 extends keyof Fields>(keys: K$1[]): Omit<Fields, K$1>;
1068
1073
  }
1069
1074
  type TailorDBInstance<Fields extends Record<string, TailorDBField<any, any>> = any, User extends object = InferredAttributeMap> = InstanceType<typeof TailorDBType<Fields, User>>;
1070
1075
  declare const idField: TailorDBField<{
@@ -1354,9 +1359,9 @@ type GeneratorConfig = z.input<typeof BaseGeneratorConfigSchema>;
1354
1359
  type CodeGeneratorBase = z.output<typeof CodeGeneratorSchema>;
1355
1360
  //#endregion
1356
1361
  //#region src/configure/config.d.ts
1357
- interface AppConfig<Auth extends AuthConfig = AuthConfig, Idp extends IdPConfig[] = IdPConfig[], StaticWebsites extends StaticWebsiteConfig[] = StaticWebsiteConfig[], Env extends Record<string, string | number | boolean> = Record<string, string | number | boolean>> {
1362
+ interface AppConfig<Auth extends AuthConfig = AuthConfig, Idp extends IdPConfig[] = IdPConfig[], StaticWebsites extends StaticWebsiteConfig[] = StaticWebsiteConfig[], Env$1 extends Record<string, string | number | boolean> = Record<string, string | number | boolean>> {
1358
1363
  name: string;
1359
- env?: Env;
1364
+ env?: Env$1;
1360
1365
  cors?: string[];
1361
1366
  allowedIPAddresses?: string[];
1362
1367
  disableIntrospection?: boolean;
@@ -1524,5 +1529,5 @@ type WorkflowOperation = z.infer<typeof WorkflowOperationSchema>;
1524
1529
  type Executor = z.infer<typeof ExecutorSchema>;
1525
1530
  type ExecutorInput = z.input<typeof ExecutorSchema>;
1526
1531
  //#endregion
1527
- export { AllowedValues, AllowedValuesOutput, AppConfig, ArrayFieldOutput, AttributeList$1 as AttributeList, AttributeMap$1 as AttributeMap, AuthConfig, AuthExternalConfig, AuthInvoker$1 as AuthInvoker, AuthOwnConfig, type AuthServiceInput, type BuiltinIdP, CodeGeneratorBase, Executor, ExecutorInput, ExecutorServiceConfig, ExecutorServiceInput, FieldMetadata, FieldOptions, FieldOutput, FunctionOperation, Generator, GqlOperation, type IDToken, IdPConfig, IdPExternalConfig, type IdProviderConfig, IncomingWebhookTrigger, InferFieldsOutput, JsonCompatible, type OAuth2ClientGrantType, OAuth2ClientInput, type OIDC, PermissionCondition, QueryType, RecordTrigger, Resolver, ResolverExecutedTrigger, ResolverExternalConfig, ResolverInput, ResolverServiceConfig, ResolverServiceInput, type SAML, type SCIMAttribute, type SCIMAttributeMapping, type SCIMAttributeType, type SCIMAuthorization, type SCIMConfig, type SCIMResource, ScheduleTriggerInput, StaticWebsiteConfig, TailorDBField, TailorDBInstance, TailorDBType, TailorDBTypeConfig, TailorField, TailorTypeGqlPermission, TailorTypePermission, TailorUser, type TenantProviderConfig, type UserAttributeKey, type UserAttributeListKey, type UserAttributeMap, type UsernameFieldKey, type ValueOperand, WebhookOperation, WorkflowOperation, WorkflowServiceConfig, WorkflowServiceInput, db, defineAuth, defineConfig, defineGenerators, defineIdp, defineStaticWebSite, output, unauthenticatedTailorUser, unsafeAllowAllGqlPermission, unsafeAllowAllTypePermission };
1528
- //# sourceMappingURL=types-BLZiwB6E.d.mts.map
1532
+ export { SCIMAttributeType as $, TailorDBType as A, AuthInvoker$1 as B, ResolverExternalConfig as C, Resolver as Ct, ExecutorServiceInput as D, output as Dt, ExecutorServiceConfig as E, JsonCompatible as Et, TailorTypePermission as F, IDToken as G, defineAuth as H, unsafeAllowAllGqlPermission as I, OAuth2ClientInput as J, IdProviderConfig as K, unsafeAllowAllTypePermission as L, TailorDBTypeConfig as M, PermissionCondition as N, TailorDBField as O, TailorTypeGqlPermission as P, SCIMAttributeMapping as Q, AuthConfig as R, defineIdp as S, QueryType as St, ResolverServiceInput as T, InferFieldsOutput as Tt, AuthServiceInput as U, AuthOwnConfig as V, BuiltinIdP as W, SAML as X, OIDC as Y, SCIMAttribute as Z, WorkflowServiceInput as _, AttributeList as _t, IncomingWebhookTrigger as a, UserAttributeListKey as at, IdPConfig as b, unauthenticatedTailorUser as bt, ScheduleTriggerInput as c, ValueOperand as ct, AppConfig as d, ArrayFieldOutput as dt, SCIMAuthorization as et, defineConfig as f, FieldMetadata as ft, WorkflowServiceConfig as g, TailorEnv as gt, Generator as h, Env as ht, GqlOperation as i, UserAttributeKey as it, db as j, TailorDBInstance as k, WebhookOperation as l, AllowedValues as lt, CodeGeneratorBase as m, FieldOutput as mt, ExecutorInput as n, SCIMResource as nt, RecordTrigger as o, UserAttributeMap as ot, defineGenerators as p, FieldOptions as pt, OAuth2ClientGrantType as q, FunctionOperation as r, TenantProviderConfig as rt, ResolverExecutedTrigger as s, UsernameFieldKey as st, Executor as t, SCIMConfig as tt, WorkflowOperation as u, AllowedValuesOutput as ut, StaticWebsiteConfig as v, AttributeMap as vt, ResolverServiceConfig as w, ResolverInput as wt, IdPExternalConfig as x, TailorField as xt, defineStaticWebSite as y, TailorUser as yt, AuthExternalConfig as z };
1533
+ //# sourceMappingURL=types-EKga-JDM.d.mts.map
@@ -1,7 +1,7 @@
1
1
  /// <reference path="./../../user-defined.d.ts" />
2
2
 
3
- import { TailorDBType, TailorField } from "../../types-BLZiwB6E.mjs";
4
- import { output } from "../../index-Zqsfkae6.mjs";
3
+ import { A as TailorDBType, xt as TailorField } from "../../types-EKga-JDM.mjs";
4
+ import { n as output } from "../../index-DwAZDk6O.mjs";
5
5
  import { StandardSchemaV1 } from "@standard-schema/spec";
6
6
 
7
7
  //#region src/utils/test/index.d.ts
@@ -23,12 +23,15 @@ tailor-sdk secret vault <subcommand> [options]
23
23
  Create a new Secret Manager vault.
24
24
 
25
25
  ```bash
26
- tailor-sdk secret vault create [options]
26
+ tailor-sdk secret vault create <name> [options]
27
27
  ```
28
28
 
29
+ **Arguments:**
30
+
31
+ - `name` - Vault name (required)
32
+
29
33
  **Options:**
30
34
 
31
- - `--name` - Vault name (required)
32
35
  - `-w, --workspace-id` - ID of the workspace
33
36
  - `-p, --profile` - Workspace profile to use
34
37
 
@@ -37,12 +40,15 @@ tailor-sdk secret vault create [options]
37
40
  Delete a Secret Manager vault.
38
41
 
39
42
  ```bash
40
- tailor-sdk secret vault delete [options]
43
+ tailor-sdk secret vault delete <name> [options]
41
44
  ```
42
45
 
46
+ **Arguments:**
47
+
48
+ - `name` - Vault name (required)
49
+
43
50
  **Options:**
44
51
 
45
- - `--name` - Vault name (required)
46
52
  - `-w, --workspace-id` - ID of the workspace
47
53
  - `-p, --profile` - Workspace profile to use
48
54
  - `-y, --yes` - Skip confirmation prompt
@@ -71,9 +77,9 @@ tailor-sdk secret create [options]
71
77
 
72
78
  **Options:**
73
79
 
74
- - `--vault-name` - Vault name (required)
75
- - `--name` - Secret name (required)
76
- - `--value` - Secret value (required)
80
+ - `-V, --vault-name` - Vault name (required)
81
+ - `-N, --name` - Secret name (required)
82
+ - `-v, --value` - Secret value (required)
77
83
  - `-w, --workspace-id` - ID of the workspace
78
84
  - `-p, --profile` - Workspace profile to use
79
85
 
@@ -87,9 +93,9 @@ tailor-sdk secret update [options]
87
93
 
88
94
  **Options:**
89
95
 
90
- - `--vault-name` - Vault name (required)
91
- - `--name` - Secret name (required)
92
- - `--value` - New secret value (required)
96
+ - `-V, --vault-name` - Vault name (required)
97
+ - `-N, --name` - Secret name (required)
98
+ - `-v, --value` - New secret value (required)
93
99
  - `-w, --workspace-id` - ID of the workspace
94
100
  - `-p, --profile` - Workspace profile to use
95
101
 
@@ -103,7 +109,7 @@ tailor-sdk secret list [options]
103
109
 
104
110
  **Options:**
105
111
 
106
- - `--vault-name` - Vault name (required)
112
+ - `-V, --vault-name` - Vault name (required)
107
113
  - `-w, --workspace-id` - ID of the workspace
108
114
  - `-p, --profile` - Workspace profile to use
109
115
  - `-j, --json` - Output as JSON
@@ -118,8 +124,8 @@ tailor-sdk secret delete [options]
118
124
 
119
125
  **Options:**
120
126
 
121
- - `--vault-name` - Vault name (required)
122
- - `--name` - Secret name (required)
127
+ - `-V, --vault-name` - Vault name (required)
128
+ - `-N, --name` - Secret name (required)
123
129
  - `-w, --workspace-id` - ID of the workspace
124
130
  - `-p, --profile` - Workspace profile to use
125
131
  - `-y, --yes` - Skip confirmation prompt
@@ -29,12 +29,12 @@ tailor-sdk workflow list [options]
29
29
  Get workflow details.
30
30
 
31
31
  ```bash
32
- tailor-sdk workflow get <nameOrId> [options]
32
+ tailor-sdk workflow get <name> [options]
33
33
  ```
34
34
 
35
35
  **Arguments:**
36
36
 
37
- - `nameOrId` - Workflow name or ID (required)
37
+ - `name` - Workflow name (required)
38
38
 
39
39
  **Options:**
40
40
 
@@ -47,12 +47,12 @@ tailor-sdk workflow get <nameOrId> [options]
47
47
  Start a workflow execution.
48
48
 
49
49
  ```bash
50
- tailor-sdk workflow start <nameOrId> [options]
50
+ tailor-sdk workflow start <name> [options]
51
51
  ```
52
52
 
53
53
  **Arguments:**
54
54
 
55
- - `nameOrId` - Workflow name or ID (required)
55
+ - `name` - Workflow name (required)
56
56
 
57
57
  **Options:**
58
58
 
@@ -62,7 +62,8 @@ tailor-sdk workflow start <nameOrId> [options]
62
62
  - `-p, --profile` - Workspace profile to use
63
63
  - `-c, --config` - Path to the SDK config file (default: `tailor.config.ts`)
64
64
  - `-W, --wait` - Wait for execution to complete
65
- - `--interval` - Polling interval when using --wait (default: `3s`)
65
+ - `-i, --interval` - Polling interval when using --wait (default: `3s`)
66
+ - `-l, --logs` - Display job execution logs after completion (requires --wait)
66
67
  - `-j, --json` - Output as JSON
67
68
 
68
69
  **Usage Examples:**
@@ -97,8 +98,8 @@ tailor-sdk workflow executions [executionId] [options]
97
98
  - `-n, --workflow-name` - Filter by workflow name (list mode only)
98
99
  - `-s, --status` - Filter by status: `PENDING`, `PENDING_RESUME`, `RUNNING`, `SUCCESS`, `FAILED` (list mode only)
99
100
  - `-W, --wait` - Wait for execution to complete (detail mode only)
100
- - `--interval` - Polling interval when using --wait (default: `3s`)
101
- - `--logs` - Display job execution logs (detail mode only)
101
+ - `-i, --interval` - Polling interval when using --wait (default: `3s`)
102
+ - `-l, --logs` - Display job execution logs (detail mode only)
102
103
  - `-j, --json` - Output as JSON
103
104
 
104
105
  **Usage Examples:**
@@ -140,5 +141,6 @@ tailor-sdk workflow resume <executionId> [options]
140
141
  - `-w, --workspace-id` - ID of the workspace
141
142
  - `-p, --profile` - Workspace profile to use
142
143
  - `-W, --wait` - Wait for execution to complete after resuming
143
- - `--interval` - Polling interval when using --wait (default: `3s`)
144
+ - `-i, --interval` - Polling interval when using --wait (default: `3s`)
145
+ - `-l, --logs` - Display job execution logs after completion (requires --wait)
144
146
  - `-j, --json` - Output as JSON
@@ -15,7 +15,7 @@ The following options are available for most commands:
15
15
  | Option | Short | Description |
16
16
  | ---------------- | ----- | --------------------------------------------------- |
17
17
  | `--env-file` | `-e` | Specify a custom environment file path |
18
- | `--verbose` | `-v` | Enable verbose logging (show stack traces on error) |
18
+ | `--verbose` | | Enable verbose logging (show stack traces on error) |
19
19
  | `--json` | `-j` | Output as JSON (where applicable) |
20
20
  | `--workspace-id` | `-w` | Workspace ID (for deployment commands) |
21
21
  | `--profile` | `-p` | Workspace profile |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailor-platform/sdk",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/configure/index.mjs",
@@ -58,17 +58,17 @@
58
58
  "multiline-ts": "4.0.1",
59
59
  "open": "10.2.0",
60
60
  "ora": "9.0.0",
61
- "oxc-parser": "0.98.0",
61
+ "oxc-parser": "0.102.0",
62
62
  "pkg-types": "2.3.0",
63
63
  "p-limit": "4.0.0",
64
- "rolldown": "1.0.0-beta.41",
64
+ "rolldown": "1.0.0-beta.54",
65
65
  "table": "6.9.0",
66
66
  "ts-cron-validator": "1.1.5",
67
67
  "tsx": "4.21.0",
68
68
  "type-fest": "5.3.1",
69
69
  "uuid": "13.0.0",
70
70
  "xdg-basedir": "5.1.0",
71
- "zod": "4.2.0"
71
+ "zod": "4.2.1"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@eslint/js": "9.39.2",
@@ -81,7 +81,7 @@
81
81
  "eslint-plugin-jsdoc": "61.5.0",
82
82
  "globals": "16.5.0",
83
83
  "sonda": "0.10.1",
84
- "tsdown": "0.15.6",
84
+ "tsdown": "0.18.0",
85
85
  "typescript": "5.9.3",
86
86
  "typescript-eslint": "8.50.0",
87
87
  "vitest": "4.0.15"