@tailor-platform/sdk 1.23.0 → 1.25.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 (74) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/dist/app-config-QzNOFnEy.d.mts +197 -0
  3. package/dist/{application-CTQe2HSB.mjs → application-CxDvCZts.mjs} +226 -220
  4. package/dist/application-CxDvCZts.mjs.map +1 -0
  5. package/dist/application-EQCsho6Z.mjs +8 -0
  6. package/dist/{brand-DyPrAzpM.mjs → brand-j6C6_sGq.mjs} +1 -1
  7. package/dist/{brand-DyPrAzpM.mjs.map → brand-j6C6_sGq.mjs.map} +1 -1
  8. package/dist/cli/index.mjs +9 -9
  9. package/dist/cli/index.mjs.map +1 -1
  10. package/dist/cli/lib.d.mts +7 -7
  11. package/dist/cli/lib.mjs +10 -10
  12. package/dist/cli/lib.mjs.map +1 -1
  13. package/dist/configure/index.d.mts +5 -4
  14. package/dist/configure/index.mjs +30 -4
  15. package/dist/configure/index.mjs.map +1 -1
  16. package/dist/{enum-constants-B5Nl-yzx.mjs → enum-constants-BxdLbhsW.mjs} +1 -1
  17. package/dist/enum-constants-BxdLbhsW.mjs.map +1 -0
  18. package/dist/env-jndw86T4.d.mts +32 -0
  19. package/dist/{file-utils-sEOwAdJ4.mjs → file-utils-C2r3AVbI.mjs} +1 -1
  20. package/dist/{file-utils-sEOwAdJ4.mjs.map → file-utils-C2r3AVbI.mjs.map} +1 -1
  21. package/dist/{index-CU2kZzKa.d.mts → index-BUnLWUKQ.d.mts} +66 -15
  22. package/dist/{index-BSXclved.d.mts → index-DZRZdh71.d.mts} +2 -2
  23. package/dist/{index-lIALNMi_.d.mts → index-Do7zo7z-.d.mts} +2 -2
  24. package/dist/{index-CO-jsOMb.d.mts → index-DoxGF8-i.d.mts} +2 -2
  25. package/dist/{index-DQlsfhpg.d.mts → index-VZq4IAEK.d.mts} +2 -2
  26. package/dist/{interceptor-DiARwPfw.mjs → interceptor-DVy32eIG.mjs} +1 -1
  27. package/dist/{interceptor-DiARwPfw.mjs.map → interceptor-DVy32eIG.mjs.map} +1 -1
  28. package/dist/{job-CRavYLLk.mjs → job-CnLRQFrk.mjs} +2 -2
  29. package/dist/{job-CRavYLLk.mjs.map → job-CnLRQFrk.mjs.map} +1 -1
  30. package/dist/{kysely-type-CSlcwNFH.mjs → kysely-type-DzLBuVp6.mjs} +1 -1
  31. package/dist/kysely-type-DzLBuVp6.mjs.map +1 -0
  32. package/dist/package-json-BKA36WTo.mjs +3 -0
  33. package/dist/{package-json-iVBhE5Ef.mjs → package-json-DnbGCOkg.mjs} +1 -1
  34. package/dist/{package-json-iVBhE5Ef.mjs.map → package-json-DnbGCOkg.mjs.map} +1 -1
  35. package/dist/plugin/builtin/enum-constants/index.d.mts +2 -2
  36. package/dist/plugin/builtin/enum-constants/index.mjs +1 -1
  37. package/dist/plugin/builtin/file-utils/index.d.mts +2 -2
  38. package/dist/plugin/builtin/file-utils/index.mjs +1 -1
  39. package/dist/plugin/builtin/kysely-type/index.d.mts +2 -2
  40. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  41. package/dist/plugin/builtin/seed/index.d.mts +2 -2
  42. package/dist/plugin/builtin/seed/index.mjs +1 -1
  43. package/dist/plugin/index.d.mts +2 -1
  44. package/dist/plugin/index.mjs.map +1 -1
  45. package/dist/{types--G4ilVmx.d.mts → plugin-3sT6Tcq0.d.mts} +1068 -1761
  46. package/dist/{query-BLQBOaAM.mjs → query-c9RCJduH.mjs} +451 -60
  47. package/dist/query-c9RCJduH.mjs.map +1 -0
  48. package/dist/{schema-Cjm-OvPF.mjs → schema-DOx_W_s2.mjs} +2 -2
  49. package/dist/schema-DOx_W_s2.mjs.map +1 -0
  50. package/dist/seed/index.d.mts +29 -0
  51. package/dist/seed/index.mjs +89 -0
  52. package/dist/seed/index.mjs.map +1 -0
  53. package/dist/{seed-CXvCW3Xc.mjs → seed-DkKAheSe.mjs} +76 -9
  54. package/dist/seed-DkKAheSe.mjs.map +1 -0
  55. package/dist/telemetry-J6dpByo2.mjs +3 -0
  56. package/dist/{telemetry-C46fds1l.mjs → telemetry-d_lgTL33.mjs} +2 -2
  57. package/dist/{telemetry-C46fds1l.mjs.map → telemetry-d_lgTL33.mjs.map} +1 -1
  58. package/dist/utils/test/index.d.mts +3 -3
  59. package/dist/utils/test/index.mjs +2 -2
  60. package/docs/cli/tailordb.md +1 -1
  61. package/docs/cli-reference.md +8 -8
  62. package/package.json +31 -24
  63. package/dist/application-CTQe2HSB.mjs.map +0 -1
  64. package/dist/application-DdSu3baZ.mjs +0 -8
  65. package/dist/enum-constants-B5Nl-yzx.mjs.map +0 -1
  66. package/dist/kysely-type-CSlcwNFH.mjs.map +0 -1
  67. package/dist/package-json-BI0ng3_5.mjs +0 -3
  68. package/dist/query-BLQBOaAM.mjs.map +0 -1
  69. package/dist/schema-Cjm-OvPF.mjs.map +0 -1
  70. package/dist/seed-CXvCW3Xc.mjs.map +0 -1
  71. package/dist/telemetry-BAxP8-PR.mjs +0 -3
  72. package/dist/types-CBTSg-LK.mjs +0 -13
  73. package/dist/types-CBTSg-LK.mjs.map +0 -1
  74. package/dist/types-IR-hw0-y.d.mts +0 -245
