@timardex/cluemart-server-shared 1.0.110 → 1.0.112

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, schema14) => {
4659
+ return new _Condition(refs, (values, schema15) => {
4660
4660
  var _branch;
4661
4661
  let branch = check(...values) ? then : otherwise;
4662
- return (_branch = branch == null ? void 0 : branch(schema14)) != null ? _branch : schema14;
4662
+ return (_branch = branch == null ? void 0 : branch(schema15)) != null ? _branch : schema15;
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 schema14 = this.fn(values, base, options);
4677
- if (schema14 === void 0 || // @ts-ignore this can be base
4678
- schema14 === base) {
4676
+ let schema15 = this.fn(values, base, options);
4677
+ if (schema15 === void 0 || // @ts-ignore this can be base
4678
+ schema15 === base) {
4679
4679
  return base;
4680
4680
  }
4681
- if (!isSchema(schema14)) throw new TypeError("conditions must return a schema object");
4682
- return schema14.resolve(options);
4681
+ if (!isSchema(schema15)) throw new TypeError("conditions must return a schema object");
4682
+ return schema15.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: schema14
4752
+ schema: schema15
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 = schema14.spec.abortEarly,
4765
- disableStackTrace = schema14.spec.disableStackTrace
4764
+ abortEarly = schema15.spec.abortEarly,
4765
+ disableStackTrace = schema15.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: schema14.spec.label,
4774
+ label: schema15.spec.label,
4775
4775
  path: overrides.path || path,
4776
- spec: schema14.spec,
4776
+ spec: schema15.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: schema14
4794
+ schema: schema15
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(schema14, path, value, context = value) {
4828
+ function getIn(schema15, path, value, context = value) {
4829
4829
  let parent, lastPart, lastPartDebug;
4830
4830
  if (!path) return {
4831
4831
  parent,
4832
4832
  parentPath: path,
4833
- schema: schema14
4833
+ schema: schema15
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
- schema14 = schema14.resolve({
4837
+ schema15 = schema15.resolve({
4838
4838
  context,
4839
4839
  parent,
4840
4840
  value
4841
4841
  });
4842
- let isTuple = schema14.type === "tuple";
4842
+ let isTuple = schema15.type === "tuple";
4843
4843
  let idx = isArray ? parseInt(part, 10) : 0;
4844
- if (schema14.innerType || isTuple) {
4844
+ if (schema15.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
- schema14 = isTuple ? schema14.spec.types[idx] : schema14.innerType;
4851
+ schema15 = isTuple ? schema15.spec.types[idx] : schema15.innerType;
4852
4852
  }
4853
4853
  if (!isArray) {
4854
- 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}")`);
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}")`);
4855
4855
  parent = value;
4856
4856
  value = value && value[part];
4857
- schema14 = schema14.fields[part];
4857
+ schema15 = schema15.fields[part];
4858
4858
  }
4859
4859
  lastPart = part;
4860
4860
  lastPartDebug = isBracket ? "[" + _part + "]" : "." + _part;
4861
4861
  });
4862
4862
  return {
4863
- schema: schema14,
4863
+ schema: schema15,
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(schema14) {
5001
- if (!schema14 || schema14 === this) return this;
5002
- if (schema14.type !== this.type && this.type !== "mixed") throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema14.type}`);
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}`);
5003
5003
  let base = this;
5004
- let combined = schema14.clone();
5004
+ let combined = schema15.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(schema14._whitelist, schema14._blacklist);
5009
- combined._blacklist = base._blacklist.merge(schema14._blacklist, schema14._whitelist);
5008
+ combined._whitelist = base._whitelist.merge(schema15._whitelist, schema15._blacklist);
5009
+ combined._blacklist = base._blacklist.merge(schema15._blacklist, schema15._whitelist);
5010
5010
  combined.tests = base.tests;
5011
5011
  combined.exclusiveTests = base.exclusiveTests;
5012
5012
  combined.withMutation((next) => {
5013
- schema14.tests.forEach((fn) => {
5013
+ schema15.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 schema14 = this;
5030
- if (schema14.conditions.length) {
5031
- let conditions = schema14.conditions;
5032
- schema14 = schema14.clone();
5033
- schema14.conditions = [];
5034
- schema14 = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema14);
5035
- schema14 = schema14.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);
5036
5036
  }
5037
- return schema14;
5037
+ return schema15;
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 schema14 = this.resolve(Object.assign({}, options, {
5191
+ let schema15 = this.resolve(Object.assign({}, options, {
5192
5192
  value
5193
5193
  }));
5194
- let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema14.spec.disableStackTrace;
5195
- return new Promise((resolve, reject) => schema14._validate(value, options, (error, parsed) => {
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) => {
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 schema14 = this.resolve(Object.assign({}, options, {
5205
+ let schema15 = 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 : schema14.spec.disableStackTrace;
5210
- schema14._validate(value, Object.assign({}, options, {
5209
+ let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema15.spec.disableStackTrace;
5210
+ schema15._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 schema14 = this.resolve(options || {});
5245
- return schema14._getDefault(options);
5244
+ let schema15 = this.resolve(options || {});
5245
+ return schema15._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: schema14
5480
+ schema: schema15
5481
5481
  } = getIn(this, path, value, options.context);
5482
- return schema14[method](parent && parent[parentPath], Object.assign({}, options, {
5482
+ return schema15[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((schema14) => schema14.test({
5656
+ return super.required(message).withMutation((schema15) => schema15.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((schema14) => {
5665
- schema14.tests = schema14.tests.filter((t) => t.OPTIONS.name !== "required");
5666
- return schema14;
5664
+ return super.notRequired().withMutation((schema15) => {
5665
+ schema15.tests = schema15.tests.filter((t) => t.OPTIONS.name !== "required");
5666
+ return schema15;
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(schema14) {
6056
- if ("fields" in schema14) {
6055
+ function deepPartial(schema15) {
6056
+ if ("fields" in schema15) {
6057
6057
  const partial = {};
6058
- for (const [key, fieldSchema] of Object.entries(schema14.fields)) {
6058
+ for (const [key, fieldSchema] of Object.entries(schema15.fields)) {
6059
6059
  partial[key] = deepPartial(fieldSchema);
6060
6060
  }
6061
- return schema14.setFields(partial);
6061
+ return schema15.setFields(partial);
6062
6062
  }
6063
- if (schema14.type === "array") {
6064
- const nextArray = schema14.optional();
6063
+ if (schema15.type === "array") {
6064
+ const nextArray = schema15.optional();
6065
6065
  if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);
6066
6066
  return nextArray;
6067
6067
  }
6068
- if (schema14.type === "tuple") {
6069
- return schema14.optional().clone({
6070
- types: schema14.spec.types.map(deepPartial)
6068
+ if (schema15.type === "tuple") {
6069
+ return schema15.optional().clone({
6070
+ types: schema15.spec.types.map(deepPartial)
6071
6071
  });
6072
6072
  }
6073
- if ("optional" in schema14) {
6074
- return schema14.optional();
6073
+ if ("optional" in schema15) {
6074
+ return schema15.optional();
6075
6075
  }
6076
- return schema14;
6076
+ return schema15;
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(schema14) {
6211
- let next = super.concat(schema14);
6210
+ concat(schema15) {
6211
+ let next = super.concat(schema15);
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, ...schema14._excludedEdges])
6219
+ s.setFields(nextFields, [...this._excludedEdges, ...schema15._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, schema14] of Object.entries(this.fields)) {
6265
- partial[key] = "optional" in schema14 && schema14.optional instanceof Function ? schema14.optional() : schema14;
6264
+ for (const [key, schema15] of Object.entries(this.fields)) {
6265
+ partial[key] = "optional" in schema15 && schema15.optional instanceof Function ? schema15.optional() : schema15;
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(schema14) {
6464
- let next = super.concat(schema14);
6463
+ concat(schema15) {
6464
+ let next = super.concat(schema15);
6465
6465
  next.innerType = this.innerType;
6466
- if (schema14.innerType)
6466
+ if (schema15.innerType)
6467
6467
  next.innerType = next.innerType ? (
6468
6468
  // @ts-expect-error Lazy doesn't have concat and will break
6469
- next.innerType.concat(schema14.innerType)
6470
- ) : schema14.innerType;
6469
+ next.innerType.concat(schema15.innerType)
6470
+ ) : schema15.innerType;
6471
6471
  return next;
6472
6472
  }
6473
- of(schema14) {
6473
+ of(schema15) {
6474
6474
  let next = this.clone();
6475
- if (!isSchema(schema14)) throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema14));
6476
- next.innerType = schema14;
6475
+ if (!isSchema(schema15)) throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema15));
6476
+ next.innerType = schema15;
6477
6477
  next.spec = Object.assign({}, next.spec, {
6478
- types: schema14
6478
+ types: schema15
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((schema14, index) => {
6622
+ base.innerType = next.spec.types.map((schema15, 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 schema14.describe(innerOptions);
6631
+ return schema15.describe(innerOptions);
6632
6632
  });
6633
6633
  return base;
6634
6634
  }
@@ -8241,12 +8241,14 @@ var USER_FIELDS_FRAGMENT = gql`
8241
8241
  email
8242
8242
  events
8243
8243
  firstName
8244
+ games
8244
8245
  isTester
8245
8246
  lastName
8246
8247
  licences {
8247
8248
  ...LicenceFields
8248
8249
  }
8249
8250
  partner
8251
+ points
8250
8252
  platform
8251
8253
  preferredRegion
8252
8254
  promoCodes
@@ -9810,6 +9812,14 @@ var DELETE_PARTNER_MUTATION = gql`
9810
9812
  `;
9811
9813
  var POST_CONTENT_DATA_FIELDS_FRAGMENT = gql`
9812
9814
  fragment PostContentDataFields on PostContentData {
9815
+ game {
9816
+ title
9817
+ gameType
9818
+ gameInfo {
9819
+ dailyClue
9820
+ }
9821
+ gameEndDate
9822
+ }
9813
9823
  textarea {
9814
9824
  title
9815
9825
  data
@@ -9947,6 +9957,66 @@ var GET_APP_SETTINGS = gql`
9947
9957
  }
9948
9958
  ${APP_SETTINGS_FIELDS_FRAGMENT}
9949
9959
  `;
9960
+ var DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT = gql`
9961
+ fragment DailyClueGameDataFields on DailyClueGameDataType {
9962
+ lastFoundDate
9963
+ streak
9964
+ points
9965
+ collectedLetters
9966
+ gameEndDate
9967
+ }
9968
+ `;
9969
+ var GAME_FIELDS_FRAGMENT = gql`
9970
+ fragment GameFields on GameType {
9971
+ _id
9972
+ active
9973
+ createdAt
9974
+ deletedAt
9975
+ gameData {
9976
+ dailyClue {
9977
+ ...DailyClueGameDataFields
9978
+ }
9979
+ }
9980
+ updatedAt
9981
+ owner {
9982
+ ...OwnerFields
9983
+ }
9984
+ }
9985
+ ${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
9986
+ ${OWNER_FIELDS_FRAGMENT}
9987
+ `;
9988
+ var GET_GAMES = gql`
9989
+ query getGames($userId: ID) {
9990
+ games(userId: $userId) {
9991
+ ...GameFields
9992
+ }
9993
+ }
9994
+ ${GAME_FIELDS_FRAGMENT}
9995
+ `;
9996
+ var GET_GAME = gql`
9997
+ query getGame($_id: ID!) {
9998
+ game(_id: $_id) {
9999
+ ...GameFields
10000
+ }
10001
+ }
10002
+ ${GAME_FIELDS_FRAGMENT}
10003
+ `;
10004
+ var START_GAME_MUTATION = gql`
10005
+ mutation startGame($input: GameInputType!) {
10006
+ startGame(input: $input) {
10007
+ ...GameFields
10008
+ }
10009
+ }
10010
+ ${GAME_FIELDS_FRAGMENT}
10011
+ `;
10012
+ var LEAVE_GAME_MUTATION = gql`
10013
+ mutation leaveGame($_id: ID!) {
10014
+ leaveGame(_id: $_id) {
10015
+ ...GameFields
10016
+ }
10017
+ }
10018
+ ${GAME_FIELDS_FRAGMENT}
10019
+ `;
9950
10020
  var nzBankAccountRegex = /^\d{2}-\d{4}-\d{7}-\d{2}$/;
9951
10021
  var nzbnRegex = /^94\d{11}$/;
9952
10022
  var normalizedUrlTransform = () => create$6().trim().transform(
@@ -10098,7 +10168,7 @@ var socialMediaSchema = create$3({
10098
10168
  is: (name) => !!name,
10099
10169
  // If name has a value
10100
10170
  then: () => normalizedUrlTransform().required("Link is required when name is set").url("Link must be a valid URL").label("Social Media Link"),
10101
- otherwise: (schema14) => schema14.notRequired()
10171
+ otherwise: (schema15) => schema15.notRequired()
10102
10172
  })
10103
10173
  });
10104
10174
  var globalResourceSchema = create$3().shape({
@@ -10174,21 +10244,21 @@ var paymentInfoSchema = create$3({
10174
10244
  ).required("Please select a Payment method"),
10175
10245
  accountHolderName: create$6().when("paymentMethod", {
10176
10246
  is: "bank_transfer",
10177
- then: (schema14) => schema14.required("Account holder name is required for bank transfer").trim(),
10178
- otherwise: (schema14) => schema14.notRequired()
10247
+ then: (schema15) => schema15.required("Account holder name is required for bank transfer").trim(),
10248
+ otherwise: (schema15) => schema15.notRequired()
10179
10249
  }),
10180
10250
  accountNumber: create$6().when("paymentMethod", {
10181
10251
  is: "bank_transfer",
10182
- then: (schema14) => schema14.required("Account number is required for bank transfer").matches(
10252
+ then: (schema15) => schema15.required("Account number is required for bank transfer").matches(
10183
10253
  nzBankAccountRegex,
10184
10254
  "Account number must be in format: XX-XXXX-XXXXXXX-XX"
10185
10255
  ).trim(),
10186
- otherwise: (schema14) => schema14.notRequired()
10256
+ otherwise: (schema15) => schema15.notRequired()
10187
10257
  }),
10188
10258
  link: create$6().when("paymentMethod", {
10189
10259
  is: (val) => val === "paypal" || val === "stripe",
10190
10260
  then: () => normalizedUrlTransform().url("Link must be a valid URL").required("Link is required for PayPal/Stripe"),
10191
- otherwise: (schema14) => schema14.notRequired()
10261
+ otherwise: (schema15) => schema15.notRequired()
10192
10262
  })
10193
10263
  });
10194
10264
  var eventInfoSchema = create$3().shape({
@@ -10346,8 +10416,8 @@ var userSchema = create$3().shape({
10346
10416
  confirmPassword: create$6().nullable().trim().label("Confirm Password").when("password", {
10347
10417
  is: (val) => !!val,
10348
10418
  // only necessary if password typed
10349
- then: (schema14) => schema14.required("Confirm Password is required").oneOf([create$9("password")], "Passwords must match"),
10350
- otherwise: (schema14) => schema14.notRequired()
10419
+ then: (schema15) => schema15.required("Confirm Password is required").oneOf([create$9("password")], "Passwords must match"),
10420
+ otherwise: (schema15) => schema15.notRequired()
10351
10421
  }),
10352
10422
  role: create$8().oneOf(Object.values(EnumUserRole)).required("Role is required")
10353
10423
  });
@@ -10418,7 +10488,7 @@ var adSchema = create$3().shape({
10418
10488
  return endDate > now;
10419
10489
  }).when("start", {
10420
10490
  is: (val) => val && val.length > 0,
10421
- then: (schema14) => schema14.test(
10491
+ then: (schema15) => schema15.test(
10422
10492
  "is-after-start",
10423
10493
  "End date must be after start date",
10424
10494
  function(value) {
@@ -10453,6 +10523,7 @@ var EnumPostType = /* @__PURE__ */ ((EnumPostType2) => {
10453
10523
  return EnumPostType2;
10454
10524
  })(EnumPostType || {});
10455
10525
  var EnumPostContentType = /* @__PURE__ */ ((EnumPostContentType2) => {
10526
+ EnumPostContentType2["GAME"] = "game";
10456
10527
  EnumPostContentType2["IMAGE"] = "image";
10457
10528
  EnumPostContentType2["LIST"] = "list";
10458
10529
  EnumPostContentType2["TEXTAREA"] = "textarea";
@@ -11264,7 +11335,7 @@ schema4.index({ isRead: 1, userId: 1 });
11264
11335
  schema4.index({ createdAt: -1, userId: 1 });
11265
11336
  var NotificationModel = mongoose8.models.Notification || mongoose8.model("Notification", schema4);
11266
11337
 
11267
- // node_modules/@timardex/cluemart-shared/dist/chunk-USQKKCIA.mjs
11338
+ // node_modules/@timardex/cluemart-shared/dist/chunk-VE6JFCH2.mjs
11268
11339
  var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
11269
11340
  EnumOSPlatform22["ANDROID"] = "android";
11270
11341
  EnumOSPlatform22["IOS"] = "ios";
@@ -11420,6 +11491,11 @@ var schema7 = new MongooseSchema11(
11420
11491
  type: [mongoose11.Schema.Types.ObjectId]
11421
11492
  },
11422
11493
  firstName: { required: true, type: String },
11494
+ games: {
11495
+ ref: "Game",
11496
+ required: false,
11497
+ type: [mongoose11.Schema.Types.ObjectId]
11498
+ },
11423
11499
  isTester: { default: false, required: true, type: Boolean },
11424
11500
  lastName: { required: true, type: String },
11425
11501
  licences: {
@@ -11437,6 +11513,7 @@ var schema7 = new MongooseSchema11(
11437
11513
  required: false,
11438
11514
  type: String
11439
11515
  },
11516
+ points: { default: 0, required: false, type: Number },
11440
11517
  preferredRegion: {
11441
11518
  required: true,
11442
11519
  type: String
@@ -11798,6 +11875,35 @@ var AppSettingSchema = new MongooseSchema18(
11798
11875
  );
11799
11876
  var AppSettingModel = mongoose18.models.AppSetting || mongoose18.model("AppSetting", AppSettingSchema);
11800
11877
 
11878
+ // src/mongoose/game/Game.ts
11879
+ import mongoose19 from "mongoose";
11880
+ var MongooseSchema19 = mongoose19.Schema;
11881
+ var schemaDailyClue = new MongooseSchema19(
11882
+ {
11883
+ collectedLetters: { default: [], required: false, type: [String] },
11884
+ gameEndDate: { default: null, required: true, type: String },
11885
+ lastFoundDate: { default: null, required: false, type: String },
11886
+ points: { default: 0, required: true, type: Number },
11887
+ streak: { default: 0, required: true, type: Number }
11888
+ },
11889
+ { _id: false }
11890
+ );
11891
+ var schema14 = new MongooseSchema19(
11892
+ {
11893
+ active: { default: false, required: true, type: Boolean },
11894
+ deletedAt: { default: null, required: false, type: Date },
11895
+ gameData: {
11896
+ dailyClue: { default: null, required: false, type: schemaDailyClue }
11897
+ },
11898
+ owner: {
11899
+ required: true,
11900
+ type: OwnerTypeSchema
11901
+ }
11902
+ },
11903
+ { timestamps: true }
11904
+ );
11905
+ var GameModel = mongoose19.models.Game || mongoose19.model("Game", schema14);
11906
+
11801
11907
  export {
11802
11908
  EnumUserLicence,
11803
11909
  EnumAdStatus,
@@ -11811,6 +11917,7 @@ export {
11811
11917
  relationDatesSchema,
11812
11918
  RelationTypeSchema,
11813
11919
  RelationModel,
11920
+ OwnerTypeSchema,
11814
11921
  SocialMediaTypeSchema,
11815
11922
  ResourceImageTypeSchema,
11816
11923
  CategorySchema,
@@ -11834,7 +11941,8 @@ export {
11834
11941
  PartnerModel,
11835
11942
  PostModel,
11836
11943
  APP_SETTINGS_ID,
11837
- AppSettingModel
11944
+ AppSettingModel,
11945
+ GameModel
11838
11946
  };
11839
11947
  /*! Bundled license information:
11840
11948
 
@@ -11860,4 +11968,4 @@ react/cjs/react.development.js:
11860
11968
  * LICENSE file in the root directory of this source tree.
11861
11969
  *)
11862
11970
  */
11863
- //# sourceMappingURL=chunk-7RUK3JKI.mjs.map
11971
+ //# sourceMappingURL=chunk-N56H4CPW.mjs.map