@or-sdk/library-types-v2 6.0.2 → 6.0.4
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 +14 -0
- package/dist/Packages/params.d.ts +10 -10
- package/dist/index.js +194 -61
- package/dist/index.js.map +3 -3
- package/package.json +3 -3
- package/src/Packages/params.ts +13 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @or-sdk/library-types
|
|
2
2
|
|
|
3
|
+
## 6.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 47edc270: add releases and include deprecated, etc for get lastest package, try to fix categories param on get packages
|
|
8
|
+
|
|
9
|
+
## 6.0.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 0d145a33: fix zod intersection error, bump prisma from 5.4.1 => 5.4.2, zod 3.22.3 => 3.22.4
|
|
14
|
+
- Updated dependencies [0d145a33]
|
|
15
|
+
- @or-sdk/library-prisma@6.0.6
|
|
16
|
+
|
|
3
17
|
## 6.0.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -271,8 +271,8 @@ export declare const GetPackageListFilterParams: z.ZodObject<{
|
|
|
271
271
|
ACCOUNT: "ACCOUNT";
|
|
272
272
|
PDE: "PDE";
|
|
273
273
|
}>, "many">]>>, ("USER" | "ACCOUNT" | "PDE")[], "USER" | "ACCOUNT" | "PDE" | ("USER" | "ACCOUNT" | "PDE")[]>;
|
|
274
|
-
category: z.
|
|
275
|
-
id: z.
|
|
274
|
+
category: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>, string[], string | string[]>>;
|
|
275
|
+
id: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>, string[], string | string[]>>;
|
|
276
276
|
}, "strip", z.ZodTypeAny, {
|
|
277
277
|
schemaType?: "UNKNOWN" | "LEGACY" | "EXTERNAL";
|
|
278
278
|
servingType?: string;
|
|
@@ -287,8 +287,8 @@ export declare const GetPackageListFilterParams: z.ZodObject<{
|
|
|
287
287
|
id?: string | string[];
|
|
288
288
|
}>;
|
|
289
289
|
export declare const GetPackageListScopeParams: z.ZodObject<{
|
|
290
|
-
category: z.
|
|
291
|
-
id: z.
|
|
290
|
+
category: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>, string[], string | string[]>>;
|
|
291
|
+
id: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>, string[], string | string[]>>;
|
|
292
292
|
}, "strip", z.ZodTypeAny, {
|
|
293
293
|
category?: string[];
|
|
294
294
|
id?: string[];
|
|
@@ -313,8 +313,8 @@ export declare const GetPackageListParams: z.ZodObject<{
|
|
|
313
313
|
ACCOUNT: "ACCOUNT";
|
|
314
314
|
PDE: "PDE";
|
|
315
315
|
}>, "many">]>>, ("USER" | "ACCOUNT" | "PDE")[], "USER" | "ACCOUNT" | "PDE" | ("USER" | "ACCOUNT" | "PDE")[]>;
|
|
316
|
-
category: z.
|
|
317
|
-
id: z.
|
|
316
|
+
category: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>, string[], string | string[]>>;
|
|
317
|
+
id: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>, string[], string | string[]>>;
|
|
318
318
|
}, "strip", z.ZodTypeAny, {
|
|
319
319
|
schemaType?: "UNKNOWN" | "LEGACY" | "EXTERNAL";
|
|
320
320
|
servingType?: string;
|
|
@@ -329,8 +329,8 @@ export declare const GetPackageListParams: z.ZodObject<{
|
|
|
329
329
|
id?: string | string[];
|
|
330
330
|
}>>;
|
|
331
331
|
scope: z.ZodDefault<z.ZodObject<{
|
|
332
|
-
category: z.
|
|
333
|
-
id: z.
|
|
332
|
+
category: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>, string[], string | string[]>>;
|
|
333
|
+
id: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>, string[], string | string[]>>;
|
|
334
334
|
}, "strip", z.ZodTypeAny, {
|
|
335
335
|
category?: string[];
|
|
336
336
|
id?: string[];
|
|
@@ -403,8 +403,8 @@ export declare const GetPackageParams: z.ZodObject<{
|
|
|
403
403
|
ACCOUNT: "ACCOUNT";
|
|
404
404
|
PDE: "PDE";
|
|
405
405
|
}>, "many">]>>, ("USER" | "ACCOUNT" | "PDE")[], "USER" | "ACCOUNT" | "PDE" | ("USER" | "ACCOUNT" | "PDE")[]>;
|
|
406
|
-
category: z.
|
|
407
|
-
id: z.
|
|
406
|
+
category: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>, string[], string | string[]>>;
|
|
407
|
+
id: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>, string[], string | string[]>>;
|
|
408
408
|
}, "level">, "strip", z.ZodTypeAny, {
|
|
409
409
|
level?: ("USER" | "ACCOUNT" | "PDE")[];
|
|
410
410
|
}, {
|
package/dist/index.js
CHANGED
|
@@ -1157,8 +1157,8 @@ var require_index_browser2 = __commonJS({
|
|
|
1157
1157
|
exports.Prisma = Prisma2;
|
|
1158
1158
|
exports.$Enums = {};
|
|
1159
1159
|
Prisma2.prismaVersion = {
|
|
1160
|
-
client: "5.4.
|
|
1161
|
-
engine: "
|
|
1160
|
+
client: "5.4.2",
|
|
1161
|
+
engine: "ac9d7041ed77bcc8a8dbd2ab6616b39013829574"
|
|
1162
1162
|
};
|
|
1163
1163
|
Prisma2.PrismaClientKnownRequestError = () => {
|
|
1164
1164
|
throw new Error(
|
|
@@ -1619,6 +1619,7 @@ var require_util = __commonJS({
|
|
|
1619
1619
|
return {
|
|
1620
1620
|
...first,
|
|
1621
1621
|
...second
|
|
1622
|
+
// second overwrites first
|
|
1622
1623
|
};
|
|
1623
1624
|
};
|
|
1624
1625
|
})(objectUtil2 = exports.objectUtil || (exports.objectUtil = {}));
|
|
@@ -1984,6 +1985,7 @@ var require_parseUtil = __commonJS({
|
|
|
1984
1985
|
ctx.schemaErrorMap,
|
|
1985
1986
|
(0, errors_1.getErrorMap)(),
|
|
1986
1987
|
en_1.default
|
|
1988
|
+
// then global default map
|
|
1987
1989
|
].filter((x) => !!x)
|
|
1988
1990
|
});
|
|
1989
1991
|
ctx.common.issues.push(issue);
|
|
@@ -2399,10 +2401,11 @@ var require_types = __commonJS({
|
|
|
2399
2401
|
exports.ZodSchema = ZodType2;
|
|
2400
2402
|
var cuidRegex2 = /^c[^\s-]{8,}$/i;
|
|
2401
2403
|
var cuid2Regex2 = /^[a-z][a-z0-9]*$/;
|
|
2402
|
-
var ulidRegex2 =
|
|
2404
|
+
var ulidRegex2 = /^[0-9A-HJKMNP-TV-Z]{26}$/;
|
|
2403
2405
|
var uuidRegex2 = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
|
|
2404
|
-
var emailRegex2 = /^([A-Z0-9_
|
|
2405
|
-
var
|
|
2406
|
+
var emailRegex2 = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
|
|
2407
|
+
var _emojiRegex2 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
|
|
2408
|
+
var emojiRegex2;
|
|
2406
2409
|
var ipv4Regex2 = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;
|
|
2407
2410
|
var ipv6Regex2 = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
|
|
2408
2411
|
var datetimeRegex2 = (args) => {
|
|
@@ -2436,27 +2439,6 @@ var require_types = __commonJS({
|
|
|
2436
2439
|
return false;
|
|
2437
2440
|
}
|
|
2438
2441
|
var ZodString2 = class _ZodString extends ZodType2 {
|
|
2439
|
-
constructor() {
|
|
2440
|
-
super(...arguments);
|
|
2441
|
-
this._regex = (regex, validation, message) => this.refinement((data) => regex.test(data), {
|
|
2442
|
-
validation,
|
|
2443
|
-
code: ZodError_1.ZodIssueCode.invalid_string,
|
|
2444
|
-
...errorUtil_1.errorUtil.errToObj(message)
|
|
2445
|
-
});
|
|
2446
|
-
this.nonempty = (message) => this.min(1, errorUtil_1.errorUtil.errToObj(message));
|
|
2447
|
-
this.trim = () => new _ZodString({
|
|
2448
|
-
...this._def,
|
|
2449
|
-
checks: [...this._def.checks, { kind: "trim" }]
|
|
2450
|
-
});
|
|
2451
|
-
this.toLowerCase = () => new _ZodString({
|
|
2452
|
-
...this._def,
|
|
2453
|
-
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
|
2454
|
-
});
|
|
2455
|
-
this.toUpperCase = () => new _ZodString({
|
|
2456
|
-
...this._def,
|
|
2457
|
-
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
|
2458
|
-
});
|
|
2459
|
-
}
|
|
2460
2442
|
_parse(input) {
|
|
2461
2443
|
if (this._def.coerce) {
|
|
2462
2444
|
input.data = String(input.data);
|
|
@@ -2464,11 +2446,15 @@ var require_types = __commonJS({
|
|
|
2464
2446
|
const parsedType = this._getType(input);
|
|
2465
2447
|
if (parsedType !== util_1.ZodParsedType.string) {
|
|
2466
2448
|
const ctx2 = this._getOrReturnCtx(input);
|
|
2467
|
-
(0, parseUtil_1.addIssueToContext)(
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2449
|
+
(0, parseUtil_1.addIssueToContext)(
|
|
2450
|
+
ctx2,
|
|
2451
|
+
{
|
|
2452
|
+
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
2453
|
+
expected: util_1.ZodParsedType.string,
|
|
2454
|
+
received: ctx2.parsedType
|
|
2455
|
+
}
|
|
2456
|
+
//
|
|
2457
|
+
);
|
|
2472
2458
|
return parseUtil_1.INVALID;
|
|
2473
2459
|
}
|
|
2474
2460
|
const status = new parseUtil_1.ParseStatus();
|
|
@@ -2537,6 +2523,9 @@ var require_types = __commonJS({
|
|
|
2537
2523
|
status.dirty();
|
|
2538
2524
|
}
|
|
2539
2525
|
} else if (check.kind === "emoji") {
|
|
2526
|
+
if (!emojiRegex2) {
|
|
2527
|
+
emojiRegex2 = new RegExp(_emojiRegex2, "u");
|
|
2528
|
+
}
|
|
2540
2529
|
if (!emojiRegex2.test(input.data)) {
|
|
2541
2530
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
2542
2531
|
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
@@ -2673,6 +2662,13 @@ var require_types = __commonJS({
|
|
|
2673
2662
|
}
|
|
2674
2663
|
return { status: status.value, value: input.data };
|
|
2675
2664
|
}
|
|
2665
|
+
_regex(regex, validation, message) {
|
|
2666
|
+
return this.refinement((data) => regex.test(data), {
|
|
2667
|
+
validation,
|
|
2668
|
+
code: ZodError_1.ZodIssueCode.invalid_string,
|
|
2669
|
+
...errorUtil_1.errorUtil.errToObj(message)
|
|
2670
|
+
});
|
|
2671
|
+
}
|
|
2676
2672
|
_addCheck(check) {
|
|
2677
2673
|
return new _ZodString({
|
|
2678
2674
|
...this._def,
|
|
@@ -2770,6 +2766,31 @@ var require_types = __commonJS({
|
|
|
2770
2766
|
...errorUtil_1.errorUtil.errToObj(message)
|
|
2771
2767
|
});
|
|
2772
2768
|
}
|
|
2769
|
+
/**
|
|
2770
|
+
* @deprecated Use z.string().min(1) instead.
|
|
2771
|
+
* @see {@link ZodString.min}
|
|
2772
|
+
*/
|
|
2773
|
+
nonempty(message) {
|
|
2774
|
+
return this.min(1, errorUtil_1.errorUtil.errToObj(message));
|
|
2775
|
+
}
|
|
2776
|
+
trim() {
|
|
2777
|
+
return new _ZodString({
|
|
2778
|
+
...this._def,
|
|
2779
|
+
checks: [...this._def.checks, { kind: "trim" }]
|
|
2780
|
+
});
|
|
2781
|
+
}
|
|
2782
|
+
toLowerCase() {
|
|
2783
|
+
return new _ZodString({
|
|
2784
|
+
...this._def,
|
|
2785
|
+
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
|
2786
|
+
});
|
|
2787
|
+
}
|
|
2788
|
+
toUpperCase() {
|
|
2789
|
+
return new _ZodString({
|
|
2790
|
+
...this._def,
|
|
2791
|
+
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
|
2792
|
+
});
|
|
2793
|
+
}
|
|
2773
2794
|
get isDatetime() {
|
|
2774
2795
|
return !!this._def.checks.find((ch) => ch.kind === "datetime");
|
|
2775
2796
|
}
|
|
@@ -3709,7 +3730,10 @@ var require_types = __commonJS({
|
|
|
3709
3730
|
const value = ctx.data[key];
|
|
3710
3731
|
pairs.push({
|
|
3711
3732
|
key: { status: "valid", value: key },
|
|
3712
|
-
value: catchall._parse(
|
|
3733
|
+
value: catchall._parse(
|
|
3734
|
+
new ParseInputLazyPath2(ctx, value, ctx.path, key)
|
|
3735
|
+
//, ctx.child(key), value, getParsedType(value)
|
|
3736
|
+
),
|
|
3713
3737
|
alwaysSet: key in ctx.data
|
|
3714
3738
|
});
|
|
3715
3739
|
}
|
|
@@ -3768,6 +3792,23 @@ var require_types = __commonJS({
|
|
|
3768
3792
|
unknownKeys: "passthrough"
|
|
3769
3793
|
});
|
|
3770
3794
|
}
|
|
3795
|
+
// const AugmentFactory =
|
|
3796
|
+
// <Def extends ZodObjectDef>(def: Def) =>
|
|
3797
|
+
// <Augmentation extends ZodRawShape>(
|
|
3798
|
+
// augmentation: Augmentation
|
|
3799
|
+
// ): ZodObject<
|
|
3800
|
+
// extendShape<ReturnType<Def["shape"]>, Augmentation>,
|
|
3801
|
+
// Def["unknownKeys"],
|
|
3802
|
+
// Def["catchall"]
|
|
3803
|
+
// > => {
|
|
3804
|
+
// return new ZodObject({
|
|
3805
|
+
// ...def,
|
|
3806
|
+
// shape: () => ({
|
|
3807
|
+
// ...def.shape(),
|
|
3808
|
+
// ...augmentation,
|
|
3809
|
+
// }),
|
|
3810
|
+
// }) as any;
|
|
3811
|
+
// };
|
|
3771
3812
|
extend(augmentation) {
|
|
3772
3813
|
return new _ZodObject({
|
|
3773
3814
|
...this._def,
|
|
@@ -3777,6 +3818,11 @@ var require_types = __commonJS({
|
|
|
3777
3818
|
})
|
|
3778
3819
|
});
|
|
3779
3820
|
}
|
|
3821
|
+
/**
|
|
3822
|
+
* Prior to zod@1.0.12 there was a bug in the
|
|
3823
|
+
* inferred type of merged objects. Please
|
|
3824
|
+
* upgrade if you are experiencing issues.
|
|
3825
|
+
*/
|
|
3780
3826
|
merge(merging) {
|
|
3781
3827
|
const merged = new _ZodObject({
|
|
3782
3828
|
unknownKeys: merging._def.unknownKeys,
|
|
@@ -3789,9 +3835,65 @@ var require_types = __commonJS({
|
|
|
3789
3835
|
});
|
|
3790
3836
|
return merged;
|
|
3791
3837
|
}
|
|
3838
|
+
// merge<
|
|
3839
|
+
// Incoming extends AnyZodObject,
|
|
3840
|
+
// Augmentation extends Incoming["shape"],
|
|
3841
|
+
// NewOutput extends {
|
|
3842
|
+
// [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation
|
|
3843
|
+
// ? Augmentation[k]["_output"]
|
|
3844
|
+
// : k extends keyof Output
|
|
3845
|
+
// ? Output[k]
|
|
3846
|
+
// : never;
|
|
3847
|
+
// },
|
|
3848
|
+
// NewInput extends {
|
|
3849
|
+
// [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation
|
|
3850
|
+
// ? Augmentation[k]["_input"]
|
|
3851
|
+
// : k extends keyof Input
|
|
3852
|
+
// ? Input[k]
|
|
3853
|
+
// : never;
|
|
3854
|
+
// }
|
|
3855
|
+
// >(
|
|
3856
|
+
// merging: Incoming
|
|
3857
|
+
// ): ZodObject<
|
|
3858
|
+
// extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
|
|
3859
|
+
// Incoming["_def"]["unknownKeys"],
|
|
3860
|
+
// Incoming["_def"]["catchall"],
|
|
3861
|
+
// NewOutput,
|
|
3862
|
+
// NewInput
|
|
3863
|
+
// > {
|
|
3864
|
+
// const merged: any = new ZodObject({
|
|
3865
|
+
// unknownKeys: merging._def.unknownKeys,
|
|
3866
|
+
// catchall: merging._def.catchall,
|
|
3867
|
+
// shape: () =>
|
|
3868
|
+
// objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
|
|
3869
|
+
// typeName: ZodFirstPartyTypeKind.ZodObject,
|
|
3870
|
+
// }) as any;
|
|
3871
|
+
// return merged;
|
|
3872
|
+
// }
|
|
3792
3873
|
setKey(key, schema) {
|
|
3793
3874
|
return this.augment({ [key]: schema });
|
|
3794
3875
|
}
|
|
3876
|
+
// merge<Incoming extends AnyZodObject>(
|
|
3877
|
+
// merging: Incoming
|
|
3878
|
+
// ): //ZodObject<T & Incoming["_shape"], UnknownKeys, Catchall> = (merging) => {
|
|
3879
|
+
// ZodObject<
|
|
3880
|
+
// extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
|
|
3881
|
+
// Incoming["_def"]["unknownKeys"],
|
|
3882
|
+
// Incoming["_def"]["catchall"]
|
|
3883
|
+
// > {
|
|
3884
|
+
// // const mergedShape = objectUtil.mergeShapes(
|
|
3885
|
+
// // this._def.shape(),
|
|
3886
|
+
// // merging._def.shape()
|
|
3887
|
+
// // );
|
|
3888
|
+
// const merged: any = new ZodObject({
|
|
3889
|
+
// unknownKeys: merging._def.unknownKeys,
|
|
3890
|
+
// catchall: merging._def.catchall,
|
|
3891
|
+
// shape: () =>
|
|
3892
|
+
// objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
|
|
3893
|
+
// typeName: ZodFirstPartyTypeKind.ZodObject,
|
|
3894
|
+
// }) as any;
|
|
3895
|
+
// return merged;
|
|
3896
|
+
// }
|
|
3795
3897
|
catchall(index) {
|
|
3796
3898
|
return new _ZodObject({
|
|
3797
3899
|
...this._def,
|
|
@@ -3822,6 +3924,9 @@ var require_types = __commonJS({
|
|
|
3822
3924
|
shape: () => shape
|
|
3823
3925
|
});
|
|
3824
3926
|
}
|
|
3927
|
+
/**
|
|
3928
|
+
* @deprecated
|
|
3929
|
+
*/
|
|
3825
3930
|
deepPartial() {
|
|
3826
3931
|
return deepPartialify2(this);
|
|
3827
3932
|
}
|
|
@@ -4049,6 +4154,14 @@ var require_types = __commonJS({
|
|
|
4049
4154
|
get optionsMap() {
|
|
4050
4155
|
return this._def.optionsMap;
|
|
4051
4156
|
}
|
|
4157
|
+
/**
|
|
4158
|
+
* The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.
|
|
4159
|
+
* However, it only allows a union of objects, all of which need to share a discriminator property. This property must
|
|
4160
|
+
* have a different value for each object in the union.
|
|
4161
|
+
* @param discriminator the name of the discriminator property
|
|
4162
|
+
* @param types an array of object schemas
|
|
4163
|
+
* @param params
|
|
4164
|
+
*/
|
|
4052
4165
|
static create(discriminator, options, params) {
|
|
4053
4166
|
const optionsMap = /* @__PURE__ */ new Map();
|
|
4054
4167
|
for (const type of options) {
|
|
@@ -8069,10 +8182,11 @@ var ZodType = class {
|
|
|
8069
8182
|
};
|
|
8070
8183
|
var cuidRegex = /^c[^\s-]{8,}$/i;
|
|
8071
8184
|
var cuid2Regex = /^[a-z][a-z0-9]*$/;
|
|
8072
|
-
var ulidRegex =
|
|
8185
|
+
var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;
|
|
8073
8186
|
var uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
|
|
8074
|
-
var emailRegex = /^([A-Z0-9_
|
|
8075
|
-
var
|
|
8187
|
+
var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
|
|
8188
|
+
var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
|
|
8189
|
+
var emojiRegex;
|
|
8076
8190
|
var ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;
|
|
8077
8191
|
var ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
|
|
8078
8192
|
var datetimeRegex = (args) => {
|
|
@@ -8106,27 +8220,6 @@ function isValidIP(ip, version) {
|
|
|
8106
8220
|
return false;
|
|
8107
8221
|
}
|
|
8108
8222
|
var ZodString = class _ZodString extends ZodType {
|
|
8109
|
-
constructor() {
|
|
8110
|
-
super(...arguments);
|
|
8111
|
-
this._regex = (regex, validation, message) => this.refinement((data) => regex.test(data), {
|
|
8112
|
-
validation,
|
|
8113
|
-
code: ZodIssueCode.invalid_string,
|
|
8114
|
-
...errorUtil.errToObj(message)
|
|
8115
|
-
});
|
|
8116
|
-
this.nonempty = (message) => this.min(1, errorUtil.errToObj(message));
|
|
8117
|
-
this.trim = () => new _ZodString({
|
|
8118
|
-
...this._def,
|
|
8119
|
-
checks: [...this._def.checks, { kind: "trim" }]
|
|
8120
|
-
});
|
|
8121
|
-
this.toLowerCase = () => new _ZodString({
|
|
8122
|
-
...this._def,
|
|
8123
|
-
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
|
8124
|
-
});
|
|
8125
|
-
this.toUpperCase = () => new _ZodString({
|
|
8126
|
-
...this._def,
|
|
8127
|
-
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
|
8128
|
-
});
|
|
8129
|
-
}
|
|
8130
8223
|
_parse(input) {
|
|
8131
8224
|
if (this._def.coerce) {
|
|
8132
8225
|
input.data = String(input.data);
|
|
@@ -8211,6 +8304,9 @@ var ZodString = class _ZodString extends ZodType {
|
|
|
8211
8304
|
status.dirty();
|
|
8212
8305
|
}
|
|
8213
8306
|
} else if (check.kind === "emoji") {
|
|
8307
|
+
if (!emojiRegex) {
|
|
8308
|
+
emojiRegex = new RegExp(_emojiRegex, "u");
|
|
8309
|
+
}
|
|
8214
8310
|
if (!emojiRegex.test(input.data)) {
|
|
8215
8311
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
8216
8312
|
addIssueToContext(ctx, {
|
|
@@ -8347,6 +8443,13 @@ var ZodString = class _ZodString extends ZodType {
|
|
|
8347
8443
|
}
|
|
8348
8444
|
return { status: status.value, value: input.data };
|
|
8349
8445
|
}
|
|
8446
|
+
_regex(regex, validation, message) {
|
|
8447
|
+
return this.refinement((data) => regex.test(data), {
|
|
8448
|
+
validation,
|
|
8449
|
+
code: ZodIssueCode.invalid_string,
|
|
8450
|
+
...errorUtil.errToObj(message)
|
|
8451
|
+
});
|
|
8452
|
+
}
|
|
8350
8453
|
_addCheck(check) {
|
|
8351
8454
|
return new _ZodString({
|
|
8352
8455
|
...this._def,
|
|
@@ -8444,6 +8547,31 @@ var ZodString = class _ZodString extends ZodType {
|
|
|
8444
8547
|
...errorUtil.errToObj(message)
|
|
8445
8548
|
});
|
|
8446
8549
|
}
|
|
8550
|
+
/**
|
|
8551
|
+
* @deprecated Use z.string().min(1) instead.
|
|
8552
|
+
* @see {@link ZodString.min}
|
|
8553
|
+
*/
|
|
8554
|
+
nonempty(message) {
|
|
8555
|
+
return this.min(1, errorUtil.errToObj(message));
|
|
8556
|
+
}
|
|
8557
|
+
trim() {
|
|
8558
|
+
return new _ZodString({
|
|
8559
|
+
...this._def,
|
|
8560
|
+
checks: [...this._def.checks, { kind: "trim" }]
|
|
8561
|
+
});
|
|
8562
|
+
}
|
|
8563
|
+
toLowerCase() {
|
|
8564
|
+
return new _ZodString({
|
|
8565
|
+
...this._def,
|
|
8566
|
+
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
|
8567
|
+
});
|
|
8568
|
+
}
|
|
8569
|
+
toUpperCase() {
|
|
8570
|
+
return new _ZodString({
|
|
8571
|
+
...this._def,
|
|
8572
|
+
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
|
8573
|
+
});
|
|
8574
|
+
}
|
|
8447
8575
|
get isDatetime() {
|
|
8448
8576
|
return !!this._def.checks.find((ch) => ch.kind === "datetime");
|
|
8449
8577
|
}
|
|
@@ -11206,7 +11334,12 @@ var GetPackageReleaseResponse = PackageReleaseModelResponse.merge(
|
|
|
11206
11334
|
|
|
11207
11335
|
// src/Packages/params.ts
|
|
11208
11336
|
var import_library_prisma4 = __toESM(require_dist());
|
|
11209
|
-
var
|
|
11337
|
+
var PackageArrayOfStringParam = z.array(z.string()).or(z.string()).transform((data) => {
|
|
11338
|
+
if (!Array.isArray(data)) {
|
|
11339
|
+
data = [data];
|
|
11340
|
+
}
|
|
11341
|
+
return data.filter((item) => !!item);
|
|
11342
|
+
}).default([]);
|
|
11210
11343
|
var UniversalPackageTypeParams = z.object({
|
|
11211
11344
|
type: z.nativeEnum(import_library_prisma4.PackageTypeEnum)
|
|
11212
11345
|
});
|
|
@@ -11252,12 +11385,12 @@ var GetPackageListFilterParams = z.object({
|
|
|
11252
11385
|
import_library_prisma4.PackageStatusDetailsLevelEnum.ACCOUNT,
|
|
11253
11386
|
import_library_prisma4.PackageStatusDetailsLevelEnum.PDE
|
|
11254
11387
|
]).transform((data) => Array.isArray(data) ? data : [data]),
|
|
11255
|
-
category:
|
|
11256
|
-
id:
|
|
11388
|
+
category: PackageArrayOfStringParam,
|
|
11389
|
+
id: PackageArrayOfStringParam
|
|
11257
11390
|
});
|
|
11258
11391
|
var GetPackageListScopeParams = z.object({
|
|
11259
|
-
category:
|
|
11260
|
-
id:
|
|
11392
|
+
category: PackageArrayOfStringParam,
|
|
11393
|
+
id: PackageArrayOfStringParam
|
|
11261
11394
|
});
|
|
11262
11395
|
var GetPackageListParams = z.object({
|
|
11263
11396
|
filter: GetPackageListFilterParams.default({}),
|