@timardex/cluemart-server-shared 1.0.164 → 1.0.166
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-RGSAG3WZ.mjs → chunk-W5EVEI2Y.mjs} +183 -169
- package/dist/chunk-W5EVEI2Y.mjs.map +1 -0
- package/dist/index.cjs +192 -177
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.mjs +190 -176
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +184 -169
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +14 -2
- package/dist/mongoose/index.d.ts +14 -2
- package/dist/mongoose/index.mjs +3 -1
- package/dist/service/index.cjs +186 -173
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-RGSAG3WZ.mjs.map +0 -1
package/dist/mongoose/index.cjs
CHANGED
|
@@ -1696,6 +1696,7 @@ __export(mongoose_exports, {
|
|
|
1696
1696
|
SchoolModel: () => SchoolModel,
|
|
1697
1697
|
SocialMediaTypeSchema: () => SocialMediaTypeSchema,
|
|
1698
1698
|
StallTypeSchema: () => StallTypeSchema,
|
|
1699
|
+
UnregisteredVendorModel: () => UnregisteredVendorModel,
|
|
1699
1700
|
UserModel: () => UserModel,
|
|
1700
1701
|
VendorInfoModel: () => VendorInfoModel,
|
|
1701
1702
|
VendorModel: () => VendorModel,
|
|
@@ -4726,10 +4727,10 @@ var Condition = class _Condition {
|
|
|
4726
4727
|
otherwise
|
|
4727
4728
|
} = config;
|
|
4728
4729
|
let check = typeof is === "function" ? is : (...values) => values.every((value) => value === is);
|
|
4729
|
-
return new _Condition(refs, (values,
|
|
4730
|
+
return new _Condition(refs, (values, schema17) => {
|
|
4730
4731
|
var _branch;
|
|
4731
4732
|
let branch = check(...values) ? then : otherwise;
|
|
4732
|
-
return (_branch = branch == null ? void 0 : branch(
|
|
4733
|
+
return (_branch = branch == null ? void 0 : branch(schema17)) != null ? _branch : schema17;
|
|
4733
4734
|
});
|
|
4734
4735
|
}
|
|
4735
4736
|
constructor(refs, builder) {
|
|
@@ -4743,13 +4744,13 @@ var Condition = class _Condition {
|
|
|
4743
4744
|
// TODO: ? operator here?
|
|
4744
4745
|
ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context)
|
|
4745
4746
|
));
|
|
4746
|
-
let
|
|
4747
|
-
if (
|
|
4748
|
-
|
|
4747
|
+
let schema17 = this.fn(values, base, options);
|
|
4748
|
+
if (schema17 === void 0 || // @ts-ignore this can be base
|
|
4749
|
+
schema17 === base) {
|
|
4749
4750
|
return base;
|
|
4750
4751
|
}
|
|
4751
|
-
if (!isSchema(
|
|
4752
|
-
return
|
|
4752
|
+
if (!isSchema(schema17)) throw new TypeError("conditions must return a schema object");
|
|
4753
|
+
return schema17.resolve(options);
|
|
4753
4754
|
}
|
|
4754
4755
|
};
|
|
4755
4756
|
var prefixes = {
|
|
@@ -4819,7 +4820,7 @@ function createValidation(config) {
|
|
|
4819
4820
|
path = "",
|
|
4820
4821
|
options,
|
|
4821
4822
|
originalValue,
|
|
4822
|
-
schema:
|
|
4823
|
+
schema: schema17
|
|
4823
4824
|
}, panic, next) {
|
|
4824
4825
|
const {
|
|
4825
4826
|
name,
|
|
@@ -4831,8 +4832,8 @@ function createValidation(config) {
|
|
|
4831
4832
|
let {
|
|
4832
4833
|
parent,
|
|
4833
4834
|
context,
|
|
4834
|
-
abortEarly =
|
|
4835
|
-
disableStackTrace =
|
|
4835
|
+
abortEarly = schema17.spec.abortEarly,
|
|
4836
|
+
disableStackTrace = schema17.spec.disableStackTrace
|
|
4836
4837
|
} = options;
|
|
4837
4838
|
function resolve(item) {
|
|
4838
4839
|
return Reference.isRef(item) ? item.getValue(value, parent, context) : item;
|
|
@@ -4841,9 +4842,9 @@ function createValidation(config) {
|
|
|
4841
4842
|
const nextParams = Object.assign({
|
|
4842
4843
|
value,
|
|
4843
4844
|
originalValue,
|
|
4844
|
-
label:
|
|
4845
|
+
label: schema17.spec.label,
|
|
4845
4846
|
path: overrides.path || path,
|
|
4846
|
-
spec:
|
|
4847
|
+
spec: schema17.spec,
|
|
4847
4848
|
disableStackTrace: overrides.disableStackTrace || disableStackTrace
|
|
4848
4849
|
}, params, overrides.params);
|
|
4849
4850
|
for (const key of Object.keys(nextParams)) nextParams[key] = resolve(nextParams[key]);
|
|
@@ -4861,7 +4862,7 @@ function createValidation(config) {
|
|
|
4861
4862
|
resolve,
|
|
4862
4863
|
options,
|
|
4863
4864
|
originalValue,
|
|
4864
|
-
schema:
|
|
4865
|
+
schema: schema17
|
|
4865
4866
|
};
|
|
4866
4867
|
const handleResult = (validOrError) => {
|
|
4867
4868
|
if (ValidationError.isError(validOrError)) invalid(validOrError);
|
|
@@ -4895,42 +4896,42 @@ function createValidation(config) {
|
|
|
4895
4896
|
validate.OPTIONS = config;
|
|
4896
4897
|
return validate;
|
|
4897
4898
|
}
|
|
4898
|
-
function getIn(
|
|
4899
|
+
function getIn(schema17, path, value, context = value) {
|
|
4899
4900
|
let parent, lastPart, lastPartDebug;
|
|
4900
4901
|
if (!path) return {
|
|
4901
4902
|
parent,
|
|
4902
4903
|
parentPath: path,
|
|
4903
|
-
schema:
|
|
4904
|
+
schema: schema17
|
|
4904
4905
|
};
|
|
4905
4906
|
(0, import_property_expr.forEach)(path, (_part, isBracket, isArray) => {
|
|
4906
4907
|
let part = isBracket ? _part.slice(1, _part.length - 1) : _part;
|
|
4907
|
-
|
|
4908
|
+
schema17 = schema17.resolve({
|
|
4908
4909
|
context,
|
|
4909
4910
|
parent,
|
|
4910
4911
|
value
|
|
4911
4912
|
});
|
|
4912
|
-
let isTuple =
|
|
4913
|
+
let isTuple = schema17.type === "tuple";
|
|
4913
4914
|
let idx = isArray ? parseInt(part, 10) : 0;
|
|
4914
|
-
if (
|
|
4915
|
+
if (schema17.innerType || isTuple) {
|
|
4915
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]"`);
|
|
4916
4917
|
if (value && idx >= value.length) {
|
|
4917
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. `);
|
|
4918
4919
|
}
|
|
4919
4920
|
parent = value;
|
|
4920
4921
|
value = value && value[idx];
|
|
4921
|
-
|
|
4922
|
+
schema17 = isTuple ? schema17.spec.types[idx] : schema17.innerType;
|
|
4922
4923
|
}
|
|
4923
4924
|
if (!isArray) {
|
|
4924
|
-
if (!
|
|
4925
|
+
if (!schema17.fields || !schema17.fields[part]) throw new Error(`The schema does not contain the path: ${path}. (failed at: ${lastPartDebug} which is a type: "${schema17.type}")`);
|
|
4925
4926
|
parent = value;
|
|
4926
4927
|
value = value && value[part];
|
|
4927
|
-
|
|
4928
|
+
schema17 = schema17.fields[part];
|
|
4928
4929
|
}
|
|
4929
4930
|
lastPart = part;
|
|
4930
4931
|
lastPartDebug = isBracket ? "[" + _part + "]" : "." + _part;
|
|
4931
4932
|
});
|
|
4932
4933
|
return {
|
|
4933
|
-
schema:
|
|
4934
|
+
schema: schema17,
|
|
4934
4935
|
parent,
|
|
4935
4936
|
parentPath: lastPart
|
|
4936
4937
|
};
|
|
@@ -5067,20 +5068,20 @@ var Schema = class {
|
|
|
5067
5068
|
this._mutate = before;
|
|
5068
5069
|
return result;
|
|
5069
5070
|
}
|
|
5070
|
-
concat(
|
|
5071
|
-
if (!
|
|
5072
|
-
if (
|
|
5071
|
+
concat(schema17) {
|
|
5072
|
+
if (!schema17 || schema17 === this) return this;
|
|
5073
|
+
if (schema17.type !== this.type && this.type !== "mixed") throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema17.type}`);
|
|
5073
5074
|
let base = this;
|
|
5074
|
-
let combined =
|
|
5075
|
+
let combined = schema17.clone();
|
|
5075
5076
|
const mergedSpec = Object.assign({}, base.spec, combined.spec);
|
|
5076
5077
|
combined.spec = mergedSpec;
|
|
5077
5078
|
combined.internalTests = Object.assign({}, base.internalTests, combined.internalTests);
|
|
5078
|
-
combined._whitelist = base._whitelist.merge(
|
|
5079
|
-
combined._blacklist = base._blacklist.merge(
|
|
5079
|
+
combined._whitelist = base._whitelist.merge(schema17._whitelist, schema17._blacklist);
|
|
5080
|
+
combined._blacklist = base._blacklist.merge(schema17._blacklist, schema17._whitelist);
|
|
5080
5081
|
combined.tests = base.tests;
|
|
5081
5082
|
combined.exclusiveTests = base.exclusiveTests;
|
|
5082
5083
|
combined.withMutation((next) => {
|
|
5083
|
-
|
|
5084
|
+
schema17.tests.forEach((fn) => {
|
|
5084
5085
|
next.test(fn.OPTIONS);
|
|
5085
5086
|
});
|
|
5086
5087
|
});
|
|
@@ -5096,15 +5097,15 @@ var Schema = class {
|
|
|
5096
5097
|
return this._typeCheck(v);
|
|
5097
5098
|
}
|
|
5098
5099
|
resolve(options) {
|
|
5099
|
-
let
|
|
5100
|
-
if (
|
|
5101
|
-
let conditions =
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5100
|
+
let schema17 = this;
|
|
5101
|
+
if (schema17.conditions.length) {
|
|
5102
|
+
let conditions = schema17.conditions;
|
|
5103
|
+
schema17 = schema17.clone();
|
|
5104
|
+
schema17.conditions = [];
|
|
5105
|
+
schema17 = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema17);
|
|
5106
|
+
schema17 = schema17.resolve(options);
|
|
5106
5107
|
}
|
|
5107
|
-
return
|
|
5108
|
+
return schema17;
|
|
5108
5109
|
}
|
|
5109
5110
|
resolveOptions(options) {
|
|
5110
5111
|
var _options$strict, _options$abortEarly, _options$recursive, _options$disableStack;
|
|
@@ -5258,11 +5259,11 @@ attempted value: ${formattedValue}
|
|
|
5258
5259
|
}
|
|
5259
5260
|
validate(value, options) {
|
|
5260
5261
|
var _options$disableStack2;
|
|
5261
|
-
let
|
|
5262
|
+
let schema17 = this.resolve(Object.assign({}, options, {
|
|
5262
5263
|
value
|
|
5263
5264
|
}));
|
|
5264
|
-
let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 :
|
|
5265
|
-
return new Promise((resolve, reject) =>
|
|
5265
|
+
let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema17.spec.disableStackTrace;
|
|
5266
|
+
return new Promise((resolve, reject) => schema17._validate(value, options, (error, parsed) => {
|
|
5266
5267
|
if (ValidationError.isError(error)) error.value = parsed;
|
|
5267
5268
|
reject(error);
|
|
5268
5269
|
}, (errors, validated) => {
|
|
@@ -5272,12 +5273,12 @@ attempted value: ${formattedValue}
|
|
|
5272
5273
|
}
|
|
5273
5274
|
validateSync(value, options) {
|
|
5274
5275
|
var _options$disableStack3;
|
|
5275
|
-
let
|
|
5276
|
+
let schema17 = this.resolve(Object.assign({}, options, {
|
|
5276
5277
|
value
|
|
5277
5278
|
}));
|
|
5278
5279
|
let result;
|
|
5279
|
-
let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 :
|
|
5280
|
-
|
|
5280
|
+
let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema17.spec.disableStackTrace;
|
|
5281
|
+
schema17._validate(value, Object.assign({}, options, {
|
|
5281
5282
|
sync: true
|
|
5282
5283
|
}), (error, parsed) => {
|
|
5283
5284
|
if (ValidationError.isError(error)) error.value = parsed;
|
|
@@ -5311,8 +5312,8 @@ attempted value: ${formattedValue}
|
|
|
5311
5312
|
return typeof defaultValue === "function" ? defaultValue.call(this, options) : clone(defaultValue);
|
|
5312
5313
|
}
|
|
5313
5314
|
getDefault(options) {
|
|
5314
|
-
let
|
|
5315
|
-
return
|
|
5315
|
+
let schema17 = this.resolve(options || {});
|
|
5316
|
+
return schema17._getDefault(options);
|
|
5316
5317
|
}
|
|
5317
5318
|
default(def) {
|
|
5318
5319
|
if (arguments.length === 0) {
|
|
@@ -5547,9 +5548,9 @@ for (const method of ["validate", "validateSync"]) Schema.prototype[`${method}At
|
|
|
5547
5548
|
const {
|
|
5548
5549
|
parent,
|
|
5549
5550
|
parentPath,
|
|
5550
|
-
schema:
|
|
5551
|
+
schema: schema17
|
|
5551
5552
|
} = getIn(this, path, value, options.context);
|
|
5552
|
-
return
|
|
5553
|
+
return schema17[method](parent && parent[parentPath], Object.assign({}, options, {
|
|
5553
5554
|
parent,
|
|
5554
5555
|
path
|
|
5555
5556
|
}));
|
|
@@ -5723,7 +5724,7 @@ var StringSchema = class extends Schema {
|
|
|
5723
5724
|
});
|
|
5724
5725
|
}
|
|
5725
5726
|
required(message) {
|
|
5726
|
-
return super.required(message).withMutation((
|
|
5727
|
+
return super.required(message).withMutation((schema17) => schema17.test({
|
|
5727
5728
|
message: message || mixed.required,
|
|
5728
5729
|
name: "required",
|
|
5729
5730
|
skipAbsent: true,
|
|
@@ -5731,9 +5732,9 @@ var StringSchema = class extends Schema {
|
|
|
5731
5732
|
}));
|
|
5732
5733
|
}
|
|
5733
5734
|
notRequired() {
|
|
5734
|
-
return super.notRequired().withMutation((
|
|
5735
|
-
|
|
5736
|
-
return
|
|
5735
|
+
return super.notRequired().withMutation((schema17) => {
|
|
5736
|
+
schema17.tests = schema17.tests.filter((t) => t.OPTIONS.name !== "required");
|
|
5737
|
+
return schema17;
|
|
5737
5738
|
});
|
|
5738
5739
|
}
|
|
5739
5740
|
length(length, message = string.length) {
|
|
@@ -6122,28 +6123,28 @@ var parseJson = (value, _, ctx) => {
|
|
|
6122
6123
|
}
|
|
6123
6124
|
return ctx.isType(parsed) ? parsed : value;
|
|
6124
6125
|
};
|
|
6125
|
-
function deepPartial(
|
|
6126
|
-
if ("fields" in
|
|
6126
|
+
function deepPartial(schema17) {
|
|
6127
|
+
if ("fields" in schema17) {
|
|
6127
6128
|
const partial = {};
|
|
6128
|
-
for (const [key, fieldSchema] of Object.entries(
|
|
6129
|
+
for (const [key, fieldSchema] of Object.entries(schema17.fields)) {
|
|
6129
6130
|
partial[key] = deepPartial(fieldSchema);
|
|
6130
6131
|
}
|
|
6131
|
-
return
|
|
6132
|
+
return schema17.setFields(partial);
|
|
6132
6133
|
}
|
|
6133
|
-
if (
|
|
6134
|
-
const nextArray =
|
|
6134
|
+
if (schema17.type === "array") {
|
|
6135
|
+
const nextArray = schema17.optional();
|
|
6135
6136
|
if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);
|
|
6136
6137
|
return nextArray;
|
|
6137
6138
|
}
|
|
6138
|
-
if (
|
|
6139
|
-
return
|
|
6140
|
-
types:
|
|
6139
|
+
if (schema17.type === "tuple") {
|
|
6140
|
+
return schema17.optional().clone({
|
|
6141
|
+
types: schema17.spec.types.map(deepPartial)
|
|
6141
6142
|
});
|
|
6142
6143
|
}
|
|
6143
|
-
if ("optional" in
|
|
6144
|
-
return
|
|
6144
|
+
if ("optional" in schema17) {
|
|
6145
|
+
return schema17.optional();
|
|
6145
6146
|
}
|
|
6146
|
-
return
|
|
6147
|
+
return schema17;
|
|
6147
6148
|
}
|
|
6148
6149
|
var deepHas = (obj, p) => {
|
|
6149
6150
|
const path = [...(0, import_property_expr.normalizePath)(p)];
|
|
@@ -6277,8 +6278,8 @@ var ObjectSchema = class extends Schema {
|
|
|
6277
6278
|
next._sortErrors = this._sortErrors;
|
|
6278
6279
|
return next;
|
|
6279
6280
|
}
|
|
6280
|
-
concat(
|
|
6281
|
-
let next = super.concat(
|
|
6281
|
+
concat(schema17) {
|
|
6282
|
+
let next = super.concat(schema17);
|
|
6282
6283
|
let nextFields = next.fields;
|
|
6283
6284
|
for (let [field, schemaOrRef] of Object.entries(this.fields)) {
|
|
6284
6285
|
const target = nextFields[field];
|
|
@@ -6286,7 +6287,7 @@ var ObjectSchema = class extends Schema {
|
|
|
6286
6287
|
}
|
|
6287
6288
|
return next.withMutation((s) => (
|
|
6288
6289
|
// XXX: excludes here is wrong
|
|
6289
|
-
s.setFields(nextFields, [...this._excludedEdges, ...
|
|
6290
|
+
s.setFields(nextFields, [...this._excludedEdges, ...schema17._excludedEdges])
|
|
6290
6291
|
));
|
|
6291
6292
|
}
|
|
6292
6293
|
_getDefault(options) {
|
|
@@ -6331,8 +6332,8 @@ var ObjectSchema = class extends Schema {
|
|
|
6331
6332
|
}
|
|
6332
6333
|
partial() {
|
|
6333
6334
|
const partial = {};
|
|
6334
|
-
for (const [key,
|
|
6335
|
-
partial[key] = "optional" in
|
|
6335
|
+
for (const [key, schema17] of Object.entries(this.fields)) {
|
|
6336
|
+
partial[key] = "optional" in schema17 && schema17.optional instanceof Function ? schema17.optional() : schema17;
|
|
6336
6337
|
}
|
|
6337
6338
|
return this.setFields(partial);
|
|
6338
6339
|
}
|
|
@@ -6530,22 +6531,22 @@ var ArraySchema = class extends Schema {
|
|
|
6530
6531
|
json() {
|
|
6531
6532
|
return this.transform(parseJson);
|
|
6532
6533
|
}
|
|
6533
|
-
concat(
|
|
6534
|
-
let next = super.concat(
|
|
6534
|
+
concat(schema17) {
|
|
6535
|
+
let next = super.concat(schema17);
|
|
6535
6536
|
next.innerType = this.innerType;
|
|
6536
|
-
if (
|
|
6537
|
+
if (schema17.innerType)
|
|
6537
6538
|
next.innerType = next.innerType ? (
|
|
6538
6539
|
// @ts-expect-error Lazy doesn't have concat and will break
|
|
6539
|
-
next.innerType.concat(
|
|
6540
|
-
) :
|
|
6540
|
+
next.innerType.concat(schema17.innerType)
|
|
6541
|
+
) : schema17.innerType;
|
|
6541
6542
|
return next;
|
|
6542
6543
|
}
|
|
6543
|
-
of(
|
|
6544
|
+
of(schema17) {
|
|
6544
6545
|
let next = this.clone();
|
|
6545
|
-
if (!isSchema(
|
|
6546
|
-
next.innerType =
|
|
6546
|
+
if (!isSchema(schema17)) throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema17));
|
|
6547
|
+
next.innerType = schema17;
|
|
6547
6548
|
next.spec = Object.assign({}, next.spec, {
|
|
6548
|
-
types:
|
|
6549
|
+
types: schema17
|
|
6549
6550
|
});
|
|
6550
6551
|
return next;
|
|
6551
6552
|
}
|
|
@@ -6689,7 +6690,7 @@ var TupleSchema = class extends Schema {
|
|
|
6689
6690
|
describe(options) {
|
|
6690
6691
|
const next = (options ? this.resolve(options) : this).clone();
|
|
6691
6692
|
const base = super.describe(options);
|
|
6692
|
-
base.innerType = next.spec.types.map((
|
|
6693
|
+
base.innerType = next.spec.types.map((schema17, index) => {
|
|
6693
6694
|
var _innerOptions;
|
|
6694
6695
|
let innerOptions = options;
|
|
6695
6696
|
if ((_innerOptions = innerOptions) != null && _innerOptions.value) {
|
|
@@ -6698,7 +6699,7 @@ var TupleSchema = class extends Schema {
|
|
|
6698
6699
|
value: innerOptions.value[index]
|
|
6699
6700
|
});
|
|
6700
6701
|
}
|
|
6701
|
-
return
|
|
6702
|
+
return schema17.describe(innerOptions);
|
|
6702
6703
|
});
|
|
6703
6704
|
return base;
|
|
6704
6705
|
}
|
|
@@ -8540,21 +8541,6 @@ var EVENT_LIST_ITEM = gql`
|
|
|
8540
8541
|
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
8541
8542
|
${RELATION_DATES_FRAGMENT}
|
|
8542
8543
|
`;
|
|
8543
|
-
var UNREGISTERED_VENDOR_LIST_ITEM_FIELDS_FRAGMENT = gql`
|
|
8544
|
-
fragment UnregisteredVendorListItemFields on UnregisteredVendorListItemType {
|
|
8545
|
-
_id
|
|
8546
|
-
categoryIds
|
|
8547
|
-
email
|
|
8548
|
-
invitations {
|
|
8549
|
-
dateTime {
|
|
8550
|
-
...DateTimeFields
|
|
8551
|
-
}
|
|
8552
|
-
eventId
|
|
8553
|
-
}
|
|
8554
|
-
name
|
|
8555
|
-
}
|
|
8556
|
-
${DATETIME_FIELDS_FRAGMENT}
|
|
8557
|
-
`;
|
|
8558
8544
|
var EVENT_INFO = gql`
|
|
8559
8545
|
fragment EventInfoFields on EventInfoType {
|
|
8560
8546
|
_id
|
|
@@ -8878,12 +8864,10 @@ var VENDOR_INFO = gql`
|
|
|
8878
8864
|
`;
|
|
8879
8865
|
var UNREGISTERED_VENDOR_INVITATION_FRAGMENT = gql`
|
|
8880
8866
|
fragment UnregisteredVendorInvitationFields on UnregisteredVendorInvitationType {
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
...DateTimeFields
|
|
8884
|
-
}
|
|
8885
|
-
eventId
|
|
8867
|
+
dateTime {
|
|
8868
|
+
...DateTimeFields
|
|
8886
8869
|
}
|
|
8870
|
+
inviterId
|
|
8887
8871
|
}
|
|
8888
8872
|
${DATETIME_FIELDS_FRAGMENT}
|
|
8889
8873
|
`;
|
|
@@ -10591,7 +10575,7 @@ var stallTypesSchema = create$3({
|
|
|
10591
10575
|
"",
|
|
10592
10576
|
noLeadingZeros("Stall price", { allowDecimal: true })
|
|
10593
10577
|
),
|
|
10594
|
-
stallCapacity: create$5().label("Stall Capacity").typeError("Stall capacity must be a number").min(
|
|
10578
|
+
stallCapacity: create$5().label("Stall Capacity").typeError("Stall capacity must be a number").min(0, "Stall capacity cannot be negative").integer("Stall capacity must be a whole number").required("Stall capacity is required").test("no-leading-zeros", "", noLeadingZeros("Stall capacity"))
|
|
10595
10579
|
});
|
|
10596
10580
|
var dateTimeWithPriceSchema = dateTimeSchema.shape({
|
|
10597
10581
|
stallTypes: create$2().of(stallTypesSchema).min(1, "At least one stall type is required").required("Stall types are required")
|
|
@@ -10618,7 +10602,7 @@ var socialMediaSchema = create$3({
|
|
|
10618
10602
|
is: (name) => !!name,
|
|
10619
10603
|
// If name has a value
|
|
10620
10604
|
then: () => normalizedUrlTransform().required("Link is required when name is set").url("Link must be a valid URL").label("Social Media Link"),
|
|
10621
|
-
otherwise: (
|
|
10605
|
+
otherwise: (schema17) => schema17.notRequired()
|
|
10622
10606
|
})
|
|
10623
10607
|
});
|
|
10624
10608
|
var globalResourceSchema = create$3().shape({
|
|
@@ -10694,21 +10678,21 @@ var paymentInfoSchema = create$3({
|
|
|
10694
10678
|
).required("Please select a Payment method"),
|
|
10695
10679
|
accountHolderName: create$6().when("paymentMethod", {
|
|
10696
10680
|
is: "bank_transfer",
|
|
10697
|
-
then: (
|
|
10698
|
-
otherwise: (
|
|
10681
|
+
then: (schema17) => schema17.required("Account holder name is required for bank transfer").trim(),
|
|
10682
|
+
otherwise: (schema17) => schema17.notRequired()
|
|
10699
10683
|
}),
|
|
10700
10684
|
accountNumber: create$6().when("paymentMethod", {
|
|
10701
10685
|
is: "bank_transfer",
|
|
10702
|
-
then: (
|
|
10686
|
+
then: (schema17) => schema17.required("Account number is required for bank transfer").matches(
|
|
10703
10687
|
nzBankAccountRegex,
|
|
10704
10688
|
"Account number must be in format: XX-XXXX-XXXXXXX-XX"
|
|
10705
10689
|
).trim(),
|
|
10706
|
-
otherwise: (
|
|
10690
|
+
otherwise: (schema17) => schema17.notRequired()
|
|
10707
10691
|
}),
|
|
10708
10692
|
link: create$6().when("paymentMethod", {
|
|
10709
10693
|
is: (val) => val === "paypal" || val === "stripe",
|
|
10710
10694
|
then: () => normalizedUrlTransform().url("Link must be a valid URL").required("Link is required for PayPal/Stripe"),
|
|
10711
|
-
otherwise: (
|
|
10695
|
+
otherwise: (schema17) => schema17.notRequired()
|
|
10712
10696
|
})
|
|
10713
10697
|
});
|
|
10714
10698
|
var eventInfoSchema = create$3().shape({
|
|
@@ -10757,7 +10741,9 @@ var vendorSchema = globalResourceSchema.shape({
|
|
|
10757
10741
|
});
|
|
10758
10742
|
var unregisteredVendorSchema = create$3().shape({
|
|
10759
10743
|
categoryIds: create$2().of(create$6().defined()).min(1, "Category list must contain at least one item").required("Categories are required"),
|
|
10744
|
+
dateTime: create$2().of(dateTimeSchema).min(1, "DateTime list must contain at least one item").required("DateTime is required"),
|
|
10760
10745
|
email: emailOptionalSchema,
|
|
10746
|
+
inviterId: create$6().required("Inviter ID is required"),
|
|
10761
10747
|
name: create$6().label("Stallholder Name").trim().min(3, "Name must be at least 3 characters").required("Name is required")
|
|
10762
10748
|
});
|
|
10763
10749
|
var vendorInfoSchema = create$3().shape({
|
|
@@ -10858,8 +10844,8 @@ var userSchema = create$3().shape({
|
|
|
10858
10844
|
confirmPassword: create$6().nullable().trim().label("Confirm Password").when("password", {
|
|
10859
10845
|
is: (val) => !!val,
|
|
10860
10846
|
// only necessary if password typed
|
|
10861
|
-
then: (
|
|
10862
|
-
otherwise: (
|
|
10847
|
+
then: (schema17) => schema17.required("Confirm Password is required").oneOf([create$9("password")], "Passwords must match"),
|
|
10848
|
+
otherwise: (schema17) => schema17.notRequired()
|
|
10863
10849
|
}),
|
|
10864
10850
|
role: create$8().oneOf(Object.values(EnumUserRole)).required("Role is required")
|
|
10865
10851
|
});
|
|
@@ -10930,7 +10916,7 @@ var adSchema = create$3().shape({
|
|
|
10930
10916
|
return endDate > now;
|
|
10931
10917
|
}).when("start", {
|
|
10932
10918
|
is: (val) => val && val.length > 0,
|
|
10933
|
-
then: (
|
|
10919
|
+
then: (schema17) => schema17.test(
|
|
10934
10920
|
"is-after-start",
|
|
10935
10921
|
"End date must be after start date",
|
|
10936
10922
|
function(value) {
|
|
@@ -12206,7 +12192,7 @@ var schema9 = new MongooseSchema13(
|
|
|
12206
12192
|
required: false,
|
|
12207
12193
|
type: calendarWrapperSchema
|
|
12208
12194
|
},
|
|
12209
|
-
categories: [CategorySchema],
|
|
12195
|
+
categories: { required: true, type: [CategorySchema] },
|
|
12210
12196
|
foodTruck: { required: true, type: Boolean },
|
|
12211
12197
|
products: { required: false, type: productWrapperSchema },
|
|
12212
12198
|
relations: {
|
|
@@ -12285,19 +12271,47 @@ var schema10 = new MongooseSchema14(
|
|
|
12285
12271
|
);
|
|
12286
12272
|
var VendorInfoModel = import_mongoose14.default.models.VendorInfo || import_mongoose14.default.model("VendorInfo", schema10);
|
|
12287
12273
|
|
|
12288
|
-
// src/mongoose/
|
|
12274
|
+
// src/mongoose/vendor/UnregisteredVendor.ts
|
|
12289
12275
|
var import_mongoose15 = __toESM(require("mongoose"));
|
|
12290
12276
|
var MongooseSchema15 = import_mongoose15.default.Schema;
|
|
12277
|
+
var invitationSchema = new MongooseSchema15(
|
|
12278
|
+
{
|
|
12279
|
+
dateTime: { required: true, type: [dateTimeSchema3] },
|
|
12280
|
+
inviterId: {
|
|
12281
|
+
ref: "Event",
|
|
12282
|
+
required: true,
|
|
12283
|
+
type: String
|
|
12284
|
+
}
|
|
12285
|
+
},
|
|
12286
|
+
{ _id: false }
|
|
12287
|
+
);
|
|
12291
12288
|
var schema11 = new MongooseSchema15(
|
|
12289
|
+
{
|
|
12290
|
+
categoryIds: { required: true, type: [String] },
|
|
12291
|
+
deletedAt: { default: null, required: false, type: Date },
|
|
12292
|
+
email: { required: true, type: String },
|
|
12293
|
+
invitations: { required: true, type: [invitationSchema] },
|
|
12294
|
+
name: { required: true, type: String }
|
|
12295
|
+
},
|
|
12296
|
+
{ timestamps: true }
|
|
12297
|
+
);
|
|
12298
|
+
schema11.index({ email: 1 }, { unique: true });
|
|
12299
|
+
schema11.index({ name: 1 });
|
|
12300
|
+
var UnregisteredVendorModel = import_mongoose15.default.models.UnregisteredVendor || import_mongoose15.default.model("UnregisteredVendor", schema11);
|
|
12301
|
+
|
|
12302
|
+
// src/mongoose/event/Event.ts
|
|
12303
|
+
var import_mongoose16 = __toESM(require("mongoose"));
|
|
12304
|
+
var MongooseSchema16 = import_mongoose16.default.Schema;
|
|
12305
|
+
var schema12 = new MongooseSchema16(
|
|
12292
12306
|
{
|
|
12293
12307
|
...baseResourceFields,
|
|
12294
12308
|
// Importing base resource fields from global.ts
|
|
12295
12309
|
claimed: { default: true, required: false, type: Boolean },
|
|
12296
|
-
dateTime: [dateTimeSchema3],
|
|
12310
|
+
dateTime: { required: true, type: [dateTimeSchema3] },
|
|
12297
12311
|
eventInfoId: {
|
|
12298
12312
|
ref: "EventInfo",
|
|
12299
12313
|
required: false,
|
|
12300
|
-
type:
|
|
12314
|
+
type: import_mongoose16.default.Schema.Types.ObjectId
|
|
12301
12315
|
},
|
|
12302
12316
|
eventType: {
|
|
12303
12317
|
enum: Object.values(EnumEventType),
|
|
@@ -12326,18 +12340,18 @@ var schema11 = new MongooseSchema15(
|
|
|
12326
12340
|
},
|
|
12327
12341
|
{ timestamps: true }
|
|
12328
12342
|
);
|
|
12329
|
-
|
|
12330
|
-
|
|
12331
|
-
|
|
12332
|
-
|
|
12333
|
-
|
|
12334
|
-
|
|
12335
|
-
var EventModel =
|
|
12343
|
+
schema12.index({ name: 1 });
|
|
12344
|
+
schema12.index({ description: 1 });
|
|
12345
|
+
schema12.index({ region: 1 });
|
|
12346
|
+
schema12.index({ "location.geo": "2dsphere" });
|
|
12347
|
+
schema12.index({ tags: 1 });
|
|
12348
|
+
schema12.index({ "associates.email": 1 });
|
|
12349
|
+
var EventModel = import_mongoose16.default.models.Event || import_mongoose16.default.model("Event", schema12);
|
|
12336
12350
|
|
|
12337
12351
|
// src/mongoose/Partner.ts
|
|
12338
|
-
var
|
|
12339
|
-
var
|
|
12340
|
-
var
|
|
12352
|
+
var import_mongoose17 = __toESM(require("mongoose"));
|
|
12353
|
+
var MongooseSchema17 = import_mongoose17.default.Schema;
|
|
12354
|
+
var schema13 = new MongooseSchema17(
|
|
12341
12355
|
{
|
|
12342
12356
|
...baseResourceFields,
|
|
12343
12357
|
location: {
|
|
@@ -12353,19 +12367,19 @@ var schema12 = new MongooseSchema16(
|
|
|
12353
12367
|
},
|
|
12354
12368
|
{ timestamps: true }
|
|
12355
12369
|
);
|
|
12356
|
-
|
|
12357
|
-
|
|
12358
|
-
|
|
12359
|
-
|
|
12360
|
-
|
|
12361
|
-
var PartnerModel =
|
|
12370
|
+
schema13.index({ name: 1 });
|
|
12371
|
+
schema13.index({ description: 1 });
|
|
12372
|
+
schema13.index({ region: 1 });
|
|
12373
|
+
schema13.index({ "location.geo": "2dsphere" });
|
|
12374
|
+
schema13.index({ "associates.email": 1 });
|
|
12375
|
+
var PartnerModel = import_mongoose17.default.models.Partner || import_mongoose17.default.model("Partner", schema13);
|
|
12362
12376
|
|
|
12363
12377
|
// src/mongoose/Post.ts
|
|
12364
|
-
var
|
|
12365
|
-
var
|
|
12366
|
-
var contentSchema = new
|
|
12378
|
+
var import_mongoose18 = __toESM(require("mongoose"));
|
|
12379
|
+
var MongooseSchema18 = import_mongoose18.default.Schema;
|
|
12380
|
+
var contentSchema = new MongooseSchema18(
|
|
12367
12381
|
{
|
|
12368
|
-
contentData:
|
|
12382
|
+
contentData: import_mongoose18.Schema.Types.Mixed,
|
|
12369
12383
|
contentOrder: { required: true, type: Number },
|
|
12370
12384
|
contentType: {
|
|
12371
12385
|
enum: Object.values(EnumPostContentType),
|
|
@@ -12375,7 +12389,7 @@ var contentSchema = new MongooseSchema17(
|
|
|
12375
12389
|
},
|
|
12376
12390
|
{ _id: false }
|
|
12377
12391
|
);
|
|
12378
|
-
var
|
|
12392
|
+
var schema14 = new MongooseSchema18(
|
|
12379
12393
|
{
|
|
12380
12394
|
active: { default: true, required: true, type: Boolean },
|
|
12381
12395
|
caption: { required: true, type: String },
|
|
@@ -12411,15 +12425,15 @@ var schema13 = new MongooseSchema17(
|
|
|
12411
12425
|
},
|
|
12412
12426
|
{ timestamps: true }
|
|
12413
12427
|
);
|
|
12414
|
-
|
|
12415
|
-
|
|
12416
|
-
var PostModel =
|
|
12428
|
+
schema14.index({ title: 1 });
|
|
12429
|
+
schema14.index({ tags: 1 });
|
|
12430
|
+
var PostModel = import_mongoose18.default.models.Post || import_mongoose18.default.model("Post", schema14);
|
|
12417
12431
|
|
|
12418
12432
|
// src/mongoose/AppSetting.ts
|
|
12419
|
-
var
|
|
12420
|
-
var
|
|
12433
|
+
var import_mongoose19 = __toESM(require("mongoose"));
|
|
12434
|
+
var MongooseSchema19 = import_mongoose19.default.Schema;
|
|
12421
12435
|
var APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
|
|
12422
|
-
var AppSettingSchema = new
|
|
12436
|
+
var AppSettingSchema = new MongooseSchema19(
|
|
12423
12437
|
{
|
|
12424
12438
|
activeSchoolsStudentCountTotal: {
|
|
12425
12439
|
default: 0,
|
|
@@ -12445,18 +12459,18 @@ var AppSettingSchema = new MongooseSchema18(
|
|
|
12445
12459
|
},
|
|
12446
12460
|
{ timestamps: true }
|
|
12447
12461
|
);
|
|
12448
|
-
var AppSettingModel =
|
|
12462
|
+
var AppSettingModel = import_mongoose19.default.models.AppSetting || import_mongoose19.default.model("AppSetting", AppSettingSchema);
|
|
12449
12463
|
|
|
12450
12464
|
// src/mongoose/game/Game.ts
|
|
12451
|
-
var
|
|
12465
|
+
var import_mongoose23 = __toESM(require("mongoose"));
|
|
12452
12466
|
|
|
12453
12467
|
// src/mongoose/game/DailyClue.ts
|
|
12454
|
-
var
|
|
12468
|
+
var import_mongoose21 = __toESM(require("mongoose"));
|
|
12455
12469
|
|
|
12456
12470
|
// src/mongoose/game/utils.ts
|
|
12457
|
-
var
|
|
12458
|
-
var
|
|
12459
|
-
var schemaGameDate = new
|
|
12471
|
+
var import_mongoose20 = __toESM(require("mongoose"));
|
|
12472
|
+
var MongooseSchema20 = import_mongoose20.default.Schema;
|
|
12473
|
+
var schemaGameDate = new MongooseSchema20(
|
|
12460
12474
|
{
|
|
12461
12475
|
endDate: { required: true, type: Date },
|
|
12462
12476
|
startDate: { required: true, type: Date }
|
|
@@ -12465,8 +12479,8 @@ var schemaGameDate = new MongooseSchema19(
|
|
|
12465
12479
|
);
|
|
12466
12480
|
|
|
12467
12481
|
// src/mongoose/game/DailyClue.ts
|
|
12468
|
-
var
|
|
12469
|
-
var schemaLetters = new
|
|
12482
|
+
var MongooseSchema21 = import_mongoose21.default.Schema;
|
|
12483
|
+
var schemaLetters = new MongooseSchema21(
|
|
12470
12484
|
{
|
|
12471
12485
|
collected: { required: false, type: [String] },
|
|
12472
12486
|
solutionShuffled: { required: true, type: [String] }
|
|
@@ -12474,14 +12488,14 @@ var schemaLetters = new MongooseSchema20(
|
|
|
12474
12488
|
},
|
|
12475
12489
|
{ _id: false }
|
|
12476
12490
|
);
|
|
12477
|
-
var schemaDailyClueBaseGame = new
|
|
12491
|
+
var schemaDailyClueBaseGame = new MongooseSchema21(
|
|
12478
12492
|
{
|
|
12479
12493
|
gameDate: { required: true, type: schemaGameDate },
|
|
12480
12494
|
gameSolution: { required: true, type: String }
|
|
12481
12495
|
},
|
|
12482
12496
|
{ _id: false }
|
|
12483
12497
|
);
|
|
12484
|
-
var schemaDailyClueGameData = new
|
|
12498
|
+
var schemaDailyClueGameData = new MongooseSchema21(
|
|
12485
12499
|
{
|
|
12486
12500
|
gameFields: { required: true, type: schemaDailyClueBaseGame },
|
|
12487
12501
|
lastFoundDate: { default: null, required: false, type: Date },
|
|
@@ -12496,9 +12510,9 @@ var schemaDailyClueGameData = new MongooseSchema20(
|
|
|
12496
12510
|
);
|
|
12497
12511
|
|
|
12498
12512
|
// src/mongoose/game/MiniQuiz.ts
|
|
12499
|
-
var
|
|
12500
|
-
var
|
|
12501
|
-
var schemaMiniQuizAnswer = new
|
|
12513
|
+
var import_mongoose22 = __toESM(require("mongoose"));
|
|
12514
|
+
var MongooseSchema22 = import_mongoose22.default.Schema;
|
|
12515
|
+
var schemaMiniQuizAnswer = new MongooseSchema22(
|
|
12502
12516
|
{
|
|
12503
12517
|
answer: { required: true, type: String },
|
|
12504
12518
|
answerId: { required: true, type: String },
|
|
@@ -12506,7 +12520,7 @@ var schemaMiniQuizAnswer = new MongooseSchema21(
|
|
|
12506
12520
|
},
|
|
12507
12521
|
{ _id: false }
|
|
12508
12522
|
);
|
|
12509
|
-
var schemaMiniQuizQuestion = new
|
|
12523
|
+
var schemaMiniQuizQuestion = new MongooseSchema22(
|
|
12510
12524
|
{
|
|
12511
12525
|
answers: { required: true, type: [schemaMiniQuizAnswer] },
|
|
12512
12526
|
question: { required: true, type: String },
|
|
@@ -12514,20 +12528,20 @@ var schemaMiniQuizQuestion = new MongooseSchema21(
|
|
|
12514
12528
|
},
|
|
12515
12529
|
{ _id: false }
|
|
12516
12530
|
);
|
|
12517
|
-
var schemaMiniQuizBaseGame = new
|
|
12531
|
+
var schemaMiniQuizBaseGame = new MongooseSchema22(
|
|
12518
12532
|
{
|
|
12519
12533
|
questions: { required: true, type: [schemaMiniQuizQuestion] }
|
|
12520
12534
|
},
|
|
12521
12535
|
{ _id: false }
|
|
12522
12536
|
);
|
|
12523
|
-
var schemaMiniQuizAnsweredQuestion = new
|
|
12537
|
+
var schemaMiniQuizAnsweredQuestion = new MongooseSchema22(
|
|
12524
12538
|
{
|
|
12525
12539
|
questionId: { required: true, type: String },
|
|
12526
12540
|
selectedAnswerId: { required: true, type: String }
|
|
12527
12541
|
},
|
|
12528
12542
|
{ _id: false }
|
|
12529
12543
|
);
|
|
12530
|
-
var schemaMiniQuizGameData = new
|
|
12544
|
+
var schemaMiniQuizGameData = new MongooseSchema22(
|
|
12531
12545
|
{
|
|
12532
12546
|
answeredQuestions: {
|
|
12533
12547
|
default: null,
|
|
@@ -12542,18 +12556,18 @@ var schemaMiniQuizGameData = new MongooseSchema21(
|
|
|
12542
12556
|
);
|
|
12543
12557
|
|
|
12544
12558
|
// src/mongoose/game/Game.ts
|
|
12545
|
-
var
|
|
12559
|
+
var MongooseSchema23 = import_mongoose23.default.Schema;
|
|
12546
12560
|
var gameDataSchemas = {
|
|
12547
12561
|
[EnumGameType.DAILY_CLUE]: schemaDailyClueGameData,
|
|
12548
12562
|
[EnumGameType.MINI_QUIZ]: schemaMiniQuizGameData
|
|
12549
12563
|
};
|
|
12550
12564
|
var gameDataDefinition = Object.fromEntries(
|
|
12551
|
-
Object.entries(gameDataSchemas).map(([key,
|
|
12565
|
+
Object.entries(gameDataSchemas).map(([key, schema17]) => [
|
|
12552
12566
|
key,
|
|
12553
|
-
{ default: null, required: false, type:
|
|
12567
|
+
{ default: null, required: false, type: schema17 }
|
|
12554
12568
|
])
|
|
12555
12569
|
);
|
|
12556
|
-
var gameHistorySchema = new
|
|
12570
|
+
var gameHistorySchema = new MongooseSchema23(
|
|
12557
12571
|
{
|
|
12558
12572
|
createdAt: { required: true, type: Date },
|
|
12559
12573
|
gameDate: { required: true, type: schemaGameDate },
|
|
@@ -12571,7 +12585,7 @@ var gameHistorySchema = new MongooseSchema22(
|
|
|
12571
12585
|
},
|
|
12572
12586
|
{ _id: false }
|
|
12573
12587
|
);
|
|
12574
|
-
var gameTypeSchema = new
|
|
12588
|
+
var gameTypeSchema = new MongooseSchema23(
|
|
12575
12589
|
{
|
|
12576
12590
|
active: { default: true, required: true, type: Boolean },
|
|
12577
12591
|
gameData: gameDataDefinition,
|
|
@@ -12585,7 +12599,7 @@ var gameTypeSchema = new MongooseSchema22(
|
|
|
12585
12599
|
},
|
|
12586
12600
|
{ timestamps: true }
|
|
12587
12601
|
);
|
|
12588
|
-
var
|
|
12602
|
+
var schema15 = new MongooseSchema23(
|
|
12589
12603
|
{
|
|
12590
12604
|
active: { default: false, required: true, type: Boolean },
|
|
12591
12605
|
deletedAt: { default: null, required: false, type: Date },
|
|
@@ -12598,12 +12612,12 @@ var schema14 = new MongooseSchema22(
|
|
|
12598
12612
|
},
|
|
12599
12613
|
{ timestamps: true }
|
|
12600
12614
|
);
|
|
12601
|
-
var GameModel =
|
|
12615
|
+
var GameModel = import_mongoose23.default.models.Game || import_mongoose23.default.model("Game", schema15);
|
|
12602
12616
|
|
|
12603
12617
|
// src/mongoose/School.ts
|
|
12604
|
-
var
|
|
12605
|
-
var
|
|
12606
|
-
var campaignsSchema = new
|
|
12618
|
+
var import_mongoose24 = __toESM(require("mongoose"));
|
|
12619
|
+
var MongooseSchema24 = import_mongoose24.default.Schema;
|
|
12620
|
+
var campaignsSchema = new MongooseSchema24(
|
|
12607
12621
|
{
|
|
12608
12622
|
endDate: { required: true, type: Date },
|
|
12609
12623
|
name: { required: true, type: String },
|
|
@@ -12611,7 +12625,7 @@ var campaignsSchema = new MongooseSchema23(
|
|
|
12611
12625
|
},
|
|
12612
12626
|
{ _id: false }
|
|
12613
12627
|
);
|
|
12614
|
-
var
|
|
12628
|
+
var schema16 = new MongooseSchema24(
|
|
12615
12629
|
{
|
|
12616
12630
|
// New schools are active by default
|
|
12617
12631
|
active: { default: true, required: true, type: Boolean },
|
|
@@ -12637,7 +12651,7 @@ var schema15 = new MongooseSchema23(
|
|
|
12637
12651
|
},
|
|
12638
12652
|
{ timestamps: true }
|
|
12639
12653
|
);
|
|
12640
|
-
var SchoolModel =
|
|
12654
|
+
var SchoolModel = import_mongoose24.default.models.School || import_mongoose24.default.model("School", schema16);
|
|
12641
12655
|
// Annotate the CommonJS export names for ESM import in node:
|
|
12642
12656
|
0 && (module.exports = {
|
|
12643
12657
|
APP_SETTINGS_ID,
|
|
@@ -12663,6 +12677,7 @@ var SchoolModel = import_mongoose23.default.models.School || import_mongoose23.d
|
|
|
12663
12677
|
SchoolModel,
|
|
12664
12678
|
SocialMediaTypeSchema,
|
|
12665
12679
|
StallTypeSchema,
|
|
12680
|
+
UnregisteredVendorModel,
|
|
12666
12681
|
UserModel,
|
|
12667
12682
|
VendorInfoModel,
|
|
12668
12683
|
VendorModel,
|