@@ -1,245 +0,0 @@
1
- import { P as ExecutorServiceInput, Pt as ResolverServiceInput, W as AuthConfig, Y as BuiltinIdP, qt as TailorDBServiceInput } from "./types--G4ilVmx.mjs";
2
- import { z } from "zod";
3
-
4
- //#region src/parser/service/workflow/types.d.ts
5
- type WorkflowServiceConfig = {
6
- files: string[];
7
- job_files?: string[];
8
- ignores?: string[];
9
- job_ignores?: string[];
10
- };
11
- type WorkflowServiceInput = WorkflowServiceConfig;
12
- //#endregion
13
- //#region src/parser/service/staticwebsite/schema.d.ts
14
- declare const StaticWebsiteSchema: z.core.$ZodBranded<z.ZodObject<{
15
- name: z.ZodString;
16
- description: z.ZodOptional<z.ZodString>;
17
- allowedIpAddresses: z.ZodOptional<z.ZodArray<z.ZodString>>;
18
- }, z.core.$strip>, "StaticWebsiteConfig", "out">;
19
- //#endregion
20
- //#region src/parser/service/staticwebsite/types.d.ts
21
- type StaticWebsiteInput = z.input<typeof StaticWebsiteSchema>;
22
- //#endregion
23
- //#region src/configure/services/staticwebsite/index.d.ts
24
- declare const staticWebsiteDefinitionBrand: unique symbol;
25
- type StaticWebsiteDefinitionBrand = {
26
- readonly [staticWebsiteDefinitionBrand]: true;
27
- };
28
- /**
29
- * Define a static website configuration for the Tailor SDK.
30
- * @param name - Static website name
31
- * @param config - Static website configuration
32
- * @returns Defined static website
33
- */
34
- declare function defineStaticWebSite(name: string, config: Omit<StaticWebsiteInput, "name">): {
35
- readonly name: string;
36
- readonly url: `${string}:url`;
37
- readonly description?: string | undefined;
38
- readonly allowedIpAddresses?: string[] | undefined;
39
- } & StaticWebsiteDefinitionBrand;
40
- type StaticWebsiteConfig = Omit<ReturnType<typeof defineStaticWebSite>, "url">;
41
- //#endregion
42
- //#region src/parser/service/idp/schema.d.ts
43
- declare const IdPSchema: z.core.$ZodBranded<z.ZodObject<{
44
- name: z.ZodString;
45
- authorization: z.ZodUnion<readonly [z.ZodLiteral<"insecure">, z.ZodLiteral<"loggedIn">, z.ZodObject<{
46
- cel: z.ZodString;
47
- }, z.core.$strip>]>;
48
- clients: z.ZodArray<z.ZodString>;
49
- lang: z.ZodOptional<z.ZodEnum<{
50
- en: "en";
51
- ja: "ja";
52
- }>>;
53
- userAuthPolicy: z.ZodOptional<z.ZodPipe<z.ZodObject<{
54
- useNonEmailIdentifier: z.ZodOptional<z.ZodBoolean>;
55
- allowSelfPasswordReset: z.ZodOptional<z.ZodBoolean>;
56
- passwordRequireUppercase: z.ZodOptional<z.ZodBoolean>;
57
- passwordRequireLowercase: z.ZodOptional<z.ZodBoolean>;
58
- passwordRequireNonAlphanumeric: z.ZodOptional<z.ZodBoolean>;
59
- passwordRequireNumeric: z.ZodOptional<z.ZodBoolean>;
60
- passwordMinLength: z.ZodOptional<z.ZodNumber>;
61
- passwordMaxLength: z.ZodOptional<z.ZodNumber>;
62
- allowedEmailDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
63
- allowGoogleOauth: z.ZodOptional<z.ZodBoolean>;
64
- allowMicrosoftOauth: z.ZodOptional<z.ZodBoolean>;
65
- disablePasswordAuth: z.ZodOptional<z.ZodBoolean>;
66
- }, z.core.$strip>, z.ZodTransform<{
67
- useNonEmailIdentifier?: boolean | undefined;
68
- allowSelfPasswordReset?: boolean | undefined;
69
- passwordRequireUppercase?: boolean | undefined;
70
- passwordRequireLowercase?: boolean | undefined;
71
- passwordRequireNonAlphanumeric?: boolean | undefined;
72
- passwordRequireNumeric?: boolean | undefined;
73
- passwordMinLength?: number | undefined;
74
- passwordMaxLength?: number | undefined;
75
- allowedEmailDomains?: string[] | undefined;
76
- allowGoogleOauth?: boolean | undefined;
77
- allowMicrosoftOauth?: boolean | undefined;
78
- disablePasswordAuth?: boolean | undefined;
79
- }, {
80
- useNonEmailIdentifier?: boolean | undefined;
81
- allowSelfPasswordReset?: boolean | undefined;
82
- passwordRequireUppercase?: boolean | undefined;
83
- passwordRequireLowercase?: boolean | undefined;
84
- passwordRequireNonAlphanumeric?: boolean | undefined;
85
- passwordRequireNumeric?: boolean | undefined;
86
- passwordMinLength?: number | undefined;
87
- passwordMaxLength?: number | undefined;
88
- allowedEmailDomains?: string[] | undefined;
89
- allowGoogleOauth?: boolean | undefined;
90
- allowMicrosoftOauth?: boolean | undefined;
91
- disablePasswordAuth?: boolean | undefined;
92
- }>>>;
93
- publishUserEvents: z.ZodOptional<z.ZodBoolean>;
94
- gqlOperations: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"query">, z.ZodObject<{
95
- create: z.ZodOptional<z.ZodBoolean>;
96
- update: z.ZodOptional<z.ZodBoolean>;
97
- delete: z.ZodOptional<z.ZodBoolean>;
98
- read: z.ZodOptional<z.ZodBoolean>;
99
- sendPasswordResetEmail: z.ZodOptional<z.ZodBoolean>;
100
- }, z.core.$strip>]>, z.ZodTransform<IdPGqlOperations, "query" | {
101
- create?: boolean | undefined;
102
- update?: boolean | undefined;
103
- delete?: boolean | undefined;
104
- read?: boolean | undefined;
105
- sendPasswordResetEmail?: boolean | undefined;
106
- }>>>;
107
- }, z.core.$strip>, "IdPConfig", "out">;
108
- //#endregion
109
- //#region src/configure/services/idp/index.d.ts
110
- /**
111
- * Configuration for GraphQL operations on IdP users.
112
- * All operations are enabled by default (undefined or true = enabled, false = disabled).
113
- */
114
- interface IdPGqlOperations {
115
- /** Enable _createUser mutation (default: true) */
116
- create?: boolean;
117
- /** Enable _updateUser mutation (default: true) */
118
- update?: boolean;
119
- /** Enable _deleteUser mutation (default: true) */
120
- delete?: boolean;
121
- /** Enable _users and _user queries (default: true) */
122
- read?: boolean;
123
- /** Enable _sendPasswordResetEmail mutation (default: true) */
124
- sendPasswordResetEmail?: boolean;
125
- }
126
- /**
127
- * Alias for common IdPGqlOperations configurations.
128
- * - "query": Read-only mode - disables all mutations (create, update, delete, sendPasswordResetEmail)
129
- */
130
- type IdPGqlOperationsAliasQuery = "query";
131
- /**
132
- * Configuration for GraphQL operations - either an alias string or detailed object.
133
- */
134
- type IdPGqlOperationsConfig = IdPGqlOperationsAliasQuery | IdPGqlOperations;
135
- /**
136
- * Define an IdP service configuration for the Tailor SDK.
137
- * @template TClients
138
- * @param name - IdP service name
139
- * @param config - IdP configuration
140
- * @returns Defined IdP service
141
- */
142
- declare function defineIdp<const TClients extends string[]>(name: string, config: Omit<IdPInput, "name" | "clients"> & {
143
- clients: TClients;
144
- }): {
145
- readonly name: string;
146
- readonly provider: (providerName: string, clientName: TClients[number]) => {
147
- readonly name: string;
148
- readonly kind: "BuiltInIdP";
149
- readonly namespace: string;
150
- readonly clientName: TClients[number];
151
- };
152
- readonly authorization: "insecure" | "loggedIn" | {
153
- cel: string;
154
- };
155
- readonly lang?: "en" | "ja" | undefined;
156
- readonly userAuthPolicy?: {
157
- useNonEmailIdentifier?: boolean | undefined;
158
- allowSelfPasswordReset?: boolean | undefined;
159
- passwordRequireUppercase?: boolean | undefined;
160
- passwordRequireLowercase?: boolean | undefined;
161
- passwordRequireNonAlphanumeric?: boolean | undefined;
162
- passwordRequireNumeric?: boolean | undefined;
163
- passwordMinLength?: number | undefined;
164
- passwordMaxLength?: number | undefined;
165
- allowedEmailDomains?: string[] | undefined;
166
- allowGoogleOauth?: boolean | undefined;
167
- allowMicrosoftOauth?: boolean | undefined;
168
- disablePasswordAuth?: boolean | undefined;
169
- } | undefined;
170
- readonly publishUserEvents?: boolean | undefined;
171
- readonly gqlOperations?: "query" | {
172
- create?: boolean | undefined;
173
- update?: boolean | undefined;
174
- delete?: boolean | undefined;
175
- read?: boolean | undefined;
176
- sendPasswordResetEmail?: boolean | undefined;
177
- } | undefined;
178
- readonly clients: TClients;
179
- } & IdpDefinitionBrand;
180
- //#endregion
181
- //#region src/parser/service/idp/types.d.ts
182
- type IdPInput = z.input<typeof IdPSchema>;
183
- declare const idpDefinitionBrand: unique symbol;
184
- type IdpDefinitionBrand = {
185
- readonly [idpDefinitionBrand]: true;
186
- };
187
- type DefinedIdp<Name extends string, Config, ClientNames extends string> = Config & {
188
- name: Name;
189
- provider(providerName: string, clientName: ClientNames): BuiltinIdP;
190
- } & IdpDefinitionBrand;
191
- type IdPExternalConfig = {
192
- name: string;
193
- external: true;
194
- };
195
- type IdPOwnConfig = Omit<DefinedIdp<string, IdPInput, string>, "provider">;
196
- type IdPConfig = IdPOwnConfig | IdPExternalConfig;
197
- //#endregion
198
- //#region src/parser/app-config/types.d.ts
199
- /**
200
- * Application configuration for `defineConfig()`.
201
- *
202
- * Key fields:
203
- * - `name` (required): Application name
204
- * - `cors`: Array of allowed origins, e.g. `["https://example.com"]`
205
- * - `auth`: Single auth config object (not an array)
206
- * - `idp`: Array of IdP configs, e.g. `[myIdp]`
207
- * - `staticWebsites`: Array of static website configs, e.g. `[website]`
208
- * - `db`, `resolver`, `executor`, `workflow`: Service configs with file globs
209
- */
210
- 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>> {
211
- /** Application name (required). */
212
- name: string;
213
- /** Environment variables accessible via `context.env` in resolvers and via the second argument `{ env }` in workflow job bodies. */
214
- env?: Env;
215
- /** Allowed CORS origins. Must be an array of strings, e.g. `["https://example.com"]`. */
216
- cors?: string[];
217
- /** IP addresses allowed to access the application. */
218
- allowedIpAddresses?: string[];
219
- /** Disable GraphQL introspection in production. */
220
- disableIntrospection?: boolean;
221
- /** TailorDB service configuration with type definition files. */
222
- db?: TailorDBServiceInput;
223
- /** Resolver service configuration with resolver files. */
224
- resolver?: ResolverServiceInput;
225
- /** Identity Provider configurations. Must be an array, e.g. `[myIdp]`. */
226
- idp?: Idp;
227
- /** Auth configuration (single object, not an array). */
228
- auth?: Auth;
229
- /** Executor service configuration with executor files. */
230
- executor?: ExecutorServiceInput;
231
- /** Workflow service configuration with workflow files. */
232
- workflow?: WorkflowServiceInput;
233
- /** Static website configurations. Must be an array, e.g. `[website]`. */
234
- staticWebsites?: StaticWebsites;
235
- /**
236
- * Enable inline sourcemaps in bundled functions for better error stack traces.
237
- * When enabled, sourcemaps are embedded directly in the bundle file.
238
- * Set to `false` to disable (e.g. if bundle size exceeds limits).
239
- * @default true
240
- */
241
- inlineSourcemap?: boolean;
242
- }
243
- //#endregion
244
- export { IdPGqlOperationsAliasQuery as a, StaticWebsiteConfig as c, WorkflowServiceInput as d, IdPGqlOperations as i, defineStaticWebSite as l, IdPConfig as n, IdPGqlOperationsConfig as o, IdPExternalConfig as r, defineIdp as s, AppConfig as t, WorkflowServiceConfig as u };
245
- //# sourceMappingURL=types-IR-hw0-y.d.mts.map