@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.
package/dist/index.mjs CHANGED
@@ -4677,10 +4677,10 @@ var Condition = class _Condition {
4677
4677
  otherwise
4678
4678
  } = config;
4679
4679
  let check = typeof is === "function" ? is : (...values) => values.every((value) => value === is);
4680
- return new _Condition(refs, (values, schema13) => {
4680
+ return new _Condition(refs, (values, schema14) => {
4681
4681
  var _branch;
4682
4682
  let branch = check(...values) ? then : otherwise;
4683
- return (_branch = branch == null ? void 0 : branch(schema13)) != null ? _branch : schema13;
4683
+ return (_branch = branch == null ? void 0 : branch(schema14)) != null ? _branch : schema14;
4684
4684
  });
4685
4685
  }
4686
4686
  constructor(refs, builder) {
@@ -4694,13 +4694,13 @@ var Condition = class _Condition {
4694
4694
  // TODO: ? operator here?
4695
4695
  ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context)
4696
4696
  ));
4697
- let schema13 = this.fn(values, base, options);
4698
- if (schema13 === void 0 || // @ts-ignore this can be base
4699
- schema13 === base) {
4697
+ let schema14 = this.fn(values, base, options);
4698
+ if (schema14 === void 0 || // @ts-ignore this can be base
4699
+ schema14 === base) {
4700
4700
  return base;
4701
4701
  }
4702
- if (!isSchema(schema13)) throw new TypeError("conditions must return a schema object");
4703
- return schema13.resolve(options);
4702
+ if (!isSchema(schema14)) throw new TypeError("conditions must return a schema object");
4703
+ return schema14.resolve(options);
4704
4704
  }
4705
4705
  };
