@timardex/cluemart-server-shared 1.0.163 → 1.0.165

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.
@@ -4656,10 +4656,10 @@ var Condition = class _Condition {
4656
4656
  otherwise
4657
4657
  } = config;
4658
4658
  let check = typeof is === "function" ? is : (...values) => values.every((value) => value === is);
4659
- return new _Condition(refs, (values, schema16) => {
4659
+ return new _Condition(refs, (values, schema17) => {
4660
4660
  var _branch;
4661
4661
  let branch = check(...values) ? then : otherwise;
4662
- return (_branch = branch == null ? void 0 : branch(schema16)) != null ? _branch : schema16;
4662
+ return (_branch = branch == null ? void 0 : branch(schema17)) != null ? _branch : schema17;
4663
4663
  });
4664
4664
  }
4665
4665
  constructor(refs, builder) {
@@ -4673,13 +4673,13 @@ var Condition = class _Condition {
4673
4673
  // TODO: ? operator here?
4674
4674
  ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context)
4675
4675
  ));
4676
- let schema16 = this.fn(values, base, options);
4677
- if (schema16 === void 0 || // @ts-ignore this can be base
4678
- schema16 === base) {
4676
+ let schema17 = this.fn(values, base, options);
4677
+ if (schema17 === void 0 || // @ts-ignore this can be base
4678
+ schema17 === base) {
4679
4679
  return base;
4680
4680
  }
4681
- if (!isSchema(schema16)) throw new TypeError("conditions must return a schema object");
4682
- return schema16.resolve(options);
4681
+ if (!isSchema(schema17)) throw new TypeError("conditions must return a schema object");
4682
+ return schema17.resolve(options);
4683
4683
  }
4684
4684
  };
