@tailor-platform/sdk 1.22.0 → 1.24.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 +74 -0
- package/dist/app-config-BNKHurwr.d.mts +174 -0
- package/dist/{application-CTQe2HSB.mjs → application-DThE2HW7.mjs} +200 -215
- package/dist/application-DThE2HW7.mjs.map +1 -0
- package/dist/application-P1by1htu.mjs +8 -0
- package/dist/{brand-DyPrAzpM.mjs → brand-64NrPh_e.mjs} +1 -1
- package/dist/{brand-DyPrAzpM.mjs.map → brand-64NrPh_e.mjs.map} +1 -1
- package/dist/cli/index.d.mts +0 -1
- package/dist/cli/index.mjs +7 -7
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +8 -9
- package/dist/cli/lib.mjs +7 -7
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/skills.d.mts +0 -1
- package/dist/configure/index.d.mts +5 -5
- package/dist/configure/index.mjs +3 -3
- package/dist/configure/index.mjs.map +1 -1
- package/dist/enum-constants-B5Nl-yzx.mjs.map +1 -1
- package/dist/env-CHwmMyfF.d.mts +32 -0
- package/dist/file-utils-sEOwAdJ4.mjs.map +1 -1
- package/dist/{index-Cwi86SUR.d.mts → index-BrIZ1rm2.d.mts} +2 -3
- package/dist/{index-BiutQT7m.d.mts → index-Df0aH5zp.d.mts} +55 -5
- package/dist/{index-DPN_P0w3.d.mts → index-DhtKJmgi.d.mts} +2 -3
- package/dist/{index-ClS0NClx.d.mts → index-DkRJwNw2.d.mts} +2 -3
- package/dist/{index-BGPX26_D.d.mts → index-zZUL7_2B.d.mts} +2 -3
- package/dist/{interceptor-DiARwPfw.mjs → interceptor-B-0OmiDZ.mjs} +1 -1
- package/dist/{interceptor-DiARwPfw.mjs.map → interceptor-B-0OmiDZ.mjs.map} +1 -1
- package/dist/{job-CRavYLLk.mjs → job-CnqcfVTI.mjs} +2 -2
- package/dist/{job-CRavYLLk.mjs.map → job-CnqcfVTI.mjs.map} +1 -1
- package/dist/kysely/index.d.mts +0 -1
- package/dist/kysely-type-CSlcwNFH.mjs.map +1 -1
- package/dist/{package-json-iVBhE5Ef.mjs → package-json-4G3gLWMd.mjs} +1 -1
- package/dist/{package-json-iVBhE5Ef.mjs.map → package-json-4G3gLWMd.mjs.map} +1 -1
- package/dist/package-json-BqvUKPBM.mjs +3 -0
- package/dist/plugin/builtin/enum-constants/index.d.mts +2 -3
- package/dist/plugin/builtin/file-utils/index.d.mts +2 -3
- package/dist/plugin/builtin/kysely-type/index.d.mts +2 -3
- package/dist/plugin/builtin/seed/index.d.mts +2 -3
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/index.d.mts +2 -2
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/{types-bcuNRo1Y.d.mts → plugin-CE-BZZgX.d.mts} +1069 -1763
- package/dist/{query-Bz2oDGhw.mjs → query-CV5n7DRd.mjs} +496 -115
- package/dist/query-CV5n7DRd.mjs.map +1 -0
- package/dist/{schema-Cjm-OvPF.mjs → schema-0ByCZ2Ym.mjs} +2 -2
- package/dist/schema-0ByCZ2Ym.mjs.map +1 -0
- package/dist/{seed-CXvCW3Xc.mjs → seed-Cl5QXYsL.mjs} +13 -3
- package/dist/seed-Cl5QXYsL.mjs.map +1 -0
- package/dist/{telemetry-C46fds1l.mjs → telemetry-BPviAbME.mjs} +2 -2
- package/dist/{telemetry-C46fds1l.mjs.map → telemetry-BPviAbME.mjs.map} +1 -1
- package/dist/telemetry-Dq5FZUH0.mjs +3 -0
- package/dist/utils/test/index.d.mts +3 -4
- package/dist/utils/test/index.mjs +2 -2
- package/docs/cli/tailordb.md +1 -1
- package/docs/cli-reference.md +8 -8
- package/docs/services/auth.md +2 -2
- package/package.json +27 -25
- package/postinstall.mjs +4 -14
- package/dist/application-CTQe2HSB.mjs.map +0 -1
- package/dist/application-DdSu3baZ.mjs +0 -8
- package/dist/package-json-BI0ng3_5.mjs +0 -3
- package/dist/query-Bz2oDGhw.mjs.map +0 -1
- package/dist/schema-Cjm-OvPF.mjs.map +0 -1
- package/dist/seed-CXvCW3Xc.mjs.map +0 -1
- package/dist/telemetry-BAxP8-PR.mjs +0 -3
- package/dist/types-CBTSg-LK.mjs +0 -13
- package/dist/types-CBTSg-LK.mjs.map +0 -1
- package/dist/types-DVMQNdTs.d.mts +0 -246
- package/dist/user-defined.d.ts +0 -13
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
1
|
+
import { n as isSdkBranded } from "./brand-64NrPh_e.mjs";
|
|
2
|
+
import { t as readPackageJson } from "./package-json-4G3gLWMd.mjs";
|
|
3
|
+
import { n as seedPlugin, r as isPluginGeneratedType, t as SeedGeneratorID } from "./seed-Cl5QXYsL.mjs";
|
|
4
4
|
import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "./enum-constants-B5Nl-yzx.mjs";
|
|
5
5
|
import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "./file-utils-sEOwAdJ4.mjs";
|
|
6
6
|
import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "./kysely-type-CSlcwNFH.mjs";
|
|
7
|
-
import { n as seedPlugin, t as SeedGeneratorID } from "./seed-CXvCW3Xc.mjs";
|
|
8
7
|
import { createRequire } from "node:module";
|
|
9
8
|
import { z } from "zod";
|
|
10
9
|
import * as fs$1 from "node:fs";
|
|
@@ -914,7 +913,7 @@ function initOAuth2Client() {
|
|
|
914
913
|
* @returns Configured Operator client
|
|
915
914
|
*/
|
|
916
915
|
async function initOperatorClient(accessToken) {
|
|
917
|
-
const { createTracingInterceptor } = await import("./interceptor-
|
|
916
|
+
const { createTracingInterceptor } = await import("./interceptor-B-0OmiDZ.mjs");
|
|
918
917
|
return createClient(OperatorService, createConnectTransport({
|
|
919
918
|
httpVersion: "2",
|
|
920
919
|
baseUrl: platformBaseUrl,
|
|
@@ -1573,11 +1572,11 @@ function resolveRelativePluginImportPath(pluginImportPath, baseDirs) {
|
|
|
1573
1572
|
}
|
|
1574
1573
|
|
|
1575
1574
|
//#endregion
|
|
1576
|
-
//#region src/
|
|
1575
|
+
//#region src/types/plugin.ts
|
|
1577
1576
|
/**
|
|
1578
|
-
*
|
|
1579
|
-
* @param executor -
|
|
1580
|
-
* @returns True if executor uses
|
|
1577
|
+
* Checks if a plugin executor uses file-based resolution.
|
|
1578
|
+
* @param executor - The plugin executor to check.
|
|
1579
|
+
* @returns True if the executor uses file-based resolution.
|
|
1581
1580
|
*/
|
|
1582
1581
|
function isPluginExecutorWithFile(executor) {
|
|
1583
1582
|
return "resolve" in executor && "context" in executor;
|
|
@@ -2591,11 +2590,11 @@ function validatePluralFormUniqueness(types, namespace, typeSourceInfo) {
|
|
|
2591
2590
|
const functionSchema = z.custom((val) => typeof val === "function");
|
|
2592
2591
|
|
|
2593
2592
|
//#endregion
|
|
2594
|
-
//#region src/parser/service/tailordb/
|
|
2593
|
+
//#region src/parser/service/tailordb/schema.ts
|
|
2595
2594
|
/**
|
|
2596
2595
|
* Normalize GqlOperationsConfig (alias or object) to GqlOperations object.
|
|
2597
2596
|
* "query" alias expands to read-only mode: { create: false, update: false, delete: false, read: true }
|
|
2598
|
-
* @param config - The
|
|
2597
|
+
* @param config - The config to normalize
|
|
2599
2598
|
* @returns The normalized GqlOperations object
|
|
2600
2599
|
*/
|
|
2601
2600
|
function normalizeGqlOperations(config) {
|
|
@@ -2612,14 +2611,11 @@ function normalizeGqlOperations(config) {
|
|
|
2612
2611
|
* Accepts "query" alias or detailed object, normalizes to GqlOperations object.
|
|
2613
2612
|
*/
|
|
2614
2613
|
const GqlOperationsSchema = z.union([z.literal("query"), z.object({
|
|
2615
|
-
create: z.boolean().optional(),
|
|
2616
|
-
update: z.boolean().optional(),
|
|
2617
|
-
delete: z.boolean().optional(),
|
|
2618
|
-
read: z.boolean().optional()
|
|
2619
|
-
})]).transform((val) => normalizeGqlOperations(val));
|
|
2620
|
-
|
|
2621
|
-
//#endregion
|
|
2622
|
-
//#region src/parser/service/tailordb/schema.ts
|
|
2614
|
+
create: z.boolean().optional().describe("Enable create mutation (default: true)"),
|
|
2615
|
+
update: z.boolean().optional().describe("Enable update mutation (default: true)"),
|
|
2616
|
+
delete: z.boolean().optional().describe("Enable delete mutation (default: true)"),
|
|
2617
|
+
read: z.boolean().optional().describe("Enable read queries - get, list, aggregation (default: true)")
|
|
2618
|
+
})]).describe("Configuration for GraphQL operations on a TailorDB type.\nAll operations are enabled by default (undefined or true = enabled, false = disabled).").transform((val) => normalizeGqlOperations(val));
|
|
2623
2619
|
const TailorFieldTypeSchema$1 = z.enum([
|
|
2624
2620
|
"uuid",
|
|
2625
2621
|
"string",
|
|
@@ -2638,38 +2634,38 @@ const AllowedValueSchema$1 = z.object({
|
|
|
2638
2634
|
description: z.string().optional()
|
|
2639
2635
|
});
|
|
2640
2636
|
const DBFieldMetadataSchema = z.object({
|
|
2641
|
-
required: z.boolean().optional(),
|
|
2642
|
-
array: z.boolean().optional(),
|
|
2643
|
-
description: z.string().optional(),
|
|
2644
|
-
typeName: z.string().optional(),
|
|
2645
|
-
allowedValues: z.array(AllowedValueSchema$1).optional(),
|
|
2646
|
-
index: z.boolean().optional(),
|
|
2647
|
-
unique: z.boolean().optional(),
|
|
2648
|
-
vector: z.boolean().optional(),
|
|
2649
|
-
foreignKey: z.boolean().optional(),
|
|
2650
|
-
foreignKeyType: z.string().optional(),
|
|
2651
|
-
foreignKeyField: z.string().optional(),
|
|
2637
|
+
required: z.boolean().optional().describe("Whether the field is required"),
|
|
2638
|
+
array: z.boolean().optional().describe("Whether the field is an array"),
|
|
2639
|
+
description: z.string().optional().describe("Field description"),
|
|
2640
|
+
typeName: z.string().optional().describe("Type name for nested or enum fields"),
|
|
2641
|
+
allowedValues: z.array(AllowedValueSchema$1).optional().describe("Allowed values for enum fields"),
|
|
2642
|
+
index: z.boolean().optional().describe("Whether the field is indexed for faster queries"),
|
|
2643
|
+
unique: z.boolean().optional().describe("Whether the field value must be unique"),
|
|
2644
|
+
vector: z.boolean().optional().describe("Whether the field is a vector field for similarity search"),
|
|
2645
|
+
foreignKey: z.boolean().optional().describe("Whether the field is a foreign key"),
|
|
2646
|
+
foreignKeyType: z.string().optional().describe("Target type name for foreign key relations"),
|
|
2647
|
+
foreignKeyField: z.string().optional().describe("Target field name for foreign key relations"),
|
|
2652
2648
|
hooks: z.object({
|
|
2653
|
-
create: functionSchema.optional(),
|
|
2654
|
-
update: functionSchema.optional()
|
|
2655
|
-
}).optional(),
|
|
2656
|
-
validate: z.array(z.union([functionSchema, z.tuple([functionSchema, z.string()])])).optional(),
|
|
2649
|
+
create: functionSchema.optional().describe("Hook function called on record creation"),
|
|
2650
|
+
update: functionSchema.optional().describe("Hook function called on record update")
|
|
2651
|
+
}).optional().describe("Lifecycle hooks for the field"),
|
|
2652
|
+
validate: z.array(z.union([functionSchema, z.tuple([functionSchema, z.string()])])).optional().describe("Validation functions for the field"),
|
|
2657
2653
|
serial: z.object({
|
|
2658
|
-
start: z.number(),
|
|
2659
|
-
maxValue: z.number().optional(),
|
|
2660
|
-
format: z.string().optional()
|
|
2661
|
-
}).optional(),
|
|
2662
|
-
scale: z.number().int().min(0).max(12).optional()
|
|
2654
|
+
start: z.number().describe("Starting value for the serial sequence"),
|
|
2655
|
+
maxValue: z.number().optional().describe("Maximum value for the serial sequence"),
|
|
2656
|
+
format: z.string().optional().describe("Format string for serial value (string type only)")
|
|
2657
|
+
}).optional().describe("Serial (auto-increment) configuration"),
|
|
2658
|
+
scale: z.number().int().min(0).max(12).optional().describe("Decimal scale (number of digits after decimal point, 0-12)")
|
|
2663
2659
|
});
|
|
2664
2660
|
const RelationTypeSchema = z.enum(relationTypesKeys);
|
|
2665
2661
|
const RawRelationConfigSchema = z.object({
|
|
2666
|
-
type: RelationTypeSchema,
|
|
2662
|
+
type: RelationTypeSchema.describe("Relation cardinality type"),
|
|
2667
2663
|
toward: z.object({
|
|
2668
|
-
type: z.string(),
|
|
2669
|
-
as: z.string().optional(),
|
|
2670
|
-
key: z.string().optional()
|
|
2664
|
+
type: z.string().describe("Target type name, or 'self' for self-relations"),
|
|
2665
|
+
as: z.string().optional().describe("Custom forward relation name"),
|
|
2666
|
+
key: z.string().optional().describe("Target field to join on (default: 'id')")
|
|
2671
2667
|
}),
|
|
2672
|
-
backward: z.string().optional()
|
|
2668
|
+
backward: z.string().optional().describe("Backward relation name on the target type")
|
|
2673
2669
|
});
|
|
2674
2670
|
const TailorDBFieldSchema = z.lazy(() => z.object({
|
|
2675
2671
|
type: TailorFieldTypeSchema$1,
|
|
@@ -2682,11 +2678,11 @@ const TailorDBFieldSchema = z.lazy(() => z.object({
|
|
|
2682
2678
|
* Normalizes gqlOperations from alias ("query") to object format.
|
|
2683
2679
|
*/
|
|
2684
2680
|
const TailorDBTypeSettingsSchema = z.object({
|
|
2685
|
-
pluralForm: z.string().optional(),
|
|
2686
|
-
aggregation: z.boolean().optional(),
|
|
2687
|
-
bulkUpsert: z.boolean().optional(),
|
|
2688
|
-
gqlOperations: GqlOperationsSchema.optional(),
|
|
2689
|
-
publishEvents: z.boolean().optional()
|
|
2681
|
+
pluralForm: z.string().optional().describe("Custom plural form of the type name for GraphQL"),
|
|
2682
|
+
aggregation: z.boolean().optional().describe("Enable aggregation queries for this type"),
|
|
2683
|
+
bulkUpsert: z.boolean().optional().describe("Enable bulk upsert mutation for this type"),
|
|
2684
|
+
gqlOperations: GqlOperationsSchema.optional().describe("Configure GraphQL operations for this type. Use \"query\" for read-only mode, or an object for granular control."),
|
|
2685
|
+
publishEvents: z.boolean().optional().describe("Enable publishing events for this type.\nWhen enabled, record creation/update/deletion events are published.\nIf not specified, this is automatically set to true when an executor uses this type\nwith recordCreated/recordUpdated/recordDeleted triggers. If explicitly set to false\nwhile an executor uses this type, an error will be thrown during apply.")
|
|
2690
2686
|
});
|
|
2691
2687
|
const GQL_PERMISSION_INVALID_OPERAND_MESSAGE = "operand is not supported in gqlPermission. Use permission() for record-level conditions.";
|
|
2692
2688
|
const GqlPermissionOperandSchema = z.union([
|
|
@@ -2788,19 +2784,19 @@ const TailorDBTypeSchema = z.object({
|
|
|
2788
2784
|
})
|
|
2789
2785
|
});
|
|
2790
2786
|
const TailorDBMigrationConfigSchema = z.object({
|
|
2791
|
-
directory: z.string(),
|
|
2792
|
-
machineUser: z.string().optional()
|
|
2787
|
+
directory: z.string().describe("Directory containing migration files"),
|
|
2788
|
+
machineUser: z.string().optional().describe("Machine user name for migration execution")
|
|
2793
2789
|
});
|
|
2794
2790
|
/**
|
|
2795
2791
|
* Schema for TailorDB service configuration.
|
|
2796
2792
|
* Normalizes gqlOperations from alias ("query") to object format.
|
|
2797
2793
|
*/
|
|
2798
2794
|
const TailorDBServiceConfigSchema = z.object({
|
|
2799
|
-
files: z.array(z.string()),
|
|
2800
|
-
ignores: z.array(z.string()).optional(),
|
|
2801
|
-
erdSite: z.string().optional(),
|
|
2802
|
-
migration: TailorDBMigrationConfigSchema.optional(),
|
|
2803
|
-
gqlOperations: GqlOperationsSchema.optional()
|
|
2795
|
+
files: z.array(z.string()).describe("Glob patterns for TailorDB type definition files"),
|
|
2796
|
+
ignores: z.array(z.string()).optional().describe("Glob patterns to exclude from type discovery"),
|
|
2797
|
+
erdSite: z.string().optional().describe("URL for the ERD (Entity Relationship Diagram) site"),
|
|
2798
|
+
migration: TailorDBMigrationConfigSchema.optional().describe("Migration configuration"),
|
|
2799
|
+
gqlOperations: GqlOperationsSchema.optional().describe("Default GraphQL operations for all types in this service")
|
|
2804
2800
|
});
|
|
2805
2801
|
|
|
2806
2802
|
//#endregion
|
|
@@ -3351,80 +3347,80 @@ const TailorFieldTypeSchema = z.enum([
|
|
|
3351
3347
|
"time",
|
|
3352
3348
|
"nested"
|
|
3353
3349
|
]);
|
|
3354
|
-
const QueryTypeSchema = z.union([z.literal("query"), z.literal("mutation")]);
|
|
3350
|
+
const QueryTypeSchema = z.union([z.literal("query"), z.literal("mutation")]).describe("GraphQL operation type");
|
|
3355
3351
|
const AllowedValueSchema = z.object({
|
|
3356
|
-
value: z.string(),
|
|
3357
|
-
description: z.string().optional()
|
|
3352
|
+
value: z.string().describe("The allowed value"),
|
|
3353
|
+
description: z.string().optional().describe("Description of the allowed value")
|
|
3358
3354
|
});
|
|
3359
3355
|
const FieldMetadataSchema = z.object({
|
|
3360
|
-
required: z.boolean().optional(),
|
|
3361
|
-
array: z.boolean().optional(),
|
|
3362
|
-
description: z.string().optional(),
|
|
3363
|
-
allowedValues: z.array(AllowedValueSchema).optional(),
|
|
3356
|
+
required: z.boolean().optional().describe("Whether the field is required"),
|
|
3357
|
+
array: z.boolean().optional().describe("Whether the field is an array"),
|
|
3358
|
+
description: z.string().optional().describe("Field description"),
|
|
3359
|
+
allowedValues: z.array(AllowedValueSchema).optional().describe("Allowed values for enum fields"),
|
|
3364
3360
|
hooks: z.object({
|
|
3365
|
-
create: functionSchema.optional(),
|
|
3366
|
-
update: functionSchema.optional()
|
|
3367
|
-
}).optional(),
|
|
3368
|
-
typeName: z.string().optional()
|
|
3361
|
+
create: functionSchema.optional().describe("Hook function called on creation"),
|
|
3362
|
+
update: functionSchema.optional().describe("Hook function called on update")
|
|
3363
|
+
}).optional().describe("Lifecycle hooks"),
|
|
3364
|
+
typeName: z.string().optional().describe("Type name for nested or enum fields")
|
|
3369
3365
|
});
|
|
3370
3366
|
const TailorFieldSchema = z.object({
|
|
3371
|
-
type: TailorFieldTypeSchema,
|
|
3372
|
-
metadata: FieldMetadataSchema,
|
|
3367
|
+
type: TailorFieldTypeSchema.describe("Field data type"),
|
|
3368
|
+
metadata: FieldMetadataSchema.describe("Field metadata configuration"),
|
|
3373
3369
|
get fields() {
|
|
3374
3370
|
return z.record(z.string(), TailorFieldSchema);
|
|
3375
3371
|
}
|
|
3376
3372
|
});
|
|
3377
3373
|
const ResolverSchema = z.object({
|
|
3378
|
-
operation: QueryTypeSchema,
|
|
3379
|
-
name: z.string(),
|
|
3380
|
-
description: z.string().optional(),
|
|
3381
|
-
input: z.record(z.string(), TailorFieldSchema).optional(),
|
|
3382
|
-
body: functionSchema,
|
|
3383
|
-
output: TailorFieldSchema,
|
|
3384
|
-
publishEvents: z.boolean().optional()
|
|
3374
|
+
operation: QueryTypeSchema.describe("GraphQL operation type (query or mutation)"),
|
|
3375
|
+
name: z.string().describe("Resolver name"),
|
|
3376
|
+
description: z.string().optional().describe("Resolver description"),
|
|
3377
|
+
input: z.record(z.string(), TailorFieldSchema).optional().describe("Input field definitions"),
|
|
3378
|
+
body: functionSchema.describe("Resolver implementation function"),
|
|
3379
|
+
output: TailorFieldSchema.describe("Output field definition"),
|
|
3380
|
+
publishEvents: z.boolean().optional().describe("Enable publishing events from this resolver")
|
|
3385
3381
|
});
|
|
3386
3382
|
|
|
3387
3383
|
//#endregion
|
|
3388
3384
|
//#region src/parser/service/auth/schema.ts
|
|
3389
3385
|
const AuthInvokerSchema = z.object({
|
|
3390
|
-
namespace: z.string(),
|
|
3391
|
-
machineUserName: z.string()
|
|
3386
|
+
namespace: z.string().describe("Auth namespace"),
|
|
3387
|
+
machineUserName: z.string().describe("Machine user name for authentication")
|
|
3392
3388
|
});
|
|
3393
3389
|
const secretValueSchema = z.object({
|
|
3394
|
-
vaultName: z.string(),
|
|
3395
|
-
secretKey: z.string()
|
|
3390
|
+
vaultName: z.string().describe("Vault name containing the secret"),
|
|
3391
|
+
secretKey: z.string().describe("Key of the secret in the vault")
|
|
3396
3392
|
});
|
|
3397
3393
|
const OIDCSchema = z.object({
|
|
3398
|
-
name: z.string(),
|
|
3394
|
+
name: z.string().describe("Identity provider name"),
|
|
3399
3395
|
kind: z.literal("OIDC"),
|
|
3400
|
-
clientID: z.string(),
|
|
3401
|
-
clientSecret: secretValueSchema,
|
|
3402
|
-
providerURL: z.string(),
|
|
3403
|
-
issuerURL: z.string().optional(),
|
|
3404
|
-
usernameClaim: z.string().optional()
|
|
3396
|
+
clientID: z.string().describe("OAuth2 client ID"),
|
|
3397
|
+
clientSecret: secretValueSchema.describe("OAuth2 client secret"),
|
|
3398
|
+
providerURL: z.string().describe("OIDC provider URL"),
|
|
3399
|
+
issuerURL: z.string().optional().describe("OIDC issuer URL (defaults to providerURL)"),
|
|
3400
|
+
usernameClaim: z.string().optional().describe("JWT claim to use as username")
|
|
3405
3401
|
});
|
|
3406
3402
|
const SAMLSchema = z.object({
|
|
3407
|
-
name: z.string(),
|
|
3403
|
+
name: z.string().describe("Identity provider name"),
|
|
3408
3404
|
kind: z.literal("SAML"),
|
|
3409
|
-
enableSignRequest: z.boolean().default(false),
|
|
3410
|
-
metadataURL: z.string().optional(),
|
|
3411
|
-
rawMetadata: z.string().optional()
|
|
3405
|
+
enableSignRequest: z.boolean().default(false).describe("Enable signing of SAML requests"),
|
|
3406
|
+
metadataURL: z.string().optional().describe("URL to fetch SAML metadata (mutually exclusive with rawMetadata)"),
|
|
3407
|
+
rawMetadata: z.string().optional().describe("Raw SAML metadata XML (mutually exclusive with metadataURL)")
|
|
3412
3408
|
}).refine((value) => {
|
|
3413
3409
|
return value.metadataURL !== void 0 !== (value.rawMetadata !== void 0);
|
|
3414
3410
|
}, "Provide either metadataURL or rawMetadata");
|
|
3415
3411
|
const IDTokenSchema = z.object({
|
|
3416
|
-
name: z.string(),
|
|
3412
|
+
name: z.string().describe("Identity provider name"),
|
|
3417
3413
|
kind: z.literal("IDToken"),
|
|
3418
|
-
providerURL: z.string(),
|
|
3419
|
-
issuerURL: z.string().optional(),
|
|
3420
|
-
clientID: z.string(),
|
|
3421
|
-
usernameClaim: z.string().optional()
|
|
3414
|
+
providerURL: z.string().describe("ID token provider URL"),
|
|
3415
|
+
issuerURL: z.string().optional().describe("ID token issuer URL"),
|
|
3416
|
+
clientID: z.string().describe("Client ID for ID token validation"),
|
|
3417
|
+
usernameClaim: z.string().optional().describe("JWT claim to use as username")
|
|
3422
3418
|
});
|
|
3423
3419
|
const BuiltinIdPSchema = z.object({
|
|
3424
|
-
name: z.string(),
|
|
3420
|
+
name: z.string().describe("Identity provider name"),
|
|
3425
3421
|
kind: z.literal("BuiltInIdP"),
|
|
3426
|
-
namespace: z.string(),
|
|
3427
|
-
clientName: z.string()
|
|
3422
|
+
namespace: z.string().describe("IdP namespace"),
|
|
3423
|
+
clientName: z.string().describe("OAuth2 client name in the IdP")
|
|
3428
3424
|
});
|
|
3429
3425
|
const IdProviderSchema = z.discriminatedUnion("kind", [
|
|
3430
3426
|
OIDCSchema,
|
|
@@ -3432,10 +3428,10 @@ const IdProviderSchema = z.discriminatedUnion("kind", [
|
|
|
3432
3428
|
IDTokenSchema,
|
|
3433
3429
|
BuiltinIdPSchema
|
|
3434
3430
|
]);
|
|
3435
|
-
const OAuth2ClientGrantTypeSchema = z.union([z.literal("authorization_code"), z.literal("refresh_token")]);
|
|
3431
|
+
const OAuth2ClientGrantTypeSchema = z.union([z.literal("authorization_code"), z.literal("refresh_token")]).describe("OAuth2 grant type");
|
|
3436
3432
|
const OAuth2ClientSchema = z.object({
|
|
3437
|
-
description: z.string().optional(),
|
|
3438
|
-
grantTypes: z.array(OAuth2ClientGrantTypeSchema).default(["authorization_code", "refresh_token"]),
|
|
3433
|
+
description: z.string().optional().describe("Client description"),
|
|
3434
|
+
grantTypes: z.array(OAuth2ClientGrantTypeSchema).default(["authorization_code", "refresh_token"]).describe("Allowed OAuth2 grant types"),
|
|
3439
3435
|
redirectURIs: z.array(z.union([
|
|
3440
3436
|
z.templateLiteral(["https://", z.string()]),
|
|
3441
3437
|
z.templateLiteral(["http://", z.string()]),
|
|
@@ -3445,28 +3441,28 @@ const OAuth2ClientSchema = z.object({
|
|
|
3445
3441
|
":url/",
|
|
3446
3442
|
z.string()
|
|
3447
3443
|
])
|
|
3448
|
-
])),
|
|
3444
|
+
])).describe("Allowed redirect URIs"),
|
|
3449
3445
|
clientType: z.union([
|
|
3450
3446
|
z.literal("confidential"),
|
|
3451
3447
|
z.literal("public"),
|
|
3452
3448
|
z.literal("browser")
|
|
3453
|
-
]).optional(),
|
|
3454
|
-
accessTokenLifetimeSeconds: z.number().int().min(60, "Minimum access token lifetime is 60 seconds").max(86400, "Maximum access token lifetime is 1 day (86400 seconds)").optional().transform((val) => val ? {
|
|
3449
|
+
]).optional().describe("OAuth2 client type"),
|
|
3450
|
+
accessTokenLifetimeSeconds: z.number().int().min(60, "Minimum access token lifetime is 60 seconds").max(86400, "Maximum access token lifetime is 1 day (86400 seconds)").optional().describe("Access token lifetime in seconds (60-86400)").transform((val) => val ? {
|
|
3455
3451
|
seconds: BigInt(val),
|
|
3456
3452
|
nanos: 0
|
|
3457
3453
|
} : void 0),
|
|
3458
|
-
refreshTokenLifetimeSeconds: z.number().int().min(60, "Minimum refresh token lifetime is 60 seconds").max(604800, "Maximum refresh token lifetime is 7 days (604800 seconds)").optional().transform((val) => val ? {
|
|
3454
|
+
refreshTokenLifetimeSeconds: z.number().int().min(60, "Minimum refresh token lifetime is 60 seconds").max(604800, "Maximum refresh token lifetime is 7 days (604800 seconds)").optional().describe("Refresh token lifetime in seconds (60-604800)").transform((val) => val ? {
|
|
3459
3455
|
seconds: BigInt(val),
|
|
3460
3456
|
nanos: 0
|
|
3461
3457
|
} : void 0),
|
|
3462
|
-
requireDpop: z.boolean().optional()
|
|
3458
|
+
requireDpop: z.boolean().optional().describe("Require DPoP (Demonstrating Proof-of-Possession) for token requests")
|
|
3463
3459
|
}).refine((data) => !(data.clientType === "browser" && data.requireDpop === true), {
|
|
3464
3460
|
message: "requireDpop cannot be set to true for browser clients as they don't support DPoP",
|
|
3465
3461
|
path: ["requireDpop"]
|
|
3466
3462
|
});
|
|
3467
3463
|
const SCIMAuthorizationSchema = z.object({
|
|
3468
|
-
type: z.union([z.literal("oauth2"), z.literal("bearer")]),
|
|
3469
|
-
bearerSecret: secretValueSchema.optional()
|
|
3464
|
+
type: z.union([z.literal("oauth2"), z.literal("bearer")]).describe("SCIM authorization type"),
|
|
3465
|
+
bearerSecret: secretValueSchema.optional().describe("Bearer token secret (required for bearer type)")
|
|
3470
3466
|
});
|
|
3471
3467
|
const SCIMAttributeTypeSchema = z.union([
|
|
3472
3468
|
z.literal("string"),
|
|
@@ -3474,52 +3470,52 @@ const SCIMAttributeTypeSchema = z.union([
|
|
|
3474
3470
|
z.literal("boolean"),
|
|
3475
3471
|
z.literal("datetime"),
|
|
3476
3472
|
z.literal("complex")
|
|
3477
|
-
]);
|
|
3473
|
+
]).describe("SCIM attribute data type");
|
|
3478
3474
|
const SCIMAttributeSchema = z.object({
|
|
3479
|
-
type: SCIMAttributeTypeSchema,
|
|
3480
|
-
name: z.string(),
|
|
3481
|
-
description: z.string().optional(),
|
|
3475
|
+
type: SCIMAttributeTypeSchema.describe("Attribute data type"),
|
|
3476
|
+
name: z.string().describe("Attribute name"),
|
|
3477
|
+
description: z.string().optional().describe("Attribute description"),
|
|
3482
3478
|
mutability: z.union([
|
|
3483
3479
|
z.literal("readOnly"),
|
|
3484
3480
|
z.literal("readWrite"),
|
|
3485
3481
|
z.literal("writeOnly")
|
|
3486
|
-
]).optional(),
|
|
3487
|
-
required: z.boolean().optional(),
|
|
3488
|
-
multiValued: z.boolean().optional(),
|
|
3482
|
+
]).optional().describe("Attribute mutability"),
|
|
3483
|
+
required: z.boolean().optional().describe("Whether the attribute is required"),
|
|
3484
|
+
multiValued: z.boolean().optional().describe("Whether the attribute can have multiple values"),
|
|
3489
3485
|
uniqueness: z.union([
|
|
3490
3486
|
z.literal("none"),
|
|
3491
3487
|
z.literal("server"),
|
|
3492
3488
|
z.literal("global")
|
|
3493
|
-
]).optional(),
|
|
3494
|
-
canonicalValues: z.array(z.string()).nullable().optional(),
|
|
3489
|
+
]).optional().describe("Uniqueness constraint"),
|
|
3490
|
+
canonicalValues: z.array(z.string()).nullable().optional().describe("List of canonical values"),
|
|
3495
3491
|
get subAttributes() {
|
|
3496
3492
|
return z.array(SCIMAttributeSchema).nullable().optional();
|
|
3497
3493
|
}
|
|
3498
3494
|
});
|
|
3499
3495
|
const SCIMSchemaSchema = z.object({
|
|
3500
|
-
name: z.string(),
|
|
3501
|
-
attributes: z.array(SCIMAttributeSchema)
|
|
3496
|
+
name: z.string().describe("SCIM schema name"),
|
|
3497
|
+
attributes: z.array(SCIMAttributeSchema).describe("Schema attributes")
|
|
3502
3498
|
});
|
|
3503
3499
|
const SCIMAttributeMappingSchema = z.object({
|
|
3504
|
-
tailorDBField: z.string(),
|
|
3505
|
-
scimPath: z.string()
|
|
3500
|
+
tailorDBField: z.string().describe("TailorDB field name to map to"),
|
|
3501
|
+
scimPath: z.string().describe("SCIM attribute path")
|
|
3506
3502
|
});
|
|
3507
3503
|
const SCIMResourceSchema = z.object({
|
|
3508
|
-
name: z.string(),
|
|
3509
|
-
tailorDBNamespace: z.string(),
|
|
3510
|
-
tailorDBType: z.string(),
|
|
3511
|
-
coreSchema: SCIMSchemaSchema,
|
|
3512
|
-
attributeMapping: z.array(SCIMAttributeMappingSchema)
|
|
3504
|
+
name: z.string().describe("SCIM resource name"),
|
|
3505
|
+
tailorDBNamespace: z.string().describe("TailorDB namespace for the resource"),
|
|
3506
|
+
tailorDBType: z.string().describe("TailorDB type name for the resource"),
|
|
3507
|
+
coreSchema: SCIMSchemaSchema.describe("Core SCIM schema definition"),
|
|
3508
|
+
attributeMapping: z.array(SCIMAttributeMappingSchema).describe("Attribute mapping configuration")
|
|
3513
3509
|
});
|
|
3514
3510
|
const SCIMSchema = z.object({
|
|
3515
|
-
machineUserName: z.string(),
|
|
3516
|
-
authorization: SCIMAuthorizationSchema,
|
|
3517
|
-
resources: z.array(SCIMResourceSchema)
|
|
3511
|
+
machineUserName: z.string().describe("Machine user name for SCIM operations"),
|
|
3512
|
+
authorization: SCIMAuthorizationSchema.describe("SCIM authorization configuration"),
|
|
3513
|
+
resources: z.array(SCIMResourceSchema).describe("SCIM resource definitions")
|
|
3518
3514
|
});
|
|
3519
3515
|
const TenantProviderSchema = z.object({
|
|
3520
|
-
namespace: z.string(),
|
|
3521
|
-
type: z.string(),
|
|
3522
|
-
signatureField: z.string()
|
|
3516
|
+
namespace: z.string().describe("TailorDB namespace for the tenant type"),
|
|
3517
|
+
type: z.string().describe("TailorDB type name for tenants"),
|
|
3518
|
+
signatureField: z.string().describe("Field used as the tenant signature")
|
|
3523
3519
|
});
|
|
3524
3520
|
const UserProfileSchema = z.object({
|
|
3525
3521
|
type: z.object({
|
|
@@ -3550,13 +3546,13 @@ const MachineUserSchema = z.object({
|
|
|
3550
3546
|
attributeList: z.array(z.uuid()).optional()
|
|
3551
3547
|
});
|
|
3552
3548
|
const AuthConfigBaseSchema = z.object({
|
|
3553
|
-
name: z.string(),
|
|
3554
|
-
machineUsers: z.record(z.string(), MachineUserSchema).optional(),
|
|
3555
|
-
oauth2Clients: z.record(z.string(), OAuth2ClientSchema).optional(),
|
|
3556
|
-
idProvider: IdProviderSchema.optional(),
|
|
3557
|
-
scim: SCIMSchema.optional(),
|
|
3558
|
-
tenantProvider: TenantProviderSchema.optional(),
|
|
3559
|
-
publishSessionEvents: z.boolean().optional()
|
|
3549
|
+
name: z.string().describe("Auth service name"),
|
|
3550
|
+
machineUsers: z.record(z.string(), MachineUserSchema).optional().describe("Machine user definitions"),
|
|
3551
|
+
oauth2Clients: z.record(z.string(), OAuth2ClientSchema).optional().describe("OAuth2 client definitions"),
|
|
3552
|
+
idProvider: IdProviderSchema.optional().describe("Identity provider configuration"),
|
|
3553
|
+
scim: SCIMSchema.optional().describe("SCIM provisioning configuration"),
|
|
3554
|
+
tenantProvider: TenantProviderSchema.optional().describe("Multi-tenant provider configuration"),
|
|
3555
|
+
publishSessionEvents: z.boolean().optional().describe("Enable publishing session events")
|
|
3560
3556
|
});
|
|
3561
3557
|
const AuthConfigSchema = z.union([AuthConfigBaseSchema.extend({
|
|
3562
3558
|
userProfile: z.undefined().optional(),
|
|
@@ -4287,31 +4283,31 @@ const RecordTriggerSchema = z.object({
|
|
|
4287
4283
|
"recordCreated",
|
|
4288
4284
|
"recordUpdated",
|
|
4289
4285
|
"recordDeleted"
|
|
4290
|
-
]),
|
|
4291
|
-
typeName: z.string(),
|
|
4292
|
-
condition: functionSchema.optional()
|
|
4286
|
+
]).describe("Record event type"),
|
|
4287
|
+
typeName: z.string().describe("TailorDB type name to watch for events"),
|
|
4288
|
+
condition: functionSchema.optional().describe("Condition function to filter events")
|
|
4293
4289
|
});
|
|
4294
4290
|
const ResolverExecutedTriggerSchema = z.object({
|
|
4295
4291
|
kind: z.literal("resolverExecuted"),
|
|
4296
|
-
resolverName: z.string(),
|
|
4297
|
-
condition: functionSchema.optional()
|
|
4292
|
+
resolverName: z.string().describe("Name of the resolver to trigger on"),
|
|
4293
|
+
condition: functionSchema.optional().describe("Condition function to filter events")
|
|
4298
4294
|
});
|
|
4299
4295
|
const ScheduleTriggerSchema = z.object({
|
|
4300
4296
|
kind: z.literal("schedule"),
|
|
4301
|
-
cron: z.string(),
|
|
4302
|
-
timezone: z.string().optional().default("UTC")
|
|
4297
|
+
cron: z.string().describe("CRON expression for the schedule"),
|
|
4298
|
+
timezone: z.string().optional().default("UTC").describe("Timezone for the CRON schedule (default: UTC)")
|
|
4303
4299
|
});
|
|
4304
4300
|
const IncomingWebhookTriggerSchema = z.object({ kind: z.literal("incomingWebhook") });
|
|
4305
4301
|
const IdpUserTriggerSchema = z.object({ kind: z.enum([
|
|
4306
4302
|
"idpUserCreated",
|
|
4307
4303
|
"idpUserUpdated",
|
|
4308
4304
|
"idpUserDeleted"
|
|
4309
|
-
]) });
|
|
4305
|
+
]).describe("IdP user event type") });
|
|
4310
4306
|
const AuthAccessTokenTriggerSchema = z.object({ kind: z.enum([
|
|
4311
4307
|
"authAccessTokenIssued",
|
|
4312
4308
|
"authAccessTokenRefreshed",
|
|
4313
4309
|
"authAccessTokenRevoked"
|
|
4314
|
-
]) });
|
|
4310
|
+
]).describe("Auth access token event type") });
|
|
4315
4311
|
const TriggerSchema = z.discriminatedUnion("kind", [
|
|
4316
4312
|
RecordTriggerSchema,
|
|
4317
4313
|
ResolverExecutedTriggerSchema,
|
|
@@ -4322,24 +4318,24 @@ const TriggerSchema = z.discriminatedUnion("kind", [
|
|
|
4322
4318
|
]);
|
|
4323
4319
|
const FunctionOperationSchema = z.object({
|
|
4324
4320
|
kind: z.enum(["function", "jobFunction"]),
|
|
4325
|
-
body: functionSchema,
|
|
4326
|
-
authInvoker: AuthInvokerSchema.optional()
|
|
4321
|
+
body: functionSchema.describe("Function implementation"),
|
|
4322
|
+
authInvoker: AuthInvokerSchema.optional().describe("Auth invoker for the function execution")
|
|
4327
4323
|
});
|
|
4328
4324
|
const GqlOperationSchema = z.object({
|
|
4329
4325
|
kind: z.literal("graphql"),
|
|
4330
|
-
appName: z.string().optional(),
|
|
4331
|
-
query: z.preprocess((val) => String(val), z.string()),
|
|
4332
|
-
variables: functionSchema.optional(),
|
|
4333
|
-
authInvoker: AuthInvokerSchema.optional()
|
|
4326
|
+
appName: z.string().optional().describe("Target application name for the GraphQL query"),
|
|
4327
|
+
query: z.preprocess((val) => String(val), z.string().describe("GraphQL query string")),
|
|
4328
|
+
variables: functionSchema.optional().describe("Function to compute GraphQL variables"),
|
|
4329
|
+
authInvoker: AuthInvokerSchema.optional().describe("Auth invoker for the GraphQL execution")
|
|
4334
4330
|
});
|
|
4335
4331
|
const WebhookOperationSchema = z.object({
|
|
4336
4332
|
kind: z.literal("webhook"),
|
|
4337
|
-
url: functionSchema,
|
|
4338
|
-
requestBody: functionSchema.optional(),
|
|
4333
|
+
url: functionSchema.describe("Function returning the webhook URL"),
|
|
4334
|
+
requestBody: functionSchema.optional().describe("Function to compute the request body"),
|
|
4339
4335
|
headers: z.record(z.string(), z.union([z.string(), z.object({
|
|
4340
4336
|
vault: z.string(),
|
|
4341
4337
|
key: z.string()
|
|
4342
|
-
})])).optional()
|
|
4338
|
+
})])).optional().describe("HTTP headers for the webhook request")
|
|
4343
4339
|
});
|
|
4344
4340
|
const WorkflowOperationSchema = z.preprocess((val) => {
|
|
4345
4341
|
if (val == null || typeof val !== "object" || !("workflow" in val) || typeof val.workflow !== "object" || val.workflow === null) return val;
|
|
@@ -4350,9 +4346,9 @@ const WorkflowOperationSchema = z.preprocess((val) => {
|
|
|
4350
4346
|
};
|
|
4351
4347
|
}, z.object({
|
|
4352
4348
|
kind: z.literal("workflow"),
|
|
4353
|
-
workflowName: z.string(),
|
|
4354
|
-
args: z.union([z.record(z.string(), z.unknown()), functionSchema]).optional(),
|
|
4355
|
-
authInvoker: AuthInvokerSchema.optional()
|
|
4349
|
+
workflowName: z.string().describe("Name of the workflow to execute"),
|
|
4350
|
+
args: z.union([z.record(z.string(), z.unknown()), functionSchema]).optional().describe("Arguments to pass to the workflow"),
|
|
4351
|
+
authInvoker: AuthInvokerSchema.optional().describe("Auth invoker for the workflow execution")
|
|
4356
4352
|
}));
|
|
4357
4353
|
const OperationSchema = z.union([
|
|
4358
4354
|
FunctionOperationSchema,
|
|
@@ -4361,11 +4357,11 @@ const OperationSchema = z.union([
|
|
|
4361
4357
|
WorkflowOperationSchema
|
|
4362
4358
|
]);
|
|
4363
4359
|
const ExecutorSchema = z.object({
|
|
4364
|
-
name: z.string(),
|
|
4365
|
-
description: z.string().optional(),
|
|
4366
|
-
disabled: z.boolean().optional().default(false),
|
|
4367
|
-
trigger: TriggerSchema,
|
|
4368
|
-
operation: OperationSchema
|
|
4360
|
+
name: z.string().describe("Executor name"),
|
|
4361
|
+
description: z.string().optional().describe("Executor description"),
|
|
4362
|
+
disabled: z.boolean().optional().default(false).describe("Whether the executor is disabled"),
|
|
4363
|
+
trigger: TriggerSchema.describe("Event trigger configuration"),
|
|
4364
|
+
operation: OperationSchema.describe("Operation to execute when triggered")
|
|
4369
4365
|
});
|
|
4370
4366
|
|
|
4371
4367
|
//#endregion
|
|
@@ -5065,13 +5061,13 @@ async function bundleSingleJob(job, allJobs, outputDir, tsconfig, env, triggerCo
|
|
|
5065
5061
|
//#endregion
|
|
5066
5062
|
//#region src/parser/service/workflow/schema.ts
|
|
5067
5063
|
const WorkflowJobSchema = z.object({
|
|
5068
|
-
name: z.string(),
|
|
5069
|
-
trigger: functionSchema,
|
|
5070
|
-
body: functionSchema
|
|
5064
|
+
name: z.string().describe("Job name (must be unique across the project)"),
|
|
5065
|
+
trigger: functionSchema.describe("Trigger function that initiates the job"),
|
|
5066
|
+
body: functionSchema.describe("Job implementation function")
|
|
5071
5067
|
});
|
|
5072
5068
|
const WorkflowSchema = z.object({
|
|
5073
|
-
name: z.string(),
|
|
5074
|
-
mainJob: WorkflowJobSchema
|
|
5069
|
+
name: z.string().describe("Workflow name"),
|
|
5070
|
+
mainJob: WorkflowJobSchema.describe("Main job that starts the workflow")
|
|
5075
5071
|
});
|
|
5076
5072
|
|
|
5077
5073
|
//#endregion
|
|
@@ -5243,7 +5239,7 @@ const BaseGeneratorConfigSchema = z.union([
|
|
|
5243
5239
|
|
|
5244
5240
|
//#endregion
|
|
5245
5241
|
//#region src/parser/plugin-config/schema.ts
|
|
5246
|
-
const
|
|
5242
|
+
const PluginConfigSchema = z.object({
|
|
5247
5243
|
id: z.string(),
|
|
5248
5244
|
description: z.string(),
|
|
5249
5245
|
importPath: z.string().optional(),
|
|
@@ -5256,14 +5252,7 @@ const CustomPluginSchema = z.object({
|
|
|
5256
5252
|
onExecutorReady: functionSchema.optional()
|
|
5257
5253
|
}).passthrough().refine((p) => {
|
|
5258
5254
|
return !(p.onTypeLoaded || p.onNamespaceLoaded) || !!p.importPath;
|
|
5259
|
-
}, { message: "importPath is required when plugin has definition-time hooks (onTypeLoaded/onNamespaceLoaded)" });
|
|
5260
|
-
/**
|
|
5261
|
-
* Creates a PluginConfigSchema for custom plugins
|
|
5262
|
-
* @returns Plugin config schema that validates and transforms Plugin instances
|
|
5263
|
-
*/
|
|
5264
|
-
function createPluginConfigSchema() {
|
|
5265
|
-
return CustomPluginSchema.transform((plugin) => plugin);
|
|
5266
|
-
}
|
|
5255
|
+
}, { message: "importPath is required when plugin has definition-time hooks (onTypeLoaded/onNamespaceLoaded)" }).transform((plugin) => plugin);
|
|
5267
5256
|
|
|
5268
5257
|
//#endregion
|
|
5269
5258
|
//#region src/plugin/builtin/registry.ts
|
|
@@ -5288,7 +5277,6 @@ globalThis.tailordb = { Client: class {
|
|
|
5288
5277
|
//#endregion
|
|
5289
5278
|
//#region src/cli/shared/config-loader.ts
|
|
5290
5279
|
const GeneratorConfigSchema = CodeGeneratorSchema.brand("CodeGenerator");
|
|
5291
|
-
const PluginConfigSchema = createPluginConfigSchema();
|
|
5292
5280
|
/**
|
|
5293
5281
|
* Load Tailor configuration file and associated generators and plugins.
|
|
5294
5282
|
* @param configPath - Optional explicit config path
|
|
@@ -5370,11 +5358,11 @@ function resolveInlineSourcemap(configValue) {
|
|
|
5370
5358
|
}
|
|
5371
5359
|
|
|
5372
5360
|
//#endregion
|
|
5373
|
-
//#region src/parser/service/idp/
|
|
5361
|
+
//#region src/parser/service/idp/schema.ts
|
|
5374
5362
|
/**
|
|
5375
5363
|
* Normalize IdPGqlOperationsConfig (alias or object) to IdPGqlOperations object.
|
|
5376
5364
|
* "query" alias expands to read-only mode: { create: false, update: false, delete: false, read: true, sendPasswordResetEmail: false }
|
|
5377
|
-
* @param config - The
|
|
5365
|
+
* @param config - The config to normalize
|
|
5378
5366
|
* @returns The normalized IdPGqlOperations object
|
|
5379
5367
|
*/
|
|
5380
5368
|
function normalizeIdPGqlOperations(config) {
|
|
@@ -5392,29 +5380,26 @@ function normalizeIdPGqlOperations(config) {
|
|
|
5392
5380
|
* Accepts "query" alias or detailed object, normalizes to IdPGqlOperations object.
|
|
5393
5381
|
*/
|
|
5394
5382
|
const IdPGqlOperationsSchema = z.union([z.literal("query"), z.object({
|
|
5395
|
-
create: z.boolean().optional(),
|
|
5396
|
-
update: z.boolean().optional(),
|
|
5397
|
-
delete: z.boolean().optional(),
|
|
5398
|
-
read: z.boolean().optional(),
|
|
5399
|
-
sendPasswordResetEmail: z.boolean().optional()
|
|
5400
|
-
})]).transform((val) => normalizeIdPGqlOperations(val));
|
|
5401
|
-
|
|
5402
|
-
//#endregion
|
|
5403
|
-
//#region src/parser/service/idp/schema.ts
|
|
5404
|
-
const IdPLangSchema = z.enum(["en", "ja"]);
|
|
5383
|
+
create: z.boolean().optional().describe("Enable _createUser mutation (default: true)"),
|
|
5384
|
+
update: z.boolean().optional().describe("Enable _updateUser mutation (default: true)"),
|
|
5385
|
+
delete: z.boolean().optional().describe("Enable _deleteUser mutation (default: true)"),
|
|
5386
|
+
read: z.boolean().optional().describe("Enable _users and _user queries (default: true)"),
|
|
5387
|
+
sendPasswordResetEmail: z.boolean().optional().describe("Enable _sendPasswordResetEmail mutation (default: true)")
|
|
5388
|
+
})]).describe("Configuration for GraphQL operations on IdP users.\nAll operations are enabled by default (undefined or true = enabled, false = disabled).").transform((val) => normalizeIdPGqlOperations(val));
|
|
5389
|
+
const IdPLangSchema = z.enum(["en", "ja"]).describe("IdP UI language");
|
|
5405
5390
|
const IdPUserAuthPolicySchema = z.object({
|
|
5406
|
-
useNonEmailIdentifier: z.boolean().optional(),
|
|
5407
|
-
allowSelfPasswordReset: z.boolean().optional(),
|
|
5408
|
-
passwordRequireUppercase: z.boolean().optional(),
|
|
5409
|
-
passwordRequireLowercase: z.boolean().optional(),
|
|
5410
|
-
passwordRequireNonAlphanumeric: z.boolean().optional(),
|
|
5411
|
-
passwordRequireNumeric: z.boolean().optional(),
|
|
5412
|
-
passwordMinLength: z.number().int().refine((val) => val >= 6 && val <= 30, { message: "passwordMinLength must be between 6 and 30" }).optional(),
|
|
5413
|
-
passwordMaxLength: z.number().int().refine((val) => val >= 6 && val <= 4096, { message: "passwordMaxLength must be between 6 and 4096" }).optional(),
|
|
5414
|
-
allowedEmailDomains: z.array(z.string()).optional(),
|
|
5415
|
-
allowGoogleOauth: z.boolean().optional(),
|
|
5416
|
-
allowMicrosoftOauth: z.boolean().optional(),
|
|
5417
|
-
disablePasswordAuth: z.boolean().optional()
|
|
5391
|
+
useNonEmailIdentifier: z.boolean().optional().describe("Use non-email identifier for usernames"),
|
|
5392
|
+
allowSelfPasswordReset: z.boolean().optional().describe("Allow users to reset their own passwords"),
|
|
5393
|
+
passwordRequireUppercase: z.boolean().optional().describe("Require uppercase letters in passwords"),
|
|
5394
|
+
passwordRequireLowercase: z.boolean().optional().describe("Require lowercase letters in passwords"),
|
|
5395
|
+
passwordRequireNonAlphanumeric: z.boolean().optional().describe("Require non-alphanumeric characters in passwords"),
|
|
5396
|
+
passwordRequireNumeric: z.boolean().optional().describe("Require numeric characters in passwords"),
|
|
5397
|
+
passwordMinLength: z.number().int().refine((val) => val >= 6 && val <= 30, { message: "passwordMinLength must be between 6 and 30" }).optional().describe("Minimum password length (6-30)"),
|
|
5398
|
+
passwordMaxLength: z.number().int().refine((val) => val >= 6 && val <= 4096, { message: "passwordMaxLength must be between 6 and 4096" }).optional().describe("Maximum password length (6-4096)"),
|
|
5399
|
+
allowedEmailDomains: z.array(z.string()).optional().describe("Restrict registration to these email domains"),
|
|
5400
|
+
allowGoogleOauth: z.boolean().optional().describe("Enable Google OAuth login"),
|
|
5401
|
+
allowMicrosoftOauth: z.boolean().optional().describe("Enable Microsoft OAuth login"),
|
|
5402
|
+
disablePasswordAuth: z.boolean().optional().describe("Disable password-based authentication")
|
|
5418
5403
|
}).refine((data) => data.passwordMinLength === void 0 || data.passwordMaxLength === void 0 || data.passwordMinLength <= data.passwordMaxLength, {
|
|
5419
5404
|
message: "passwordMinLength must be less than or equal to passwordMaxLength",
|
|
5420
5405
|
path: ["passwordMinLength"]
|
|
@@ -5444,25 +5429,25 @@ const IdPUserAuthPolicySchema = z.object({
|
|
|
5444
5429
|
path: ["disablePasswordAuth"]
|
|
5445
5430
|
});
|
|
5446
5431
|
const IdPSchema = z.object({
|
|
5447
|
-
name: z.string(),
|
|
5432
|
+
name: z.string().describe("IdP service name"),
|
|
5448
5433
|
authorization: z.union([
|
|
5449
5434
|
z.literal("insecure"),
|
|
5450
5435
|
z.literal("loggedIn"),
|
|
5451
5436
|
z.object({ cel: z.string() })
|
|
5452
|
-
]),
|
|
5453
|
-
clients: z.array(z.string()),
|
|
5454
|
-
lang: IdPLangSchema.optional(),
|
|
5455
|
-
userAuthPolicy: IdPUserAuthPolicySchema.transform((input) => IdPUserAuthPolicySchema.parse(input ?? {})).optional(),
|
|
5456
|
-
publishUserEvents: z.boolean().optional(),
|
|
5457
|
-
gqlOperations: IdPGqlOperationsSchema.optional()
|
|
5437
|
+
]).describe("Authorization mode for IdP API access"),
|
|
5438
|
+
clients: z.array(z.string()).describe("OAuth2 client names that can use this IdP"),
|
|
5439
|
+
lang: IdPLangSchema.optional().describe("UI language for IdP pages"),
|
|
5440
|
+
userAuthPolicy: IdPUserAuthPolicySchema.transform((input) => IdPUserAuthPolicySchema.parse(input ?? {})).optional().describe("User authentication policy configuration"),
|
|
5441
|
+
publishUserEvents: z.boolean().optional().describe("Enable publishing user lifecycle events"),
|
|
5442
|
+
gqlOperations: IdPGqlOperationsSchema.optional().describe("Configure which GraphQL operations are enabled")
|
|
5458
5443
|
}).brand("IdPConfig");
|
|
5459
5444
|
|
|
5460
5445
|
//#endregion
|
|
5461
5446
|
//#region src/parser/service/staticwebsite/schema.ts
|
|
5462
5447
|
const StaticWebsiteSchema = z.object({
|
|
5463
|
-
name: z.string(),
|
|
5464
|
-
description: z.string().optional(),
|
|
5465
|
-
allowedIpAddresses: z.array(z.string()).optional()
|
|
5448
|
+
name: z.string().describe("Static website name"),
|
|
5449
|
+
description: z.string().optional().describe("Static website description"),
|
|
5450
|
+
allowedIpAddresses: z.array(z.string()).optional().describe("IP addresses allowed to access the website")
|
|
5466
5451
|
}).brand("StaticWebsiteConfig");
|
|
5467
5452
|
|
|
5468
5453
|
//#endregion
|
|
@@ -5720,4 +5705,4 @@ async function loadApplication(params) {
|
|
|
5720
5705
|
|
|
5721
5706
|
//#endregion
|
|
5722
5707
|
export { AuthSCIMAttribute_Mutability as $, platformBaseUrl as A, TailorDBType_Permission_Permit as B, readPlatformConfig as C, fetchUserInfo as D, fetchMachineUserToken as E, WorkflowJobExecution_Status as F, FunctionExecution_Type as G, PipelineResolver_OperationType as H, TailorDBGQLPermission_Action as I, ExecutorTriggerType as J, ExecutorJobStatus as K, TailorDBGQLPermission_Operator as L, userAgent as M, WorkspacePlatformUserRole as N, initOAuth2Client as O, WorkflowExecution_Status as P, AuthOAuth2Client_GrantType as Q, TailorDBGQLPermission_Permit as R, loadWorkspaceId as S, fetchAll as T, IdPLang as U, TailorDBType_PermitAction as V, FunctionExecution_Status as W, AuthInvokerSchema$1 as X, AuthIDPConfig_AuthType as Y, AuthOAuth2Client_ClientType as Z, hashFile as _, loadConfig as a, UserProfileProviderConfig_UserProfileProviderType as at, loadFolderId as b, ExecutorSchema as c, Condition_Operator as ct, TailorDBTypeSchema as d, ApplicationSchemaUpdateAttemptStatus as dt, AuthSCIMAttribute_Type as et, stringifyFunction as f, Subgraph_ServiceType as ft, getDistDir as g, createBundleCache as h, symbols as ht, resolveInlineSourcemap as i, TenantProviderConfig_TenantProviderType as it, resolveStaticWebsiteUrls as j, initOperatorClient as k, OAuth2ClientSchema as l, FilterSchema as lt, loadFilesWithIgnores as m, styles as mt, generatePluginFilesIfNeeded as n, AuthSCIMConfig_AuthorizationType as nt, WorkflowJobSchema as o, GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus as ot, tailorUserMap as p, logger as pt, ExecutorTargetType as q, loadApplication as r, PATScope as rt, createExecutorService as s, ConditionSchema as st, defineApplication as t, AuthSCIMAttribute_Uniqueness as tt, ResolverSchema as u, PageDirection as ut, fetchLatestToken as v, writePlatformConfig as w, loadOrganizationId as x, loadAccessToken as y, TailorDBType_Permission_Operator as z };
|
|
5723
|
-
//# sourceMappingURL=application-
|
|
5708
|
+
//# sourceMappingURL=application-DThE2HW7.mjs.map
|