@tailor-platform/sdk 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/{application-Ba2B5A-w.mjs → application-HIu5peO4.mjs} +44 -14
- package/dist/application-HIu5peO4.mjs.map +1 -0
- package/dist/application-ViV4dYwI.mjs +4 -0
- package/dist/cli/index.mjs +46 -47
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +8 -7
- package/dist/cli/lib.mjs +2 -3
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/configure/index.d.mts +3 -3
- package/dist/configure/index.mjs +778 -2
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{index-BSrVjiPg.d.mts → index-BwJ7-efr.d.mts} +73 -29
- package/dist/{index-DraFftyF.d.mts → index-Dkm2qwmF.d.mts} +142 -180
- package/dist/{jiti-SMSW3TA0.mjs → jiti-ygK9KoRA.mjs} +1 -1
- package/dist/{jiti-SMSW3TA0.mjs.map → jiti-ygK9KoRA.mjs.map} +1 -1
- package/dist/{job-8XfvLyxH.mjs → job-l-pIR9IY.mjs} +1 -1
- package/dist/{job-8XfvLyxH.mjs.map → job-l-pIR9IY.mjs.map} +1 -1
- package/dist/{list-DArHhlnw.mjs → list-D1K7WwpV.mjs} +96 -48
- package/dist/list-D1K7WwpV.mjs.map +1 -0
- package/dist/{src-qLXX6nub.mjs → src-CG8kJBI9.mjs} +1 -1
- package/dist/{src-qLXX6nub.mjs.map → src-CG8kJBI9.mjs.map} +1 -1
- package/dist/utils/test/index.d.mts +2 -2
- package/dist/utils/test/index.mjs +1 -1
- package/docs/cli/application.md +114 -35
- package/docs/cli/auth.md +101 -44
- package/docs/cli/executor.md +65 -33
- package/docs/cli/secret.md +133 -51
- package/docs/cli/staticwebsite.md +78 -41
- package/docs/cli/tailordb.md +227 -155
- package/docs/cli/user.md +164 -66
- package/docs/cli/workflow.md +132 -73
- package/docs/cli/workspace.md +126 -45
- package/docs/generator/custom.md +2 -2
- package/docs/services/auth.md +88 -1
- package/package.json +3 -1
- package/dist/application-Ba2B5A-w.mjs.map +0 -1
- package/dist/application-C_MQabII.mjs +0 -5
- package/dist/auth-Co6vu1MY.mjs +0 -779
- package/dist/auth-Co6vu1MY.mjs.map +0 -1
- package/dist/list-DArHhlnw.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference path="./user-defined.d.ts" />
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
4
3
|
import { IsAny, NonEmptyObject } from "type-fest";
|
|
4
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
5
5
|
|
|
6
6
|
//#region src/parser/service/tailordb/relation.d.ts
|
|
7
7
|
declare const relationTypes: {
|
|
@@ -56,6 +56,34 @@ type TailorUser = {
|
|
|
56
56
|
/** Represents an unauthenticated user in the Tailor platform. */
|
|
57
57
|
declare const unauthenticatedTailorUser: TailorUser;
|
|
58
58
|
//#endregion
|
|
59
|
+
//#region src/configure/types/actor.d.ts
|
|
60
|
+
/** User type enum values from the Tailor Platform server. */
|
|
61
|
+
type TailorActorType = "USER_TYPE_USER" | "USER_TYPE_MACHINE_USER" | "USER_TYPE_UNSPECIFIED";
|
|
62
|
+
/** Represents an actor in event triggers. */
|
|
63
|
+
type TailorActor = {
|
|
64
|
+
/** The ID of the workspace the user belongs to. */
|
|
65
|
+
workspaceId: string;
|
|
66
|
+
/** The ID of the user. */
|
|
67
|
+
userId: string;
|
|
68
|
+
/**
|
|
69
|
+
* A map of the user's attributes.
|
|
70
|
+
* Maps from server's `attributeMap` field.
|
|
71
|
+
*/
|
|
72
|
+
attributes: InferredAttributeMap | null;
|
|
73
|
+
/**
|
|
74
|
+
* A list of the user's attributes.
|
|
75
|
+
* Maps from server's `attributes` field.
|
|
76
|
+
*/
|
|
77
|
+
attributeList: InferredAttributeList;
|
|
78
|
+
/** The type of the user. */
|
|
79
|
+
userType: TailorActorType;
|
|
80
|
+
};
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/configure/types/env.d.ts
|
|
83
|
+
interface Env {}
|
|
84
|
+
/** Represents environment variables in the Tailor platform. */
|
|
85
|
+
type TailorEnv = keyof Env extends never ? Record<string, string> : Env;
|
|
86
|
+
//#endregion
|
|
59
87
|
//#region src/configure/types/helpers.d.ts
|
|
60
88
|
type Prettify<T> = { [K in keyof T as string extends K ? never : K]: T[K] } & {};
|
|
61
89
|
type DeepWritable<T> = T extends Date | RegExp | Function ? T : T extends object ? { -readonly [P in keyof T]: DeepWritable<T[P]> } & {} : T;
|
|
@@ -178,6 +206,16 @@ type TailorFieldInput = z.input<typeof TailorFieldSchema>;
|
|
|
178
206
|
type QueryType = z.output<typeof QueryTypeSchema>;
|
|
179
207
|
type ResolverInput = z.input<typeof ResolverSchema>;
|
|
180
208
|
type Resolver = z.output<typeof ResolverSchema>;
|
|
209
|
+
type ResolverServiceConfig = {
|
|
210
|
+
files: string[];
|
|
211
|
+
ignores?: string[];
|
|
212
|
+
};
|
|
213
|
+
type ResolverExternalConfig = {
|
|
214
|
+
external: true;
|
|
215
|
+
};
|
|
216
|
+
type ResolverServiceInput = {
|
|
217
|
+
[namespace: string]: ResolverServiceConfig | ResolverExternalConfig;
|
|
218
|
+
};
|
|
181
219
|
//#endregion
|
|
182
220
|
//#region src/configure/types/type.d.ts
|
|
183
221
|
type TailorAnyField = TailorField<any>;
|
|
@@ -479,28 +517,6 @@ type Hooks<F extends Record<string, TailorAnyDBField>, TData = { [K in keyof F]:
|
|
|
479
517
|
} ? never : F[K]["_defined"] extends {
|
|
480
518
|
type: "nested";
|
|
481
519
|
} ? never : K]?: Hook<TData, output<F[K]>> }>;
|
|
482
|
-
/**
|
|
483
|
-
* Migration configuration for TailorDB
|
|
484
|
-
*/
|
|
485
|
-
type TailorDBMigrationConfig = {
|
|
486
|
-
/** Directory path for migration files */
|
|
487
|
-
directory: string;
|
|
488
|
-
/** Machine user name for executing migration scripts (must be defined in auth.machineUsers) */
|
|
489
|
-
machineUser?: string;
|
|
490
|
-
};
|
|
491
|
-
type TailorDBServiceConfig = {
|
|
492
|
-
files: string[];
|
|
493
|
-
ignores?: string[];
|
|
494
|
-
erdSite?: string;
|
|
495
|
-
/** Migration configuration */
|
|
496
|
-
migration?: TailorDBMigrationConfig;
|
|
497
|
-
};
|
|
498
|
-
type TailorDBExternalConfig = {
|
|
499
|
-
external: true;
|
|
500
|
-
};
|
|
501
|
-
type TailorDBServiceInput = {
|
|
502
|
-
[namespace: string]: TailorDBServiceConfig | TailorDBExternalConfig;
|
|
503
|
-
};
|
|
504
520
|
type IndexDef<T extends {
|
|
505
521
|
fields: Record<PropertyKey, unknown>;
|
|
506
522
|
}> = {
|
|
@@ -515,7 +531,7 @@ interface TypeFeatures {
|
|
|
515
531
|
}
|
|
516
532
|
//#endregion
|
|
517
533
|
//#region src/configure/services/tailordb/schema.d.ts
|
|
518
|
-
interface RelationConfig<S extends RelationType, T extends TailorDBType> {
|
|
534
|
+
interface RelationConfig<S extends RelationType, T extends TailorDBType$1> {
|
|
519
535
|
type: S;
|
|
520
536
|
toward: {
|
|
521
537
|
type: T;
|
|
@@ -534,6 +550,7 @@ type RelationSelfConfig = {
|
|
|
534
550
|
backward?: string;
|
|
535
551
|
};
|
|
536
552
|
type TailorAnyDBField = TailorDBField<any, any>;
|
|
553
|
+
type TailorAnyDBType = TailorDBType$1<any, any>;
|
|
537
554
|
/**
|
|
538
555
|
* TailorDBField interface representing a database field with extended metadata.
|
|
539
556
|
* Extends TailorField with database-specific features like relations, indexes, and hooks.
|
|
@@ -721,11 +738,10 @@ declare function object<const F extends Record<string, TailorAnyDBField> & Exclu
|
|
|
721
738
|
array: true;
|
|
722
739
|
} ? true : false;
|
|
723
740
|
}, FieldOutput$1<InferFieldsOutput<F>, Opt>>;
|
|
724
|
-
type TailorAnyDBType = TailorDBType<any, any>;
|
|
725
741
|
/**
|
|
726
742
|
* TailorDBType interface representing a database type definition with fields, permissions, and settings.
|
|
727
743
|
*/
|
|
728
|
-
interface TailorDBType<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributeMap> {
|
|
744
|
+
interface TailorDBType$1<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributeMap> {
|
|
729
745
|
readonly name: string;
|
|
730
746
|
readonly fields: Fields;
|
|
731
747
|
readonly _output: InferFieldsOutput<Fields>;
|
|
@@ -735,35 +751,35 @@ interface TailorDBType<Fields extends Record<string, TailorAnyDBField> = any, Us
|
|
|
735
751
|
/**
|
|
736
752
|
* Add hooks for fields
|
|
737
753
|
*/
|
|
738
|
-
hooks(hooks: Hooks<Fields>): TailorDBType<Fields, User>;
|
|
754
|
+
hooks(hooks: Hooks<Fields>): TailorDBType$1<Fields, User>;
|
|
739
755
|
/**
|
|
740
756
|
* Add validators for fields
|
|
741
757
|
*/
|
|
742
|
-
validate(validators: Validators<Fields>): TailorDBType<Fields, User>;
|
|
758
|
+
validate(validators: Validators<Fields>): TailorDBType$1<Fields, User>;
|
|
743
759
|
/**
|
|
744
760
|
* Configure type features
|
|
745
761
|
*/
|
|
746
|
-
features(features: Omit<TypeFeatures, "pluralForm">): TailorDBType<Fields, User>;
|
|
762
|
+
features(features: Omit<TypeFeatures, "pluralForm">): TailorDBType$1<Fields, User>;
|
|
747
763
|
/**
|
|
748
764
|
* Define composite indexes
|
|
749
765
|
*/
|
|
750
|
-
indexes(...indexes: IndexDef<TailorDBType<Fields, User>>[]): TailorDBType<Fields, User>;
|
|
766
|
+
indexes(...indexes: IndexDef<TailorDBType$1<Fields, User>>[]): TailorDBType$1<Fields, User>;
|
|
751
767
|
/**
|
|
752
768
|
* Define file fields
|
|
753
769
|
*/
|
|
754
|
-
files<const F extends string>(files: Record<F, string> & Partial<Record<keyof output<TailorDBType<Fields, User>>, never>>): TailorDBType<Fields, User>;
|
|
770
|
+
files<const F extends string>(files: Record<F, string> & Partial<Record<keyof output<TailorDBType$1<Fields, User>>, never>>): TailorDBType$1<Fields, User>;
|
|
755
771
|
/**
|
|
756
772
|
* Set record-level permissions
|
|
757
773
|
*/
|
|
758
|
-
permission<U$1 extends object = User, P$1 extends TailorTypePermission<U$1, output<TailorDBType<Fields, User>>> = TailorTypePermission<U$1, output<TailorDBType<Fields, User>>>>(permission: P$1): TailorDBType<Fields, U$1>;
|
|
774
|
+
permission<U$1 extends object = User, P$1 extends TailorTypePermission<U$1, output<TailorDBType$1<Fields, User>>> = TailorTypePermission<U$1, output<TailorDBType$1<Fields, User>>>>(permission: P$1): TailorDBType$1<Fields, U$1>;
|
|
759
775
|
/**
|
|
760
776
|
* Set GraphQL-level permissions
|
|
761
777
|
*/
|
|
762
|
-
gqlPermission<U$1 extends object = User, P$1 extends TailorTypeGqlPermission<U$1> = TailorTypeGqlPermission<U$1>>(permission: P$1): TailorDBType<Fields, U$1>;
|
|
778
|
+
gqlPermission<U$1 extends object = User, P$1 extends TailorTypeGqlPermission<U$1> = TailorTypeGqlPermission<U$1>>(permission: P$1): TailorDBType$1<Fields, U$1>;
|
|
763
779
|
/**
|
|
764
780
|
* Set type description
|
|
765
781
|
*/
|
|
766
|
-
description(description: string): TailorDBType<Fields, User>;
|
|
782
|
+
description(description: string): TailorDBType$1<Fields, User>;
|
|
767
783
|
/**
|
|
768
784
|
* Pick specific fields from the type
|
|
769
785
|
*/
|
|
@@ -777,7 +793,7 @@ interface TailorDBType<Fields extends Record<string, TailorAnyDBField> = any, Us
|
|
|
777
793
|
*/
|
|
778
794
|
omitFields<K$1 extends keyof Fields>(keys: K$1[]): Omit<Fields, K$1>;
|
|
779
795
|
}
|
|
780
|
-
type TailorDBInstance<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributeMap> = TailorDBType<Fields, User>;
|
|
796
|
+
type TailorDBInstance<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributeMap> = TailorDBType$1<Fields, User>;
|
|
781
797
|
declare const idField: TailorDBField<{
|
|
782
798
|
type: "uuid";
|
|
783
799
|
array: false;
|
|
@@ -1015,7 +1031,10 @@ declare const TenantProviderSchema: z.ZodObject<{
|
|
|
1015
1031
|
}, z.core.$strip>;
|
|
1016
1032
|
//#endregion
|
|
1017
1033
|
//#region src/parser/service/auth/types.d.ts
|
|
1018
|
-
type AuthInvoker
|
|
1034
|
+
type AuthInvoker = z.output<typeof AuthInvokerSchema>;
|
|
1035
|
+
type AuthInvokerWithName<M extends string> = Omit<AuthInvoker, "machineUserName"> & {
|
|
1036
|
+
machineUserName: M;
|
|
1037
|
+
};
|
|
1019
1038
|
type OIDC = z.output<typeof OIDCSchema>;
|
|
1020
1039
|
type SAML = z.output<typeof SAMLSchema>;
|
|
1021
1040
|
type IDToken = z.output<typeof IDTokenSchema>;
|
|
@@ -1069,17 +1088,17 @@ type UserProfile<User extends TailorDBInstance, AttributeMap$1 extends UserAttri
|
|
|
1069
1088
|
attributes?: DisallowExtraKeys<AttributeMap$1, UserAttributeKey<User>>;
|
|
1070
1089
|
attributeList?: AttributeList$1;
|
|
1071
1090
|
};
|
|
1072
|
-
type MachineUserAttributeFields
|
|
1091
|
+
type MachineUserAttributeFields = Record<string, TailorField<DefinedFieldMetadata, unknown, FieldMetadata, TailorFieldType>>;
|
|
1073
1092
|
type TailorFieldOutputValue<Field> = Field extends TailorField<DefinedFieldMetadata, infer Output, FieldMetadata, TailorFieldType> ? Output : never;
|
|
1074
|
-
type MachineUserAttributeValues<Fields extends MachineUserAttributeFields
|
|
1075
|
-
type MachineUserFromAttributes<Fields extends MachineUserAttributeFields
|
|
1093
|
+
type MachineUserAttributeValues<Fields extends MachineUserAttributeFields> = { [K in keyof Fields]: TailorFieldOutputValue<Fields[K]> extends ValueOperand | null | undefined ? TailorFieldOutputValue<Fields[K]> : never };
|
|
1094
|
+
type MachineUserFromAttributes<Fields extends MachineUserAttributeFields> = (keyof Fields extends never ? {
|
|
1076
1095
|
attributes?: never;
|
|
1077
1096
|
} : {
|
|
1078
1097
|
attributes: DisallowExtraKeys<MachineUserAttributeValues<Fields>, keyof Fields>;
|
|
1079
1098
|
}) & {
|
|
1080
1099
|
attributeList?: string[];
|
|
1081
1100
|
};
|
|
1082
|
-
type MachineUser<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User> = UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[] = [], MachineUserAttributes extends MachineUserAttributeFields
|
|
1101
|
+
type MachineUser<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User> = UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[] = [], MachineUserAttributes extends MachineUserAttributeFields | undefined = undefined> = IsAny<MachineUserAttributes> extends true ? IsAny<User> extends true ? {
|
|
1083
1102
|
attributes: Record<string, AuthAttributeValue>;
|
|
1084
1103
|
attributeList?: string[];
|
|
1085
1104
|
} : (AttributeMapSelectedKeys<User, AttributeMap$1> extends never ? {
|
|
@@ -1090,7 +1109,7 @@ type MachineUser<User extends TailorDBInstance, AttributeMap$1 extends UserAttri
|
|
|
1090
1109
|
attributeList?: never;
|
|
1091
1110
|
} : {
|
|
1092
1111
|
attributeList: AttributeListToTuple<User, AttributeList$1>;
|
|
1093
|
-
}) : [MachineUserAttributes] extends [MachineUserAttributeFields
|
|
1112
|
+
}) : [MachineUserAttributes] extends [MachineUserAttributeFields] ? MachineUserFromAttributes<MachineUserAttributes> : IsAny<User> extends true ? {
|
|
1094
1113
|
attributes: Record<string, AuthAttributeValue>;
|
|
1095
1114
|
attributeList?: string[];
|
|
1096
1115
|
} : (AttributeMapSelectedKeys<User, AttributeMap$1> extends never ? {
|
|
@@ -1102,7 +1121,7 @@ type MachineUser<User extends TailorDBInstance, AttributeMap$1 extends UserAttri
|
|
|
1102
1121
|
} : {
|
|
1103
1122
|
attributeList: AttributeListToTuple<User, AttributeList$1>;
|
|
1104
1123
|
});
|
|
1105
|
-
type AuthServiceInput<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[], MachineUserNames extends string, MachineUserAttributes extends MachineUserAttributeFields
|
|
1124
|
+
type AuthServiceInput<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[], MachineUserNames extends string, MachineUserAttributes extends MachineUserAttributeFields | undefined = MachineUserAttributeFields | undefined> = {
|
|
1106
1125
|
userProfile?: UserProfile<User, AttributeMap$1, AttributeList$1>;
|
|
1107
1126
|
machineUserAttributes?: MachineUserAttributes;
|
|
1108
1127
|
machineUsers?: Record<MachineUserNames, MachineUser<User, AttributeMap$1, AttributeList$1, MachineUserAttributes>>;
|
|
@@ -1112,8 +1131,45 @@ type AuthServiceInput<User extends TailorDBInstance, AttributeMap$1 extends User
|
|
|
1112
1131
|
tenantProvider?: TenantProviderConfig;
|
|
1113
1132
|
publishSessionEvents?: boolean;
|
|
1114
1133
|
};
|
|
1134
|
+
declare const authDefinitionBrand: unique symbol;
|
|
1135
|
+
type AuthDefinitionBrand = {
|
|
1136
|
+
readonly [authDefinitionBrand]: true;
|
|
1137
|
+
};
|
|
1138
|
+
type DefinedAuth<Name extends string, Config, MachineUserNames extends string> = Config & {
|
|
1139
|
+
name: Name;
|
|
1140
|
+
invoker<M extends MachineUserNames>(machineUser: M): AuthInvokerWithName<M>;
|
|
1141
|
+
} & AuthDefinitionBrand;
|
|
1142
|
+
type AuthExternalConfig = {
|
|
1143
|
+
name: string;
|
|
1144
|
+
external: true;
|
|
1145
|
+
};
|
|
1146
|
+
type AuthServiceInputLoose = AuthServiceInput<any, any, any, string, any>;
|
|
1147
|
+
type AuthOwnConfig = DefinedAuth<string, AuthServiceInputLoose, string>;
|
|
1148
|
+
type AuthConfig = AuthOwnConfig | AuthExternalConfig;
|
|
1115
1149
|
//#endregion
|
|
1116
1150
|
//#region src/parser/service/tailordb/types.d.ts
|
|
1151
|
+
/**
|
|
1152
|
+
* Migration configuration for TailorDB
|
|
1153
|
+
*/
|
|
1154
|
+
type TailorDBMigrationConfig = {
|
|
1155
|
+
/** Directory path for migration files */
|
|
1156
|
+
directory: string;
|
|
1157
|
+
/** Machine user name for executing migration scripts (must be defined in auth.machineUsers) */
|
|
1158
|
+
machineUser?: string;
|
|
1159
|
+
};
|
|
1160
|
+
type TailorDBServiceConfig = {
|
|
1161
|
+
files: string[];
|
|
1162
|
+
ignores?: string[];
|
|
1163
|
+
erdSite?: string;
|
|
1164
|
+
/** Migration configuration */
|
|
1165
|
+
migration?: TailorDBMigrationConfig;
|
|
1166
|
+
};
|
|
1167
|
+
type TailorDBExternalConfig = {
|
|
1168
|
+
external: true;
|
|
1169
|
+
};
|
|
1170
|
+
type TailorDBServiceInput = {
|
|
1171
|
+
[namespace: string]: TailorDBServiceConfig | TailorDBExternalConfig;
|
|
1172
|
+
};
|
|
1117
1173
|
interface Script {
|
|
1118
1174
|
expr: string;
|
|
1119
1175
|
}
|
|
@@ -1248,7 +1304,7 @@ interface ParsedRelationship {
|
|
|
1248
1304
|
/**
|
|
1249
1305
|
* Parsed and normalized TailorDB type information
|
|
1250
1306
|
*/
|
|
1251
|
-
interface
|
|
1307
|
+
interface TailorDBType {
|
|
1252
1308
|
name: string;
|
|
1253
1309
|
pluralForm: string;
|
|
1254
1310
|
description?: string;
|
|
@@ -1261,57 +1317,6 @@ interface ParsedTailorDBType {
|
|
|
1261
1317
|
files?: TailorDBTypeMetadata["files"];
|
|
1262
1318
|
}
|
|
1263
1319
|
//#endregion
|
|
1264
|
-
//#region src/configure/services/auth/index.d.ts
|
|
1265
|
-
declare const authDefinitionBrand: unique symbol;
|
|
1266
|
-
type AuthDefinitionBrand = {
|
|
1267
|
-
readonly [authDefinitionBrand]: true;
|
|
1268
|
-
};
|
|
1269
|
-
type MachineUserAttributeFields = Record<string, TailorField<DefinedFieldMetadata, unknown, FieldMetadata, TailorFieldType>>;
|
|
1270
|
-
type PlaceholderUser = TailorDBInstance<Record<string, never>, Record<string, never>>;
|
|
1271
|
-
type PlaceholderAttributeMap = UserAttributeMap<PlaceholderUser>;
|
|
1272
|
-
type PlaceholderAttributeList = UserAttributeListKey<PlaceholderUser>[];
|
|
1273
|
-
type UserProfileAuthInput<User extends TailorDBInstance, AttributeMap$1 extends UserAttributeMap<User>, AttributeList$1 extends UserAttributeListKey<User>[], MachineUserNames extends string> = Omit<AuthServiceInput<User, AttributeMap$1, AttributeList$1, MachineUserNames, undefined>, "userProfile" | "machineUserAttributes"> & {
|
|
1274
|
-
userProfile: NonNullable<AuthServiceInput<User, AttributeMap$1, AttributeList$1, MachineUserNames, undefined>["userProfile"]>;
|
|
1275
|
-
machineUserAttributes?: never;
|
|
1276
|
-
};
|
|
1277
|
-
type MachineUserOnlyAuthInput<MachineUserNames extends string, MachineUserAttributes extends MachineUserAttributeFields> = Omit<AuthServiceInput<PlaceholderUser, PlaceholderAttributeMap, PlaceholderAttributeList, MachineUserNames, MachineUserAttributes>, "userProfile" | "machineUserAttributes"> & {
|
|
1278
|
-
userProfile?: never;
|
|
1279
|
-
machineUserAttributes: MachineUserAttributes;
|
|
1280
|
-
};
|
|
1281
|
-
type DefinedAuth<Name extends string, Config, MachineUserNames extends string> = Config & {
|
|
1282
|
-
name: Name;
|
|
1283
|
-
invoker<M extends MachineUserNames>(machineUser: M): AuthInvoker<M>;
|
|
1284
|
-
} & AuthDefinitionBrand;
|
|
1285
|
-
/**
|
|
1286
|
-
* Invoker type compatible with tailor.v1.AuthInvoker
|
|
1287
|
-
* - namespace: auth service name
|
|
1288
|
-
* - machineUserName: machine user name
|
|
1289
|
-
*/
|
|
1290
|
-
type AuthInvoker<M extends string> = Omit<AuthInvoker$1, "machineUserName"> & {
|
|
1291
|
-
machineUserName: M;
|
|
1292
|
-
};
|
|
1293
|
-
/**
|
|
1294
|
-
* Define an auth service for the Tailor SDK.
|
|
1295
|
-
* @template Name
|
|
1296
|
-
* @template User
|
|
1297
|
-
* @template AttributeMap
|
|
1298
|
-
* @template AttributeList
|
|
1299
|
-
* @template MachineUserNames
|
|
1300
|
-
* @template M
|
|
1301
|
-
* @param name - Auth service name
|
|
1302
|
-
* @param config - Auth service configuration
|
|
1303
|
-
* @returns Defined auth service
|
|
1304
|
-
*/
|
|
1305
|
-
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: UserProfileAuthInput<User, AttributeMap$1, AttributeList$1, MachineUserNames>): DefinedAuth<Name, UserProfileAuthInput<User, AttributeMap$1, AttributeList$1, MachineUserNames>, MachineUserNames>;
|
|
1306
|
-
declare function defineAuth<const Name extends string, const MachineUserAttributes extends MachineUserAttributeFields, const MachineUserNames extends string>(name: Name, config: MachineUserOnlyAuthInput<MachineUserNames, MachineUserAttributes>): DefinedAuth<Name, MachineUserOnlyAuthInput<MachineUserNames, MachineUserAttributes>, MachineUserNames>;
|
|
1307
|
-
type AuthExternalConfig = {
|
|
1308
|
-
name: string;
|
|
1309
|
-
external: true;
|
|
1310
|
-
};
|
|
1311
|
-
type AuthServiceInputLoose = AuthServiceInput<any, any, any, string, any>;
|
|
1312
|
-
type AuthOwnConfig = DefinedAuth<string, AuthServiceInputLoose, string>;
|
|
1313
|
-
type AuthConfig = AuthOwnConfig | AuthExternalConfig;
|
|
1314
|
-
//#endregion
|
|
1315
1320
|
//#region src/parser/service/executor/schema.d.ts
|
|
1316
1321
|
declare const RecordTriggerSchema: z.ZodObject<{
|
|
1317
1322
|
kind: z.ZodEnum<{
|
|
@@ -1480,17 +1485,43 @@ type ExecutorServiceConfig = {
|
|
|
1480
1485
|
};
|
|
1481
1486
|
type ExecutorServiceInput = ExecutorServiceConfig;
|
|
1482
1487
|
//#endregion
|
|
1483
|
-
//#region src/
|
|
1484
|
-
|
|
1488
|
+
//#region src/parser/service/staticwebsite/schema.d.ts
|
|
1489
|
+
declare const StaticWebsiteSchema: z.core.$ZodBranded<z.ZodObject<{
|
|
1490
|
+
name: z.ZodString;
|
|
1491
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1492
|
+
allowedIpAddresses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1493
|
+
}, z.core.$strip>, "StaticWebsiteConfig", "out">;
|
|
1494
|
+
//#endregion
|
|
1495
|
+
//#region src/parser/service/staticwebsite/types.d.ts
|
|
1496
|
+
type StaticWebsiteInput = z.input<typeof StaticWebsiteSchema>;
|
|
1497
|
+
//#endregion
|
|
1498
|
+
//#region src/configure/services/staticwebsite/index.d.ts
|
|
1499
|
+
declare const staticWebsiteDefinitionBrand: unique symbol;
|
|
1500
|
+
type StaticWebsiteDefinitionBrand = {
|
|
1501
|
+
readonly [staticWebsiteDefinitionBrand]: true;
|
|
1502
|
+
};
|
|
1503
|
+
/**
|
|
1504
|
+
* Define a static website configuration for the Tailor SDK.
|
|
1505
|
+
* @param name - Static website name
|
|
1506
|
+
* @param config - Static website configuration
|
|
1507
|
+
* @returns Defined static website
|
|
1508
|
+
*/
|
|
1509
|
+
declare function defineStaticWebSite(name: string, config: Omit<StaticWebsiteInput, "name">): {
|
|
1510
|
+
readonly name: string;
|
|
1511
|
+
readonly url: `${string}:url`;
|
|
1512
|
+
readonly description?: string | undefined;
|
|
1513
|
+
readonly allowedIpAddresses?: string[] | undefined;
|
|
1514
|
+
} & StaticWebsiteDefinitionBrand;
|
|
1515
|
+
type StaticWebsiteConfig = Omit<ReturnType<typeof defineStaticWebSite>, "url">;
|
|
1516
|
+
//#endregion
|
|
1517
|
+
//#region src/parser/service/workflow/types.d.ts
|
|
1518
|
+
type WorkflowServiceConfig = {
|
|
1485
1519
|
files: string[];
|
|
1520
|
+
job_files?: string[];
|
|
1486
1521
|
ignores?: string[];
|
|
1522
|
+
job_ignores?: string[];
|
|
1487
1523
|
};
|
|
1488
|
-
type
|
|
1489
|
-
external: true;
|
|
1490
|
-
};
|
|
1491
|
-
type ResolverServiceInput = {
|
|
1492
|
-
[namespace: string]: ResolverServiceConfig | ResolverExternalConfig;
|
|
1493
|
-
};
|
|
1524
|
+
type WorkflowServiceInput = WorkflowServiceConfig;
|
|
1494
1525
|
//#endregion
|
|
1495
1526
|
//#region src/parser/service/idp/schema.d.ts
|
|
1496
1527
|
declare const IdPSchema: z.core.$ZodBranded<z.ZodObject<{
|
|
@@ -1536,94 +1567,25 @@ declare const IdPSchema: z.core.$ZodBranded<z.ZodObject<{
|
|
|
1536
1567
|
//#endregion
|
|
1537
1568
|
//#region src/parser/service/idp/types.d.ts
|
|
1538
1569
|
type IdPInput = z.input<typeof IdPSchema>;
|
|
1539
|
-
//#endregion
|
|
1540
|
-
//#region src/configure/services/idp/index.d.ts
|
|
1541
1570
|
declare const idpDefinitionBrand: unique symbol;
|
|
1542
1571
|
type IdpDefinitionBrand = {
|
|
1543
1572
|
readonly [idpDefinitionBrand]: true;
|
|
1544
1573
|
};
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
* @param name - IdP service name
|
|
1549
|
-
* @param config - IdP configuration
|
|
1550
|
-
* @returns Defined IdP service
|
|
1551
|
-
*/
|
|
1552
|
-
declare function defineIdp<const TClients extends string[]>(name: string, config: Omit<IdPInput, "name" | "clients"> & {
|
|
1553
|
-
clients: TClients;
|
|
1554
|
-
}): {
|
|
1555
|
-
readonly name: string;
|
|
1556
|
-
readonly provider: (providerName: string, clientName: TClients[number]) => {
|
|
1557
|
-
readonly name: string;
|
|
1558
|
-
readonly kind: "BuiltInIdP";
|
|
1559
|
-
readonly namespace: string;
|
|
1560
|
-
readonly clientName: TClients[number];
|
|
1561
|
-
};
|
|
1562
|
-
readonly authorization: "insecure" | "loggedIn" | {
|
|
1563
|
-
cel: string;
|
|
1564
|
-
};
|
|
1565
|
-
readonly lang?: "en" | "ja" | undefined;
|
|
1566
|
-
readonly userAuthPolicy?: {
|
|
1567
|
-
useNonEmailIdentifier?: boolean | undefined;
|
|
1568
|
-
allowSelfPasswordReset?: boolean | undefined;
|
|
1569
|
-
passwordRequireUppercase?: boolean | undefined;
|
|
1570
|
-
passwordRequireLowercase?: boolean | undefined;
|
|
1571
|
-
passwordRequireNonAlphanumeric?: boolean | undefined;
|
|
1572
|
-
passwordRequireNumeric?: boolean | undefined;
|
|
1573
|
-
passwordMinLength?: number | undefined;
|
|
1574
|
-
passwordMaxLength?: number | undefined;
|
|
1575
|
-
} | undefined;
|
|
1576
|
-
readonly publishUserEvents?: boolean | undefined;
|
|
1577
|
-
readonly clients: TClients;
|
|
1574
|
+
type DefinedIdp<Name extends string, Config, ClientNames extends string> = Config & {
|
|
1575
|
+
name: Name;
|
|
1576
|
+
provider(providerName: string, clientName: ClientNames): BuiltinIdP;
|
|
1578
1577
|
} & IdpDefinitionBrand;
|
|
1579
1578
|
type IdPExternalConfig = {
|
|
1580
1579
|
name: string;
|
|
1581
1580
|
external: true;
|
|
1582
1581
|
};
|
|
1583
|
-
type
|
|
1584
|
-
|
|
1585
|
-
//#region src/parser/service/staticwebsite/schema.d.ts
|
|
1586
|
-
declare const StaticWebsiteSchema: z.core.$ZodBranded<z.ZodObject<{
|
|
1587
|
-
name: z.ZodString;
|
|
1588
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1589
|
-
allowedIpAddresses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1590
|
-
}, z.core.$strip>, "StaticWebsiteConfig", "out">;
|
|
1591
|
-
//#endregion
|
|
1592
|
-
//#region src/parser/service/staticwebsite/types.d.ts
|
|
1593
|
-
type StaticWebsiteInput = z.input<typeof StaticWebsiteSchema>;
|
|
1594
|
-
//#endregion
|
|
1595
|
-
//#region src/configure/services/staticwebsite/index.d.ts
|
|
1596
|
-
declare const staticWebsiteDefinitionBrand: unique symbol;
|
|
1597
|
-
type StaticWebsiteDefinitionBrand = {
|
|
1598
|
-
readonly [staticWebsiteDefinitionBrand]: true;
|
|
1599
|
-
};
|
|
1600
|
-
/**
|
|
1601
|
-
* Define a static website configuration for the Tailor SDK.
|
|
1602
|
-
* @param name - Static website name
|
|
1603
|
-
* @param config - Static website configuration
|
|
1604
|
-
* @returns Defined static website
|
|
1605
|
-
*/
|
|
1606
|
-
declare function defineStaticWebSite(name: string, config: Omit<StaticWebsiteInput, "name">): {
|
|
1607
|
-
readonly name: string;
|
|
1608
|
-
readonly url: `${string}:url`;
|
|
1609
|
-
readonly description?: string | undefined;
|
|
1610
|
-
readonly allowedIpAddresses?: string[] | undefined;
|
|
1611
|
-
} & StaticWebsiteDefinitionBrand;
|
|
1612
|
-
type StaticWebsiteConfig = Omit<ReturnType<typeof defineStaticWebSite>, "url">;
|
|
1613
|
-
//#endregion
|
|
1614
|
-
//#region src/parser/service/workflow/types.d.ts
|
|
1615
|
-
type WorkflowServiceConfig = {
|
|
1616
|
-
files: string[];
|
|
1617
|
-
job_files?: string[];
|
|
1618
|
-
ignores?: string[];
|
|
1619
|
-
job_ignores?: string[];
|
|
1620
|
-
};
|
|
1621
|
-
type WorkflowServiceInput = WorkflowServiceConfig;
|
|
1582
|
+
type IdPOwnConfig = Omit<DefinedIdp<string, IdPInput, string>, "provider">;
|
|
1583
|
+
type IdPConfig = IdPOwnConfig | IdPExternalConfig;
|
|
1622
1584
|
//#endregion
|
|
1623
1585
|
//#region src/parser/app-config/types.d.ts
|
|
1624
|
-
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>> {
|
|
1586
|
+
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>> {
|
|
1625
1587
|
name: string;
|
|
1626
|
-
env?: Env;
|
|
1588
|
+
env?: Env$1;
|
|
1627
1589
|
cors?: string[];
|
|
1628
1590
|
allowedIpAddresses?: string[];
|
|
1629
1591
|
disableIntrospection?: boolean;
|
|
@@ -1739,5 +1701,5 @@ declare function createGeneratorConfigSchema(builtinGenerators: Map<string, (opt
|
|
|
1739
1701
|
type GeneratorConfigSchemaType = ReturnType<typeof createGeneratorConfigSchema>;
|
|
1740
1702
|
type Generator = z.output<GeneratorConfigSchemaType>;
|
|
1741
1703
|
//#endregion
|
|
1742
|
-
export {
|
|
1743
|
-
//# sourceMappingURL=index-
|
|
1704
|
+
export { TailorDBInstance as $, AuthOwnConfig as A, unauthenticatedTailorUser as At, SCIMAttribute as B, ScheduleTriggerInput as C, output as Ct, AuthConfig as D, AttributeList as Dt, TailorDBType as E, TailorActor as Et, IdProviderConfig as F, SCIMResource as G, SCIMAttributeType as H, OAuth2ClientGrantType as I, UserAttributeListKey as J, TenantProviderConfig as K, OAuth2ClientInput as L, BuiltinIdP as M, AllowedValuesOutput as Mt, DefinedAuth as N, AuthExternalConfig as O, AttributeMap as Ot, IDToken as P, TailorDBField as Q, OIDC as R, ResolverExecutedTrigger as S, JsonCompatible as St, WorkflowOperation as T, TailorEnv as Tt, SCIMAuthorization as U, SCIMAttributeMapping as V, SCIMConfig as W, UsernameFieldKey as X, UserAttributeMap as Y, ValueOperand as Z, FunctionOperation as _, ResolverExternalConfig as _t, IdPExternalConfig as a, unsafeAllowAllGqlPermission as at, IncomingWebhookTrigger as b, ResolverServiceInput as bt, WorkflowServiceConfig as c, DefinedFieldMetadata as ct, defineStaticWebSite as d, FieldOutput$1 as dt, TailorDBType$1 as et, AuthAccessTokenTrigger as f, TailorFieldType as ft, ExecutorServiceInput as g, Resolver as gt, ExecutorServiceConfig as h, QueryType as ht, IdPConfig as i, TailorTypePermission as it, AuthServiceInput as j, AllowedValues as jt, AuthInvoker as k, TailorUser as kt, WorkflowServiceInput as l, FieldMetadata as lt, ExecutorInput as m, TailorField as mt, GeneratorConfig as n, PermissionCondition as nt, IdPInput as o, unsafeAllowAllTypePermission as ot, Executor as p, TailorAnyField as pt, UserAttributeKey as q, AppConfig as r, TailorTypeGqlPermission as rt, IdpDefinitionBrand as s, ArrayFieldOutput as st, Generator as t, db as tt, StaticWebsiteConfig as u, FieldOptions as ut, GqlOperation as v, ResolverInput as vt, WebhookOperation as w, Env as wt, RecordTrigger as x, InferFieldsOutput as xt, IdpUserTrigger as y, ResolverServiceConfig as yt, SAML as z };
|
|
1705
|
+
//# sourceMappingURL=index-Dkm2qwmF.d.mts.map
|