@or-sdk/library-types-v1 6.0.9 → 6.0.11
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 +12 -0
- package/dist/cjs/index.js +374 -554
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/index.js +374 -554
- package/dist/esm/index.js.map +4 -4
- package/dist/types/Packages/body.d.ts +5 -0
- package/dist/types/Packages/param.d.ts +3 -0
- package/dist/types/Packages/union.d.ts +5 -0
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -1301,12 +1301,19 @@ 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",
|
|
1307
1308
|
description: "description",
|
|
1308
1309
|
sourceRevisionId: "sourceRevisionId"
|
|
1309
1310
|
};
|
|
1311
|
+
exports.Prisma.PackageReleaseDataScalarFieldEnum = {
|
|
1312
|
+
revisionId: "revisionId",
|
|
1313
|
+
data: "data",
|
|
1314
|
+
createdAt: "createdAt",
|
|
1315
|
+
updatedAt: "updatedAt"
|
|
1316
|
+
};
|
|
1310
1317
|
exports.Prisma.PackageStatusDetailsSystemScalarFieldEnum = {
|
|
1311
1318
|
id: "id",
|
|
1312
1319
|
status: "status",
|
|
@@ -1423,6 +1430,9 @@ In case this error is unexpected for you, please report it in https://github.com
|
|
|
1423
1430
|
description: "description",
|
|
1424
1431
|
sourceRevisionId: "sourceRevisionId"
|
|
1425
1432
|
};
|
|
1433
|
+
exports.Prisma.PackageReleaseDataOrderByRelevanceFieldEnum = {
|
|
1434
|
+
revisionId: "revisionId"
|
|
1435
|
+
};
|
|
1426
1436
|
exports.Prisma.PackageStatusDetailsSystemOrderByRelevanceFieldEnum = {
|
|
1427
1437
|
packageReleaseRevisionId: "packageReleaseRevisionId"
|
|
1428
1438
|
};
|
|
@@ -1504,6 +1514,7 @@ In case this error is unexpected for you, please report it in https://github.com
|
|
|
1504
1514
|
Category: "Category",
|
|
1505
1515
|
Package: "Package",
|
|
1506
1516
|
PackageRelease: "PackageRelease",
|
|
1517
|
+
PackageReleaseData: "PackageReleaseData",
|
|
1507
1518
|
PackageStatusDetailsSystem: "PackageStatusDetailsSystem",
|
|
1508
1519
|
PackageStatusDetailsRelease: "PackageStatusDetailsRelease",
|
|
1509
1520
|
PackageDependencies: "PackageDependencies",
|
|
@@ -5424,648 +5435,365 @@ var require_lib = __commonJS({
|
|
|
5424
5435
|
}
|
|
5425
5436
|
});
|
|
5426
5437
|
|
|
5427
|
-
//
|
|
5438
|
+
// ../prisma/node_modules/nestjs-zod/dist/z.js
|
|
5428
5439
|
var require_z = __commonJS({
|
|
5429
|
-
"
|
|
5440
|
+
"../prisma/node_modules/nestjs-zod/dist/z.js"(exports) {
|
|
5430
5441
|
"use strict";
|
|
5431
5442
|
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
|
-
});
|
|
5443
|
+
var e = require_lib();
|
|
5444
|
+
function t(e2) {
|
|
5445
|
+
if (e2 && e2.__esModule)
|
|
5446
|
+
return e2;
|
|
5447
|
+
var t2 = /* @__PURE__ */ Object.create(null);
|
|
5448
|
+
return e2 && Object.keys(e2).forEach(function(r2) {
|
|
5449
|
+
if ("default" !== r2) {
|
|
5450
|
+
var s2 = Object.getOwnPropertyDescriptor(e2, r2);
|
|
5451
|
+
Object.defineProperty(t2, r2, s2.get ? s2 : { enumerable: true, get: function() {
|
|
5452
|
+
return e2[r2];
|
|
5453
|
+
} });
|
|
5454
|
+
}
|
|
5455
|
+
}), t2.default = e2, Object.freeze(t2);
|
|
5456
|
+
}
|
|
5457
|
+
function r(e2, t2) {
|
|
5458
|
+
return t2.forEach(function(t3) {
|
|
5459
|
+
t3 && "string" != typeof t3 && !Array.isArray(t3) && Object.keys(t3).forEach(function(r2) {
|
|
5460
|
+
if ("default" !== r2 && !(r2 in e2)) {
|
|
5461
|
+
var s2 = Object.getOwnPropertyDescriptor(t3, r2);
|
|
5462
|
+
Object.defineProperty(e2, r2, s2.get ? s2 : { enumerable: true, get: function() {
|
|
5463
|
+
return t3[r2];
|
|
5464
|
+
} });
|
|
5464
5465
|
}
|
|
5465
5466
|
});
|
|
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))
|
|
5467
|
+
}), Object.freeze(e2);
|
|
5468
|
+
}
|
|
5469
|
+
var s = t(e);
|
|
5470
|
+
function a(e2) {
|
|
5471
|
+
return (t2) => {
|
|
5472
|
+
if (!function(e3) {
|
|
5473
|
+
var t3;
|
|
5474
|
+
return "custom" === e3.code && (null == (t3 = e3.params) ? void 0 : t3.isNestJsZod);
|
|
5475
|
+
}(t2))
|
|
5489
5476
|
return { matched: false };
|
|
5490
|
-
const
|
|
5491
|
-
|
|
5492
|
-
return { matched: false };
|
|
5493
|
-
return result;
|
|
5477
|
+
const r2 = e2(t2.params);
|
|
5478
|
+
return r2.matched ? r2 : { matched: false };
|
|
5494
5479
|
};
|
|
5495
5480
|
}
|
|
5496
|
-
function
|
|
5497
|
-
return (
|
|
5498
|
-
if (
|
|
5481
|
+
function n(t2, r2) {
|
|
5482
|
+
return (s2) => {
|
|
5483
|
+
if (s2.code !== e.ZodIssueCode.too_small && s2.code !== e.ZodIssueCode.too_big)
|
|
5499
5484
|
return { matched: false };
|
|
5500
|
-
|
|
5501
|
-
if (issue.type !== valueType) {
|
|
5485
|
+
if (s2.type !== t2)
|
|
5502
5486
|
return { matched: false };
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
if (!result.matched)
|
|
5506
|
-
return { matched: false };
|
|
5507
|
-
return result;
|
|
5487
|
+
const a2 = r2(s2);
|
|
5488
|
+
return a2.matched ? a2 : { matched: false };
|
|
5508
5489
|
};
|
|
5509
5490
|
}
|
|
5510
|
-
var
|
|
5511
|
-
if (
|
|
5512
|
-
|
|
5513
|
-
return { matched: true, message };
|
|
5491
|
+
var i = a((e2) => {
|
|
5492
|
+
if ("invalid_date_string" === e2.code) {
|
|
5493
|
+
return { matched: true, message: "Invalid string, expected it to be a valid date" };
|
|
5514
5494
|
}
|
|
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 };
|
|
5495
|
+
if ("invalid_date_string_format" === e2.code) {
|
|
5496
|
+
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]}` };
|
|
5497
|
+
}
|
|
5498
|
+
if ("invalid_date_string_direction" === e2.code) {
|
|
5499
|
+
return { matched: true, message: `Invalid date, expected it to be the ${e2.expected}` };
|
|
5500
|
+
}
|
|
5501
|
+
if ("invalid_date_string_day" === e2.code) {
|
|
5502
|
+
return { matched: true, message: `Invalid date, expected it to be a ${{ weekDay: "week day", weekend: "weekend" }[e2.expected]}` };
|
|
5536
5503
|
}
|
|
5537
5504
|
return { matched: false };
|
|
5538
5505
|
});
|
|
5539
|
-
var
|
|
5540
|
-
if (
|
|
5541
|
-
|
|
5542
|
-
const message = `Year must be greater than ${appendix}${issue.minimum}`;
|
|
5543
|
-
return { matched: true, message };
|
|
5506
|
+
var o = n("date_string_year", (t2) => {
|
|
5507
|
+
if (t2.code === e.ZodIssueCode.too_small) {
|
|
5508
|
+
return { matched: true, message: `Year must be greater than ${t2.inclusive ? "or equal to " : ""}${t2.minimum}` };
|
|
5544
5509
|
}
|
|
5545
|
-
if (
|
|
5546
|
-
|
|
5547
|
-
const message = `Year must be less than ${appendix}${issue.maximum}`;
|
|
5548
|
-
return { matched: true, message };
|
|
5510
|
+
if (t2.code === e.ZodIssueCode.too_big) {
|
|
5511
|
+
return { matched: true, message: `Year must be less than ${t2.inclusive ? "or equal to " : ""}${t2.maximum}` };
|
|
5549
5512
|
}
|
|
5550
5513
|
return { matched: false };
|
|
5551
5514
|
});
|
|
5552
|
-
var
|
|
5553
|
-
if (
|
|
5554
|
-
|
|
5555
|
-
return { matched: true, message };
|
|
5515
|
+
var d = a((e2) => {
|
|
5516
|
+
if ("invalid_password_no_digit" === e2.code) {
|
|
5517
|
+
return { matched: true, message: "Password must contain at least one digit" };
|
|
5556
5518
|
}
|
|
5557
|
-
if (
|
|
5558
|
-
|
|
5559
|
-
return { matched: true, message };
|
|
5519
|
+
if ("invalid_password_no_lowercase" === e2.code) {
|
|
5520
|
+
return { matched: true, message: "Password must contain at least one lowercase letter" };
|
|
5560
5521
|
}
|
|
5561
|
-
if (
|
|
5562
|
-
|
|
5563
|
-
return { matched: true, message };
|
|
5522
|
+
if ("invalid_password_no_uppercase" === e2.code) {
|
|
5523
|
+
return { matched: true, message: "Password must contain at least one uppercase letter" };
|
|
5564
5524
|
}
|
|
5565
|
-
if (
|
|
5566
|
-
|
|
5567
|
-
return { matched: true, message };
|
|
5525
|
+
if ("invalid_password_no_special" === e2.code) {
|
|
5526
|
+
return { matched: true, message: "Password must contain at least one special symbol" };
|
|
5568
5527
|
}
|
|
5569
5528
|
return { matched: false };
|
|
5570
5529
|
});
|
|
5571
|
-
var
|
|
5572
|
-
if (
|
|
5573
|
-
|
|
5574
|
-
const message = `Password length must be greater than ${appendix}${issue.minimum}`;
|
|
5575
|
-
return { matched: true, message };
|
|
5530
|
+
var c = n("password", (t2) => {
|
|
5531
|
+
if (t2.code === e.ZodIssueCode.too_small) {
|
|
5532
|
+
return { matched: true, message: `Password length must be greater than ${t2.inclusive ? "or equal to " : ""}${t2.minimum}` };
|
|
5576
5533
|
}
|
|
5577
|
-
if (
|
|
5578
|
-
|
|
5579
|
-
const message = `Password length must be less than ${appendix}${issue.maximum}`;
|
|
5580
|
-
return { matched: true, message };
|
|
5534
|
+
if (t2.code === e.ZodIssueCode.too_big) {
|
|
5535
|
+
return { matched: true, message: `Password length must be less than ${t2.inclusive ? "or equal to " : ""}${t2.maximum}` };
|
|
5581
5536
|
}
|
|
5582
5537
|
return { matched: false };
|
|
5583
5538
|
});
|
|
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 };
|
|
5539
|
+
var u = (l = [i, o, d, c], (e2) => {
|
|
5540
|
+
for (const t2 of l) {
|
|
5541
|
+
const r2 = t2(e2);
|
|
5542
|
+
if (r2.matched)
|
|
5543
|
+
return r2;
|
|
5594
5544
|
}
|
|
5595
|
-
return
|
|
5545
|
+
return { matched: false };
|
|
5546
|
+
});
|
|
5547
|
+
var l;
|
|
5548
|
+
var m = (t2, r2) => {
|
|
5549
|
+
const s2 = u(t2);
|
|
5550
|
+
return s2.matched ? { message: s2.message } : e.defaultErrorMap(t2, r2);
|
|
5596
5551
|
};
|
|
5597
|
-
function
|
|
5598
|
-
|
|
5552
|
+
function p(t2) {
|
|
5553
|
+
e.setErrorMap(t2);
|
|
5599
5554
|
}
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
return schema;
|
|
5555
|
+
function f(e2) {
|
|
5556
|
+
return e2;
|
|
5603
5557
|
}
|
|
5604
|
-
|
|
5605
|
-
var
|
|
5606
|
-
var
|
|
5607
|
-
const
|
|
5608
|
-
|
|
5609
|
-
}));
|
|
5610
|
-
return schema;
|
|
5558
|
+
p(m);
|
|
5559
|
+
var g = e.z.union([e.z.string(), e.z.number(), e.z.boolean()]);
|
|
5560
|
+
var h = (t2 = "Expected value to be a JSON-serializable") => {
|
|
5561
|
+
const r2 = e.z.lazy(() => e.z.union([g, e.z.array(r2), e.z.record(r2)], { invalid_type_error: t2 }));
|
|
5562
|
+
return r2;
|
|
5611
5563
|
};
|
|
5612
|
-
function
|
|
5613
|
-
|
|
5564
|
+
function _(t2, r2) {
|
|
5565
|
+
e.addIssueToContext(t2, r2);
|
|
5614
5566
|
}
|
|
5615
|
-
function
|
|
5616
|
-
|
|
5617
|
-
return { message };
|
|
5618
|
-
return message;
|
|
5567
|
+
function y(e2) {
|
|
5568
|
+
return "string" == typeof e2 ? { message: e2 } : e2;
|
|
5619
5569
|
}
|
|
5620
|
-
function
|
|
5621
|
-
if (!
|
|
5570
|
+
function v(e2) {
|
|
5571
|
+
if (!e2)
|
|
5622
5572
|
return {};
|
|
5623
|
-
const { errorMap:
|
|
5624
|
-
if (
|
|
5573
|
+
const { errorMap: t2, invalid_type_error: r2, required_error: s2, description: a2 } = e2;
|
|
5574
|
+
if (t2 && (r2 || s2))
|
|
5625
5575
|
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)
|
|
5576
|
+
if (t2)
|
|
5577
|
+
return { errorMap: t2, description: a2 };
|
|
5578
|
+
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 };
|
|
5579
|
+
}
|
|
5580
|
+
function k(e2, t2) {
|
|
5581
|
+
return e2.find((e3) => e3.kind === t2);
|
|
5582
|
+
}
|
|
5583
|
+
var w = ((e2) => (e2.ZodDateString = "ZodDateString", e2.ZodPassword = "ZodPassword", e2))(w || {});
|
|
5584
|
+
var b = Object.defineProperty;
|
|
5585
|
+
var x = Object.defineProperties;
|
|
5586
|
+
var Z = Object.getOwnPropertyDescriptors;
|
|
5587
|
+
var O = Object.getOwnPropertySymbols;
|
|
5588
|
+
var C = Object.prototype.hasOwnProperty;
|
|
5589
|
+
var P = Object.prototype.propertyIsEnumerable;
|
|
5590
|
+
var I = (e2, t2, r2) => t2 in e2 ? b(e2, t2, { enumerable: true, configurable: true, writable: true, value: r2 }) : e2[t2] = r2;
|
|
5591
|
+
var j = (e2, t2) => {
|
|
5592
|
+
for (var r2 in t2 || (t2 = {}))
|
|
5593
|
+
C.call(t2, r2) && I(e2, r2, t2[r2]);
|
|
5594
|
+
if (O)
|
|
5595
|
+
for (var r2 of O(t2))
|
|
5596
|
+
P.call(t2, r2) && I(e2, r2, t2[r2]);
|
|
5597
|
+
return e2;
|
|
5598
|
+
};
|
|
5599
|
+
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})$/ };
|
|
5600
|
+
var Y = class extends e.ZodType {
|
|
5601
|
+
_parse(t2) {
|
|
5602
|
+
const r2 = this._getType(t2), s2 = this._getOrReturnCtx(t2);
|
|
5603
|
+
if (r2 !== e.ZodParsedType.string)
|
|
5604
|
+
return _(s2, { code: e.ZodIssueCode.invalid_type, expected: e.ZodParsedType.string, received: s2.parsedType }), e.INVALID;
|
|
5605
|
+
const a2 = new Date(t2.data);
|
|
5606
|
+
if (Number.isNaN(a2.getTime()))
|
|
5607
|
+
return _(s2, { code: e.ZodIssueCode.custom, message: "Invalid date string", params: { isNestJsZod: true, code: "invalid_date_string" } }), e.INVALID;
|
|
5608
|
+
const n2 = new e.ParseStatus();
|
|
5609
|
+
for (const r3 of this._def.checks)
|
|
5610
|
+
if ("format" === r3.kind) {
|
|
5611
|
+
if (r3.regex.test(t2.data))
|
|
5703
5612
|
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)
|
|
5613
|
+
_(s2, { code: e.ZodIssueCode.custom, message: r3.message, params: { isNestJsZod: true, code: "invalid_date_string_format", expected: r3.value } }), n2.dirty();
|
|
5614
|
+
} else if ("direction" === r3.kind) {
|
|
5615
|
+
if ({ past: a2 < /* @__PURE__ */ new Date(), future: a2 > /* @__PURE__ */ new Date() }[r3.direction])
|
|
5721
5616
|
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)
|
|
5617
|
+
_(s2, { code: e.ZodIssueCode.custom, message: r3.message, params: { isNestJsZod: true, code: "invalid_date_string_direction", expected: r3.direction } }), n2.dirty();
|
|
5618
|
+
} else if ("day-type" === r3.kind) {
|
|
5619
|
+
const t3 = a2.getDay();
|
|
5620
|
+
if ({ weekDay: 0 !== t3 && 6 !== t3, weekend: 0 === t3 || 6 === t3 }[r3.type])
|
|
5740
5621
|
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)
|
|
5622
|
+
_(s2, { code: e.ZodIssueCode.custom, message: r3.message, params: { isNestJsZod: true, code: "invalid_date_string_day", expected: r3.type } }), n2.dirty();
|
|
5623
|
+
} else if ("minYear" === r3.kind) {
|
|
5624
|
+
if (a2.getFullYear() >= r3.value)
|
|
5754
5625
|
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)
|
|
5626
|
+
_(s2, { code: e.ZodIssueCode.too_small, type: "date_string_year", minimum: r3.value, inclusive: true, message: r3.message }), n2.dirty();
|
|
5627
|
+
} else if ("maxYear" === r3.kind) {
|
|
5628
|
+
if (a2.getFullYear() <= r3.value)
|
|
5766
5629
|
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();
|
|
5630
|
+
_(s2, { code: e.ZodIssueCode.too_big, type: "date_string_year", maximum: r3.value, inclusive: true, message: r3.message }), n2.dirty();
|
|
5775
5631
|
}
|
|
5776
|
-
}
|
|
5777
|
-
return { status: status.value, value: input.data };
|
|
5632
|
+
return { status: n2.value, value: t2.data };
|
|
5778
5633
|
}
|
|
5779
|
-
_replaceCheck(
|
|
5780
|
-
return new
|
|
5781
|
-
|
|
5782
|
-
|
|
5634
|
+
_replaceCheck(e2) {
|
|
5635
|
+
return new Y((t2 = j({}, this._def), r2 = { checks: this._def.checks.filter((t3) => t3.kind !== e2.kind).concat(e2) }, x(t2, Z(r2))));
|
|
5636
|
+
var t2, r2;
|
|
5637
|
+
}
|
|
5638
|
+
format(e2, t2) {
|
|
5639
|
+
return this._replaceCheck(j({ kind: "format", value: e2, regex: D[e2] }, y(t2)));
|
|
5640
|
+
}
|
|
5641
|
+
past(e2) {
|
|
5642
|
+
return this._replaceCheck(j({ kind: "direction", direction: "past" }, y(e2)));
|
|
5783
5643
|
}
|
|
5784
|
-
|
|
5785
|
-
return this._replaceCheck(
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
return this._replaceCheck(__spreadValues$1({
|
|
5799
|
-
kind: "direction",
|
|
5800
|
-
direction: "future"
|
|
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)));
|
|
5644
|
+
future(e2) {
|
|
5645
|
+
return this._replaceCheck(j({ kind: "direction", direction: "future" }, y(e2)));
|
|
5646
|
+
}
|
|
5647
|
+
weekDay(e2) {
|
|
5648
|
+
return this._replaceCheck(j({ kind: "day-type", type: "weekDay" }, y(e2)));
|
|
5649
|
+
}
|
|
5650
|
+
weekend(e2) {
|
|
5651
|
+
return this._replaceCheck(j({ kind: "day-type", type: "weekend" }, y(e2)));
|
|
5652
|
+
}
|
|
5653
|
+
minYear(e2, t2) {
|
|
5654
|
+
return this._replaceCheck(j({ kind: "minYear", value: e2 }, y(t2)));
|
|
5655
|
+
}
|
|
5656
|
+
maxYear(e2, t2) {
|
|
5657
|
+
return this._replaceCheck(j({ kind: "maxYear", value: e2 }, y(t2)));
|
|
5826
5658
|
}
|
|
5827
5659
|
cast() {
|
|
5828
|
-
return this.transform((
|
|
5660
|
+
return this.transform((e2) => new Date(e2));
|
|
5829
5661
|
}
|
|
5830
5662
|
get format_() {
|
|
5831
|
-
return
|
|
5663
|
+
return k(this._def.checks, "format");
|
|
5832
5664
|
}
|
|
5833
5665
|
get isPast() {
|
|
5834
|
-
var
|
|
5835
|
-
return ((
|
|
5666
|
+
var e2;
|
|
5667
|
+
return "past" === (null == (e2 = k(this._def.checks, "direction")) ? void 0 : e2.direction);
|
|
5836
5668
|
}
|
|
5837
5669
|
get isFuture() {
|
|
5838
|
-
var
|
|
5839
|
-
return ((
|
|
5670
|
+
var e2;
|
|
5671
|
+
return "future" === (null == (e2 = k(this._def.checks, "direction")) ? void 0 : e2.direction);
|
|
5840
5672
|
}
|
|
5841
5673
|
get isWeekDay() {
|
|
5842
|
-
var
|
|
5843
|
-
return ((
|
|
5674
|
+
var e2;
|
|
5675
|
+
return "weekDay" === (null == (e2 = k(this._def.checks, "day-type")) ? void 0 : e2.type);
|
|
5844
5676
|
}
|
|
5845
5677
|
get isWeekend() {
|
|
5846
|
-
var
|
|
5847
|
-
return ((
|
|
5678
|
+
var e2;
|
|
5679
|
+
return "weekend" === (null == (e2 = k(this._def.checks, "day-type")) ? void 0 : e2.type);
|
|
5848
5680
|
}
|
|
5849
5681
|
get minYear_() {
|
|
5850
|
-
return
|
|
5682
|
+
return k(this._def.checks, "minYear");
|
|
5851
5683
|
}
|
|
5852
5684
|
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)
|
|
5685
|
+
return k(this._def.checks, "maxYear");
|
|
5686
|
+
}
|
|
5687
|
+
};
|
|
5688
|
+
var E = Y;
|
|
5689
|
+
E.create = (e2) => new Y(j({ checks: [{ kind: "format", value: "date-time", regex: D["date-time"] }], typeName: w.ZodDateString }, v(e2)));
|
|
5690
|
+
var $ = E.create;
|
|
5691
|
+
var T = Object.defineProperty;
|
|
5692
|
+
var z2 = Object.defineProperties;
|
|
5693
|
+
var M = Object.getOwnPropertyDescriptors;
|
|
5694
|
+
var N = Object.getOwnPropertySymbols;
|
|
5695
|
+
var L = Object.prototype.hasOwnProperty;
|
|
5696
|
+
var S = Object.prototype.propertyIsEnumerable;
|
|
5697
|
+
var F = (e2, t2, r2) => t2 in e2 ? T(e2, t2, { enumerable: true, configurable: true, writable: true, value: r2 }) : e2[t2] = r2;
|
|
5698
|
+
var q = (e2, t2) => {
|
|
5699
|
+
for (var r2 in t2 || (t2 = {}))
|
|
5700
|
+
L.call(t2, r2) && F(e2, r2, t2[r2]);
|
|
5701
|
+
if (N)
|
|
5702
|
+
for (var r2 of N(t2))
|
|
5703
|
+
S.call(t2, r2) && F(e2, r2, t2[r2]);
|
|
5704
|
+
return e2;
|
|
5705
|
+
};
|
|
5706
|
+
var A = ["digit", "lowercase", "uppercase", "special"];
|
|
5707
|
+
var J = { digit: /\d/, lowercase: /[a-z]/, uppercase: /[A-Z]/, special: /[!?@#$%^&*{};.,:%№"|\\/()-_+=<>`~[\]'"]/ };
|
|
5708
|
+
function R(e2) {
|
|
5709
|
+
return A.includes(e2.kind);
|
|
5710
|
+
}
|
|
5711
|
+
var V = class extends e.ZodType {
|
|
5712
|
+
_parse(t2) {
|
|
5713
|
+
const r2 = this._getType(t2), s2 = this._getOrReturnCtx(t2);
|
|
5714
|
+
if (r2 !== e.ZodParsedType.string)
|
|
5715
|
+
return _(s2, { code: e.ZodIssueCode.invalid_type, expected: e.ZodParsedType.string, received: s2.parsedType }), e.INVALID;
|
|
5716
|
+
const a2 = new e.ParseStatus();
|
|
5717
|
+
for (const r3 of this._def.checks)
|
|
5718
|
+
if (R(r3)) {
|
|
5719
|
+
if (J[r3.kind].test(t2.data))
|
|
5921
5720
|
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)
|
|
5721
|
+
_(s2, { code: e.ZodIssueCode.custom, message: r3.message, params: { isNestJsZod: true, code: `invalid_password_no_${r3.kind}` } }), a2.dirty();
|
|
5722
|
+
} else if ("minLength" === r3.kind) {
|
|
5723
|
+
if (t2.data.length >= r3.value)
|
|
5934
5724
|
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)
|
|
5725
|
+
_(s2, { code: e.ZodIssueCode.too_small, type: "password", minimum: r3.value, inclusive: true, message: r3.message }), a2.dirty();
|
|
5726
|
+
} else if ("maxLength" === r3.kind) {
|
|
5727
|
+
if (t2.data.length <= r3.value)
|
|
5946
5728
|
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();
|
|
5729
|
+
_(s2, { code: e.ZodIssueCode.too_big, type: "password", maximum: r3.value, inclusive: true, message: r3.message }), a2.dirty();
|
|
5955
5730
|
}
|
|
5956
|
-
}
|
|
5957
|
-
return { status: status.value, value: input.data };
|
|
5731
|
+
return { status: a2.value, value: t2.data };
|
|
5958
5732
|
}
|
|
5959
|
-
_replaceCheck(
|
|
5960
|
-
return new
|
|
5961
|
-
|
|
5962
|
-
}));
|
|
5733
|
+
_replaceCheck(e2) {
|
|
5734
|
+
return new V((t2 = q({}, this._def), r2 = { checks: this._def.checks.filter((t3) => t3.kind !== e2.kind).concat(e2) }, z2(t2, M(r2))));
|
|
5735
|
+
var t2, r2;
|
|
5963
5736
|
}
|
|
5964
5737
|
buildFullRegExp() {
|
|
5965
|
-
const
|
|
5966
|
-
for (const
|
|
5967
|
-
if (!
|
|
5738
|
+
const e2 = [];
|
|
5739
|
+
for (const t3 of this._def.checks) {
|
|
5740
|
+
if (!R(t3))
|
|
5968
5741
|
continue;
|
|
5969
|
-
const
|
|
5970
|
-
|
|
5742
|
+
const r2 = J[t3.kind];
|
|
5743
|
+
e2.push(`(?=.*${r2.source})`);
|
|
5971
5744
|
}
|
|
5972
|
-
if (
|
|
5745
|
+
if (0 === e2.length)
|
|
5973
5746
|
return /^.*$/;
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
return new RegExp(`^(?:${union}.*)$`);
|
|
5747
|
+
const t2 = e2.join("");
|
|
5748
|
+
return new RegExp(`^(?:${t2}.*)$`);
|
|
5977
5749
|
}
|
|
5978
|
-
atLeastOne(
|
|
5979
|
-
return this._replaceCheck(
|
|
5980
|
-
kind
|
|
5981
|
-
}, normalizeErrorMessage(message)));
|
|
5750
|
+
atLeastOne(e2, t2) {
|
|
5751
|
+
return this._replaceCheck(q({ kind: e2 }, y(t2)));
|
|
5982
5752
|
}
|
|
5983
|
-
min(
|
|
5984
|
-
return this._replaceCheck(
|
|
5985
|
-
kind: "minLength",
|
|
5986
|
-
value: length
|
|
5987
|
-
}, normalizeErrorMessage(message)));
|
|
5753
|
+
min(e2, t2) {
|
|
5754
|
+
return this._replaceCheck(q({ kind: "minLength", value: e2 }, y(t2)));
|
|
5988
5755
|
}
|
|
5989
|
-
max(
|
|
5990
|
-
return this._replaceCheck(
|
|
5991
|
-
kind: "maxLength",
|
|
5992
|
-
value: length
|
|
5993
|
-
}, normalizeErrorMessage(message)));
|
|
5756
|
+
max(e2, t2) {
|
|
5757
|
+
return this._replaceCheck(q({ kind: "maxLength", value: e2 }, y(t2)));
|
|
5994
5758
|
}
|
|
5995
|
-
isAtLeastOne(
|
|
5996
|
-
return
|
|
5759
|
+
isAtLeastOne(e2) {
|
|
5760
|
+
return function(e3, t2) {
|
|
5761
|
+
return Boolean(k(e3, t2));
|
|
5762
|
+
}(this._def.checks, e2);
|
|
5997
5763
|
}
|
|
5998
5764
|
get minLength() {
|
|
5999
|
-
return
|
|
5765
|
+
return k(this._def.checks, "minLength");
|
|
6000
5766
|
}
|
|
6001
5767
|
get maxLength() {
|
|
6002
|
-
return
|
|
5768
|
+
return k(this._def.checks, "maxLength");
|
|
6003
5769
|
}
|
|
6004
5770
|
};
|
|
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
|
-
});
|
|
5771
|
+
var H = V;
|
|
5772
|
+
H.create = (e2) => new V(q({ checks: [], typeName: w.ZodPassword }, v(e2)));
|
|
5773
|
+
var K = H.create;
|
|
5774
|
+
var W = r({ __proto__: null, defaultErrorMap: m, setErrorMap: p, addIssueToContext: _, from: f, json: h, ZodDateString: E, dateString: $, ZodPassword: H, password: K, ZodFirstPartyTypeKindExtended: w }, [s]);
|
|
5775
|
+
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) {
|
|
5776
|
+
"default" === t2 || exports.hasOwnProperty(t2) || Object.defineProperty(exports, t2, { enumerable: true, get: function() {
|
|
5777
|
+
return e[t2];
|
|
5778
|
+
} });
|
|
6045
5779
|
});
|
|
6046
5780
|
}
|
|
6047
5781
|
});
|
|
6048
5782
|
|
|
6049
|
-
//
|
|
5783
|
+
// ../prisma/node_modules/nestjs-zod/dist/dto.js
|
|
6050
5784
|
var require_dto = __commonJS({
|
|
6051
|
-
"
|
|
5785
|
+
"../prisma/node_modules/nestjs-zod/dist/dto.js"(exports) {
|
|
6052
5786
|
"use strict";
|
|
6053
|
-
Object.defineProperty(exports, "__esModule", { value: true })
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
return this.schema.parse(input);
|
|
5787
|
+
Object.defineProperty(exports, "__esModule", { value: true }), exports.createZodDto = function(e) {
|
|
5788
|
+
class t {
|
|
5789
|
+
static create(e2) {
|
|
5790
|
+
return this.schema.parse(e2);
|
|
6058
5791
|
}
|
|
6059
5792
|
}
|
|
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;
|
|
5793
|
+
return t.isZodDto = true, t.schema = e, t;
|
|
5794
|
+
}, exports.isZodDto = function(e) {
|
|
5795
|
+
return null == e ? void 0 : e.isZodDto;
|
|
5796
|
+
};
|
|
6069
5797
|
}
|
|
6070
5798
|
});
|
|
6071
5799
|
|
|
@@ -6658,6 +6386,7 @@ var require_packagerelease = __commonJS({
|
|
|
6658
6386
|
updatedAt: z2.date().or(z2.string()),
|
|
6659
6387
|
version: z2.string(),
|
|
6660
6388
|
versionInt: z2.string().or(z2.bigint()),
|
|
6389
|
+
prerelease: z2.boolean(),
|
|
6661
6390
|
type: z2.nativeEnum(enums_1.PackageTypeEnum),
|
|
6662
6391
|
servingType: z2.string().nullish(),
|
|
6663
6392
|
label: z2.string(),
|
|
@@ -6684,7 +6413,95 @@ var require_packagerelease = __commonJS({
|
|
|
6684
6413
|
dependencies: index_1.PackageDependenciesModel.array(),
|
|
6685
6414
|
statusDetailsSystem: index_1.PackageStatusDetailsSystemModel.array(),
|
|
6686
6415
|
statusDetailsRelease: index_1.PackageStatusDetailsReleaseModel.array(),
|
|
6687
|
-
sourceRevision: index_1.SourceRevisionModel.nullish()
|
|
6416
|
+
sourceRevision: index_1.SourceRevisionModel.nullish(),
|
|
6417
|
+
packageReleaseData: index_1.PackageReleaseDataModel.nullish()
|
|
6418
|
+
});
|
|
6419
|
+
});
|
|
6420
|
+
}
|
|
6421
|
+
});
|
|
6422
|
+
|
|
6423
|
+
// ../prisma/dist/generated/zod/packagereleasedata.js
|
|
6424
|
+
var require_packagereleasedata = __commonJS({
|
|
6425
|
+
"../prisma/dist/generated/zod/packagereleasedata.js"(exports) {
|
|
6426
|
+
"use strict";
|
|
6427
|
+
var __extends = exports && exports.__extends || function() {
|
|
6428
|
+
var extendStatics = function(d, b) {
|
|
6429
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
6430
|
+
d2.__proto__ = b2;
|
|
6431
|
+
} || function(d2, b2) {
|
|
6432
|
+
for (var p in b2)
|
|
6433
|
+
if (Object.prototype.hasOwnProperty.call(b2, p))
|
|
6434
|
+
d2[p] = b2[p];
|
|
6435
|
+
};
|
|
6436
|
+
return extendStatics(d, b);
|
|
6437
|
+
};
|
|
6438
|
+
return function(d, b) {
|
|
6439
|
+
if (typeof b !== "function" && b !== null)
|
|
6440
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
6441
|
+
extendStatics(d, b);
|
|
6442
|
+
function __() {
|
|
6443
|
+
this.constructor = d;
|
|
6444
|
+
}
|
|
6445
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
6446
|
+
};
|
|
6447
|
+
}();
|
|
6448
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
6449
|
+
if (k2 === void 0)
|
|
6450
|
+
k2 = k;
|
|
6451
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6452
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6453
|
+
desc = { enumerable: true, get: function() {
|
|
6454
|
+
return m[k];
|
|
6455
|
+
} };
|
|
6456
|
+
}
|
|
6457
|
+
Object.defineProperty(o, k2, desc);
|
|
6458
|
+
} : function(o, m, k, k2) {
|
|
6459
|
+
if (k2 === void 0)
|
|
6460
|
+
k2 = k;
|
|
6461
|
+
o[k2] = m[k];
|
|
6462
|
+
});
|
|
6463
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
6464
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
6465
|
+
} : function(o, v) {
|
|
6466
|
+
o["default"] = v;
|
|
6467
|
+
});
|
|
6468
|
+
var __importStar = exports && exports.__importStar || function(mod) {
|
|
6469
|
+
if (mod && mod.__esModule)
|
|
6470
|
+
return mod;
|
|
6471
|
+
var result = {};
|
|
6472
|
+
if (mod != null) {
|
|
6473
|
+
for (var k in mod)
|
|
6474
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
6475
|
+
__createBinding(result, mod, k);
|
|
6476
|
+
}
|
|
6477
|
+
__setModuleDefault(result, mod);
|
|
6478
|
+
return result;
|
|
6479
|
+
};
|
|
6480
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6481
|
+
exports.PackageReleaseDataModel = exports.PackageReleaseDataDto = exports._PackageReleaseDataModel = void 0;
|
|
6482
|
+
var z2 = __importStar(require_z());
|
|
6483
|
+
var dto_1 = require_dto();
|
|
6484
|
+
var index_1 = require_zod();
|
|
6485
|
+
exports._PackageReleaseDataModel = z2.object({
|
|
6486
|
+
revisionId: z2.string(),
|
|
6487
|
+
data: z2.json(),
|
|
6488
|
+
createdAt: z2.date(),
|
|
6489
|
+
updatedAt: z2.date()
|
|
6490
|
+
});
|
|
6491
|
+
var PackageReleaseDataDto = (
|
|
6492
|
+
/** @class */
|
|
6493
|
+
function(_super) {
|
|
6494
|
+
__extends(PackageReleaseDataDto2, _super);
|
|
6495
|
+
function PackageReleaseDataDto2() {
|
|
6496
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
6497
|
+
}
|
|
6498
|
+
return PackageReleaseDataDto2;
|
|
6499
|
+
}((0, dto_1.createZodDto)(exports._PackageReleaseDataModel))
|
|
6500
|
+
);
|
|
6501
|
+
exports.PackageReleaseDataDto = PackageReleaseDataDto;
|
|
6502
|
+
exports.PackageReleaseDataModel = z2.lazy(function() {
|
|
6503
|
+
return exports._PackageReleaseDataModel.extend({
|
|
6504
|
+
packageRelease: index_1.PackageReleaseModel
|
|
6688
6505
|
});
|
|
6689
6506
|
});
|
|
6690
6507
|
}
|
|
@@ -7369,6 +7186,7 @@ var require_zod = __commonJS({
|
|
|
7369
7186
|
__exportStar(require_category(), exports);
|
|
7370
7187
|
__exportStar(require_package(), exports);
|
|
7371
7188
|
__exportStar(require_packagerelease(), exports);
|
|
7189
|
+
__exportStar(require_packagereleasedata(), exports);
|
|
7372
7190
|
__exportStar(require_packagestatusdetailssystem(), exports);
|
|
7373
7191
|
__exportStar(require_packagestatusdetailsrelease(), exports);
|
|
7374
7192
|
__exportStar(require_packagedependencies(), exports);
|
|
@@ -11259,7 +11077,8 @@ var GetPackagesQuery = z.intersection(
|
|
|
11259
11077
|
}),
|
|
11260
11078
|
order: z.nativeEnum(import_library_prisma4.Prisma.SortOrder).default(import_library_prisma4.Prisma.SortOrder.desc),
|
|
11261
11079
|
categories: PackageArrayOfStringParam,
|
|
11262
|
-
includeDeprecated: z.string().transform((v) => ["true", "1", 1, true].includes(v)).or(z.boolean()).default(false)
|
|
11080
|
+
includeDeprecated: z.string().transform((v) => ["true", "1", 1, true].includes(v)).or(z.boolean()).default(false),
|
|
11081
|
+
includePrerelease: z.string().transform((v) => ["true", "1", 1, true].includes(v)).or(z.boolean()).default(false)
|
|
11263
11082
|
}).default({})
|
|
11264
11083
|
);
|
|
11265
11084
|
var PackageParamUniversal = z.object({
|
|
@@ -11322,7 +11141,8 @@ var CreatePackageByVersionBody = z.object({
|
|
|
11322
11141
|
revisionId: z.string().optional(),
|
|
11323
11142
|
status: z.nativeEnum(import_library_prisma5.PackageStatusDetailsStatusEnum).default(import_library_prisma5.PackageStatusDetailsStatusEnum.BETA).optional(),
|
|
11324
11143
|
level: z.nativeEnum(import_library_prisma5.PackageStatusDetailsLevelEnum).default(import_library_prisma5.PackageStatusDetailsLevelEnum.ACCOUNT).optional(),
|
|
11325
|
-
servingType: z.string().optional().transform((s) => s?.toUpperCase?.())
|
|
11144
|
+
servingType: z.string().optional().transform((s) => s?.toUpperCase?.()),
|
|
11145
|
+
data: z.any().optional().default({})
|
|
11326
11146
|
}).transform((body) => {
|
|
11327
11147
|
body.label = body.label || body.name;
|
|
11328
11148
|
return body;
|