@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.
- package/dist/{chunk-6WUH4RWX.mjs → chunk-JDM7WL6D.mjs} +277 -131
- package/dist/chunk-JDM7WL6D.mjs.map +1 -0
- package/dist/index.cjs +283 -135
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +102 -61
- package/dist/index.d.ts +102 -61
- package/dist/index.mjs +281 -135
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +277 -129
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +102 -61
- package/dist/mongoose/index.d.ts +102 -61
- package/dist/mongoose/index.mjs +5 -1
- package/dist/service/index.cjs +275 -131
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-6WUH4RWX.mjs.map +0 -1
package/dist/mongoose/index.cjs
CHANGED
|
@@ -1679,6 +1679,7 @@ __export(mongoose_exports, {
|
|
|
1679
1679
|
CategorySchema: () => CategorySchema,
|
|
1680
1680
|
ChatModel: () => ChatModel,
|
|
1681
1681
|
ChatReportModel: () => ChatReportModel,
|
|
1682
|
+
ContactDetailsSchema: () => ContactDetailsSchema,
|
|
1682
1683
|
EventInfoModel: () => EventInfoModel,
|
|
1683
1684
|
EventModel: () => EventModel,
|
|
1684
1685
|
GameModel: () => GameModel,
|
|
@@ -1693,6 +1694,7 @@ __export(mongoose_exports, {
|
|
|
1693
1694
|
RelationTypeSchema: () => RelationTypeSchema,
|
|
1694
1695
|
ResourceActivityModel: () => ResourceActivityModel,
|
|
1695
1696
|
ResourceImageTypeSchema: () => ResourceImageTypeSchema,
|
|
1697
|
+
SchoolModel: () => SchoolModel,
|
|
1696
1698
|
SocialMediaTypeSchema: () => SocialMediaTypeSchema,
|
|
1697
1699
|
StallTypeSchema: () => StallTypeSchema,
|
|
1698
1700
|
UserModel: () => UserModel,
|
|
@@ -4725,10 +4727,10 @@ var Condition = class _Condition {
|
|
|
4725
4727
|
otherwise
|
|
4726
4728
|
} = config;
|
|
4727
4729
|
let check = typeof is === "function" ? is : (...values) => values.every((value) => value === is);
|
|
4728
|
-
return new _Condition(refs, (values,
|
|
4730
|
+
return new _Condition(refs, (values, schema16) => {
|
|
4729
4731
|
var _branch;
|
|
4730
4732
|
let branch = check(...values) ? then : otherwise;
|
|
4731
|
-
return (_branch = branch == null ? void 0 : branch(
|
|
4733
|
+
return (_branch = branch == null ? void 0 : branch(schema16)) != null ? _branch : schema16;
|
|
4732
4734
|
});
|
|
4733
4735
|
}
|
|
4734
4736
|
constructor(refs, builder) {
|
|
@@ -4742,13 +4744,13 @@ var Condition = class _Condition {
|
|
|
4742
4744
|
// TODO: ? operator here?
|
|
4743
4745
|
ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context)
|
|
4744
4746
|
));
|
|
4745
|
-
let
|
|
4746
|
-
if (
|
|
4747
|
-
|
|
4747
|
+
let schema16 = this.fn(values, base, options);
|
|
4748
|
+
if (schema16 === void 0 || // @ts-ignore this can be base
|
|
4749
|
+
schema16 === base) {
|
|
4748
4750
|
return base;
|
|
4749
4751
|
}
|
|
4750
|
-
if (!isSchema(
|
|
4751
|
-
return
|
|
4752
|
+
if (!isSchema(schema16)) throw new TypeError("conditions must return a schema object");
|
|
4753
|
+
return schema16.resolve(options);
|
|
4752
4754
|
}
|
|
4753
4755
|
};
|
|
4754
4756
|
var prefixes = {
|
|
@@ -4818,7 +4820,7 @@ function createValidation(config) {
|
|
|
4818
4820
|
path = "",
|
|
4819
4821
|
options,
|
|
4820
4822
|
originalValue,
|
|
4821
|
-
schema:
|
|
4823
|
+
schema: schema16
|
|
4822
4824
|
}, panic, next) {
|
|
4823
4825
|
const {
|
|
4824
4826
|
name,
|
|
@@ -4830,8 +4832,8 @@ function createValidation(config) {
|
|
|
4830
4832
|
let {
|
|
4831
4833
|
parent,
|
|
4832
4834
|
context,
|
|
4833
|
-
abortEarly =
|
|
4834
|
-
disableStackTrace =
|
|
4835
|
+
abortEarly = schema16.spec.abortEarly,
|
|
4836
|
+
disableStackTrace = schema16.spec.disableStackTrace
|
|
4835
4837
|
} = options;
|
|
4836
4838
|
function resolve(item) {
|
|
4837
4839
|
return Reference.isRef(item) ? item.getValue(value, parent, context) : item;
|
|
@@ -4840,9 +4842,9 @@ function createValidation(config) {
|
|
|
4840
4842
|
const nextParams = Object.assign({
|
|
4841
4843
|
value,
|
|
4842
4844
|
originalValue,
|
|
4843
|
-
label:
|
|
4845
|
+
label: schema16.spec.label,
|
|
4844
4846
|
path: overrides.path || path,
|
|
4845
|
-
spec:
|
|
4847
|
+
spec: schema16.spec,
|
|
4846
4848
|
disableStackTrace: overrides.disableStackTrace || disableStackTrace
|
|
4847
4849
|
}, params, overrides.params);
|
|
4848
4850
|
for (const key of Object.keys(nextParams)) nextParams[key] = resolve(nextParams[key]);
|
|
@@ -4860,7 +4862,7 @@ function createValidation(config) {
|
|
|
4860
4862
|
resolve,
|
|
4861
4863
|
options,
|
|
4862
4864
|
originalValue,
|
|
4863
|
-
schema:
|
|
4865
|
+
schema: schema16
|
|
4864
4866
|
};
|
|
4865
4867
|
const handleResult = (validOrError) => {
|
|
4866
4868
|
if (ValidationError.isError(validOrError)) invalid(validOrError);
|
|
@@ -4894,42 +4896,42 @@ function createValidation(config) {
|
|
|
4894
4896
|
validate.OPTIONS = config;
|
|
4895
4897
|
return validate;
|
|
4896
4898
|
}
|
|
4897
|
-
function getIn(
|
|
4899
|
+
function getIn(schema16, path, value, context = value) {
|
|
4898
4900
|
let parent, lastPart, lastPartDebug;
|
|
4899
4901
|
if (!path) return {
|
|
4900
4902
|
parent,
|
|
4901
4903
|
parentPath: path,
|
|
4902
|
-
schema:
|
|
4904
|
+
schema: schema16
|
|
4903
4905
|
};
|
|
4904
4906
|
(0, import_property_expr.forEach)(path, (_part, isBracket, isArray) => {
|
|
4905
4907
|
let part = isBracket ? _part.slice(1, _part.length - 1) : _part;
|
|
4906
|
-
|
|
4908
|
+
schema16 = schema16.resolve({
|
|
4907
4909
|
context,
|
|
4908
4910
|
parent,
|
|
4909
4911
|
value
|
|
4910
4912
|
});
|
|
4911
|
-
let isTuple =
|
|
4913
|
+
let isTuple = schema16.type === "tuple";
|
|
4912
4914
|
let idx = isArray ? parseInt(part, 10) : 0;
|
|
4913
|
-
if (
|
|
4915
|
+
if (schema16.innerType || isTuple) {
|
|
4914
4916
|
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]"`);
|
|
4915
4917
|
if (value && idx >= value.length) {
|
|
4916
4918
|
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. `);
|
|
4917
4919
|
}
|
|
4918
4920
|
parent = value;
|
|
4919
4921
|
value = value && value[idx];
|
|
4920
|
-
|
|
4922
|
+
schema16 = isTuple ? schema16.spec.types[idx] : schema16.innerType;
|
|
4921
4923
|
}
|
|
4922
4924
|
if (!isArray) {
|
|
4923
|
-
if (!
|
|
4925
|
+
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}")`);
|
|
4924
4926
|
parent = value;
|
|
4925
4927
|
value = value && value[part];
|
|
4926
|
-
|
|
4928
|
+
schema16 = schema16.fields[part];
|
|
4927
4929
|
}
|
|
4928
4930
|
lastPart = part;
|
|
4929
4931
|
lastPartDebug = isBracket ? "[" + _part + "]" : "." + _part;
|
|
4930
4932
|
});
|
|
4931
4933
|
return {
|
|
4932
|
-
schema:
|
|
4934
|
+
schema: schema16,
|
|
4933
4935
|
parent,
|
|
4934
4936
|
parentPath: lastPart
|
|
4935
4937
|
};
|
|
@@ -5066,20 +5068,20 @@ var Schema = class {
|
|
|
5066
5068
|
this._mutate = before;
|
|
5067
5069
|
return result;
|
|
5068
5070
|
}
|
|
5069
|
-
concat(
|
|
5070
|
-
if (!
|
|
5071
|
-
if (
|
|
5071
|
+
concat(schema16) {
|
|
5072
|
+
if (!schema16 || schema16 === this) return this;
|
|
5073
|
+
if (schema16.type !== this.type && this.type !== "mixed") throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema16.type}`);
|
|
5072
5074
|
let base = this;
|
|
5073
|
-
let combined =
|
|
5075
|
+
let combined = schema16.clone();
|
|
5074
5076
|
const mergedSpec = Object.assign({}, base.spec, combined.spec);
|
|
5075
5077
|
combined.spec = mergedSpec;
|
|
5076
5078
|
combined.internalTests = Object.assign({}, base.internalTests, combined.internalTests);
|
|
5077
|
-
combined._whitelist = base._whitelist.merge(
|
|
5078
|
-
combined._blacklist = base._blacklist.merge(
|
|
5079
|
+
combined._whitelist = base._whitelist.merge(schema16._whitelist, schema16._blacklist);
|
|
5080
|
+
combined._blacklist = base._blacklist.merge(schema16._blacklist, schema16._whitelist);
|
|
5079
5081
|
combined.tests = base.tests;
|
|
5080
5082
|
combined.exclusiveTests = base.exclusiveTests;
|
|
5081
5083
|
combined.withMutation((next) => {
|
|
5082
|
-
|
|
5084
|
+
schema16.tests.forEach((fn) => {
|
|
5083
5085
|
next.test(fn.OPTIONS);
|
|
5084
5086
|
});
|
|
5085
5087
|
});
|
|
@@ -5095,15 +5097,15 @@ var Schema = class {
|
|
|
5095
5097
|
return this._typeCheck(v);
|
|
5096
5098
|
}
|
|
5097
5099
|
resolve(options) {
|
|
5098
|
-
let
|
|
5099
|
-
if (
|
|
5100
|
-
let conditions =
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5100
|
+
let schema16 = this;
|
|
5101
|
+
if (schema16.conditions.length) {
|
|
5102
|
+
let conditions = schema16.conditions;
|
|
5103
|
+
schema16 = schema16.clone();
|
|
5104
|
+
schema16.conditions = [];
|
|
5105
|
+
schema16 = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema16);
|
|
5106
|
+
schema16 = schema16.resolve(options);
|
|
5105
5107
|
}
|
|
5106
|
-
return
|
|
5108
|
+
return schema16;
|
|
5107
5109
|
}
|
|
5108
5110
|
resolveOptions(options) {
|
|
5109
5111
|
var _options$strict, _options$abortEarly, _options$recursive, _options$disableStack;
|
|
@@ -5257,11 +5259,11 @@ attempted value: ${formattedValue}
|
|
|
5257
5259
|
}
|
|
5258
5260
|
validate(value, options) {
|
|
5259
5261
|
var _options$disableStack2;
|
|
5260
|
-
let
|
|
5262
|
+
let schema16 = this.resolve(Object.assign({}, options, {
|
|
5261
5263
|
value
|
|
5262
5264
|
}));
|
|
5263
|
-
let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 :
|
|
5264
|
-
return new Promise((resolve, reject) =>
|
|
5265
|
+
let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema16.spec.disableStackTrace;
|
|
5266
|
+
return new Promise((resolve, reject) => schema16._validate(value, options, (error, parsed) => {
|
|
5265
5267
|
if (ValidationError.isError(error)) error.value = parsed;
|
|
5266
5268
|
reject(error);
|
|
5267
5269
|
}, (errors, validated) => {
|
|
@@ -5271,12 +5273,12 @@ attempted value: ${formattedValue}
|
|
|
5271
5273
|
}
|
|
5272
5274
|
validateSync(value, options) {
|
|
5273
5275
|
var _options$disableStack3;
|
|
5274
|
-
let
|
|
5276
|
+
let schema16 = this.resolve(Object.assign({}, options, {
|
|
5275
5277
|
value
|
|
5276
5278
|
}));
|
|
5277
5279
|
let result;
|
|
5278
|
-
let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 :
|
|
5279
|
-
|
|
5280
|
+
let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema16.spec.disableStackTrace;
|
|
5281
|
+
schema16._validate(value, Object.assign({}, options, {
|
|
5280
5282
|
sync: true
|
|
5281
5283
|
}), (error, parsed) => {
|
|
5282
5284
|
if (ValidationError.isError(error)) error.value = parsed;
|
|
@@ -5310,8 +5312,8 @@ attempted value: ${formattedValue}
|
|
|
5310
5312
|
return typeof defaultValue === "function" ? defaultValue.call(this, options) : clone(defaultValue);
|
|
5311
5313
|
}
|
|
5312
5314
|
getDefault(options) {
|
|
5313
|
-
let
|
|
5314
|
-
return
|
|
5315
|
+
let schema16 = this.resolve(options || {});
|
|
5316
|
+
return schema16._getDefault(options);
|
|
5315
5317
|
}
|
|
5316
5318
|
default(def) {
|
|
5317
5319
|
if (arguments.length === 0) {
|
|
@@ -5546,9 +5548,9 @@ for (const method of ["validate", "validateSync"]) Schema.prototype[`${method}At
|
|
|
5546
5548
|
const {
|
|
5547
5549
|
parent,
|
|
5548
5550
|
parentPath,
|
|
5549
|
-
schema:
|
|
5551
|
+
schema: schema16
|
|
5550
5552
|
} = getIn(this, path, value, options.context);
|
|
5551
|
-
return
|
|
5553
|
+
return schema16[method](parent && parent[parentPath], Object.assign({}, options, {
|
|
5552
5554
|
parent,
|
|
5553
5555
|
path
|
|
5554
5556
|
}));
|
|
@@ -5722,7 +5724,7 @@ var StringSchema = class extends Schema {
|
|
|
5722
5724
|
});
|
|
5723
5725
|
}
|
|
5724
5726
|
required(message) {
|
|
5725
|
-
return super.required(message).withMutation((
|
|
5727
|
+
return super.required(message).withMutation((schema16) => schema16.test({
|
|
5726
5728
|
message: message || mixed.required,
|
|
5727
5729
|
name: "required",
|
|
5728
5730
|
skipAbsent: true,
|
|
@@ -5730,9 +5732,9 @@ var StringSchema = class extends Schema {
|
|
|
5730
5732
|
}));
|
|
5731
5733
|
}
|
|
5732
5734
|
notRequired() {
|
|
5733
|
-
return super.notRequired().withMutation((
|
|
5734
|
-
|
|
5735
|
-
return
|
|
5735
|
+
return super.notRequired().withMutation((schema16) => {
|
|
5736
|
+
schema16.tests = schema16.tests.filter((t) => t.OPTIONS.name !== "required");
|
|
5737
|
+
return schema16;
|
|
5736
5738
|
});
|
|
5737
5739
|
}
|
|
5738
5740
|
length(length, message = string.length) {
|
|
@@ -6121,28 +6123,28 @@ var parseJson = (value, _, ctx) => {
|
|
|
6121
6123
|
}
|
|
6122
6124
|
return ctx.isType(parsed) ? parsed : value;
|
|
6123
6125
|
};
|
|
6124
|
-
function deepPartial(
|
|
6125
|
-
if ("fields" in
|
|
6126
|
+
function deepPartial(schema16) {
|
|
6127
|
+
if ("fields" in schema16) {
|
|
6126
6128
|
const partial = {};
|
|
6127
|
-
for (const [key, fieldSchema] of Object.entries(
|
|
6129
|
+
for (const [key, fieldSchema] of Object.entries(schema16.fields)) {
|
|
6128
6130
|
partial[key] = deepPartial(fieldSchema);
|
|
6129
6131
|
}
|
|
6130
|
-
return
|
|
6132
|
+
return schema16.setFields(partial);
|
|
6131
6133
|
}
|
|
6132
|
-
if (
|
|
6133
|
-
const nextArray =
|
|
6134
|
+
if (schema16.type === "array") {
|
|
6135
|
+
const nextArray = schema16.optional();
|
|
6134
6136
|
if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);
|
|
6135
6137
|
return nextArray;
|
|
6136
6138
|
}
|
|
6137
|
-
if (
|
|
6138
|
-
return
|
|
6139
|
-
types:
|
|
6139
|
+
if (schema16.type === "tuple") {
|
|
6140
|
+
return schema16.optional().clone({
|
|
6141
|
+
types: schema16.spec.types.map(deepPartial)
|
|
6140
6142
|
});
|
|
6141
6143
|
}
|
|
6142
|
-
if ("optional" in
|
|
6143
|
-
return
|
|
6144
|
+
if ("optional" in schema16) {
|
|
6145
|
+
return schema16.optional();
|
|
6144
6146
|
}
|
|
6145
|
-
return
|
|
6147
|
+
return schema16;
|
|
6146
6148
|
}
|
|
6147
6149
|
var deepHas = (obj, p) => {
|
|
6148
6150
|
const path = [...(0, import_property_expr.normalizePath)(p)];
|
|
@@ -6276,8 +6278,8 @@ var ObjectSchema = class extends Schema {
|
|
|
6276
6278
|
next._sortErrors = this._sortErrors;
|
|
6277
6279
|
return next;
|
|
6278
6280
|
}
|
|
6279
|
-
concat(
|
|
6280
|
-
let next = super.concat(
|
|
6281
|
+
concat(schema16) {
|
|
6282
|
+
let next = super.concat(schema16);
|
|
6281
6283
|
let nextFields = next.fields;
|
|
6282
6284
|
for (let [field, schemaOrRef] of Object.entries(this.fields)) {
|
|
6283
6285
|
const target = nextFields[field];
|
|
@@ -6285,7 +6287,7 @@ var ObjectSchema = class extends Schema {
|
|
|
6285
6287
|
}
|
|
6286
6288
|
return next.withMutation((s) => (
|
|
6287
6289
|
// XXX: excludes here is wrong
|
|
6288
|
-
s.setFields(nextFields, [...this._excludedEdges, ...
|
|
6290
|
+
s.setFields(nextFields, [...this._excludedEdges, ...schema16._excludedEdges])
|
|
6289
6291
|
));
|
|
6290
6292
|
}
|
|
6291
6293
|
_getDefault(options) {
|
|
@@ -6330,8 +6332,8 @@ var ObjectSchema = class extends Schema {
|
|
|
6330
6332
|
}
|
|
6331
6333
|
partial() {
|
|
6332
6334
|
const partial = {};
|
|
6333
|
-
for (const [key,
|
|
6334
|
-
partial[key] = "optional" in
|
|
6335
|
+
for (const [key, schema16] of Object.entries(this.fields)) {
|
|
6336
|
+
partial[key] = "optional" in schema16 && schema16.optional instanceof Function ? schema16.optional() : schema16;
|
|
6335
6337
|
}
|
|
6336
6338
|
return this.setFields(partial);
|
|
6337
6339
|
}
|
|
@@ -6529,22 +6531,22 @@ var ArraySchema = class extends Schema {
|
|
|
6529
6531
|
json() {
|
|
6530
6532
|
return this.transform(parseJson);
|
|
6531
6533
|
}
|
|
6532
|
-
concat(
|
|
6533
|
-
let next = super.concat(
|
|
6534
|
+
concat(schema16) {
|
|
6535
|
+
let next = super.concat(schema16);
|
|
6534
6536
|
next.innerType = this.innerType;
|
|
6535
|
-
if (
|
|
6537
|
+
if (schema16.innerType)
|
|
6536
6538
|
next.innerType = next.innerType ? (
|
|
6537
6539
|
// @ts-expect-error Lazy doesn't have concat and will break
|
|
6538
|
-
next.innerType.concat(
|
|
6539
|
-
) :
|
|
6540
|
+
next.innerType.concat(schema16.innerType)
|
|
6541
|
+
) : schema16.innerType;
|
|
6540
6542
|
return next;
|
|
6541
6543
|
}
|
|
6542
|
-
of(
|
|
6544
|
+
of(schema16) {
|
|
6543
6545
|
let next = this.clone();
|
|
6544
|
-
if (!isSchema(
|
|
6545
|
-
next.innerType =
|
|
6546
|
+
if (!isSchema(schema16)) throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema16));
|
|
6547
|
+
next.innerType = schema16;
|
|
6546
6548
|
next.spec = Object.assign({}, next.spec, {
|
|
6547
|
-
types:
|
|
6549
|
+
types: schema16
|
|
6548
6550
|
});
|
|
6549
6551
|
return next;
|
|
6550
6552
|
}
|
|
@@ -6688,7 +6690,7 @@ var TupleSchema = class extends Schema {
|
|
|
6688
6690
|
describe(options) {
|
|
6689
6691
|
const next = (options ? this.resolve(options) : this).clone();
|
|
6690
6692
|
const base = super.describe(options);
|
|
6691
|
-
base.innerType = next.spec.types.map((
|
|
6693
|
+
base.innerType = next.spec.types.map((schema16, index) => {
|
|
6692
6694
|
var _innerOptions;
|
|
6693
6695
|
let innerOptions = options;
|
|
6694
6696
|
if ((_innerOptions = innerOptions) != null && _innerOptions.value) {
|
|
@@ -6697,7 +6699,7 @@ var TupleSchema = class extends Schema {
|
|
|
6697
6699
|
value: innerOptions.value[index]
|
|
6698
6700
|
});
|
|
6699
6701
|
}
|
|
6700
|
-
return
|
|
6702
|
+
return schema16.describe(innerOptions);
|
|
6701
6703
|
});
|
|
6702
6704
|
return base;
|
|
6703
6705
|
}
|
|
@@ -6714,6 +6716,7 @@ var import_react2 = __toESM(require_react(), 1);
|
|
|
6714
6716
|
var React8 = __toESM(require_react(), 1);
|
|
6715
6717
|
var import_react3 = __toESM(require_react(), 1);
|
|
6716
6718
|
var import_react4 = __toESM(require_react(), 1);
|
|
6719
|
+
var import_react5 = __toESM(require_react(), 1);
|
|
6717
6720
|
var EnumInviteStatus = /* @__PURE__ */ ((EnumInviteStatus22) => {
|
|
6718
6721
|
EnumInviteStatus22["ACCEPTED"] = "Accepted";
|
|
6719
6722
|
EnumInviteStatus22["COMPLETED"] = "Completed";
|
|
@@ -6803,9 +6806,13 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
|
|
|
6803
6806
|
EnumNotificationResourceType22["DEACTIVATED_EVENT"] = "deactivated_event";
|
|
6804
6807
|
EnumNotificationResourceType22["DEACTIVATED_PARTNER"] = "deactivated_partner";
|
|
6805
6808
|
EnumNotificationResourceType22["DEACTIVATED_VENDOR"] = "deactivated_vendor";
|
|
6809
|
+
EnumNotificationResourceType22["DOWNGRADED_EVENT"] = "downgraded_event";
|
|
6810
|
+
EnumNotificationResourceType22["DOWNGRADED_PARTNER"] = "downgraded_partner";
|
|
6811
|
+
EnumNotificationResourceType22["DOWNGRADED_VENDOR"] = "downgraded_vendor";
|
|
6806
6812
|
EnumNotificationResourceType22["DECLINED_EVENT"] = "declined_event";
|
|
6807
6813
|
EnumNotificationResourceType22["DECLINED_PARTNER"] = "declined_partner";
|
|
6808
6814
|
EnumNotificationResourceType22["DECLINED_VENDOR"] = "declined_vendor";
|
|
6815
|
+
EnumNotificationResourceType22["DAILY_CLUE_LETTER_AVAILABLE"] = "daily_clue_letter_available";
|
|
6809
6816
|
EnumNotificationResourceType22["EVENT_INVITE_VENDOR"] = "event_invite_vendor";
|
|
6810
6817
|
EnumNotificationResourceType22["EVENT_STARTING_SOON"] = "event_starting_soon";
|
|
6811
6818
|
EnumNotificationResourceType22["EXPIRATION_REMINDER_EVENT"] = "expiration_reminder_event";
|
|
@@ -6817,11 +6824,11 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
|
|
|
6817
6824
|
return EnumNotificationResourceType22;
|
|
6818
6825
|
})(EnumNotificationResourceType || {});
|
|
6819
6826
|
var EnumNotificationType = /* @__PURE__ */ ((EnumNotificationType22) => {
|
|
6827
|
+
EnumNotificationType22["CHAT"] = "chat";
|
|
6820
6828
|
EnumNotificationType22["EVENT"] = "event";
|
|
6821
|
-
EnumNotificationType22["VENDOR"] = "vendor";
|
|
6822
6829
|
EnumNotificationType22["RELATION"] = "relation";
|
|
6823
|
-
EnumNotificationType22["CHAT"] = "chat";
|
|
6824
6830
|
EnumNotificationType22["SYSTEM"] = "system";
|
|
6831
|
+
EnumNotificationType22["VENDOR"] = "vendor";
|
|
6825
6832
|
return EnumNotificationType22;
|
|
6826
6833
|
})(EnumNotificationType || {});
|
|
6827
6834
|
var EnumRegions = /* @__PURE__ */ ((EnumRegions22) => {
|
|
@@ -6889,6 +6896,17 @@ var EnumSubscriptionStatus = /* @__PURE__ */ ((EnumSubscriptionStatus22) => {
|
|
|
6889
6896
|
EnumSubscriptionStatus22["TRIALING"] = "trialing";
|
|
6890
6897
|
return EnumSubscriptionStatus22;
|
|
6891
6898
|
})(EnumSubscriptionStatus || {});
|
|
6899
|
+
var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
|
|
6900
|
+
EnumGameType2["DAILY_CLUE"] = "dailyClue";
|
|
6901
|
+
return EnumGameType2;
|
|
6902
|
+
})(EnumGameType || {});
|
|
6903
|
+
var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus3) => {
|
|
6904
|
+
EnumGameStatus3["GAME_COMPLETED"] = "GAME_COMPLETED";
|
|
6905
|
+
EnumGameStatus3["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
|
|
6906
|
+
EnumGameStatus3["GAME_LEFT"] = "GAME_LEFT";
|
|
6907
|
+
EnumGameStatus3["GAME_STARTED"] = "GAME_STARTED";
|
|
6908
|
+
return EnumGameStatus3;
|
|
6909
|
+
})(EnumGameStatus || {});
|
|
6892
6910
|
var dateFormat = "DD-MM-YYYY";
|
|
6893
6911
|
var timeFormat = "HH:mm";
|
|
6894
6912
|
import_dayjs.default.extend(import_customParseFormat.default);
|
|
@@ -8323,6 +8341,7 @@ var USER_FIELDS_FRAGMENT = gql`
|
|
|
8323
8341
|
promoCodes
|
|
8324
8342
|
refreshToken
|
|
8325
8343
|
role
|
|
8344
|
+
school
|
|
8326
8345
|
termsAgreement {
|
|
8327
8346
|
...TermsAgreementFields
|
|
8328
8347
|
}
|
|
@@ -9924,46 +9943,63 @@ var GAME_HISTORY_FIELDS_FRAGMENT = gql`
|
|
|
9924
9943
|
}
|
|
9925
9944
|
${GAME_DATE_FIELDS_FRAGMENT}
|
|
9926
9945
|
`;
|
|
9946
|
+
var GAME_DATA_FIELDS_FRAGMENT = gql`
|
|
9947
|
+
fragment GameDataFields on GameDataType {
|
|
9948
|
+
dailyClue {
|
|
9949
|
+
...DailyClueGameDataFields
|
|
9950
|
+
}
|
|
9951
|
+
}
|
|
9952
|
+
${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
|
|
9953
|
+
`;
|
|
9927
9954
|
var GAME_FIELDS_FRAGMENT = gql`
|
|
9928
9955
|
fragment GameFields on GameType {
|
|
9929
|
-
_id
|
|
9930
9956
|
active
|
|
9931
9957
|
createdAt
|
|
9932
|
-
deletedAt
|
|
9933
9958
|
gameData {
|
|
9934
|
-
|
|
9935
|
-
...DailyClueGameDataFields
|
|
9936
|
-
}
|
|
9959
|
+
...GameDataFields
|
|
9937
9960
|
}
|
|
9938
9961
|
gameHistory {
|
|
9939
9962
|
...GameHistoryFields
|
|
9940
9963
|
}
|
|
9964
|
+
gameType
|
|
9941
9965
|
updatedAt
|
|
9966
|
+
}
|
|
9967
|
+
${GAME_DATA_FIELDS_FRAGMENT}
|
|
9968
|
+
${GAME_HISTORY_FIELDS_FRAGMENT}
|
|
9969
|
+
`;
|
|
9970
|
+
var GAME_DOC_FIELDS_FRAGMENT = gql`
|
|
9971
|
+
fragment GameDocFields on GameDocType {
|
|
9972
|
+
_id
|
|
9973
|
+
active
|
|
9974
|
+
createdAt
|
|
9975
|
+
deletedAt
|
|
9976
|
+
games {
|
|
9977
|
+
...GameFields
|
|
9978
|
+
}
|
|
9942
9979
|
owner {
|
|
9943
9980
|
...OwnerFields
|
|
9944
9981
|
}
|
|
9945
9982
|
points
|
|
9983
|
+
updatedAt
|
|
9946
9984
|
}
|
|
9947
|
-
${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}
|
|
9948
9985
|
${OWNER_FIELDS_FRAGMENT}
|
|
9949
|
-
${
|
|
9950
|
-
${GAME_HISTORY_FIELDS_FRAGMENT}
|
|
9986
|
+
${GAME_FIELDS_FRAGMENT}
|
|
9951
9987
|
`;
|
|
9952
9988
|
var GET_GAMES = gql`
|
|
9953
9989
|
query getGames {
|
|
9954
9990
|
games {
|
|
9955
|
-
...
|
|
9991
|
+
...GameDocFields
|
|
9956
9992
|
}
|
|
9957
9993
|
}
|
|
9958
|
-
${
|
|
9994
|
+
${GAME_DOC_FIELDS_FRAGMENT}
|
|
9959
9995
|
`;
|
|
9960
9996
|
var GET_GAME = gql`
|
|
9961
9997
|
query getGame($_id: ID!) {
|
|
9962
9998
|
game(_id: $_id) {
|
|
9963
|
-
...
|
|
9999
|
+
...GameDocFields
|
|
9964
10000
|
}
|
|
9965
10001
|
}
|
|
9966
|
-
${
|
|
10002
|
+
${GAME_DOC_FIELDS_FRAGMENT}
|
|
9967
10003
|
`;
|
|
9968
10004
|
var GET_GAME_LEADERBOARD = gql`
|
|
9969
10005
|
query getGameLeaderboard {
|
|
@@ -10126,10 +10162,10 @@ var GET_APP_SETTINGS = gql`
|
|
|
10126
10162
|
var START_GAME_MUTATION = gql`
|
|
10127
10163
|
mutation startGame($input: BaseGameInputType!) {
|
|
10128
10164
|
startGame(input: $input) {
|
|
10129
|
-
...
|
|
10165
|
+
...GameDocFields
|
|
10130
10166
|
}
|
|
10131
10167
|
}
|
|
10132
|
-
${
|
|
10168
|
+
${GAME_DOC_FIELDS_FRAGMENT}
|
|
10133
10169
|
`;
|
|
10134
10170
|
var LEAVE_GAME_MUTATION = gql`
|
|
10135
10171
|
mutation leaveGame($_id: ID!, $gameType: GameTypeEnumType!) {
|
|
@@ -10139,10 +10175,79 @@ var LEAVE_GAME_MUTATION = gql`
|
|
|
10139
10175
|
var UPDATE_DAILY_CLUE_MUTATION = gql`
|
|
10140
10176
|
mutation updateDailyClueGame($_id: ID!, $foundLetter: String!) {
|
|
10141
10177
|
updateDailyClueGame(_id: $_id, foundLetter: $foundLetter) {
|
|
10142
|
-
...
|
|
10178
|
+
...GameDocFields
|
|
10143
10179
|
}
|
|
10144
10180
|
}
|
|
10145
|
-
${
|
|
10181
|
+
${GAME_DOC_FIELDS_FRAGMENT}
|
|
10182
|
+
`;
|
|
10183
|
+
var SCHOOL = gql`
|
|
10184
|
+
fragment SchoolFields on SchoolType {
|
|
10185
|
+
_id
|
|
10186
|
+
active
|
|
10187
|
+
contactDetails {
|
|
10188
|
+
...ContactDetailsFields
|
|
10189
|
+
}
|
|
10190
|
+
location {
|
|
10191
|
+
...LocationFields
|
|
10192
|
+
}
|
|
10193
|
+
createdAt
|
|
10194
|
+
deletedAt
|
|
10195
|
+
logo {
|
|
10196
|
+
...ResourceImageFields
|
|
10197
|
+
}
|
|
10198
|
+
name
|
|
10199
|
+
owner {
|
|
10200
|
+
...OwnerFields
|
|
10201
|
+
}
|
|
10202
|
+
region
|
|
10203
|
+
studentCount
|
|
10204
|
+
termsAgreement {
|
|
10205
|
+
...TermsAgreementFields
|
|
10206
|
+
}
|
|
10207
|
+
updatedAt
|
|
10208
|
+
}
|
|
10209
|
+
${OWNER_FIELDS_FRAGMENT}
|
|
10210
|
+
${LOCATION_FIELDS_FRAGMENT}
|
|
10211
|
+
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
10212
|
+
${CONTACT_DETAILS_FIELDS_FRAGMENT}
|
|
10213
|
+
${TERMS_AGREEMENT_FIELDS_FRAGMENT}
|
|
10214
|
+
`;
|
|
10215
|
+
var GET_SCHOOL = gql`
|
|
10216
|
+
query getSchool($_id: ID!) {
|
|
10217
|
+
school(_id: $_id) {
|
|
10218
|
+
...SchoolFields
|
|
10219
|
+
}
|
|
10220
|
+
}
|
|
10221
|
+
${SCHOOL}
|
|
10222
|
+
`;
|
|
10223
|
+
var GET_SCHOOLS = gql`
|
|
10224
|
+
query getSchools {
|
|
10225
|
+
schools {
|
|
10226
|
+
...SchoolFields
|
|
10227
|
+
}
|
|
10228
|
+
}
|
|
10229
|
+
${SCHOOL}
|
|
10230
|
+
`;
|
|
10231
|
+
var CREATE_SCHOOL_MUTATION = gql`
|
|
10232
|
+
mutation createSchool($input: SchoolInputType!) {
|
|
10233
|
+
createSchool(input: $input) {
|
|
10234
|
+
...SchoolFields
|
|
10235
|
+
}
|
|
10236
|
+
}
|
|
10237
|
+
${SCHOOL}
|
|
10238
|
+
`;
|
|
10239
|
+
var UPDATE_SCHOOL_MUTATION = gql`
|
|
10240
|
+
mutation updateSchool($_id: ID!, $input: SchoolInputType!) {
|
|
10241
|
+
updateSchool(_id: $_id, input: $input) {
|
|
10242
|
+
...SchoolFields
|
|
10243
|
+
}
|
|
10244
|
+
}
|
|
10245
|
+
${SCHOOL}
|
|
10246
|
+
`;
|
|
10247
|
+
var DELETE_SCHOOL_MUTATION = gql`
|
|
10248
|
+
mutation deleteSchool($_id: ID!) {
|
|
10249
|
+
deleteSchool(_id: $_id)
|
|
10250
|
+
}
|
|
10146
10251
|
`;
|
|
10147
10252
|
var nzBankAccountRegex = /^\d{2}-\d{4}-\d{7}-\d{2}$/;
|
|
10148
10253
|
var nzbnRegex = /^94\d{11}$/;
|
|
@@ -10295,7 +10400,7 @@ var socialMediaSchema = create$3({
|
|
|
10295
10400
|
is: (name) => !!name,
|
|
10296
10401
|
// If name has a value
|
|
10297
10402
|
then: () => normalizedUrlTransform().required("Link is required when name is set").url("Link must be a valid URL").label("Social Media Link"),
|
|
10298
|
-
otherwise: (
|
|
10403
|
+
otherwise: (schema16) => schema16.notRequired()
|
|
10299
10404
|
})
|
|
10300
10405
|
});
|
|
10301
10406
|
var globalResourceSchema = create$3().shape({
|
|
@@ -10371,21 +10476,21 @@ var paymentInfoSchema = create$3({
|
|
|
10371
10476
|
).required("Please select a Payment method"),
|
|
10372
10477
|
accountHolderName: create$6().when("paymentMethod", {
|
|
10373
10478
|
is: "bank_transfer",
|
|
10374
|
-
then: (
|
|
10375
|
-
otherwise: (
|
|
10479
|
+
then: (schema16) => schema16.required("Account holder name is required for bank transfer").trim(),
|
|
10480
|
+
otherwise: (schema16) => schema16.notRequired()
|
|
10376
10481
|
}),
|
|
10377
10482
|
accountNumber: create$6().when("paymentMethod", {
|
|
10378
10483
|
is: "bank_transfer",
|
|
10379
|
-
then: (
|
|
10484
|
+
then: (schema16) => schema16.required("Account number is required for bank transfer").matches(
|
|
10380
10485
|
nzBankAccountRegex,
|
|
10381
10486
|
"Account number must be in format: XX-XXXX-XXXXXXX-XX"
|
|
10382
10487
|
).trim(),
|
|
10383
|
-
otherwise: (
|
|
10488
|
+
otherwise: (schema16) => schema16.notRequired()
|
|
10384
10489
|
}),
|
|
10385
10490
|
link: create$6().when("paymentMethod", {
|
|
10386
10491
|
is: (val) => val === "paypal" || val === "stripe",
|
|
10387
10492
|
then: () => normalizedUrlTransform().url("Link must be a valid URL").required("Link is required for PayPal/Stripe"),
|
|
10388
|
-
otherwise: (
|
|
10493
|
+
otherwise: (schema16) => schema16.notRequired()
|
|
10389
10494
|
})
|
|
10390
10495
|
});
|
|
10391
10496
|
var eventInfoSchema = create$3().shape({
|
|
@@ -10535,16 +10640,16 @@ var vendorInfoSchema = create$3().shape({
|
|
|
10535
10640
|
var userSchema = create$3().shape({
|
|
10536
10641
|
active: create$7().required("Active is required"),
|
|
10537
10642
|
email: emailRequiredSchema,
|
|
10538
|
-
firstName: create$6().label("First Name").required("First name is required"),
|
|
10539
|
-
lastName: create$6().label("Last Name").required("Last name is required"),
|
|
10643
|
+
firstName: create$6().label("First Name").trim().required("First name is required"),
|
|
10644
|
+
lastName: create$6().label("Last Name").trim().required("Last name is required"),
|
|
10540
10645
|
isTester: create$7().required("Tester status is required"),
|
|
10541
10646
|
password: create$6().nullable().trim().label("Password").min(8, "Password must be at least 8 characters long").notRequired(),
|
|
10542
10647
|
preferredRegion: create$6().label("Preferred Region").required("Preferred region is required"),
|
|
10543
10648
|
confirmPassword: create$6().nullable().trim().label("Confirm Password").when("password", {
|
|
10544
10649
|
is: (val) => !!val,
|
|
10545
10650
|
// only necessary if password typed
|
|
10546
|
-
then: (
|
|
10547
|
-
otherwise: (
|
|
10651
|
+
then: (schema16) => schema16.required("Confirm Password is required").oneOf([create$9("password")], "Passwords must match"),
|
|
10652
|
+
otherwise: (schema16) => schema16.notRequired()
|
|
10548
10653
|
}),
|
|
10549
10654
|
role: create$8().oneOf(Object.values(EnumUserRole)).required("Role is required")
|
|
10550
10655
|
});
|
|
@@ -10615,7 +10720,7 @@ var adSchema = create$3().shape({
|
|
|
10615
10720
|
return endDate > now;
|
|
10616
10721
|
}).when("start", {
|
|
10617
10722
|
is: (val) => val && val.length > 0,
|
|
10618
|
-
then: (
|
|
10723
|
+
then: (schema16) => schema16.test(
|
|
10619
10724
|
"is-after-start",
|
|
10620
10725
|
"End date must be after start date",
|
|
10621
10726
|
function(value) {
|
|
@@ -10759,6 +10864,14 @@ var contactUsSchema = create$3().shape({
|
|
|
10759
10864
|
lastName: create$6().label("Last Name").required("Last name is required"),
|
|
10760
10865
|
message: create$6().label("Message").required("Message is required")
|
|
10761
10866
|
});
|
|
10867
|
+
var schoolSchema = create$3().shape({
|
|
10868
|
+
active: create$7().required("Active is required"),
|
|
10869
|
+
contactDetails: contactDetailsSchema,
|
|
10870
|
+
location: locationSchema,
|
|
10871
|
+
name: create$6().trim().required("Name is required"),
|
|
10872
|
+
region: create$6().trim().required("Region is required"),
|
|
10873
|
+
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"))
|
|
10874
|
+
});
|
|
10762
10875
|
var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
|
|
10763
10876
|
EnumActivity2["FAVORITE"] = "FAVORITE";
|
|
10764
10877
|
EnumActivity2["GOING"] = "GOING";
|
|
@@ -10767,16 +10880,6 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
|
|
|
10767
10880
|
EnumActivity2["VIEW"] = "VIEW";
|
|
10768
10881
|
return EnumActivity2;
|
|
10769
10882
|
})(EnumActivity || {});
|
|
10770
|
-
var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
|
|
10771
|
-
EnumGameType2["DAILY_CLUE"] = "dailyClue";
|
|
10772
|
-
return EnumGameType2;
|
|
10773
|
-
})(EnumGameType || {});
|
|
10774
|
-
var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
|
|
10775
|
-
EnumGameStatus2["GAME_COMPLETED"] = "GAME_COMPLETED";
|
|
10776
|
-
EnumGameStatus2["GAME_LEFT"] = "GAME_LEFT";
|
|
10777
|
-
EnumGameStatus2["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
|
|
10778
|
-
return EnumGameStatus2;
|
|
10779
|
-
})(EnumGameStatus || {});
|
|
10780
10883
|
|
|
10781
10884
|
// src/mongoose/Ad.ts
|
|
10782
10885
|
var import_mongoose = __toESM(require("mongoose"));
|
|
@@ -11336,27 +11439,27 @@ var baseResourceFields = {
|
|
|
11336
11439
|
required: false,
|
|
11337
11440
|
type: [associatesSchema]
|
|
11338
11441
|
},
|
|
11339
|
-
contactDetails: ContactDetailsSchema,
|
|
11442
|
+
contactDetails: { required: false, type: ContactDetailsSchema },
|
|
11340
11443
|
cover: {
|
|
11341
11444
|
required: true,
|
|
11342
11445
|
type: ResourceImageTypeSchema
|
|
11343
11446
|
},
|
|
11344
11447
|
deletedAt: { default: null, required: false, type: Date },
|
|
11345
11448
|
description: { required: true, type: String },
|
|
11346
|
-
images: [ResourceImageTypeSchema],
|
|
11347
|
-
logo: ResourceImageTypeSchema,
|
|
11449
|
+
images: { required: false, type: [ResourceImageTypeSchema] },
|
|
11450
|
+
logo: { required: false, type: ResourceImageTypeSchema },
|
|
11348
11451
|
name: { required: true, type: String },
|
|
11349
11452
|
owner: {
|
|
11350
11453
|
required: false,
|
|
11351
11454
|
type: OwnerTypeSchema
|
|
11352
11455
|
},
|
|
11353
|
-
posterUsage: PosterUsageTypeSchema,
|
|
11456
|
+
posterUsage: { required: false, type: PosterUsageTypeSchema },
|
|
11354
11457
|
promoCodes: { required: false, type: [String] },
|
|
11355
11458
|
rating: { required: false, type: Number },
|
|
11356
11459
|
region: { required: true, type: String },
|
|
11357
11460
|
reviewCount: { required: false, type: Number },
|
|
11358
|
-
socialMedia: [SocialMediaTypeSchema],
|
|
11359
|
-
termsAgreement: termsAgreementSchema
|
|
11461
|
+
socialMedia: { required: false, type: [SocialMediaTypeSchema] },
|
|
11462
|
+
termsAgreement: { required: true, type: termsAgreementSchema }
|
|
11360
11463
|
};
|
|
11361
11464
|
|
|
11362
11465
|
// src/mongoose/GoogleImportedMarket.ts
|
|
@@ -11472,7 +11575,7 @@ schema4.index({ isRead: 1, userId: 1 });
|
|
|
11472
11575
|
schema4.index({ createdAt: -1, userId: 1 });
|
|
11473
11576
|
var NotificationModel = import_mongoose8.default.models.Notification || import_mongoose8.default.model("Notification", schema4);
|
|
11474
11577
|
|
|
11475
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
11578
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-534WN2SR.mjs
|
|
11476
11579
|
var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
|
|
11477
11580
|
EnumOSPlatform22["ANDROID"] = "android";
|
|
11478
11581
|
EnumOSPlatform22["IOS"] = "ios";
|
|
@@ -11669,6 +11772,11 @@ var schema7 = new MongooseSchema11(
|
|
|
11669
11772
|
required: true,
|
|
11670
11773
|
type: String
|
|
11671
11774
|
},
|
|
11775
|
+
school: {
|
|
11776
|
+
ref: "School",
|
|
11777
|
+
required: false,
|
|
11778
|
+
type: import_mongoose11.default.Schema.Types.ObjectId
|
|
11779
|
+
},
|
|
11672
11780
|
stripe: {
|
|
11673
11781
|
required: false,
|
|
11674
11782
|
type: stripeSchema
|
|
@@ -12059,9 +12167,9 @@ var gameDataSchemas = {
|
|
|
12059
12167
|
[EnumGameType.DAILY_CLUE]: schemaDailyClue
|
|
12060
12168
|
};
|
|
12061
12169
|
var gameDataDefinition = Object.fromEntries(
|
|
12062
|
-
Object.entries(gameDataSchemas).map(([key,
|
|
12170
|
+
Object.entries(gameDataSchemas).map(([key, schema16]) => [
|
|
12063
12171
|
key,
|
|
12064
|
-
{ default: null, required: false, type:
|
|
12172
|
+
{ default: null, required: false, type: schema16 }
|
|
12065
12173
|
])
|
|
12066
12174
|
);
|
|
12067
12175
|
var gameHistorySchema = new MongooseSchema19(
|
|
@@ -12081,12 +12189,24 @@ var gameHistorySchema = new MongooseSchema19(
|
|
|
12081
12189
|
},
|
|
12082
12190
|
{ _id: false }
|
|
12083
12191
|
);
|
|
12192
|
+
var gameTypeSchema = new MongooseSchema19(
|
|
12193
|
+
{
|
|
12194
|
+
active: { default: true, required: true, type: Boolean },
|
|
12195
|
+
gameData: gameDataDefinition,
|
|
12196
|
+
gameHistory: { default: [], required: true, type: [gameHistorySchema] },
|
|
12197
|
+
gameType: {
|
|
12198
|
+
enum: Object.values(EnumGameType),
|
|
12199
|
+
required: true,
|
|
12200
|
+
type: String
|
|
12201
|
+
}
|
|
12202
|
+
},
|
|
12203
|
+
{ _id: false, timestamps: true }
|
|
12204
|
+
);
|
|
12084
12205
|
var schema14 = new MongooseSchema19(
|
|
12085
12206
|
{
|
|
12086
12207
|
active: { default: false, required: true, type: Boolean },
|
|
12087
12208
|
deletedAt: { default: null, required: false, type: Date },
|
|
12088
|
-
|
|
12089
|
-
gameHistory: { default: [], required: true, type: [gameHistorySchema] },
|
|
12209
|
+
games: { default: [], required: false, type: [gameTypeSchema] },
|
|
12090
12210
|
owner: {
|
|
12091
12211
|
required: true,
|
|
12092
12212
|
type: OwnerTypeSchema
|
|
@@ -12096,6 +12216,32 @@ var schema14 = new MongooseSchema19(
|
|
|
12096
12216
|
{ timestamps: true }
|
|
12097
12217
|
);
|
|
12098
12218
|
var GameModel = import_mongoose19.default.models.Game || import_mongoose19.default.model("Game", schema14);
|
|
12219
|
+
|
|
12220
|
+
// src/mongoose/School.ts
|
|
12221
|
+
var import_mongoose20 = __toESM(require("mongoose"));
|
|
12222
|
+
var MongooseSchema20 = import_mongoose20.default.Schema;
|
|
12223
|
+
var schema15 = new MongooseSchema20(
|
|
12224
|
+
{
|
|
12225
|
+
active: { default: false, required: true, type: Boolean },
|
|
12226
|
+
contactDetails: { required: false, type: ContactDetailsSchema },
|
|
12227
|
+
deletedAt: { default: null, required: false, type: Date },
|
|
12228
|
+
location: {
|
|
12229
|
+
required: true,
|
|
12230
|
+
type: locationsSchema
|
|
12231
|
+
},
|
|
12232
|
+
logo: { required: false, type: ResourceImageTypeSchema },
|
|
12233
|
+
name: { required: true, type: String },
|
|
12234
|
+
owner: {
|
|
12235
|
+
required: true,
|
|
12236
|
+
type: OwnerTypeSchema
|
|
12237
|
+
},
|
|
12238
|
+
region: { required: true, type: String },
|
|
12239
|
+
studentCount: { required: true, type: Number },
|
|
12240
|
+
termsAgreement: { required: true, type: termsAgreementSchema }
|
|
12241
|
+
},
|
|
12242
|
+
{ timestamps: true }
|
|
12243
|
+
);
|
|
12244
|
+
var SchoolModel = import_mongoose20.default.models.School || import_mongoose20.default.model("School", schema15);
|
|
12099
12245
|
// Annotate the CommonJS export names for ESM import in node:
|
|
12100
12246
|
0 && (module.exports = {
|
|
12101
12247
|
APP_SETTINGS_ID,
|
|
@@ -12104,6 +12250,7 @@ var GameModel = import_mongoose19.default.models.Game || import_mongoose19.defau
|
|
|
12104
12250
|
CategorySchema,
|
|
12105
12251
|
ChatModel,
|
|
12106
12252
|
ChatReportModel,
|
|
12253
|
+
ContactDetailsSchema,
|
|
12107
12254
|
EventInfoModel,
|
|
12108
12255
|
EventModel,
|
|
12109
12256
|
GameModel,
|
|
@@ -12118,6 +12265,7 @@ var GameModel = import_mongoose19.default.models.Game || import_mongoose19.defau
|
|
|
12118
12265
|
RelationTypeSchema,
|
|
12119
12266
|
ResourceActivityModel,
|
|
12120
12267
|
ResourceImageTypeSchema,
|
|
12268
|
+
SchoolModel,
|
|
12121
12269
|
SocialMediaTypeSchema,
|
|
12122
12270
|
StallTypeSchema,
|
|
12123
12271
|
UserModel,
|