@timardex/cluemart-server-shared 1.0.131 → 1.0.133

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4656,10 +4656,10 @@ var Condition = class _Condition {
4656
4656
  otherwise
4657
4657
  } = config;
4658
4658
  let check = typeof is === "function" ? is : (...values) => values.every((value) => value === is);
4659
- return new _Condition(refs, (values, schema15) => {
4659
+ return new _Condition(refs, (values, schema16) => {
4660
4660
  var _branch;
4661
4661
  let branch = check(...values) ? then : otherwise;
4662
- return (_branch = branch == null ? void 0 : branch(schema15)) != null ? _branch : schema15;
4662
+ return (_branch = branch == null ? void 0 : branch(schema16)) != null ? _branch : schema16;
4663
4663
  });
4664
4664
  }
4665
4665
  constructor(refs, builder) {
@@ -4673,13 +4673,13 @@ var Condition = class _Condition {
4673
4673
  // TODO: ? operator here?
4674
4674
  ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context)
4675
4675
  ));
4676
- let schema15 = this.fn(values, base, options);
4677
- if (schema15 === void 0 || // @ts-ignore this can be base
4678
- schema15 === base) {
4676
+ let schema16 = this.fn(values, base, options);
4677
+ if (schema16 === void 0 || // @ts-ignore this can be base
4678
+ schema16 === base) {
4679
4679
  return base;
4680
4680
  }
4681
- if (!isSchema(schema15)) throw new TypeError("conditions must return a schema object");
4682
- return schema15.resolve(options);
4681
+ if (!isSchema(schema16)) throw new TypeError("conditions must return a schema object");
4682
+ return schema16.resolve(options);
4683
4683
  }
4684
4684
  };