4685
4685
  var prefixes = {
@@ -4749,7 +4749,7 @@ function createValidation(config) {
4749
4749
  path = "",
4750
4750
  options,
4751
4751
  originalValue,
4752
- schema: schema16
4752
+ schema: schema17
4753
4753
  }, panic, next) {
4754
4754
  const {
4755
4755
  name,
@@ -4761,8 +4761,8 @@ function createValidation(config) {
4761
4761
  let {
4762
4762
  parent,
4763
4763
  context,
4764
- abortEarly = schema16.spec.abortEarly,
4765
- disableStackTrace = schema16.spec.disableStackTrace
4764
+ abortEarly = schema17.spec.abortEarly,
4765
+ disableStackTrace = schema17.spec.disableStackTrace
4766
4766
  } = options;
4767
4767
  function resolve(item) {
4768
4768
  return Reference.isRef(item) ? item.getValue(value, parent, context) : item;
@@ -4771,9 +4771,9 @@ function createValidation(config) {
4771
4771
  const nextParams = Object.assign({
4772
4772
  value,
4773
4773
  originalValue,
4774
- label: schema16.spec.label,
4774
+ label: schema17.spec.label,
4775
4775
  path: overrides.path || path,
4776
- spec: schema16.spec,
4776
+ spec: schema17.spec,
4777
4777
  disableStackTrace: overrides.disableStackTrace || disableStackTrace
4778
4778
  }, params, overrides.params);
4779
4779
  for (const key of Object.keys(nextParams)) nextParams[key] = resolve(nextParams[key]);
@@ -4791,7 +4791,7 @@ function createValidation(config) {
4791
4791
  resolve,
4792
4792
  options,
4793
4793
  originalValue,
4794
- schema: schema16
4794
+ schema: schema17
4795
4795
  };
4796
4796
  const handleResult = (validOrError) => {
4797
4797
  if (ValidationError.isError(validOrError)) invalid(validOrError);
@@ -4825,42 +4825,42 @@ function createValidation(config) {
4825
4825
  validate.OPTIONS = config;
4826
4826
  return validate;
4827
4827
  }
4828
- function getIn(schema16, path, value, context = value) {
4828
+ function getIn(schema17, path, value, context = value) {
4829
4829
  let parent, lastPart, lastPartDebug;
4830
4830
  if (!path) return {
4831
4831
  parent,
4832
4832
  parentPath: path,
4833
- schema: schema16
4833
+ schema: schema17
4834
4834
  };
4835
4835
  (0, import_property_expr.forEach)(path, (_part, isBracket, isArray) => {
4836
4836
  let part = isBracket ? _part.slice(1, _part.length - 1) : _part;
4837
- schema16 = schema16.resolve({
4837
+ schema17 = schema17.resolve({
4838
4838
  context,
4839
4839
  parent,
4840
4840
  value
4841
4841
  });
4842
- let isTuple = schema16.type === "tuple";
4842
+ let isTuple = schema17.type === "tuple";
4843
4843
  let idx = isArray ? parseInt(part, 10) : 0;
4844
- if (schema16.innerType || isTuple) {
4844
+ if (schema17.innerType || isTuple) {
4845
4845
  if (isTuple && !isArray) throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${lastPartDebug}" must contain an index to the tuple element, e.g. "${lastPartDebug}[0]"`);
4846
4846
  if (value && idx >= value.length) {
4847
4847
  throw new Error(`Yup.reach cannot resolve an array item at index: ${_part}, in the path: ${path}. because there is no value at that index. `);
4848
4848
  }
4849
4849
  parent = value;
4850
4850
  value = value && value[idx];
4851
- schema16 = isTuple ? schema16.spec.types[idx] : schema16.innerType;
4851
+ schema17 = isTuple ? schema17.spec.types[idx] : schema17.innerType;
4852
4852
  }
4853
4853
  if (!isArray) {
4854
- if (!schema16.fields || !schema16.fields[part]) throw new Error(`The schema does not contain the path: ${path}. (failed at: ${lastPartDebug} which is a type: "${schema16.type}")`);
4854
+ if (!schema17.fields || !schema17.fields[part]) throw new Error(`The schema does not contain the path: ${path}. (failed at: ${lastPartDebug} which is a type: "${schema17.type}")`);
4855
4855
  parent = value;
4856
4856
  value = value && value[part];
4857
- schema16 = schema16.fields[part];
4857
+ schema17 = schema17.fields[part];
4858
4858
  }
4859
4859
  lastPart = part;
4860
4860
  lastPartDebug = isBracket ? "[" + _part + "]" : "." + _part;
4861
4861
  });
4862
4862
  return {
4863
- schema: schema16,
4863
+ schema: schema17,
4864
4864
  parent,
4865
4865
  parentPath: lastPart
4866
4866
  };
@@ -4997,20 +4997,20 @@ var Schema = class {
4997
4997
  this._mutate = before;
4998
4998
  return result;
4999
4999
  }
5000
- concat(schema16) {
5001
- if (!schema16 || schema16 === this) return this;
5002
- if (schema16.type !== this.type && this.type !== "mixed") throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema16.type}`);
5000
+ concat(schema17) {
5001
+ if (!schema17 || schema17 === this) return this;
5002
+ if (schema17.type !== this.type && this.type !== "mixed") throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema17.type}`);
5003
5003
  let base = this;
5004
- let combined = schema16.clone();
5004
+ let combined = schema17.clone();
5005
5005
  const mergedSpec = Object.assign({}, base.spec, combined.spec);
5006
5006
  combined.spec = mergedSpec;
5007
5007
  combined.internalTests = Object.assign({}, base.internalTests, combined.internalTests);
5008
- combined._whitelist = base._whitelist.merge(schema16._whitelist, schema16._blacklist);
5009
- combined._blacklist = base._blacklist.merge(schema16._blacklist, schema16._whitelist);
5008
+ combined._whitelist = base._whitelist.merge(schema17._whitelist, schema17._blacklist);
5009
+ combined._blacklist = base._blacklist.merge(schema17._blacklist, schema17._whitelist);
5010
5010
  combined.tests = base.tests;
5011
5011
  combined.exclusiveTests = base.exclusiveTests;
5012
5012
  combined.withMutation((next) => {
5013
- schema16.tests.forEach((fn) => {
5013
+ schema17.tests.forEach((fn) => {
5014
5014
  next.test(fn.OPTIONS);
5015
5015
  });
5016
5016
  });
@@ -5026,15 +5026,15 @@ var Schema = class {
5026
5026
  return this._typeCheck(v);
5027
5027
  }
5028
5028
  resolve(options) {
5029
- let schema16 = this;
5030
- if (schema16.conditions.length) {
5031
- let conditions = schema16.conditions;
5032
- schema16 = schema16.clone();
5033
- schema16.conditions = [];
5034
- schema16 = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema16);
5035
- schema16 = schema16.resolve(options);
5029
+ let schema17 = this;
5030
+ if (schema17.conditions.length) {
5031
+ let conditions = schema17.conditions;
5032
+ schema17 = schema17.clone();
5033
+ schema17.conditions = [];
5034
+ schema17 = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema17);
5035
+ schema17 = schema17.resolve(options);
5036
5036
  }
5037
- return schema16;
5037
+ return schema17;
5038
5038
  }
5039
5039
  resolveOptions(options) {
5040
5040
  var _options$strict, _options$abortEarly, _options$recursive, _options$disableStack;
@@ -5188,11 +5188,11 @@ attempted value: ${formattedValue}
5188
5188
  }
5189
5189
  validate(value, options) {
5190
5190
  var _options$disableStack2;
5191
- let schema16 = this.resolve(Object.assign({}, options, {
5191
+ let schema17 = this.resolve(Object.assign({}, options, {
5192
5192
  value
5193
5193
  }));
5194
- let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema16.spec.disableStackTrace;
5195
- return new Promise((resolve, reject) => schema16._validate(value, options, (error, parsed) => {
5194
+ let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema17.spec.disableStackTrace;
5195
+ return new Promise((resolve, reject) => schema17._validate(value, options, (error, parsed) => {
5196
5196
  if (ValidationError.isError(error)) error.value = parsed;
5197
5197
  reject(error);
5198
5198
  }, (errors, validated) => {
@@ -5202,12 +5202,12 @@ attempted value: ${formattedValue}
5202
5202
  }
5203
5203
  validateSync(value, options) {
5204
5204
  var _options$disableStack3;
5205
- let schema16 = this.resolve(Object.assign({}, options, {
5205
+ let schema17 = this.resolve(Object.assign({}, options, {
5206
5206
  value
5207
5207
  }));
5208
5208
  let result;
5209
- let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema16.spec.disableStackTrace;
5210
- schema16._validate(value, Object.assign({}, options, {
5209
+ let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema17.spec.disableStackTrace;
5210
+ schema17._validate(value, Object.assign({}, options, {
5211
5211
  sync: true
5212
5212
  }), (error, parsed) => {
5213
5213
  if (ValidationError.isError(error)) error.value = parsed;
@@ -5241,8 +5241,8 @@ attempted value: ${formattedValue}
5241
5241
  return typeof defaultValue === "function" ? defaultValue.call(this, options) : clone(defaultValue);
5242
5242
  }
5243
5243
  getDefault(options) {
5244
- let schema16 = this.resolve(options || {});
5245
- return schema16._getDefault(options);
5244
+ let schema17 = this.resolve(options || {});
5245
+ return schema17._getDefault(options);
5246
5246
  }
5247
5247
  default(def) {
5248
5248
  if (arguments.length === 0) {
@@ -5477,9 +5477,9 @@ for (const method of ["validate", "validateSync"]) Schema.prototype[`${method}At
5477
5477
  const {
5478
5478
  parent,
5479
5479
  parentPath,
5480
- schema: schema16
5480
+ schema: schema17
5481
5481
  } = getIn(this, path, value, options.context);
5482
- return schema16[method](parent && parent[parentPath], Object.assign({}, options, {
5482
+ return schema17[method](parent && parent[parentPath], Object.assign({}, options, {
5483
5483
  parent,
5484
5484
  path
5485
5485
  }));
@@ -5653,7 +5653,7 @@ var StringSchema = class extends Schema {
5653
5653
  });
5654
5654
  }
5655
5655
  required(message) {
5656
- return super.required(message).withMutation((schema16) => schema16.test({
5656
+ return super.required(message).withMutation((schema17) => schema17.test({
5657
5657
  message: message || mixed.required,
5658
5658
  name: "required",
5659
5659
  skipAbsent: true,
@@ -5661,9 +5661,9 @@ var StringSchema = class extends Schema {
5661
5661
  }));
5662
5662
  }
5663
5663
  notRequired() {
5664
- return super.notRequired().withMutation((schema16) => {
5665
- schema16.tests = schema16.tests.filter((t) => t.OPTIONS.name !== "required");
5666
- return schema16;
5664
+ return super.notRequired().withMutation((schema17) => {
5665
+ schema17.tests = schema17.tests.filter((t) => t.OPTIONS.name !== "required");
5666
+ return schema17;
5667
5667
  });
5668
5668
  }
5669
5669
  length(length, message = string.length) {
@@ -6052,28 +6052,28 @@ var parseJson = (value, _, ctx) => {
6052
6052
  }
6053
6053
  return ctx.isType(parsed) ? parsed : value;
6054
6054
  };
6055
- function deepPartial(schema16) {
6056
- if ("fields" in schema16) {
6055
+ function deepPartial(schema17) {
6056
+ if ("fields" in schema17) {
6057
6057
  const partial = {};
6058
- for (const [key, fieldSchema] of Object.entries(schema16.fields)) {
6058
+ for (const [key, fieldSchema] of Object.entries(schema17.fields)) {
6059
6059
  partial[key] = deepPartial(fieldSchema);
6060
6060
  }
6061
- return schema16.setFields(partial);
6061
+ return schema17.setFields(partial);
6062
6062
  }
6063
- if (schema16.type === "array") {
6064
- const nextArray = schema16.optional();
6063
+ if (schema17.type === "array") {
6064
+ const nextArray = schema17.optional();
6065
6065
  if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);
6066
6066
  return nextArray;
6067
6067
  }
6068
- if (schema16.type === "tuple") {
6069
- return schema16.optional().clone({
6070
- types: schema16.spec.types.map(deepPartial)
6068
+ if (schema17.type === "tuple") {
6069
+ return schema17.optional().clone({
6070
+ types: schema17.spec.types.map(deepPartial)
6071
6071
  });
6072
6072
  }
6073
- if ("optional" in schema16) {
6074
- return schema16.optional();
6073
+ if ("optional" in schema17) {
6074
+ return schema17.optional();
6075
6075
  }
6076
- return schema16;
6076
+ return schema17;
6077
6077
  }
6078
6078
  var deepHas = (obj, p) => {
6079
6079
  const path = [...(0, import_property_expr.normalizePath)(p)];
@@ -6207,8 +6207,8 @@ var ObjectSchema = class extends Schema {
6207
6207
  next._sortErrors = this._sortErrors;
6208
6208
  return next;
6209
6209
  }
6210
- concat(schema16) {
6211
- let next = super.concat(schema16);
6210
+ concat(schema17) {
6211
+ let next = super.concat(schema17);
6212
6212
  let nextFields = next.fields;
6213
6213
  for (let [field, schemaOrRef] of Object.entries(this.fields)) {
6214
6214
  const target = nextFields[field];
@@ -6216,7 +6216,7 @@ var ObjectSchema = class extends Schema {
6216
6216
  }
6217
6217
  return next.withMutation((s) => (
6218
6218
  // XXX: excludes here is wrong
6219
- s.setFields(nextFields, [...this._excludedEdges, ...schema16._excludedEdges])
6219
+ s.setFields(nextFields, [...this._excludedEdges, ...schema17._excludedEdges])
6220
6220
  ));
6221
6221
  }
6222
6222
  _getDefault(options) {
@@ -6261,8 +6261,8 @@ var ObjectSchema = class extends Schema {
6261
6261
  }
6262
6262
  partial() {
6263
6263
  const partial = {};
6264
- for (const [key, schema16] of Object.entries(this.fields)) {
6265
- partial[key] = "optional" in schema16 && schema16.optional instanceof Function ? schema16.optional() : schema16;
6264
+ for (const [key, schema17] of Object.entries(this.fields)) {
6265
+ partial[key] = "optional" in schema17 && schema17.optional instanceof Function ? schema17.optional() : schema17;
6266
6266
  }
6267
6267
  return this.setFields(partial);
6268
6268
  }
@@ -6460,22 +6460,22 @@ var ArraySchema = class extends Schema {
6460
6460
  json() {
6461
6461
  return this.transform(parseJson);
6462
6462
  }
6463
- concat(schema16) {
6464
- let next = super.concat(schema16);
6463
+ concat(schema17) {
6464
+ let next = super.concat(schema17);
6465
6465
  next.innerType = this.innerType;
6466
- if (schema16.innerType)
6466
+ if (schema17.innerType)
6467
6467
  next.innerType = next.innerType ? (
6468
6468
  // @ts-expect-error Lazy doesn't have concat and will break
6469
- next.innerType.concat(schema16.innerType)
6470
- ) : schema16.innerType;
6469
+ next.innerType.concat(schema17.innerType)
6470
+ ) : schema17.innerType;
6471
6471
  return next;
6472
6472
  }
6473
- of(schema16) {
6473
+ of(schema17) {
6474
6474
  let next = this.clone();
6475
- if (!isSchema(schema16)) throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema16));
6476
- next.innerType = schema16;
6475
+ if (!isSchema(schema17)) throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema17));
6476
+ next.innerType = schema17;
6477
6477
  next.spec = Object.assign({}, next.spec, {
6478
- types: schema16
6478
+ types: schema17
6479
6479
  });
6480
6480
  return next;
6481
6481
  }
@@ -6619,7 +6619,7 @@ var TupleSchema = class extends Schema {
6619
6619
  describe(options) {
6620
6620
  const next = (options ? this.resolve(options) : this).clone();
6621
6621
  const base = super.describe(options);
6622
- base.innerType = next.spec.types.map((schema16, index) => {
6622
+ base.innerType = next.spec.types.map((schema17, index) => {
6623
6623
  var _innerOptions;
6624
6624
  let innerOptions = options;
6625
6625
  if ((_innerOptions = innerOptions) != null && _innerOptions.value) {
@@ -6628,7 +6628,7 @@ var TupleSchema = class extends Schema {
6628
6628
  value: innerOptions.value[index]
6629
6629
  });
6630
6630
  }
6631
- return schema16.describe(innerOptions);
6631
+ return schema17.describe(innerOptions);
6632
6632
  });
6633
6633
  return base;
6634
6634
  }
@@ -10521,7 +10521,7 @@ var stallTypesSchema = create$3({
10521
10521
  "",
10522
10522
  noLeadingZeros("Stall price", { allowDecimal: true })
10523
10523
  ),
10524
- stallCapacity: create$5().label("Stall Capacity").typeError("Stall capacity must be a number").min(1, "Stall capacity must be at least 1").integer("Stall capacity must be a whole number").required("Stall capacity is required").test("no-leading-zeros", "", noLeadingZeros("Stall capacity"))
10524
+ stallCapacity: create$5().label("Stall Capacity").typeError("Stall capacity must be a number").min(0, "Stall capacity cannot be negative").integer("Stall capacity must be a whole number").required("Stall capacity is required").test("no-leading-zeros", "", noLeadingZeros("Stall capacity"))
10525
10525
  });
10526
10526
  var dateTimeWithPriceSchema = dateTimeSchema.shape({
10527
10527
  stallTypes: create$2().of(stallTypesSchema).min(1, "At least one stall type is required").required("Stall types are required")
@@ -10548,7 +10548,7 @@ var socialMediaSchema = create$3({
10548
10548
  is: (name) => !!name,
10549
10549
  // If name has a value
10550
10550
  then: () => normalizedUrlTransform().required("Link is required when name is set").url("Link must be a valid URL").label("Social Media Link"),
10551
- otherwise: (schema16) => schema16.notRequired()
10551
+ otherwise: (schema17) => schema17.notRequired()
10552
10552
  })
10553
10553
  });
10554
10554
  var globalResourceSchema = create$3().shape({
@@ -10624,21 +10624,21 @@ var paymentInfoSchema = create$3({
10624
10624
  ).required("Please select a Payment method"),
10625
10625
  accountHolderName: create$6().when("paymentMethod", {
10626
10626
  is: "bank_transfer",
10627
- then: (schema16) => schema16.required("Account holder name is required for bank transfer").trim(),
10628
- otherwise: (schema16) => schema16.notRequired()
10627
+ then: (schema17) => schema17.required("Account holder name is required for bank transfer").trim(),
10628
+ otherwise: (schema17) => schema17.notRequired()
10629
10629
  }),
10630
10630
  accountNumber: create$6().when("paymentMethod", {
10631
10631
  is: "bank_transfer",
10632
- then: (schema16) => schema16.required("Account number is required for bank transfer").matches(
10632
+ then: (schema17) => schema17.required("Account number is required for bank transfer").matches(
10633
10633
  nzBankAccountRegex,
10634
10634
  "Account number must be in format: XX-XXXX-XXXXXXX-XX"
10635
10635
  ).trim(),
10636
- otherwise: (schema16) => schema16.notRequired()
10636
+ otherwise: (schema17) => schema17.notRequired()
10637
10637
  }),
10638
10638
  link: create$6().when("paymentMethod", {
10639
10639
  is: (val) => val === "paypal" || val === "stripe",
10640
10640
  then: () => normalizedUrlTransform().url("Link must be a valid URL").required("Link is required for PayPal/Stripe"),
10641
- otherwise: (schema16) => schema16.notRequired()
10641
+ otherwise: (schema17) => schema17.notRequired()
10642
10642
  })
10643
10643
  });
10644
10644
  var eventInfoSchema = create$3().shape({
@@ -10788,8 +10788,8 @@ var userSchema = create$3().shape({
10788
10788
  confirmPassword: create$6().nullable().trim().label("Confirm Password").when("password", {
10789
10789
  is: (val) => !!val,
10790
10790
  // only necessary if password typed
10791
- then: (schema16) => schema16.required("Confirm Password is required").oneOf([create$9("password")], "Passwords must match"),
10792
- otherwise: (schema16) => schema16.notRequired()
10791
+ then: (schema17) => schema17.required("Confirm Password is required").oneOf([create$9("password")], "Passwords must match"),
10792
+ otherwise: (schema17) => schema17.notRequired()
10793
10793
  }),
10794
10794
  role: create$8().oneOf(Object.values(EnumUserRole)).required("Role is required")
10795
10795
  });
@@ -10860,7 +10860,7 @@ var adSchema = create$3().shape({
10860
10860
  return endDate > now;
10861
10861
  }).when("start", {
10862
10862
  is: (val) => val && val.length > 0,
10863
- then: (schema16) => schema16.test(
10863
+ then: (schema17) => schema17.test(
10864
10864
  "is-after-start",
10865
10865
  "End date must be after start date",
10866
10866
  function(value) {
@@ -12136,7 +12136,7 @@ var schema9 = new MongooseSchema13(
12136
12136
  required: false,
12137
12137
  type: calendarWrapperSchema
12138
12138
  },
12139
- categories: [CategorySchema],
12139
+ categories: { required: true, type: [CategorySchema] },
12140
12140
  foodTruck: { required: true, type: Boolean },
12141
12141
  products: { required: false, type: productWrapperSchema },
12142
12142
  relations: {
@@ -12215,19 +12215,47 @@ var schema10 = new MongooseSchema14(
12215
12215
  );
12216
12216
  var VendorInfoModel = mongoose14.models.VendorInfo || mongoose14.model("VendorInfo", schema10);
12217
12217
 
12218
- // src/mongoose/event/Event.ts
12218
+ // src/mongoose/vendor/UnregisteredVendor.ts
12219
12219
  import mongoose15 from "mongoose";
12220
12220
  var MongooseSchema15 = mongoose15.Schema;
12221
+ var invitationSchema = new MongooseSchema15(
12222
+ {
12223
+ dateTime: { required: true, type: [dateTimeSchema3] },
12224
+ eventId: {
12225
+ ref: "Event",
12226
+ required: true,
12227
+ type: String
12228
+ }
12229
+ },
12230
+ { _id: false }
12231
+ );
12221
12232
  var schema11 = new MongooseSchema15(
12233
+ {
12234
+ categoryIds: { required: true, type: [String] },
12235
+ deletedAt: { default: null, required: false, type: Date },
12236
+ email: { required: true, type: String },
12237
+ invitations: { required: true, type: [invitationSchema] },
12238
+ name: { required: true, type: String }
12239
+ },
12240
+ { timestamps: true }
12241
+ );
12242
+ schema11.index({ email: 1 }, { unique: true });
12243
+ schema11.index({ name: 1 });
12244
+ var UnregisteredVendorModel = mongoose15.models.UnregisteredVendor || mongoose15.model("UnregisteredVendor", schema11);
12245
+
12246
+ // src/mongoose/event/Event.ts
12247
+ import mongoose16 from "mongoose";
12248
+ var MongooseSchema16 = mongoose16.Schema;
12249
+ var schema12 = new MongooseSchema16(
12222
12250
  {
12223
12251
  ...baseResourceFields,
12224
12252
  // Importing base resource fields from global.ts
12225
12253
  claimed: { default: true, required: false, type: Boolean },
12226
- dateTime: [dateTimeSchema3],
12254
+ dateTime: { required: true, type: [dateTimeSchema3] },
12227
12255
  eventInfoId: {
12228
12256
  ref: "EventInfo",
12229
12257
  required: false,
12230
- type: mongoose15.Schema.Types.ObjectId
12258
+ type: mongoose16.Schema.Types.ObjectId
12231
12259
  },
12232
12260
  eventType: {
12233
12261
  enum: Object.values(EnumEventType),
@@ -12256,18 +12284,18 @@ var schema11 = new MongooseSchema15(
12256
12284
  },
12257
12285
  { timestamps: true }
12258
12286
  );
12259
- schema11.index({ name: 1 });
12260
- schema11.index({ description: 1 });
12261
- schema11.index({ region: 1 });
12262
- schema11.index({ "location.geo": "2dsphere" });
12263
- schema11.index({ tags: 1 });
12264
- schema11.index({ "associates.email": 1 });
12265
- var EventModel = mongoose15.models.Event || mongoose15.model("Event", schema11);
12287
+ schema12.index({ name: 1 });
12288
+ schema12.index({ description: 1 });
12289
+ schema12.index({ region: 1 });
12290
+ schema12.index({ "location.geo": "2dsphere" });
12291
+ schema12.index({ tags: 1 });
12292
+ schema12.index({ "associates.email": 1 });
12293
+ var EventModel = mongoose16.models.Event || mongoose16.model("Event", schema12);
12266
12294
 
12267
12295
  // src/mongoose/Partner.ts
12268
- import mongoose16 from "mongoose";
12269
- var MongooseSchema16 = mongoose16.Schema;
12270
- var schema12 = new MongooseSchema16(
12296
+ import mongoose17 from "mongoose";
12297
+ var MongooseSchema17 = mongoose17.Schema;
12298
+ var schema13 = new MongooseSchema17(
12271
12299
  {
12272
12300
  ...baseResourceFields,
12273
12301
  location: {
@@ -12283,17 +12311,17 @@ var schema12 = new MongooseSchema16(
12283
12311
  },
12284
12312
  { timestamps: true }
12285
12313
  );
12286
- schema12.index({ name: 1 });
12287
- schema12.index({ description: 1 });
12288
- schema12.index({ region: 1 });
12289
- schema12.index({ "location.geo": "2dsphere" });
12290
- schema12.index({ "associates.email": 1 });
12291
- var PartnerModel = mongoose16.models.Partner || mongoose16.model("Partner", schema12);
12314
+ schema13.index({ name: 1 });
12315
+ schema13.index({ description: 1 });
12316
+ schema13.index({ region: 1 });
12317
+ schema13.index({ "location.geo": "2dsphere" });
12318
+ schema13.index({ "associates.email": 1 });
12319
+ var PartnerModel = mongoose17.models.Partner || mongoose17.model("Partner", schema13);
12292
12320
 
12293
12321
  // src/mongoose/Post.ts
12294
- import mongoose17, { Schema as Schema2 } from "mongoose";
12295
- var MongooseSchema17 = mongoose17.Schema;
12296
- var contentSchema = new MongooseSchema17(
12322
+ import mongoose18, { Schema as Schema2 } from "mongoose";
12323
+ var MongooseSchema18 = mongoose18.Schema;
12324
+ var contentSchema = new MongooseSchema18(
12297
12325
  {
12298
12326
  contentData: Schema2.Types.Mixed,
12299
12327
  contentOrder: { required: true, type: Number },
@@ -12305,7 +12333,7 @@ var contentSchema = new MongooseSchema17(
12305
12333
  },
12306
12334
  { _id: false }
12307
12335
  );
12308
- var schema13 = new MongooseSchema17(
12336
+ var schema14 = new MongooseSchema18(
12309
12337
  {
12310
12338
  active: { default: true, required: true, type: Boolean },
12311
12339
  caption: { required: true, type: String },
@@ -12341,15 +12369,15 @@ var schema13 = new MongooseSchema17(
12341
12369
  },
12342
12370
  { timestamps: true }
12343
12371
  );
12344
- schema13.index({ title: 1 });
12345
- schema13.index({ tags: 1 });
12346
- var PostModel = mongoose17.models.Post || mongoose17.model("Post", schema13);
12372
+ schema14.index({ title: 1 });
12373
+ schema14.index({ tags: 1 });
12374
+ var PostModel = mongoose18.models.Post || mongoose18.model("Post", schema14);
12347
12375
 
12348
12376
  // src/mongoose/AppSetting.ts
12349
- import mongoose18 from "mongoose";
12350
- var MongooseSchema18 = mongoose18.Schema;
12377
+ import mongoose19 from "mongoose";
12378
+ var MongooseSchema19 = mongoose19.Schema;
12351
12379
  var APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
12352
- var AppSettingSchema = new MongooseSchema18(
12380
+ var AppSettingSchema = new MongooseSchema19(
12353
12381
  {
12354
12382
  activeSchoolsStudentCountTotal: {
12355
12383
  default: 0,
@@ -12375,18 +12403,18 @@ var AppSettingSchema = new MongooseSchema18(
12375
12403
  },
12376
12404
  { timestamps: true }
12377
12405
  );
12378
- var AppSettingModel = mongoose18.models.AppSetting || mongoose18.model("AppSetting", AppSettingSchema);
12406
+ var AppSettingModel = mongoose19.models.AppSetting || mongoose19.model("AppSetting", AppSettingSchema);
12379
12407
 
12380
12408
  // src/mongoose/game/Game.ts
12381
- import mongoose22 from "mongoose";
12409
+ import mongoose23 from "mongoose";
12382
12410
 
12383
12411
  // src/mongoose/game/DailyClue.ts
12384
- import mongoose20 from "mongoose";
12412
+ import mongoose21 from "mongoose";
12385
12413
 
12386
12414
  // src/mongoose/game/utils.ts
12387
- import mongoose19 from "mongoose";
12388
- var MongooseSchema19 = mongoose19.Schema;
12389
- var schemaGameDate = new MongooseSchema19(
12415
+ import mongoose20 from "mongoose";
12416
+ var MongooseSchema20 = mongoose20.Schema;
12417
+ var schemaGameDate = new MongooseSchema20(
12390
12418
  {
12391
12419
  endDate: { required: true, type: Date },
12392
12420
  startDate: { required: true, type: Date }
@@ -12395,8 +12423,8 @@ var schemaGameDate = new MongooseSchema19(
12395
12423
  );
12396
12424
 
12397
12425
  // src/mongoose/game/DailyClue.ts
12398
- var MongooseSchema20 = mongoose20.Schema;
12399
- var schemaLetters = new MongooseSchema20(
12426
+ var MongooseSchema21 = mongoose21.Schema;
12427
+ var schemaLetters = new MongooseSchema21(
12400
12428
  {
12401
12429
  collected: { required: false, type: [String] },
12402
12430
  solutionShuffled: { required: true, type: [String] }
@@ -12404,14 +12432,14 @@ var schemaLetters = new MongooseSchema20(
12404
12432
  },
12405
12433
  { _id: false }
12406
12434
  );
12407
- var schemaDailyClueBaseGame = new MongooseSchema20(
12435
+ var schemaDailyClueBaseGame = new MongooseSchema21(
12408
12436
  {
12409
12437
  gameDate: { required: true, type: schemaGameDate },
12410
12438
  gameSolution: { required: true, type: String }
12411
12439
  },
12412
12440
  { _id: false }
12413
12441
  );
12414
- var schemaDailyClueGameData = new MongooseSchema20(
12442
+ var schemaDailyClueGameData = new MongooseSchema21(
12415
12443
  {
12416
12444
  gameFields: { required: true, type: schemaDailyClueBaseGame },
12417
12445
  lastFoundDate: { default: null, required: false, type: Date },
@@ -12426,9 +12454,9 @@ var schemaDailyClueGameData = new MongooseSchema20(
12426
12454
  );
12427
12455
 
12428
12456
  // src/mongoose/game/MiniQuiz.ts
12429
- import mongoose21 from "mongoose";
12430
- var MongooseSchema21 = mongoose21.Schema;
12431
- var schemaMiniQuizAnswer = new MongooseSchema21(
12457
+ import mongoose22 from "mongoose";
12458
+ var MongooseSchema22 = mongoose22.Schema;
12459
+ var schemaMiniQuizAnswer = new MongooseSchema22(
12432
12460
  {
12433
12461
  answer: { required: true, type: String },
12434
12462
  answerId: { required: true, type: String },
@@ -12436,7 +12464,7 @@ var schemaMiniQuizAnswer = new MongooseSchema21(
12436
12464
  },
12437
12465
  { _id: false }
12438
12466
  );
12439
- var schemaMiniQuizQuestion = new MongooseSchema21(
12467
+ var schemaMiniQuizQuestion = new MongooseSchema22(
12440
12468
  {
12441
12469
  answers: { required: true, type: [schemaMiniQuizAnswer] },
12442
12470
  question: { required: true, type: String },
@@ -12444,20 +12472,20 @@ var schemaMiniQuizQuestion = new MongooseSchema21(
12444
12472
  },
12445
12473
  { _id: false }
12446
12474
  );
12447
- var schemaMiniQuizBaseGame = new MongooseSchema21(
12475
+ var schemaMiniQuizBaseGame = new MongooseSchema22(
12448
12476
  {
12449
12477
  questions: { required: true, type: [schemaMiniQuizQuestion] }
12450
12478
  },
12451
12479
  { _id: false }
12452
12480
  );
12453
- var schemaMiniQuizAnsweredQuestion = new MongooseSchema21(
12481
+ var schemaMiniQuizAnsweredQuestion = new MongooseSchema22(
12454
12482
  {
12455
12483
  questionId: { required: true, type: String },
12456
12484
  selectedAnswerId: { required: true, type: String }
12457
12485
  },
12458
12486
  { _id: false }
12459
12487
  );
12460
- var schemaMiniQuizGameData = new MongooseSchema21(
12488
+ var schemaMiniQuizGameData = new MongooseSchema22(
12461
12489
  {
12462
12490
  answeredQuestions: {
12463
12491
  default: null,
@@ -12472,18 +12500,18 @@ var schemaMiniQuizGameData = new MongooseSchema21(
12472
12500
  );
12473
12501
 
12474
12502
  // src/mongoose/game/Game.ts
12475
- var MongooseSchema22 = mongoose22.Schema;
12503
+ var MongooseSchema23 = mongoose23.Schema;
12476
12504
  var gameDataSchemas = {
12477
12505
  [EnumGameType.DAILY_CLUE]: schemaDailyClueGameData,
12478
12506
  [EnumGameType.MINI_QUIZ]: schemaMiniQuizGameData
12479
12507
  };
12480
12508
  var gameDataDefinition = Object.fromEntries(
12481
- Object.entries(gameDataSchemas).map(([key, schema16]) => [
12509
+ Object.entries(gameDataSchemas).map(([key, schema17]) => [
12482
12510
  key,
12483
- { default: null, required: false, type: schema16 }
12511
+ { default: null, required: false, type: schema17 }
12484
12512
  ])
12485
12513
  );
12486
- var gameHistorySchema = new MongooseSchema22(
12514
+ var gameHistorySchema = new MongooseSchema23(
12487
12515
  {
12488
12516
  createdAt: { required: true, type: Date },
12489
12517
  gameDate: { required: true, type: schemaGameDate },
@@ -12501,7 +12529,7 @@ var gameHistorySchema = new MongooseSchema22(
12501
12529
  },
12502
12530
  { _id: false }
12503
12531
  );
12504
- var gameTypeSchema = new MongooseSchema22(
12532
+ var gameTypeSchema = new MongooseSchema23(
12505
12533
  {
12506
12534
  active: { default: true, required: true, type: Boolean },
12507
12535
  gameData: gameDataDefinition,
@@ -12515,7 +12543,7 @@ var gameTypeSchema = new MongooseSchema22(
12515
12543
  },
12516
12544
  { timestamps: true }
12517
12545
  );
12518
- var schema14 = new MongooseSchema22(
12546
+ var schema15 = new MongooseSchema23(
12519
12547
  {
12520
12548
  active: { default: false, required: true, type: Boolean },
12521
12549
  deletedAt: { default: null, required: false, type: Date },
@@ -12528,12 +12556,12 @@ var schema14 = new MongooseSchema22(
12528
12556
  },
12529
12557
  { timestamps: true }
12530
12558
  );
12531
- var GameModel = mongoose22.models.Game || mongoose22.model("Game", schema14);
12559
+ var GameModel = mongoose23.models.Game || mongoose23.model("Game", schema15);
12532
12560
 
12533
12561
  // src/mongoose/School.ts
12534
- import mongoose23 from "mongoose";
12535
- var MongooseSchema23 = mongoose23.Schema;
12536
- var campaignsSchema = new MongooseSchema23(
12562
+ import mongoose24 from "mongoose";
12563
+ var MongooseSchema24 = mongoose24.Schema;
12564
+ var campaignsSchema = new MongooseSchema24(
12537
12565
  {
12538
12566
  endDate: { required: true, type: Date },
12539
12567
  name: { required: true, type: String },
@@ -12541,7 +12569,7 @@ var campaignsSchema = new MongooseSchema23(
12541
12569
  },
12542
12570
  { _id: false }
12543
12571
  );
12544
- var schema15 = new MongooseSchema23(
12572
+ var schema16 = new MongooseSchema24(
12545
12573
  {
12546
12574
  // New schools are active by default
12547
12575
  active: { default: true, required: true, type: Boolean },
@@ -12567,7 +12595,7 @@ var schema15 = new MongooseSchema23(
12567
12595
  },
12568
12596
  { timestamps: true }
12569
12597
  );
12570
- var SchoolModel = mongoose23.models.School || mongoose23.model("School", schema15);
12598
+ var SchoolModel = mongoose24.models.School || mongoose24.model("School", schema16);
12571
12599
 
12572
12600
  export {
12573
12601
  EnumInviteStatus,
@@ -12605,6 +12633,7 @@ export {
12605
12633
  VerificationTokenModel,
12606
12634
  VendorModel,
12607
12635
  VendorInfoModel,
12636
+ UnregisteredVendorModel,
12608
12637
  EventModel,
12609
12638
  PartnerModel,
12610
12639
  PostModel,
@@ -12637,4 +12666,4 @@ react/cjs/react.development.js:
12637
12666
  * LICENSE file in the root directory of this source tree.
12638
12667
  *)
12639
12668
  */
12640
- //# sourceMappingURL=chunk-RGSAG3WZ.mjs.map
12669
+ //# sourceMappingURL=chunk-5F477CH2.mjs.map