@tailor-platform/sdk 1.17.0 → 1.18.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 +24 -0
- package/dist/application-Csj7Ow5Q.mjs +8 -0
- package/dist/{application-DYfVZVPT.mjs → application-gWUyKuzv.mjs} +211 -1653
- package/dist/{application-DYfVZVPT.mjs.map → application-gWUyKuzv.mjs.map} +1 -1
- package/dist/brand-BZJCv6UY.mjs +28 -0
- package/dist/brand-BZJCv6UY.mjs.map +1 -0
- package/dist/cli/index.mjs +38 -20
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +20 -33
- package/dist/cli/lib.mjs +10 -5
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/configure/index.d.mts +4 -4
- package/dist/configure/index.mjs +10 -19
- package/dist/configure/index.mjs.map +1 -1
- package/dist/enum-constants-Cwd4qdpa.mjs +115 -0
- package/dist/enum-constants-Cwd4qdpa.mjs.map +1 -0
- package/dist/file-utils-cqcpFk87.mjs +139 -0
- package/dist/file-utils-cqcpFk87.mjs.map +1 -0
- package/dist/index-BKXch-td.d.mts +18 -0
- package/dist/index-C3Ib7pFc.d.mts +18 -0
- package/dist/{index-qQXpN674.d.mts → index-DP8EB9FK.d.mts} +13 -5
- package/dist/index-SqWgrTnF.d.mts +20 -0
- package/dist/index-sSDpuVQY.d.mts +18 -0
- package/dist/{jiti-BrELlEYT.mjs → jiti-DHlauMCo.mjs} +2 -2
- package/dist/{jiti-BrELlEYT.mjs.map → jiti-DHlauMCo.mjs.map} +1 -1
- package/dist/{job-CULA2Pvf.mjs → job-2Q82qQ6N.mjs} +27 -5
- package/dist/job-2Q82qQ6N.mjs.map +1 -0
- package/dist/kysely-type-DtUUoAi3.mjs +259 -0
- package/dist/kysely-type-DtUUoAi3.mjs.map +1 -0
- package/dist/plugin/builtin/enum-constants/index.d.mts +4 -0
- package/dist/plugin/builtin/enum-constants/index.mjs +3 -0
- package/dist/plugin/builtin/file-utils/index.d.mts +4 -0
- package/dist/plugin/builtin/file-utils/index.mjs +3 -0
- package/dist/plugin/builtin/kysely-type/index.d.mts +4 -0
- package/dist/plugin/builtin/kysely-type/index.mjs +3 -0
- package/dist/plugin/builtin/seed/index.d.mts +4 -0
- package/dist/plugin/builtin/seed/index.mjs +3 -0
- package/dist/plugin/index.d.mts +3 -3
- package/dist/plugin/index.mjs +11 -11
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/{schema-R5TxC5Pn.mjs → schema-WDvc7Zel.mjs} +4 -3
- package/dist/schema-WDvc7Zel.mjs.map +1 -0
- package/dist/seed-Dm7lrGZ3.mjs +1050 -0
- package/dist/seed-Dm7lrGZ3.mjs.map +1 -0
- package/dist/{src-DMROgdcL.mjs → src-i4uqS1G4.mjs} +2 -2
- package/dist/{src-DMROgdcL.mjs.map → src-i4uqS1G4.mjs.map} +1 -1
- package/dist/types-Bhl_wAM2.d.mts +151 -0
- package/dist/{types-b-ig8nW_.mjs → types-ClK_HJ0G.mjs} +1 -1
- package/dist/{types-b-ig8nW_.mjs.map → types-ClK_HJ0G.mjs.map} +1 -1
- package/dist/{types-DzvazVmg.d.mts → types-DdvTxFiD.d.mts} +1380 -1044
- package/dist/{update-DQKCUNmr.mjs → update-BoNKMti-.mjs} +285 -112
- package/dist/update-BoNKMti-.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +4 -4
- package/dist/utils/test/index.mjs +3 -2
- package/dist/utils/test/index.mjs.map +1 -1
- package/docs/cli/application.md +106 -14
- package/docs/cli/auth.md +92 -12
- package/docs/cli/completion.md +18 -2
- package/docs/cli/executor.md +122 -14
- package/docs/cli/function.md +32 -4
- package/docs/cli/secret.md +134 -18
- package/docs/cli/staticwebsite.md +60 -8
- package/docs/cli/tailordb.md +148 -20
- package/docs/cli/user.md +154 -22
- package/docs/cli/workflow.md +100 -12
- package/docs/cli/workspace.md +274 -38
- package/docs/generator/custom.md +2 -2
- package/docs/plugin/custom.md +270 -163
- package/docs/plugin/index.md +48 -2
- package/package.json +22 -2
- package/dist/application-D5ZEr4zk.mjs +0 -4
- package/dist/job-CULA2Pvf.mjs.map +0 -1
- package/dist/schema-R5TxC5Pn.mjs.map +0 -1
- package/dist/types-BeNtD-fA.d.mts +0 -369
- package/dist/update-DQKCUNmr.mjs.map +0 -1
- /package/dist/{chunk-GMkBE123.mjs → chunk-CqAI0b6X.mjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="./user-defined.d.ts" />
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { A as AuthAccessTokenTrigger$1, B as ResolverExecutedTrigger$1, Bt as TailorActor, Ct as FieldMetadata, Dt as TailorAnyField, Et as TailorFieldType, F as FunctionOperation$1, Ft as InferFieldsOutput, Gt as AllowedValues, H as WebhookOperation$1, I as GqlOperation$1, It as JsonCompatible, J as AuthServiceInput, K as AuthInvoker$1, Kt as AllowedValuesOutput, L as IdpUserTrigger$1, Lt as output$1, M as ExecutorInput, Mt as ResolverInput, Ot as TailorField, R as IncomingWebhookTrigger$1, St as DefinedFieldMetadata, Tt as FieldOutput, U as WorkflowOperation$1, Ut as TailorUser, V as ScheduleTriggerInput, X as DefinedAuth, dt as UserAttributeListKey, ft as UserAttributeMap, ht as GeneratorConfig, o as TailorDBInstance, s as TailorDBType, u as Plugin, wt as FieldOptions, xt as ArrayFieldOutput, z as RecordTrigger$1, zt as TailorEnv } from "./types-DdvTxFiD.mjs";
|
|
3
|
+
import { a as IdpDefinitionBrand, i as IdPInput, t as AppConfig } from "./types-Bhl_wAM2.mjs";
|
|
4
4
|
import * as zod0 from "zod";
|
|
5
5
|
import { JsonPrimitive, Jsonifiable, Jsonify } from "type-fest";
|
|
6
6
|
import { Client } from "@urql/core";
|
|
@@ -110,6 +110,7 @@ type ResolverConfig = ReturnType<typeof createResolver<any, any>>;
|
|
|
110
110
|
*/
|
|
111
111
|
type WorkflowJobContext = {
|
|
112
112
|
env: TailorEnv;
|
|
113
|
+
user: TailorUser;
|
|
113
114
|
};
|
|
114
115
|
/**
|
|
115
116
|
* Allowed output types for workflow job body functions.
|
|
@@ -213,6 +214,11 @@ type WorkflowJobBody<I, O> = IsValidInput<I> extends true ? IsValidOutput<O> ext
|
|
|
213
214
|
* Contains JSON-serialized TailorEnv object.
|
|
214
215
|
*/
|
|
215
216
|
declare const WORKFLOW_TEST_ENV_KEY = "TAILOR_TEST_WORKFLOW_ENV";
|
|
217
|
+
/**
|
|
218
|
+
* Environment variable key for workflow user testing.
|
|
219
|
+
* Contains JSON-serialized TailorUser object.
|
|
220
|
+
*/
|
|
221
|
+
declare const WORKFLOW_TEST_USER_KEY = "TAILOR_TEST_WORKFLOW_USER";
|
|
216
222
|
/**
|
|
217
223
|
* Create a workflow job definition.
|
|
218
224
|
*
|
|
@@ -611,6 +617,7 @@ declare function defineIdp<const TClients extends string[]>(name: string, config
|
|
|
611
617
|
passwordMaxLength?: number | undefined;
|
|
612
618
|
allowedEmailDomains?: string[] | undefined;
|
|
613
619
|
allowGoogleOauth?: boolean | undefined;
|
|
620
|
+
disablePasswordAuth?: boolean | undefined;
|
|
614
621
|
} | undefined;
|
|
615
622
|
readonly publishUserEvents?: boolean | undefined;
|
|
616
623
|
readonly clients: TClients;
|
|
@@ -626,6 +633,7 @@ declare function defineIdp<const TClients extends string[]>(name: string, config
|
|
|
626
633
|
declare function defineConfig<const Config extends AppConfig & Record<Exclude<keyof Config, keyof AppConfig>, never>>(config: Config): Config;
|
|
627
634
|
/**
|
|
628
635
|
* Define generators to be used with the Tailor SDK.
|
|
636
|
+
* @deprecated Use definePlugins() with generation hooks (onTypeLoaded, generate, etc.) instead.
|
|
629
637
|
* @param configs - Generator configurations
|
|
630
638
|
* @returns Generator configurations as given
|
|
631
639
|
*/
|
|
@@ -656,7 +664,7 @@ declare function defineGenerators(...configs: GeneratorConfig[]): (["@tailor-pla
|
|
|
656
664
|
* @param configs - Plugin configurations
|
|
657
665
|
* @returns Plugin configurations as given
|
|
658
666
|
*/
|
|
659
|
-
declare function definePlugins(...configs: Plugin[]): Plugin<
|
|
667
|
+
declare function definePlugins(...configs: Plugin<any, any>[]): Plugin<any, any>[];
|
|
660
668
|
//#endregion
|
|
661
669
|
//#region src/configure/index.d.ts
|
|
662
670
|
type TailorOutput<T> = output$1<T>;
|
|
@@ -729,5 +737,5 @@ declare namespace t {
|
|
|
729
737
|
type infer<T> = TailorOutput<T>;
|
|
730
738
|
}
|
|
731
739
|
//#endregion
|
|
732
|
-
export {
|
|
733
|
-
//# sourceMappingURL=index-
|
|
740
|
+
export { AuthInvoker as $, idpUserCreatedTrigger as A, WebhookOperation as B, RecordTrigger as C, authAccessTokenIssuedTrigger as D, ResolverExecutedTrigger as E, recordUpdatedTrigger as F, WORKFLOW_TEST_ENV_KEY as G, Workflow as H, resolverExecutedTrigger as I, WorkflowJobContext as J, WORKFLOW_TEST_USER_KEY as K, FunctionOperation as L, idpUserUpdatedTrigger as M, recordCreatedTrigger as N, authAccessTokenRefreshedTrigger as O, recordDeletedTrigger as P, createResolver as Q, GqlOperation as R, RecordDeletedArgs as S, ResolverExecutedArgs as T, WorkflowConfig as U, WorkflowOperation as V, createWorkflow as W, WorkflowJobOutput as X, WorkflowJobInput as Y, createWorkflowJob as Z, AuthAccessTokenArgs as _, defineGenerators as a, IdpUserTrigger as b, createExecutor as c, IncomingWebhookRequest as d, defineAuth as et, IncomingWebhookTrigger as f, scheduleTrigger as g, ScheduleTrigger as h, defineConfig as i, idpUserDeletedTrigger as j, authAccessTokenRevokedTrigger as k, Trigger as l, ScheduleArgs as m, output as n, definePlugins as o, incomingWebhookTrigger as p, WorkflowJob as q, t as r, defineIdp as s, infer as t, IncomingWebhookArgs as u, AuthAccessTokenTrigger as v, RecordUpdatedArgs as w, RecordCreatedArgs as x, IdpUserArgs as y, Operation as z };
|
|
741
|
+
//# sourceMappingURL=index-DP8EB9FK.d.mts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference path="./user-defined.d.ts" />
|
|
2
|
+
import { u as Plugin } from "./types-DdvTxFiD.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/plugin/builtin/seed/index.d.ts
|
|
5
|
+
declare const SeedGeneratorID = "@tailor-platform/seed";
|
|
6
|
+
type SeedPluginOptions = {
|
|
7
|
+
distPath: string;
|
|
8
|
+
machineUserName?: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Plugin that generates seed data files with Kysely batch insert and tailor.idp.Client for _User.
|
|
12
|
+
* @param options - Plugin options
|
|
13
|
+
* @param options.distPath - Output directory path for generated seed files
|
|
14
|
+
* @param options.machineUserName - Default machine user name for authentication
|
|
15
|
+
* @returns Plugin instance with onTailorDBReady hook
|
|
16
|
+
*/
|
|
17
|
+
declare function seedPlugin(options: SeedPluginOptions): Plugin<unknown, SeedPluginOptions>;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { seedPlugin as n, SeedGeneratorID as t };
|
|
20
|
+
//# sourceMappingURL=index-SqWgrTnF.d.mts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference path="./user-defined.d.ts" />
|
|
2
|
+
import { u as Plugin } from "./types-DdvTxFiD.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/plugin/builtin/enum-constants/index.d.ts
|
|
5
|
+
declare const EnumConstantsGeneratorID = "@tailor-platform/enum-constants";
|
|
6
|
+
type EnumConstantsPluginOptions = {
|
|
7
|
+
distPath: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Plugin that generates enum constants from TailorDB type definitions.
|
|
11
|
+
* @param options - Plugin options
|
|
12
|
+
* @param options.distPath - Output file path for generated constants
|
|
13
|
+
* @returns Plugin instance with onTailorDBReady hook
|
|
14
|
+
*/
|
|
15
|
+
declare function enumConstantsPlugin(options: EnumConstantsPluginOptions): Plugin<unknown, EnumConstantsPluginOptions>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { enumConstantsPlugin as n, EnumConstantsGeneratorID as t };
|
|
18
|
+
//# sourceMappingURL=index-sSDpuVQY.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as __require, n as __esmMin, o as __toESM, t as __commonJSMin } from "./chunk-
|
|
1
|
+
import { i as __require, n as __esmMin, o as __toESM, t as __commonJSMin } from "./chunk-CqAI0b6X.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
|
|
4
4
|
//#region ../../node_modules/jiti/dist/jiti.cjs
|
|
@@ -4479,4 +4479,4 @@ var init_jiti = __esmMin((() => {
|
|
|
4479
4479
|
//#endregion
|
|
4480
4480
|
init_jiti();
|
|
4481
4481
|
export { createJiti };
|
|
4482
|
-
//# sourceMappingURL=jiti-
|
|
4482
|
+
//# sourceMappingURL=jiti-DHlauMCo.mjs.map
|