@tailor-platform/sdk 1.6.2 → 1.7.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 +27 -0
- package/dist/{application-4cO5Zvfo.mjs → application-Ba2B5A-w.mjs} +71 -36
- package/dist/application-Ba2B5A-w.mjs.map +1 -0
- package/dist/application-C_MQabII.mjs +5 -0
- package/dist/{auth-0Zh4xp4z.mjs → auth-Co6vu1MY.mjs} +9 -2
- package/dist/{auth-0Zh4xp4z.mjs.map → auth-Co6vu1MY.mjs.map} +1 -1
- package/dist/cli/index.mjs +23 -10
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +128 -20
- package/dist/cli/lib.mjs +4 -4
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/configure/index.d.mts +2 -2
- package/dist/configure/index.mjs +1 -1
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{index-DjdAxcQn.d.mts → index-BSrVjiPg.d.mts} +27 -3
- package/dist/{index-Dg8SBgrV.d.mts → index-DraFftyF.d.mts} +47 -49
- package/dist/{list-Cgj8IR2N.mjs → list-DArHhlnw.mjs} +3015 -2340
- package/dist/list-DArHhlnw.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +2 -2
- package/docs/cli/executor.md +117 -0
- package/docs/cli-reference.md +9 -0
- package/package.json +1 -1
- package/dist/application-3rIUD7cq.mjs +0 -5
- package/dist/application-4cO5Zvfo.mjs.map +0 -1
- package/dist/list-Cgj8IR2N.mjs.map +0 -1
|
@@ -21,6 +21,41 @@ type AllowedValuesOutput<V extends AllowedValues> = V[number] extends infer T ?
|
|
|
21
21
|
value: infer K;
|
|
22
22
|
} ? K : never : never;
|
|
23
23
|
//#endregion
|
|
24
|
+
//#region src/configure/types/user.d.ts
|
|
25
|
+
interface AttributeMap {}
|
|
26
|
+
interface AttributeList {
|
|
27
|
+
__tuple?: [];
|
|
28
|
+
}
|
|
29
|
+
type InferredAttributeMap = keyof AttributeMap extends never ? Record<string, string | string[] | boolean | boolean[] | undefined> : AttributeMap;
|
|
30
|
+
type InferredAttributeList = AttributeList["__tuple"] extends [] ? string[] : AttributeList["__tuple"];
|
|
31
|
+
/** Represents a user in the Tailor platform. */
|
|
32
|
+
type TailorUser = {
|
|
33
|
+
/**
|
|
34
|
+
* The ID of the user.
|
|
35
|
+
* For unauthenticated users, this will be a nil UUID.
|
|
36
|
+
*/
|
|
37
|
+
id: string;
|
|
38
|
+
/**
|
|
39
|
+
* The type of the user.
|
|
40
|
+
* For unauthenticated users, this will be an empty string.
|
|
41
|
+
*/
|
|
42
|
+
type: "user" | "machine_user" | "";
|
|
43
|
+
/** The ID of the workspace the user belongs to. */
|
|
44
|
+
workspaceId: string;
|
|
45
|
+
/**
|
|
46
|
+
* A map of the user's attributes.
|
|
47
|
+
* For unauthenticated users, this will be null.
|
|
48
|
+
*/
|
|
49
|
+
attributes: InferredAttributeMap | null;
|
|
50
|
+
/**
|
|
51
|
+
* A list of the user's attributes.
|
|
52
|
+
* For unauthenticated users, this will be an empty array.
|
|
53
|
+
*/
|
|
54
|
+
attributeList: InferredAttributeList;
|
|
55
|
+
};
|
|
56
|
+
/** Represents an unauthenticated user in the Tailor platform. */
|
|
57
|
+
declare const unauthenticatedTailorUser: TailorUser;
|
|
58
|
+
//#endregion
|
|
24
59
|
//#region src/configure/types/helpers.d.ts
|
|
25
60
|
type Prettify<T> = { [K in keyof T as string extends K ? never : K]: T[K] } & {};
|
|
26
61
|
type DeepWritable<T> = T extends Date | RegExp | Function ? T : T extends object ? { -readonly [P in keyof T]: DeepWritable<T[P]> } & {} : T;
|
|
@@ -218,41 +253,6 @@ interface TailorField<Defined extends DefinedFieldMetadata = DefinedFieldMetadat
|
|
|
218
253
|
_parseInternal(args: FieldParseInternalArgs): StandardSchemaV1.Result<Output>;
|
|
219
254
|
}
|
|
220
255
|
//#endregion
|
|
221
|
-
//#region src/configure/types/user.d.ts
|
|
222
|
-
interface AttributeMap {}
|
|
223
|
-
interface AttributeList {
|
|
224
|
-
__tuple?: [];
|
|
225
|
-
}
|
|
226
|
-
type InferredAttributeMap = keyof AttributeMap extends never ? Record<string, string | string[] | boolean | boolean[] | undefined> : AttributeMap;
|
|
227
|
-
type InferredAttributeList = AttributeList["__tuple"] extends [] ? string[] : AttributeList["__tuple"];
|
|
228
|
-
/** Represents a user in the Tailor platform. */
|
|
229
|
-
type TailorUser = {
|
|
230
|
-
/**
|
|
231
|
-
* The ID of the user.
|
|
232
|
-
* For unauthenticated users, this will be a nil UUID.
|
|
233
|
-
*/
|
|
234
|
-
id: string;
|
|
235
|
-
/**
|
|
236
|
-
* The type of the user.
|
|
237
|
-
* For unauthenticated users, this will be an empty string.
|
|
238
|
-
*/
|
|
239
|
-
type: "user" | "machine_user" | "";
|
|
240
|
-
/** The ID of the workspace the user belongs to. */
|
|
241
|
-
workspaceId: string;
|
|
242
|
-
/**
|
|
243
|
-
* A map of the user's attributes.
|
|
244
|
-
* For unauthenticated users, this will be null.
|
|
245
|
-
*/
|
|
246
|
-
attributes: InferredAttributeMap | null;
|
|
247
|
-
/**
|
|
248
|
-
* A list of the user's attributes.
|
|
249
|
-
* For unauthenticated users, this will be an empty array.
|
|
250
|
-
*/
|
|
251
|
-
attributeList: InferredAttributeList;
|
|
252
|
-
};
|
|
253
|
-
/** Represents an unauthenticated user in the Tailor platform. */
|
|
254
|
-
declare const unauthenticatedTailorUser: TailorUser;
|
|
255
|
-
//#endregion
|
|
256
256
|
//#region src/configure/types/validation.d.ts
|
|
257
257
|
/**
|
|
258
258
|
* Validation function type
|
|
@@ -1312,13 +1312,6 @@ type AuthServiceInputLoose = AuthServiceInput<any, any, any, string, any>;
|
|
|
1312
1312
|
type AuthOwnConfig = DefinedAuth<string, AuthServiceInputLoose, string>;
|
|
1313
1313
|
type AuthConfig = AuthOwnConfig | AuthExternalConfig;
|
|
1314
1314
|
//#endregion
|
|
1315
|
-
//#region src/configure/services/executor/types.d.ts
|
|
1316
|
-
type ExecutorServiceConfig = {
|
|
1317
|
-
files: string[];
|
|
1318
|
-
ignores?: string[];
|
|
1319
|
-
};
|
|
1320
|
-
type ExecutorServiceInput = ExecutorServiceConfig;
|
|
1321
|
-
//#endregion
|
|
1322
1315
|
//#region src/parser/service/executor/schema.d.ts
|
|
1323
1316
|
declare const RecordTriggerSchema: z.ZodObject<{
|
|
1324
1317
|
kind: z.ZodEnum<{
|
|
@@ -1481,6 +1474,11 @@ type WebhookOperation = z.infer<typeof WebhookOperationSchema>;
|
|
|
1481
1474
|
type WorkflowOperation = z.infer<typeof WorkflowOperationSchema>;
|
|
1482
1475
|
type Executor = z.infer<typeof ExecutorSchema>;
|
|
1483
1476
|
type ExecutorInput = z.input<typeof ExecutorSchema>;
|
|
1477
|
+
type ExecutorServiceConfig = {
|
|
1478
|
+
files: string[];
|
|
1479
|
+
ignores?: string[];
|
|
1480
|
+
};
|
|
1481
|
+
type ExecutorServiceInput = ExecutorServiceConfig;
|
|
1484
1482
|
//#endregion
|
|
1485
1483
|
//#region src/configure/services/resolver/types.d.ts
|
|
1486
1484
|
type ResolverServiceConfig = {
|
|
@@ -1646,18 +1644,18 @@ type CodeGeneratorBase = Omit<z.output<typeof CodeGeneratorSchema>, "dependencie
|
|
|
1646
1644
|
//#endregion
|
|
1647
1645
|
//#region src/parser/generator-config/index.d.ts
|
|
1648
1646
|
declare const DependencyKindSchema: z.ZodEnum<{
|
|
1647
|
+
executor: "executor";
|
|
1649
1648
|
tailordb: "tailordb";
|
|
1650
1649
|
resolver: "resolver";
|
|
1651
|
-
executor: "executor";
|
|
1652
1650
|
}>;
|
|
1653
1651
|
type DependencyKind = z.infer<typeof DependencyKindSchema>;
|
|
1654
1652
|
declare const CodeGeneratorSchema: z.ZodObject<{
|
|
1655
1653
|
id: z.ZodString;
|
|
1656
1654
|
description: z.ZodString;
|
|
1657
1655
|
dependencies: z.ZodArray<z.ZodEnum<{
|
|
1656
|
+
executor: "executor";
|
|
1658
1657
|
tailordb: "tailordb";
|
|
1659
1658
|
resolver: "resolver";
|
|
1660
|
-
executor: "executor";
|
|
1661
1659
|
}>>;
|
|
1662
1660
|
processType: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
1663
1661
|
processResolver: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
@@ -1679,9 +1677,9 @@ declare const BaseGeneratorConfigSchema: z.ZodUnion<readonly [z.ZodTuple<[z.ZodL
|
|
|
1679
1677
|
id: z.ZodString;
|
|
1680
1678
|
description: z.ZodString;
|
|
1681
1679
|
dependencies: z.ZodArray<z.ZodEnum<{
|
|
1680
|
+
executor: "executor";
|
|
1682
1681
|
tailordb: "tailordb";
|
|
1683
1682
|
resolver: "resolver";
|
|
1684
|
-
executor: "executor";
|
|
1685
1683
|
}>>;
|
|
1686
1684
|
processType: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
1687
1685
|
processResolver: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
@@ -1708,9 +1706,9 @@ declare function createGeneratorConfigSchema(builtinGenerators: Map<string, (opt
|
|
|
1708
1706
|
id: z.ZodString;
|
|
1709
1707
|
description: z.ZodString;
|
|
1710
1708
|
dependencies: z.ZodArray<z.ZodEnum<{
|
|
1709
|
+
executor: "executor";
|
|
1711
1710
|
tailordb: "tailordb";
|
|
1712
1711
|
resolver: "resolver";
|
|
1713
|
-
executor: "executor";
|
|
1714
1712
|
}>>;
|
|
1715
1713
|
processType: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
1716
1714
|
processResolver: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
@@ -1730,7 +1728,7 @@ declare function createGeneratorConfigSchema(builtinGenerators: Map<string, (opt
|
|
|
1730
1728
|
}] | {
|
|
1731
1729
|
id: string;
|
|
1732
1730
|
description: string;
|
|
1733
|
-
dependencies: ("
|
|
1731
|
+
dependencies: ("executor" | "tailordb" | "resolver")[];
|
|
1734
1732
|
aggregate: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodAny>;
|
|
1735
1733
|
processType?: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut> | undefined;
|
|
1736
1734
|
processResolver?: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut> | undefined;
|
|
@@ -1741,5 +1739,5 @@ declare function createGeneratorConfigSchema(builtinGenerators: Map<string, (opt
|
|
|
1741
1739
|
type GeneratorConfigSchemaType = ReturnType<typeof createGeneratorConfigSchema>;
|
|
1742
1740
|
type Generator = z.output<GeneratorConfigSchemaType>;
|
|
1743
1741
|
//#endregion
|
|
1744
|
-
export { ValueOperand as $, AuthInvoker as A, OIDC as B,
|
|
1745
|
-
//# sourceMappingURL=index-
|
|
1742
|
+
export { ValueOperand as $, AuthInvoker as A, OIDC as B, RecordTrigger as C, AttributeMap as Ct, WorkflowOperation as D, unauthenticatedTailorUser as Dt, WebhookOperation as E, TailorUser as Et, BuiltinIdP as F, SCIMAuthorization as G, SCIMAttribute as H, IDToken as I, TenantProviderConfig as J, SCIMConfig as K, IdProviderConfig as L, defineAuth as M, ParsedTailorDBType as N, AuthConfig as O, AllowedValues as Ot, AuthServiceInput as P, UsernameFieldKey as Q, OAuth2ClientGrantType as R, IncomingWebhookTrigger as S, AttributeList as St, ScheduleTriggerInput as T, InferredAttributeMap as Tt, SCIMAttributeMapping as U, SAML as V, SCIMAttributeType as W, UserAttributeListKey as X, UserAttributeKey as Y, UserAttributeMap as Z, ExecutorServiceConfig as _, Resolver as _t, WorkflowServiceInput as a, TailorTypeGqlPermission as at, GqlOperation as b, JsonCompatible as bt, IdPConfig as c, unsafeAllowAllTypePermission as ct, ResolverExternalConfig as d, FieldOptions as dt, TailorDBField as et, ResolverServiceConfig as f, FieldOutput$1 as ft, ExecutorInput as g, QueryType as gt, Executor as h, TailorField as ht, WorkflowServiceConfig as i, PermissionCondition as it, AuthOwnConfig as j, AuthExternalConfig as k, AllowedValuesOutput as kt, IdPExternalConfig as l, ArrayFieldOutput as lt, AuthAccessTokenTrigger as m, TailorAnyField as mt, GeneratorConfig as n, TailorDBType as nt, StaticWebsiteConfig as o, TailorTypePermission as ot, ResolverServiceInput as p, TailorFieldType as pt, SCIMResource as q, AppConfig as r, db as rt, defineStaticWebSite as s, unsafeAllowAllGqlPermission as st, Generator as t, TailorDBInstance as tt, defineIdp as u, FieldMetadata as ut, ExecutorServiceInput as v, ResolverInput as vt, ResolverExecutedTrigger as w, InferredAttributeList as wt, IdpUserTrigger as x, output as xt, FunctionOperation as y, InferFieldsOutput as yt, OAuth2ClientInput as z };
|
|
1743
|
+
//# sourceMappingURL=index-DraFftyF.d.mts.map
|