@tailor-platform/sdk 1.35.2 → 1.37.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 +54 -0
- package/dist/application-ILhZq_oW.mjs +4 -0
- package/dist/{application-BnJRroGX.mjs → application-qRGMV8Tr.mjs} +150 -35
- package/dist/application-qRGMV8Tr.mjs.map +1 -0
- package/dist/{brand-0SscafcY.mjs → brand-D-d15jx3.mjs} +1 -1
- package/dist/{brand-0SscafcY.mjs.map → brand-D-d15jx3.mjs.map} +1 -1
- package/dist/cli/index.mjs +247 -12
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +190 -6
- package/dist/cli/lib.mjs +7 -7
- package/dist/{client-BmQP4kKS.mjs → client-424n_3T9.mjs} +1 -1
- package/dist/{client-CA2NM_4R.mjs → client-DllDLYmZ.mjs} +28 -11
- package/dist/client-DllDLYmZ.mjs.map +1 -0
- package/dist/configure/index.d.mts +5 -4
- package/dist/configure/index.mjs +42 -23
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{crash-report-CPkI2-cp.mjs → crash-report-CDQ2JvgR.mjs} +4 -4
- package/dist/{crash-report-CPkI2-cp.mjs.map → crash-report-CDQ2JvgR.mjs.map} +1 -1
- package/dist/{crash-report-Bd2T8BhU.mjs → crash-report-aHnky_xH.mjs} +1 -1
- package/dist/{enum-constants-DI85-fPE.mjs → enum-constants-Dx82rSjf.mjs} +1 -1
- package/dist/{enum-constants-DI85-fPE.mjs.map → enum-constants-Dx82rSjf.mjs.map} +1 -1
- package/dist/env-04IQXqsl.d.mts +30 -0
- package/dist/{file-utils-C4rXlOVt.mjs → file-utils-DeWpvq3T.mjs} +1 -1
- package/dist/{file-utils-C4rXlOVt.mjs.map → file-utils-DeWpvq3T.mjs.map} +1 -1
- package/dist/{index-DTJkkO-t.d.mts → index-BUT18Kak.d.mts} +2 -2
- package/dist/{index--9iVDOXn.d.mts → index-BVJQLjyN.d.mts} +98 -12
- package/dist/{index-D4pBPp65.d.mts → index-C3kcXHXJ.d.mts} +2 -2
- package/dist/{index-niQ9Qblw.d.mts → index-CeS4FA9o.d.mts} +2 -2
- package/dist/{index-qVqjEYnr.d.mts → index-DnIg_LfT.d.mts} +2 -2
- package/dist/{interceptor-f7slMkCC.mjs → interceptor-dSNiQq71.mjs} +1 -1
- package/dist/{interceptor-f7slMkCC.mjs.map → interceptor-dSNiQq71.mjs.map} +1 -1
- package/dist/{job-CPKYCk_e.mjs → job-DkAklmE4.mjs} +2 -2
- package/dist/{job-CPKYCk_e.mjs.map → job-DkAklmE4.mjs.map} +1 -1
- package/dist/{kysely-type-DtnNdHn3.mjs → kysely-type-CwtvQuxh.mjs} +1 -1
- package/dist/{kysely-type-DtnNdHn3.mjs.map → kysely-type-CwtvQuxh.mjs.map} +1 -1
- package/dist/{logger-qz-Y4sBV.mjs → logger-C8qBDCKO.mjs} +1 -1
- package/dist/{logger-qz-Y4sBV.mjs.map → logger-C8qBDCKO.mjs.map} +1 -1
- package/dist/package-json--6dmp6-h.mjs +4 -0
- package/dist/{package-json-CfUqjJaQ.mjs → package-json-BHViVisJ.mjs} +1 -1
- package/dist/{package-json-CfUqjJaQ.mjs.map → package-json-BHViVisJ.mjs.map} +1 -1
- package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
- package/dist/plugin/builtin/enum-constants/index.mjs +1 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
- package/dist/plugin/builtin/file-utils/index.mjs +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +1 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/index.d.mts +2 -1
- package/dist/{plugin-D8hKE6rZ.d.mts → plugin-D6P4g_2L.d.mts} +17 -36
- package/dist/{runtime-D4O-RfcH.mjs → runtime-D9ejnCm6.mjs} +788 -109
- package/dist/runtime-D9ejnCm6.mjs.map +1 -0
- package/dist/{schema-D27cW0Ca.mjs → schema-CnwUqPyM.mjs} +4 -361
- package/dist/schema-CnwUqPyM.mjs.map +1 -0
- package/dist/{seed-BZIFDG27.mjs → seed-DrbB1VXd.mjs} +1 -1
- package/dist/{seed-BZIFDG27.mjs.map → seed-DrbB1VXd.mjs.map} +1 -1
- package/dist/telemetry-4IOPW6wE.mjs +4 -0
- package/dist/{telemetry-CREcGK8y.mjs → telemetry-DwHuiNiR.mjs} +2 -2
- package/dist/{telemetry-CREcGK8y.mjs.map → telemetry-DwHuiNiR.mjs.map} +1 -1
- package/dist/types-B9ZMosul.mjs +372 -0
- package/dist/types-B9ZMosul.mjs.map +1 -0
- package/dist/types-C45jRrCM.mjs +4 -0
- package/dist/utils/test/index.d.mts +2 -2
- package/dist/utils/test/index.mjs +1 -1
- package/dist/{workflow.generated-DMt8PNVd.d.mts → workflow.generated-Bj_DVqGh.d.mts} +212 -4
- package/docs/services/auth.md +6 -5
- package/docs/services/executor.md +5 -12
- package/docs/services/idp.md +50 -0
- package/docs/services/resolver.md +6 -13
- package/docs/services/secret.md +25 -0
- package/docs/services/workflow.md +4 -3
- package/package.json +7 -6
- package/dist/application-BnJRroGX.mjs.map +0 -1
- package/dist/application-mGasp_EX.mjs +0 -4
- package/dist/client-CA2NM_4R.mjs.map +0 -1
- package/dist/package-json-D5Km1jjt.mjs +0 -4
- package/dist/runtime-D4O-RfcH.mjs.map +0 -1
- package/dist/schema-D27cW0Ca.mjs.map +0 -1
- package/dist/telemetry-C508zIi1.mjs +0 -4
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/configure/types/field.ts
|
|
3
|
+
/**
|
|
4
|
+
* Normalize allowed values into EnumValue objects with descriptions.
|
|
5
|
+
* @param values - Allowed values as strings or EnumValue objects
|
|
6
|
+
* @returns Normalized allowed values
|
|
7
|
+
*/
|
|
8
|
+
function mapAllowedValues(values) {
|
|
9
|
+
return values.map((value) => {
|
|
10
|
+
if (typeof value === "string") return {
|
|
11
|
+
value,
|
|
12
|
+
description: ""
|
|
13
|
+
};
|
|
14
|
+
return {
|
|
15
|
+
...value,
|
|
16
|
+
description: value.description ?? ""
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/configure/types/type.ts
|
|
23
|
+
const regex = {
|
|
24
|
+
uuid: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,
|
|
25
|
+
date: /^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/,
|
|
26
|
+
time: /^(?<hour>\d{2}):(?<minute>\d{2})$/,
|
|
27
|
+
datetime: /^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})T(?<hour>\d{2}):(?<minute>\d{2}):(?<second>\d{2})(.(?<millisec>\d{3}))?Z$/,
|
|
28
|
+
decimal: /^-?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Creates a new TailorField instance.
|
|
32
|
+
* @param type - Field type
|
|
33
|
+
* @param options - Field options
|
|
34
|
+
* @param fields - Nested fields for object-like types
|
|
35
|
+
* @param values - Allowed values for enum-like fields
|
|
36
|
+
* @returns A new TailorField
|
|
37
|
+
*/
|
|
38
|
+
function createTailorField(type, options, fields, values) {
|
|
39
|
+
const _metadata = { required: true };
|
|
40
|
+
if (options) {
|
|
41
|
+
if (options.optional === true) _metadata.required = false;
|
|
42
|
+
if (options.array === true) _metadata.array = true;
|
|
43
|
+
}
|
|
44
|
+
if (values) _metadata.allowedValues = mapAllowedValues(values);
|
|
45
|
+
/**
|
|
46
|
+
* Validate a single value (not an array element)
|
|
47
|
+
* Used internally for array element validation
|
|
48
|
+
* @param args - Value, context data, and user
|
|
49
|
+
* @returns Array of validation issues
|
|
50
|
+
*/
|
|
51
|
+
function validateValue(args) {
|
|
52
|
+
const { value, data, user, pathArray } = args;
|
|
53
|
+
const issues = [];
|
|
54
|
+
switch (type) {
|
|
55
|
+
case "string":
|
|
56
|
+
if (typeof value !== "string") issues.push({
|
|
57
|
+
message: `Expected a string: received ${String(value)}`,
|
|
58
|
+
path: pathArray.length > 0 ? pathArray : void 0
|
|
59
|
+
});
|
|
60
|
+
break;
|
|
61
|
+
case "integer":
|
|
62
|
+
if (typeof value !== "number" || !Number.isInteger(value)) issues.push({
|
|
63
|
+
message: `Expected an integer: received ${String(value)}`,
|
|
64
|
+
path: pathArray.length > 0 ? pathArray : void 0
|
|
65
|
+
});
|
|
66
|
+
break;
|
|
67
|
+
case "float":
|
|
68
|
+
if (typeof value !== "number" || !Number.isFinite(value)) issues.push({
|
|
69
|
+
message: `Expected a number: received ${String(value)}`,
|
|
70
|
+
path: pathArray.length > 0 ? pathArray : void 0
|
|
71
|
+
});
|
|
72
|
+
break;
|
|
73
|
+
case "boolean":
|
|
74
|
+
if (typeof value !== "boolean") issues.push({
|
|
75
|
+
message: `Expected a boolean: received ${String(value)}`,
|
|
76
|
+
path: pathArray.length > 0 ? pathArray : void 0
|
|
77
|
+
});
|
|
78
|
+
break;
|
|
79
|
+
case "uuid":
|
|
80
|
+
if (typeof value !== "string" || !regex.uuid.test(value)) issues.push({
|
|
81
|
+
message: `Expected a valid UUID: received ${String(value)}`,
|
|
82
|
+
path: pathArray.length > 0 ? pathArray : void 0
|
|
83
|
+
});
|
|
84
|
+
break;
|
|
85
|
+
case "date":
|
|
86
|
+
if (typeof value !== "string" || !regex.date.test(value)) issues.push({
|
|
87
|
+
message: `Expected to match "yyyy-MM-dd" format: received ${String(value)}`,
|
|
88
|
+
path: pathArray.length > 0 ? pathArray : void 0
|
|
89
|
+
});
|
|
90
|
+
break;
|
|
91
|
+
case "datetime":
|
|
92
|
+
if (typeof value !== "string" || !regex.datetime.test(value)) issues.push({
|
|
93
|
+
message: `Expected to match ISO format: received ${String(value)}`,
|
|
94
|
+
path: pathArray.length > 0 ? pathArray : void 0
|
|
95
|
+
});
|
|
96
|
+
break;
|
|
97
|
+
case "time":
|
|
98
|
+
if (typeof value !== "string" || !regex.time.test(value)) issues.push({
|
|
99
|
+
message: `Expected to match "HH:mm" format: received ${String(value)}`,
|
|
100
|
+
path: pathArray.length > 0 ? pathArray : void 0
|
|
101
|
+
});
|
|
102
|
+
break;
|
|
103
|
+
case "decimal":
|
|
104
|
+
if (typeof value !== "string" || !regex.decimal.test(value)) issues.push({
|
|
105
|
+
message: `Expected a decimal string: received ${String(value)}`,
|
|
106
|
+
path: pathArray.length > 0 ? pathArray : void 0
|
|
107
|
+
});
|
|
108
|
+
break;
|
|
109
|
+
case "enum":
|
|
110
|
+
if (field._metadata.allowedValues) {
|
|
111
|
+
const allowedValues = field._metadata.allowedValues.map((v) => v.value);
|
|
112
|
+
if (typeof value !== "string" || !allowedValues.includes(value)) issues.push({
|
|
113
|
+
message: `Must be one of [${allowedValues.join(", ")}]: received ${String(value)}`,
|
|
114
|
+
path: pathArray.length > 0 ? pathArray : void 0
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
break;
|
|
118
|
+
case "nested":
|
|
119
|
+
if (typeof value !== "object" || value === null || Array.isArray(value) || value instanceof Date) issues.push({
|
|
120
|
+
message: `Expected an object: received ${String(value)}`,
|
|
121
|
+
path: pathArray.length > 0 ? pathArray : void 0
|
|
122
|
+
});
|
|
123
|
+
else if (field.fields && Object.keys(field.fields).length > 0) for (const [fieldName, nestedField] of Object.entries(field.fields)) {
|
|
124
|
+
const fieldValue = value?.[fieldName];
|
|
125
|
+
const result = nestedField._parseInternal({
|
|
126
|
+
value: fieldValue,
|
|
127
|
+
data,
|
|
128
|
+
user,
|
|
129
|
+
pathArray: pathArray.concat(fieldName)
|
|
130
|
+
});
|
|
131
|
+
if (result.issues) issues.push(...result.issues);
|
|
132
|
+
}
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
const validateFns = field._metadata.validate;
|
|
136
|
+
if (validateFns && validateFns.length > 0) for (const validateInput of validateFns) {
|
|
137
|
+
const { fn, message } = typeof validateInput === "function" ? {
|
|
138
|
+
fn: validateInput,
|
|
139
|
+
message: "Validation failed"
|
|
140
|
+
} : {
|
|
141
|
+
fn: validateInput[0],
|
|
142
|
+
message: validateInput[1]
|
|
143
|
+
};
|
|
144
|
+
if (!fn({
|
|
145
|
+
value,
|
|
146
|
+
data,
|
|
147
|
+
user
|
|
148
|
+
})) issues.push({
|
|
149
|
+
message,
|
|
150
|
+
path: pathArray.length > 0 ? pathArray : void 0
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
return issues;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Internal parse method that tracks field path for nested validation
|
|
157
|
+
* @param args - Parse arguments
|
|
158
|
+
* @returns Parse result with value or issues
|
|
159
|
+
*/
|
|
160
|
+
function parseInternal(args) {
|
|
161
|
+
const { value, data, user, pathArray } = args;
|
|
162
|
+
const issues = [];
|
|
163
|
+
const isNullOrUndefined = value === null || value === void 0;
|
|
164
|
+
if (field._metadata.required && isNullOrUndefined) {
|
|
165
|
+
issues.push({
|
|
166
|
+
message: "Required field is missing",
|
|
167
|
+
path: pathArray.length > 0 ? pathArray : void 0
|
|
168
|
+
});
|
|
169
|
+
return { issues };
|
|
170
|
+
}
|
|
171
|
+
if (!field._metadata.required && isNullOrUndefined) return { value: value ?? null };
|
|
172
|
+
if (field._metadata.array) {
|
|
173
|
+
if (!Array.isArray(value)) {
|
|
174
|
+
issues.push({
|
|
175
|
+
message: "Expected an array",
|
|
176
|
+
path: pathArray.length > 0 ? pathArray : void 0
|
|
177
|
+
});
|
|
178
|
+
return { issues };
|
|
179
|
+
}
|
|
180
|
+
for (let i = 0; i < value.length; i++) {
|
|
181
|
+
const elementValue = value[i];
|
|
182
|
+
const elementIssues = validateValue({
|
|
183
|
+
value: elementValue,
|
|
184
|
+
data,
|
|
185
|
+
user,
|
|
186
|
+
pathArray: pathArray.concat(`[${i}]`)
|
|
187
|
+
});
|
|
188
|
+
if (elementIssues.length > 0) issues.push(...elementIssues);
|
|
189
|
+
}
|
|
190
|
+
if (issues.length > 0) return { issues };
|
|
191
|
+
return { value };
|
|
192
|
+
}
|
|
193
|
+
const valueIssues = validateValue({
|
|
194
|
+
value,
|
|
195
|
+
data,
|
|
196
|
+
user,
|
|
197
|
+
pathArray
|
|
198
|
+
});
|
|
199
|
+
issues.push(...valueIssues);
|
|
200
|
+
if (issues.length > 0) return { issues };
|
|
201
|
+
return { value };
|
|
202
|
+
}
|
|
203
|
+
const field = {
|
|
204
|
+
type,
|
|
205
|
+
fields: fields ?? {},
|
|
206
|
+
_defined: void 0,
|
|
207
|
+
_output: void 0,
|
|
208
|
+
_metadata,
|
|
209
|
+
get metadata() {
|
|
210
|
+
return { ...this._metadata };
|
|
211
|
+
},
|
|
212
|
+
description(description) {
|
|
213
|
+
this._metadata.description = description;
|
|
214
|
+
return this;
|
|
215
|
+
},
|
|
216
|
+
typeName(typeName) {
|
|
217
|
+
this._metadata.typeName = typeName;
|
|
218
|
+
return this;
|
|
219
|
+
},
|
|
220
|
+
validate(...validateInputs) {
|
|
221
|
+
this._metadata.validate = validateInputs;
|
|
222
|
+
return this;
|
|
223
|
+
},
|
|
224
|
+
parse(args) {
|
|
225
|
+
return parseInternal({
|
|
226
|
+
value: args.value,
|
|
227
|
+
data: args.data,
|
|
228
|
+
user: args.user,
|
|
229
|
+
pathArray: []
|
|
230
|
+
});
|
|
231
|
+
},
|
|
232
|
+
_parseInternal: parseInternal
|
|
233
|
+
};
|
|
234
|
+
return field;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Create a UUID field for resolver input/output.
|
|
238
|
+
* @param options - Field configuration options
|
|
239
|
+
* @returns A UUID field
|
|
240
|
+
* @example t.uuid()
|
|
241
|
+
*/
|
|
242
|
+
function uuid(options) {
|
|
243
|
+
return createTailorField("uuid", options);
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Create a string field for resolver input/output.
|
|
247
|
+
* @param options - Field configuration options
|
|
248
|
+
* @returns A string field
|
|
249
|
+
* @example t.string()
|
|
250
|
+
* @example t.string({ optional: true })
|
|
251
|
+
* @example t.string({ array: true })
|
|
252
|
+
*/
|
|
253
|
+
function string(options) {
|
|
254
|
+
return createTailorField("string", options);
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Create a boolean field for resolver input/output.
|
|
258
|
+
* @param options - Field configuration options
|
|
259
|
+
* @returns A boolean field
|
|
260
|
+
* @example t.bool()
|
|
261
|
+
*/
|
|
262
|
+
function bool(options) {
|
|
263
|
+
return createTailorField("boolean", options);
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Create an integer field for resolver input/output.
|
|
267
|
+
* @param options - Field configuration options
|
|
268
|
+
* @returns An integer field
|
|
269
|
+
* @example t.int()
|
|
270
|
+
*/
|
|
271
|
+
function int(options) {
|
|
272
|
+
return createTailorField("integer", options);
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Create a float field for resolver input/output.
|
|
276
|
+
* @param options - Field configuration options
|
|
277
|
+
* @returns A float field
|
|
278
|
+
* @example t.float()
|
|
279
|
+
*/
|
|
280
|
+
function float(options) {
|
|
281
|
+
return createTailorField("float", options);
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Create a decimal field for resolver input/output (stored as string for precision).
|
|
285
|
+
* @param options - Field configuration options
|
|
286
|
+
* @returns A decimal field
|
|
287
|
+
* @example t.decimal()
|
|
288
|
+
* @example t.decimal({ optional: true })
|
|
289
|
+
*/
|
|
290
|
+
function decimal(options) {
|
|
291
|
+
return createTailorField("decimal", options);
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Create a date field for resolver input/output.
|
|
295
|
+
* @param options - Field configuration options
|
|
296
|
+
* @returns A date field
|
|
297
|
+
* @example t.date()
|
|
298
|
+
*/
|
|
299
|
+
function date(options) {
|
|
300
|
+
return createTailorField("date", options);
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Create a datetime field for resolver input/output.
|
|
304
|
+
* @param options - Field configuration options
|
|
305
|
+
* @returns A datetime field
|
|
306
|
+
* @example t.datetime()
|
|
307
|
+
*/
|
|
308
|
+
function datetime(options) {
|
|
309
|
+
return createTailorField("datetime", options);
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Create a time field for resolver input/output.
|
|
313
|
+
* @param options - Field configuration options
|
|
314
|
+
* @returns A time field
|
|
315
|
+
* @example t.time()
|
|
316
|
+
*/
|
|
317
|
+
function time(options) {
|
|
318
|
+
return createTailorField("time", options);
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Create an enum field for resolver input/output.
|
|
322
|
+
* @param values - Array of allowed string values
|
|
323
|
+
* @param options - Field configuration options
|
|
324
|
+
* @returns An enum field
|
|
325
|
+
* @example t.enum(["active", "inactive"])
|
|
326
|
+
*/
|
|
327
|
+
function _enum(values, options) {
|
|
328
|
+
return createTailorField("enum", options, void 0, values);
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Create a nested object field for resolver input/output.
|
|
332
|
+
* @param fields - Record of field definitions
|
|
333
|
+
* @param options - Field options (optional, array)
|
|
334
|
+
* @returns A nested object field
|
|
335
|
+
* @example
|
|
336
|
+
* // Single object:
|
|
337
|
+
* output: t.object({ name: t.string(), email: t.string() })
|
|
338
|
+
* @example
|
|
339
|
+
* // Array of objects:
|
|
340
|
+
* items: t.object({ name: t.string() }, { array: true })
|
|
341
|
+
*/
|
|
342
|
+
function object(fields, options) {
|
|
343
|
+
return createTailorField("nested", options, fields);
|
|
344
|
+
}
|
|
345
|
+
const t = {
|
|
346
|
+
uuid,
|
|
347
|
+
string,
|
|
348
|
+
bool,
|
|
349
|
+
int,
|
|
350
|
+
float,
|
|
351
|
+
decimal,
|
|
352
|
+
date,
|
|
353
|
+
datetime,
|
|
354
|
+
time,
|
|
355
|
+
enum: _enum,
|
|
356
|
+
object
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
//#endregion
|
|
360
|
+
//#region src/configure/types/user.ts
|
|
361
|
+
/** Represents an unauthenticated user in the Tailor platform. */
|
|
362
|
+
const unauthenticatedTailorUser = {
|
|
363
|
+
id: "00000000-0000-0000-0000-000000000000",
|
|
364
|
+
type: "",
|
|
365
|
+
workspaceId: "00000000-0000-0000-0000-000000000000",
|
|
366
|
+
attributes: null,
|
|
367
|
+
attributeList: []
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
//#endregion
|
|
371
|
+
export { t as n, mapAllowedValues as r, unauthenticatedTailorUser as t };
|
|
372
|
+
//# sourceMappingURL=types-B9ZMosul.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-B9ZMosul.mjs","names":[],"sources":["../src/configure/types/field.ts","../src/configure/types/type.ts","../src/configure/types/user.ts"],"sourcesContent":["import type { EnumValue } from \"@/types/tailordb\";\n\nexport type AllowedValue = EnumValue;\n\nexport type AllowedValues = readonly [string | EnumValue, ...(string | EnumValue)[]];\n\n/**\n * Normalize allowed values into EnumValue objects with descriptions.\n * @param values - Allowed values as strings or EnumValue objects\n * @returns Normalized allowed values\n */\nexport function mapAllowedValues(values: AllowedValues): AllowedValue[] {\n return values.map((value) => {\n if (typeof value === \"string\") {\n return { value, description: \"\" };\n }\n return { ...value, description: value.description ?? \"\" };\n });\n}\n\nexport type AllowedValuesOutput<V extends AllowedValues> = V[number] extends infer T\n ? T extends string\n ? T\n : T extends { value: infer K }\n ? K\n : never\n : never;\n","import { type AllowedValues, type AllowedValuesOutput, mapAllowedValues } from \"./field\";\nimport {\n type TailorFieldType,\n type TailorToTs,\n type FieldMetadata,\n type DefinedFieldMetadata,\n type FieldOptions,\n type FieldOutput,\n} from \"./types\";\nimport type { Prettify, InferFieldsOutput } from \"./helpers\";\nimport type { FieldValidateInput } from \"./validation\";\nimport type { TailorUser } from \"@/configure/types\";\nimport type { TailorFieldInput } from \"@/types/field.generated\";\nimport type { StandardSchemaV1 } from \"@standard-schema/spec\";\n\nconst regex = {\n uuid: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,\n date: /^(?<year>\\d{4})-(?<month>\\d{2})-(?<day>\\d{2})$/,\n time: /^(?<hour>\\d{2}):(?<minute>\\d{2})$/,\n datetime:\n /^(?<year>\\d{4})-(?<month>\\d{2})-(?<day>\\d{2})T(?<hour>\\d{2}):(?<minute>\\d{2}):(?<second>\\d{2})(.(?<millisec>\\d{3}))?Z$/,\n decimal: /^-?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,\n} as const;\n\n// This helper type intentionally uses `any` as a placeholder for unknown field output.\n// oxlint-disable-next-line no-explicit-any\nexport type TailorAnyField = TailorField<any>;\n\ntype FieldParseArgs = {\n value: unknown;\n data: unknown;\n user: TailorUser;\n};\n\ntype FieldValidateValueArgs<T extends TailorFieldType> = {\n value: TailorToTs[T];\n data: unknown;\n user: TailorUser;\n pathArray: string[];\n};\n\ntype FieldParseInternalArgs = {\n // Runtime input is unknown/untyped; we validate and narrow it inside the parser.\n // oxlint-disable-next-line no-explicit-any\n value: any;\n data: unknown;\n user: TailorUser;\n pathArray: string[];\n};\n\n/**\n * TailorField interface representing a field with metadata, type information, and optional nested fields.\n * This is the base field type used by both resolver types and TailorDB types.\n * Using interface to allow self-referencing in the fields property.\n */\nexport interface TailorField<\n Defined extends DefinedFieldMetadata = DefinedFieldMetadata,\n // Generic default output type (kept loose on purpose for library ergonomics).\n // oxlint-disable-next-line no-explicit-any\n Output = any,\n M extends FieldMetadata = FieldMetadata,\n T extends TailorFieldType = TailorFieldType,\n> extends TailorFieldInput {\n readonly type: T;\n readonly fields: Record<string, TailorAnyField>;\n readonly _defined: Defined;\n readonly _output: Output;\n _metadata: M;\n\n /** Returns a shallow copy of the metadata */\n readonly metadata: M;\n\n /**\n * Set a description for the field\n * @param description - The description text\n * @returns The field with updated metadata\n */\n description<CurrentDefined extends Defined>(\n this: CurrentDefined extends { description: unknown }\n ? never\n : TailorField<CurrentDefined, Output>,\n description: string,\n ): TailorField<Prettify<CurrentDefined & { description: true }>, Output>;\n\n /**\n * Set a custom type name for enum or nested types\n * @param typeName - The custom type name\n * @returns The field with updated metadata\n */\n typeName<CurrentDefined extends Defined>(\n this: CurrentDefined extends { typeName: unknown }\n ? never\n : CurrentDefined extends { type: \"enum\" | \"nested\" }\n ? TailorField<CurrentDefined, Output>\n : never,\n typeName: string,\n ): TailorField<Prettify<CurrentDefined & { typeName: true }>, Output>;\n\n /**\n * Add validation functions to the field\n * @param validate - One or more validation functions\n * @returns The field with updated metadata\n */\n validate<CurrentDefined extends Defined>(\n this: CurrentDefined extends { validate: unknown }\n ? never\n : TailorField<CurrentDefined, Output>,\n ...validate: FieldValidateInput<Output>[]\n ): TailorField<Prettify<CurrentDefined & { validate: true }>, Output>;\n\n /**\n * Parse and validate a value against this field's validation rules\n * Returns StandardSchema Result type with success or failure\n * @param args - Value, context data, and user\n * @returns Validation result\n */\n parse(args: FieldParseArgs): StandardSchemaV1.Result<Output>;\n\n /**\n * Internal parse method that tracks field path for nested validation\n * @private\n * @param args - Parse arguments\n * @returns Validation result\n */\n _parseInternal(args: FieldParseInternalArgs): StandardSchemaV1.Result<Output>;\n}\n\n/**\n * Creates a new TailorField instance.\n * @param type - Field type\n * @param options - Field options\n * @param fields - Nested fields for object-like types\n * @param values - Allowed values for enum-like fields\n * @returns A new TailorField\n */\nfunction createTailorField<\n const T extends TailorFieldType,\n const TOptions extends FieldOptions,\n const OutputBase = TailorToTs[T],\n>(\n type: T,\n options?: TOptions,\n fields?: Record<string, TailorAnyField>,\n values?: AllowedValues,\n): TailorField<\n { type: T; array: TOptions extends { array: true } ? true : false },\n FieldOutput<OutputBase, TOptions>\n> {\n const _metadata: FieldMetadata = { required: true };\n\n if (options) {\n if (options.optional === true) {\n _metadata.required = false;\n }\n if (options.array === true) {\n _metadata.array = true;\n }\n }\n if (values) {\n _metadata.allowedValues = mapAllowedValues(values);\n }\n\n /**\n * Validate a single value (not an array element)\n * Used internally for array element validation\n * @param args - Value, context data, and user\n * @returns Array of validation issues\n */\n function validateValue(args: FieldValidateValueArgs<T>): StandardSchemaV1.Issue[] {\n const { value, data, user, pathArray } = args;\n const issues: StandardSchemaV1.Issue[] = [];\n\n // Type-specific validation\n switch (type) {\n case \"string\":\n if (typeof value !== \"string\") {\n issues.push({\n message: `Expected a string: received ${String(value)}`,\n path: pathArray.length > 0 ? pathArray : undefined,\n });\n }\n break;\n\n case \"integer\":\n if (typeof value !== \"number\" || !Number.isInteger(value)) {\n issues.push({\n message: `Expected an integer: received ${String(value)}`,\n path: pathArray.length > 0 ? pathArray : undefined,\n });\n }\n break;\n\n case \"float\":\n if (typeof value !== \"number\" || !Number.isFinite(value)) {\n issues.push({\n message: `Expected a number: received ${String(value)}`,\n path: pathArray.length > 0 ? pathArray : undefined,\n });\n }\n break;\n\n case \"boolean\":\n if (typeof value !== \"boolean\") {\n issues.push({\n message: `Expected a boolean: received ${String(value)}`,\n path: pathArray.length > 0 ? pathArray : undefined,\n });\n }\n break;\n\n case \"uuid\":\n if (typeof value !== \"string\" || !regex.uuid.test(value)) {\n issues.push({\n message: `Expected a valid UUID: received ${String(value)}`,\n path: pathArray.length > 0 ? pathArray : undefined,\n });\n }\n break;\n case \"date\":\n if (typeof value !== \"string\" || !regex.date.test(value)) {\n issues.push({\n message: `Expected to match \"yyyy-MM-dd\" format: received ${String(value)}`,\n path: pathArray.length > 0 ? pathArray : undefined,\n });\n }\n break;\n case \"datetime\":\n if (typeof value !== \"string\" || !regex.datetime.test(value)) {\n issues.push({\n message: `Expected to match ISO format: received ${String(value)}`,\n path: pathArray.length > 0 ? pathArray : undefined,\n });\n }\n break;\n case \"time\":\n if (typeof value !== \"string\" || !regex.time.test(value)) {\n issues.push({\n message: `Expected to match \"HH:mm\" format: received ${String(value)}`,\n path: pathArray.length > 0 ? pathArray : undefined,\n });\n }\n break;\n case \"decimal\":\n if (typeof value !== \"string\" || !regex.decimal.test(value)) {\n issues.push({\n message: `Expected a decimal string: received ${String(value)}`,\n path: pathArray.length > 0 ? pathArray : undefined,\n });\n }\n break;\n\n case \"enum\":\n if (field._metadata.allowedValues) {\n const allowedValues = field._metadata.allowedValues.map((v) => v.value);\n if (typeof value !== \"string\" || !allowedValues.includes(value)) {\n issues.push({\n message: `Must be one of [${allowedValues.join(\", \")}]: received ${String(value)}`,\n path: pathArray.length > 0 ? pathArray : undefined,\n });\n }\n }\n break;\n\n case \"nested\":\n // Validate nested object fields\n if (\n typeof value !== \"object\" ||\n value === null ||\n Array.isArray(value) ||\n value instanceof Date\n ) {\n issues.push({\n message: `Expected an object: received ${String(value)}`,\n path: pathArray.length > 0 ? pathArray : undefined,\n });\n } else if (field.fields && Object.keys(field.fields).length > 0) {\n for (const [fieldName, nestedField] of Object.entries(field.fields)) {\n const fieldValue = value?.[fieldName];\n const result = nestedField._parseInternal({\n value: fieldValue,\n data,\n user,\n pathArray: pathArray.concat(fieldName),\n });\n if (result.issues) {\n issues.push(...result.issues);\n }\n }\n }\n break;\n }\n\n // Custom validation functions\n const validateFns = field._metadata.validate;\n if (validateFns && validateFns.length > 0) {\n for (const validateInput of validateFns) {\n const { fn, message } =\n typeof validateInput === \"function\"\n ? { fn: validateInput, message: \"Validation failed\" }\n : { fn: validateInput[0], message: validateInput[1] };\n\n if (!fn({ value, data, user })) {\n issues.push({\n message,\n path: pathArray.length > 0 ? pathArray : undefined,\n });\n }\n }\n }\n\n return issues;\n }\n\n /**\n * Internal parse method that tracks field path for nested validation\n * @param args - Parse arguments\n * @returns Parse result with value or issues\n */\n function parseInternal(\n args: FieldParseInternalArgs,\n ): StandardSchemaV1.Result<FieldOutput<OutputBase, TOptions>> {\n const { value, data, user, pathArray } = args;\n const issues: StandardSchemaV1.Issue[] = [];\n\n // 1. Check required/optional\n const isNullOrUndefined = value === null || value === undefined;\n if (field._metadata.required && isNullOrUndefined) {\n issues.push({\n message: \"Required field is missing\",\n path: pathArray.length > 0 ? pathArray : undefined,\n });\n return { issues };\n }\n\n // If optional and null/undefined, skip further validation and normalize to null\n if (!field._metadata.required && isNullOrUndefined) {\n return { value: value ?? null };\n }\n\n // 2. Check array type\n if (field._metadata.array) {\n if (!Array.isArray(value)) {\n issues.push({\n message: \"Expected an array\",\n path: pathArray.length > 0 ? pathArray : undefined,\n });\n return { issues };\n }\n\n // Validate each array element (without array flag)\n for (let i = 0; i < value.length; i++) {\n const elementValue = value[i];\n const elementPath = pathArray.concat(`[${i}]`);\n\n // Validate element with same type but without array flag\n const elementIssues = validateValue({\n value: elementValue,\n data,\n user,\n pathArray: elementPath,\n });\n if (elementIssues.length > 0) {\n issues.push(...elementIssues);\n }\n }\n\n if (issues.length > 0) {\n return { issues };\n }\n return { value: value as FieldOutput<OutputBase, TOptions> };\n }\n\n // 3. Type-specific validation and custom validation\n const valueIssues = validateValue({ value, data, user, pathArray });\n issues.push(...valueIssues);\n\n if (issues.length > 0) {\n return { issues };\n }\n\n return { value };\n }\n\n const field: TailorField<\n { type: T; array: TOptions extends { array: true } ? true : false },\n FieldOutput<OutputBase, TOptions>\n > = {\n type,\n fields: fields ?? {},\n _defined: undefined as unknown as {\n type: T;\n array: TOptions extends { array: true } ? true : false;\n },\n _output: undefined as FieldOutput<OutputBase, TOptions>,\n _metadata,\n\n get metadata() {\n return { ...this._metadata };\n },\n\n description(description: string) {\n this._metadata.description = description;\n // Fluent API returns this with updated type\n // oxlint-disable-next-line no-explicit-any\n return this as any;\n },\n\n typeName(typeName: string) {\n this._metadata.typeName = typeName;\n // Fluent API returns this with updated type\n // oxlint-disable-next-line no-explicit-any\n return this as any;\n },\n\n validate(...validateInputs: FieldValidateInput<FieldOutput<OutputBase, TOptions>>[]) {\n this._metadata.validate = validateInputs;\n // Fluent API returns this with updated type\n // oxlint-disable-next-line no-explicit-any\n return this as any;\n },\n\n parse(args: FieldParseArgs): StandardSchemaV1.Result<FieldOutput<OutputBase, TOptions>> {\n return parseInternal({\n value: args.value,\n data: args.data,\n user: args.user,\n pathArray: [],\n });\n },\n\n _parseInternal: parseInternal,\n };\n\n return field;\n}\n\n/**\n * Create a UUID field for resolver input/output.\n * @param options - Field configuration options\n * @returns A UUID field\n * @example t.uuid()\n */\nfunction uuid<const Opt extends FieldOptions>(options?: Opt) {\n return createTailorField(\"uuid\", options);\n}\n\n/**\n * Create a string field for resolver input/output.\n * @param options - Field configuration options\n * @returns A string field\n * @example t.string()\n * @example t.string({ optional: true })\n * @example t.string({ array: true })\n */\nfunction string<const Opt extends FieldOptions>(options?: Opt) {\n return createTailorField(\"string\", options);\n}\n\n/**\n * Create a boolean field for resolver input/output.\n * @param options - Field configuration options\n * @returns A boolean field\n * @example t.bool()\n */\nfunction bool<const Opt extends FieldOptions>(options?: Opt) {\n return createTailorField(\"boolean\", options);\n}\n\n/**\n * Create an integer field for resolver input/output.\n * @param options - Field configuration options\n * @returns An integer field\n * @example t.int()\n */\nfunction int<const Opt extends FieldOptions>(options?: Opt) {\n return createTailorField(\"integer\", options);\n}\n\n/**\n * Create a float field for resolver input/output.\n * @param options - Field configuration options\n * @returns A float field\n * @example t.float()\n */\nfunction float<const Opt extends FieldOptions>(options?: Opt) {\n return createTailorField(\"float\", options);\n}\n\n/**\n * Create a decimal field for resolver input/output (stored as string for precision).\n * @param options - Field configuration options\n * @returns A decimal field\n * @example t.decimal()\n * @example t.decimal({ optional: true })\n */\nfunction decimal<const Opt extends FieldOptions>(options?: Opt) {\n return createTailorField(\"decimal\", options);\n}\n\n/**\n * Create a date field for resolver input/output.\n * @param options - Field configuration options\n * @returns A date field\n * @example t.date()\n */\nfunction date<const Opt extends FieldOptions>(options?: Opt) {\n return createTailorField(\"date\", options);\n}\n\n/**\n * Create a datetime field for resolver input/output.\n * @param options - Field configuration options\n * @returns A datetime field\n * @example t.datetime()\n */\nfunction datetime<const Opt extends FieldOptions>(options?: Opt) {\n return createTailorField(\"datetime\", options);\n}\n\n/**\n * Create a time field for resolver input/output.\n * @param options - Field configuration options\n * @returns A time field\n * @example t.time()\n */\nfunction time<const Opt extends FieldOptions>(options?: Opt) {\n return createTailorField(\"time\", options);\n}\n\n/**\n * Create an enum field for resolver input/output.\n * @param values - Array of allowed string values\n * @param options - Field configuration options\n * @returns An enum field\n * @example t.enum([\"active\", \"inactive\"])\n */\nfunction _enum<const V extends AllowedValues, const Opt extends FieldOptions>(\n values: V,\n options?: Opt,\n): TailorField<\n { type: \"enum\"; array: Opt extends { array: true } ? true : false },\n FieldOutput<AllowedValuesOutput<V>, Opt>\n> {\n return createTailorField<\"enum\", Opt, AllowedValuesOutput<V>>(\"enum\", options, undefined, values);\n}\n\n/**\n * Create a nested object field for resolver input/output.\n * @param fields - Record of field definitions\n * @param options - Field options (optional, array)\n * @returns A nested object field\n * @example\n * // Single object:\n * output: t.object({ name: t.string(), email: t.string() })\n * @example\n * // Array of objects:\n * items: t.object({ name: t.string() }, { array: true })\n */\nfunction object<const F extends Record<string, TailorAnyField>, const Opt extends FieldOptions>(\n fields: F,\n options?: Opt,\n) {\n const objectField = createTailorField(\"nested\", options, fields) as TailorField<\n { type: \"nested\"; array: Opt extends { array: true } ? true : false },\n FieldOutput<InferFieldsOutput<F>, Opt>\n >;\n return objectField;\n}\n\nexport const t = {\n uuid,\n string,\n bool,\n int,\n float,\n decimal,\n date,\n datetime,\n time,\n enum: _enum,\n object,\n};\n","// Interfaces for module augmentation\n// Users can extend these via: declare module \"@tailor-platform/sdk\" { interface AttributeMap { ... } }\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface AttributeMap {}\nexport interface AttributeList {\n __tuple?: []; // Marker for tuple type\n}\n\nexport type InferredAttributeMap = keyof AttributeMap extends never\n ? Record<string, string | string[] | boolean | boolean[] | undefined>\n : AttributeMap;\n\nexport type InferredAttributeList = AttributeList[\"__tuple\"] extends []\n ? string[]\n : AttributeList[\"__tuple\"];\n\n/** Represents a user in the Tailor platform. */\nexport type TailorUser = {\n /**\n * The ID of the user.\n * For unauthenticated users, this will be a nil UUID.\n */\n id: string;\n /**\n * The type of the user.\n * For unauthenticated users, this will be an empty string.\n */\n type: \"user\" | \"machine_user\" | \"\";\n /** The ID of the workspace the user belongs to. */\n workspaceId: string;\n /**\n * A map of the user's attributes.\n * For unauthenticated users, this will be null.\n */\n attributes: InferredAttributeMap | null;\n /**\n * A list of the user's attributes.\n * For unauthenticated users, this will be an empty array.\n */\n attributeList: InferredAttributeList;\n};\n\n/** Represents an unauthenticated user in the Tailor platform. */\nexport const unauthenticatedTailorUser: TailorUser = {\n id: \"00000000-0000-0000-0000-000000000000\",\n type: \"\",\n workspaceId: \"00000000-0000-0000-0000-000000000000\",\n attributes: null,\n attributeList: [],\n};\n"],"mappings":";;;;;;;AAWA,SAAgB,iBAAiB,QAAuC;AACtE,QAAO,OAAO,KAAK,UAAU;AAC3B,MAAI,OAAO,UAAU,SACnB,QAAO;GAAE;GAAO,aAAa;GAAI;AAEnC,SAAO;GAAE,GAAG;GAAO,aAAa,MAAM,eAAe;GAAI;GACzD;;;;;ACFJ,MAAM,QAAQ;CACZ,MAAM;CACN,MAAM;CACN,MAAM;CACN,UACE;CACF,SAAS;CACV;;;;;;;;;AAiHD,SAAS,kBAKP,MACA,SACA,QACA,QAIA;CACA,MAAM,YAA2B,EAAE,UAAU,MAAM;AAEnD,KAAI,SAAS;AACX,MAAI,QAAQ,aAAa,KACvB,WAAU,WAAW;AAEvB,MAAI,QAAQ,UAAU,KACpB,WAAU,QAAQ;;AAGtB,KAAI,OACF,WAAU,gBAAgB,iBAAiB,OAAO;;;;;;;CASpD,SAAS,cAAc,MAA2D;EAChF,MAAM,EAAE,OAAO,MAAM,MAAM,cAAc;EACzC,MAAM,SAAmC,EAAE;AAG3C,UAAQ,MAAR;GACE,KAAK;AACH,QAAI,OAAO,UAAU,SACnB,QAAO,KAAK;KACV,SAAS,+BAA+B,OAAO,MAAM;KACrD,MAAM,UAAU,SAAS,IAAI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AAwC;CACnD,IAAI;CACJ,MAAM;CACN,aAAa;CACb,YAAY;CACZ,eAAe,EAAE;CAClB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { U as TailorDBType, rt as TailorField } from "../../plugin-
|
|
3
|
-
import {
|
|
2
|
+
import { U as TailorDBType, rt as TailorField } from "../../plugin-D6P4g_2L.mjs";
|
|
3
|
+
import { n as output, rt as WORKFLOW_TEST_ENV_KEY } from "../../index-BVJQLjyN.mjs";
|
|
4
4
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
5
5
|
|
|
6
6
|
//#region src/utils/test/mock.d.ts
|