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

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