@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.cjs CHANGED
@@ -1681,6 +1681,7 @@ __export(index_exports, {
1681
1681
  EnumPubSubEvents: () => EnumPubSubEvents,
1682
1682
  EventInfoModel: () => EventInfoModel,
1683
1683
  EventModel: () => EventModel,
1684
+ GoogleImportedMarketModel: () => GoogleImportedMarketModel,
1684
1685
  NotificationModel: () => NotificationModel,
1685
1686
  ParticipantSchema: () => ParticipantSchema,
1686
1687
  PartnerModel: () => PartnerModel,
@@ -1703,7 +1704,7 @@ __export(index_exports, {
1703
1704
  dateTimeSchema: () => dateTimeSchema3,
1704
1705
  express: () => import_express.default,
1705
1706
  locationsSchema: () => locationsSchema,
1706
- mongoose: () => import_mongoose20.default,
1707
+ mongoose: () => import_mongoose21.default,
1707
1708
  relationDatesSchema: () => relationDatesSchema,
1708
1709
  resourceRelationsSchema: () => resourceRelationsSchema,
1709
1710
  saveNotificationsInDb: () => saveNotificationsInDb,
@@ -4727,10 +4728,10 @@ var Condition = class _Condition {
4727
4728
  otherwise
4728
4729
  } = config;
4729
4730
  let check = typeof is === "function" ? is : (...values) => values.every((value) => value === is);
4730
- return new _Condition(refs, (values, schema13) => {
4731
+ return new _Condition(refs, (values, schema14) => {
4731
4732
  var _branch;
4732
4733
  let branch = check(...values) ? then : otherwise;
4733
- return (_branch = branch == null ? void 0 : branch(schema13)) != null ? _branch : schema13;
4734
+ return (_branch = branch == null ? void 0 : branch(schema14)) != null ? _branch : schema14;
4734
4735
  });
4735
4736
  }
4736
4737
  constructor(refs, builder) {
@@ -4744,13 +4745,13 @@ var Condition = class _Condition {
4744
4745
  // TODO: ? operator here?
4745
4746
  ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context)
4746
4747
  ));
4747
- let schema13 = this.fn(values, base, options);
4748
- if (schema13 === void 0 || // @ts-ignore this can be base
4749
- schema13 === base) {
4748
+ let schema14 = this.fn(values, base, options);
4749
+ if (schema14 === void 0 || // @ts-ignore this can be base
4750
+ schema14 === base) {
4750
4751
  return base;
4751
4752
  }
4752
- if (!isSchema(schema13)) throw new TypeError("conditions must return a schema object");
4753
- return schema13.resolve(options);
4753
+ if (!isSchema(schema14)) throw new TypeError("conditions must return a schema object");
4754
+ return schema14.resolve(options);
4754
4755
  }
4755
4756
  };
4756
4757
  var prefixes = {
@@ -4820,7 +4821,7 @@ function createValidation(config) {
4820
4821
  path = "",
4821
4822
  options,
4822
4823
  originalValue,
4823
- schema: schema13
4824
+ schema: schema14
4824
4825
  }, panic, next) {
4825
4826
  const {
4826
4827
  name,
@@ -4832,8 +4833,8 @@ function createValidation(config) {
4832
4833
  let {
4833
4834
  parent,
4834
4835
  context,
4835
- abortEarly = schema13.spec.abortEarly,
4836
- disableStackTrace = schema13.spec.disableStackTrace
4836
+ abortEarly = schema14.spec.abortEarly,
4837
+ disableStackTrace = schema14.spec.disableStackTrace
4837
4838
  } = options;
4838
4839
  const resolveOptions = {
4839
4840
  value,
@@ -4844,9 +4845,9 @@ function createValidation(config) {
4844
4845
  const nextParams = resolveParams(Object.assign({
4845
4846
  value,
4846
4847
  originalValue,
4847
- label: schema13.spec.label,
4848
+ label: schema14.spec.label,
4848
4849
  path: overrides.path || path,
4849
- spec: schema13.spec,
4850
+ spec: schema14.spec,
4850
4851
  disableStackTrace: overrides.disableStackTrace || disableStackTrace
4851
4852
  }, params, overrides.params), resolveOptions);
4852
4853
  const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name, nextParams.disableStackTrace);
@@ -4865,7 +4866,7 @@ function createValidation(config) {
4865
4866
  },
4866
4867
  options,
4867
4868
  originalValue,
4868
- schema: schema13
4869
+ schema: schema14
4869
4870
  };
4870
4871
  const handleResult = (validOrError) => {
4871
4872
  if (ValidationError.isError(validOrError)) invalid(validOrError);
@@ -4909,42 +4910,42 @@ function resolveParams(params, options) {
4909
4910
  function resolveMaybeRef(item, options) {
4910
4911
  return Reference.isRef(item) ? item.getValue(options.value, options.parent, options.context) : item;
4911
4912
  }
4912
- function getIn(schema13, path, value, context = value) {
4913
+ function getIn(schema14, path, value, context = value) {
4913
4914
  let parent, lastPart, lastPartDebug;
4914
4915
  if (!path) return {
4915
4916
  parent,
4916
4917
  parentPath: path,
4917
- schema: schema13
4918
+ schema: schema14
4918
4919
  };
4919
4920
  (0, import_property_expr.forEach)(path, (_part, isBracket, isArray) => {
4920
4921
  let part = isBracket ? _part.slice(1, _part.length - 1) : _part;
4921
- schema13 = schema13.resolve({
4922
+ schema14 = schema14.resolve({
4922
4923
  context,
4923
4924
  parent,
4924
4925
  value
4925
4926
  });
4926
- let isTuple = schema13.type === "tuple";
4927
+ let isTuple = schema14.type === "tuple";
4927
4928
  let idx = isArray ? parseInt(part, 10) : 0;
4928
- if (schema13.innerType || isTuple) {
4929
+ if (schema14.innerType || isTuple) {
4929
4930
  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]"`);
4930
4931
  if (value && idx >= value.length) {
4931
4932
  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. `);
4932
4933
  }
4933
4934
  parent = value;
4934
4935
  value = value && value[idx];
4935
- schema13 = isTuple ? schema13.spec.types[idx] : schema13.innerType;
4936
+ schema14 = isTuple ? schema14.spec.types[idx] : schema14.innerType;
4936
4937
  }
4937
4938
  if (!isArray) {
4938
- 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}")`);
4939
+ 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}")`);
4939
4940
  parent = value;
4940
4941
  value = value && value[part];
4941
- schema13 = schema13.fields[part];
4942
+ schema14 = schema14.fields[part];
4942
4943
  }
4943
4944
  lastPart = part;
4944
4945
  lastPartDebug = isBracket ? "[" + _part + "]" : "." + _part;
4945
4946
  });
4946
4947
  return {
4947
- schema: schema13,
4948
+ schema: schema14,
4948
4949
  parent,
4949
4950
  parentPath: lastPart
4950
4951
  };
@@ -5144,20 +5145,20 @@ var Schema = class {
5144
5145
  this._mutate = before;
5145
5146
  return result;
5146
5147
  }
5147
- concat(schema13) {
5148
- if (!schema13 || schema13 === this) return this;
5149
- if (schema13.type !== this.type && this.type !== "mixed") throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema13.type}`);
5148
+ concat(schema14) {
5149
+ if (!schema14 || schema14 === this) return this;
5150
+ if (schema14.type !== this.type && this.type !== "mixed") throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema14.type}`);
5150
5151
  let base = this;
5151
- let combined = schema13.clone();
5152
+ let combined = schema14.clone();
5152
5153
  const mergedSpec = Object.assign({}, base.spec, combined.spec);
5153
5154
  combined.spec = mergedSpec;
5154
5155
  combined.internalTests = Object.assign({}, base.internalTests, combined.internalTests);
5155
- combined._whitelist = base._whitelist.merge(schema13._whitelist, schema13._blacklist);
5156
- combined._blacklist = base._blacklist.merge(schema13._blacklist, schema13._whitelist);
5156
+ combined._whitelist = base._whitelist.merge(schema14._whitelist, schema14._blacklist);
5157
+ combined._blacklist = base._blacklist.merge(schema14._blacklist, schema14._whitelist);
5157
5158
  combined.tests = base.tests;
5158
5159
  combined.exclusiveTests = base.exclusiveTests;
5159
5160
  combined.withMutation((next) => {
5160
- schema13.tests.forEach((fn) => {
5161
+ schema14.tests.forEach((fn) => {
5161
5162
  next.test(fn.OPTIONS);
5162
5163
  });
5163
5164
  });
@@ -5173,15 +5174,15 @@ var Schema = class {
5173
5174
  return this._typeCheck(v);
5174
5175
  }
5175
5176
  resolve(options) {
5176
- let schema13 = this;
5177
- if (schema13.conditions.length) {
5178
- let conditions = schema13.conditions;
5179
- schema13 = schema13.clone();
5180
- schema13.conditions = [];
5181
- schema13 = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema13);
5182
- schema13 = schema13.resolve(options);
5177
+ let schema14 = this;
5178
+ if (schema14.conditions.length) {
5179
+ let conditions = schema14.conditions;
5180
+ schema14 = schema14.clone();
5181
+ schema14.conditions = [];
5182
+ schema14 = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema14);
5183
+ schema14 = schema14.resolve(options);
5183
5184
  }
5184
- return schema13;
5185
+ return schema14;
5185
5186
  }
5186
5187
  resolveOptions(options) {
5187
5188
  var _options$strict, _options$abortEarly, _options$recursive, _options$disableStack;
@@ -5337,11 +5338,11 @@ attempted value: ${formattedValue}
5337
5338
  }
5338
5339
  validate(value, options) {
5339
5340
  var _options$disableStack2;
5340
- let schema13 = this.resolve(Object.assign({}, options, {
5341
+ let schema14 = this.resolve(Object.assign({}, options, {
5341
5342
  value
5342
5343
  }));
5343
- let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema13.spec.disableStackTrace;
5344
- return new Promise((resolve, reject) => schema13._validate(value, options, (error, parsed) => {
5344
+ let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema14.spec.disableStackTrace;
5345
+ return new Promise((resolve, reject) => schema14._validate(value, options, (error, parsed) => {
5345
5346
  if (ValidationError.isError(error)) error.value = parsed;
5346
5347
  reject(error);
5347
5348
  }, (errors, validated) => {
@@ -5351,12 +5352,12 @@ attempted value: ${formattedValue}
5351
5352
  }
5352
5353
  validateSync(value, options) {
5353
5354
  var _options$disableStack3;
5354
- let schema13 = this.resolve(Object.assign({}, options, {
5355
+ let schema14 = this.resolve(Object.assign({}, options, {
5355
5356
  value
5356
5357
  }));
5357
5358
  let result;
5358
- let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema13.spec.disableStackTrace;
5359
- schema13._validate(value, Object.assign({}, options, {
5359
+ let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema14.spec.disableStackTrace;
5360
+ schema14._validate(value, Object.assign({}, options, {
5360
5361
  sync: true
5361
5362
  }), (error, parsed) => {
5362
5363
  if (ValidationError.isError(error)) error.value = parsed;
@@ -5390,8 +5391,8 @@ attempted value: ${formattedValue}
5390
5391
  return typeof defaultValue === "function" ? defaultValue.call(this, options) : clone(defaultValue);
5391
5392
  }
5392
5393
  getDefault(options) {
5393
- let schema13 = this.resolve(options || {});
5394
- return schema13._getDefault(options);
5394
+ let schema14 = this.resolve(options || {});
5395
+ return schema14._getDefault(options);
5395
5396
  }
5396
5397
  default(def) {
5397
5398
  if (arguments.length === 0) {
@@ -5624,13 +5625,13 @@ attempted value: ${formattedValue}
5624
5625
  return description;
5625
5626
  }
5626
5627
  get ["~standard"]() {
5627
- const schema13 = this;
5628
+ const schema14 = this;
5628
5629
  const standard = {
5629
5630
  version: 1,
5630
5631
  vendor: "yup",
5631
5632
  async validate(value) {
5632
5633
  try {
5633
- const result = await schema13.validate(value, {
5634
+ const result = await schema14.validate(value, {
5634
5635
  abortEarly: false
5635
5636
  });
5636
5637
  return {
@@ -5654,9 +5655,9 @@ for (const method of ["validate", "validateSync"]) Schema.prototype[`${method}At
5654
5655
  const {
5655
5656
  parent,
5656
5657
  parentPath,
5657
- schema: schema13
5658
+ schema: schema14
5658
5659
  } = getIn(this, path, value, options.context);
5659
- return schema13[method](parent && parent[parentPath], Object.assign({}, options, {
5660
+ return schema14[method](parent && parent[parentPath], Object.assign({}, options, {
5660
5661
  parent,
5661
5662
  path
5662
5663
  }));
@@ -5830,7 +5831,7 @@ var StringSchema = class extends Schema {
5830
5831
  });
5831
5832
  }
5832
5833
  required(message) {
5833
- return super.required(message).withMutation((schema13) => schema13.test({
5834
+ return super.required(message).withMutation((schema14) => schema14.test({
5834
5835
  message: message || mixed.required,
5835
5836
  name: "required",
5836
5837
  skipAbsent: true,
@@ -5838,9 +5839,9 @@ var StringSchema = class extends Schema {
5838
5839
  }));
5839
5840
  }
5840
5841
  notRequired() {
5841
- return super.notRequired().withMutation((schema13) => {
5842
- schema13.tests = schema13.tests.filter((t) => t.OPTIONS.name !== "required");
5843
- return schema13;
5842
+ return super.notRequired().withMutation((schema14) => {
5843
+ schema14.tests = schema14.tests.filter((t) => t.OPTIONS.name !== "required");
5844
+ return schema14;
5844
5845
  });
5845
5846
  }
5846
5847
  length(length, message = string.length) {
@@ -6218,7 +6219,7 @@ function sortByKeyOrder(keys) {
6218
6219
  return findIndex(keys, a) - findIndex(keys, b);
6219
6220
  };
6220
6221
  }
6221
- var parseJson = (value, _, schema13) => {
6222
+ var parseJson = (value, _, schema14) => {
6222
6223
  if (typeof value !== "string") {
6223
6224
  return value;
6224
6225
  }
@@ -6227,30 +6228,30 @@ var parseJson = (value, _, schema13) => {
6227
6228
  parsed = JSON.parse(value);
6228
6229
  } catch (err) {
6229
6230
  }
6230
- return schema13.isType(parsed) ? parsed : value;
6231
+ return schema14.isType(parsed) ? parsed : value;
6231
6232
  };
6232
- function deepPartial(schema13) {
6233
- if ("fields" in schema13) {
6233
+ function deepPartial(schema14) {
6234
+ if ("fields" in schema14) {
6234
6235
  const partial = {};
6235
- for (const [key, fieldSchema] of Object.entries(schema13.fields)) {
6236
+ for (const [key, fieldSchema] of Object.entries(schema14.fields)) {
6236
6237
  partial[key] = deepPartial(fieldSchema);
6237
6238
  }
6238
- return schema13.setFields(partial);
6239
+ return schema14.setFields(partial);
6239
6240
  }
6240
- if (schema13.type === "array") {
6241
- const nextArray = schema13.optional();
6241
+ if (schema14.type === "array") {
6242
+ const nextArray = schema14.optional();
6242
6243
  if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);
6243
6244
  return nextArray;
6244
6245
  }
6245
- if (schema13.type === "tuple") {
6246
- return schema13.optional().clone({
6247
- types: schema13.spec.types.map(deepPartial)
6246
+ if (schema14.type === "tuple") {
6247
+ return schema14.optional().clone({
6248
+ types: schema14.spec.types.map(deepPartial)
6248
6249
  });
6249
6250
  }
6250
- if ("optional" in schema13) {
6251
- return schema13.optional();
6251
+ if ("optional" in schema14) {
6252
+ return schema14.optional();
6252
6253
  }
6253
- return schema13;
6254
+ return schema14;
6254
6255
  }
6255
6256
  var deepHas = (obj, p) => {
6256
6257
  const path = [...(0, import_property_expr.normalizePath)(p)];
@@ -6381,8 +6382,8 @@ var ObjectSchema = class extends Schema {
6381
6382
  next._sortErrors = this._sortErrors;
6382
6383
  return next;
6383
6384
  }
6384
- concat(schema13) {
6385
- let next = super.concat(schema13);
6385
+ concat(schema14) {
6386
+ let next = super.concat(schema14);
6386
6387
  let nextFields = next.fields;
6387
6388
  for (let [field, schemaOrRef] of Object.entries(this.fields)) {
6388
6389
  const target = nextFields[field];
@@ -6390,7 +6391,7 @@ var ObjectSchema = class extends Schema {
6390
6391
  }
6391
6392
  return next.withMutation((s2) => (
6392
6393
  // XXX: excludes here is wrong
6393
- s2.setFields(nextFields, [...this._excludedEdges, ...schema13._excludedEdges])
6394
+ s2.setFields(nextFields, [...this._excludedEdges, ...schema14._excludedEdges])
6394
6395
  ));
6395
6396
  }
6396
6397
  _getDefault(options) {
@@ -6435,8 +6436,8 @@ var ObjectSchema = class extends Schema {
6435
6436
  }
6436
6437
  partial() {
6437
6438
  const partial = {};
6438
- for (const [key, schema13] of Object.entries(this.fields)) {
6439
- partial[key] = "optional" in schema13 && schema13.optional instanceof Function ? schema13.optional() : schema13;
6439
+ for (const [key, schema14] of Object.entries(this.fields)) {
6440
+ partial[key] = "optional" in schema14 && schema14.optional instanceof Function ? schema14.optional() : schema14;
6440
6441
  }
6441
6442
  return this.setFields(partial);
6442
6443
  }
@@ -6638,22 +6639,22 @@ var ArraySchema = class extends Schema {
6638
6639
  json() {
6639
6640
  return this.transform(parseJson);
6640
6641
  }
6641
- concat(schema13) {
6642
- let next = super.concat(schema13);
6642
+ concat(schema14) {
6643
+ let next = super.concat(schema14);
6643
6644
  next.innerType = this.innerType;
6644
- if (schema13.innerType)
6645
+ if (schema14.innerType)
6645
6646
  next.innerType = next.innerType ? (
6646
6647
  // @ts-expect-error Lazy doesn't have concat and will break
6647
- next.innerType.concat(schema13.innerType)
6648
- ) : schema13.innerType;
6648
+ next.innerType.concat(schema14.innerType)
6649
+ ) : schema14.innerType;
6649
6650
  return next;
6650
6651
  }
6651
- of(schema13) {
6652
+ of(schema14) {
6652
6653
  let next = this.clone();
6653
- if (!isSchema(schema13)) throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema13));
6654
- next.innerType = schema13;
6654
+ if (!isSchema(schema14)) throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema14));
6655
+ next.innerType = schema14;
6655
6656
  next.spec = Object.assign({}, next.spec, {
6656
- types: schema13
6657
+ types: schema14
6657
6658
  });
6658
6659
  return next;
6659
6660
  }
@@ -6801,7 +6802,7 @@ var TupleSchema = class extends Schema {
6801
6802
  describe(options) {
6802
6803
  const next = (options ? this.resolve(options) : this).clone();
6803
6804
  const base = super.describe(options);
6804
- base.innerType = next.spec.types.map((schema13, index) => {
6805
+ base.innerType = next.spec.types.map((schema14, index) => {
6805
6806
  var _innerOptions;
6806
6807
  let innerOptions = options;
6807
6808
  if ((_innerOptions = innerOptions) != null && _innerOptions.value) {
@@ -6810,7 +6811,7 @@ var TupleSchema = class extends Schema {
6810
6811
  value: innerOptions.value[index]
6811
6812
  });
6812
6813
  }
6813
- return schema13.describe(innerOptions);
6814
+ return schema14.describe(innerOptions);
6814
6815
  });
6815
6816
  return base;
6816
6817
  }
@@ -6859,6 +6860,7 @@ var EnumFoodFlavor = /* @__PURE__ */ ((EnumFoodFlavor3) => {
6859
6860
  EnumFoodFlavor3["SAVOURY"] = "Savoury";
6860
6861
  EnumFoodFlavor3["SPICY"] = "Spicy";
6861
6862
  EnumFoodFlavor3["SWEET"] = "Sweet";
6863
+ EnumFoodFlavor3["OTHER"] = "Other";
6862
6864
  return EnumFoodFlavor3;
6863
6865
  })(EnumFoodFlavor || {});
6864
6866
  var EnumResourceType = /* @__PURE__ */ ((EnumResourceType22) => {
@@ -10215,7 +10217,7 @@ var socialMediaSchema = create$3({
10215
10217
  is: (name) => !!name,
10216
10218
  // If name has a value
10217
10219
  then: () => normalizedUrlTransform().required("Link is required when name is set").url("Link must be a valid URL").label("Social Media Link"),
10218
- otherwise: (schema13) => schema13.notRequired()
10220
+ otherwise: (schema14) => schema14.notRequired()
10219
10221
  })
10220
10222
  });
10221
10223
  var globalResourceSchema = create$3().shape({
@@ -10288,21 +10290,21 @@ var paymentInfoSchema = create$3({
10288
10290
  paymentMethod: create$8().oneOf(Object.values(EnumPaymentMethod)).required("Please select a Payment method"),
10289
10291
  accountHolderName: create$6().when("paymentMethod", {
10290
10292
  is: "bank_transfer",
10291
- then: (schema13) => schema13.required("Account holder name is required for bank transfer").trim(),
10292
- otherwise: (schema13) => schema13.notRequired()
10293
+ then: (schema14) => schema14.required("Account holder name is required for bank transfer").trim(),
10294
+ otherwise: (schema14) => schema14.notRequired()
10293
10295
  }),
10294
10296
  accountNumber: create$6().when("paymentMethod", {
10295
10297
  is: "bank_transfer",
10296
- then: (schema13) => schema13.required("Account number is required for bank transfer").matches(
10298
+ then: (schema14) => schema14.required("Account number is required for bank transfer").matches(
10297
10299
  nzBankAccountRegex,
10298
10300
  "Account number must be in format: XX-XXXX-XXXXXXX-XX"
10299
10301
  ).trim(),
10300
- otherwise: (schema13) => schema13.notRequired()
10302
+ otherwise: (schema14) => schema14.notRequired()
10301
10303
  }),
10302
10304
  link: create$6().when("paymentMethod", {
10303
- is: (val) => val !== "bank_transfer",
10305
+ is: (val) => val === "paypal" || val === "stripe",
10304
10306
  then: () => normalizedUrlTransform().url("Link must be a valid URL").required("Link is required for PayPal/Stripe"),
10305
- otherwise: (schema13) => schema13.notRequired()
10307
+ otherwise: (schema14) => schema14.notRequired()
10306
10308
  })
10307
10309
  });
10308
10310
  var eventInfoSchema = create$3().shape({
@@ -10415,8 +10417,8 @@ var userSchema = create$3().shape({
10415
10417
  confirmPassword: create$6().nullable().trim().label("Confirm Password").when("password", {
10416
10418
  is: (val) => !!val,
10417
10419
  // only necessary if password typed
10418
- then: (schema13) => schema13.required("Confirm Password is required").oneOf([create$9("password")], "Passwords must match"),
10419
- otherwise: (schema13) => schema13.notRequired()
10420
+ then: (schema14) => schema14.required("Confirm Password is required").oneOf([create$9("password")], "Passwords must match"),
10421
+ otherwise: (schema14) => schema14.notRequired()
10420
10422
  }),
10421
10423
  role: create$8().oneOf(Object.values(EnumUserRole)).required("Role is required")
10422
10424
  });
@@ -10534,8 +10536,8 @@ var testerSchema = create$3().shape({
10534
10536
  email: emailRequiredSchema,
10535
10537
  event: create$3().when("resourceType", {
10536
10538
  is: (resourceType) => resourceType === "event",
10537
- otherwise: (schema13) => schema13.nullable().optional(),
10538
- then: (schema13) => schema13.required("Event information is required").shape(testerEventSchema.fields)
10539
+ otherwise: (schema14) => schema14.nullable().optional(),
10540
+ then: (schema14) => schema14.required("Event information is required").shape(testerEventSchema.fields)
10539
10541
  }),
10540
10542
  firstName: create$6().required("First name is required"),
10541
10543
  lastName: create$6().required("Last name is required"),
@@ -10553,8 +10555,8 @@ var testerSchema = create$3().shape({
10553
10555
  ).required("Resource Type is required"),
10554
10556
  vendor: create$3().when("resourceType", {
10555
10557
  is: (resourceType) => resourceType === "vendor",
10556
- otherwise: (schema13) => schema13.nullable().optional(),
10557
- then: (schema13) => schema13.required("Vendor information is required").shape(testerVendorSchema.fields)
10558
+ otherwise: (schema14) => schema14.nullable().optional(),
10559
+ then: (schema14) => schema14.required("Vendor information is required").shape(testerVendorSchema.fields)
10558
10560
  })
10559
10561
  });
10560
10562
  var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn2) => {
@@ -10592,7 +10594,7 @@ var adSchema = create$3().shape({
10592
10594
  return endDate > now;
10593
10595
  }).when("start", {
10594
10596
  is: (val) => val && val.length > 0,
10595
- then: (schema13) => schema13.test(
10597
+ then: (schema14) => schema14.test(
10596
10598
  "is-after-start",
10597
10599
  "End date must be after start date",
10598
10600
  function(value) {
@@ -11207,10 +11209,60 @@ ChatSchema.index({
11207
11209
  });
11208
11210
  var ChatModel = import_mongoose5.default.models.Chat || import_mongoose5.default.model("Chat", ChatSchema);
11209
11211
 
11210
- // src/mongoose/Notification.ts
11212
+ // src/mongoose/GoogleImportedMarket.ts
11211
11213
  var import_mongoose6 = __toESM(require("mongoose"));
11212
11214
  var MongooseSchema6 = import_mongoose6.default.Schema;
11215
+ var locationSchema2 = new MongooseSchema6(
11216
+ {
11217
+ lat: { required: true, type: Number },
11218
+ lng: { required: true, type: Number }
11219
+ },
11220
+ { _id: false }
11221
+ // Prevents Mongoose from creating an additional _id field for subdocuments
11222
+ );
11213
11223
  var schema3 = new MongooseSchema6(
11224
+ {
11225
+ address: { required: true, type: String },
11226
+ businessStatus: { required: false, type: String },
11227
+ claimed: { default: false, required: true, type: Boolean },
11228
+ googleMapsUrl: { required: false, type: String },
11229
+ googlePlaceId: {
11230
+ required: true,
11231
+ type: String,
11232
+ unique: true
11233
+ // unique, indexed
11234
+ },
11235
+ image: { required: false, type: String },
11236
+ // photo_reference only
11237
+ importedAt: { default: () => /* @__PURE__ */ new Date(), required: true, type: Date },
11238
+ location: {
11239
+ required: false,
11240
+ // optional because lat/lng may expire after 30 days
11241
+ type: locationSchema2
11242
+ },
11243
+ name: { required: true, type: String },
11244
+ openingHours: { required: false, type: [String] },
11245
+ phone: { required: false, type: String },
11246
+ photos: { required: false, type: [String] },
11247
+ // array of photo_reference
11248
+ rating: { required: false, type: Number },
11249
+ reviewCount: { required: false, type: Number },
11250
+ slug: { required: true, type: String },
11251
+ website: { required: false, type: String }
11252
+ },
11253
+ { timestamps: true }
11254
+ );
11255
+ schema3.index({ googlePlaceId: 1 });
11256
+ schema3.index({ name: 1 });
11257
+ schema3.index({ slug: 1 });
11258
+ schema3.index({ address: 1 });
11259
+ schema3.index({ "location.lat": 1, "location.lng": 1 });
11260
+ var GoogleImportedMarketModel = import_mongoose6.default.models.GoogleImportedMarket || import_mongoose6.default.model("GoogleImportedMarket", schema3);
11261
+
11262
+ // src/mongoose/Notification.ts
11263
+ var import_mongoose7 = __toESM(require("mongoose"));
11264
+ var MongooseSchema7 = import_mongoose7.default.Schema;
11265
+ var schema4 = new MongooseSchema7(
11214
11266
  {
11215
11267
  data: {
11216
11268
  resourceId: { required: true, type: String },
@@ -11233,16 +11285,16 @@ var schema3 = new MongooseSchema6(
11233
11285
  userId: {
11234
11286
  ref: "User",
11235
11287
  required: true,
11236
- type: import_mongoose6.default.Schema.Types.ObjectId
11288
+ type: import_mongoose7.default.Schema.Types.ObjectId
11237
11289
  }
11238
11290
  },
11239
11291
  { timestamps: true }
11240
11292
  );
11241
- schema3.index({ isRead: 1, userId: 1 });
11242
- schema3.index({ createdAt: -1, userId: 1 });
11243
- var NotificationModel = import_mongoose6.default.models.Notification || import_mongoose6.default.model("Notification", schema3);
11293
+ schema4.index({ isRead: 1, userId: 1 });
11294
+ schema4.index({ createdAt: -1, userId: 1 });
11295
+ var NotificationModel = import_mongoose7.default.models.Notification || import_mongoose7.default.model("Notification", schema4);
11244
11296
 
11245
- // node_modules/@timardex/cluemart-shared/dist/chunk-IXPWY6CU.mjs
11297
+ // node_modules/@timardex/cluemart-shared/dist/chunk-OBQRGWV3.mjs
11246
11298
  var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
11247
11299
  EnumOSPlatform22["ANDROID"] = "android";
11248
11300
  EnumOSPlatform22["IOS"] = "ios";
@@ -11251,9 +11303,9 @@ var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
11251
11303
  })(EnumOSPlatform2 || {});
11252
11304
 
11253
11305
  // src/mongoose/PushToken.ts
11254
- var import_mongoose7 = __toESM(require("mongoose"));
11255
- var MongooseSchema7 = import_mongoose7.default.Schema;
11256
- var schema4 = new MongooseSchema7(
11306
+ var import_mongoose8 = __toESM(require("mongoose"));
11307
+ var MongooseSchema8 = import_mongoose8.default.Schema;
11308
+ var schema5 = new MongooseSchema8(
11257
11309
  {
11258
11310
  platform: {
11259
11311
  enum: Object.values(EnumOSPlatform2),
@@ -11261,16 +11313,16 @@ var schema4 = new MongooseSchema7(
11261
11313
  type: String
11262
11314
  },
11263
11315
  token: { required: true, type: String },
11264
- userId: { required: true, type: import_mongoose7.default.Schema.Types.ObjectId }
11316
+ userId: { required: true, type: import_mongoose8.default.Schema.Types.ObjectId }
11265
11317
  },
11266
11318
  { timestamps: true }
11267
11319
  );
11268
- var PushTokenModel = import_mongoose7.default.models.PushToken || import_mongoose7.default.model("PushToken", schema4);
11320
+ var PushTokenModel = import_mongoose8.default.models.PushToken || import_mongoose8.default.model("PushToken", schema5);
11269
11321
 
11270
11322
  // src/mongoose/ResourceActivity.ts
11271
- var import_mongoose8 = __toESM(require("mongoose"));
11272
- var MongooseSchema8 = import_mongoose8.default.Schema;
11273
- var ActivitySchema = new MongooseSchema8(
11323
+ var import_mongoose9 = __toESM(require("mongoose"));
11324
+ var MongooseSchema9 = import_mongoose9.default.Schema;
11325
+ var ActivitySchema = new MongooseSchema9(
11274
11326
  {
11275
11327
  activityType: {
11276
11328
  enum: Object.values(EnumActivity),
@@ -11306,7 +11358,7 @@ var ActivitySchema = new MongooseSchema8(
11306
11358
  },
11307
11359
  { _id: false }
11308
11360
  );
11309
- var schema5 = new MongooseSchema8(
11361
+ var schema6 = new MongooseSchema9(
11310
11362
  {
11311
11363
  activity: { default: [], type: [ActivitySchema] },
11312
11364
  resourceId: { required: true, type: String },
@@ -11318,14 +11370,14 @@ var schema5 = new MongooseSchema8(
11318
11370
  },
11319
11371
  { timestamps: true }
11320
11372
  );
11321
- schema5.index({ resourceId: 1, resourceType: 1 }, { unique: true });
11322
- schema5.index({ "views.location": "2dsphere" });
11323
- var ResourceActivityModel = import_mongoose8.default.models.ResourceActivity || import_mongoose8.default.model("ResourceActivity", schema5);
11373
+ schema6.index({ resourceId: 1, resourceType: 1 }, { unique: true });
11374
+ schema6.index({ "views.location": "2dsphere" });
11375
+ var ResourceActivityModel = import_mongoose9.default.models.ResourceActivity || import_mongoose9.default.model("ResourceActivity", schema6);
11324
11376
 
11325
11377
  // src/mongoose/Tester.ts
11326
- var import_mongoose9 = __toESM(require("mongoose"));
11327
- var MongooseSchema9 = import_mongoose9.default.Schema;
11328
- var TesterVendorQuestionarySchema = new MongooseSchema9(
11378
+ var import_mongoose10 = __toESM(require("mongoose"));
11379
+ var MongooseSchema10 = import_mongoose10.default.Schema;
11380
+ var TesterVendorQuestionarySchema = new MongooseSchema10(
11329
11381
  {
11330
11382
  appearInVideoIntroduction: {
11331
11383
  default: false,
@@ -11352,7 +11404,7 @@ var TesterVendorQuestionarySchema = new MongooseSchema9(
11352
11404
  },
11353
11405
  { _id: false }
11354
11406
  );
11355
- var TesterVendorSchema = new MongooseSchema9(
11407
+ var TesterVendorSchema = new MongooseSchema10(
11356
11408
  {
11357
11409
  categories: { required: true, type: [CategorySchema] },
11358
11410
  marketsAttended: {
@@ -11378,7 +11430,7 @@ var TesterVendorSchema = new MongooseSchema9(
11378
11430
  },
11379
11431
  { _id: false }
11380
11432
  );
11381
- var TesterEventQuestionarySchema = new MongooseSchema9(
11433
+ var TesterEventQuestionarySchema = new MongooseSchema10(
11382
11434
  {
11383
11435
  allowMarketingAppearance: {
11384
11436
  default: false,
@@ -11413,7 +11465,7 @@ var TesterEventQuestionarySchema = new MongooseSchema9(
11413
11465
  },
11414
11466
  { _id: false }
11415
11467
  );
11416
- var TesterEventsSchema = new MongooseSchema9(
11468
+ var TesterEventsSchema = new MongooseSchema10(
11417
11469
  {
11418
11470
  markets: {
11419
11471
  required: true,
@@ -11442,7 +11494,7 @@ var TesterEventsSchema = new MongooseSchema9(
11442
11494
  },
11443
11495
  { _id: false }
11444
11496
  );
11445
- var TesterSchema = new MongooseSchema9(
11497
+ var TesterSchema = new MongooseSchema10(
11446
11498
  {
11447
11499
  active: { default: false, required: true, type: Boolean },
11448
11500
  approved: { default: false, required: true, type: Boolean },
@@ -11476,43 +11528,43 @@ var TesterSchema = new MongooseSchema9(
11476
11528
  timestamps: true
11477
11529
  }
11478
11530
  );
11479
- var TesterModel = import_mongoose9.default.models.Tester || import_mongoose9.default.model("Tester", TesterSchema);
11531
+ var TesterModel = import_mongoose10.default.models.Tester || import_mongoose10.default.model("Tester", TesterSchema);
11480
11532
 
11481
11533
  // src/mongoose/User.ts
11482
- var import_mongoose10 = __toESM(require("mongoose"));
11483
- var MongooseSchema10 = import_mongoose10.default.Schema;
11484
- var userActivityEventSchema = new MongooseSchema10(
11534
+ var import_mongoose11 = __toESM(require("mongoose"));
11535
+ var MongooseSchema11 = import_mongoose11.default.Schema;
11536
+ var userActivityEventSchema = new MongooseSchema11(
11485
11537
  {
11486
11538
  dateTime: dateTimeSchema3,
11487
11539
  resourceId: {
11488
11540
  ref: "Event",
11489
11541
  required: false,
11490
- type: import_mongoose10.default.Schema.Types.ObjectId
11542
+ type: import_mongoose11.default.Schema.Types.ObjectId
11491
11543
  }
11492
11544
  },
11493
11545
  { _id: false }
11494
11546
  );
11495
- var userActivityFavouritesSchema = new MongooseSchema10(
11547
+ var userActivityFavouritesSchema = new MongooseSchema11(
11496
11548
  {
11497
11549
  events: {
11498
11550
  ref: "Event",
11499
11551
  required: false,
11500
- type: [import_mongoose10.default.Schema.Types.ObjectId]
11552
+ type: [import_mongoose11.default.Schema.Types.ObjectId]
11501
11553
  },
11502
11554
  partners: {
11503
11555
  ref: "Partner",
11504
11556
  required: false,
11505
- type: [import_mongoose10.default.Schema.Types.ObjectId]
11557
+ type: [import_mongoose11.default.Schema.Types.ObjectId]
11506
11558
  },
11507
11559
  vendors: {
11508
11560
  ref: "Vendor",
11509
11561
  required: false,
11510
- type: [import_mongoose10.default.Schema.Types.ObjectId]
11562
+ type: [import_mongoose11.default.Schema.Types.ObjectId]
11511
11563
  }
11512
11564
  },
11513
11565
  { _id: false }
11514
11566
  );
11515
- var stripeSchema = new MongooseSchema10(
11567
+ var stripeSchema = new MongooseSchema11(
11516
11568
  {
11517
11569
  currentPlan: {
11518
11570
  enum: Object.values(EnumUserLicence),
@@ -11543,7 +11595,7 @@ var stripeSchema = new MongooseSchema10(
11543
11595
  },
11544
11596
  { _id: false }
11545
11597
  );
11546
- var schema6 = new MongooseSchema10(
11598
+ var schema7 = new MongooseSchema11(
11547
11599
  {
11548
11600
  active: { default: false, required: true, type: Boolean },
11549
11601
  associates: {
@@ -11559,7 +11611,7 @@ var schema6 = new MongooseSchema10(
11559
11611
  events: {
11560
11612
  ref: "Event",
11561
11613
  required: false,
11562
- type: [import_mongoose10.default.Schema.Types.ObjectId]
11614
+ type: [import_mongoose11.default.Schema.Types.ObjectId]
11563
11615
  },
11564
11616
  firstName: { required: true, type: String },
11565
11617
  isTester: { default: false, required: true, type: Boolean },
@@ -11571,7 +11623,7 @@ var schema6 = new MongooseSchema10(
11571
11623
  partner: {
11572
11624
  ref: "Partner",
11573
11625
  required: false,
11574
- type: import_mongoose10.default.Schema.Types.ObjectId
11626
+ type: import_mongoose11.default.Schema.Types.ObjectId
11575
11627
  },
11576
11628
  password: { required: true, type: String },
11577
11629
  platform: {
@@ -11616,20 +11668,20 @@ var schema6 = new MongooseSchema10(
11616
11668
  vendor: {
11617
11669
  ref: "Vendor",
11618
11670
  required: false,
11619
- type: import_mongoose10.default.Schema.Types.ObjectId
11671
+ type: import_mongoose11.default.Schema.Types.ObjectId
11620
11672
  }
11621
11673
  },
11622
11674
  { strict: false, timestamps: true }
11623
11675
  );
11624
- schema6.index({ "associates.email": 1 });
11625
- schema6.index({ "licences.expiryDate": 1 });
11626
- schema6.index({ "licences.licenceType": 1 });
11627
- var UserModel = import_mongoose10.default.models.User || import_mongoose10.default.model("User", schema6);
11676
+ schema7.index({ "associates.email": 1 });
11677
+ schema7.index({ "licences.expiryDate": 1 });
11678
+ schema7.index({ "licences.licenceType": 1 });
11679
+ var UserModel = import_mongoose11.default.models.User || import_mongoose11.default.model("User", schema7);
11628
11680
 
11629
11681
  // src/mongoose/VerificationToken.ts
11630
- var import_mongoose11 = __toESM(require("mongoose"));
11631
- var MongooseSchema11 = import_mongoose11.default.Schema;
11632
- var schema7 = new MongooseSchema11(
11682
+ var import_mongoose12 = __toESM(require("mongoose"));
11683
+ var MongooseSchema12 = import_mongoose12.default.Schema;
11684
+ var schema8 = new MongooseSchema12(
11633
11685
  {
11634
11686
  createdAt: {
11635
11687
  default: Date.now,
@@ -11644,12 +11696,12 @@ var schema7 = new MongooseSchema11(
11644
11696
  },
11645
11697
  { timestamps: true }
11646
11698
  );
11647
- var VerificationTokenModel = import_mongoose11.default.models.VerificationToken || import_mongoose11.default.model("VerificationToken", schema7);
11699
+ var VerificationTokenModel = import_mongoose12.default.models.VerificationToken || import_mongoose12.default.model("VerificationToken", schema8);
11648
11700
 
11649
11701
  // src/mongoose/vendor/Vendor.ts
11650
- var import_mongoose12 = __toESM(require("mongoose"));
11651
- var MongooseSchema12 = import_mongoose12.default.Schema;
11652
- var MenuTypeSchema = new MongooseSchema12(
11702
+ var import_mongoose13 = __toESM(require("mongoose"));
11703
+ var MongooseSchema13 = import_mongoose13.default.Schema;
11704
+ var MenuTypeSchema = new MongooseSchema13(
11653
11705
  {
11654
11706
  description: { required: false, type: String },
11655
11707
  name: { required: false, type: String },
@@ -11659,7 +11711,7 @@ var MenuTypeSchema = new MongooseSchema12(
11659
11711
  { _id: false }
11660
11712
  // Prevents Mongoose from creating an additional _id field for subdocuments
11661
11713
  );
11662
- var LocationsSchema = new MongooseSchema12(
11714
+ var LocationsSchema = new MongooseSchema13(
11663
11715
  {
11664
11716
  dateTime: {
11665
11717
  dateStatus: {
@@ -11692,7 +11744,7 @@ var LocationsSchema = new MongooseSchema12(
11692
11744
  { _id: false }
11693
11745
  // Prevents Mongoose from creating an additional _id field for subdocuments
11694
11746
  );
11695
- var schema8 = new MongooseSchema12(
11747
+ var schema9 = new MongooseSchema13(
11696
11748
  {
11697
11749
  ...baseResourceFields,
11698
11750
  // Importing base resource fields from global.ts
@@ -11714,7 +11766,7 @@ var schema8 = new MongooseSchema12(
11714
11766
  vendorInfoId: {
11715
11767
  ref: "VendorInfo",
11716
11768
  required: false,
11717
- type: import_mongoose12.default.Schema.Types.ObjectId
11769
+ type: import_mongoose13.default.Schema.Types.ObjectId
11718
11770
  },
11719
11771
  vendorType: {
11720
11772
  enum: Object.values(EnumVendorType),
@@ -11724,24 +11776,24 @@ var schema8 = new MongooseSchema12(
11724
11776
  },
11725
11777
  { timestamps: true }
11726
11778
  );
11727
- schema8.index({ name: 1 });
11728
- schema8.index({ description: 1 });
11729
- schema8.index({ region: 1 });
11730
- schema8.index({ "categories.name": 1 });
11731
- schema8.index({ "associates.email": 1 });
11732
- var VendorModel = import_mongoose12.default.models.Vendor || import_mongoose12.default.model("Vendor", schema8);
11779
+ schema9.index({ name: 1 });
11780
+ schema9.index({ description: 1 });
11781
+ schema9.index({ region: 1 });
11782
+ schema9.index({ "categories.name": 1 });
11783
+ schema9.index({ "associates.email": 1 });
11784
+ var VendorModel = import_mongoose13.default.models.Vendor || import_mongoose13.default.model("Vendor", schema9);
11733
11785
 
11734
11786
  // src/mongoose/vendor/VendorInfo.ts
11735
- var import_mongoose13 = __toESM(require("mongoose"));
11736
- var MongooseSchema13 = import_mongoose13.default.Schema;
11737
- var AttributesSchema = new MongooseSchema13(
11787
+ var import_mongoose14 = __toESM(require("mongoose"));
11788
+ var MongooseSchema14 = import_mongoose14.default.Schema;
11789
+ var AttributesSchema = new MongooseSchema14(
11738
11790
  {
11739
11791
  details: { required: false, type: String },
11740
11792
  isRequired: { default: false, required: true, type: Boolean }
11741
11793
  },
11742
11794
  { _id: false }
11743
11795
  );
11744
- var schema9 = new MongooseSchema13(
11796
+ var schema10 = new MongooseSchema14(
11745
11797
  {
11746
11798
  compliance: {
11747
11799
  foodBeverageLicense: { default: false, required: false, type: Boolean },
@@ -11775,17 +11827,17 @@ var schema9 = new MongooseSchema13(
11775
11827
  vendorId: {
11776
11828
  ref: "Vendor",
11777
11829
  required: true,
11778
- type: import_mongoose13.default.Schema.Types.ObjectId
11830
+ type: import_mongoose14.default.Schema.Types.ObjectId
11779
11831
  }
11780
11832
  },
11781
11833
  { timestamps: true }
11782
11834
  );
11783
- var VendorInfoModel = import_mongoose13.default.models.VendorInfo || import_mongoose13.default.model("VendorInfo", schema9);
11835
+ var VendorInfoModel = import_mongoose14.default.models.VendorInfo || import_mongoose14.default.model("VendorInfo", schema10);
11784
11836
 
11785
11837
  // src/mongoose/event/Event.ts
11786
- var import_mongoose14 = __toESM(require("mongoose"));
11787
- var MongooseSchema14 = import_mongoose14.default.Schema;
11788
- var locationsSchema = new MongooseSchema14(
11838
+ var import_mongoose15 = __toESM(require("mongoose"));
11839
+ var MongooseSchema15 = import_mongoose15.default.Schema;
11840
+ var locationsSchema = new MongooseSchema15(
11789
11841
  {
11790
11842
  city: { required: true, type: String },
11791
11843
  coordinates: {
@@ -11808,7 +11860,7 @@ var locationsSchema = new MongooseSchema14(
11808
11860
  { _id: false }
11809
11861
  // Prevents Mongoose from creating an additional _id field for subdocuments
11810
11862
  );
11811
- var schema10 = new MongooseSchema14(
11863
+ var schema11 = new MongooseSchema15(
11812
11864
  {
11813
11865
  ...baseResourceFields,
11814
11866
  // Importing base resource fields from global.ts
@@ -11816,7 +11868,7 @@ var schema10 = new MongooseSchema14(
11816
11868
  eventInfoId: {
11817
11869
  ref: "EventInfo",
11818
11870
  required: false,
11819
- type: import_mongoose14.default.Schema.Types.ObjectId
11871
+ type: import_mongoose15.default.Schema.Types.ObjectId
11820
11872
  },
11821
11873
  eventType: {
11822
11874
  enum: Object.values(EnumEventType),
@@ -11839,18 +11891,18 @@ var schema10 = new MongooseSchema14(
11839
11891
  },
11840
11892
  { timestamps: true }
11841
11893
  );
11842
- schema10.index({ name: 1 });
11843
- schema10.index({ description: 1 });
11844
- schema10.index({ region: 1 });
11845
- schema10.index({ location: "2dsphere" });
11846
- schema10.index({ tags: 1 });
11847
- schema10.index({ "associates.email": 1 });
11848
- var EventModel = import_mongoose14.default.models.Event || import_mongoose14.default.model("Event", schema10);
11894
+ schema11.index({ name: 1 });
11895
+ schema11.index({ description: 1 });
11896
+ schema11.index({ region: 1 });
11897
+ schema11.index({ location: "2dsphere" });
11898
+ schema11.index({ tags: 1 });
11899
+ schema11.index({ "associates.email": 1 });
11900
+ var EventModel = import_mongoose15.default.models.Event || import_mongoose15.default.model("Event", schema11);
11849
11901
 
11850
11902
  // src/mongoose/Partner.ts
11851
- var import_mongoose15 = __toESM(require("mongoose"));
11852
- var MongooseSchema15 = import_mongoose15.default.Schema;
11853
- var schema11 = new MongooseSchema15(
11903
+ var import_mongoose16 = __toESM(require("mongoose"));
11904
+ var MongooseSchema16 = import_mongoose16.default.Schema;
11905
+ var schema12 = new MongooseSchema16(
11854
11906
  {
11855
11907
  ...baseResourceFields,
11856
11908
  location: {
@@ -11866,19 +11918,19 @@ var schema11 = new MongooseSchema15(
11866
11918
  },
11867
11919
  { timestamps: true }
11868
11920
  );
11869
- schema11.index({ name: 1 });
11870
- schema11.index({ description: 1 });
11871
- schema11.index({ region: 1 });
11872
- schema11.index({ location: "2dsphere" });
11873
- schema11.index({ "associates.email": 1 });
11874
- var PartnerModel = import_mongoose15.default.models.Partner || import_mongoose15.default.model("Partner", schema11);
11921
+ schema12.index({ name: 1 });
11922
+ schema12.index({ description: 1 });
11923
+ schema12.index({ region: 1 });
11924
+ schema12.index({ location: "2dsphere" });
11925
+ schema12.index({ "associates.email": 1 });
11926
+ var PartnerModel = import_mongoose16.default.models.Partner || import_mongoose16.default.model("Partner", schema12);
11875
11927
 
11876
11928
  // src/mongoose/Post.ts
11877
- var import_mongoose16 = __toESM(require("mongoose"));
11878
- var MongooseSchema16 = import_mongoose16.default.Schema;
11879
- var contentSchema = new MongooseSchema16(
11929
+ var import_mongoose17 = __toESM(require("mongoose"));
11930
+ var MongooseSchema17 = import_mongoose17.default.Schema;
11931
+ var contentSchema = new MongooseSchema17(
11880
11932
  {
11881
- contentData: import_mongoose16.Schema.Types.Mixed,
11933
+ contentData: import_mongoose17.Schema.Types.Mixed,
11882
11934
  contentOrder: { required: true, type: Number },
11883
11935
  contentType: {
11884
11936
  enum: Object.values(EnumPostContentType),
@@ -11888,7 +11940,7 @@ var contentSchema = new MongooseSchema16(
11888
11940
  },
11889
11941
  { _id: false }
11890
11942
  );
11891
- var schema12 = new MongooseSchema16(
11943
+ var schema13 = new MongooseSchema17(
11892
11944
  {
11893
11945
  active: { default: true, required: true, type: Boolean },
11894
11946
  caption: { required: true, type: String },
@@ -11903,15 +11955,15 @@ var schema12 = new MongooseSchema16(
11903
11955
  },
11904
11956
  { timestamps: true }
11905
11957
  );
11906
- schema12.index({ title: 1 });
11907
- schema12.index({ tags: 1 });
11908
- var PostModel = import_mongoose16.default.models.Post || import_mongoose16.default.model("Post", schema12);
11958
+ schema13.index({ title: 1 });
11959
+ schema13.index({ tags: 1 });
11960
+ var PostModel = import_mongoose17.default.models.Post || import_mongoose17.default.model("Post", schema13);
11909
11961
 
11910
11962
  // src/mongoose/AppSetting.ts
11911
- var import_mongoose17 = __toESM(require("mongoose"));
11912
- var MongooseSchema17 = import_mongoose17.default.Schema;
11963
+ var import_mongoose18 = __toESM(require("mongoose"));
11964
+ var MongooseSchema18 = import_mongoose18.default.Schema;
11913
11965
  var APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
11914
- var AppSettingSchema = new MongooseSchema17(
11966
+ var AppSettingSchema = new MongooseSchema18(
11915
11967
  {
11916
11968
  appVersion: { default: "1.0.1", required: true, type: String },
11917
11969
  key: {
@@ -11926,10 +11978,10 @@ var AppSettingSchema = new MongooseSchema17(
11926
11978
  },
11927
11979
  { timestamps: true }
11928
11980
  );
11929
- var AppSettingModel = import_mongoose17.default.models.AppSetting || import_mongoose17.default.model("AppSetting", AppSettingSchema);
11981
+ var AppSettingModel = import_mongoose18.default.models.AppSetting || import_mongoose18.default.model("AppSetting", AppSettingSchema);
11930
11982
 
11931
11983
  // src/service/database.ts
11932
- var import_mongoose18 = __toESM(require("mongoose"));
11984
+ var import_mongoose19 = __toESM(require("mongoose"));
11933
11985
  var connectToDatabase = async ({
11934
11986
  appName,
11935
11987
  dbName,
@@ -11942,7 +11994,7 @@ var connectToDatabase = async ({
11942
11994
  // Fallback to MongoDB Atlas connection string
11943
11995
  `mongodb+srv://${dbUser}:${dbPassword}@${dbName}.mongodb.net/?retryWrites=true&w=majority&appName=${appName}`
11944
11996
  );
11945
- await import_mongoose18.default.connect(mongoUri);
11997
+ await import_mongoose19.default.connect(mongoUri);
11946
11998
  const connectionType = mongodbUri ? "Local MongoDB" : "MongoDB Atlas";
11947
11999
  console.log(
11948
12000
  `${connectionType} connected from server/src/service/database.ts`
@@ -12121,7 +12173,7 @@ async function updateAdStatuses() {
12121
12173
 
12122
12174
  // src/types/index.ts
12123
12175
  var import_express = __toESM(require("express"));
12124
- var import_mongoose20 = __toESM(require("mongoose"));
12176
+ var import_mongoose21 = __toESM(require("mongoose"));
12125
12177
  var EnumPubSubEvents = /* @__PURE__ */ ((EnumPubSubEvents2) => {
12126
12178
  EnumPubSubEvents2["GET_CHAT_MESSAGE"] = "GET_CHAT_MESSAGE";
12127
12179
  EnumPubSubEvents2["GET_NOTIFICATIONS"] = "GET_NOTIFICATIONS";
@@ -12139,6 +12191,7 @@ var EnumPubSubEvents = /* @__PURE__ */ ((EnumPubSubEvents2) => {
12139
12191
  EnumPubSubEvents,
12140
12192
  EventInfoModel,
12141
12193
  EventModel,
12194
+ GoogleImportedMarketModel,
12142
12195
  NotificationModel,
12143
12196
  ParticipantSchema,
12144
12197
  PartnerModel,