4685
4685
  var prefixes = {
@@ -4749,7 +4749,7 @@ function createValidation(config) {
4749
4749
  path = "",
4750
4750
  options,
4751
4751
  originalValue,
4752
- schema: schema15
4752
+ schema: schema16
4753
4753
  }, panic, next) {
4754
4754
  const {
4755
4755
  name,
@@ -4761,8 +4761,8 @@ function createValidation(config) {
4761
4761
  let {
4762
4762
  parent,
4763
4763
  context,
4764
- abortEarly = schema15.spec.abortEarly,
4765
- disableStackTrace = schema15.spec.disableStackTrace
4764
+ abortEarly = schema16.spec.abortEarly,
4765
+ disableStackTrace = schema16.spec.disableStackTrace
4766
4766
  } = options;
4767
4767
  function resolve(item) {
4768
4768
  return Reference.isRef(item) ? item.getValue(value, parent, context) : item;
@@ -4771,9 +4771,9 @@ function createValidation(config) {
4771
4771
  const nextParams = Object.assign({
4772
4772
  value,
4773
4773
  originalValue,
4774
- label: schema15.spec.label,
4774
+ label: schema16.spec.label,
4775
4775
  path: overrides.path || path,
4776
- spec: schema15.spec,
4776
+ spec: schema16.spec,
4777
4777
  disableStackTrace: overrides.disableStackTrace || disableStackTrace
4778
4778
  }, params, overrides.params);
4779
4779
  for (const key of Object.keys(nextParams)) nextParams[key] = resolve(nextParams[key]);
@@ -4791,7 +4791,7 @@ function createValidation(config) {
4791
4791
  resolve,
4792
4792
  options,
4793
4793
  originalValue,
4794
- schema: schema15
4794
+ schema: schema16
4795
4795
  };
4796
4796
  const handleResult = (validOrError) => {
4797
4797
  if (ValidationError.isError(validOrError)) invalid(validOrError);
@@ -4825,42 +4825,42 @@ function createValidation(config) {
4825
4825
  validate.OPTIONS = config;
4826
4826
  return validate;
4827
4827
  }
4828
- function getIn(schema15, path, value, context = value) {
4828
+ function getIn(schema16, path, value, context = value) {
4829
4829
  let parent, lastPart, lastPartDebug;
4830
4830
  if (!path) return {
4831
4831
  parent,
4832
4832
  parentPath: path,
4833
- schema: schema15
4833
+ schema: schema16
4834
4834
  };
4835
4835
  (0, import_property_expr.forEach)(path, (_part, isBracket, isArray) => {
4836
4836
  let part = isBracket ? _part.slice(1, _part.length - 1) : _part;
4837
- schema15 = schema15.resolve({
4837
+ schema16 = schema16.resolve({
4838
4838
  context,
4839
4839
  parent,
4840
4840
  value
4841
4841
  });
4842
- let isTuple = schema15.type === "tuple";
4842
+ let isTuple = schema16.type === "tuple";
4843
4843
  let idx = isArray ? parseInt(part, 10) : 0;
4844
- if (schema15.innerType || isTuple) {
4844
+ if (schema16.innerType || isTuple) {
4845
4845
  if (isTuple && !isArray) throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${lastPartDebug}" must contain an index to the tuple element, e.g. "${lastPartDebug}[0]"`);
4846
4846
  if (value && idx >= value.length) {
4847
4847
  throw new Error(`Yup.reach cannot resolve an array item at index: ${_part}, in the path: ${path}. because there is no value at that index. `);
4848
4848
  }
4849
4849
  parent = value;
4850
4850
  value = value && value[idx];
4851
- schema15 = isTuple ? schema15.spec.types[idx] : schema15.innerType;
4851
+ schema16 = isTuple ? schema16.spec.types[idx] : schema16.innerType;
4852
4852
  }
4853
4853
  if (!isArray) {
4854
- if (!schema15.fields || !schema15.fields[part]) throw new Error(`The schema does not contain the path: ${path}. (failed at: ${lastPartDebug} which is a type: "${schema15.type}")`);
4854
+ if (!schema16.fields || !schema16.fields[part]) throw new Error(`The schema does not contain the path: ${path}. (failed at: ${lastPartDebug} which is a type: "${schema16.type}")`);
4855
4855
  parent = value;
4856
4856
  value = value && value[part];
4857
- schema15 = schema15.fields[part];
4857
+ schema16 = schema16.fields[part];
4858
4858
  }
4859
4859
  lastPart = part;
4860
4860
  lastPartDebug = isBracket ? "[" + _part + "]" : "." + _part;
4861
4861
  });
4862
4862
  return {
4863
- schema: schema15,
4863
+ schema: schema16,
4864
4864
  parent,
4865
4865
  parentPath: lastPart
4866
4866
  };
@@ -4997,20 +4997,20 @@ var Schema = class {
4997
4997
  this._mutate = before;
4998
4998
  return result;
4999
4999
  }
5000
- concat(schema15) {
5001
- if (!schema15 || schema15 === this) return this;
5002
- if (schema15.type !== this.type && this.type !== "mixed") throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema15.type}`);
5000
+ concat(schema16) {
5001
+ if (!schema16 || schema16 === this) return this;
5002
+ if (schema16.type !== this.type && this.type !== "mixed") throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema16.type}`);
5003
5003
  let base = this;
5004
- let combined = schema15.clone();
5004
+ let combined = schema16.clone();
5005
5005
  const mergedSpec = Object.assign({}, base.spec, combined.spec);
5006
5006
  combined.spec = mergedSpec;
5007
5007
  combined.internalTests = Object.assign({}, base.internalTests, combined.internalTests);
5008
- combined._whitelist = base._whitelist.merge(schema15._whitelist, schema15._blacklist);
5009
- combined._blacklist = base._blacklist.merge(schema15._blacklist, schema15._whitelist);
5008
+ combined._whitelist = base._whitelist.merge(schema16._whitelist, schema16._blacklist);
5009
+ combined._blacklist = base._blacklist.merge(schema16._blacklist, schema16._whitelist);
5010
5010
  combined.tests = base.tests;
5011
5011
  combined.exclusiveTests = base.exclusiveTests;
5012
5012
  combined.withMutation((next) => {
5013
- schema15.tests.forEach((fn) => {
5013
+ schema16.tests.forEach((fn) => {
5014
5014
  next.test(fn.OPTIONS);
5015
5015
  });
5016
5016
  });
@@ -5026,15 +5026,15 @@ var Schema = class {
5026
5026
  return this._typeCheck(v);
5027
5027
  }
5028
5028
  resolve(options) {
5029
- let schema15 = this;
5030
- if (schema15.conditions.length) {
5031
- let conditions = schema15.conditions;
5032
- schema15 = schema15.clone();
5033
- schema15.conditions = [];
5034
- schema15 = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema15);
5035
- schema15 = schema15.resolve(options);
5029
+ let schema16 = this;
5030
+ if (schema16.conditions.length) {
5031
+ let conditions = schema16.conditions;
5032
+ schema16 = schema16.clone();
5033
+ schema16.conditions = [];
5034
+ schema16 = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema16);
5035
+ schema16 = schema16.resolve(options);
5036
5036
  }
5037
- return schema15;
5037
+ return schema16;
5038
5038
  }
5039
5039
  resolveOptions(options) {
5040
5040
  var _options$strict, _options$abortEarly, _options$recursive, _options$disableStack;
@@ -5188,11 +5188,11 @@ attempted value: ${formattedValue}
5188
5188
  }
5189
5189
  validate(value, options) {
5190
5190
  var _options$disableStack2;
5191
- let schema15 = this.resolve(Object.assign({}, options, {
5191
+ let schema16 = this.resolve(Object.assign({}, options, {
5192
5192
  value
5193
5193
  }));
5194
- let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema15.spec.disableStackTrace;
5195
- return new Promise((resolve, reject) => schema15._validate(value, options, (error, parsed) => {
5194
+ let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema16.spec.disableStackTrace;
5195
+ return new Promise((resolve, reject) => schema16._validate(value, options, (error, parsed) => {
5196
5196
  if (ValidationError.isError(error)) error.value = parsed;
5197
5197
  reject(error);
5198
5198
  }, (errors, validated) => {
@@ -5202,12 +5202,12 @@ attempted value: ${formattedValue}
5202
5202
  }
5203
5203
  validateSync(value, options) {
5204
5204
  var _options$disableStack3;
5205
- let schema15 = this.resolve(Object.assign({}, options, {
5205
+ let schema16 = this.resolve(Object.assign({}, options, {
5206
5206
  value
5207
5207
  }));
5208
5208
  let result;
5209
- let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema15.spec.disableStackTrace;
5210
- schema15._validate(value, Object.assign({}, options, {
5209
+ let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema16.spec.disableStackTrace;
5210
+ schema16._validate(value, Object.assign({}, options, {
5211
5211
  sync: true
5212
5212
  }), (error, parsed) => {
5213
5213
  if (ValidationError.isError(error)) error.value = parsed;
@@ -5241,8 +5241,8 @@ attempted value: ${formattedValue}
5241
5241
  return typeof defaultValue === "function" ? defaultValue.call(this, options) : clone(defaultValue);
5242
5242
  }
5243
5243
  getDefault(options) {
5244
- let schema15 = this.resolve(options || {});
5245
- return schema15._getDefault(options);
5244
+ let schema16 = this.resolve(options || {});
5245
+ return schema16._getDefault(options);
5246
5246
  }
5247
5247
  default(def) {
5248
5248
  if (arguments.length === 0) {
@@ -5477,9 +5477,9 @@ for (const method of ["validate", "validateSync"]) Schema.prototype[`${method}At
5477
5477
  const {
5478
5478
  parent,
5479
5479
  parentPath,
5480
- schema: schema15
5480
+ schema: schema16
5481
5481
  } = getIn(this, path, value, options.context);
5482
- return schema15[method](parent && parent[parentPath], Object.assign({}, options, {
5482
+ return schema16[method](parent && parent[parentPath], Object.assign({}, options, {
5483
5483
  parent,
5484
5484
  path
5485
5485
  }));
@@ -5653,7 +5653,7 @@ var StringSchema = class extends Schema {
5653
5653
  });
5654
5654
  }
5655
5655
  required(message) {
5656
- return super.required(message).withMutation((schema15) => schema15.test({
5656
+ return super.required(message).withMutation((schema16) => schema16.test({
5657
5657
  message: message || mixed.required,
5658
5658
  name: "required",
5659
5659
  skipAbsent: true,
@@ -5661,9 +5661,9 @@ var StringSchema = class extends Schema {
5661
5661
  }));
5662
5662
  }
5663
5663
  notRequired() {
5664
- return super.notRequired().withMutation((schema15) => {
5665
- schema15.tests = schema15.tests.filter((t) => t.OPTIONS.name !== "required");
5666
- return schema15;
5664
+ return super.notRequired().withMutation((schema16) => {
5665
+ schema16.tests = schema16.tests.filter((t) => t.OPTIONS.name !== "required");
5666
+ return schema16;
5667
5667
  });
5668
5668
  }
5669
5669
  length(length, message = string.length) {
@@ -6052,28 +6052,28 @@ var parseJson = (value, _, ctx) => {
6052
6052
  }
6053
6053
  return ctx.isType(parsed) ? parsed : value;
6054
6054
  };
6055
- function deepPartial(schema15) {
6056
- if ("fields" in schema15) {
6055
+ function deepPartial(schema16) {
6056
+ if ("fields" in schema16) {
6057
6057
  const partial = {};
6058
- for (const [key, fieldSchema] of Object.entries(schema15.fields)) {
6058
+ for (const [key, fieldSchema] of Object.entries(schema16.fields)) {
6059
6059
  partial[key] = deepPartial(fieldSchema);
6060
6060
  }
6061
- return schema15.setFields(partial);
6061
+ return schema16.setFields(partial);
6062
6062
  }
6063
- if (schema15.type === "array") {
6064
- const nextArray = schema15.optional();
6063
+ if (schema16.type === "array") {
6064
+ const nextArray = schema16.optional();
6065
6065
  if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);
6066
6066
  return nextArray;
6067
6067
  }
6068
- if (schema15.type === "tuple") {
6069
- return schema15.optional().clone({
6070
- types: schema15.spec.types.map(deepPartial)
6068
+ if (schema16.type === "tuple") {
6069
+ return schema16.optional().clone({
6070
+ types: schema16.spec.types.map(deepPartial)
6071
6071
  });
6072
6072
  }
6073
- if ("optional" in schema15) {
6074
- return schema15.optional();
6073
+ if ("optional" in schema16) {
6074
+ return schema16.optional();
6075
6075
  }
6076
- return schema15;
6076
+ return schema16;
6077
6077
  }
6078
6078
  var deepHas = (obj, p) => {
6079
6079
  const path = [...(0, import_property_expr.normalizePath)(p)];
@@ -6207,8 +6207,8 @@ var ObjectSchema = class extends Schema {
6207
6207
  next._sortErrors = this._sortErrors;
6208
6208
  return next;
6209
6209
  }
6210
- concat(schema15) {
6211
- let next = super.concat(schema15);
6210
+ concat(schema16) {
6211
+ let next = super.concat(schema16);
6212
6212
  let nextFields = next.fields;
6213
6213
  for (let [field, schemaOrRef] of Object.entries(this.fields)) {
6214
6214
  const target = nextFields[field];
@@ -6216,7 +6216,7 @@ var ObjectSchema = class extends Schema {
6216
6216
  }
6217
6217
  return next.withMutation((s) => (
6218
6218
  // XXX: excludes here is wrong
6219
- s.setFields(nextFields, [...this._excludedEdges, ...schema15._excludedEdges])
6219
+ s.setFields(nextFields, [...this._excludedEdges, ...schema16._excludedEdges])
6220
6220
  ));
6221
6221
  }
6222
6222
  _getDefault(options) {
@@ -6261,8 +6261,8 @@ var ObjectSchema = class extends Schema {
6261
6261
  }
6262
6262
  partial() {
6263
6263
  const partial = {};
6264
- for (const [key, schema15] of Object.entries(this.fields)) {
6265
- partial[key] = "optional" in schema15 && schema15.optional instanceof Function ? schema15.optional() : schema15;
6264
+ for (const [key, schema16] of Object.entries(this.fields)) {
6265
+ partial[key] = "optional" in schema16 && schema16.optional instanceof Function ? schema16.optional() : schema16;
6266
6266
  }
6267
6267
  return this.setFields(partial);
6268
6268
  }
@@ -6460,22 +6460,22 @@ var ArraySchema = class extends Schema {
6460
6460
  json() {
6461
6461
  return this.transform(parseJson);
6462
6462
  }
6463
- concat(schema15) {
6464
- let next = super.concat(schema15);
6463
+ concat(schema16) {
6464
+ let next = super.concat(schema16);
6465
6465
  next.innerType = this.innerType;
6466
- if (schema15.innerType)
6466
+ if (schema16.innerType)
6467
6467
  next.innerType = next.innerType ? (
6468
6468
  // @ts-expect-error Lazy doesn't have concat and will break
6469
- next.innerType.concat(schema15.innerType)
6470
- ) : schema15.innerType;
6469
+ next.innerType.concat(schema16.innerType)
6470
+ ) : schema16.innerType;
6471
6471
  return next;
6472
6472
  }
6473
- of(schema15) {
6473
+ of(schema16) {
6474
6474
  let next = this.clone();
6475
- if (!isSchema(schema15)) throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema15));
6476
- next.innerType = schema15;
6475
+ if (!isSchema(schema16)) throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema16));
6476
+ next.innerType = schema16;
6477
6477
  next.spec = Object.assign({}, next.spec, {
6478
- types: schema15
6478
+ types: schema16
6479
6479
  });
6480
6480
  return next;
6481
6481
  }
@@ -6619,7 +6619,7 @@ var TupleSchema = class extends Schema {
6619
6619
  describe(options) {
6620
6620
  const next = (options ? this.resolve(options) : this).clone();
6621
6621
  const base = super.describe(options);
6622
- base.innerType = next.spec.types.map((schema15, index) => {
6622
+ base.innerType = next.spec.types.map((schema16, index) => {
6623
6623
  var _innerOptions;
6624
6624
  let innerOptions = options;
6625
6625
  if ((_innerOptions = innerOptions) != null && _innerOptions.value) {
@@ -6628,7 +6628,7 @@ var TupleSchema = class extends Schema {
6628
6628
  value: innerOptions.value[index]
6629
6629
  });
6630
6630
  }
6631
- return schema15.describe(innerOptions);
6631
+ return schema16.describe(innerOptions);
6632
6632
  });
6633
6633
  return base;
6634
6634
  }
@@ -6645,6 +6645,7 @@ var import_react2 = __toESM(require_react(), 1);
6645
6645
  var React8 = __toESM(require_react(), 1);
6646
6646
  var import_react3 = __toESM(require_react(), 1);
6647
6647
  var import_react4 = __toESM(require_react(), 1);
6648
+ var import_react5 = __toESM(require_react(), 1);
6648
6649
  var EnumInviteStatus = /* @__PURE__ */ ((EnumInviteStatus22) => {
6649
6650
  EnumInviteStatus22["ACCEPTED"] = "Accepted";
6650
6651
  EnumInviteStatus22["COMPLETED"] = "Completed";
@@ -6734,9 +6735,13 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
6734
6735
  EnumNotificationResourceType22["DEACTIVATED_EVENT"] = "deactivated_event";
6735
6736
  EnumNotificationResourceType22["DEACTIVATED_PARTNER"] = "deactivated_partner";
6736
6737
  EnumNotificationResourceType22["DEACTIVATED_VENDOR"] = "deactivated_vendor";
6738
+ EnumNotificationResourceType22["DOWNGRADED_EVENT"] = "downgraded_event";
6739
+ EnumNotificationResourceType22["DOWNGRADED_PARTNER"] = "downgraded_partner";
6740
+ EnumNotificationResourceType22["DOWNGRADED_VENDOR"] = "downgraded_vendor";
6737
6741
  EnumNotificationResourceType22["DECLINED_EVENT"] = "declined_event";
6738
6742
  EnumNotificationResourceType22["DECLINED_PARTNER"] = "declined_partner";
6739
6743
  EnumNotificationResourceType22["DECLINED_VENDOR"] = "declined_vendor";
6744
+ EnumNotificationResourceType22["DAILY_CLUE_LETTER_AVAILABLE"] = "daily_clue_letter_available";
6740
6745
  EnumNotificationResourceType22["EVENT_INVITE_VENDOR"] = "event_invite_vendor";
6741
6746
  EnumNotificationResourceType22["EVENT_STARTING_SOON"] = "event_starting_soon";
6742
6747
  EnumNotificationResourceType22["EXPIRATION_REMINDER_EVENT"] = "expiration_reminder_event";
@@ -6748,11 +6753,11 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
6748
6753
  return EnumNotificationResourceType22;
6749
6754
  })(EnumNotificationResourceType || {});
6750
6755
  var EnumNotificationType = /* @__PURE__ */ ((EnumNotificationType22) => {
6756
+ EnumNotificationType22["CHAT"] = "chat";
6751
6757
  EnumNotificationType22["EVENT"] = "event";
6752
- EnumNotificationType22["VENDOR"] = "vendor";
6753
6758
  EnumNotificationType22["RELATION"] = "relation";
6754
- EnumNotificationType22["CHAT"] = "chat";
6755
6759
  EnumNotificationType22["SYSTEM"] = "system";
6760
+ EnumNotificationType22["VENDOR"] = "vendor";
6756
6761
  return EnumNotificationType22;
6757
6762
  })(EnumNotificationType || {});
6758
6763
  var EnumRegions = /* @__PURE__ */ ((EnumRegions22) => {
@@ -6820,6 +6825,17 @@ var EnumSubscriptionStatus = /* @__PURE__ */ ((EnumSubscriptionStatus22) => {
6820
6825
  EnumSubscriptionStatus22["TRIALING"] = "trialing";
6821
6826
  return EnumSubscriptionStatus22;
6822
6827
  })(EnumSubscriptionStatus || {});
6828
+ var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
6829
+ EnumGameType2["DAILY_CLUE"] = "dailyClue";
6830
+ return EnumGameType2;
6831
+ })(EnumGameType || {});
6832
+ var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus3) => {
6833
+ EnumGameStatus3["GAME_COMPLETED"] = "GAME_COMPLETED";
6834
+ EnumGameStatus3["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
6835
+ EnumGameStatus3["GAME_LEFT"] = "GAME_LEFT";
6836
+ EnumGameStatus3["GAME_STARTED"] = "GAME_STARTED";
6837
+ return EnumGameStatus3;
6838
+ })(EnumGameStatus || {});
6823
6839
  var dateFormat = "DD-MM-YYYY";
6824
6840
  var timeFormat = "HH:mm";
6825
6841
  dayjs.extend(customParseFormat);
@@ -8254,6 +8270,7 @@ var USER_FIELDS_FRAGMENT = gql`
8254
8270
  promoCodes
8255
8271
  refreshToken
8256
8272
  role
8273
+ school
8257
8274
  termsAgreement {
8258
8275
  ...TermsAgreementFields
8259
8276
  }
@@ -9855,46 +9872,63 @@ var GAME_HISTORY_FIELDS_FRAGMENT = gql`
9855
9872
  }
9856
9873
  ${GAME_DATE_FIELDS_FRAGMENT}
9857
9874
  `;
9875
+ var GAME_DATA_FIELDS_FRAGMENT = gql`
9876
+ fragment GameDataFields on GameDataType {
9877
+ dailyClue {
9878
+ ...DailyClueGameDataFields
9879
+ }
9880
+ }
9881
+ ${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
9882
+ `;
9858
9883
  var GAME_FIELDS_FRAGMENT = gql`
9859
9884
  fragment GameFields on GameType {
9860
- _id
9861
9885
  active
9862
9886
  createdAt
9863
- deletedAt
9864
9887
  gameData {
9865
- dailyClue {
9866
- ...DailyClueGameDataFields
9867
- }
9888
+ ...GameDataFields
9868
9889
  }
9869
9890
  gameHistory {
9870
9891
  ...GameHistoryFields
9871
9892
  }
9893
+ gameType
9872
9894
  updatedAt
9895
+ }
9896
+ ${GAME_DATA_FIELDS_FRAGMENT}
9897
+ ${GAME_HISTORY_FIELDS_FRAGMENT}
9898
+ `;
9899
+ var GAME_DOC_FIELDS_FRAGMENT = gql`
9900
+ fragment GameDocFields on GameDocType {
9901
+ _id
9902
+ active
9903
+ createdAt
9904
+ deletedAt
9905
+ games {
9906
+ ...GameFields
9907
+ }
9873
9908
  owner {
9874
9909
  ...OwnerFields
9875
9910
  }
9876
9911
  points
9912
+ updatedAt
9877
9913
  }
9878
- ${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
9879
9914
  ${OWNER_FIELDS_FRAGMENT}
9880
- ${GAME_DATE_FIELDS_FRAGMENT}
9881
- ${GAME_HISTORY_FIELDS_FRAGMENT}
9915
+ ${GAME_FIELDS_FRAGMENT}
9882
9916
  `;
9883
9917
  var GET_GAMES = gql`
9884
9918
  query getGames {
9885
9919
  games {
9886
- ...GameFields
9920
+ ...GameDocFields
9887
9921
  }
9888
9922
  }
9889
- ${GAME_FIELDS_FRAGMENT}
9923
+ ${GAME_DOC_FIELDS_FRAGMENT}
9890
9924
  `;
9891
9925
  var GET_GAME = gql`
9892
9926
  query getGame($_id: ID!) {
9893
9927
  game(_id: $_id) {
9894
- ...GameFields
9928
+ ...GameDocFields
9895
9929
  }
9896
9930
  }
9897
- ${GAME_FIELDS_FRAGMENT}
9931
+ ${GAME_DOC_FIELDS_FRAGMENT}
9898
9932
  `;
9899
9933
  var GET_GAME_LEADERBOARD = gql`
9900
9934
  query getGameLeaderboard {
@@ -10057,10 +10091,10 @@ var GET_APP_SETTINGS = gql`
10057
10091
  var START_GAME_MUTATION = gql`
10058
10092
  mutation startGame($input: BaseGameInputType!) {
10059
10093
  startGame(input: $input) {
10060
- ...GameFields
10094
+ ...GameDocFields
10061
10095
  }
10062
10096
  }
10063
- ${GAME_FIELDS_FRAGMENT}
10097
+ ${GAME_DOC_FIELDS_FRAGMENT}
10064
10098
  `;
10065
10099
  var LEAVE_GAME_MUTATION = gql`
10066
10100
  mutation leaveGame($_id: ID!, $gameType: GameTypeEnumType!) {
@@ -10070,10 +10104,79 @@ var LEAVE_GAME_MUTATION = gql`
10070
10104
  var UPDATE_DAILY_CLUE_MUTATION = gql`
10071
10105
  mutation updateDailyClueGame($_id: ID!, $foundLetter: String!) {
10072
10106
  updateDailyClueGame(_id: $_id, foundLetter: $foundLetter) {
10073
- ...GameFields
10107
+ ...GameDocFields
10074
10108
  }
10075
10109
  }
10076
- ${GAME_FIELDS_FRAGMENT}
10110
+ ${GAME_DOC_FIELDS_FRAGMENT}
10111
+ `;
10112
+ var SCHOOL = gql`
10113
+ fragment SchoolFields on SchoolType {
10114
+ _id
10115
+ active
10116
+ contactDetails {
10117
+ ...ContactDetailsFields
10118
+ }
10119
+ location {
10120
+ ...LocationFields
10121
+ }
10122
+ createdAt
10123
+ deletedAt
10124
+ logo {
10125
+ ...ResourceImageFields
10126
+ }
10127
+ name
10128
+ owner {
10129
+ ...OwnerFields
10130
+ }
10131
+ region
10132
+ studentCount
10133
+ termsAgreement {
10134
+ ...TermsAgreementFields
10135
+ }
10136
+ updatedAt
10137
+ }
10138
+ ${OWNER_FIELDS_FRAGMENT}
10139
+ ${LOCATION_FIELDS_FRAGMENT}
10140
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
10141
+ ${CONTACT_DETAILS_FIELDS_FRAGMENT}
10142
+ ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
10143
+ `;
10144
+ var GET_SCHOOL = gql`
10145
+ query getSchool($_id: ID!) {
10146
+ school(_id: $_id) {
10147
+ ...SchoolFields
10148
+ }
10149
+ }
10150
+ ${SCHOOL}
10151
+ `;
10152
+ var GET_SCHOOLS = gql`
10153
+ query getSchools {
10154
+ schools {
10155
+ ...SchoolFields
10156
+ }
10157
+ }
10158
+ ${SCHOOL}
10159
+ `;
10160
+ var CREATE_SCHOOL_MUTATION = gql`
10161
+ mutation createSchool($input: SchoolInputType!) {
10162
+ createSchool(input: $input) {
10163
+ ...SchoolFields
10164
+ }
10165
+ }
10166
+ ${SCHOOL}
10167
+ `;
10168
+ var UPDATE_SCHOOL_MUTATION = gql`
10169
+ mutation updateSchool($_id: ID!, $input: SchoolInputType!) {
10170
+ updateSchool(_id: $_id, input: $input) {
10171
+ ...SchoolFields
10172
+ }
10173
+ }
10174
+ ${SCHOOL}
10175
+ `;
10176
+ var DELETE_SCHOOL_MUTATION = gql`
10177
+ mutation deleteSchool($_id: ID!) {
10178
+ deleteSchool(_id: $_id)
10179
+ }
10077
10180
  `;
10078
10181
  var nzBankAccountRegex = /^\d{2}-\d{4}-\d{7}-\d{2}$/;
10079
10182
  var nzbnRegex = /^94\d{11}$/;
@@ -10226,7 +10329,7 @@ var socialMediaSchema = create$3({
10226
10329
  is: (name) => !!name,
10227
10330
  // If name has a value
10228
10331
  then: () => normalizedUrlTransform().required("Link is required when name is set").url("Link must be a valid URL").label("Social Media Link"),
10229
- otherwise: (schema15) => schema15.notRequired()
10332
+ otherwise: (schema16) => schema16.notRequired()
10230
10333
  })
10231
10334
  });
10232
10335
  var globalResourceSchema = create$3().shape({
@@ -10302,21 +10405,21 @@ var paymentInfoSchema = create$3({
10302
10405
  ).required("Please select a Payment method"),
10303
10406
  accountHolderName: create$6().when("paymentMethod", {
10304
10407
  is: "bank_transfer",
10305
- then: (schema15) => schema15.required("Account holder name is required for bank transfer").trim(),
10306
- otherwise: (schema15) => schema15.notRequired()
10408
+ then: (schema16) => schema16.required("Account holder name is required for bank transfer").trim(),
10409
+ otherwise: (schema16) => schema16.notRequired()
10307
10410
  }),
10308
10411
  accountNumber: create$6().when("paymentMethod", {
10309
10412
  is: "bank_transfer",
10310
- then: (schema15) => schema15.required("Account number is required for bank transfer").matches(
10413
+ then: (schema16) => schema16.required("Account number is required for bank transfer").matches(
10311
10414
  nzBankAccountRegex,
10312
10415
  "Account number must be in format: XX-XXXX-XXXXXXX-XX"
10313
10416
  ).trim(),
10314
- otherwise: (schema15) => schema15.notRequired()
10417
+ otherwise: (schema16) => schema16.notRequired()
10315
10418
  }),
10316
10419
  link: create$6().when("paymentMethod", {
10317
10420
  is: (val) => val === "paypal" || val === "stripe",
10318
10421
  then: () => normalizedUrlTransform().url("Link must be a valid URL").required("Link is required for PayPal/Stripe"),
10319
- otherwise: (schema15) => schema15.notRequired()
10422
+ otherwise: (schema16) => schema16.notRequired()
10320
10423
  })
10321
10424
  });
10322
10425
  var eventInfoSchema = create$3().shape({
@@ -10466,16 +10569,16 @@ var vendorInfoSchema = create$3().shape({
10466
10569
  var userSchema = create$3().shape({
10467
10570
  active: create$7().required("Active is required"),
10468
10571
  email: emailRequiredSchema,
10469
- firstName: create$6().label("First Name").required("First name is required"),
10470
- lastName: create$6().label("Last Name").required("Last name is required"),
10572
+ firstName: create$6().label("First Name").trim().required("First name is required"),
10573
+ lastName: create$6().label("Last Name").trim().required("Last name is required"),
10471
10574
  isTester: create$7().required("Tester status is required"),
10472
10575
  password: create$6().nullable().trim().label("Password").min(8, "Password must be at least 8 characters long").notRequired(),
10473
10576
  preferredRegion: create$6().label("Preferred Region").required("Preferred region is required"),
10474
10577
  confirmPassword: create$6().nullable().trim().label("Confirm Password").when("password", {
10475
10578
  is: (val) => !!val,
10476
10579
  // only necessary if password typed
10477
- then: (schema15) => schema15.required("Confirm Password is required").oneOf([create$9("password")], "Passwords must match"),
10478
- otherwise: (schema15) => schema15.notRequired()
10580
+ then: (schema16) => schema16.required("Confirm Password is required").oneOf([create$9("password")], "Passwords must match"),
10581
+ otherwise: (schema16) => schema16.notRequired()
10479
10582
  }),
10480
10583
  role: create$8().oneOf(Object.values(EnumUserRole)).required("Role is required")
10481
10584
  });
@@ -10546,7 +10649,7 @@ var adSchema = create$3().shape({
10546
10649
  return endDate > now;
10547
10650
  }).when("start", {
10548
10651
  is: (val) => val && val.length > 0,
10549
- then: (schema15) => schema15.test(
10652
+ then: (schema16) => schema16.test(
10550
10653
  "is-after-start",
10551
10654
  "End date must be after start date",
10552
10655
  function(value) {
@@ -10690,6 +10793,14 @@ var contactUsSchema = create$3().shape({
10690
10793
  lastName: create$6().label("Last Name").required("Last name is required"),
10691
10794
  message: create$6().label("Message").required("Message is required")
10692
10795
  });
10796
+ var schoolSchema = create$3().shape({
10797
+ active: create$7().required("Active is required"),
10798
+ contactDetails: contactDetailsSchema,
10799
+ location: locationSchema,
10800
+ name: create$6().trim().required("Name is required"),
10801
+ region: create$6().trim().required("Region is required"),
10802
+ studentCount: create$5().label("Student Count").min(0, "Student count cannot be negative").required("Student count is required").test("no-leading-zeros", "", noLeadingZeros("Student Count"))
10803
+ });
10693
10804
  var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
10694
10805
  EnumActivity2["FAVORITE"] = "FAVORITE";
10695
10806
  EnumActivity2["GOING"] = "GOING";
@@ -10698,16 +10809,6 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
10698
10809
  EnumActivity2["VIEW"] = "VIEW";
10699
10810
  return EnumActivity2;
10700
10811
  })(EnumActivity || {});
10701
- var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
10702
- EnumGameType2["DAILY_CLUE"] = "dailyClue";
10703
- return EnumGameType2;
10704
- })(EnumGameType || {});
10705
- var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
10706
- EnumGameStatus2["GAME_COMPLETED"] = "GAME_COMPLETED";
10707
- EnumGameStatus2["GAME_LEFT"] = "GAME_LEFT";
10708
- EnumGameStatus2["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
10709
- return EnumGameStatus2;
10710
- })(EnumGameStatus || {});
10711
10812
 
10712
10813
  // src/mongoose/Ad.ts
10713
10814
  import mongoose from "mongoose";
@@ -11267,27 +11368,27 @@ var baseResourceFields = {
11267
11368
  required: false,
11268
11369
  type: [associatesSchema]
11269
11370
  },
11270
- contactDetails: ContactDetailsSchema,
11371
+ contactDetails: { required: false, type: ContactDetailsSchema },
11271
11372
  cover: {
11272
11373
  required: true,
11273
11374
  type: ResourceImageTypeSchema
11274
11375
  },
11275
11376
  deletedAt: { default: null, required: false, type: Date },
11276
11377
  description: { required: true, type: String },
11277
- images: [ResourceImageTypeSchema],
11278
- logo: ResourceImageTypeSchema,
11378
+ images: { required: false, type: [ResourceImageTypeSchema] },
11379
+ logo: { required: false, type: ResourceImageTypeSchema },
11279
11380
  name: { required: true, type: String },
11280
11381
  owner: {
11281
11382
  required: false,
11282
11383
  type: OwnerTypeSchema
11283
11384
  },
11284
- posterUsage: PosterUsageTypeSchema,
11385
+ posterUsage: { required: false, type: PosterUsageTypeSchema },
11285
11386
  promoCodes: { required: false, type: [String] },
11286
11387
  rating: { required: false, type: Number },
11287
11388
  region: { required: true, type: String },
11288
11389
  reviewCount: { required: false, type: Number },
11289
- socialMedia: [SocialMediaTypeSchema],
11290
- termsAgreement: termsAgreementSchema
11390
+ socialMedia: { required: false, type: [SocialMediaTypeSchema] },
11391
+ termsAgreement: { required: true, type: termsAgreementSchema }
11291
11392
  };
11292
11393
 
11293
11394
  // src/mongoose/GoogleImportedMarket.ts
@@ -11403,7 +11504,7 @@ schema4.index({ isRead: 1, userId: 1 });
11403
11504
  schema4.index({ createdAt: -1, userId: 1 });
11404
11505
  var NotificationModel = mongoose8.models.Notification || mongoose8.model("Notification", schema4);
11405
11506
 
11406
- // node_modules/@timardex/cluemart-shared/dist/chunk-USQKKCIA.mjs
11507
+ // node_modules/@timardex/cluemart-shared/dist/chunk-534WN2SR.mjs
11407
11508
  var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
11408
11509
  EnumOSPlatform22["ANDROID"] = "android";
11409
11510
  EnumOSPlatform22["IOS"] = "ios";
@@ -11600,6 +11701,11 @@ var schema7 = new MongooseSchema11(
11600
11701
  required: true,
11601
11702
  type: String
11602
11703
  },
11704
+ school: {
11705
+ ref: "School",
11706
+ required: false,
11707
+ type: mongoose11.Schema.Types.ObjectId
11708
+ },
11603
11709
  stripe: {
11604
11710
  required: false,
11605
11711
  type: stripeSchema
@@ -11990,9 +12096,9 @@ var gameDataSchemas = {
11990
12096
  [EnumGameType.DAILY_CLUE]: schemaDailyClue
11991
12097
  };
11992
12098
  var gameDataDefinition = Object.fromEntries(
11993
- Object.entries(gameDataSchemas).map(([key, schema15]) => [
12099
+ Object.entries(gameDataSchemas).map(([key, schema16]) => [
11994
12100
  key,
11995
- { default: null, required: false, type: schema15 }
12101
+ { default: null, required: false, type: schema16 }
11996
12102
  ])
11997
12103
  );
11998
12104
  var gameHistorySchema = new MongooseSchema19(
@@ -12012,12 +12118,24 @@ var gameHistorySchema = new MongooseSchema19(
12012
12118
  },
12013
12119
  { _id: false }
12014
12120
  );
12121
+ var gameTypeSchema = new MongooseSchema19(
12122
+ {
12123
+ active: { default: true, required: true, type: Boolean },
12124
+ gameData: gameDataDefinition,
12125
+ gameHistory: { default: [], required: true, type: [gameHistorySchema] },
12126
+ gameType: {
12127
+ enum: Object.values(EnumGameType),
12128
+ required: true,
12129
+ type: String
12130
+ }
12131
+ },
12132
+ { _id: false, timestamps: true }
12133
+ );
12015
12134
  var schema14 = new MongooseSchema19(
12016
12135
  {
12017
12136
  active: { default: false, required: true, type: Boolean },
12018
12137
  deletedAt: { default: null, required: false, type: Date },
12019
- gameData: gameDataDefinition,
12020
- gameHistory: { default: [], required: true, type: [gameHistorySchema] },
12138
+ games: { default: [], required: false, type: [gameTypeSchema] },
12021
12139
  owner: {
12022
12140
  required: true,
12023
12141
  type: OwnerTypeSchema
@@ -12028,6 +12146,32 @@ var schema14 = new MongooseSchema19(
12028
12146
  );
12029
12147
  var GameModel = mongoose19.models.Game || mongoose19.model("Game", schema14);
12030
12148
 
12149
+ // src/mongoose/School.ts
12150
+ import mongoose20 from "mongoose";
12151
+ var MongooseSchema20 = mongoose20.Schema;
12152
+ var schema15 = new MongooseSchema20(
12153
+ {
12154
+ active: { default: false, required: true, type: Boolean },
12155
+ contactDetails: { required: false, type: ContactDetailsSchema },
12156
+ deletedAt: { default: null, required: false, type: Date },
12157
+ location: {
12158
+ required: true,
12159
+ type: locationsSchema
12160
+ },
12161
+ logo: { required: false, type: ResourceImageTypeSchema },
12162
+ name: { required: true, type: String },
12163
+ owner: {
12164
+ required: true,
12165
+ type: OwnerTypeSchema
12166
+ },
12167
+ region: { required: true, type: String },
12168
+ studentCount: { required: true, type: Number },
12169
+ termsAgreement: { required: true, type: termsAgreementSchema }
12170
+ },
12171
+ { timestamps: true }
12172
+ );
12173
+ var SchoolModel = mongoose20.models.School || mongoose20.model("School", schema15);
12174
+
12031
12175
  export {
12032
12176
  EnumUserLicence,
12033
12177
  EnumAdStatus,
@@ -12047,6 +12191,7 @@ export {
12047
12191
  CategorySchema,
12048
12192
  userLicenseSchema,
12049
12193
  associatesSchema,
12194
+ ContactDetailsSchema,
12050
12195
  termsAgreementSchema,
12051
12196
  resourceRelationsSchema,
12052
12197
  dateTimeSchema3 as dateTimeSchema,
@@ -12066,7 +12211,8 @@ export {
12066
12211
  PostModel,
12067
12212
  APP_SETTINGS_ID,
12068
12213
  AppSettingModel,
12069
- GameModel
12214
+ GameModel,
12215
+ SchoolModel
12070
12216
  };
12071
12217
  /*! Bundled license information:
12072
12218
 
@@ -12092,4 +12238,4 @@ react/cjs/react.development.js:
12092
12238
  * LICENSE file in the root directory of this source tree.
12093
12239
  *)
12094
12240
  */
12095
- //# sourceMappingURL=chunk-6WUH4RWX.mjs.map
12241
+ //# sourceMappingURL=chunk-JDM7WL6D.mjs.map