@timardex/cluemart-server-shared 1.0.85 → 1.0.87

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.
@@ -1670,9 +1670,9 @@ function __extends(d, b) {
1670
1670
  }
1671
1671
  var __assign = function() {
1672
1672
  __assign = Object.assign || function __assign2(t) {
1673
- for (var s2, i = 1, n = arguments.length; i < n; i++) {
1674
- s2 = arguments[i];
1675
- for (var p in s2) if (Object.prototype.hasOwnProperty.call(s2, p)) t[p] = s2[p];
1673
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
1674
+ s = arguments[i];
1675
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
1676
1676
  }
1677
1677
  return t;
1678
1678
  };
@@ -4764,20 +4764,19 @@ function createValidation(config) {
4764
4764
  abortEarly = schema14.spec.abortEarly,
4765
4765
  disableStackTrace = schema14.spec.disableStackTrace
4766
4766
  } = options;
4767
- const resolveOptions = {
4768
- value,
4769
- parent,
4770
- context
4771
- };
4767
+ function resolve(item) {
4768
+ return Reference.isRef(item) ? item.getValue(value, parent, context) : item;
4769
+ }
4772
4770
  function createError(overrides = {}) {
4773
- const nextParams = resolveParams(Object.assign({
4771
+ const nextParams = Object.assign({
4774
4772
  value,
4775
4773
  originalValue,
4776
4774
  label: schema14.spec.label,
4777
4775
  path: overrides.path || path,
4778
4776
  spec: schema14.spec,
4779
4777
  disableStackTrace: overrides.disableStackTrace || disableStackTrace
4780
- }, params, overrides.params), resolveOptions);
4778
+ }, params, overrides.params);
4779
+ for (const key of Object.keys(nextParams)) nextParams[key] = resolve(nextParams[key]);
4781
4780
  const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name, nextParams.disableStackTrace);
4782
4781
  error.params = nextParams;
4783
4782
  return error;
@@ -4789,9 +4788,7 @@ function createValidation(config) {
4789
4788
  type: name,
4790
4789
  from: options.from,
4791
4790
  createError,
4792
- resolve(item) {
4793
- return resolveMaybeRef(item, resolveOptions);
4794
- },
4791
+ resolve,
4795
4792
  options,
4796
4793
  originalValue,
4797
4794
  schema: schema14
@@ -4828,16 +4825,6 @@ function createValidation(config) {
4828
4825
  validate.OPTIONS = config;
4829
4826
  return validate;
4830
4827
  }
4831
- function resolveParams(params, options) {
4832
- if (!params) return params;
4833
- for (const key of Object.keys(params)) {
4834
- params[key] = resolveMaybeRef(params[key], options);
4835
- }
4836
- return params;
4837
- }
4838
- function resolveMaybeRef(item, options) {
4839
- return Reference.isRef(item) ? item.getValue(options.value, options.parent, options.context) : item;
4840
- }
4841
4828
  function getIn(schema14, path, value, context = value) {
4842
4829
  let parent, lastPart, lastPartDebug;
4843
4830
  if (!path) return {
@@ -4934,69 +4921,6 @@ function clone(src, seen = /* @__PURE__ */ new Map()) {
4934
4921
  }
4935
4922
  return copy;
4936
4923
  }
4937
- function createStandardPath(path) {
4938
- if (!(path != null && path.length)) {
4939
- return void 0;
4940
- }
4941
- const segments = [];
4942
- let currentSegment = "";
4943
- let inBrackets = false;
4944
- let inQuotes = false;
4945
- for (let i = 0; i < path.length; i++) {
4946
- const char = path[i];
4947
- if (char === "[" && !inQuotes) {
4948
- if (currentSegment) {
4949
- segments.push(...currentSegment.split(".").filter(Boolean));
4950
- currentSegment = "";
4951
- }
4952
- inBrackets = true;
4953
- continue;
4954
- }
4955
- if (char === "]" && !inQuotes) {
4956
- if (currentSegment) {
4957
- if (/^\d+$/.test(currentSegment)) {
4958
- segments.push(currentSegment);
4959
- } else {
4960
- segments.push(currentSegment.replace(/^"|"$/g, ""));
4961
- }
4962
- currentSegment = "";
4963
- }
4964
- inBrackets = false;
4965
- continue;
4966
- }
4967
- if (char === '"') {
4968
- inQuotes = !inQuotes;
4969
- continue;
4970
- }
4971
- if (char === "." && !inBrackets && !inQuotes) {
4972
- if (currentSegment) {
4973
- segments.push(currentSegment);
4974
- currentSegment = "";
4975
- }
4976
- continue;
4977
- }
4978
- currentSegment += char;
4979
- }
4980
- if (currentSegment) {
4981
- segments.push(...currentSegment.split(".").filter(Boolean));
4982
- }
4983
- return segments;
4984
- }
4985
- function createStandardIssues(error, parentPath) {
4986
- const path = parentPath ? `${parentPath}.${error.path}` : error.path;
4987
- return error.errors.map((err) => ({
4988
- message: err,
4989
- path: createStandardPath(path)
4990
- }));
4991
- }
4992
- function issuesFromValidationError(error, parentPath) {
4993
- var _error$inner;
4994
- if (!((_error$inner = error.inner) != null && _error$inner.length) && error.errors.length) {
4995
- return createStandardIssues(error, parentPath);
4996
- }
4997
- const path = parentPath ? `${parentPath}.${error.path}` : error.path;
4998
- return error.inner.flatMap((err) => issuesFromValidationError(err, path));
4999
- }
5000
4924
  var Schema = class {
5001
4925
  constructor(options) {
5002
4926
  this.type = void 0;
@@ -5028,8 +4952,8 @@ var Schema = class {
5028
4952
  optional: true,
5029
4953
  coerce: true
5030
4954
  }, options == null ? void 0 : options.spec);
5031
- this.withMutation((s2) => {
5032
- s2.nonNullable();
4955
+ this.withMutation((s) => {
4956
+ s.nonNullable();
5033
4957
  });
5034
4958
  }
5035
4959
  // TODO: remove
@@ -5126,11 +5050,9 @@ var Schema = class {
5126
5050
  * Run the configured transform pipeline over an input value.
5127
5051
  */
5128
5052
  cast(value, options = {}) {
5129
- let resolvedSchema = this.resolve(Object.assign({}, options, {
5053
+ let resolvedSchema = this.resolve(Object.assign({
5130
5054
  value
5131
- // parent: options.parent,
5132
- // context: options.context,
5133
- }));
5055
+ }, options));
5134
5056
  let allowOptionality = options.assert === "ignore-optionality";
5135
5057
  let result = resolvedSchema._cast(value, options);
5136
5058
  if (options.assert !== false && !resolvedSchema.isType(result)) {
@@ -5147,7 +5069,7 @@ attempted value: ${formattedValue}
5147
5069
  return result;
5148
5070
  }
5149
5071
  _cast(rawValue, options) {
5150
- let value = rawValue === void 0 ? rawValue : this.transforms.reduce((prevValue, fn) => fn.call(this, prevValue, rawValue, this, options), rawValue);
5072
+ let value = rawValue === void 0 ? rawValue : this.transforms.reduce((prevValue, fn) => fn.call(this, prevValue, rawValue, this), rawValue);
5151
5073
  if (value === void 0) {
5152
5074
  value = this.getDefault(options);
5153
5075
  }
@@ -5542,41 +5464,13 @@ attempted value: ${formattedValue}
5542
5464
  type: next.type,
5543
5465
  oneOf: next._whitelist.describe(),
5544
5466
  notOneOf: next._blacklist.describe(),
5545
- tests: next.tests.filter((n, idx, list) => list.findIndex((c) => c.OPTIONS.name === n.OPTIONS.name) === idx).map((fn) => {
5546
- const params = fn.OPTIONS.params && options ? resolveParams(Object.assign({}, fn.OPTIONS.params), options) : fn.OPTIONS.params;
5547
- return {
5548
- name: fn.OPTIONS.name,
5549
- params
5550
- };
5551
- })
5467
+ tests: next.tests.map((fn) => ({
5468
+ name: fn.OPTIONS.name,
5469
+ params: fn.OPTIONS.params
5470
+ })).filter((n, idx, list) => list.findIndex((c) => c.name === n.name) === idx)
5552
5471
  };
5553
5472
  return description;
5554
5473
  }
5555
- get ["~standard"]() {
5556
- const schema14 = this;
5557
- const standard = {
5558
- version: 1,
5559
- vendor: "yup",
5560
- async validate(value) {
5561
- try {
5562
- const result = await schema14.validate(value, {
5563
- abortEarly: false
5564
- });
5565
- return {
5566
- value: result
5567
- };
5568
- } catch (err) {
5569
- if (err instanceof ValidationError) {
5570
- return {
5571
- issues: issuesFromValidationError(err)
5572
- };
5573
- }
5574
- throw err;
5575
- }
5576
- }
5577
- };
5578
- return standard;
5579
- }
5580
5474
  };
5581
5475
  Schema.prototype.__isYupSchema__ = true;
5582
5476
  for (const method of ["validate", "validateSync"]) Schema.prototype[`${method}At`] = function(path, value, options = {}) {
@@ -5621,8 +5515,8 @@ var BooleanSchema = class extends Schema {
5621
5515
  }
5622
5516
  });
5623
5517
  this.withMutation(() => {
5624
- this.transform((value, _raw) => {
5625
- if (this.spec.coerce && !this.isType(value)) {
5518
+ this.transform((value, _raw, ctx) => {
5519
+ if (ctx.spec.coerce && !ctx.isType(value)) {
5626
5520
  if (/^(true|1)$/i.test(String(value))) return true;
5627
5521
  if (/^(false|0)$/i.test(String(value))) return false;
5628
5522
  }
@@ -5749,8 +5643,8 @@ var StringSchema = class extends Schema {
5749
5643
  }
5750
5644
  });
5751
5645
  this.withMutation(() => {
5752
- this.transform((value, _raw) => {
5753
- if (!this.spec.coerce || this.isType(value)) return value;
5646
+ this.transform((value, _raw, ctx) => {
5647
+ if (!ctx.spec.coerce || ctx.isType(value)) return value;
5754
5648
  if (Array.isArray(value)) return value;
5755
5649
  const strValue = value != null && value.toString ? value.toString() : value;
5756
5650
  if (strValue === objStringTag) return value;
@@ -5952,15 +5846,15 @@ var NumberSchema = class extends Schema {
5952
5846
  }
5953
5847
  });
5954
5848
  this.withMutation(() => {
5955
- this.transform((value, _raw) => {
5956
- if (!this.spec.coerce) return value;
5849
+ this.transform((value, _raw, ctx) => {
5850
+ if (!ctx.spec.coerce) return value;
5957
5851
  let parsed = value;
5958
5852
  if (typeof parsed === "string") {
5959
5853
  parsed = parsed.replace(/\s/g, "");
5960
5854
  if (parsed === "") return NaN;
5961
5855
  parsed = +parsed;
5962
5856
  }
5963
- if (this.isType(parsed) || parsed === null) return parsed;
5857
+ if (ctx.isType(parsed) || parsed === null) return parsed;
5964
5858
  return parseFloat(parsed);
5965
5859
  });
5966
5860
  });
@@ -6062,8 +5956,8 @@ var DateSchema = class _DateSchema extends Schema {
6062
5956
  }
6063
5957
  });
6064
5958
  this.withMutation(() => {
6065
- this.transform((value, _raw) => {
6066
- if (!this.spec.coerce || this.isType(value) || value === null) return value;
5959
+ this.transform((value, _raw, ctx) => {
5960
+ if (!ctx.spec.coerce || ctx.isType(value) || value === null) return value;
6067
5961
  value = parseIsoDate(value);
6068
5962
  return !isNaN(value) ? new Date(value) : _DateSchema.INVALID_DATE;
6069
5963
  });
@@ -6147,7 +6041,7 @@ function sortByKeyOrder(keys) {
6147
6041
  return findIndex(keys, a) - findIndex(keys, b);
6148
6042
  };
6149
6043
  }
6150
- var parseJson = (value, _, schema14) => {
6044
+ var parseJson = (value, _, ctx) => {
6151
6045
  if (typeof value !== "string") {
6152
6046
  return value;
6153
6047
  }
@@ -6156,7 +6050,7 @@ var parseJson = (value, _, schema14) => {
6156
6050
  parsed = JSON.parse(value);
6157
6051
  } catch (err) {
6158
6052
  }
6159
- return schema14.isType(parsed) ? parsed : value;
6053
+ return ctx.isType(parsed) ? parsed : value;
6160
6054
  };
6161
6055
  function deepPartial(schema14) {
6162
6056
  if ("fields" in schema14) {
@@ -6232,9 +6126,9 @@ var ObjectSchema = class extends Schema {
6232
6126
  for (const prop of props) {
6233
6127
  let field = fields[prop];
6234
6128
  let exists = prop in value;
6235
- let inputValue = value[prop];
6236
6129
  if (field) {
6237
6130
  let fieldValue;
6131
+ let inputValue = value[prop];
6238
6132
  innerOptions.path = (options.path ? `${options.path}.` : "") + prop;
6239
6133
  field = field.resolve({
6240
6134
  value: inputValue,
@@ -6247,14 +6141,17 @@ var ObjectSchema = class extends Schema {
6247
6141
  isChanged = isChanged || prop in value;
6248
6142
  continue;
6249
6143
  }
6250
- fieldValue = !options.__validating || !strict ? field.cast(inputValue, innerOptions) : inputValue;
6144
+ fieldValue = !options.__validating || !strict ? (
6145
+ // TODO: use _cast, this is double resolving
6146
+ field.cast(value[prop], innerOptions)
6147
+ ) : value[prop];
6251
6148
  if (fieldValue !== void 0) {
6252
6149
  intermediateValue[prop] = fieldValue;
6253
6150
  }
6254
6151
  } else if (exists && !strip) {
6255
- intermediateValue[prop] = inputValue;
6152
+ intermediateValue[prop] = value[prop];
6256
6153
  }
6257
- if (exists !== prop in intermediateValue || intermediateValue[prop] !== inputValue) {
6154
+ if (exists !== prop in intermediateValue || intermediateValue[prop] !== value[prop]) {
6258
6155
  isChanged = true;
6259
6156
  }
6260
6157
  }
@@ -6317,9 +6214,9 @@ var ObjectSchema = class extends Schema {
6317
6214
  const target = nextFields[field];
6318
6215
  nextFields[field] = target === void 0 ? schemaOrRef : target;
6319
6216
  }
6320
- return next.withMutation((s2) => (
6217
+ return next.withMutation((s) => (
6321
6218
  // XXX: excludes here is wrong
6322
- s2.setFields(nextFields, [...this._excludedEdges, ...schema14._excludedEdges])
6219
+ s.setFields(nextFields, [...this._excludedEdges, ...schema14._excludedEdges])
6323
6220
  ));
6324
6221
  }
6325
6222
  _getDefault(options) {
@@ -6515,11 +6412,7 @@ var ArraySchema = class extends Schema {
6515
6412
  let isChanged = false;
6516
6413
  const castArray = value.map((v, idx) => {
6517
6414
  const castElement = this.innerType.cast(v, Object.assign({}, _opts, {
6518
- path: `${_opts.path || ""}[${idx}]`,
6519
- parent: value,
6520
- originalValue: v,
6521
- value: v,
6522
- index: idx
6415
+ path: `${_opts.path || ""}[${idx}]`
6523
6416
  }));
6524
6417
  if (castElement !== v) {
6525
6418
  isChanged = true;
@@ -6689,11 +6582,7 @@ var TupleSchema = class extends Schema {
6689
6582
  let isChanged = false;
6690
6583
  const castArray = types.map((type, idx) => {
6691
6584
  const castElement = type.cast(value[idx], Object.assign({}, options, {
6692
- path: `${options.path || ""}[${idx}]`,
6693
- parent: value,
6694
- originalValue: value[idx],
6695
- value: value[idx],
6696
- index: idx
6585
+ path: `${options.path || ""}[${idx}]`
6697
6586
  }));
6698
6587
  if (castElement !== value[idx]) isChanged = true;
6699
6588
  return castElement;
@@ -6769,6 +6658,15 @@ var EnumInviteStatus = /* @__PURE__ */ ((EnumInviteStatus22) => {
6769
6658
  EnumInviteStatus22["WAITING"] = "Waiting";
6770
6659
  return EnumInviteStatus22;
6771
6660
  })(EnumInviteStatus || {});
6661
+ var EnumChatReportReason = /* @__PURE__ */ ((EnumChatReportReason22) => {
6662
+ EnumChatReportReason22["INAPPROPRIATE_CONTENT"] = "Inappropriate_Content";
6663
+ EnumChatReportReason22["HARASSMENT_OR_BULLYING"] = "Harassment_or_Bullying";
6664
+ EnumChatReportReason22["HATE_SPEECH"] = "Hate_Speech";
6665
+ EnumChatReportReason22["SPAM_OR_SCAM"] = "Spam_or_Scam";
6666
+ EnumChatReportReason22["VIOLENCE_OR_DANGEROUS_BEHAVIOR"] = "Violence_or_Dangerous_Behavior";
6667
+ EnumChatReportReason22["OTHER"] = "Other";
6668
+ return EnumChatReportReason22;
6669
+ })(EnumChatReportReason || {});
6772
6670
  var EnumChatType = /* @__PURE__ */ ((EnumChatType22) => {
6773
6671
  EnumChatType22["GROUP"] = "group";
6774
6672
  EnumChatType22["PRIVATE"] = "private";
@@ -6797,23 +6695,23 @@ var EnumResourceType = /* @__PURE__ */ ((EnumResourceType22) => {
6797
6695
  EnumResourceType22["PARTNER"] = "partner";
6798
6696
  return EnumResourceType22;
6799
6697
  })(EnumResourceType || {});
6800
- var EnumEventType = /* @__PURE__ */ ((EnumEventType22) => {
6801
- EnumEventType22["MARKET"] = "Market";
6802
- EnumEventType22["EXPO"] = "Expo";
6803
- EnumEventType22["FAIR"] = "Fair";
6804
- EnumEventType22["FESTIVAL"] = "Festival";
6805
- return EnumEventType22;
6698
+ var EnumEventType = /* @__PURE__ */ ((EnumEventType3) => {
6699
+ EnumEventType3["MARKET"] = "Market";
6700
+ EnumEventType3["EXPO"] = "Expo";
6701
+ EnumEventType3["FAIR"] = "Fair";
6702
+ EnumEventType3["FESTIVAL"] = "Festival";
6703
+ return EnumEventType3;
6806
6704
  })(EnumEventType || {});
6807
6705
  var EnumVendorType = /* @__PURE__ */ ((EnumVendorType22) => {
6808
6706
  EnumVendorType22["STALLHOLDER"] = "Stallholder";
6809
6707
  EnumVendorType22["SHOP"] = "Shop";
6810
6708
  return EnumVendorType22;
6811
6709
  })(EnumVendorType || {});
6812
- var EnumPartnerType = /* @__PURE__ */ ((EnumPartnerType22) => {
6813
- EnumPartnerType22["CHARITY_PARTNER"] = "Charity_Partner";
6814
- EnumPartnerType22["MEDIA_PARTNER"] = "Media_Partner";
6815
- EnumPartnerType22["SUPPORTING_PARTNER"] = "Supporting_Partner";
6816
- return EnumPartnerType22;
6710
+ var EnumPartnerType = /* @__PURE__ */ ((EnumPartnerType3) => {
6711
+ EnumPartnerType3["CHARITY_PARTNER"] = "Charity_Partner";
6712
+ EnumPartnerType3["MEDIA_PARTNER"] = "Media_Partner";
6713
+ EnumPartnerType3["SUPPORTING_PARTNER"] = "Supporting_Partner";
6714
+ return EnumPartnerType3;
6817
6715
  })(EnumPartnerType || {});
6818
6716
  var EnumOSPlatform = /* @__PURE__ */ ((EnumOSPlatform22) => {
6819
6717
  EnumOSPlatform22["ANDROID"] = "android";
@@ -6861,6 +6759,7 @@ var EnumNotificationType = /* @__PURE__ */ ((EnumNotificationType22) => {
6861
6759
  return EnumNotificationType22;
6862
6760
  })(EnumNotificationType || {});
6863
6761
  var EnumRegions = /* @__PURE__ */ ((EnumRegions22) => {
6762
+ EnumRegions22["All"] = "All Regions";
6864
6763
  EnumRegions22["Auckland"] = "Auckland";
6865
6764
  EnumRegions22["BayOfPlentyGisborne"] = "Bay of Plenty & Gisborne";
6866
6765
  EnumRegions22["CanterburyWestCoast"] = "Canterbury & West Coast";
@@ -9124,6 +9023,29 @@ var GET_CHATS_BY_REGION = gql`
9124
9023
  }
9125
9024
  ${CHAT_FIELDS_FRAGMENT}
9126
9025
  `;
9026
+ var CHAT_REPORT_FIELDS_FRAGMENT = gql`
9027
+ fragment ChatReportFields on ReportChatUserType {
9028
+ _id
9029
+ chatId
9030
+ createdAt
9031
+ reason {
9032
+ reasonType
9033
+ details
9034
+ }
9035
+ reportedUserId
9036
+ reporterUserId
9037
+ resolved
9038
+ updatedAt
9039
+ }
9040
+ `;
9041
+ var GET_REPORTED_CHAT_USERS = gql`
9042
+ query getReportedChatUsers {
9043
+ reportedChatUsers {
9044
+ ...ChatReportFields
9045
+ }
9046
+ }
9047
+ ${CHAT_REPORT_FIELDS_FRAGMENT}
9048
+ `;
9127
9049
  var SEND_CHAT_MESSAGE_MUTATION = gql`
9128
9050
  mutation sendChatMessage($_id: ID!, $input: ChatMessageInputType!) {
9129
9051
  sendChatMessage(_id: $_id, input: $input) {
@@ -9169,6 +9091,14 @@ var MARK_CHAT_MESSAGES_SEEN_MUTATION = gql`
9169
9091
  }
9170
9092
  ${CHAT_FIELDS_FRAGMENT}
9171
9093
  `;
9094
+ var REPORT_CHAT_USER_MUTATION = gql`
9095
+ mutation reportChatUser($input: ReportChatUserInputType!) {
9096
+ reportChatUser(input: $input) {
9097
+ ...ChatReportFields
9098
+ }
9099
+ }
9100
+ ${CHAT_REPORT_FIELDS_FRAGMENT}
9101
+ `;
9172
9102
  var GET_CHAT_MESSAGE = gql`
9173
9103
  subscription {
9174
9104
  getChatMessage {
@@ -9747,6 +9677,18 @@ var REMOVE_USER_PRESENT_RESOURCE_MUTATION = gql`
9747
9677
  }
9748
9678
  ${USER_FIELDS_FRAGMENT}
9749
9679
  `;
9680
+ var SELECT_STANDARD_PACKAGE_MUTATION = gql`
9681
+ mutation selectStandardPackage($selectedLicence: LicencesEnumType!) {
9682
+ selectStandardPackage(selectedLicence: $selectedLicence) {
9683
+ licences {
9684
+ ...LicenceFields
9685
+ }
9686
+ userId
9687
+ message
9688
+ }
9689
+ }
9690
+ ${LICENCE_FIELDS_FRAGMENT}
9691
+ `;
9750
9692
  var AD_FIELDS_FRAGMENT = gql`
9751
9693
  fragment AdFields on AdType {
9752
9694
  _id
@@ -9897,13 +9839,11 @@ var CREATE_CUSTOMER_PORTAL = gql`
9897
9839
  var SELECT_PACKAGE_MUTATION = gql`
9898
9840
  mutation selectPackage(
9899
9841
  $billingPeriod: BillingPeriodEnumType
9900
- $removedLicence: LicencesEnumType
9901
9842
  $selectedLicence: LicencesEnumType!
9902
9843
  $useStripe: Boolean
9903
9844
  ) {
9904
9845
  selectPackage(
9905
9846
  billingPeriod: $billingPeriod
9906
- removedLicence: $removedLicence
9907
9847
  selectedLicence: $selectedLicence
9908
9848
  useStripe: $useStripe
9909
9849
  ) {
@@ -10022,6 +9962,10 @@ var POST_FIELDS_FRAGMENT = gql`
10022
9962
  createdAt
10023
9963
  deletedAt
10024
9964
  postType
9965
+ resource {
9966
+ resourceId
9967
+ resourceType
9968
+ }
10025
9969
  tags
10026
9970
  title
10027
9971
  updatedAt
@@ -10327,14 +10271,17 @@ var eventSchema = globalResourceSchema.shape({
10327
10271
  return true;
10328
10272
  }
10329
10273
  ),
10330
- eventType: create$8().oneOf(Object.values(EnumEventType)).required("Please select an Event type"),
10274
+ eventType: create$8().oneOf(Object.values(EnumEventType), "Please select a valid Event type").required("Please select an Event type"),
10331
10275
  location: locationSchema,
10332
10276
  nzbn: create$6().required("NZBN is required").matches(nzbnRegex, "NZBN must be 13 digits and start with 94"),
10333
10277
  rainOrShine: create$7().label("Rain or Shine").required("Please specify if the event is rain or shine"),
10334
10278
  tags: create$2().of(create$6().defined()).min(1, "Tags are required").required("Tags are required")
10335
10279
  });
10336
10280
  var paymentInfoSchema = create$3({
10337
- paymentMethod: create$8().oneOf(Object.values(EnumPaymentMethod)).required("Please select a Payment method"),
10281
+ paymentMethod: create$8().oneOf(
10282
+ Object.values(EnumPaymentMethod),
10283
+ "Please select a valid Payment method"
10284
+ ).required("Please select a Payment method"),
10338
10285
  accountHolderName: create$6().when("paymentMethod", {
10339
10286
  is: "bank_transfer",
10340
10287
  then: (schema14) => schema14.required("Account holder name is required for bank transfer").trim(),
@@ -10367,7 +10314,7 @@ var eventInfoSchema = create$3().shape({
10367
10314
  return value < applicationDeadlineHours;
10368
10315
  }
10369
10316
  ),
10370
- paymentInfo: create$2().of(paymentInfoSchema).min(1, "At least one payment info is required").required("Payment info is required")
10317
+ paymentInfo: create$2().of(paymentInfoSchema).min(1, "At least one payment method is required").required("Payment info is required")
10371
10318
  });
10372
10319
  var vendroMenuSchema = create$3().shape({
10373
10320
  description: create$6().trim().nullable().defined().test(
@@ -10696,7 +10643,7 @@ var adSchema = create$3().shape({
10696
10643
  var partnerSchema = globalResourceSchema.shape({
10697
10644
  location: locationSchema,
10698
10645
  nzbn: create$6().required("NZBN is required").matches(nzbnRegex, "NZBN must be 13 digits and start with 94"),
10699
- partnerType: create$8().oneOf(Object.values(EnumPartnerType)).required("Please select a Partner type")
10646
+ partnerType: create$8().oneOf(Object.values(EnumPartnerType), "Please select a valid Partner type").required("Please select a Partner type")
10700
10647
  });
10701
10648
  var EnumPostType = /* @__PURE__ */ ((EnumPostType2) => {
10702
10649
  EnumPostType2["DAILY_MEETS"] = "daily_meets";
@@ -10722,6 +10669,10 @@ var postSchema = create$3().shape({
10722
10669
  caption: create$6().required(),
10723
10670
  content: create$2().of(postContentSchema).required(),
10724
10671
  postType: create$8().oneOf(Object.values(EnumPostType)).required(),
10672
+ resource: create$3({
10673
+ resourceId: create$6().required(),
10674
+ resourceType: create$8().oneOf(Object.values(EnumResourceType)).required()
10675
+ }).nullable().optional(),
10725
10676
  tags: create$2().of(create$6().required()).nullable().optional(),
10726
10677
  title: create$6().required()
10727
10678
  });
@@ -10775,14 +10726,13 @@ var defaultPartnerFormValues = {
10775
10726
  ...globalDefaultValues,
10776
10727
  location: defaultLocation,
10777
10728
  nzbn: "",
10778
- partnerType: "Charity_Partner"
10779
- /* CHARITY_PARTNER */
10729
+ partnerType: ""
10780
10730
  };
10781
10731
  var defaultEventFormValues = {
10782
10732
  ...globalDefaultValues,
10783
10733
  claimed: true,
10784
10734
  dateTime: [],
10785
- eventType: "Market",
10735
+ eventType: "",
10786
10736
  googlePlaceId: null,
10787
10737
  location: defaultLocation,
10788
10738
  nzbn: "",
@@ -11253,7 +11203,7 @@ schema2.index({
11253
11203
  });
11254
11204
  var AdModel = mongoose4.models.Ad || mongoose4.model("Ad", schema2);
11255
11205
 
11256
- // src/mongoose/Chat.ts
11206
+ // src/mongoose/chat/Chat.ts
11257
11207
  import mongoose5 from "mongoose";
11258
11208
  var MongooseSchema5 = mongoose5.Schema;
11259
11209
  var MessageReplyPreviewSchema = new MongooseSchema5(
@@ -11353,10 +11303,50 @@ ChatSchema.index({
11353
11303
  });
11354
11304
  var ChatModel = mongoose5.models.Chat || mongoose5.model("Chat", ChatSchema);
11355
11305
 
11356
- // src/mongoose/GoogleImportedMarket.ts
11306
+ // src/mongoose/chat/ChatReport.ts
11357
11307
  import mongoose6 from "mongoose";
11358
11308
  var MongooseSchema6 = mongoose6.Schema;
11359
- var addressComponentSchema = new MongooseSchema6(
11309
+ var ReasonSchema = new MongooseSchema6(
11310
+ {
11311
+ details: { default: null, required: false, type: String },
11312
+ reasonType: {
11313
+ enum: Object.values(EnumChatReportReason),
11314
+ required: true,
11315
+ type: String
11316
+ }
11317
+ },
11318
+ { _id: false }
11319
+ );
11320
+ var ChatReportSchema = new MongooseSchema6(
11321
+ {
11322
+ chatId: {
11323
+ ref: "Chat",
11324
+ required: true,
11325
+ type: mongoose6.Schema.Types.ObjectId
11326
+ },
11327
+ reason: { required: true, type: ReasonSchema },
11328
+ reportedUserId: {
11329
+ ref: "User",
11330
+ required: true,
11331
+ type: mongoose6.Schema.Types.ObjectId
11332
+ },
11333
+ reporterUserId: {
11334
+ ref: "User",
11335
+ required: true,
11336
+ type: mongoose6.Schema.Types.ObjectId
11337
+ },
11338
+ resolved: { default: false, required: true, type: Boolean }
11339
+ },
11340
+ { timestamps: true }
11341
+ );
11342
+ ChatReportSchema.index({ chatId: 1, reportedUserId: 1 });
11343
+ ChatReportSchema.index({ createdAt: -1, reporterUserId: 1 });
11344
+ var ChatReportModel = mongoose6.models.ChatReport || mongoose6.model("ChatReport", ChatReportSchema);
11345
+
11346
+ // src/mongoose/GoogleImportedMarket.ts
11347
+ import mongoose7 from "mongoose";
11348
+ var MongooseSchema7 = mongoose7.Schema;
11349
+ var addressComponentSchema = new MongooseSchema7(
11360
11350
  {
11361
11351
  longName: { required: false, type: String },
11362
11352
  shortName: { required: false, type: String },
@@ -11364,7 +11354,7 @@ var addressComponentSchema = new MongooseSchema6(
11364
11354
  },
11365
11355
  { _id: false }
11366
11356
  );
11367
- var schema3 = new MongooseSchema6(
11357
+ var schema3 = new MongooseSchema7(
11368
11358
  {
11369
11359
  accessibilityOptions: { required: false, type: Object },
11370
11360
  active: { default: false, required: true, type: Boolean },
@@ -11377,7 +11367,7 @@ var schema3 = new MongooseSchema6(
11377
11367
  claimedByUserId: {
11378
11368
  ref: "User",
11379
11369
  required: false,
11380
- type: mongoose6.Schema.Types.ObjectId
11370
+ type: mongoose7.Schema.Types.ObjectId
11381
11371
  },
11382
11372
  cover: {
11383
11373
  required: false,
@@ -11389,7 +11379,7 @@ var schema3 = new MongooseSchema6(
11389
11379
  eventId: {
11390
11380
  ref: "Event",
11391
11381
  required: false,
11392
- type: mongoose6.Schema.Types.ObjectId
11382
+ type: mongoose7.Schema.Types.ObjectId
11393
11383
  },
11394
11384
  eventType: {
11395
11385
  enum: Object.values(EnumEventType),
@@ -11438,12 +11428,12 @@ var schema3 = new MongooseSchema6(
11438
11428
  schema3.index({ "location.geo": "2dsphere" });
11439
11429
  schema3.index({ name: 1 });
11440
11430
  schema3.index({ region: 1 });
11441
- var GoogleImportedMarketModel = mongoose6.models.GoogleImportedMarket || mongoose6.model("GoogleImportedMarket", schema3);
11431
+ var GoogleImportedMarketModel = mongoose7.models.GoogleImportedMarket || mongoose7.model("GoogleImportedMarket", schema3);
11442
11432
 
11443
11433
  // src/mongoose/Notification.ts
11444
- import mongoose7 from "mongoose";
11445
- var MongooseSchema7 = mongoose7.Schema;
11446
- var schema4 = new MongooseSchema7(
11434
+ import mongoose8 from "mongoose";
11435
+ var MongooseSchema8 = mongoose8.Schema;
11436
+ var schema4 = new MongooseSchema8(
11447
11437
  {
11448
11438
  data: {
11449
11439
  resourceId: { required: true, type: String },
@@ -11466,16 +11456,16 @@ var schema4 = new MongooseSchema7(
11466
11456
  userId: {
11467
11457
  ref: "User",
11468
11458
  required: true,
11469
- type: mongoose7.Schema.Types.ObjectId
11459
+ type: mongoose8.Schema.Types.ObjectId
11470
11460
  }
11471
11461
  },
11472
11462
  { timestamps: true }
11473
11463
  );
11474
11464
  schema4.index({ isRead: 1, userId: 1 });
11475
11465
  schema4.index({ createdAt: -1, userId: 1 });
11476
- var NotificationModel = mongoose7.models.Notification || mongoose7.model("Notification", schema4);
11466
+ var NotificationModel = mongoose8.models.Notification || mongoose8.model("Notification", schema4);
11477
11467
 
11478
- // node_modules/@timardex/cluemart-shared/dist/chunk-R5HMLIJS.mjs
11468
+ // node_modules/@timardex/cluemart-shared/dist/chunk-Z6FJKHRH.mjs
11479
11469
  var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
11480
11470
  EnumOSPlatform22["ANDROID"] = "android";
11481
11471
  EnumOSPlatform22["IOS"] = "ios";
@@ -11484,9 +11474,9 @@ var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
11484
11474
  })(EnumOSPlatform2 || {});
11485
11475
 
11486
11476
  // src/mongoose/PushToken.ts
11487
- import mongoose8 from "mongoose";
11488
- var MongooseSchema8 = mongoose8.Schema;
11489
- var schema5 = new MongooseSchema8(
11477
+ import mongoose9 from "mongoose";
11478
+ var MongooseSchema9 = mongoose9.Schema;
11479
+ var schema5 = new MongooseSchema9(
11490
11480
  {
11491
11481
  platform: {
11492
11482
  enum: Object.values(EnumOSPlatform2),
@@ -11494,16 +11484,16 @@ var schema5 = new MongooseSchema8(
11494
11484
  type: String
11495
11485
  },
11496
11486
  token: { required: true, type: String },
11497
- userId: { required: true, type: mongoose8.Schema.Types.ObjectId }
11487
+ userId: { required: true, type: mongoose9.Schema.Types.ObjectId }
11498
11488
  },
11499
11489
  { timestamps: true }
11500
11490
  );
11501
- var PushTokenModel = mongoose8.models.PushToken || mongoose8.model("PushToken", schema5);
11491
+ var PushTokenModel = mongoose9.models.PushToken || mongoose9.model("PushToken", schema5);
11502
11492
 
11503
11493
  // src/mongoose/ResourceActivity.ts
11504
- import mongoose9 from "mongoose";
11505
- var MongooseSchema9 = mongoose9.Schema;
11506
- var ActivitySchema = new MongooseSchema9(
11494
+ import mongoose10 from "mongoose";
11495
+ var MongooseSchema10 = mongoose10.Schema;
11496
+ var ActivitySchema = new MongooseSchema10(
11507
11497
  {
11508
11498
  activityType: {
11509
11499
  enum: Object.values(EnumActivity),
@@ -11531,7 +11521,7 @@ var ActivitySchema = new MongooseSchema9(
11531
11521
  },
11532
11522
  { _id: false }
11533
11523
  );
11534
- var schema6 = new MongooseSchema9(
11524
+ var schema6 = new MongooseSchema10(
11535
11525
  {
11536
11526
  activity: { default: [], type: [ActivitySchema] },
11537
11527
  resourceId: { required: true, type: String },
@@ -11545,12 +11535,12 @@ var schema6 = new MongooseSchema9(
11545
11535
  );
11546
11536
  schema6.index({ resourceId: 1, resourceType: 1 }, { unique: true });
11547
11537
  schema6.index({ "views.location": "2dsphere" });
11548
- var ResourceActivityModel = mongoose9.models.ResourceActivity || mongoose9.model("ResourceActivity", schema6);
11538
+ var ResourceActivityModel = mongoose10.models.ResourceActivity || mongoose10.model("ResourceActivity", schema6);
11549
11539
 
11550
11540
  // src/mongoose/Tester.ts
11551
- import mongoose10 from "mongoose";
11552
- var MongooseSchema10 = mongoose10.Schema;
11553
- var TesterVendorQuestionarySchema = new MongooseSchema10(
11541
+ import mongoose11 from "mongoose";
11542
+ var MongooseSchema11 = mongoose11.Schema;
11543
+ var TesterVendorQuestionarySchema = new MongooseSchema11(
11554
11544
  {
11555
11545
  appearInVideoIntroduction: {
11556
11546
  default: false,
@@ -11577,7 +11567,7 @@ var TesterVendorQuestionarySchema = new MongooseSchema10(
11577
11567
  },
11578
11568
  { _id: false }
11579
11569
  );
11580
- var TesterVendorSchema = new MongooseSchema10(
11570
+ var TesterVendorSchema = new MongooseSchema11(
11581
11571
  {
11582
11572
  categories: { required: true, type: [CategorySchema] },
11583
11573
  marketsAttended: {
@@ -11603,7 +11593,7 @@ var TesterVendorSchema = new MongooseSchema10(
11603
11593
  },
11604
11594
  { _id: false }
11605
11595
  );
11606
- var TesterEventQuestionarySchema = new MongooseSchema10(
11596
+ var TesterEventQuestionarySchema = new MongooseSchema11(
11607
11597
  {
11608
11598
  allowMarketingAppearance: {
11609
11599
  default: false,
@@ -11638,7 +11628,7 @@ var TesterEventQuestionarySchema = new MongooseSchema10(
11638
11628
  },
11639
11629
  { _id: false }
11640
11630
  );
11641
- var TesterEventsSchema = new MongooseSchema10(
11631
+ var TesterEventsSchema = new MongooseSchema11(
11642
11632
  {
11643
11633
  markets: {
11644
11634
  required: true,
@@ -11667,7 +11657,7 @@ var TesterEventsSchema = new MongooseSchema10(
11667
11657
  },
11668
11658
  { _id: false }
11669
11659
  );
11670
- var TesterSchema = new MongooseSchema10(
11660
+ var TesterSchema = new MongooseSchema11(
11671
11661
  {
11672
11662
  active: { default: false, required: true, type: Boolean },
11673
11663
  approved: { default: false, required: true, type: Boolean },
@@ -11701,43 +11691,43 @@ var TesterSchema = new MongooseSchema10(
11701
11691
  timestamps: true
11702
11692
  }
11703
11693
  );
11704
- var TesterModel = mongoose10.models.Tester || mongoose10.model("Tester", TesterSchema);
11694
+ var TesterModel = mongoose11.models.Tester || mongoose11.model("Tester", TesterSchema);
11705
11695
 
11706
11696
  // src/mongoose/User.ts
11707
- import mongoose11 from "mongoose";
11708
- var MongooseSchema11 = mongoose11.Schema;
11709
- var userActivityEventSchema = new MongooseSchema11(
11697
+ import mongoose12 from "mongoose";
11698
+ var MongooseSchema12 = mongoose12.Schema;
11699
+ var userActivityEventSchema = new MongooseSchema12(
11710
11700
  {
11711
11701
  dateTime: dateTimeSchema3,
11712
11702
  resourceId: {
11713
11703
  ref: "Event",
11714
11704
  required: false,
11715
- type: mongoose11.Schema.Types.ObjectId
11705
+ type: mongoose12.Schema.Types.ObjectId
11716
11706
  }
11717
11707
  },
11718
11708
  { _id: false }
11719
11709
  );
11720
- var userActivityFavouritesSchema = new MongooseSchema11(
11710
+ var userActivityFavouritesSchema = new MongooseSchema12(
11721
11711
  {
11722
11712
  events: {
11723
11713
  ref: "Event",
11724
11714
  required: false,
11725
- type: [mongoose11.Schema.Types.ObjectId]
11715
+ type: [mongoose12.Schema.Types.ObjectId]
11726
11716
  },
11727
11717
  partners: {
11728
11718
  ref: "Partner",
11729
11719
  required: false,
11730
- type: [mongoose11.Schema.Types.ObjectId]
11720
+ type: [mongoose12.Schema.Types.ObjectId]
11731
11721
  },
11732
11722
  vendors: {
11733
11723
  ref: "Vendor",
11734
11724
  required: false,
11735
- type: [mongoose11.Schema.Types.ObjectId]
11725
+ type: [mongoose12.Schema.Types.ObjectId]
11736
11726
  }
11737
11727
  },
11738
11728
  { _id: false }
11739
11729
  );
11740
- var stripeSchema = new MongooseSchema11(
11730
+ var stripeSchema = new MongooseSchema12(
11741
11731
  {
11742
11732
  currentPlan: {
11743
11733
  enum: Object.values(EnumUserLicence),
@@ -11768,7 +11758,7 @@ var stripeSchema = new MongooseSchema11(
11768
11758
  },
11769
11759
  { _id: false }
11770
11760
  );
11771
- var schema7 = new MongooseSchema11(
11761
+ var schema7 = new MongooseSchema12(
11772
11762
  {
11773
11763
  active: { default: false, required: true, type: Boolean },
11774
11764
  associates: {
@@ -11784,7 +11774,7 @@ var schema7 = new MongooseSchema11(
11784
11774
  events: {
11785
11775
  ref: "Event",
11786
11776
  required: false,
11787
- type: [mongoose11.Schema.Types.ObjectId]
11777
+ type: [mongoose12.Schema.Types.ObjectId]
11788
11778
  },
11789
11779
  firstName: { required: true, type: String },
11790
11780
  isTester: { default: false, required: true, type: Boolean },
@@ -11796,7 +11786,7 @@ var schema7 = new MongooseSchema11(
11796
11786
  partner: {
11797
11787
  ref: "Partner",
11798
11788
  required: false,
11799
- type: mongoose11.Schema.Types.ObjectId
11789
+ type: mongoose12.Schema.Types.ObjectId
11800
11790
  },
11801
11791
  password: { required: true, type: String },
11802
11792
  platform: {
@@ -11841,7 +11831,7 @@ var schema7 = new MongooseSchema11(
11841
11831
  vendor: {
11842
11832
  ref: "Vendor",
11843
11833
  required: false,
11844
- type: mongoose11.Schema.Types.ObjectId
11834
+ type: mongoose12.Schema.Types.ObjectId
11845
11835
  }
11846
11836
  },
11847
11837
  { strict: false, timestamps: true }
@@ -11849,12 +11839,12 @@ var schema7 = new MongooseSchema11(
11849
11839
  schema7.index({ "associates.email": 1 });
11850
11840
  schema7.index({ "licences.expiryDate": 1 });
11851
11841
  schema7.index({ "licences.licenceType": 1 });
11852
- var UserModel = mongoose11.models.User || mongoose11.model("User", schema7);
11842
+ var UserModel = mongoose12.models.User || mongoose12.model("User", schema7);
11853
11843
 
11854
11844
  // src/mongoose/VerificationToken.ts
11855
- import mongoose12 from "mongoose";
11856
- var MongooseSchema12 = mongoose12.Schema;
11857
- var schema8 = new MongooseSchema12(
11845
+ import mongoose13 from "mongoose";
11846
+ var MongooseSchema13 = mongoose13.Schema;
11847
+ var schema8 = new MongooseSchema13(
11858
11848
  {
11859
11849
  createdAt: {
11860
11850
  default: Date.now,
@@ -11869,12 +11859,12 @@ var schema8 = new MongooseSchema12(
11869
11859
  },
11870
11860
  { timestamps: true }
11871
11861
  );
11872
- var VerificationTokenModel = mongoose12.models.VerificationToken || mongoose12.model("VerificationToken", schema8);
11862
+ var VerificationTokenModel = mongoose13.models.VerificationToken || mongoose13.model("VerificationToken", schema8);
11873
11863
 
11874
11864
  // src/mongoose/vendor/Vendor.ts
11875
- import mongoose13 from "mongoose";
11876
- var MongooseSchema13 = mongoose13.Schema;
11877
- var MenuTypeSchema = new MongooseSchema13(
11865
+ import mongoose14 from "mongoose";
11866
+ var MongooseSchema14 = mongoose14.Schema;
11867
+ var MenuTypeSchema = new MongooseSchema14(
11878
11868
  {
11879
11869
  description: { required: false, type: String },
11880
11870
  name: { required: false, type: String },
@@ -11884,7 +11874,7 @@ var MenuTypeSchema = new MongooseSchema13(
11884
11874
  { _id: false }
11885
11875
  // Prevents Mongoose from creating an additional _id field for subdocuments
11886
11876
  );
11887
- var LocationsSchema = new MongooseSchema13(
11877
+ var LocationsSchema = new MongooseSchema14(
11888
11878
  {
11889
11879
  dateTime: {
11890
11880
  dateStatus: {
@@ -11906,7 +11896,7 @@ var LocationsSchema = new MongooseSchema13(
11906
11896
  { _id: false }
11907
11897
  // Prevents Mongoose from creating an additional _id field for subdocuments
11908
11898
  );
11909
- var schema9 = new MongooseSchema13(
11899
+ var schema9 = new MongooseSchema14(
11910
11900
  {
11911
11901
  ...baseResourceFields,
11912
11902
  // Importing base resource fields from global.ts
@@ -11928,7 +11918,7 @@ var schema9 = new MongooseSchema13(
11928
11918
  vendorInfoId: {
11929
11919
  ref: "VendorInfo",
11930
11920
  required: false,
11931
- type: mongoose13.Schema.Types.ObjectId
11921
+ type: mongoose14.Schema.Types.ObjectId
11932
11922
  },
11933
11923
  vendorType: {
11934
11924
  enum: Object.values(EnumVendorType),
@@ -11943,19 +11933,19 @@ schema9.index({ description: 1 });
11943
11933
  schema9.index({ region: 1 });
11944
11934
  schema9.index({ "categories.name": 1 });
11945
11935
  schema9.index({ "associates.email": 1 });
11946
- var VendorModel = mongoose13.models.Vendor || mongoose13.model("Vendor", schema9);
11936
+ var VendorModel = mongoose14.models.Vendor || mongoose14.model("Vendor", schema9);
11947
11937
 
11948
11938
  // src/mongoose/vendor/VendorInfo.ts
11949
- import mongoose14 from "mongoose";
11950
- var MongooseSchema14 = mongoose14.Schema;
11951
- var AttributesSchema = new MongooseSchema14(
11939
+ import mongoose15 from "mongoose";
11940
+ var MongooseSchema15 = mongoose15.Schema;
11941
+ var AttributesSchema = new MongooseSchema15(
11952
11942
  {
11953
11943
  details: { required: false, type: String },
11954
11944
  isRequired: { default: false, required: true, type: Boolean }
11955
11945
  },
11956
11946
  { _id: false }
11957
11947
  );
11958
- var schema10 = new MongooseSchema14(
11948
+ var schema10 = new MongooseSchema15(
11959
11949
  {
11960
11950
  compliance: {
11961
11951
  foodBeverageLicense: { default: false, required: false, type: Boolean },
@@ -11989,17 +11979,17 @@ var schema10 = new MongooseSchema14(
11989
11979
  vendorId: {
11990
11980
  ref: "Vendor",
11991
11981
  required: true,
11992
- type: mongoose14.Schema.Types.ObjectId
11982
+ type: mongoose15.Schema.Types.ObjectId
11993
11983
  }
11994
11984
  },
11995
11985
  { timestamps: true }
11996
11986
  );
11997
- var VendorInfoModel = mongoose14.models.VendorInfo || mongoose14.model("VendorInfo", schema10);
11987
+ var VendorInfoModel = mongoose15.models.VendorInfo || mongoose15.model("VendorInfo", schema10);
11998
11988
 
11999
11989
  // src/mongoose/event/Event.ts
12000
- import mongoose15 from "mongoose";
12001
- var MongooseSchema15 = mongoose15.Schema;
12002
- var schema11 = new MongooseSchema15(
11990
+ import mongoose16 from "mongoose";
11991
+ var MongooseSchema16 = mongoose16.Schema;
11992
+ var schema11 = new MongooseSchema16(
12003
11993
  {
12004
11994
  ...baseResourceFields,
12005
11995
  // Importing base resource fields from global.ts
@@ -12008,7 +11998,7 @@ var schema11 = new MongooseSchema15(
12008
11998
  eventInfoId: {
12009
11999
  ref: "EventInfo",
12010
12000
  required: false,
12011
- type: mongoose15.Schema.Types.ObjectId
12001
+ type: mongoose16.Schema.Types.ObjectId
12012
12002
  },
12013
12003
  eventType: {
12014
12004
  enum: Object.values(EnumEventType),
@@ -12042,12 +12032,12 @@ schema11.index({ region: 1 });
12042
12032
  schema11.index({ "location.geo": "2dsphere" });
12043
12033
  schema11.index({ tags: 1 });
12044
12034
  schema11.index({ "associates.email": 1 });
12045
- var EventModel = mongoose15.models.Event || mongoose15.model("Event", schema11);
12035
+ var EventModel = mongoose16.models.Event || mongoose16.model("Event", schema11);
12046
12036
 
12047
12037
  // src/mongoose/Partner.ts
12048
- import mongoose16 from "mongoose";
12049
- var MongooseSchema16 = mongoose16.Schema;
12050
- var schema12 = new MongooseSchema16(
12038
+ import mongoose17 from "mongoose";
12039
+ var MongooseSchema17 = mongoose17.Schema;
12040
+ var schema12 = new MongooseSchema17(
12051
12041
  {
12052
12042
  ...baseResourceFields,
12053
12043
  location: {
@@ -12068,12 +12058,12 @@ schema12.index({ description: 1 });
12068
12058
  schema12.index({ region: 1 });
12069
12059
  schema12.index({ "location.geo": "2dsphere" });
12070
12060
  schema12.index({ "associates.email": 1 });
12071
- var PartnerModel = mongoose16.models.Partner || mongoose16.model("Partner", schema12);
12061
+ var PartnerModel = mongoose17.models.Partner || mongoose17.model("Partner", schema12);
12072
12062
 
12073
12063
  // src/mongoose/Post.ts
12074
- import mongoose17, { Schema as Schema2 } from "mongoose";
12075
- var MongooseSchema17 = mongoose17.Schema;
12076
- var contentSchema = new MongooseSchema17(
12064
+ import mongoose18, { Schema as Schema2 } from "mongoose";
12065
+ var MongooseSchema18 = mongoose18.Schema;
12066
+ var contentSchema = new MongooseSchema18(
12077
12067
  {
12078
12068
  contentData: Schema2.Types.Mixed,
12079
12069
  contentOrder: { required: true, type: Number },
@@ -12085,7 +12075,7 @@ var contentSchema = new MongooseSchema17(
12085
12075
  },
12086
12076
  { _id: false }
12087
12077
  );
12088
- var schema13 = new MongooseSchema17(
12078
+ var schema13 = new MongooseSchema18(
12089
12079
  {
12090
12080
  active: { default: true, required: true, type: Boolean },
12091
12081
  caption: { required: true, type: String },
@@ -12096,6 +12086,17 @@ var schema13 = new MongooseSchema17(
12096
12086
  required: true,
12097
12087
  type: String
12098
12088
  },
12089
+ resource: {
12090
+ required: false,
12091
+ type: {
12092
+ resourceId: { required: true, type: Schema2.Types.ObjectId },
12093
+ resourceType: {
12094
+ enum: Object.values(EnumResourceType),
12095
+ required: true,
12096
+ type: String
12097
+ }
12098
+ }
12099
+ },
12099
12100
  tags: { default: [], required: false, type: [String] },
12100
12101
  title: { required: true, type: String }
12101
12102
  },
@@ -12103,13 +12104,13 @@ var schema13 = new MongooseSchema17(
12103
12104
  );
12104
12105
  schema13.index({ title: 1 });
12105
12106
  schema13.index({ tags: 1 });
12106
- var PostModel = mongoose17.models.Post || mongoose17.model("Post", schema13);
12107
+ var PostModel = mongoose18.models.Post || mongoose18.model("Post", schema13);
12107
12108
 
12108
12109
  // src/mongoose/AppSetting.ts
12109
- import mongoose18 from "mongoose";
12110
- var MongooseSchema18 = mongoose18.Schema;
12110
+ import mongoose19 from "mongoose";
12111
+ var MongooseSchema19 = mongoose19.Schema;
12111
12112
  var APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
12112
- var AppSettingSchema = new MongooseSchema18(
12113
+ var AppSettingSchema = new MongooseSchema19(
12113
12114
  {
12114
12115
  appVersion: { default: "1.0.1", required: true, type: String },
12115
12116
  isOfflineMode: { default: false, required: true, type: Boolean },
@@ -12125,7 +12126,7 @@ var AppSettingSchema = new MongooseSchema18(
12125
12126
  },
12126
12127
  { timestamps: true }
12127
12128
  );
12128
- var AppSettingModel = mongoose18.models.AppSetting || mongoose18.model("AppSetting", AppSettingSchema);
12129
+ var AppSettingModel = mongoose19.models.AppSetting || mongoose19.model("AppSetting", AppSettingSchema);
12129
12130
 
12130
12131
  export {
12131
12132
  EnumAdStatus,
@@ -12148,6 +12149,7 @@ export {
12148
12149
  AdModel,
12149
12150
  ParticipantSchema,
12150
12151
  ChatModel,
12152
+ ChatReportModel,
12151
12153
  GoogleImportedMarketModel,
12152
12154
  NotificationModel,
12153
12155
  PushTokenModel,
@@ -12187,4 +12189,4 @@ react/cjs/react.development.js:
12187
12189
  * LICENSE file in the root directory of this source tree.
12188
12190
  *)
12189
12191
  */
12190
- //# sourceMappingURL=chunk-6TLM3TPY.mjs.map
12192
+ //# sourceMappingURL=chunk-OAZFO6PX.mjs.map