@or-sdk/library-types-v2 6.0.6 → 6.0.8

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/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
- // ../../node_modules/nestjs-zod/dist/z.js
5443
+ // ../prisma/node_modules/nestjs-zod/dist/z.js
5433
5444
  var require_z = __commonJS({
5434
- "../../node_modules/nestjs-zod/dist/z.js"(exports) {
5445
+ "../prisma/node_modules/nestjs-zod/dist/z.js"(exports) {
5435
5446
  "use strict";
5436
5447
  Object.defineProperty(exports, "__esModule", { value: true });
5437
- var zod = require_lib();
5438
- function _interopNamespace(e) {
5439
- if (e && e.__esModule)
5440
- return e;
5441
- var n = /* @__PURE__ */ Object.create(null);
5442
- if (e) {
5443
- Object.keys(e).forEach(function(k) {
5444
- if (k !== "default") {
5445
- var d = Object.getOwnPropertyDescriptor(e, k);
5446
- Object.defineProperty(n, k, d.get ? d : {
5447
- enumerable: true,
5448
- get: function() {
5449
- return e[k];
5450
- }
5451
- });
5452
- }
5453
- });
5454
- }
5455
- n["default"] = e;
5456
- return Object.freeze(n);
5457
- }
5458
- function _mergeNamespaces(n, m) {
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
- return Object.freeze(n);
5473
- }
5474
- var zod__namespace = /* @__PURE__ */ _interopNamespace(zod);
5475
- var CUSTOM_ISSUE_CODE = "custom";
5476
- function isNestJsZodIssue(issue) {
5477
- var _a;
5478
- return issue.code === CUSTOM_ISSUE_CODE && ((_a = issue.params) == null ? void 0 : _a.isNestJsZod);
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)
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))
5497
5481
  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 createMinMaxMapper(valueType, map) {
5502
- return (issue) => {
5503
- if (issue.code !== zod.ZodIssueCode.too_small && issue.code !== zod.ZodIssueCode.too_big) {
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
- const result = map(issue);
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 dateStringCustom = createCustomMapper((params) => {
5516
- if (params.code === "invalid_date_string") {
5517
- const message = `Invalid string, expected it to be a valid date`;
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 (params.code === "invalid_date_string_format") {
5521
- const mapper2 = {
5522
- "date": 'YYYY-MM-DD (RFC3339 "full-date")',
5523
- "date-time": 'YYYY-MM-DDTHH:mm:ssZ (RFC3339 "date-time")'
5524
- };
5525
- const readable = mapper2[params.expected];
5526
- const message = `Invalid date, expected it to match ${readable}`;
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 dateStringYearMinMax = createMinMaxMapper("date_string_year", (issue) => {
5545
- if (issue.code === zod.ZodIssueCode.too_small) {
5546
- const appendix = issue.inclusive ? "or equal to " : "";
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 (issue.code === zod.ZodIssueCode.too_big) {
5551
- const appendix = issue.inclusive ? "or equal to " : "";
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 passwordCustom = createCustomMapper((params) => {
5558
- if (params.code === "invalid_password_no_digit") {
5559
- const message = `Password must contain at least one digit`;
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 (params.code === "invalid_password_no_lowercase") {
5563
- const message = `Password must contain at least one lowercase letter`;
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 (params.code === "invalid_password_no_uppercase") {
5567
- const message = `Password must contain at least one uppercase letter`;
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 (params.code === "invalid_password_no_special") {
5571
- const message = `Password must contain at least one special symbol`;
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 passwordMinMax = createMinMaxMapper("password", (issue) => {
5577
- if (issue.code === zod.ZodIssueCode.too_small) {
5578
- const appendix = issue.inclusive ? "or equal to " : "";
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 (issue.code === zod.ZodIssueCode.too_big) {
5583
- const appendix = issue.inclusive ? "or equal to " : "";
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 mapper = composeMappers([
5590
- dateStringCustom,
5591
- dateStringYearMinMax,
5592
- passwordCustom,
5593
- passwordMinMax
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 zod.defaultErrorMap(issue, context);
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 setExtendedErrorMap(map) {
5603
- zod.setErrorMap(map);
5557
+ function p(t2) {
5558
+ e.setErrorMap(t2);
5604
5559
  }
5605
- setExtendedErrorMap(extendedErrorMap);
5606
- function from(schema) {
5607
- return schema;
5560
+ function f(e2) {
5561
+ return e2;
5608
5562
  }
5609
- var literal = zod.z.union([zod.z.string(), zod.z.number(), zod.z.boolean()]);
5610
- var DEFAULT_MESSAGE = "Expected value to be a JSON-serializable";
5611
- var json = (message = DEFAULT_MESSAGE) => {
5612
- const schema = zod.z.lazy(() => zod.z.union([literal, zod.z.array(schema), zod.z.record(schema)], {
5613
- invalid_type_error: message
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 addIssueToContextExtended(context, issueData) {
5618
- zod.addIssueToContext(context, issueData);
5569
+ function _(t2, r2) {
5570
+ e.addIssueToContext(t2, r2);
5619
5571
  }
5620
- function normalizeErrorMessage(message) {
5621
- if (typeof message === "string")
5622
- return { message };
5623
- return message;
5572
+ function y(e2) {
5573
+ return "string" == typeof e2 ? { message: e2 } : e2;
5624
5574
  }
5625
- function processCreateParams2(params) {
5626
- if (!params)
5575
+ function v(e2) {
5576
+ if (!e2)
5627
5577
  return {};
5628
- const { errorMap: errorMap2, invalid_type_error, required_error, description } = params;
5629
- if (errorMap2 && (invalid_type_error || required_error)) {
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
- if (errorMap2)
5633
- return { errorMap: errorMap2, description };
5634
- const customMap = (issue, context) => {
5635
- if (issue.code !== "invalid_type")
5636
- return { message: context.defaultError };
5637
- if (typeof context.data === "undefined" && required_error)
5638
- return { message: required_error };
5639
- if (params.invalid_type_error)
5640
- return { message: params.invalid_type_error };
5641
- return { message: context.defaultError };
5642
- };
5643
- return { errorMap: customMap, description };
5644
- }
5645
- function findCheck(checks, kind) {
5646
- return checks.find((check) => check.kind === kind);
5647
- }
5648
- function hasCheck(checks, kind) {
5649
- return Boolean(findCheck(checks, kind));
5650
- }
5651
- var ZodFirstPartyTypeKindExtended = /* @__PURE__ */ ((ZodFirstPartyTypeKindExtended2) => {
5652
- ZodFirstPartyTypeKindExtended2["ZodDateString"] = "ZodDateString";
5653
- ZodFirstPartyTypeKindExtended2["ZodPassword"] = "ZodPassword";
5654
- return ZodFirstPartyTypeKindExtended2;
5655
- })(ZodFirstPartyTypeKindExtended || {});
5656
- var __defProp$1 = Object.defineProperty;
5657
- var __defProps$1 = Object.defineProperties;
5658
- var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
5659
- var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
5660
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
5661
- var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
5662
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5663
- var __spreadValues$1 = (a, b) => {
5664
- for (var prop in b || (b = {}))
5665
- if (__hasOwnProp$1.call(b, prop))
5666
- __defNormalProp$1(a, prop, b[prop]);
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
- addIssueToContextExtended(context, {
5710
- code: zod.ZodIssueCode.custom,
5711
- message: check.message,
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
- addIssueToContextExtended(context, {
5728
- code: zod.ZodIssueCode.custom,
5729
- message: check.message,
5730
- params: {
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
- addIssueToContextExtended(context, {
5747
- code: zod.ZodIssueCode.custom,
5748
- message: check.message,
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
- addIssueToContextExtended(context, {
5761
- code: zod.ZodIssueCode.too_small,
5762
- type: "date_string_year",
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
- addIssueToContextExtended(context, {
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(check) {
5785
- return new _ZodDateString(__spreadProps$1(__spreadValues$1({}, this._def), {
5786
- checks: this._def.checks.filter((item) => item.kind !== check.kind).concat(check)
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)));
5648
+ }
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)));
5788
5660
  }
5789
- format(format, message) {
5790
- return this._replaceCheck(__spreadValues$1({
5791
- kind: "format",
5792
- value: format,
5793
- regex: formatToRegex[format]
5794
- }, normalizeErrorMessage(message)));
5795
- }
5796
- past(message) {
5797
- return this._replaceCheck(__spreadValues$1({
5798
- kind: "direction",
5799
- direction: "past"
5800
- }, normalizeErrorMessage(message)));
5801
- }
5802
- future(message) {
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)));
5661
+ maxYear(e2, t2) {
5662
+ return this._replaceCheck(j({ kind: "maxYear", value: e2 }, y(t2)));
5831
5663
  }
5832
5664
  cast() {
5833
- return this.transform((string) => new Date(string));
5665
+ return this.transform((e2) => new Date(e2));
5834
5666
  }
5835
5667
  get format_() {
5836
- return findCheck(this._def.checks, "format");
5668
+ return k(this._def.checks, "format");
5837
5669
  }
5838
5670
  get isPast() {
5839
- var _a;
5840
- return ((_a = findCheck(this._def.checks, "direction")) == null ? void 0 : _a.direction) === "past";
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 _a;
5844
- return ((_a = findCheck(this._def.checks, "direction")) == null ? void 0 : _a.direction) === "future";
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 _a;
5848
- return ((_a = findCheck(this._def.checks, "day-type")) == null ? void 0 : _a.type) === "weekDay";
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 _a;
5852
- return ((_a = findCheck(this._def.checks, "day-type")) == null ? void 0 : _a.type) === "weekend";
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 findCheck(this._def.checks, "minYear");
5687
+ return k(this._def.checks, "minYear");
5856
5688
  }
5857
5689
  get maxYear_() {
5858
- return findCheck(this._def.checks, "maxYear");
5859
- }
5860
- };
5861
- var ZodDateString = _ZodDateString;
5862
- ZodDateString.create = (params) => {
5863
- return new _ZodDateString(__spreadValues$1({
5864
- checks: [
5865
- {
5866
- kind: "format",
5867
- value: "date-time",
5868
- regex: formatToRegex["date-time"]
5869
- }
5870
- ],
5871
- typeName: ZodFirstPartyTypeKindExtended.ZodDateString
5872
- }, processCreateParams2(params)));
5873
- };
5874
- var dateString = ZodDateString.create;
5875
- var __defProp2 = Object.defineProperty;
5876
- var __defProps = Object.defineProperties;
5877
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5878
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5879
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
5880
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
5881
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5882
- var __spreadValues = (a, b) => {
5883
- for (var prop in b || (b = {}))
5884
- if (__hasOwnProp2.call(b, prop))
5885
- __defNormalProp(a, prop, b[prop]);
5886
- if (__getOwnPropSymbols)
5887
- for (var prop of __getOwnPropSymbols(b)) {
5888
- if (__propIsEnum.call(b, prop))
5889
- __defNormalProp(a, prop, b[prop]);
5890
- }
5891
- return a;
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
- addIssueToContextExtended(context, {
5928
- code: zod.ZodIssueCode.custom,
5929
- message: check.message,
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
- addIssueToContextExtended(context, {
5941
- code: zod.ZodIssueCode.too_small,
5942
- type: "password",
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
- addIssueToContextExtended(context, {
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(check) {
5965
- return new _ZodPassword(__spreadProps(__spreadValues({}, this._def), {
5966
- checks: this._def.checks.filter((item) => item.kind !== check.kind).concat(check)
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 lookaheads = [];
5971
- for (const check of this._def.checks) {
5972
- if (!isSymbolCheck(check))
5743
+ const e2 = [];
5744
+ for (const t3 of this._def.checks) {
5745
+ if (!R(t3))
5973
5746
  continue;
5974
- const regex = REGEXPS[check.kind];
5975
- lookaheads.push(`(?=.*${regex.source})`);
5747
+ const r2 = J[t3.kind];
5748
+ e2.push(`(?=.*${r2.source})`);
5976
5749
  }
5977
- if (lookaheads.length === 0) {
5750
+ if (0 === e2.length)
5978
5751
  return /^.*$/;
5979
- }
5980
- const union = lookaheads.join("");
5981
- return new RegExp(`^(?:${union}.*)$`);
5752
+ const t2 = e2.join("");
5753
+ return new RegExp(`^(?:${t2}.*)$`);
5982
5754
  }
5983
- atLeastOne(kind, message) {
5984
- return this._replaceCheck(__spreadValues({
5985
- kind
5986
- }, normalizeErrorMessage(message)));
5755
+ atLeastOne(e2, t2) {
5756
+ return this._replaceCheck(q({ kind: e2 }, y(t2)));
5987
5757
  }
5988
- min(length, message) {
5989
- return this._replaceCheck(__spreadValues({
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(length, message) {
5995
- return this._replaceCheck(__spreadValues({
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(kind) {
6001
- return hasCheck(this._def.checks, kind);
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 findCheck(this._def.checks, "minLength");
5770
+ return k(this._def.checks, "minLength");
6005
5771
  }
6006
5772
  get maxLength() {
6007
- return findCheck(this._def.checks, "maxLength");
5773
+ return k(this._def.checks, "maxLength");
6008
5774
  }
6009
5775
  };
6010
- var ZodPassword = _ZodPassword;
6011
- ZodPassword.create = (params) => {
6012
- return new _ZodPassword(__spreadValues({
6013
- checks: [],
6014
- typeName: ZodFirstPartyTypeKindExtended.ZodPassword
6015
- }, processCreateParams2(params)));
6016
- };
6017
- var password = ZodPassword.create;
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
- // ../../node_modules/nestjs-zod/dist/dto.js
5788
+ // ../prisma/node_modules/nestjs-zod/dist/dto.js
6055
5789
  var require_dto = __commonJS({
6056
- "../../node_modules/nestjs-zod/dist/dto.js"(exports) {
5790
+ "../prisma/node_modules/nestjs-zod/dist/dto.js"(exports) {
6057
5791
  "use strict";
6058
- Object.defineProperty(exports, "__esModule", { value: true });
6059
- function createZodDto(schema) {
6060
- class AugmentedZodDto {
6061
- static create(input) {
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
- AugmentedZodDto.isZodDto = true;
6066
- AugmentedZodDto.schema = schema;
6067
- return AugmentedZodDto;
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
 
@@ -6109,23 +5837,23 @@ var require_enums = __commonJS({
6109
5837
  PackageSchemaTypeEnum3["EXTERNAL"] = "EXTERNAL";
6110
5838
  PackageSchemaTypeEnum3["UNKNOWN"] = "UNKNOWN";
6111
5839
  })(PackageSchemaTypeEnum2 || (exports.PackageSchemaTypeEnum = PackageSchemaTypeEnum2 = {}));
6112
- var PackageStatusDetailsStatusEnum3;
6113
- (function(PackageStatusDetailsStatusEnum4) {
6114
- PackageStatusDetailsStatusEnum4["TEST_ONLY"] = "TEST_ONLY";
6115
- PackageStatusDetailsStatusEnum4["PENDING"] = "PENDING";
6116
- PackageStatusDetailsStatusEnum4["EXTRACTING"] = "EXTRACTING";
6117
- PackageStatusDetailsStatusEnum4["UPLOADED"] = "UPLOADED";
6118
- PackageStatusDetailsStatusEnum4["BETA"] = "BETA";
6119
- PackageStatusDetailsStatusEnum4["RELEASED"] = "RELEASED";
6120
- PackageStatusDetailsStatusEnum4["ACCOUNT_BETA"] = "ACCOUNT_BETA";
6121
- PackageStatusDetailsStatusEnum4["DEPRECATED"] = "DEPRECATED";
6122
- })(PackageStatusDetailsStatusEnum3 || (exports.PackageStatusDetailsStatusEnum = PackageStatusDetailsStatusEnum3 = {}));
6123
- var PackageStatusDetailsLevelEnum3;
6124
- (function(PackageStatusDetailsLevelEnum4) {
6125
- PackageStatusDetailsLevelEnum4["USER"] = "USER";
6126
- PackageStatusDetailsLevelEnum4["ACCOUNT"] = "ACCOUNT";
6127
- PackageStatusDetailsLevelEnum4["PDE"] = "PDE";
6128
- })(PackageStatusDetailsLevelEnum3 || (exports.PackageStatusDetailsLevelEnum = PackageStatusDetailsLevelEnum3 = {}));
5840
+ var PackageStatusDetailsStatusEnum2;
5841
+ (function(PackageStatusDetailsStatusEnum3) {
5842
+ PackageStatusDetailsStatusEnum3["TEST_ONLY"] = "TEST_ONLY";
5843
+ PackageStatusDetailsStatusEnum3["PENDING"] = "PENDING";
5844
+ PackageStatusDetailsStatusEnum3["EXTRACTING"] = "EXTRACTING";
5845
+ PackageStatusDetailsStatusEnum3["UPLOADED"] = "UPLOADED";
5846
+ PackageStatusDetailsStatusEnum3["BETA"] = "BETA";
5847
+ PackageStatusDetailsStatusEnum3["RELEASED"] = "RELEASED";
5848
+ PackageStatusDetailsStatusEnum3["ACCOUNT_BETA"] = "ACCOUNT_BETA";
5849
+ PackageStatusDetailsStatusEnum3["DEPRECATED"] = "DEPRECATED";
5850
+ })(PackageStatusDetailsStatusEnum2 || (exports.PackageStatusDetailsStatusEnum = PackageStatusDetailsStatusEnum2 = {}));
5851
+ var PackageStatusDetailsLevelEnum2;
5852
+ (function(PackageStatusDetailsLevelEnum3) {
5853
+ PackageStatusDetailsLevelEnum3["USER"] = "USER";
5854
+ PackageStatusDetailsLevelEnum3["ACCOUNT"] = "ACCOUNT";
5855
+ PackageStatusDetailsLevelEnum3["PDE"] = "PDE";
5856
+ })(PackageStatusDetailsLevelEnum2 || (exports.PackageStatusDetailsLevelEnum = PackageStatusDetailsLevelEnum2 = {}));
6129
5857
  }
6130
5858
  });
6131
5859
 
@@ -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);
@@ -11213,15 +11031,18 @@ var PackageMeta = z.intersection(
11213
11031
  z.record(z.any(), z.any())
11214
11032
  ).optional();
11215
11033
  var AddPackageBody = import_library_prisma.prismaZodGenerated._PackageModel.pick({ label: true, description: true, id: true, type: true }).merge(
11216
- import_library_prisma.prismaZodGenerated._PackageReleaseModel.omit({
11217
- versionInt: true,
11218
- sourceRevisionId: true,
11219
- updatedAt: true,
11220
- modifiedById: true,
11221
- createdAt: true,
11222
- id: true,
11223
- createdById: true,
11224
- meta: true
11034
+ import_library_prisma.prismaZodGenerated._PackageReleaseModel.pick({
11035
+ version: true,
11036
+ data: true,
11037
+ membersAccountIds: true,
11038
+ membersUserIds: true,
11039
+ releaseNotesMarkdown: true,
11040
+ revisionId: true,
11041
+ schemaType: true,
11042
+ type: true,
11043
+ servingType: true,
11044
+ label: true,
11045
+ description: true
11225
11046
  }).merge(
11226
11047
  z.object({
11227
11048
  statusDetailsSystem: import_library_prisma.prismaZodGenerated._PackageStatusDetailsSystemModel.pick({ status: true }).optional(),
@@ -11269,9 +11090,13 @@ var ListView = z.object({
11269
11090
  filter: z.any().optional(),
11270
11091
  scope: z.any().optional()
11271
11092
  });
11272
- var PaginationParamsFunc = (orderByEnum = ["updatedAt", "createdAt"]) => z.object({
11273
- orderBy: z.enum(orderByEnum).default(orderByEnum[0]),
11274
- order: z.nativeEnum(import_library_prisma2.Prisma.SortOrder).default(import_library_prisma2.Prisma.SortOrder.desc),
11093
+ var PaginationParamsFunc = ({
11094
+ orderByEnum = ["updatedAt", "createdAt"],
11095
+ orderByDefault,
11096
+ orderDefault = import_library_prisma2.Prisma.SortOrder.desc
11097
+ }) => z.object({
11098
+ orderBy: z.enum(orderByEnum).default(orderByDefault || orderByEnum[0]),
11099
+ order: z.nativeEnum(import_library_prisma2.Prisma.SortOrder).default(orderDefault),
11275
11100
  skip: z.any().transform((n) => parseInt(n, 10)).default(0),
11276
11101
  take: z.any().transform((n) => parseInt(n, 10)).default(10)
11277
11102
  });
@@ -11339,22 +11164,9 @@ var GetPackagesListResponse = ListView.extend({
11339
11164
  })
11340
11165
  ).array(),
11341
11166
  total: z.number(),
11342
- items: PackageModelResponse.merge(
11343
- z.object({
11344
- latest: PackageReleaseModelResponse,
11345
- latestVersion: z.string(),
11346
- latestRevisionId: z.string(),
11347
- label: z.string(),
11348
- releases: z.array(
11349
- z.object({
11350
- status: z.nativeEnum(import_library_prisma4.PackageStatusDetailsStatusEnum),
11351
- level: z.nativeEnum(import_library_prisma4.PackageStatusDetailsLevelEnum),
11352
- version: z.string(),
11353
- revisionId: z.string()
11354
- })
11355
- )
11356
- })
11357
- ).array()
11167
+ items: PackageReleaseModelResponse.array().describe(
11168
+ "Latest versions of every package id"
11169
+ )
11358
11170
  });
11359
11171
  var GetPackageResponse = PackageModelResponse.merge(
11360
11172
  z.object({
@@ -11401,6 +11213,7 @@ var AddPackageReleaseReleaseStatusParams = UniversalPackageParams.merge(
11401
11213
  })
11402
11214
  );
11403
11215
  var GetPackagesParamsFilter = z.object({
11216
+ prerelease: z.any().transform((o) => [void 0, true, "true", "1"].includes(o)).optional().default(false),
11404
11217
  schemaType: InAndNotInFunc({
11405
11218
  type: z.nativeEnum(import_library_prisma5.PackageSchemaTypeEnum)
11406
11219
  }).optional(),
@@ -11446,10 +11259,11 @@ var GetPackagesParamsFilter = z.object({
11446
11259
  })
11447
11260
  }).optional().default({})
11448
11261
  });
11449
- var GetPackagesParams = PaginationParamsFunc([
11450
- "updatedAt",
11451
- "createdAt"
11452
- ]).merge(
11262
+ var GetPackagesParams = PaginationParamsFunc({
11263
+ orderByEnum: ["label", "updatedAt", "createdAt", "versionInt"],
11264
+ orderByDefault: "label",
11265
+ orderDefault: "asc"
11266
+ }).merge(
11453
11267
  z.object({
11454
11268
  filter: GetPackagesParamsFilter.optional().default({}),
11455
11269
  scope: GetPackagesParamsFilter.pick({ id: true, categories: true }).optional().default({}),