@timardex/cluemart-server-shared 1.0.57 → 1.0.59

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.
@@ -4718,10 +4718,10 @@ var Condition = class _Condition {
4718
4718
  otherwise
4719
4719
  } = config;
4720
4720
  let check = typeof is === "function" ? is : (...values) => values.every((value) => value === is);
4721
- return new _Condition(refs, (values, schema13) => {
4721
+ return new _Condition(refs, (values, schema14) => {
4722
4722
  var _branch;
4723
4723
  let branch = check(...values) ? then : otherwise;
4724
- return (_branch = branch == null ? void 0 : branch(schema13)) != null ? _branch : schema13;
4724
+ return (_branch = branch == null ? void 0 : branch(schema14)) != null ? _branch : schema14;
4725
4725
  });
4726
4726
  }
4727
4727
  constructor(refs, builder) {
@@ -4735,13 +4735,13 @@ var Condition = class _Condition {
4735
4735
  // TODO: ? operator here?
4736
4736
  ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context)
4737
4737
  ));
4738
- let schema13 = this.fn(values, base, options);
4739
- if (schema13 === void 0 || // @ts-ignore this can be base
4740
- schema13 === base) {
4738
+ let schema14 = this.fn(values, base, options);
4739
+ if (schema14 === void 0 || // @ts-ignore this can be base
4740
+ schema14 === base) {
4741
4741
  return base;
4742
4742
  }
4743
- if (!isSchema(schema13)) throw new TypeError("conditions must return a schema object");
4744
- return schema13.resolve(options);
4743
+ if (!isSchema(schema14)) throw new TypeError("conditions must return a schema object");
4744
+ return schema14.resolve(options);
4745
4745
  }
4746
4746
  };
