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