@or-sdk/library-types-v1 6.0.9 → 6.0.10
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 +6 -0
- package/dist/cjs/index.js +272 -552
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/index.js +272 -552
- package/dist/esm/index.js.map +4 -4
- package/dist/types/Packages/param.d.ts +3 -0
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1301,6 +1301,7 @@ In case this error is unexpected for you, please report it in https://github.com
|
|
|
1301
1301
|
updatedAt: "updatedAt",
|
|
1302
1302
|
version: "version",
|
|
1303
1303
|
versionInt: "versionInt",
|
|
1304
|
+
prerelease: "prerelease",
|
|
1304
1305
|
type: "type",
|
|
1305
1306
|
servingType: "servingType",
|
|
1306
1307
|
label: "label",
|
|
@@ -5424,648 +5425,365 @@ var require_lib = __commonJS({
|
|
|
5424
5425
|
}
|
|
5425
5426
|
});
|
|
5426
5427
|
|
|
5427
|
-
//
|
|
5428
|
+
// ../prisma/node_modules/nestjs-zod/dist/z.js
|
|
5428
5429
|
var require_z = __commonJS({
|
|
5429
|
-
"
|
|
5430
|
+
"../prisma/node_modules/nestjs-zod/dist/z.js"(exports) {
|
|
5430
5431
|
"use strict";
|
|
5431
5432
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5432
|
-
var
|
|
5433
|
-
function
|
|
5434
|
-
if (
|
|
5435
|
-
return
|
|
5436
|
-
var
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
m.forEach(function(e) {
|
|
5455
|
-
e && typeof e !== "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
|
|
5456
|
-
if (k !== "default" && !(k in n)) {
|
|
5457
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
5458
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
5459
|
-
enumerable: true,
|
|
5460
|
-
get: function() {
|
|
5461
|
-
return e[k];
|
|
5462
|
-
}
|
|
5463
|
-
});
|
|
5433
|
+
var e = require_lib();
|
|
5434
|
+
function t(e2) {
|
|
5435
|
+
if (e2 && e2.__esModule)
|
|
5436
|
+
return e2;
|
|
5437
|
+
var t2 = /* @__PURE__ */ Object.create(null);
|
|
5438
|
+
return e2 && Object.keys(e2).forEach(function(r2) {
|
|
5439
|
+
if ("default" !== r2) {
|
|
5440
|
+
var s2 = Object.getOwnPropertyDescriptor(e2, r2);
|
|
5441
|
+
Object.defineProperty(t2, r2, s2.get ? s2 : { enumerable: true, get: function() {
|
|
5442
|
+
return e2[r2];
|
|
5443
|
+
} });
|
|
5444
|
+
}
|
|
5445
|
+
}), t2.default = e2, Object.freeze(t2);
|
|
5446
|
+
}
|
|
5447
|
+
function r(e2, t2) {
|
|
5448
|
+
return t2.forEach(function(t3) {
|
|
5449
|
+
t3 && "string" != typeof t3 && !Array.isArray(t3) && Object.keys(t3).forEach(function(r2) {
|
|
5450
|
+
if ("default" !== r2 && !(r2 in e2)) {
|
|
5451
|
+
var s2 = Object.getOwnPropertyDescriptor(t3, r2);
|
|
5452
|
+
Object.defineProperty(e2, r2, s2.get ? s2 : { enumerable: true, get: function() {
|
|
5453
|
+
return t3[r2];
|
|
5454
|
+
} });
|
|
5464
5455
|
}
|
|
5465
5456
|
});
|
|
5466
|
-
});
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
function composeMappers(mappers) {
|
|
5476
|
-
return (issue) => {
|
|
5477
|
-
for (const mapper2 of mappers) {
|
|
5478
|
-
const result = mapper2(issue);
|
|
5479
|
-
if (!result.matched)
|
|
5480
|
-
continue;
|
|
5481
|
-
return result;
|
|
5482
|
-
}
|
|
5483
|
-
return { matched: false };
|
|
5484
|
-
};
|
|
5485
|
-
}
|
|
5486
|
-
function createCustomMapper(map) {
|
|
5487
|
-
return (issue) => {
|
|
5488
|
-
if (!isNestJsZodIssue(issue))
|
|
5489
|
-
return { matched: false };
|
|
5490
|
-
const result = map(issue.params);
|
|
5491
|
-
if (!result.matched)
|
|
5457
|
+
}), Object.freeze(e2);
|
|
5458
|
+
}
|
|
5459
|
+
var s = t(e);
|
|
5460
|
+
function a(e2) {
|
|
5461
|
+
return (t2) => {
|
|
5462
|
+
if (!function(e3) {
|
|
5463
|
+
var t3;
|
|
5464
|
+
return "custom" === e3.code && (null == (t3 = e3.params) ? void 0 : t3.isNestJsZod);
|
|
5465
|
+
}(t2))
|
|
5492
5466
|
return { matched: false };
|
|
5493
|
-
|
|
5467
|
+
const r2 = e2(t2.params);
|
|
5468
|
+
return r2.matched ? r2 : { matched: false };
|
|
5494
5469
|
};
|
|
5495
5470
|
}
|
|
5496
|
-
function
|
|
5497
|
-
return (
|
|
5498
|
-
if (
|
|
5471
|
+
function n(t2, r2) {
|
|
5472
|
+
return (s2) => {
|
|
5473
|
+
if (s2.code !== e.ZodIssueCode.too_small && s2.code !== e.ZodIssueCode.too_big)
|
|
5499
5474
|
return { matched: false };
|
|
5500
|
-
|
|
5501
|
-
if (issue.type !== valueType) {
|
|
5475
|
+
if (s2.type !== t2)
|
|
5502
5476
|
return { matched: false };
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
if (!result.matched)
|
|
5506
|
-
return { matched: false };
|
|
5507
|
-
return result;
|
|
5477
|
+
const a2 = r2(s2);
|
|
5478
|
+
return a2.matched ? a2 : { matched: false };
|
|
5508
5479
|
};
|
|
5509
5480
|
}
|
|
5510
|
-
var
|
|
5511
|
-
if (
|
|
5512
|
-
|
|
5513
|
-
return { matched: true, message };
|
|
5481
|
+
var i = a((e2) => {
|
|
5482
|
+
if ("invalid_date_string" === e2.code) {
|
|
5483
|
+
return { matched: true, message: "Invalid string, expected it to be a valid date" };
|
|
5514
5484
|
}
|
|
5515
|
-
if (
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
};
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
return { matched: true, message };
|
|
5523
|
-
}
|
|
5524
|
-
if (params.code === "invalid_date_string_direction") {
|
|
5525
|
-
const message = `Invalid date, expected it to be the ${params.expected}`;
|
|
5526
|
-
return { matched: true, message };
|
|
5527
|
-
}
|
|
5528
|
-
if (params.code === "invalid_date_string_day") {
|
|
5529
|
-
const mapper2 = {
|
|
5530
|
-
weekDay: "week day",
|
|
5531
|
-
weekend: "weekend"
|
|
5532
|
-
};
|
|
5533
|
-
const readable = mapper2[params.expected];
|
|
5534
|
-
const message = `Invalid date, expected it to be a ${readable}`;
|
|
5535
|
-
return { matched: true, message };
|
|
5485
|
+
if ("invalid_date_string_format" === e2.code) {
|
|
5486
|
+
return { matched: true, message: `Invalid date, expected it to match ${{ date: 'YYYY-MM-DD (RFC3339 "full-date")', "date-time": 'YYYY-MM-DDTHH:mm:ssZ (RFC3339 "date-time")' }[e2.expected]}` };
|
|
5487
|
+
}
|
|
5488
|
+
if ("invalid_date_string_direction" === e2.code) {
|
|
5489
|
+
return { matched: true, message: `Invalid date, expected it to be the ${e2.expected}` };
|
|
5490
|
+
}
|
|
5491
|
+
if ("invalid_date_string_day" === e2.code) {
|
|
5492
|
+
return { matched: true, message: `Invalid date, expected it to be a ${{ weekDay: "week day", weekend: "weekend" }[e2.expected]}` };
|
|
5536
5493
|
}
|
|
5537
5494
|
return { matched: false };
|
|
5538
5495
|
});
|
|
5539
|
-
var
|
|
5540
|
-
if (
|
|
5541
|
-
|
|
5542
|
-
const message = `Year must be greater than ${appendix}${issue.minimum}`;
|
|
5543
|
-
return { matched: true, message };
|
|
5496
|
+
var o = n("date_string_year", (t2) => {
|
|
5497
|
+
if (t2.code === e.ZodIssueCode.too_small) {
|
|
5498
|
+
return { matched: true, message: `Year must be greater than ${t2.inclusive ? "or equal to " : ""}${t2.minimum}` };
|
|
5544
5499
|
}
|
|
5545
|
-
if (
|
|
5546
|
-
|
|
5547
|
-
const message = `Year must be less than ${appendix}${issue.maximum}`;
|
|
5548
|
-
return { matched: true, message };
|
|
5500
|
+
if (t2.code === e.ZodIssueCode.too_big) {
|
|
5501
|
+
return { matched: true, message: `Year must be less than ${t2.inclusive ? "or equal to " : ""}${t2.maximum}` };
|
|
5549
5502
|
}
|
|
5550
5503
|
return { matched: false };
|
|
5551
5504
|
});
|
|
5552
|
-
var
|
|
5553
|
-
if (
|
|
5554
|
-
|
|
5555
|
-
return { matched: true, message };
|
|
5505
|
+
var d = a((e2) => {
|
|
5506
|
+
if ("invalid_password_no_digit" === e2.code) {
|
|
5507
|
+
return { matched: true, message: "Password must contain at least one digit" };
|
|
5556
5508
|
}
|
|
5557
|
-
if (
|
|
5558
|
-
|
|
5559
|
-
return { matched: true, message };
|
|
5509
|
+
if ("invalid_password_no_lowercase" === e2.code) {
|
|
5510
|
+
return { matched: true, message: "Password must contain at least one lowercase letter" };
|
|
5560
5511
|
}
|
|
5561
|
-
if (
|
|
5562
|
-
|
|
5563
|
-
return { matched: true, message };
|
|
5512
|
+
if ("invalid_password_no_uppercase" === e2.code) {
|
|
5513
|
+
return { matched: true, message: "Password must contain at least one uppercase letter" };
|
|
5564
5514
|
}
|
|
5565
|
-
if (
|
|
5566
|
-
|
|
5567
|
-
return { matched: true, message };
|
|
5515
|
+
if ("invalid_password_no_special" === e2.code) {
|
|
5516
|
+
return { matched: true, message: "Password must contain at least one special symbol" };
|
|
5568
5517
|
}
|
|
5569
5518
|
return { matched: false };
|
|
5570
5519
|
});
|
|
5571
|
-
var
|
|
5572
|
-
if (
|
|
5573
|
-
|
|
5574
|
-
const message = `Password length must be greater than ${appendix}${issue.minimum}`;
|
|
5575
|
-
return { matched: true, message };
|
|
5520
|
+
var c = n("password", (t2) => {
|
|
5521
|
+
if (t2.code === e.ZodIssueCode.too_small) {
|
|
5522
|
+
return { matched: true, message: `Password length must be greater than ${t2.inclusive ? "or equal to " : ""}${t2.minimum}` };
|
|
5576
5523
|
}
|
|
5577
|
-
if (
|
|
5578
|
-
|
|
5579
|
-
const message = `Password length must be less than ${appendix}${issue.maximum}`;
|
|
5580
|
-
return { matched: true, message };
|
|
5524
|
+
if (t2.code === e.ZodIssueCode.too_big) {
|
|
5525
|
+
return { matched: true, message: `Password length must be less than ${t2.inclusive ? "or equal to " : ""}${t2.maximum}` };
|
|
5581
5526
|
}
|
|
5582
5527
|
return { matched: false };
|
|
5583
5528
|
});
|
|
5584
|
-
var
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
]);
|
|
5590
|
-
var extendedErrorMap = (issue, context) => {
|
|
5591
|
-
const result = mapper(issue);
|
|
5592
|
-
if (result.matched) {
|
|
5593
|
-
return { message: result.message };
|
|
5529
|
+
var u = (l = [i, o, d, c], (e2) => {
|
|
5530
|
+
for (const t2 of l) {
|
|
5531
|
+
const r2 = t2(e2);
|
|
5532
|
+
if (r2.matched)
|
|
5533
|
+
return r2;
|
|
5594
5534
|
}
|
|
5595
|
-
return
|
|
5535
|
+
return { matched: false };
|
|
5536
|
+
});
|
|
5537
|
+
var l;
|
|
5538
|
+
var m = (t2, r2) => {
|
|
5539
|
+
const s2 = u(t2);
|
|
5540
|
+
return s2.matched ? { message: s2.message } : e.defaultErrorMap(t2, r2);
|
|
5596
5541
|
};
|
|
5597
|
-
function
|
|
5598
|
-
|
|
5542
|
+
function p(t2) {
|
|
5543
|
+
e.setErrorMap(t2);
|
|
5599
5544
|
}
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
return schema;
|
|
5545
|
+
function f(e2) {
|
|
5546
|
+
return e2;
|
|
5603
5547
|
}
|
|
5604
|
-
|
|
5605
|
-
var
|
|
5606
|
-
var
|
|
5607
|
-
const
|
|
5608
|
-
|
|
5609
|
-
}));
|
|
5610
|
-
return schema;
|
|
5548
|
+
p(m);
|
|
5549
|
+
var g = e.z.union([e.z.string(), e.z.number(), e.z.boolean()]);
|
|
5550
|
+
var h = (t2 = "Expected value to be a JSON-serializable") => {
|
|
5551
|
+
const r2 = e.z.lazy(() => e.z.union([g, e.z.array(r2), e.z.record(r2)], { invalid_type_error: t2 }));
|
|
5552
|
+
return r2;
|
|
5611
5553
|
};
|
|
5612
|
-
function
|
|
5613
|
-
|
|
5554
|
+
function _(t2, r2) {
|
|
5555
|
+
e.addIssueToContext(t2, r2);
|
|
5614
5556
|
}
|
|
5615
|
-
function
|
|
5616
|
-
|
|
5617
|
-
return { message };
|
|
5618
|
-
return message;
|
|
5557
|
+
function y(e2) {
|
|
5558
|
+
return "string" == typeof e2 ? { message: e2 } : e2;
|
|
5619
5559
|
}
|
|
5620
|
-
function
|
|
5621
|
-
if (!
|
|
5560
|
+
function v(e2) {
|
|
5561
|
+
if (!e2)
|
|
5622
5562
|
return {};
|
|
5623
|
-
const { errorMap:
|
|
5624
|
-
if (
|
|
5563
|
+
const { errorMap: t2, invalid_type_error: r2, required_error: s2, description: a2 } = e2;
|
|
5564
|
+
if (t2 && (r2 || s2))
|
|
5625
5565
|
throw new Error(`Can't use "invalid" or "required" in conjunction with custom error map.`);
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
if (__getOwnPropSymbols$1)
|
|
5663
|
-
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
5664
|
-
if (__propIsEnum$1.call(b, prop))
|
|
5665
|
-
__defNormalProp$1(a, prop, b[prop]);
|
|
5666
|
-
}
|
|
5667
|
-
return a;
|
|
5668
|
-
};
|
|
5669
|
-
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
5670
|
-
var formatToRegex = {
|
|
5671
|
-
"date": /^\d{4}-\d{2}-\d{2}$/,
|
|
5672
|
-
"date-time": /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(|\.\d{3})(Z|[+-]\d{2}:\d{2})$/
|
|
5673
|
-
};
|
|
5674
|
-
var _ZodDateString = class extends zod.ZodType {
|
|
5675
|
-
_parse(input) {
|
|
5676
|
-
const parsedType = this._getType(input);
|
|
5677
|
-
const context = this._getOrReturnCtx(input);
|
|
5678
|
-
if (parsedType !== zod.ZodParsedType.string) {
|
|
5679
|
-
addIssueToContextExtended(context, {
|
|
5680
|
-
code: zod.ZodIssueCode.invalid_type,
|
|
5681
|
-
expected: zod.ZodParsedType.string,
|
|
5682
|
-
received: context.parsedType
|
|
5683
|
-
});
|
|
5684
|
-
return zod.INVALID;
|
|
5685
|
-
}
|
|
5686
|
-
const date = new Date(input.data);
|
|
5687
|
-
if (Number.isNaN(date.getTime())) {
|
|
5688
|
-
addIssueToContextExtended(context, {
|
|
5689
|
-
code: zod.ZodIssueCode.custom,
|
|
5690
|
-
message: "Invalid date string",
|
|
5691
|
-
params: {
|
|
5692
|
-
isNestJsZod: true,
|
|
5693
|
-
code: "invalid_date_string"
|
|
5694
|
-
}
|
|
5695
|
-
});
|
|
5696
|
-
return zod.INVALID;
|
|
5697
|
-
}
|
|
5698
|
-
const status = new zod.ParseStatus();
|
|
5699
|
-
for (const check of this._def.checks) {
|
|
5700
|
-
if (check.kind === "format") {
|
|
5701
|
-
const valid = check.regex.test(input.data);
|
|
5702
|
-
if (valid)
|
|
5566
|
+
if (t2)
|
|
5567
|
+
return { errorMap: t2, description: a2 };
|
|
5568
|
+
return { errorMap: (t3, r3) => "invalid_type" !== t3.code ? { message: r3.defaultError } : void 0 === r3.data && s2 ? { message: s2 } : e2.invalid_type_error ? { message: e2.invalid_type_error } : { message: r3.defaultError }, description: a2 };
|
|
5569
|
+
}
|
|
5570
|
+
function k(e2, t2) {
|
|
5571
|
+
return e2.find((e3) => e3.kind === t2);
|
|
5572
|
+
}
|
|
5573
|
+
var w = ((e2) => (e2.ZodDateString = "ZodDateString", e2.ZodPassword = "ZodPassword", e2))(w || {});
|
|
5574
|
+
var b = Object.defineProperty;
|
|
5575
|
+
var x = Object.defineProperties;
|
|
5576
|
+
var Z = Object.getOwnPropertyDescriptors;
|
|
5577
|
+
var O = Object.getOwnPropertySymbols;
|
|
5578
|
+
var C = Object.prototype.hasOwnProperty;
|
|
5579
|
+
var P = Object.prototype.propertyIsEnumerable;
|
|
5580
|
+
var I = (e2, t2, r2) => t2 in e2 ? b(e2, t2, { enumerable: true, configurable: true, writable: true, value: r2 }) : e2[t2] = r2;
|
|
5581
|
+
var j = (e2, t2) => {
|
|
5582
|
+
for (var r2 in t2 || (t2 = {}))
|
|
5583
|
+
C.call(t2, r2) && I(e2, r2, t2[r2]);
|
|
5584
|
+
if (O)
|
|
5585
|
+
for (var r2 of O(t2))
|
|
5586
|
+
P.call(t2, r2) && I(e2, r2, t2[r2]);
|
|
5587
|
+
return e2;
|
|
5588
|
+
};
|
|
5589
|
+
var D = { date: /^\d{4}-\d{2}-\d{2}$/, "date-time": /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(|\.\d{3})(Z|[+-]\d{2}:\d{2})$/ };
|
|
5590
|
+
var Y = class extends e.ZodType {
|
|
5591
|
+
_parse(t2) {
|
|
5592
|
+
const r2 = this._getType(t2), s2 = this._getOrReturnCtx(t2);
|
|
5593
|
+
if (r2 !== e.ZodParsedType.string)
|
|
5594
|
+
return _(s2, { code: e.ZodIssueCode.invalid_type, expected: e.ZodParsedType.string, received: s2.parsedType }), e.INVALID;
|
|
5595
|
+
const a2 = new Date(t2.data);
|
|
5596
|
+
if (Number.isNaN(a2.getTime()))
|
|
5597
|
+
return _(s2, { code: e.ZodIssueCode.custom, message: "Invalid date string", params: { isNestJsZod: true, code: "invalid_date_string" } }), e.INVALID;
|
|
5598
|
+
const n2 = new e.ParseStatus();
|
|
5599
|
+
for (const r3 of this._def.checks)
|
|
5600
|
+
if ("format" === r3.kind) {
|
|
5601
|
+
if (r3.regex.test(t2.data))
|
|
5703
5602
|
continue;
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
params: {
|
|
5708
|
-
isNestJsZod: true,
|
|
5709
|
-
code: "invalid_date_string_format",
|
|
5710
|
-
expected: check.value
|
|
5711
|
-
}
|
|
5712
|
-
});
|
|
5713
|
-
status.dirty();
|
|
5714
|
-
} else if (check.kind === "direction") {
|
|
5715
|
-
const conditions = {
|
|
5716
|
-
past: date < /* @__PURE__ */ new Date(),
|
|
5717
|
-
future: date > /* @__PURE__ */ new Date()
|
|
5718
|
-
};
|
|
5719
|
-
const valid = conditions[check.direction];
|
|
5720
|
-
if (valid)
|
|
5603
|
+
_(s2, { code: e.ZodIssueCode.custom, message: r3.message, params: { isNestJsZod: true, code: "invalid_date_string_format", expected: r3.value } }), n2.dirty();
|
|
5604
|
+
} else if ("direction" === r3.kind) {
|
|
5605
|
+
if ({ past: a2 < /* @__PURE__ */ new Date(), future: a2 > /* @__PURE__ */ new Date() }[r3.direction])
|
|
5721
5606
|
continue;
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
isNestJsZod: true,
|
|
5727
|
-
code: "invalid_date_string_direction",
|
|
5728
|
-
expected: check.direction
|
|
5729
|
-
}
|
|
5730
|
-
});
|
|
5731
|
-
status.dirty();
|
|
5732
|
-
} else if (check.kind === "day-type") {
|
|
5733
|
-
const day = date.getDay();
|
|
5734
|
-
const conditions = {
|
|
5735
|
-
weekDay: day !== 0 && day !== 6,
|
|
5736
|
-
weekend: day === 0 || day === 6
|
|
5737
|
-
};
|
|
5738
|
-
const valid = conditions[check.type];
|
|
5739
|
-
if (valid)
|
|
5607
|
+
_(s2, { code: e.ZodIssueCode.custom, message: r3.message, params: { isNestJsZod: true, code: "invalid_date_string_direction", expected: r3.direction } }), n2.dirty();
|
|
5608
|
+
} else if ("day-type" === r3.kind) {
|
|
5609
|
+
const t3 = a2.getDay();
|
|
5610
|
+
if ({ weekDay: 0 !== t3 && 6 !== t3, weekend: 0 === t3 || 6 === t3 }[r3.type])
|
|
5740
5611
|
continue;
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
params: {
|
|
5745
|
-
isNestJsZod: true,
|
|
5746
|
-
code: "invalid_date_string_day",
|
|
5747
|
-
expected: check.type
|
|
5748
|
-
}
|
|
5749
|
-
});
|
|
5750
|
-
status.dirty();
|
|
5751
|
-
} else if (check.kind === "minYear") {
|
|
5752
|
-
const valid = date.getFullYear() >= check.value;
|
|
5753
|
-
if (valid)
|
|
5612
|
+
_(s2, { code: e.ZodIssueCode.custom, message: r3.message, params: { isNestJsZod: true, code: "invalid_date_string_day", expected: r3.type } }), n2.dirty();
|
|
5613
|
+
} else if ("minYear" === r3.kind) {
|
|
5614
|
+
if (a2.getFullYear() >= r3.value)
|
|
5754
5615
|
continue;
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
minimum: check.value,
|
|
5759
|
-
inclusive: true,
|
|
5760
|
-
message: check.message
|
|
5761
|
-
});
|
|
5762
|
-
status.dirty();
|
|
5763
|
-
} else if (check.kind === "maxYear") {
|
|
5764
|
-
const valid = date.getFullYear() <= check.value;
|
|
5765
|
-
if (valid)
|
|
5616
|
+
_(s2, { code: e.ZodIssueCode.too_small, type: "date_string_year", minimum: r3.value, inclusive: true, message: r3.message }), n2.dirty();
|
|
5617
|
+
} else if ("maxYear" === r3.kind) {
|
|
5618
|
+
if (a2.getFullYear() <= r3.value)
|
|
5766
5619
|
continue;
|
|
5767
|
-
|
|
5768
|
-
code: zod.ZodIssueCode.too_big,
|
|
5769
|
-
type: "date_string_year",
|
|
5770
|
-
maximum: check.value,
|
|
5771
|
-
inclusive: true,
|
|
5772
|
-
message: check.message
|
|
5773
|
-
});
|
|
5774
|
-
status.dirty();
|
|
5620
|
+
_(s2, { code: e.ZodIssueCode.too_big, type: "date_string_year", maximum: r3.value, inclusive: true, message: r3.message }), n2.dirty();
|
|
5775
5621
|
}
|
|
5776
|
-
}
|
|
5777
|
-
return { status: status.value, value: input.data };
|
|
5622
|
+
return { status: n2.value, value: t2.data };
|
|
5778
5623
|
}
|
|
5779
|
-
_replaceCheck(
|
|
5780
|
-
return new
|
|
5781
|
-
|
|
5782
|
-
|
|
5624
|
+
_replaceCheck(e2) {
|
|
5625
|
+
return new Y((t2 = j({}, this._def), r2 = { checks: this._def.checks.filter((t3) => t3.kind !== e2.kind).concat(e2) }, x(t2, Z(r2))));
|
|
5626
|
+
var t2, r2;
|
|
5627
|
+
}
|
|
5628
|
+
format(e2, t2) {
|
|
5629
|
+
return this._replaceCheck(j({ kind: "format", value: e2, regex: D[e2] }, y(t2)));
|
|
5783
5630
|
}
|
|
5784
|
-
|
|
5785
|
-
return this._replaceCheck(
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
}, normalizeErrorMessage(message)));
|
|
5802
|
-
}
|
|
5803
|
-
weekDay(message) {
|
|
5804
|
-
return this._replaceCheck(__spreadValues$1({
|
|
5805
|
-
kind: "day-type",
|
|
5806
|
-
type: "weekDay"
|
|
5807
|
-
}, normalizeErrorMessage(message)));
|
|
5808
|
-
}
|
|
5809
|
-
weekend(message) {
|
|
5810
|
-
return this._replaceCheck(__spreadValues$1({
|
|
5811
|
-
kind: "day-type",
|
|
5812
|
-
type: "weekend"
|
|
5813
|
-
}, normalizeErrorMessage(message)));
|
|
5814
|
-
}
|
|
5815
|
-
minYear(year, message) {
|
|
5816
|
-
return this._replaceCheck(__spreadValues$1({
|
|
5817
|
-
kind: "minYear",
|
|
5818
|
-
value: year
|
|
5819
|
-
}, normalizeErrorMessage(message)));
|
|
5820
|
-
}
|
|
5821
|
-
maxYear(year, message) {
|
|
5822
|
-
return this._replaceCheck(__spreadValues$1({
|
|
5823
|
-
kind: "maxYear",
|
|
5824
|
-
value: year
|
|
5825
|
-
}, normalizeErrorMessage(message)));
|
|
5631
|
+
past(e2) {
|
|
5632
|
+
return this._replaceCheck(j({ kind: "direction", direction: "past" }, y(e2)));
|
|
5633
|
+
}
|
|
5634
|
+
future(e2) {
|
|
5635
|
+
return this._replaceCheck(j({ kind: "direction", direction: "future" }, y(e2)));
|
|
5636
|
+
}
|
|
5637
|
+
weekDay(e2) {
|
|
5638
|
+
return this._replaceCheck(j({ kind: "day-type", type: "weekDay" }, y(e2)));
|
|
5639
|
+
}
|
|
5640
|
+
weekend(e2) {
|
|
5641
|
+
return this._replaceCheck(j({ kind: "day-type", type: "weekend" }, y(e2)));
|
|
5642
|
+
}
|
|
5643
|
+
minYear(e2, t2) {
|
|
5644
|
+
return this._replaceCheck(j({ kind: "minYear", value: e2 }, y(t2)));
|
|
5645
|
+
}
|
|
5646
|
+
maxYear(e2, t2) {
|
|
5647
|
+
return this._replaceCheck(j({ kind: "maxYear", value: e2 }, y(t2)));
|
|
5826
5648
|
}
|
|
5827
5649
|
cast() {
|
|
5828
|
-
return this.transform((
|
|
5650
|
+
return this.transform((e2) => new Date(e2));
|
|
5829
5651
|
}
|
|
5830
5652
|
get format_() {
|
|
5831
|
-
return
|
|
5653
|
+
return k(this._def.checks, "format");
|
|
5832
5654
|
}
|
|
5833
5655
|
get isPast() {
|
|
5834
|
-
var
|
|
5835
|
-
return ((
|
|
5656
|
+
var e2;
|
|
5657
|
+
return "past" === (null == (e2 = k(this._def.checks, "direction")) ? void 0 : e2.direction);
|
|
5836
5658
|
}
|
|
5837
5659
|
get isFuture() {
|
|
5838
|
-
var
|
|
5839
|
-
return ((
|
|
5660
|
+
var e2;
|
|
5661
|
+
return "future" === (null == (e2 = k(this._def.checks, "direction")) ? void 0 : e2.direction);
|
|
5840
5662
|
}
|
|
5841
5663
|
get isWeekDay() {
|
|
5842
|
-
var
|
|
5843
|
-
return ((
|
|
5664
|
+
var e2;
|
|
5665
|
+
return "weekDay" === (null == (e2 = k(this._def.checks, "day-type")) ? void 0 : e2.type);
|
|
5844
5666
|
}
|
|
5845
5667
|
get isWeekend() {
|
|
5846
|
-
var
|
|
5847
|
-
return ((
|
|
5668
|
+
var e2;
|
|
5669
|
+
return "weekend" === (null == (e2 = k(this._def.checks, "day-type")) ? void 0 : e2.type);
|
|
5848
5670
|
}
|
|
5849
5671
|
get minYear_() {
|
|
5850
|
-
return
|
|
5672
|
+
return k(this._def.checks, "minYear");
|
|
5851
5673
|
}
|
|
5852
5674
|
get maxYear_() {
|
|
5853
|
-
return
|
|
5854
|
-
}
|
|
5855
|
-
};
|
|
5856
|
-
var
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
var
|
|
5875
|
-
var
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
5889
|
-
var SYMBOL_KINDS = [
|
|
5890
|
-
"digit",
|
|
5891
|
-
"lowercase",
|
|
5892
|
-
"uppercase",
|
|
5893
|
-
"special"
|
|
5894
|
-
];
|
|
5895
|
-
var REGEXPS = {
|
|
5896
|
-
digit: /\d/,
|
|
5897
|
-
lowercase: /[a-z]/,
|
|
5898
|
-
uppercase: /[A-Z]/,
|
|
5899
|
-
special: /[!?@#$%^&*{};.,:%№"|\\/()\-_+=<>`~[\]'"]/
|
|
5900
|
-
};
|
|
5901
|
-
function isSymbolCheck(check) {
|
|
5902
|
-
return SYMBOL_KINDS.includes(check.kind);
|
|
5903
|
-
}
|
|
5904
|
-
var _ZodPassword = class extends zod.ZodType {
|
|
5905
|
-
_parse(input) {
|
|
5906
|
-
const parsedType = this._getType(input);
|
|
5907
|
-
const context = this._getOrReturnCtx(input);
|
|
5908
|
-
if (parsedType !== zod.ZodParsedType.string) {
|
|
5909
|
-
addIssueToContextExtended(context, {
|
|
5910
|
-
code: zod.ZodIssueCode.invalid_type,
|
|
5911
|
-
expected: zod.ZodParsedType.string,
|
|
5912
|
-
received: context.parsedType
|
|
5913
|
-
});
|
|
5914
|
-
return zod.INVALID;
|
|
5915
|
-
}
|
|
5916
|
-
const status = new zod.ParseStatus();
|
|
5917
|
-
for (const check of this._def.checks) {
|
|
5918
|
-
if (isSymbolCheck(check)) {
|
|
5919
|
-
const valid = REGEXPS[check.kind].test(input.data);
|
|
5920
|
-
if (valid)
|
|
5675
|
+
return k(this._def.checks, "maxYear");
|
|
5676
|
+
}
|
|
5677
|
+
};
|
|
5678
|
+
var E = Y;
|
|
5679
|
+
E.create = (e2) => new Y(j({ checks: [{ kind: "format", value: "date-time", regex: D["date-time"] }], typeName: w.ZodDateString }, v(e2)));
|
|
5680
|
+
var $ = E.create;
|
|
5681
|
+
var T = Object.defineProperty;
|
|
5682
|
+
var z2 = Object.defineProperties;
|
|
5683
|
+
var M = Object.getOwnPropertyDescriptors;
|
|
5684
|
+
var N = Object.getOwnPropertySymbols;
|
|
5685
|
+
var L = Object.prototype.hasOwnProperty;
|
|
5686
|
+
var S = Object.prototype.propertyIsEnumerable;
|
|
5687
|
+
var F = (e2, t2, r2) => t2 in e2 ? T(e2, t2, { enumerable: true, configurable: true, writable: true, value: r2 }) : e2[t2] = r2;
|
|
5688
|
+
var q = (e2, t2) => {
|
|
5689
|
+
for (var r2 in t2 || (t2 = {}))
|
|
5690
|
+
L.call(t2, r2) && F(e2, r2, t2[r2]);
|
|
5691
|
+
if (N)
|
|
5692
|
+
for (var r2 of N(t2))
|
|
5693
|
+
S.call(t2, r2) && F(e2, r2, t2[r2]);
|
|
5694
|
+
return e2;
|
|
5695
|
+
};
|
|
5696
|
+
var A = ["digit", "lowercase", "uppercase", "special"];
|
|
5697
|
+
var J = { digit: /\d/, lowercase: /[a-z]/, uppercase: /[A-Z]/, special: /[!?@#$%^&*{};.,:%№"|\\/()-_+=<>`~[\]'"]/ };
|
|
5698
|
+
function R(e2) {
|
|
5699
|
+
return A.includes(e2.kind);
|
|
5700
|
+
}
|
|
5701
|
+
var V = class extends e.ZodType {
|
|
5702
|
+
_parse(t2) {
|
|
5703
|
+
const r2 = this._getType(t2), s2 = this._getOrReturnCtx(t2);
|
|
5704
|
+
if (r2 !== e.ZodParsedType.string)
|
|
5705
|
+
return _(s2, { code: e.ZodIssueCode.invalid_type, expected: e.ZodParsedType.string, received: s2.parsedType }), e.INVALID;
|
|
5706
|
+
const a2 = new e.ParseStatus();
|
|
5707
|
+
for (const r3 of this._def.checks)
|
|
5708
|
+
if (R(r3)) {
|
|
5709
|
+
if (J[r3.kind].test(t2.data))
|
|
5921
5710
|
continue;
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
params: {
|
|
5926
|
-
isNestJsZod: true,
|
|
5927
|
-
code: `invalid_password_no_${check.kind}`
|
|
5928
|
-
}
|
|
5929
|
-
});
|
|
5930
|
-
status.dirty();
|
|
5931
|
-
} else if (check.kind === "minLength") {
|
|
5932
|
-
const valid = input.data.length >= check.value;
|
|
5933
|
-
if (valid)
|
|
5711
|
+
_(s2, { code: e.ZodIssueCode.custom, message: r3.message, params: { isNestJsZod: true, code: `invalid_password_no_${r3.kind}` } }), a2.dirty();
|
|
5712
|
+
} else if ("minLength" === r3.kind) {
|
|
5713
|
+
if (t2.data.length >= r3.value)
|
|
5934
5714
|
continue;
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
minimum: check.value,
|
|
5939
|
-
inclusive: true,
|
|
5940
|
-
message: check.message
|
|
5941
|
-
});
|
|
5942
|
-
status.dirty();
|
|
5943
|
-
} else if (check.kind === "maxLength") {
|
|
5944
|
-
const valid = input.data.length <= check.value;
|
|
5945
|
-
if (valid)
|
|
5715
|
+
_(s2, { code: e.ZodIssueCode.too_small, type: "password", minimum: r3.value, inclusive: true, message: r3.message }), a2.dirty();
|
|
5716
|
+
} else if ("maxLength" === r3.kind) {
|
|
5717
|
+
if (t2.data.length <= r3.value)
|
|
5946
5718
|
continue;
|
|
5947
|
-
|
|
5948
|
-
code: zod.ZodIssueCode.too_big,
|
|
5949
|
-
type: "password",
|
|
5950
|
-
maximum: check.value,
|
|
5951
|
-
inclusive: true,
|
|
5952
|
-
message: check.message
|
|
5953
|
-
});
|
|
5954
|
-
status.dirty();
|
|
5719
|
+
_(s2, { code: e.ZodIssueCode.too_big, type: "password", maximum: r3.value, inclusive: true, message: r3.message }), a2.dirty();
|
|
5955
5720
|
}
|
|
5956
|
-
}
|
|
5957
|
-
return { status: status.value, value: input.data };
|
|
5721
|
+
return { status: a2.value, value: t2.data };
|
|
5958
5722
|
}
|
|
5959
|
-
_replaceCheck(
|
|
5960
|
-
return new
|
|
5961
|
-
|
|
5962
|
-
}));
|
|
5723
|
+
_replaceCheck(e2) {
|
|
5724
|
+
return new V((t2 = q({}, this._def), r2 = { checks: this._def.checks.filter((t3) => t3.kind !== e2.kind).concat(e2) }, z2(t2, M(r2))));
|
|
5725
|
+
var t2, r2;
|
|
5963
5726
|
}
|
|
5964
5727
|
buildFullRegExp() {
|
|
5965
|
-
const
|
|
5966
|
-
for (const
|
|
5967
|
-
if (!
|
|
5728
|
+
const e2 = [];
|
|
5729
|
+
for (const t3 of this._def.checks) {
|
|
5730
|
+
if (!R(t3))
|
|
5968
5731
|
continue;
|
|
5969
|
-
const
|
|
5970
|
-
|
|
5732
|
+
const r2 = J[t3.kind];
|
|
5733
|
+
e2.push(`(?=.*${r2.source})`);
|
|
5971
5734
|
}
|
|
5972
|
-
if (
|
|
5735
|
+
if (0 === e2.length)
|
|
5973
5736
|
return /^.*$/;
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
return new RegExp(`^(?:${union}.*)$`);
|
|
5737
|
+
const t2 = e2.join("");
|
|
5738
|
+
return new RegExp(`^(?:${t2}.*)$`);
|
|
5977
5739
|
}
|
|
5978
|
-
atLeastOne(
|
|
5979
|
-
return this._replaceCheck(
|
|
5980
|
-
kind
|
|
5981
|
-
}, normalizeErrorMessage(message)));
|
|
5740
|
+
atLeastOne(e2, t2) {
|
|
5741
|
+
return this._replaceCheck(q({ kind: e2 }, y(t2)));
|
|
5982
5742
|
}
|
|
5983
|
-
min(
|
|
5984
|
-
return this._replaceCheck(
|
|
5985
|
-
kind: "minLength",
|
|
5986
|
-
value: length
|
|
5987
|
-
}, normalizeErrorMessage(message)));
|
|
5743
|
+
min(e2, t2) {
|
|
5744
|
+
return this._replaceCheck(q({ kind: "minLength", value: e2 }, y(t2)));
|
|
5988
5745
|
}
|
|
5989
|
-
max(
|
|
5990
|
-
return this._replaceCheck(
|
|
5991
|
-
kind: "maxLength",
|
|
5992
|
-
value: length
|
|
5993
|
-
}, normalizeErrorMessage(message)));
|
|
5746
|
+
max(e2, t2) {
|
|
5747
|
+
return this._replaceCheck(q({ kind: "maxLength", value: e2 }, y(t2)));
|
|
5994
5748
|
}
|
|
5995
|
-
isAtLeastOne(
|
|
5996
|
-
return
|
|
5749
|
+
isAtLeastOne(e2) {
|
|
5750
|
+
return function(e3, t2) {
|
|
5751
|
+
return Boolean(k(e3, t2));
|
|
5752
|
+
}(this._def.checks, e2);
|
|
5997
5753
|
}
|
|
5998
5754
|
get minLength() {
|
|
5999
|
-
return
|
|
5755
|
+
return k(this._def.checks, "minLength");
|
|
6000
5756
|
}
|
|
6001
5757
|
get maxLength() {
|
|
6002
|
-
return
|
|
5758
|
+
return k(this._def.checks, "maxLength");
|
|
6003
5759
|
}
|
|
6004
5760
|
};
|
|
6005
|
-
var
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
var onlyOverride = /* @__PURE__ */ _mergeNamespaces({
|
|
6014
|
-
__proto__: null,
|
|
6015
|
-
defaultErrorMap: extendedErrorMap,
|
|
6016
|
-
setErrorMap: setExtendedErrorMap,
|
|
6017
|
-
addIssueToContext: addIssueToContextExtended,
|
|
6018
|
-
from,
|
|
6019
|
-
json,
|
|
6020
|
-
ZodDateString,
|
|
6021
|
-
dateString,
|
|
6022
|
-
ZodPassword,
|
|
6023
|
-
password,
|
|
6024
|
-
ZodFirstPartyTypeKindExtended
|
|
6025
|
-
}, [zod__namespace]);
|
|
6026
|
-
exports.ZodDateString = ZodDateString;
|
|
6027
|
-
exports.ZodFirstPartyTypeKindExtended = ZodFirstPartyTypeKindExtended;
|
|
6028
|
-
exports.ZodPassword = ZodPassword;
|
|
6029
|
-
exports.addIssueToContext = addIssueToContextExtended;
|
|
6030
|
-
exports.dateString = dateString;
|
|
6031
|
-
exports.defaultErrorMap = extendedErrorMap;
|
|
6032
|
-
exports.from = from;
|
|
6033
|
-
exports.json = json;
|
|
6034
|
-
exports.password = password;
|
|
6035
|
-
exports.setErrorMap = setExtendedErrorMap;
|
|
6036
|
-
exports.z = onlyOverride;
|
|
6037
|
-
Object.keys(zod).forEach(function(k) {
|
|
6038
|
-
if (k !== "default" && !exports.hasOwnProperty(k))
|
|
6039
|
-
Object.defineProperty(exports, k, {
|
|
6040
|
-
enumerable: true,
|
|
6041
|
-
get: function() {
|
|
6042
|
-
return zod[k];
|
|
6043
|
-
}
|
|
6044
|
-
});
|
|
5761
|
+
var H = V;
|
|
5762
|
+
H.create = (e2) => new V(q({ checks: [], typeName: w.ZodPassword }, v(e2)));
|
|
5763
|
+
var K = H.create;
|
|
5764
|
+
var W = r({ __proto__: null, defaultErrorMap: m, setErrorMap: p, addIssueToContext: _, from: f, json: h, ZodDateString: E, dateString: $, ZodPassword: H, password: K, ZodFirstPartyTypeKindExtended: w }, [s]);
|
|
5765
|
+
exports.ZodDateString = E, exports.ZodFirstPartyTypeKindExtended = w, exports.ZodPassword = H, exports.addIssueToContext = _, exports.dateString = $, exports.defaultErrorMap = m, exports.from = f, exports.json = h, exports.password = K, exports.setErrorMap = p, exports.z = W, Object.keys(e).forEach(function(t2) {
|
|
5766
|
+
"default" === t2 || exports.hasOwnProperty(t2) || Object.defineProperty(exports, t2, { enumerable: true, get: function() {
|
|
5767
|
+
return e[t2];
|
|
5768
|
+
} });
|
|
6045
5769
|
});
|
|
6046
5770
|
}
|
|
6047
5771
|
});
|
|
6048
5772
|
|
|
6049
|
-
//
|
|
5773
|
+
// ../prisma/node_modules/nestjs-zod/dist/dto.js
|
|
6050
5774
|
var require_dto = __commonJS({
|
|
6051
|
-
"
|
|
5775
|
+
"../prisma/node_modules/nestjs-zod/dist/dto.js"(exports) {
|
|
6052
5776
|
"use strict";
|
|
6053
|
-
Object.defineProperty(exports, "__esModule", { value: true })
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
return this.schema.parse(input);
|
|
5777
|
+
Object.defineProperty(exports, "__esModule", { value: true }), exports.createZodDto = function(e) {
|
|
5778
|
+
class t {
|
|
5779
|
+
static create(e2) {
|
|
5780
|
+
return this.schema.parse(e2);
|
|
6058
5781
|
}
|
|
6059
5782
|
}
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
return
|
|
6063
|
-
}
|
|
6064
|
-
function isZodDto(metatype) {
|
|
6065
|
-
return metatype == null ? void 0 : metatype.isZodDto;
|
|
6066
|
-
}
|
|
6067
|
-
exports.createZodDto = createZodDto;
|
|
6068
|
-
exports.isZodDto = isZodDto;
|
|
5783
|
+
return t.isZodDto = true, t.schema = e, t;
|
|
5784
|
+
}, exports.isZodDto = function(e) {
|
|
5785
|
+
return null == e ? void 0 : e.isZodDto;
|
|
5786
|
+
};
|
|
6069
5787
|
}
|
|
6070
5788
|
});
|
|
6071
5789
|
|
|
@@ -6658,6 +6376,7 @@ var require_packagerelease = __commonJS({
|
|
|
6658
6376
|
updatedAt: z2.date().or(z2.string()),
|
|
6659
6377
|
version: z2.string(),
|
|
6660
6378
|
versionInt: z2.string().or(z2.bigint()),
|
|
6379
|
+
prerelease: z2.boolean(),
|
|
6661
6380
|
type: z2.nativeEnum(enums_1.PackageTypeEnum),
|
|
6662
6381
|
servingType: z2.string().nullish(),
|
|
6663
6382
|
label: z2.string(),
|
|
@@ -11259,7 +10978,8 @@ var GetPackagesQuery = z.intersection(
|
|
|
11259
10978
|
}),
|
|
11260
10979
|
order: z.nativeEnum(import_library_prisma4.Prisma.SortOrder).default(import_library_prisma4.Prisma.SortOrder.desc),
|
|
11261
10980
|
categories: PackageArrayOfStringParam,
|
|
11262
|
-
includeDeprecated: z.string().transform((v) => ["true", "1", 1, true].includes(v)).or(z.boolean()).default(false)
|
|
10981
|
+
includeDeprecated: z.string().transform((v) => ["true", "1", 1, true].includes(v)).or(z.boolean()).default(false),
|
|
10982
|
+
includePrerelease: z.string().transform((v) => ["true", "1", 1, true].includes(v)).or(z.boolean()).default(false)
|
|
11263
10983
|
}).default({})
|
|
11264
10984
|
);
|
|
11265
10985
|
var PackageParamUniversal = z.object({
|