4747
4747
  var prefixes = {
@@ -4811,7 +4811,7 @@ function createValidation(config) {
4811
4811
  path = "",
4812
4812
  options,
4813
4813
  originalValue,
4814
- schema: schema13
4814
+ schema: schema14
4815
4815
  }, panic, next) {
4816
4816
  const {
4817
4817
  name,
@@ -4823,8 +4823,8 @@ function createValidation(config) {
4823
4823
  let {
4824
4824
  parent,
4825
4825
  context,
4826
- abortEarly = schema13.spec.abortEarly,
4827
- disableStackTrace = schema13.spec.disableStackTrace
4826
+ abortEarly = schema14.spec.abortEarly,
4827
+ disableStackTrace = schema14.spec.disableStackTrace
4828
4828
  } = options;
4829
4829
  const resolveOptions = {
4830
4830
  value,
@@ -4835,9 +4835,9 @@ function createValidation(config) {
4835
4835
  const nextParams = resolveParams(Object.assign({
4836
4836
  value,
4837
4837
  originalValue,
4838
- label: schema13.spec.label,
4838
+ label: schema14.spec.label,
4839
4839
  path: overrides.path || path,
4840
- spec: schema13.spec,
4840
+ spec: schema14.spec,
4841
4841
  disableStackTrace: overrides.disableStackTrace || disableStackTrace
4842
4842
  }, params, overrides.params), resolveOptions);
4843
4843
  const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name, nextParams.disableStackTrace);
@@ -4856,7 +4856,7 @@ function createValidation(config) {
4856
4856
  },
4857
4857
  options,
4858
4858
  originalValue,
4859
- schema: schema13
4859
+ schema: schema14
4860
4860
  };
4861
4861
  const handleResult = (validOrError) => {
4862
4862
  if (ValidationError.isError(validOrError)) invalid(validOrError);
@@ -4900,42 +4900,42 @@ function resolveParams(params, options) {
4900
4900
  function resolveMaybeRef(item, options) {
4901
4901
  return Reference.isRef(item) ? item.getValue(options.value, options.parent, options.context) : item;
4902
4902
  }
4903
- function getIn(schema13, path, value, context = value) {
4903
+ function getIn(schema14, path, value, context = value) {
4904
4904
  let parent, lastPart, lastPartDebug;
4905
4905
  if (!path) return {
4906
4906
  parent,
4907
4907
  parentPath: path,
4908
- schema: schema13
4908
+ schema: schema14
4909
4909
  };
4910
4910
  (0, import_property_expr.forEach)(path, (_part, isBracket, isArray) => {
4911
4911
  let part = isBracket ? _part.slice(1, _part.length - 1) : _part;
4912
- schema13 = schema13.resolve({
4912
+ schema14 = schema14.resolve({
4913
4913
  context,
4914
4914
  parent,
4915
4915
  value
4916
4916
  });
4917
- let isTuple = schema13.type === "tuple";
4917
+ let isTuple = schema14.type === "tuple";
4918
4918
  let idx = isArray ? parseInt(part, 10) : 0;
4919
- if (schema13.innerType || isTuple) {
4919
+ if (schema14.innerType || isTuple) {
4920
4920
  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]"`);
4921
4921
  if (value && idx >= value.length) {
4922
4922
  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. `);
4923
4923
  }
4924
4924
  parent = value;
4925
4925
  value = value && value[idx];
4926
- schema13 = isTuple ? schema13.spec.types[idx] : schema13.innerType;
4926
+ schema14 = isTuple ? schema14.spec.types[idx] : schema14.innerType;
4927
4927
  }
4928
4928
  if (!isArray) {
4929
- if (!schema13.fields || !schema13.fields[part]) throw new Error(`The schema does not contain the path: ${path}. (failed at: ${lastPartDebug} which is a type: "${schema13.type}")`);
4929
+ if (!schema14.fields || !schema14.fields[part]) throw new Error(`The schema does not contain the path: ${path}. (failed at: ${lastPartDebug} which is a type: "${schema14.type}")`);
4930
4930
  parent = value;
4931
4931
  value = value && value[part];
4932
- schema13 = schema13.fields[part];
4932
+ schema14 = schema14.fields[part];
4933
4933
  }
4934
4934
  lastPart = part;
4935
4935
  lastPartDebug = isBracket ? "[" + _part + "]" : "." + _part;
4936
4936
  });
4937
4937
  return {
4938
- schema: schema13,
4938
+ schema: schema14,
4939
4939
  parent,
4940
4940
  parentPath: lastPart
4941
4941
  };
@@ -5135,20 +5135,20 @@ var Schema = class {
5135
5135
  this._mutate = before;
5136
5136
  return result;
5137
5137
  }
5138
- concat(schema13) {
5139
- if (!schema13 || schema13 === this) return this;
5140
- if (schema13.type !== this.type && this.type !== "mixed") throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema13.type}`);
5138
+ concat(schema14) {
5139
+ if (!schema14 || schema14 === this) return this;
5140
+ if (schema14.type !== this.type && this.type !== "mixed") throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema14.type}`);
5141
5141
  let base = this;
5142
- let combined = schema13.clone();
5142
+ let combined = schema14.clone();
5143
5143
  const mergedSpec = Object.assign({}, base.spec, combined.spec);
5144
5144
  combined.spec = mergedSpec;
5145
5145
  combined.internalTests = Object.assign({}, base.internalTests, combined.internalTests);
5146
- combined._whitelist = base._whitelist.merge(schema13._whitelist, schema13._blacklist);
5147
- combined._blacklist = base._blacklist.merge(schema13._blacklist, schema13._whitelist);
5146
+ combined._whitelist = base._whitelist.merge(schema14._whitelist, schema14._blacklist);
5147
+ combined._blacklist = base._blacklist.merge(schema14._blacklist, schema14._whitelist);
5148
5148
  combined.tests = base.tests;
5149
5149
  combined.exclusiveTests = base.exclusiveTests;
5150
5150
  combined.withMutation((next) => {
5151
- schema13.tests.forEach((fn) => {
5151
+ schema14.tests.forEach((fn) => {
5152
5152
  next.test(fn.OPTIONS);
5153
5153
  });
5154
5154
  });
@@ -5164,15 +5164,15 @@ var Schema = class {
5164
5164
  return this._typeCheck(v);
5165
5165
  }
5166
5166
  resolve(options) {
5167
- let schema13 = this;
5168
- if (schema13.conditions.length) {
5169
- let conditions = schema13.conditions;
5170
- schema13 = schema13.clone();
5171
- schema13.conditions = [];
5172
- schema13 = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema13);
5173
- schema13 = schema13.resolve(options);
5167
+ let schema14 = this;
5168
+ if (schema14.conditions.length) {
5169
+ let conditions = schema14.conditions;
5170
+ schema14 = schema14.clone();
5171
+ schema14.conditions = [];
5172
+ schema14 = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema14);
5173
+ schema14 = schema14.resolve(options);
5174
5174
  }
5175
- return schema13;
5175
+ return schema14;
5176
5176
  }
5177
5177
  resolveOptions(options) {
5178
5178
  var _options$strict, _options$abortEarly, _options$recursive, _options$disableStack;
@@ -5328,11 +5328,11 @@ attempted value: ${formattedValue}
5328
5328
  }
5329
5329
  validate(value, options) {
5330
5330
  var _options$disableStack2;
5331
- let schema13 = this.resolve(Object.assign({}, options, {
5331
+ let schema14 = this.resolve(Object.assign({}, options, {
5332
5332
  value
5333
5333
  }));
5334
- let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema13.spec.disableStackTrace;
5335
- return new Promise((resolve, reject) => schema13._validate(value, options, (error, parsed) => {
5334
+ let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema14.spec.disableStackTrace;
5335
+ return new Promise((resolve, reject) => schema14._validate(value, options, (error, parsed) => {
5336
5336
  if (ValidationError.isError(error)) error.value = parsed;
5337
5337
  reject(error);
5338
5338
  }, (errors, validated) => {
@@ -5342,12 +5342,12 @@ attempted value: ${formattedValue}
5342
5342
  }
5343
5343
  validateSync(value, options) {
5344
5344
  var _options$disableStack3;
5345
- let schema13 = this.resolve(Object.assign({}, options, {
5345
+ let schema14 = this.resolve(Object.assign({}, options, {
5346
5346
  value
5347
5347
  }));
5348
5348
  let result;
5349
- let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema13.spec.disableStackTrace;
5350
- schema13._validate(value, Object.assign({}, options, {
5349
+ let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema14.spec.disableStackTrace;
5350
+ schema14._validate(value, Object.assign({}, options, {
5351
5351
  sync: true
5352
5352
  }), (error, parsed) => {
5353
5353
  if (ValidationError.isError(error)) error.value = parsed;
@@ -5381,8 +5381,8 @@ attempted value: ${formattedValue}
5381
5381
  return typeof defaultValue === "function" ? defaultValue.call(this, options) : clone(defaultValue);
5382
5382
  }
5383
5383
  getDefault(options) {
5384
- let schema13 = this.resolve(options || {});
5385
- return schema13._getDefault(options);
5384
+ let schema14 = this.resolve(options || {});
5385
+ return schema14._getDefault(options);
5386
5386
  }
5387
5387
  default(def) {
5388
5388
  if (arguments.length === 0) {
@@ -5615,13 +5615,13 @@ attempted value: ${formattedValue}
5615
5615
  return description;
5616
5616
  }
5617
5617
  get ["~standard"]() {
5618
- const schema13 = this;
5618
+ const schema14 = this;
5619
5619
  const standard = {
5620
5620
  version: 1,
5621
5621
  vendor: "yup",
5622
5622
  async validate(value) {
5623
5623
  try {
5624
- const result = await schema13.validate(value, {
5624
+ const result = await schema14.validate(value, {
5625
5625
  abortEarly: false
5626
5626
  });
5627
5627
  return {
@@ -5645,9 +5645,9 @@ for (const method of ["validate", "validateSync"]) Schema.prototype[`${method}At
5645
5645
  const {
5646
5646
  parent,
5647
5647
  parentPath,
5648
- schema: schema13
5648
+ schema: schema14
5649
5649
  } = getIn(this, path, value, options.context);
5650
- return schema13[method](parent && parent[parentPath], Object.assign({}, options, {
5650
+ return schema14[method](parent && parent[parentPath], Object.assign({}, options, {
5651
5651
  parent,
5652
5652
  path
5653
5653
  }));
@@ -5821,7 +5821,7 @@ var StringSchema = class extends Schema {
5821
5821
  });
5822
5822
  }
5823
5823
  required(message) {
5824
- return super.required(message).withMutation((schema13) => schema13.test({
5824
+ return super.required(message).withMutation((schema14) => schema14.test({
5825
5825
  message: message || mixed.required,
5826
5826
  name: "required",
5827
5827
  skipAbsent: true,
@@ -5829,9 +5829,9 @@ var StringSchema = class extends Schema {
5829
5829
  }));
5830
5830
  }
5831
5831
  notRequired() {
5832
- return super.notRequired().withMutation((schema13) => {
5833
- schema13.tests = schema13.tests.filter((t) => t.OPTIONS.name !== "required");
5834
- return schema13;
5832
+ return super.notRequired().withMutation((schema14) => {
5833
+ schema14.tests = schema14.tests.filter((t) => t.OPTIONS.name !== "required");
5834
+ return schema14;
5835
5835
  });
5836
5836
  }
5837
5837
  length(length, message = string.length) {
@@ -6209,7 +6209,7 @@ function sortByKeyOrder(keys) {
6209
6209
  return findIndex(keys, a) - findIndex(keys, b);
6210
6210
  };
6211
6211
  }
6212
- var parseJson = (value, _, schema13) => {
6212
+ var parseJson = (value, _, schema14) => {
6213
6213
  if (typeof value !== "string") {
6214
6214
  return value;
6215
6215
  }
@@ -6218,30 +6218,30 @@ var parseJson = (value, _, schema13) => {
6218
6218
  parsed = JSON.parse(value);
6219
6219
  } catch (err) {
6220
6220
  }
6221
- return schema13.isType(parsed) ? parsed : value;
6221
+ return schema14.isType(parsed) ? parsed : value;
6222
6222
  };
6223
- function deepPartial(schema13) {
6224
- if ("fields" in schema13) {
6223
+ function deepPartial(schema14) {
6224
+ if ("fields" in schema14) {
6225
6225
  const partial = {};
6226
- for (const [key, fieldSchema] of Object.entries(schema13.fields)) {
6226
+ for (const [key, fieldSchema] of Object.entries(schema14.fields)) {
6227
6227
  partial[key] = deepPartial(fieldSchema);
6228
6228
  }
6229
- return schema13.setFields(partial);
6229
+ return schema14.setFields(partial);
6230
6230
  }
6231
- if (schema13.type === "array") {
6232
- const nextArray = schema13.optional();
6231
+ if (schema14.type === "array") {
6232
+ const nextArray = schema14.optional();
6233
6233
  if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);
6234
6234
  return nextArray;
6235
6235
  }
6236
- if (schema13.type === "tuple") {
6237
- return schema13.optional().clone({
6238
- types: schema13.spec.types.map(deepPartial)
6236
+ if (schema14.type === "tuple") {
6237
+ return schema14.optional().clone({
6238
+ types: schema14.spec.types.map(deepPartial)
6239
6239
  });
6240
6240
  }
6241
- if ("optional" in schema13) {
6242
- return schema13.optional();
6241
+ if ("optional" in schema14) {
6242
+ return schema14.optional();
6243
6243
  }
6244
- return schema13;
6244
+ return schema14;
6245
6245
  }
6246
6246
  var deepHas = (obj, p) => {
6247
6247
  const path = [...(0, import_property_expr.normalizePath)(p)];
@@ -6372,8 +6372,8 @@ var ObjectSchema = class extends Schema {
6372
6372
  next._sortErrors = this._sortErrors;
6373
6373
  return next;
6374
6374
  }
6375
- concat(schema13) {
6376
- let next = super.concat(schema13);
6375
+ concat(schema14) {
6376
+ let next = super.concat(schema14);
6377
6377
  let nextFields = next.fields;
6378
6378
  for (let [field, schemaOrRef] of Object.entries(this.fields)) {
6379
6379
  const target = nextFields[field];
@@ -6381,7 +6381,7 @@ var ObjectSchema = class extends Schema {
6381
6381
  }
6382
6382
  return next.withMutation((s2) => (
6383
6383
  // XXX: excludes here is wrong
6384
- s2.setFields(nextFields, [...this._excludedEdges, ...schema13._excludedEdges])
6384
+ s2.setFields(nextFields, [...this._excludedEdges, ...schema14._excludedEdges])
6385
6385
  ));
6386
6386
  }
6387
6387
  _getDefault(options) {
@@ -6426,8 +6426,8 @@ var ObjectSchema = class extends Schema {
6426
6426
  }
6427
6427
  partial() {
6428
6428
  const partial = {};
6429
- for (const [key, schema13] of Object.entries(this.fields)) {
6430
- partial[key] = "optional" in schema13 && schema13.optional instanceof Function ? schema13.optional() : schema13;
6429
+ for (const [key, schema14] of Object.entries(this.fields)) {
6430
+ partial[key] = "optional" in schema14 && schema14.optional instanceof Function ? schema14.optional() : schema14;
6431
6431
  }
6432
6432
  return this.setFields(partial);
6433
6433
  }
@@ -6629,22 +6629,22 @@ var ArraySchema = class extends Schema {
6629
6629
  json() {
6630
6630
  return this.transform(parseJson);
6631
6631
  }
6632
- concat(schema13) {
6633
- let next = super.concat(schema13);
6632
+ concat(schema14) {
6633
+ let next = super.concat(schema14);
6634
6634
  next.innerType = this.innerType;
6635
- if (schema13.innerType)
6635
+ if (schema14.innerType)
6636
6636
  next.innerType = next.innerType ? (
6637
6637
  // @ts-expect-error Lazy doesn't have concat and will break
6638
- next.innerType.concat(schema13.innerType)
6639
- ) : schema13.innerType;
6638
+ next.innerType.concat(schema14.innerType)
6639
+ ) : schema14.innerType;
6640
6640
  return next;
6641
6641
  }
6642
- of(schema13) {
6642
+ of(schema14) {
6643
6643
  let next = this.clone();
6644
- if (!isSchema(schema13)) throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema13));
6645
- next.innerType = schema13;
6644
+ if (!isSchema(schema14)) throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema14));
6645
+ next.innerType = schema14;
6646
6646
  next.spec = Object.assign({}, next.spec, {
6647
- types: schema13
6647
+ types: schema14
6648
6648
  });
6649
6649
  return next;
6650
6650
  }
@@ -6792,7 +6792,7 @@ var TupleSchema = class extends Schema {
6792
6792
  describe(options) {
6793
6793
  const next = (options ? this.resolve(options) : this).clone();
6794
6794
  const base = super.describe(options);
6795
- base.innerType = next.spec.types.map((schema13, index) => {
6795
+ base.innerType = next.spec.types.map((schema14, index) => {
6796
6796
  var _innerOptions;
6797
6797
  let innerOptions = options;
6798
6798
  if ((_innerOptions = innerOptions) != null && _innerOptions.value) {
@@ -6801,7 +6801,7 @@ var TupleSchema = class extends Schema {
6801
6801
  value: innerOptions.value[index]
6802
6802
  });
6803
6803
  }
6804
- return schema13.describe(innerOptions);
6804
+ return schema14.describe(innerOptions);
6805
6805
  });
6806
6806
  return base;
6807
6807
  }
@@ -6850,6 +6850,7 @@ var EnumFoodFlavor = /* @__PURE__ */ ((EnumFoodFlavor3) => {
6850
6850
  EnumFoodFlavor3["SAVOURY"] = "Savoury";
6851
6851
  EnumFoodFlavor3["SPICY"] = "Spicy";
6852
6852
  EnumFoodFlavor3["SWEET"] = "Sweet";
6853
+ EnumFoodFlavor3["OTHER"] = "Other";
6853
6854
  return EnumFoodFlavor3;
6854
6855
  })(EnumFoodFlavor || {});
6855
6856
  var EnumResourceType = /* @__PURE__ */ ((EnumResourceType22) => {
@@ -10206,7 +10207,7 @@ var socialMediaSchema = create$3({
10206
10207
  is: (name) => !!name,
10207
10208
  // If name has a value
10208
10209
  then: () => normalizedUrlTransform().required("Link is required when name is set").url("Link must be a valid URL").label("Social Media Link"),
10209
- otherwise: (schema13) => schema13.notRequired()
10210
+ otherwise: (schema14) => schema14.notRequired()
10210
10211
  })
10211
10212
  });
10212
10213
  var globalResourceSchema = create$3().shape({
@@ -10279,21 +10280,21 @@ var paymentInfoSchema = create$3({
10279
10280
  paymentMethod: create$8().oneOf(Object.values(EnumPaymentMethod)).required("Please select a Payment method"),
10280
10281
  accountHolderName: create$6().when("paymentMethod", {
10281
10282
  is: "bank_transfer",
10282
- then: (schema13) => schema13.required("Account holder name is required for bank transfer").trim(),
10283
- otherwise: (schema13) => schema13.notRequired()
10283
+ then: (schema14) => schema14.required("Account holder name is required for bank transfer").trim(),
10284
+ otherwise: (schema14) => schema14.notRequired()
10284
10285
  }),
10285
10286
  accountNumber: create$6().when("paymentMethod", {
10286
10287
  is: "bank_transfer",
10287
- then: (schema13) => schema13.required("Account number is required for bank transfer").matches(
10288
+ then: (schema14) => schema14.required("Account number is required for bank transfer").matches(
10288
10289
  nzBankAccountRegex,
10289
10290
  "Account number must be in format: XX-XXXX-XXXXXXX-XX"
10290
10291
  ).trim(),
10291
- otherwise: (schema13) => schema13.notRequired()
10292
+ otherwise: (schema14) => schema14.notRequired()
10292
10293
  }),
10293
10294
  link: create$6().when("paymentMethod", {
10294
- is: (val) => val !== "bank_transfer",
10295
+ is: (val) => val === "paypal" || val === "stripe",
10295
10296
  then: () => normalizedUrlTransform().url("Link must be a valid URL").required("Link is required for PayPal/Stripe"),
10296
- otherwise: (schema13) => schema13.notRequired()
10297
+ otherwise: (schema14) => schema14.notRequired()
10297
10298
  })
10298
10299
  });
10299
10300
  var eventInfoSchema = create$3().shape({
@@ -10406,8 +10407,8 @@ var userSchema = create$3().shape({
10406
10407
  confirmPassword: create$6().nullable().trim().label("Confirm Password").when("password", {
10407
10408
  is: (val) => !!val,
10408
10409
  // only necessary if password typed
10409
- then: (schema13) => schema13.required("Confirm Password is required").oneOf([create$9("password")], "Passwords must match"),
10410
- otherwise: (schema13) => schema13.notRequired()
10410
+ then: (schema14) => schema14.required("Confirm Password is required").oneOf([create$9("password")], "Passwords must match"),
10411
+ otherwise: (schema14) => schema14.notRequired()
10411
10412
  }),
10412
10413
  role: create$8().oneOf(Object.values(EnumUserRole)).required("Role is required")
10413
10414
  });
@@ -10525,8 +10526,8 @@ var testerSchema = create$3().shape({
10525
10526
  email: emailRequiredSchema,
10526
10527
  event: create$3().when("resourceType", {
10527
10528
  is: (resourceType) => resourceType === "event",
10528
- otherwise: (schema13) => schema13.nullable().optional(),
10529
- then: (schema13) => schema13.required("Event information is required").shape(testerEventSchema.fields)
10529
+ otherwise: (schema14) => schema14.nullable().optional(),
10530
+ then: (schema14) => schema14.required("Event information is required").shape(testerEventSchema.fields)
10530
10531
  }),
10531
10532
  firstName: create$6().required("First name is required"),
10532
10533
  lastName: create$6().required("Last name is required"),
@@ -10544,8 +10545,8 @@ var testerSchema = create$3().shape({
10544
10545
  ).required("Resource Type is required"),
10545
10546
  vendor: create$3().when("resourceType", {
10546
10547
  is: (resourceType) => resourceType === "vendor",
10547
- otherwise: (schema13) => schema13.nullable().optional(),
10548
- then: (schema13) => schema13.required("Vendor information is required").shape(testerVendorSchema.fields)
10548
+ otherwise: (schema14) => schema14.nullable().optional(),
10549
+ then: (schema14) => schema14.required("Vendor information is required").shape(testerVendorSchema.fields)
10549
10550
  })
10550
10551
  });
10551
10552
  var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn2) => {
@@ -10583,7 +10584,7 @@ var adSchema = create$3().shape({
10583
10584
  return endDate > now;
10584
10585
  }).when("start", {
10585
10586
  is: (val) => val && val.length > 0,
10586
- then: (schema13) => schema13.test(
10587
+ then: (schema14) => schema14.test(
10587
10588
  "is-after-start",
10588
10589
  "End date must be after start date",
10589
10590
  function(value) {
@@ -10800,7 +10801,7 @@ async function saveNotificationsInDb(payload) {
10800
10801
  // src/service/sendPushNotifications.ts
10801
10802
  var import_expo_server_sdk = require("expo-server-sdk");
10802
10803
 
10803
- // node_modules/@timardex/cluemart-shared/dist/chunk-IXPWY6CU.mjs
10804
+ // node_modules/@timardex/cluemart-shared/dist/chunk-OBQRGWV3.mjs
10804
10805
  var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
10805
10806
  EnumOSPlatform22["ANDROID"] = "android";
10806
10807
  EnumOSPlatform22["IOS"] = "ios";
@@ -11392,10 +11393,60 @@ ChatSchema.index({
11392
11393
  });
11393
11394
  var ChatModel = import_mongoose8.default.models.Chat || import_mongoose8.default.model("Chat", ChatSchema);
11394
11395
 
11395
- // src/mongoose/ResourceActivity.ts
11396
+ // src/mongoose/GoogleImportedMarket.ts
11396
11397
  var import_mongoose9 = __toESM(require("mongoose"));
11397
11398
  var MongooseSchema8 = import_mongoose9.default.Schema;
11398
- var ActivitySchema = new MongooseSchema8(
11399
+ var locationSchema2 = new MongooseSchema8(
11400
+ {
11401
+ lat: { required: true, type: Number },
11402
+ lng: { required: true, type: Number }
11403
+ },
11404
+ { _id: false }
11405
+ // Prevents Mongoose from creating an additional _id field for subdocuments
11406
+ );
11407
+ var schema5 = new MongooseSchema8(
11408
+ {
11409
+ address: { required: true, type: String },
11410
+ businessStatus: { required: false, type: String },
11411
+ claimed: { default: false, required: true, type: Boolean },
11412
+ googleMapsUrl: { required: false, type: String },
11413
+ googlePlaceId: {
11414
+ required: true,
11415
+ type: String,
11416
+ unique: true
11417
+ // unique, indexed
11418
+ },
11419
+ image: { required: false, type: String },
11420
+ // photo_reference only
11421
+ importedAt: { default: () => /* @__PURE__ */ new Date(), required: true, type: Date },
11422
+ location: {
11423
+ required: false,
11424
+ // optional because lat/lng may expire after 30 days
11425
+ type: locationSchema2
11426
+ },
11427
+ name: { required: true, type: String },
11428
+ openingHours: { required: false, type: [String] },
11429
+ phone: { required: false, type: String },
11430
+ photos: { required: false, type: [String] },
11431
+ // array of photo_reference
11432
+ rating: { required: false, type: Number },
11433
+ reviewCount: { required: false, type: Number },
11434
+ slug: { required: true, type: String },
11435
+ website: { required: false, type: String }
11436
+ },
11437
+ { timestamps: true }
11438
+ );
11439
+ schema5.index({ googlePlaceId: 1 });
11440
+ schema5.index({ name: 1 });
11441
+ schema5.index({ slug: 1 });
11442
+ schema5.index({ address: 1 });
11443
+ schema5.index({ "location.lat": 1, "location.lng": 1 });
11444
+ var GoogleImportedMarketModel = import_mongoose9.default.models.GoogleImportedMarket || import_mongoose9.default.model("GoogleImportedMarket", schema5);
11445
+
11446
+ // src/mongoose/ResourceActivity.ts
11447
+ var import_mongoose10 = __toESM(require("mongoose"));
11448
+ var MongooseSchema9 = import_mongoose10.default.Schema;
11449
+ var ActivitySchema = new MongooseSchema9(
11399
11450
  {
11400
11451
  activityType: {
11401
11452
  enum: Object.values(EnumActivity),
@@ -11431,7 +11482,7 @@ var ActivitySchema = new MongooseSchema8(
11431
11482
  },
11432
11483
  { _id: false }
11433
11484
  );
11434
- var schema5 = new MongooseSchema8(
11485
+ var schema6 = new MongooseSchema9(
11435
11486
  {
11436
11487
  activity: { default: [], type: [ActivitySchema] },
11437
11488
  resourceId: { required: true, type: String },
@@ -11443,14 +11494,14 @@ var schema5 = new MongooseSchema8(
11443
11494
  },
11444
11495
  { timestamps: true }
11445
11496
  );
11446
- schema5.index({ resourceId: 1, resourceType: 1 }, { unique: true });
11447
- schema5.index({ "views.location": "2dsphere" });
11448
- var ResourceActivityModel = import_mongoose9.default.models.ResourceActivity || import_mongoose9.default.model("ResourceActivity", schema5);
11497
+ schema6.index({ resourceId: 1, resourceType: 1 }, { unique: true });
11498
+ schema6.index({ "views.location": "2dsphere" });
11499
+ var ResourceActivityModel = import_mongoose10.default.models.ResourceActivity || import_mongoose10.default.model("ResourceActivity", schema6);
11449
11500
 
11450
11501
  // src/mongoose/Tester.ts
11451
- var import_mongoose10 = __toESM(require("mongoose"));
11452
- var MongooseSchema9 = import_mongoose10.default.Schema;
11453
- var TesterVendorQuestionarySchema = new MongooseSchema9(
11502
+ var import_mongoose11 = __toESM(require("mongoose"));
11503
+ var MongooseSchema10 = import_mongoose11.default.Schema;
11504
+ var TesterVendorQuestionarySchema = new MongooseSchema10(
11454
11505
  {
11455
11506
  appearInVideoIntroduction: {
11456
11507
  default: false,
@@ -11477,7 +11528,7 @@ var TesterVendorQuestionarySchema = new MongooseSchema9(
11477
11528
  },
11478
11529
  { _id: false }
11479
11530
  );
11480
- var TesterVendorSchema = new MongooseSchema9(
11531
+ var TesterVendorSchema = new MongooseSchema10(
11481
11532
  {
11482
11533
  categories: { required: true, type: [CategorySchema] },
11483
11534
  marketsAttended: {
@@ -11503,7 +11554,7 @@ var TesterVendorSchema = new MongooseSchema9(
11503
11554
  },
11504
11555
  { _id: false }
11505
11556
  );
11506
- var TesterEventQuestionarySchema = new MongooseSchema9(
11557
+ var TesterEventQuestionarySchema = new MongooseSchema10(
11507
11558
  {
11508
11559
  allowMarketingAppearance: {
11509
11560
  default: false,
@@ -11538,7 +11589,7 @@ var TesterEventQuestionarySchema = new MongooseSchema9(
11538
11589
  },
11539
11590
  { _id: false }
11540
11591
  );
11541
- var TesterEventsSchema = new MongooseSchema9(
11592
+ var TesterEventsSchema = new MongooseSchema10(
11542
11593
  {
11543
11594
  markets: {
11544
11595
  required: true,
@@ -11567,7 +11618,7 @@ var TesterEventsSchema = new MongooseSchema9(
11567
11618
  },
11568
11619
  { _id: false }
11569
11620
  );
11570
- var TesterSchema = new MongooseSchema9(
11621
+ var TesterSchema = new MongooseSchema10(
11571
11622
  {
11572
11623
  active: { default: false, required: true, type: Boolean },
11573
11624
  approved: { default: false, required: true, type: Boolean },
@@ -11601,43 +11652,43 @@ var TesterSchema = new MongooseSchema9(
11601
11652
  timestamps: true
11602
11653
  }
11603
11654
  );
11604
- var TesterModel = import_mongoose10.default.models.Tester || import_mongoose10.default.model("Tester", TesterSchema);
11655
+ var TesterModel = import_mongoose11.default.models.Tester || import_mongoose11.default.model("Tester", TesterSchema);
11605
11656
 
11606
11657
  // src/mongoose/User.ts
11607
- var import_mongoose11 = __toESM(require("mongoose"));
11608
- var MongooseSchema10 = import_mongoose11.default.Schema;
11609
- var userActivityEventSchema = new MongooseSchema10(
11658
+ var import_mongoose12 = __toESM(require("mongoose"));
11659
+ var MongooseSchema11 = import_mongoose12.default.Schema;
11660
+ var userActivityEventSchema = new MongooseSchema11(
11610
11661
  {
11611
11662
  dateTime: dateTimeSchema3,
11612
11663
  resourceId: {
11613
11664
  ref: "Event",
11614
11665
  required: false,
11615
- type: import_mongoose11.default.Schema.Types.ObjectId
11666
+ type: import_mongoose12.default.Schema.Types.ObjectId
11616
11667
  }
11617
11668
  },
11618
11669
  { _id: false }
11619
11670
  );
11620
- var userActivityFavouritesSchema = new MongooseSchema10(
11671
+ var userActivityFavouritesSchema = new MongooseSchema11(
11621
11672
  {
11622
11673
  events: {
11623
11674
  ref: "Event",
11624
11675
  required: false,
11625
- type: [import_mongoose11.default.Schema.Types.ObjectId]
11676
+ type: [import_mongoose12.default.Schema.Types.ObjectId]
11626
11677
  },
11627
11678
  partners: {
11628
11679
  ref: "Partner",
11629
11680
  required: false,
11630
- type: [import_mongoose11.default.Schema.Types.ObjectId]
11681
+ type: [import_mongoose12.default.Schema.Types.ObjectId]
11631
11682
  },
11632
11683
  vendors: {
11633
11684
  ref: "Vendor",
11634
11685
  required: false,
11635
- type: [import_mongoose11.default.Schema.Types.ObjectId]
11686
+ type: [import_mongoose12.default.Schema.Types.ObjectId]
11636
11687
  }
11637
11688
  },
11638
11689
  { _id: false }
11639
11690
  );
11640
- var stripeSchema = new MongooseSchema10(
11691
+ var stripeSchema = new MongooseSchema11(
11641
11692
  {
11642
11693
  currentPlan: {
11643
11694
  enum: Object.values(EnumUserLicence),
@@ -11668,7 +11719,7 @@ var stripeSchema = new MongooseSchema10(
11668
11719
  },
11669
11720
  { _id: false }
11670
11721
  );
11671
- var schema6 = new MongooseSchema10(
11722
+ var schema7 = new MongooseSchema11(
11672
11723
  {
11673
11724
  active: { default: false, required: true, type: Boolean },
11674
11725
  associates: {
@@ -11684,7 +11735,7 @@ var schema6 = new MongooseSchema10(
11684
11735
  events: {
11685
11736
  ref: "Event",
11686
11737
  required: false,
11687
- type: [import_mongoose11.default.Schema.Types.ObjectId]
11738
+ type: [import_mongoose12.default.Schema.Types.ObjectId]
11688
11739
  },
11689
11740
  firstName: { required: true, type: String },
11690
11741
  isTester: { default: false, required: true, type: Boolean },
@@ -11696,7 +11747,7 @@ var schema6 = new MongooseSchema10(
11696
11747
  partner: {
11697
11748
  ref: "Partner",
11698
11749
  required: false,
11699
- type: import_mongoose11.default.Schema.Types.ObjectId
11750
+ type: import_mongoose12.default.Schema.Types.ObjectId
11700
11751
  },
11701
11752
  password: { required: true, type: String },
11702
11753
  platform: {
@@ -11741,20 +11792,20 @@ var schema6 = new MongooseSchema10(
11741
11792
  vendor: {
11742
11793
  ref: "Vendor",
11743
11794
  required: false,
11744
- type: import_mongoose11.default.Schema.Types.ObjectId
11795
+ type: import_mongoose12.default.Schema.Types.ObjectId
11745
11796
  }
11746
11797
  },
11747
11798
  { strict: false, timestamps: true }
11748
11799
  );
11749
- schema6.index({ "associates.email": 1 });
11750
- schema6.index({ "licences.expiryDate": 1 });
11751
- schema6.index({ "licences.licenceType": 1 });
11752
- var UserModel = import_mongoose11.default.models.User || import_mongoose11.default.model("User", schema6);
11800
+ schema7.index({ "associates.email": 1 });
11801
+ schema7.index({ "licences.expiryDate": 1 });
11802
+ schema7.index({ "licences.licenceType": 1 });
11803
+ var UserModel = import_mongoose12.default.models.User || import_mongoose12.default.model("User", schema7);
11753
11804
 
11754
11805
  // src/mongoose/VerificationToken.ts
11755
- var import_mongoose12 = __toESM(require("mongoose"));
11756
- var MongooseSchema11 = import_mongoose12.default.Schema;
11757
- var schema7 = new MongooseSchema11(
11806
+ var import_mongoose13 = __toESM(require("mongoose"));
11807
+ var MongooseSchema12 = import_mongoose13.default.Schema;
11808
+ var schema8 = new MongooseSchema12(
11758
11809
  {
11759
11810
  createdAt: {
11760
11811
  default: Date.now,
@@ -11769,12 +11820,12 @@ var schema7 = new MongooseSchema11(
11769
11820
  },
11770
11821
  { timestamps: true }
11771
11822
  );
11772
- var VerificationTokenModel = import_mongoose12.default.models.VerificationToken || import_mongoose12.default.model("VerificationToken", schema7);
11823
+ var VerificationTokenModel = import_mongoose13.default.models.VerificationToken || import_mongoose13.default.model("VerificationToken", schema8);
11773
11824
 
11774
11825
  // src/mongoose/vendor/Vendor.ts
11775
- var import_mongoose13 = __toESM(require("mongoose"));
11776
- var MongooseSchema12 = import_mongoose13.default.Schema;
11777
- var MenuTypeSchema = new MongooseSchema12(
11826
+ var import_mongoose14 = __toESM(require("mongoose"));
11827
+ var MongooseSchema13 = import_mongoose14.default.Schema;
11828
+ var MenuTypeSchema = new MongooseSchema13(
11778
11829
  {
11779
11830
  description: { required: false, type: String },
11780
11831
  name: { required: false, type: String },
@@ -11784,7 +11835,7 @@ var MenuTypeSchema = new MongooseSchema12(
11784
11835
  { _id: false }
11785
11836
  // Prevents Mongoose from creating an additional _id field for subdocuments
11786
11837
  );
11787
- var LocationsSchema = new MongooseSchema12(
11838
+ var LocationsSchema = new MongooseSchema13(
11788
11839
  {
11789
11840
  dateTime: {
11790
11841
  dateStatus: {
@@ -11817,7 +11868,7 @@ var LocationsSchema = new MongooseSchema12(
11817
11868
  { _id: false }
11818
11869
  // Prevents Mongoose from creating an additional _id field for subdocuments
11819
11870
  );
11820
- var schema8 = new MongooseSchema12(
11871
+ var schema9 = new MongooseSchema13(
11821
11872
  {
11822
11873
  ...baseResourceFields,
11823
11874
  // Importing base resource fields from global.ts
@@ -11839,7 +11890,7 @@ var schema8 = new MongooseSchema12(
11839
11890
  vendorInfoId: {
11840
11891
  ref: "VendorInfo",
11841
11892
  required: false,
11842
- type: import_mongoose13.default.Schema.Types.ObjectId
11893
+ type: import_mongoose14.default.Schema.Types.ObjectId
11843
11894
  },
11844
11895
  vendorType: {
11845
11896
  enum: Object.values(EnumVendorType),
@@ -11849,24 +11900,24 @@ var schema8 = new MongooseSchema12(
11849
11900
  },
11850
11901
  { timestamps: true }
11851
11902
  );
11852
- schema8.index({ name: 1 });
11853
- schema8.index({ description: 1 });
11854
- schema8.index({ region: 1 });
11855
- schema8.index({ "categories.name": 1 });
11856
- schema8.index({ "associates.email": 1 });
11857
- var VendorModel = import_mongoose13.default.models.Vendor || import_mongoose13.default.model("Vendor", schema8);
11903
+ schema9.index({ name: 1 });
11904
+ schema9.index({ description: 1 });
11905
+ schema9.index({ region: 1 });
11906
+ schema9.index({ "categories.name": 1 });
11907
+ schema9.index({ "associates.email": 1 });
11908
+ var VendorModel = import_mongoose14.default.models.Vendor || import_mongoose14.default.model("Vendor", schema9);
11858
11909
 
11859
11910
  // src/mongoose/vendor/VendorInfo.ts
11860
- var import_mongoose14 = __toESM(require("mongoose"));
11861
- var MongooseSchema13 = import_mongoose14.default.Schema;
11862
- var AttributesSchema = new MongooseSchema13(
11911
+ var import_mongoose15 = __toESM(require("mongoose"));
11912
+ var MongooseSchema14 = import_mongoose15.default.Schema;
11913
+ var AttributesSchema = new MongooseSchema14(
11863
11914
  {
11864
11915
  details: { required: false, type: String },
11865
11916
  isRequired: { default: false, required: true, type: Boolean }
11866
11917
  },
11867
11918
  { _id: false }
11868
11919
  );
11869
- var schema9 = new MongooseSchema13(
11920
+ var schema10 = new MongooseSchema14(
11870
11921
  {
11871
11922
  compliance: {
11872
11923
  foodBeverageLicense: { default: false, required: false, type: Boolean },
@@ -11900,17 +11951,17 @@ var schema9 = new MongooseSchema13(
11900
11951
  vendorId: {
11901
11952
  ref: "Vendor",
11902
11953
  required: true,
11903
- type: import_mongoose14.default.Schema.Types.ObjectId
11954
+ type: import_mongoose15.default.Schema.Types.ObjectId
11904
11955
  }
11905
11956
  },
11906
11957
  { timestamps: true }
11907
11958
  );
11908
- var VendorInfoModel = import_mongoose14.default.models.VendorInfo || import_mongoose14.default.model("VendorInfo", schema9);
11959
+ var VendorInfoModel = import_mongoose15.default.models.VendorInfo || import_mongoose15.default.model("VendorInfo", schema10);
11909
11960
 
11910
11961
  // src/mongoose/event/Event.ts
11911
- var import_mongoose15 = __toESM(require("mongoose"));
11912
- var MongooseSchema14 = import_mongoose15.default.Schema;
11913
- var locationsSchema = new MongooseSchema14(
11962
+ var import_mongoose16 = __toESM(require("mongoose"));
11963
+ var MongooseSchema15 = import_mongoose16.default.Schema;
11964
+ var locationsSchema = new MongooseSchema15(
11914
11965
  {
11915
11966
  city: { required: true, type: String },
11916
11967
  coordinates: {
@@ -11933,7 +11984,7 @@ var locationsSchema = new MongooseSchema14(
11933
11984
  { _id: false }
11934
11985
  // Prevents Mongoose from creating an additional _id field for subdocuments
11935
11986
  );
11936
- var schema10 = new MongooseSchema14(
11987
+ var schema11 = new MongooseSchema15(
11937
11988
  {
11938
11989
  ...baseResourceFields,
11939
11990
  // Importing base resource fields from global.ts
@@ -11941,7 +11992,7 @@ var schema10 = new MongooseSchema14(
11941
11992
  eventInfoId: {
11942
11993
  ref: "EventInfo",
11943
11994
  required: false,
11944
- type: import_mongoose15.default.Schema.Types.ObjectId
11995
+ type: import_mongoose16.default.Schema.Types.ObjectId
11945
11996
  },
11946
11997
  eventType: {
11947
11998
  enum: Object.values(EnumEventType),
@@ -11964,18 +12015,18 @@ var schema10 = new MongooseSchema14(
11964
12015
  },
11965
12016
  { timestamps: true }
11966
12017
  );
11967
- schema10.index({ name: 1 });
11968
- schema10.index({ description: 1 });
11969
- schema10.index({ region: 1 });
11970
- schema10.index({ location: "2dsphere" });
11971
- schema10.index({ tags: 1 });
11972
- schema10.index({ "associates.email": 1 });
11973
- var EventModel = import_mongoose15.default.models.Event || import_mongoose15.default.model("Event", schema10);
12018
+ schema11.index({ name: 1 });
12019
+ schema11.index({ description: 1 });
12020
+ schema11.index({ region: 1 });
12021
+ schema11.index({ location: "2dsphere" });
12022
+ schema11.index({ tags: 1 });
12023
+ schema11.index({ "associates.email": 1 });
12024
+ var EventModel = import_mongoose16.default.models.Event || import_mongoose16.default.model("Event", schema11);
11974
12025
 
11975
12026
  // src/mongoose/Partner.ts
11976
- var import_mongoose16 = __toESM(require("mongoose"));
11977
- var MongooseSchema15 = import_mongoose16.default.Schema;
11978
- var schema11 = new MongooseSchema15(
12027
+ var import_mongoose17 = __toESM(require("mongoose"));
12028
+ var MongooseSchema16 = import_mongoose17.default.Schema;
12029
+ var schema12 = new MongooseSchema16(
11979
12030
  {
11980
12031
  ...baseResourceFields,
11981
12032
  location: {
@@ -11991,19 +12042,19 @@ var schema11 = new MongooseSchema15(
11991
12042
  },
11992
12043
  { timestamps: true }
11993
12044
  );
11994
- schema11.index({ name: 1 });
11995
- schema11.index({ description: 1 });
11996
- schema11.index({ region: 1 });
11997
- schema11.index({ location: "2dsphere" });
11998
- schema11.index({ "associates.email": 1 });
11999
- var PartnerModel = import_mongoose16.default.models.Partner || import_mongoose16.default.model("Partner", schema11);
12045
+ schema12.index({ name: 1 });
12046
+ schema12.index({ description: 1 });
12047
+ schema12.index({ region: 1 });
12048
+ schema12.index({ location: "2dsphere" });
12049
+ schema12.index({ "associates.email": 1 });
12050
+ var PartnerModel = import_mongoose17.default.models.Partner || import_mongoose17.default.model("Partner", schema12);
12000
12051
 
12001
12052
  // src/mongoose/Post.ts
12002
- var import_mongoose17 = __toESM(require("mongoose"));
12003
- var MongooseSchema16 = import_mongoose17.default.Schema;
12004
- var contentSchema = new MongooseSchema16(
12053
+ var import_mongoose18 = __toESM(require("mongoose"));
12054
+ var MongooseSchema17 = import_mongoose18.default.Schema;
12055
+ var contentSchema = new MongooseSchema17(
12005
12056
  {
12006
- contentData: import_mongoose17.Schema.Types.Mixed,
12057
+ contentData: import_mongoose18.Schema.Types.Mixed,
12007
12058
  contentOrder: { required: true, type: Number },
12008
12059
  contentType: {
12009
12060
  enum: Object.values(EnumPostContentType),
@@ -12013,7 +12064,7 @@ var contentSchema = new MongooseSchema16(
12013
12064
  },
12014
12065
  { _id: false }
12015
12066
  );
12016
- var schema12 = new MongooseSchema16(
12067
+ var schema13 = new MongooseSchema17(
12017
12068
  {
12018
12069
  active: { default: true, required: true, type: Boolean },
12019
12070
  caption: { required: true, type: String },
@@ -12028,15 +12079,15 @@ var schema12 = new MongooseSchema16(
12028
12079
  },
12029
12080
  { timestamps: true }
12030
12081
  );
12031
- schema12.index({ title: 1 });
12032
- schema12.index({ tags: 1 });
12033
- var PostModel = import_mongoose17.default.models.Post || import_mongoose17.default.model("Post", schema12);
12082
+ schema13.index({ title: 1 });
12083
+ schema13.index({ tags: 1 });
12084
+ var PostModel = import_mongoose18.default.models.Post || import_mongoose18.default.model("Post", schema13);
12034
12085
 
12035
12086
  // src/mongoose/AppSetting.ts
12036
- var import_mongoose18 = __toESM(require("mongoose"));
12037
- var MongooseSchema17 = import_mongoose18.default.Schema;
12087
+ var import_mongoose19 = __toESM(require("mongoose"));
12088
+ var MongooseSchema18 = import_mongoose19.default.Schema;
12038
12089
  var APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
12039
- var AppSettingSchema = new MongooseSchema17(
12090
+ var AppSettingSchema = new MongooseSchema18(
12040
12091
  {
12041
12092
  appVersion: { default: "1.0.1", required: true, type: String },
12042
12093
  key: {
@@ -12051,7 +12102,7 @@ var AppSettingSchema = new MongooseSchema17(
12051
12102
  },
12052
12103
  { timestamps: true }
12053
12104
  );
12054
- var AppSettingModel = import_mongoose18.default.models.AppSetting || import_mongoose18.default.model("AppSetting", AppSettingSchema);
12105
+ var AppSettingModel = import_mongoose19.default.models.AppSetting || import_mongoose19.default.model("AppSetting", AppSettingSchema);
12055
12106
 
12056
12107
  // src/service/updateAdStatus.ts
12057
12108
  async function updateAdStatuses() {