4706
4706
  var prefixes = {
@@ -4770,7 +4770,7 @@ function createValidation(config) {
4770
4770
  path = "",
4771
4771
  options,
4772
4772
  originalValue,
4773
- schema: schema13
4773
+ schema: schema14
4774
4774
  }, panic, next) {
4775
4775
  const {
4776
4776
  name,
@@ -4782,8 +4782,8 @@ function createValidation(config) {
4782
4782
  let {
4783
4783
  parent,
4784
4784
  context,
4785
- abortEarly = schema13.spec.abortEarly,
4786
- disableStackTrace = schema13.spec.disableStackTrace
4785
+ abortEarly = schema14.spec.abortEarly,
4786
+ disableStackTrace = schema14.spec.disableStackTrace
4787
4787
  } = options;
4788
4788
  const resolveOptions = {
4789
4789
  value,
@@ -4794,9 +4794,9 @@ function createValidation(config) {
4794
4794
  const nextParams = resolveParams(Object.assign({
4795
4795
  value,
4796
4796
  originalValue,
4797
- label: schema13.spec.label,
4797
+ label: schema14.spec.label,
4798
4798
  path: overrides.path || path,
4799
- spec: schema13.spec,
4799
+ spec: schema14.spec,
4800
4800
  disableStackTrace: overrides.disableStackTrace || disableStackTrace
4801
4801
  }, params, overrides.params), resolveOptions);
4802
4802
  const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name, nextParams.disableStackTrace);
@@ -4815,7 +4815,7 @@ function createValidation(config) {
4815
4815
  },
4816
4816
  options,
4817
4817
  originalValue,
4818
- schema: schema13
4818
+ schema: schema14
4819
4819
  };
4820
4820
  const handleResult = (validOrError) => {
4821
4821
  if (ValidationError.isError(validOrError)) invalid(validOrError);
@@ -4859,42 +4859,42 @@ function resolveParams(params, options) {
4859
4859
  function resolveMaybeRef(item, options) {
4860
4860
  return Reference.isRef(item) ? item.getValue(options.value, options.parent, options.context) : item;
4861
4861
  }
4862
- function getIn(schema13, path, value, context = value) {
4862
+ function getIn(schema14, path, value, context = value) {
4863
4863
  let parent, lastPart, lastPartDebug;
4864
4864
  if (!path) return {
4865
4865
  parent,
4866
4866
  parentPath: path,
4867
- schema: schema13
4867
+ schema: schema14
4868
4868
  };
4869
4869
  (0, import_property_expr.forEach)(path, (_part, isBracket, isArray) => {
4870
4870
  let part = isBracket ? _part.slice(1, _part.length - 1) : _part;
4871
- schema13 = schema13.resolve({
4871
+ schema14 = schema14.resolve({
4872
4872
  context,
4873
4873
  parent,
4874
4874
  value
4875
4875
  });
4876
- let isTuple = schema13.type === "tuple";
4876
+ let isTuple = schema14.type === "tuple";
4877
4877
  let idx = isArray ? parseInt(part, 10) : 0;
4878
- if (schema13.innerType || isTuple) {
4878
+ if (schema14.innerType || isTuple) {
4879
4879
  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]"`);
4880
4880
  if (value && idx >= value.length) {
4881
4881
  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. `);
4882
4882
  }
4883
4883
  parent = value;
4884
4884
  value = value && value[idx];
4885
- schema13 = isTuple ? schema13.spec.types[idx] : schema13.innerType;
4885
+ schema14 = isTuple ? schema14.spec.types[idx] : schema14.innerType;
4886
4886
  }
4887
4887
  if (!isArray) {
4888
- 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}")`);
4888
+ 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}")`);
4889
4889
  parent = value;
4890
4890
  value = value && value[part];
4891
- schema13 = schema13.fields[part];
4891
+ schema14 = schema14.fields[part];
4892
4892
  }
4893
4893
  lastPart = part;
4894
4894
  lastPartDebug = isBracket ? "[" + _part + "]" : "." + _part;
4895
4895
  });
4896
4896
  return {
4897
- schema: schema13,
4897
+ schema: schema14,
4898
4898
  parent,
4899
4899
  parentPath: lastPart
4900
4900
  };
@@ -5094,20 +5094,20 @@ var Schema = class {
5094
5094
  this._mutate = before;
5095
5095
  return result;
5096
5096
  }
5097
- concat(schema13) {
5098
- if (!schema13 || schema13 === this) return this;
5099
- if (schema13.type !== this.type && this.type !== "mixed") throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema13.type}`);
5097
+ concat(schema14) {
5098
+ if (!schema14 || schema14 === this) return this;
5099
+ if (schema14.type !== this.type && this.type !== "mixed") throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema14.type}`);
5100
5100
  let base = this;
5101
- let combined = schema13.clone();
5101
+ let combined = schema14.clone();
5102
5102
  const mergedSpec = Object.assign({}, base.spec, combined.spec);
5103
5103
  combined.spec = mergedSpec;
5104
5104
  combined.internalTests = Object.assign({}, base.internalTests, combined.internalTests);
5105
- combined._whitelist = base._whitelist.merge(schema13._whitelist, schema13._blacklist);
5106
- combined._blacklist = base._blacklist.merge(schema13._blacklist, schema13._whitelist);
5105
+ combined._whitelist = base._whitelist.merge(schema14._whitelist, schema14._blacklist);
5106
+ combined._blacklist = base._blacklist.merge(schema14._blacklist, schema14._whitelist);
5107
5107
  combined.tests = base.tests;
5108
5108
  combined.exclusiveTests = base.exclusiveTests;
5109
5109
  combined.withMutation((next) => {
5110
- schema13.tests.forEach((fn) => {
5110
+ schema14.tests.forEach((fn) => {
5111
5111
  next.test(fn.OPTIONS);
5112
5112
  });
5113
5113
  });
@@ -5123,15 +5123,15 @@ var Schema = class {
5123
5123
  return this._typeCheck(v);
5124
5124
  }
5125
5125
  resolve(options) {
5126
- let schema13 = this;
5127
- if (schema13.conditions.length) {
5128
- let conditions = schema13.conditions;
5129
- schema13 = schema13.clone();
5130
- schema13.conditions = [];
5131
- schema13 = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema13);
5132
- schema13 = schema13.resolve(options);
5126
+ let schema14 = this;
5127
+ if (schema14.conditions.length) {
5128
+ let conditions = schema14.conditions;
5129
+ schema14 = schema14.clone();
5130
+ schema14.conditions = [];
5131
+ schema14 = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema14);
5132
+ schema14 = schema14.resolve(options);
5133
5133
  }
5134
- return schema13;
5134
+ return schema14;
5135
5135
  }
5136
5136
  resolveOptions(options) {
5137
5137
  var _options$strict, _options$abortEarly, _options$recursive, _options$disableStack;
@@ -5287,11 +5287,11 @@ attempted value: ${formattedValue}
5287
5287
  }
5288
5288
  validate(value, options) {
5289
5289
  var _options$disableStack2;
5290
- let schema13 = this.resolve(Object.assign({}, options, {
5290
+ let schema14 = this.resolve(Object.assign({}, options, {
5291
5291
  value
5292
5292
  }));
5293
- let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema13.spec.disableStackTrace;
5294
- return new Promise((resolve, reject) => schema13._validate(value, options, (error, parsed) => {
5293
+ let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema14.spec.disableStackTrace;
5294
+ return new Promise((resolve, reject) => schema14._validate(value, options, (error, parsed) => {
5295
5295
  if (ValidationError.isError(error)) error.value = parsed;
5296
5296
  reject(error);
5297
5297
  }, (errors, validated) => {
@@ -5301,12 +5301,12 @@ attempted value: ${formattedValue}
5301
5301
  }
5302
5302
  validateSync(value, options) {
5303
5303
  var _options$disableStack3;
5304
- let schema13 = this.resolve(Object.assign({}, options, {
5304
+ let schema14 = this.resolve(Object.assign({}, options, {
5305
5305
  value
5306
5306
  }));
5307
5307
  let result;
5308
- let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema13.spec.disableStackTrace;
5309
- schema13._validate(value, Object.assign({}, options, {
5308
+ let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema14.spec.disableStackTrace;
5309
+ schema14._validate(value, Object.assign({}, options, {
5310
5310
  sync: true
5311
5311
  }), (error, parsed) => {
5312
5312
  if (ValidationError.isError(error)) error.value = parsed;
@@ -5340,8 +5340,8 @@ attempted value: ${formattedValue}
5340
5340
  return typeof defaultValue === "function" ? defaultValue.call(this, options) : clone(defaultValue);
5341
5341
  }
5342
5342
  getDefault(options) {
5343
- let schema13 = this.resolve(options || {});
5344
- return schema13._getDefault(options);
5343
+ let schema14 = this.resolve(options || {});
5344
+ return schema14._getDefault(options);
5345
5345
  }
5346
5346
  default(def) {
5347
5347
  if (arguments.length === 0) {
@@ -5574,13 +5574,13 @@ attempted value: ${formattedValue}
5574
5574
  return description;
5575
5575
  }
5576
5576
  get ["~standard"]() {
5577
- const schema13 = this;
5577
+ const schema14 = this;
5578
5578
  const standard = {
5579
5579
  version: 1,
5580
5580
  vendor: "yup",
5581
5581
  async validate(value) {
5582
5582
  try {
5583
- const result = await schema13.validate(value, {
5583
+ const result = await schema14.validate(value, {
5584
5584
  abortEarly: false
5585
5585
  });
5586
5586
  return {
@@ -5604,9 +5604,9 @@ for (const method of ["validate", "validateSync"]) Schema.prototype[`${method}At
5604
5604
  const {
5605
5605
  parent,
5606
5606
  parentPath,
5607
- schema: schema13
5607
+ schema: schema14
5608
5608
  } = getIn(this, path, value, options.context);
5609
- return schema13[method](parent && parent[parentPath], Object.assign({}, options, {
5609
+ return schema14[method](parent && parent[parentPath], Object.assign({}, options, {
5610
5610
  parent,
5611
5611
  path
5612
5612
  }));
@@ -5780,7 +5780,7 @@ var StringSchema = class extends Schema {
5780
5780
  });
5781
5781
  }
5782
5782
  required(message) {
5783
- return super.required(message).withMutation((schema13) => schema13.test({
5783
+ return super.required(message).withMutation((schema14) => schema14.test({
5784
5784
  message: message || mixed.required,
5785
5785
  name: "required",
5786
5786
  skipAbsent: true,
@@ -5788,9 +5788,9 @@ var StringSchema = class extends Schema {
5788
5788
  }));
5789
5789
  }
5790
5790
  notRequired() {
5791
- return super.notRequired().withMutation((schema13) => {
5792
- schema13.tests = schema13.tests.filter((t) => t.OPTIONS.name !== "required");
5793
- return schema13;
5791
+ return super.notRequired().withMutation((schema14) => {
5792
+ schema14.tests = schema14.tests.filter((t) => t.OPTIONS.name !== "required");
5793
+ return schema14;
5794
5794
  });
5795
5795
  }
5796
5796
  length(length, message = string.length) {
@@ -6168,7 +6168,7 @@ function sortByKeyOrder(keys) {
6168
6168
  return findIndex(keys, a) - findIndex(keys, b);
6169
6169
  };
6170
6170
  }
6171
- var parseJson = (value, _, schema13) => {
6171
+ var parseJson = (value, _, schema14) => {
6172
6172
  if (typeof value !== "string") {
6173
6173
  return value;
6174
6174
  }
@@ -6177,30 +6177,30 @@ var parseJson = (value, _, schema13) => {
6177
6177
  parsed = JSON.parse(value);
6178
6178
  } catch (err) {
6179
6179
  }
6180
- return schema13.isType(parsed) ? parsed : value;
6180
+ return schema14.isType(parsed) ? parsed : value;
6181
6181
  };
6182
- function deepPartial(schema13) {
6183
- if ("fields" in schema13) {
6182
+ function deepPartial(schema14) {
6183
+ if ("fields" in schema14) {
6184
6184
  const partial = {};
6185
- for (const [key, fieldSchema] of Object.entries(schema13.fields)) {
6185
+ for (const [key, fieldSchema] of Object.entries(schema14.fields)) {
6186
6186
  partial[key] = deepPartial(fieldSchema);
6187
6187
  }
6188
- return schema13.setFields(partial);
6188
+ return schema14.setFields(partial);
6189
6189
  }
6190
- if (schema13.type === "array") {
6191
- const nextArray = schema13.optional();
6190
+ if (schema14.type === "array") {
6191
+ const nextArray = schema14.optional();
6192
6192
  if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);
6193
6193
  return nextArray;
6194
6194
  }
6195
- if (schema13.type === "tuple") {
6196
- return schema13.optional().clone({
6197
- types: schema13.spec.types.map(deepPartial)
6195
+ if (schema14.type === "tuple") {
6196
+ return schema14.optional().clone({
6197
+ types: schema14.spec.types.map(deepPartial)
6198
6198
  });
6199
6199
  }
6200
- if ("optional" in schema13) {
6201
- return schema13.optional();
6200
+ if ("optional" in schema14) {
6201
+ return schema14.optional();
6202
6202
  }
6203
- return schema13;
6203
+ return schema14;
6204
6204
  }
6205
6205
  var deepHas = (obj, p) => {
6206
6206
  const path = [...(0, import_property_expr.normalizePath)(p)];
@@ -6331,8 +6331,8 @@ var ObjectSchema = class extends Schema {
6331
6331
  next._sortErrors = this._sortErrors;
6332
6332
  return next;
6333
6333
  }
6334
- concat(schema13) {
6335
- let next = super.concat(schema13);
6334
+ concat(schema14) {
6335
+ let next = super.concat(schema14);
6336
6336
  let nextFields = next.fields;
6337
6337
  for (let [field, schemaOrRef] of Object.entries(this.fields)) {
6338
6338
  const target = nextFields[field];
@@ -6340,7 +6340,7 @@ var ObjectSchema = class extends Schema {
6340
6340
  }
6341
6341
  return next.withMutation((s2) => (
6342
6342
  // XXX: excludes here is wrong
6343
- s2.setFields(nextFields, [...this._excludedEdges, ...schema13._excludedEdges])
6343
+ s2.setFields(nextFields, [...this._excludedEdges, ...schema14._excludedEdges])
6344
6344
  ));
6345
6345
  }
6346
6346
  _getDefault(options) {
@@ -6385,8 +6385,8 @@ var ObjectSchema = class extends Schema {
6385
6385
  }
6386
6386
  partial() {
6387
6387
  const partial = {};
6388
- for (const [key, schema13] of Object.entries(this.fields)) {
6389
- partial[key] = "optional" in schema13 && schema13.optional instanceof Function ? schema13.optional() : schema13;
6388
+ for (const [key, schema14] of Object.entries(this.fields)) {
6389
+ partial[key] = "optional" in schema14 && schema14.optional instanceof Function ? schema14.optional() : schema14;
6390
6390
  }
6391
6391
  return this.setFields(partial);
6392
6392
  }
@@ -6588,22 +6588,22 @@ var ArraySchema = class extends Schema {
6588
6588
  json() {
6589
6589
  return this.transform(parseJson);
6590
6590
  }
6591
- concat(schema13) {
6592
- let next = super.concat(schema13);
6591
+ concat(schema14) {
6592
+ let next = super.concat(schema14);
6593
6593
  next.innerType = this.innerType;
6594
- if (schema13.innerType)
6594
+ if (schema14.innerType)
6595
6595
  next.innerType = next.innerType ? (
6596
6596
  // @ts-expect-error Lazy doesn't have concat and will break
6597
- next.innerType.concat(schema13.innerType)
6598
- ) : schema13.innerType;
6597
+ next.innerType.concat(schema14.innerType)
6598
+ ) : schema14.innerType;
6599
6599
  return next;
6600
6600
  }
6601
- of(schema13) {
6601
+ of(schema14) {
6602
6602
  let next = this.clone();
6603
- if (!isSchema(schema13)) throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema13));
6604
- next.innerType = schema13;
6603
+ if (!isSchema(schema14)) throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema14));
6604
+ next.innerType = schema14;
6605
6605
  next.spec = Object.assign({}, next.spec, {
6606
- types: schema13
6606
+ types: schema14
6607
6607
  });
6608
6608
  return next;
6609
6609
  }
@@ -6751,7 +6751,7 @@ var TupleSchema = class extends Schema {
6751
6751
  describe(options) {
6752
6752
  const next = (options ? this.resolve(options) : this).clone();
6753
6753
  const base = super.describe(options);
6754
- base.innerType = next.spec.types.map((schema13, index) => {
6754
+ base.innerType = next.spec.types.map((schema14, index) => {
6755
6755
  var _innerOptions;
6756
6756
  let innerOptions = options;
6757
6757
  if ((_innerOptions = innerOptions) != null && _innerOptions.value) {
@@ -6760,7 +6760,7 @@ var TupleSchema = class extends Schema {
6760
6760
  value: innerOptions.value[index]
6761
6761
  });
6762
6762
  }
6763
- return schema13.describe(innerOptions);
6763
+ return schema14.describe(innerOptions);
6764
6764
  });
6765
6765
  return base;
6766
6766
  }
@@ -6809,6 +6809,7 @@ var EnumFoodFlavor = /* @__PURE__ */ ((EnumFoodFlavor3) => {
6809
6809
  EnumFoodFlavor3["SAVOURY"] = "Savoury";
6810
6810
  EnumFoodFlavor3["SPICY"] = "Spicy";
6811
6811
  EnumFoodFlavor3["SWEET"] = "Sweet";
6812
+ EnumFoodFlavor3["OTHER"] = "Other";
6812
6813
  return EnumFoodFlavor3;
6813
6814
  })(EnumFoodFlavor || {});
6814
6815
  var EnumResourceType = /* @__PURE__ */ ((EnumResourceType22) => {
@@ -10165,7 +10166,7 @@ var socialMediaSchema = create$3({
10165
10166
  is: (name) => !!name,
10166
10167
  // If name has a value
10167
10168
  then: () => normalizedUrlTransform().required("Link is required when name is set").url("Link must be a valid URL").label("Social Media Link"),
10168
- otherwise: (schema13) => schema13.notRequired()
10169
+ otherwise: (schema14) => schema14.notRequired()
10169
10170
  })
10170
10171
  });
10171
10172
  var globalResourceSchema = create$3().shape({
@@ -10238,21 +10239,21 @@ var paymentInfoSchema = create$3({
10238
10239
  paymentMethod: create$8().oneOf(Object.values(EnumPaymentMethod)).required("Please select a Payment method"),
10239
10240
  accountHolderName: create$6().when("paymentMethod", {
10240
10241
  is: "bank_transfer",
10241
- then: (schema13) => schema13.required("Account holder name is required for bank transfer").trim(),
10242
- otherwise: (schema13) => schema13.notRequired()
10242
+ then: (schema14) => schema14.required("Account holder name is required for bank transfer").trim(),
10243
+ otherwise: (schema14) => schema14.notRequired()
10243
10244
  }),
10244
10245
  accountNumber: create$6().when("paymentMethod", {
10245
10246
  is: "bank_transfer",
10246
- then: (schema13) => schema13.required("Account number is required for bank transfer").matches(
10247
+ then: (schema14) => schema14.required("Account number is required for bank transfer").matches(
10247
10248
  nzBankAccountRegex,
10248
10249
  "Account number must be in format: XX-XXXX-XXXXXXX-XX"
10249
10250
  ).trim(),
10250
- otherwise: (schema13) => schema13.notRequired()
10251
+ otherwise: (schema14) => schema14.notRequired()
10251
10252
  }),
10252
10253
  link: create$6().when("paymentMethod", {
10253
- is: (val) => val !== "bank_transfer",
10254
+ is: (val) => val === "paypal" || val === "stripe",
10254
10255
  then: () => normalizedUrlTransform().url("Link must be a valid URL").required("Link is required for PayPal/Stripe"),
10255
- otherwise: (schema13) => schema13.notRequired()
10256
+ otherwise: (schema14) => schema14.notRequired()
10256
10257
  })
10257
10258
  });
10258
10259
  var eventInfoSchema = create$3().shape({
@@ -10365,8 +10366,8 @@ var userSchema = create$3().shape({
10365
10366
  confirmPassword: create$6().nullable().trim().label("Confirm Password").when("password", {
10366
10367
  is: (val) => !!val,
10367
10368
  // only necessary if password typed
10368
- then: (schema13) => schema13.required("Confirm Password is required").oneOf([create$9("password")], "Passwords must match"),
10369
- otherwise: (schema13) => schema13.notRequired()
10369
+ then: (schema14) => schema14.required("Confirm Password is required").oneOf([create$9("password")], "Passwords must match"),
10370
+ otherwise: (schema14) => schema14.notRequired()
10370
10371
  }),
10371
10372
  role: create$8().oneOf(Object.values(EnumUserRole)).required("Role is required")
10372
10373
  });
@@ -10484,8 +10485,8 @@ var testerSchema = create$3().shape({
10484
10485
  email: emailRequiredSchema,
10485
10486
  event: create$3().when("resourceType", {
10486
10487
  is: (resourceType) => resourceType === "event",
10487
- otherwise: (schema13) => schema13.nullable().optional(),
10488
- then: (schema13) => schema13.required("Event information is required").shape(testerEventSchema.fields)
10488
+ otherwise: (schema14) => schema14.nullable().optional(),
10489
+ then: (schema14) => schema14.required("Event information is required").shape(testerEventSchema.fields)
10489
10490
  }),
10490
10491
  firstName: create$6().required("First name is required"),
10491
10492
  lastName: create$6().required("Last name is required"),
@@ -10503,8 +10504,8 @@ var testerSchema = create$3().shape({
10503
10504
  ).required("Resource Type is required"),
10504
10505
  vendor: create$3().when("resourceType", {
10505
10506
  is: (resourceType) => resourceType === "vendor",
10506
- otherwise: (schema13) => schema13.nullable().optional(),
10507
- then: (schema13) => schema13.required("Vendor information is required").shape(testerVendorSchema.fields)
10507
+ otherwise: (schema14) => schema14.nullable().optional(),
10508
+ then: (schema14) => schema14.required("Vendor information is required").shape(testerVendorSchema.fields)
10508
10509
  })
10509
10510
  });
10510
10511
  var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn2) => {
@@ -10542,7 +10543,7 @@ var adSchema = create$3().shape({
10542
10543
  return endDate > now;
10543
10544
  }).when("start", {
10544
10545
  is: (val) => val && val.length > 0,
10545
- then: (schema13) => schema13.test(
10546
+ then: (schema14) => schema14.test(
10546
10547
  "is-after-start",
10547
10548
  "End date must be after start date",
10548
10549
  function(value) {
@@ -11157,10 +11158,60 @@ ChatSchema.index({
11157
11158
  });
11158
11159
  var ChatModel = mongoose5.models.Chat || mongoose5.model("Chat", ChatSchema);
11159
11160
 
11160
- // src/mongoose/Notification.ts
11161
+ // src/mongoose/GoogleImportedMarket.ts
11161
11162
  import mongoose6 from "mongoose";
11162
11163
  var MongooseSchema6 = mongoose6.Schema;
11164
+ var locationSchema2 = new MongooseSchema6(
11165
+ {
11166
+ lat: { required: true, type: Number },
11167
+ lng: { required: true, type: Number }
11168
+ },
11169
+ { _id: false }
11170
+ // Prevents Mongoose from creating an additional _id field for subdocuments
11171
+ );
11163
11172
  var schema3 = new MongooseSchema6(
11173
+ {
11174
+ address: { required: true, type: String },
11175
+ businessStatus: { required: false, type: String },
11176
+ claimed: { default: false, required: true, type: Boolean },
11177
+ googleMapsUrl: { required: false, type: String },
11178
+ googlePlaceId: {
11179
+ required: true,
11180
+ type: String,
11181
+ unique: true
11182
+ // unique, indexed
11183
+ },
11184
+ image: { required: false, type: String },
11185
+ // photo_reference only
11186
+ importedAt: { default: () => /* @__PURE__ */ new Date(), required: true, type: Date },
11187
+ location: {
11188
+ required: false,
11189
+ // optional because lat/lng may expire after 30 days
11190
+ type: locationSchema2
11191
+ },
11192
+ name: { required: true, type: String },
11193
+ openingHours: { required: false, type: [String] },
11194
+ phone: { required: false, type: String },
11195
+ photos: { required: false, type: [String] },
11196
+ // array of photo_reference
11197
+ rating: { required: false, type: Number },
11198
+ reviewCount: { required: false, type: Number },
11199
+ slug: { required: true, type: String },
11200
+ website: { required: false, type: String }
11201
+ },
11202
+ { timestamps: true }
11203
+ );
11204
+ schema3.index({ googlePlaceId: 1 });
11205
+ schema3.index({ name: 1 });
11206
+ schema3.index({ slug: 1 });
11207
+ schema3.index({ address: 1 });
11208
+ schema3.index({ "location.lat": 1, "location.lng": 1 });
11209
+ var GoogleImportedMarketModel = mongoose6.models.GoogleImportedMarket || mongoose6.model("GoogleImportedMarket", schema3);
11210
+
11211
+ // src/mongoose/Notification.ts
11212
+ import mongoose7 from "mongoose";
11213
+ var MongooseSchema7 = mongoose7.Schema;
11214
+ var schema4 = new MongooseSchema7(
11164
11215
  {
11165
11216
  data: {
11166
11217
  resourceId: { required: true, type: String },
@@ -11183,16 +11234,16 @@ var schema3 = new MongooseSchema6(
11183
11234
  userId: {
11184
11235
  ref: "User",
11185
11236
  required: true,
11186
- type: mongoose6.Schema.Types.ObjectId
11237
+ type: mongoose7.Schema.Types.ObjectId
11187
11238
  }
11188
11239
  },
11189
11240
  { timestamps: true }
11190
11241
  );
11191
- schema3.index({ isRead: 1, userId: 1 });
11192
- schema3.index({ createdAt: -1, userId: 1 });
11193
- var NotificationModel = mongoose6.models.Notification || mongoose6.model("Notification", schema3);
11242
+ schema4.index({ isRead: 1, userId: 1 });
11243
+ schema4.index({ createdAt: -1, userId: 1 });
11244
+ var NotificationModel = mongoose7.models.Notification || mongoose7.model("Notification", schema4);
11194
11245
 
11195
- // node_modules/@timardex/cluemart-shared/dist/chunk-IXPWY6CU.mjs
11246
+ // node_modules/@timardex/cluemart-shared/dist/chunk-OBQRGWV3.mjs
11196
11247
  var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
11197
11248
  EnumOSPlatform22["ANDROID"] = "android";
11198
11249
  EnumOSPlatform22["IOS"] = "ios";
@@ -11201,9 +11252,9 @@ var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
11201
11252
  })(EnumOSPlatform2 || {});
11202
11253
 
11203
11254
  // src/mongoose/PushToken.ts
11204
- import mongoose7 from "mongoose";
11205
- var MongooseSchema7 = mongoose7.Schema;
11206
- var schema4 = new MongooseSchema7(
11255
+ import mongoose8 from "mongoose";
11256
+ var MongooseSchema8 = mongoose8.Schema;
11257
+ var schema5 = new MongooseSchema8(
11207
11258
  {
11208
11259
  platform: {
11209
11260
  enum: Object.values(EnumOSPlatform2),
@@ -11211,16 +11262,16 @@ var schema4 = new MongooseSchema7(
11211
11262
  type: String
11212
11263
  },
11213
11264
  token: { required: true, type: String },
11214
- userId: { required: true, type: mongoose7.Schema.Types.ObjectId }
11265
+ userId: { required: true, type: mongoose8.Schema.Types.ObjectId }
11215
11266
  },
11216
11267
  { timestamps: true }
11217
11268
  );
11218
- var PushTokenModel = mongoose7.models.PushToken || mongoose7.model("PushToken", schema4);
11269
+ var PushTokenModel = mongoose8.models.PushToken || mongoose8.model("PushToken", schema5);
11219
11270
 
11220
11271
  // src/mongoose/ResourceActivity.ts
11221
- import mongoose8 from "mongoose";
11222
- var MongooseSchema8 = mongoose8.Schema;
11223
- var ActivitySchema = new MongooseSchema8(
11272
+ import mongoose9 from "mongoose";
11273
+ var MongooseSchema9 = mongoose9.Schema;
11274
+ var ActivitySchema = new MongooseSchema9(
11224
11275
  {
11225
11276
  activityType: {
11226
11277
  enum: Object.values(EnumActivity),
@@ -11256,7 +11307,7 @@ var ActivitySchema = new MongooseSchema8(
11256
11307
  },
11257
11308
  { _id: false }
11258
11309
  );
11259
- var schema5 = new MongooseSchema8(
11310
+ var schema6 = new MongooseSchema9(
11260
11311
  {
11261
11312
  activity: { default: [], type: [ActivitySchema] },
11262
11313
  resourceId: { required: true, type: String },
@@ -11268,14 +11319,14 @@ var schema5 = new MongooseSchema8(
11268
11319
  },
11269
11320
  { timestamps: true }
11270
11321
  );
11271
- schema5.index({ resourceId: 1, resourceType: 1 }, { unique: true });
11272
- schema5.index({ "views.location": "2dsphere" });
11273
- var ResourceActivityModel = mongoose8.models.ResourceActivity || mongoose8.model("ResourceActivity", schema5);
11322
+ schema6.index({ resourceId: 1, resourceType: 1 }, { unique: true });
11323
+ schema6.index({ "views.location": "2dsphere" });
11324
+ var ResourceActivityModel = mongoose9.models.ResourceActivity || mongoose9.model("ResourceActivity", schema6);
11274
11325
 
11275
11326
  // src/mongoose/Tester.ts
11276
- import mongoose9 from "mongoose";
11277
- var MongooseSchema9 = mongoose9.Schema;
11278
- var TesterVendorQuestionarySchema = new MongooseSchema9(
11327
+ import mongoose10 from "mongoose";
11328
+ var MongooseSchema10 = mongoose10.Schema;
11329
+ var TesterVendorQuestionarySchema = new MongooseSchema10(
11279
11330
  {
11280
11331
  appearInVideoIntroduction: {
11281
11332
  default: false,
@@ -11302,7 +11353,7 @@ var TesterVendorQuestionarySchema = new MongooseSchema9(
11302
11353
  },
11303
11354
  { _id: false }
11304
11355
  );
11305
- var TesterVendorSchema = new MongooseSchema9(
11356
+ var TesterVendorSchema = new MongooseSchema10(
11306
11357
  {
11307
11358
  categories: { required: true, type: [CategorySchema] },
11308
11359
  marketsAttended: {
@@ -11328,7 +11379,7 @@ var TesterVendorSchema = new MongooseSchema9(
11328
11379
  },
11329
11380
  { _id: false }
11330
11381
  );
11331
- var TesterEventQuestionarySchema = new MongooseSchema9(
11382
+ var TesterEventQuestionarySchema = new MongooseSchema10(
11332
11383
  {
11333
11384
  allowMarketingAppearance: {
11334
11385
  default: false,
@@ -11363,7 +11414,7 @@ var TesterEventQuestionarySchema = new MongooseSchema9(
11363
11414
  },
11364
11415
  { _id: false }
11365
11416
  );
11366
- var TesterEventsSchema = new MongooseSchema9(
11417
+ var TesterEventsSchema = new MongooseSchema10(
11367
11418
  {
11368
11419
  markets: {
11369
11420
  required: true,
@@ -11392,7 +11443,7 @@ var TesterEventsSchema = new MongooseSchema9(
11392
11443
  },
11393
11444
  { _id: false }
11394
11445
  );
11395
- var TesterSchema = new MongooseSchema9(
11446
+ var TesterSchema = new MongooseSchema10(
11396
11447
  {
11397
11448
  active: { default: false, required: true, type: Boolean },
11398
11449
  approved: { default: false, required: true, type: Boolean },
@@ -11426,43 +11477,43 @@ var TesterSchema = new MongooseSchema9(
11426
11477
  timestamps: true
11427
11478
  }
11428
11479
  );
11429
- var TesterModel = mongoose9.models.Tester || mongoose9.model("Tester", TesterSchema);
11480
+ var TesterModel = mongoose10.models.Tester || mongoose10.model("Tester", TesterSchema);
11430
11481
 
11431
11482
  // src/mongoose/User.ts
11432
- import mongoose10 from "mongoose";
11433
- var MongooseSchema10 = mongoose10.Schema;
11434
- var userActivityEventSchema = new MongooseSchema10(
11483
+ import mongoose11 from "mongoose";
11484
+ var MongooseSchema11 = mongoose11.Schema;
11485
+ var userActivityEventSchema = new MongooseSchema11(
11435
11486
  {
11436
11487
  dateTime: dateTimeSchema3,
11437
11488
  resourceId: {
11438
11489
  ref: "Event",
11439
11490
  required: false,
11440
- type: mongoose10.Schema.Types.ObjectId
11491
+ type: mongoose11.Schema.Types.ObjectId
11441
11492
  }
11442
11493
  },
11443
11494
  { _id: false }
11444
11495
  );
11445
- var userActivityFavouritesSchema = new MongooseSchema10(
11496
+ var userActivityFavouritesSchema = new MongooseSchema11(
11446
11497
  {
11447
11498
  events: {
11448
11499
  ref: "Event",
11449
11500
  required: false,
11450
- type: [mongoose10.Schema.Types.ObjectId]
11501
+ type: [mongoose11.Schema.Types.ObjectId]
11451
11502
  },
11452
11503
  partners: {
11453
11504
  ref: "Partner",
11454
11505
  required: false,
11455
- type: [mongoose10.Schema.Types.ObjectId]
11506
+ type: [mongoose11.Schema.Types.ObjectId]
11456
11507
  },
11457
11508
  vendors: {
11458
11509
  ref: "Vendor",
11459
11510
  required: false,
11460
- type: [mongoose10.Schema.Types.ObjectId]
11511
+ type: [mongoose11.Schema.Types.ObjectId]
11461
11512
  }
11462
11513
  },
11463
11514
  { _id: false }
11464
11515
  );
11465
- var stripeSchema = new MongooseSchema10(
11516
+ var stripeSchema = new MongooseSchema11(
11466
11517
  {
11467
11518
  currentPlan: {
11468
11519
  enum: Object.values(EnumUserLicence),
@@ -11493,7 +11544,7 @@ var stripeSchema = new MongooseSchema10(
11493
11544
  },
11494
11545
  { _id: false }
11495
11546
  );
11496
- var schema6 = new MongooseSchema10(
11547
+ var schema7 = new MongooseSchema11(
11497
11548
  {
11498
11549
  active: { default: false, required: true, type: Boolean },
11499
11550
  associates: {
@@ -11509,7 +11560,7 @@ var schema6 = new MongooseSchema10(
11509
11560
  events: {
11510
11561
  ref: "Event",
11511
11562
  required: false,
11512
- type: [mongoose10.Schema.Types.ObjectId]
11563
+ type: [mongoose11.Schema.Types.ObjectId]
11513
11564
  },
11514
11565
  firstName: { required: true, type: String },
11515
11566
  isTester: { default: false, required: true, type: Boolean },
@@ -11521,7 +11572,7 @@ var schema6 = new MongooseSchema10(
11521
11572
  partner: {
11522
11573
  ref: "Partner",
11523
11574
  required: false,
11524
- type: mongoose10.Schema.Types.ObjectId
11575
+ type: mongoose11.Schema.Types.ObjectId
11525
11576
  },
11526
11577
  password: { required: true, type: String },
11527
11578
  platform: {
@@ -11566,20 +11617,20 @@ var schema6 = new MongooseSchema10(
11566
11617
  vendor: {
11567
11618
  ref: "Vendor",
11568
11619
  required: false,
11569
- type: mongoose10.Schema.Types.ObjectId
11620
+ type: mongoose11.Schema.Types.ObjectId
11570
11621
  }
11571
11622
  },
11572
11623
  { strict: false, timestamps: true }
11573
11624
  );
11574
- schema6.index({ "associates.email": 1 });
11575
- schema6.index({ "licences.expiryDate": 1 });
11576
- schema6.index({ "licences.licenceType": 1 });
11577
- var UserModel = mongoose10.models.User || mongoose10.model("User", schema6);
11625
+ schema7.index({ "associates.email": 1 });
11626
+ schema7.index({ "licences.expiryDate": 1 });
11627
+ schema7.index({ "licences.licenceType": 1 });
11628
+ var UserModel = mongoose11.models.User || mongoose11.model("User", schema7);
11578
11629
 
11579
11630
  // src/mongoose/VerificationToken.ts
11580
- import mongoose11 from "mongoose";
11581
- var MongooseSchema11 = mongoose11.Schema;
11582
- var schema7 = new MongooseSchema11(
11631
+ import mongoose12 from "mongoose";
11632
+ var MongooseSchema12 = mongoose12.Schema;
11633
+ var schema8 = new MongooseSchema12(
11583
11634
  {
11584
11635
  createdAt: {
11585
11636
  default: Date.now,
@@ -11594,12 +11645,12 @@ var schema7 = new MongooseSchema11(
11594
11645
  },
11595
11646
  { timestamps: true }
11596
11647
  );
11597
- var VerificationTokenModel = mongoose11.models.VerificationToken || mongoose11.model("VerificationToken", schema7);
11648
+ var VerificationTokenModel = mongoose12.models.VerificationToken || mongoose12.model("VerificationToken", schema8);
11598
11649
 
11599
11650
  // src/mongoose/vendor/Vendor.ts
11600
- import mongoose12 from "mongoose";
11601
- var MongooseSchema12 = mongoose12.Schema;
11602
- var MenuTypeSchema = new MongooseSchema12(
11651
+ import mongoose13 from "mongoose";
11652
+ var MongooseSchema13 = mongoose13.Schema;
11653
+ var MenuTypeSchema = new MongooseSchema13(
11603
11654
  {
11604
11655
  description: { required: false, type: String },
11605
11656
  name: { required: false, type: String },
@@ -11609,7 +11660,7 @@ var MenuTypeSchema = new MongooseSchema12(
11609
11660
  { _id: false }
11610
11661
  // Prevents Mongoose from creating an additional _id field for subdocuments
11611
11662
  );
11612
- var LocationsSchema = new MongooseSchema12(
11663
+ var LocationsSchema = new MongooseSchema13(
11613
11664
  {
11614
11665
  dateTime: {
11615
11666
  dateStatus: {
@@ -11642,7 +11693,7 @@ var LocationsSchema = new MongooseSchema12(
11642
11693
  { _id: false }
11643
11694
  // Prevents Mongoose from creating an additional _id field for subdocuments
11644
11695
  );
11645
- var schema8 = new MongooseSchema12(
11696
+ var schema9 = new MongooseSchema13(
11646
11697
  {
11647
11698
  ...baseResourceFields,
11648
11699
  // Importing base resource fields from global.ts
@@ -11664,7 +11715,7 @@ var schema8 = new MongooseSchema12(
11664
11715
  vendorInfoId: {
11665
11716
  ref: "VendorInfo",
11666
11717
  required: false,
11667
- type: mongoose12.Schema.Types.ObjectId
11718
+ type: mongoose13.Schema.Types.ObjectId
11668
11719
  },
11669
11720
  vendorType: {
11670
11721
  enum: Object.values(EnumVendorType),
@@ -11674,24 +11725,24 @@ var schema8 = new MongooseSchema12(
11674
11725
  },
11675
11726
  { timestamps: true }
11676
11727
  );
11677
- schema8.index({ name: 1 });
11678
- schema8.index({ description: 1 });
11679
- schema8.index({ region: 1 });
11680
- schema8.index({ "categories.name": 1 });
11681
- schema8.index({ "associates.email": 1 });
11682
- var VendorModel = mongoose12.models.Vendor || mongoose12.model("Vendor", schema8);
11728
+ schema9.index({ name: 1 });
11729
+ schema9.index({ description: 1 });
11730
+ schema9.index({ region: 1 });
11731
+ schema9.index({ "categories.name": 1 });
11732
+ schema9.index({ "associates.email": 1 });
11733
+ var VendorModel = mongoose13.models.Vendor || mongoose13.model("Vendor", schema9);
11683
11734
 
11684
11735
  // src/mongoose/vendor/VendorInfo.ts
11685
- import mongoose13 from "mongoose";
11686
- var MongooseSchema13 = mongoose13.Schema;
11687
- var AttributesSchema = new MongooseSchema13(
11736
+ import mongoose14 from "mongoose";
11737
+ var MongooseSchema14 = mongoose14.Schema;
11738
+ var AttributesSchema = new MongooseSchema14(
11688
11739
  {
11689
11740
  details: { required: false, type: String },
11690
11741
  isRequired: { default: false, required: true, type: Boolean }
11691
11742
  },
11692
11743
  { _id: false }
11693
11744
  );
11694
- var schema9 = new MongooseSchema13(
11745
+ var schema10 = new MongooseSchema14(
11695
11746
  {
11696
11747
  compliance: {
11697
11748
  foodBeverageLicense: { default: false, required: false, type: Boolean },
@@ -11725,17 +11776,17 @@ var schema9 = new MongooseSchema13(
11725
11776
  vendorId: {
11726
11777
  ref: "Vendor",
11727
11778
  required: true,
11728
- type: mongoose13.Schema.Types.ObjectId
11779
+ type: mongoose14.Schema.Types.ObjectId
11729
11780
  }
11730
11781
  },
11731
11782
  { timestamps: true }
11732
11783
  );
11733
- var VendorInfoModel = mongoose13.models.VendorInfo || mongoose13.model("VendorInfo", schema9);
11784
+ var VendorInfoModel = mongoose14.models.VendorInfo || mongoose14.model("VendorInfo", schema10);
11734
11785
 
11735
11786
  // src/mongoose/event/Event.ts
11736
- import mongoose14 from "mongoose";
11737
- var MongooseSchema14 = mongoose14.Schema;
11738
- var locationsSchema = new MongooseSchema14(
11787
+ import mongoose15 from "mongoose";
11788
+ var MongooseSchema15 = mongoose15.Schema;
11789
+ var locationsSchema = new MongooseSchema15(
11739
11790
  {
11740
11791
  city: { required: true, type: String },
11741
11792
  coordinates: {
@@ -11758,7 +11809,7 @@ var locationsSchema = new MongooseSchema14(
11758
11809
  { _id: false }
11759
11810
  // Prevents Mongoose from creating an additional _id field for subdocuments
11760
11811
  );
11761
- var schema10 = new MongooseSchema14(
11812
+ var schema11 = new MongooseSchema15(
11762
11813
  {
11763
11814
  ...baseResourceFields,
11764
11815
  // Importing base resource fields from global.ts
@@ -11766,7 +11817,7 @@ var schema10 = new MongooseSchema14(
11766
11817
  eventInfoId: {
11767
11818
  ref: "EventInfo",
11768
11819
  required: false,
11769
- type: mongoose14.Schema.Types.ObjectId
11820
+ type: mongoose15.Schema.Types.ObjectId
11770
11821
  },
11771
11822
  eventType: {
11772
11823
  enum: Object.values(EnumEventType),
@@ -11789,18 +11840,18 @@ var schema10 = new MongooseSchema14(
11789
11840
  },
11790
11841
  { timestamps: true }
11791
11842
  );
11792
- schema10.index({ name: 1 });
11793
- schema10.index({ description: 1 });
11794
- schema10.index({ region: 1 });
11795
- schema10.index({ location: "2dsphere" });
11796
- schema10.index({ tags: 1 });
11797
- schema10.index({ "associates.email": 1 });
11798
- var EventModel = mongoose14.models.Event || mongoose14.model("Event", schema10);
11843
+ schema11.index({ name: 1 });
11844
+ schema11.index({ description: 1 });
11845
+ schema11.index({ region: 1 });
11846
+ schema11.index({ location: "2dsphere" });
11847
+ schema11.index({ tags: 1 });
11848
+ schema11.index({ "associates.email": 1 });
11849
+ var EventModel = mongoose15.models.Event || mongoose15.model("Event", schema11);
11799
11850
 
11800
11851
  // src/mongoose/Partner.ts
11801
- import mongoose15 from "mongoose";
11802
- var MongooseSchema15 = mongoose15.Schema;
11803
- var schema11 = new MongooseSchema15(
11852
+ import mongoose16 from "mongoose";
11853
+ var MongooseSchema16 = mongoose16.Schema;
11854
+ var schema12 = new MongooseSchema16(
11804
11855
  {
11805
11856
  ...baseResourceFields,
11806
11857
  location: {
@@ -11816,17 +11867,17 @@ var schema11 = new MongooseSchema15(
11816
11867
  },
11817
11868
  { timestamps: true }
11818
11869
  );
11819
- schema11.index({ name: 1 });
11820
- schema11.index({ description: 1 });
11821
- schema11.index({ region: 1 });
11822
- schema11.index({ location: "2dsphere" });
11823
- schema11.index({ "associates.email": 1 });
11824
- var PartnerModel = mongoose15.models.Partner || mongoose15.model("Partner", schema11);
11870
+ schema12.index({ name: 1 });
11871
+ schema12.index({ description: 1 });
11872
+ schema12.index({ region: 1 });
11873
+ schema12.index({ location: "2dsphere" });
11874
+ schema12.index({ "associates.email": 1 });
11875
+ var PartnerModel = mongoose16.models.Partner || mongoose16.model("Partner", schema12);
11825
11876
 
11826
11877
  // src/mongoose/Post.ts
11827
- import mongoose16, { Schema as Schema2 } from "mongoose";
11828
- var MongooseSchema16 = mongoose16.Schema;
11829
- var contentSchema = new MongooseSchema16(
11878
+ import mongoose17, { Schema as Schema2 } from "mongoose";
11879
+ var MongooseSchema17 = mongoose17.Schema;
11880
+ var contentSchema = new MongooseSchema17(
11830
11881
  {
11831
11882
  contentData: Schema2.Types.Mixed,
11832
11883
  contentOrder: { required: true, type: Number },
@@ -11838,7 +11889,7 @@ var contentSchema = new MongooseSchema16(
11838
11889
  },
11839
11890
  { _id: false }
11840
11891
  );
11841
- var schema12 = new MongooseSchema16(
11892
+ var schema13 = new MongooseSchema17(
11842
11893
  {
11843
11894
  active: { default: true, required: true, type: Boolean },
11844
11895
  caption: { required: true, type: String },
@@ -11853,15 +11904,15 @@ var schema12 = new MongooseSchema16(
11853
11904
  },
11854
11905
  { timestamps: true }
11855
11906
  );
11856
- schema12.index({ title: 1 });
11857
- schema12.index({ tags: 1 });
11858
- var PostModel = mongoose16.models.Post || mongoose16.model("Post", schema12);
11907
+ schema13.index({ title: 1 });
11908
+ schema13.index({ tags: 1 });
11909
+ var PostModel = mongoose17.models.Post || mongoose17.model("Post", schema13);
11859
11910
 
11860
11911
  // src/mongoose/AppSetting.ts
11861
- import mongoose17 from "mongoose";
11862
- var MongooseSchema17 = mongoose17.Schema;
11912
+ import mongoose18 from "mongoose";
11913
+ var MongooseSchema18 = mongoose18.Schema;
11863
11914
  var APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
11864
- var AppSettingSchema = new MongooseSchema17(
11915
+ var AppSettingSchema = new MongooseSchema18(
11865
11916
  {
11866
11917
  appVersion: { default: "1.0.1", required: true, type: String },
11867
11918
  key: {
@@ -11876,10 +11927,10 @@ var AppSettingSchema = new MongooseSchema17(
11876
11927
  },
11877
11928
  { timestamps: true }
11878
11929
  );
11879
- var AppSettingModel = mongoose17.models.AppSetting || mongoose17.model("AppSetting", AppSettingSchema);
11930
+ var AppSettingModel = mongoose18.models.AppSetting || mongoose18.model("AppSetting", AppSettingSchema);
11880
11931
 
11881
11932
  // src/service/database.ts
11882
- import mongoose18 from "mongoose";
11933
+ import mongoose19 from "mongoose";
11883
11934
  var connectToDatabase = async ({
11884
11935
  appName,
11885
11936
  dbName,
@@ -11892,7 +11943,7 @@ var connectToDatabase = async ({
11892
11943
  // Fallback to MongoDB Atlas connection string
11893
11944
  `mongodb+srv://${dbUser}:${dbPassword}@${dbName}.mongodb.net/?retryWrites=true&w=majority&appName=${appName}`
11894
11945
  );
11895
- await mongoose18.connect(mongoUri);
11946
+ await mongoose19.connect(mongoUri);
11896
11947
  const connectionType = mongodbUri ? "Local MongoDB" : "MongoDB Atlas";
11897
11948
  console.log(
11898
11949
  `${connectionType} connected from server/src/service/database.ts`
@@ -12071,7 +12122,7 @@ async function updateAdStatuses() {
12071
12122
 
12072
12123
  // src/types/index.ts
12073
12124
  import express from "express";
12074
- import mongoose19 from "mongoose";
12125
+ import mongoose20 from "mongoose";
12075
12126
  var EnumPubSubEvents = /* @__PURE__ */ ((EnumPubSubEvents2) => {
12076
12127
  EnumPubSubEvents2["GET_CHAT_MESSAGE"] = "GET_CHAT_MESSAGE";
12077
12128
  EnumPubSubEvents2["GET_NOTIFICATIONS"] = "GET_NOTIFICATIONS";
@@ -12088,6 +12139,7 @@ export {
12088
12139
  EnumPubSubEvents,
12089
12140
  EventInfoModel,
12090
12141
  EventModel,
12142
+ GoogleImportedMarketModel,
12091
12143
  NotificationModel,
12092
12144
  ParticipantSchema,
12093
12145
  PartnerModel,
@@ -12110,7 +12162,7 @@ export {
12110
12162
  dateTimeSchema3 as dateTimeSchema,
12111
12163
  express,
12112
12164
  locationsSchema,
12113
- mongoose19 as mongoose,
12165
+ mongoose20 as mongoose,
12114
12166
  relationDatesSchema,
12115
12167
  resourceRelationsSchema,
12116
12168
  saveNotificationsInDb,