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