@timardex/cluemart-server-shared 1.0.57 → 1.0.59
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-B4VLYNG4.mjs → chunk-5JEBH7MU.mjs} +247 -195
- package/dist/chunk-5JEBH7MU.mjs.map +1 -0
- package/dist/index.cjs +252 -199
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.mjs +250 -198
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +248 -195
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +8 -2
- package/dist/mongoose/index.d.ts +8 -2
- package/dist/mongoose/index.mjs +3 -1
- package/dist/service/index.cjs +235 -184
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-B4VLYNG4.mjs.map +0 -1
package/dist/mongoose/index.cjs
CHANGED
|
@@ -1680,6 +1680,7 @@ __export(mongoose_exports, {
|
|
|
1680
1680
|
ChatModel: () => ChatModel,
|
|
1681
1681
|
EventInfoModel: () => EventInfoModel,
|
|
1682
1682
|
EventModel: () => EventModel,
|
|
1683
|
+
GoogleImportedMarketModel: () => GoogleImportedMarketModel,
|
|
1683
1684
|
NotificationModel: () => NotificationModel,
|
|
1684
1685
|
ParticipantSchema: () => ParticipantSchema,
|
|
1685
1686
|
PartnerModel: () => PartnerModel,
|
|
@@ -4720,10 +4721,10 @@ var Condition = class _Condition {
|
|
|
4720
4721
|
otherwise
|
|
4721
4722
|
} = config;
|
|
4722
4723
|
let check = typeof is === "function" ? is : (...values) => values.every((value) => value === is);
|
|
4723
|
-
return new _Condition(refs, (values,
|
|
4724
|
+
return new _Condition(refs, (values, schema14) => {
|
|
4724
4725
|
var _branch;
|
|
4725
4726
|
let branch = check(...values) ? then : otherwise;
|
|
4726
|
-
return (_branch = branch == null ? void 0 : branch(
|
|
4727
|
+
return (_branch = branch == null ? void 0 : branch(schema14)) != null ? _branch : schema14;
|
|
4727
4728
|
});
|
|
4728
4729
|
}
|
|
4729
4730
|
constructor(refs, builder) {
|
|
@@ -4737,13 +4738,13 @@ var Condition = class _Condition {
|
|
|
4737
4738
|
// TODO: ? operator here?
|
|
4738
4739
|
ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context)
|
|
4739
4740
|
));
|
|
4740
|
-
let
|
|
4741
|
-
if (
|
|
4742
|
-
|
|
4741
|
+
let schema14 = this.fn(values, base, options);
|
|
4742
|
+
if (schema14 === void 0 || // @ts-ignore this can be base
|
|
4743
|
+
schema14 === base) {
|
|
4743
4744
|
return base;
|
|
4744
4745
|
}
|
|
4745
|
-
if (!isSchema(
|
|
4746
|
-
return
|
|
4746
|
+
if (!isSchema(schema14)) throw new TypeError("conditions must return a schema object");
|
|
4747
|
+
return schema14.resolve(options);
|
|
4747
4748
|
}
|
|
4748
4749
|
};
|
|
4749
4750
|
var prefixes = {
|
|
@@ -4813,7 +4814,7 @@ function createValidation(config) {
|
|
|
4813
4814
|
path = "",
|
|
4814
4815
|
options,
|
|
4815
4816
|
originalValue,
|
|
4816
|
-
schema:
|
|
4817
|
+
schema: schema14
|
|
4817
4818
|
}, panic, next) {
|
|
4818
4819
|
const {
|
|
4819
4820
|
name,
|
|
@@ -4825,8 +4826,8 @@ function createValidation(config) {
|
|
|
4825
4826
|
let {
|
|
4826
4827
|
parent,
|
|
4827
4828
|
context,
|
|
4828
|
-
abortEarly =
|
|
4829
|
-
disableStackTrace =
|
|
4829
|
+
abortEarly = schema14.spec.abortEarly,
|
|
4830
|
+
disableStackTrace = schema14.spec.disableStackTrace
|
|
4830
4831
|
} = options;
|
|
4831
4832
|
const resolveOptions = {
|
|
4832
4833
|
value,
|
|
@@ -4837,9 +4838,9 @@ function createValidation(config) {
|
|
|
4837
4838
|
const nextParams = resolveParams(Object.assign({
|
|
4838
4839
|
value,
|
|
4839
4840
|
originalValue,
|
|
4840
|
-
label:
|
|
4841
|
+
label: schema14.spec.label,
|
|
4841
4842
|
path: overrides.path || path,
|
|
4842
|
-
spec:
|
|
4843
|
+
spec: schema14.spec,
|
|
4843
4844
|
disableStackTrace: overrides.disableStackTrace || disableStackTrace
|
|
4844
4845
|
}, params, overrides.params), resolveOptions);
|
|
4845
4846
|
const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name, nextParams.disableStackTrace);
|
|
@@ -4858,7 +4859,7 @@ function createValidation(config) {
|
|
|
4858
4859
|
},
|
|
4859
4860
|
options,
|
|
4860
4861
|
originalValue,
|
|
4861
|
-
schema:
|
|
4862
|
+
schema: schema14
|
|
4862
4863
|
};
|
|
4863
4864
|
const handleResult = (validOrError) => {
|
|
4864
4865
|
if (ValidationError.isError(validOrError)) invalid(validOrError);
|
|
@@ -4902,42 +4903,42 @@ function resolveParams(params, options) {
|
|
|
4902
4903
|
function resolveMaybeRef(item, options) {
|
|
4903
4904
|
return Reference.isRef(item) ? item.getValue(options.value, options.parent, options.context) : item;
|
|
4904
4905
|
}
|
|
4905
|
-
function getIn(
|
|
4906
|
+
function getIn(schema14, path, value, context = value) {
|
|
4906
4907
|
let parent, lastPart, lastPartDebug;
|
|
4907
4908
|
if (!path) return {
|
|
4908
4909
|
parent,
|
|
4909
4910
|
parentPath: path,
|
|
4910
|
-
schema:
|
|
4911
|
+
schema: schema14
|
|
4911
4912
|
};
|
|
4912
4913
|
(0, import_property_expr.forEach)(path, (_part, isBracket, isArray) => {
|
|
4913
4914
|
let part = isBracket ? _part.slice(1, _part.length - 1) : _part;
|
|
4914
|
-
|
|
4915
|
+
schema14 = schema14.resolve({
|
|
4915
4916
|
context,
|
|
4916
4917
|
parent,
|
|
4917
4918
|
value
|
|
4918
4919
|
});
|
|
4919
|
-
let isTuple =
|
|
4920
|
+
let isTuple = schema14.type === "tuple";
|
|
4920
4921
|
let idx = isArray ? parseInt(part, 10) : 0;
|
|
4921
|
-
if (
|
|
4922
|
+
if (schema14.innerType || isTuple) {
|
|
4922
4923
|
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]"`);
|
|
4923
4924
|
if (value && idx >= value.length) {
|
|
4924
4925
|
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. `);
|
|
4925
4926
|
}
|
|
4926
4927
|
parent = value;
|
|
4927
4928
|
value = value && value[idx];
|
|
4928
|
-
|
|
4929
|
+
schema14 = isTuple ? schema14.spec.types[idx] : schema14.innerType;
|
|
4929
4930
|
}
|
|
4930
4931
|
if (!isArray) {
|
|
4931
|
-
if (!
|
|
4932
|
+
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}")`);
|
|
4932
4933
|
parent = value;
|
|
4933
4934
|
value = value && value[part];
|
|
4934
|
-
|
|
4935
|
+
schema14 = schema14.fields[part];
|
|
4935
4936
|
}
|
|
4936
4937
|
lastPart = part;
|
|
4937
4938
|
lastPartDebug = isBracket ? "[" + _part + "]" : "." + _part;
|
|
4938
4939
|
});
|
|
4939
4940
|
return {
|
|
4940
|
-
schema:
|
|
4941
|
+
schema: schema14,
|
|
4941
4942
|
parent,
|
|
4942
4943
|
parentPath: lastPart
|
|
4943
4944
|
};
|
|
@@ -5137,20 +5138,20 @@ var Schema = class {
|
|
|
5137
5138
|
this._mutate = before;
|
|
5138
5139
|
return result;
|
|
5139
5140
|
}
|
|
5140
|
-
concat(
|
|
5141
|
-
if (!
|
|
5142
|
-
if (
|
|
5141
|
+
concat(schema14) {
|
|
5142
|
+
if (!schema14 || schema14 === this) return this;
|
|
5143
|
+
if (schema14.type !== this.type && this.type !== "mixed") throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema14.type}`);
|
|
5143
5144
|
let base = this;
|
|
5144
|
-
let combined =
|
|
5145
|
+
let combined = schema14.clone();
|
|
5145
5146
|
const mergedSpec = Object.assign({}, base.spec, combined.spec);
|
|
5146
5147
|
combined.spec = mergedSpec;
|
|
5147
5148
|
combined.internalTests = Object.assign({}, base.internalTests, combined.internalTests);
|
|
5148
|
-
combined._whitelist = base._whitelist.merge(
|
|
5149
|
-
combined._blacklist = base._blacklist.merge(
|
|
5149
|
+
combined._whitelist = base._whitelist.merge(schema14._whitelist, schema14._blacklist);
|
|
5150
|
+
combined._blacklist = base._blacklist.merge(schema14._blacklist, schema14._whitelist);
|
|
5150
5151
|
combined.tests = base.tests;
|
|
5151
5152
|
combined.exclusiveTests = base.exclusiveTests;
|
|
5152
5153
|
combined.withMutation((next) => {
|
|
5153
|
-
|
|
5154
|
+
schema14.tests.forEach((fn) => {
|
|
5154
5155
|
next.test(fn.OPTIONS);
|
|
5155
5156
|
});
|
|
5156
5157
|
});
|
|
@@ -5166,15 +5167,15 @@ var Schema = class {
|
|
|
5166
5167
|
return this._typeCheck(v);
|
|
5167
5168
|
}
|
|
5168
5169
|
resolve(options) {
|
|
5169
|
-
let
|
|
5170
|
-
if (
|
|
5171
|
-
let conditions =
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5170
|
+
let schema14 = this;
|
|
5171
|
+
if (schema14.conditions.length) {
|
|
5172
|
+
let conditions = schema14.conditions;
|
|
5173
|
+
schema14 = schema14.clone();
|
|
5174
|
+
schema14.conditions = [];
|
|
5175
|
+
schema14 = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema14);
|
|
5176
|
+
schema14 = schema14.resolve(options);
|
|
5176
5177
|
}
|
|
5177
|
-
return
|
|
5178
|
+
return schema14;
|
|
5178
5179
|
}
|
|
5179
5180
|
resolveOptions(options) {
|
|
5180
5181
|
var _options$strict, _options$abortEarly, _options$recursive, _options$disableStack;
|
|
@@ -5330,11 +5331,11 @@ attempted value: ${formattedValue}
|
|
|
5330
5331
|
}
|
|
5331
5332
|
validate(value, options) {
|
|
5332
5333
|
var _options$disableStack2;
|
|
5333
|
-
let
|
|
5334
|
+
let schema14 = this.resolve(Object.assign({}, options, {
|
|
5334
5335
|
value
|
|
5335
5336
|
}));
|
|
5336
|
-
let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 :
|
|
5337
|
-
return new Promise((resolve, reject) =>
|
|
5337
|
+
let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema14.spec.disableStackTrace;
|
|
5338
|
+
return new Promise((resolve, reject) => schema14._validate(value, options, (error, parsed) => {
|
|
5338
5339
|
if (ValidationError.isError(error)) error.value = parsed;
|
|
5339
5340
|
reject(error);
|
|
5340
5341
|
}, (errors, validated) => {
|
|
@@ -5344,12 +5345,12 @@ attempted value: ${formattedValue}
|
|
|
5344
5345
|
}
|
|
5345
5346
|
validateSync(value, options) {
|
|
5346
5347
|
var _options$disableStack3;
|
|
5347
|
-
let
|
|
5348
|
+
let schema14 = this.resolve(Object.assign({}, options, {
|
|
5348
5349
|
value
|
|
5349
5350
|
}));
|
|
5350
5351
|
let result;
|
|
5351
|
-
let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 :
|
|
5352
|
-
|
|
5352
|
+
let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema14.spec.disableStackTrace;
|
|
5353
|
+
schema14._validate(value, Object.assign({}, options, {
|
|
5353
5354
|
sync: true
|
|
5354
5355
|
}), (error, parsed) => {
|
|
5355
5356
|
if (ValidationError.isError(error)) error.value = parsed;
|
|
@@ -5383,8 +5384,8 @@ attempted value: ${formattedValue}
|
|
|
5383
5384
|
return typeof defaultValue === "function" ? defaultValue.call(this, options) : clone(defaultValue);
|
|
5384
5385
|
}
|
|
5385
5386
|
getDefault(options) {
|
|
5386
|
-
let
|
|
5387
|
-
return
|
|
5387
|
+
let schema14 = this.resolve(options || {});
|
|
5388
|
+
return schema14._getDefault(options);
|
|
5388
5389
|
}
|
|
5389
5390
|
default(def) {
|
|
5390
5391
|
if (arguments.length === 0) {
|
|
@@ -5617,13 +5618,13 @@ attempted value: ${formattedValue}
|
|
|
5617
5618
|
return description;
|
|
5618
5619
|
}
|
|
5619
5620
|
get ["~standard"]() {
|
|
5620
|
-
const
|
|
5621
|
+
const schema14 = this;
|
|
5621
5622
|
const standard = {
|
|
5622
5623
|
version: 1,
|
|
5623
5624
|
vendor: "yup",
|
|
5624
5625
|
async validate(value) {
|
|
5625
5626
|
try {
|
|
5626
|
-
const result = await
|
|
5627
|
+
const result = await schema14.validate(value, {
|
|
5627
5628
|
abortEarly: false
|
|
5628
5629
|
});
|
|
5629
5630
|
return {
|
|
@@ -5647,9 +5648,9 @@ for (const method of ["validate", "validateSync"]) Schema.prototype[`${method}At
|
|
|
5647
5648
|
const {
|
|
5648
5649
|
parent,
|
|
5649
5650
|
parentPath,
|
|
5650
|
-
schema:
|
|
5651
|
+
schema: schema14
|
|
5651
5652
|
} = getIn(this, path, value, options.context);
|
|
5652
|
-
return
|
|
5653
|
+
return schema14[method](parent && parent[parentPath], Object.assign({}, options, {
|
|
5653
5654
|
parent,
|
|
5654
5655
|
path
|
|
5655
5656
|
}));
|
|
@@ -5823,7 +5824,7 @@ var StringSchema = class extends Schema {
|
|
|
5823
5824
|
});
|
|
5824
5825
|
}
|
|
5825
5826
|
required(message) {
|
|
5826
|
-
return super.required(message).withMutation((
|
|
5827
|
+
return super.required(message).withMutation((schema14) => schema14.test({
|
|
5827
5828
|
message: message || mixed.required,
|
|
5828
5829
|
name: "required",
|
|
5829
5830
|
skipAbsent: true,
|
|
@@ -5831,9 +5832,9 @@ var StringSchema = class extends Schema {
|
|
|
5831
5832
|
}));
|
|
5832
5833
|
}
|
|
5833
5834
|
notRequired() {
|
|
5834
|
-
return super.notRequired().withMutation((
|
|
5835
|
-
|
|
5836
|
-
return
|
|
5835
|
+
return super.notRequired().withMutation((schema14) => {
|
|
5836
|
+
schema14.tests = schema14.tests.filter((t) => t.OPTIONS.name !== "required");
|
|
5837
|
+
return schema14;
|
|
5837
5838
|
});
|
|
5838
5839
|
}
|
|
5839
5840
|
length(length, message = string.length) {
|
|
@@ -6211,7 +6212,7 @@ function sortByKeyOrder(keys) {
|
|
|
6211
6212
|
return findIndex(keys, a) - findIndex(keys, b);
|
|
6212
6213
|
};
|
|
6213
6214
|
}
|
|
6214
|
-
var parseJson = (value, _,
|
|
6215
|
+
var parseJson = (value, _, schema14) => {
|
|
6215
6216
|
if (typeof value !== "string") {
|
|
6216
6217
|
return value;
|
|
6217
6218
|
}
|
|
@@ -6220,30 +6221,30 @@ var parseJson = (value, _, schema13) => {
|
|
|
6220
6221
|
parsed = JSON.parse(value);
|
|
6221
6222
|
} catch (err) {
|
|
6222
6223
|
}
|
|
6223
|
-
return
|
|
6224
|
+
return schema14.isType(parsed) ? parsed : value;
|
|
6224
6225
|
};
|
|
6225
|
-
function deepPartial(
|
|
6226
|
-
if ("fields" in
|
|
6226
|
+
function deepPartial(schema14) {
|
|
6227
|
+
if ("fields" in schema14) {
|
|
6227
6228
|
const partial = {};
|
|
6228
|
-
for (const [key, fieldSchema] of Object.entries(
|
|
6229
|
+
for (const [key, fieldSchema] of Object.entries(schema14.fields)) {
|
|
6229
6230
|
partial[key] = deepPartial(fieldSchema);
|
|
6230
6231
|
}
|
|
6231
|
-
return
|
|
6232
|
+
return schema14.setFields(partial);
|
|
6232
6233
|
}
|
|
6233
|
-
if (
|
|
6234
|
-
const nextArray =
|
|
6234
|
+
if (schema14.type === "array") {
|
|
6235
|
+
const nextArray = schema14.optional();
|
|
6235
6236
|
if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);
|
|
6236
6237
|
return nextArray;
|
|
6237
6238
|
}
|
|
6238
|
-
if (
|
|
6239
|
-
return
|
|
6240
|
-
types:
|
|
6239
|
+
if (schema14.type === "tuple") {
|
|
6240
|
+
return schema14.optional().clone({
|
|
6241
|
+
types: schema14.spec.types.map(deepPartial)
|
|
6241
6242
|
});
|
|
6242
6243
|
}
|
|
6243
|
-
if ("optional" in
|
|
6244
|
-
return
|
|
6244
|
+
if ("optional" in schema14) {
|
|
6245
|
+
return schema14.optional();
|
|
6245
6246
|
}
|
|
6246
|
-
return
|
|
6247
|
+
return schema14;
|
|
6247
6248
|
}
|
|
6248
6249
|
var deepHas = (obj, p) => {
|
|
6249
6250
|
const path = [...(0, import_property_expr.normalizePath)(p)];
|
|
@@ -6374,8 +6375,8 @@ var ObjectSchema = class extends Schema {
|
|
|
6374
6375
|
next._sortErrors = this._sortErrors;
|
|
6375
6376
|
return next;
|
|
6376
6377
|
}
|
|
6377
|
-
concat(
|
|
6378
|
-
let next = super.concat(
|
|
6378
|
+
concat(schema14) {
|
|
6379
|
+
let next = super.concat(schema14);
|
|
6379
6380
|
let nextFields = next.fields;
|
|
6380
6381
|
for (let [field, schemaOrRef] of Object.entries(this.fields)) {
|
|
6381
6382
|
const target = nextFields[field];
|
|
@@ -6383,7 +6384,7 @@ var ObjectSchema = class extends Schema {
|
|
|
6383
6384
|
}
|
|
6384
6385
|
return next.withMutation((s2) => (
|
|
6385
6386
|
// XXX: excludes here is wrong
|
|
6386
|
-
s2.setFields(nextFields, [...this._excludedEdges, ...
|
|
6387
|
+
s2.setFields(nextFields, [...this._excludedEdges, ...schema14._excludedEdges])
|
|
6387
6388
|
));
|
|
6388
6389
|
}
|
|
6389
6390
|
_getDefault(options) {
|
|
@@ -6428,8 +6429,8 @@ var ObjectSchema = class extends Schema {
|
|
|
6428
6429
|
}
|
|
6429
6430
|
partial() {
|
|
6430
6431
|
const partial = {};
|
|
6431
|
-
for (const [key,
|
|
6432
|
-
partial[key] = "optional" in
|
|
6432
|
+
for (const [key, schema14] of Object.entries(this.fields)) {
|
|
6433
|
+
partial[key] = "optional" in schema14 && schema14.optional instanceof Function ? schema14.optional() : schema14;
|
|
6433
6434
|
}
|
|
6434
6435
|
return this.setFields(partial);
|
|
6435
6436
|
}
|
|
@@ -6631,22 +6632,22 @@ var ArraySchema = class extends Schema {
|
|
|
6631
6632
|
json() {
|
|
6632
6633
|
return this.transform(parseJson);
|
|
6633
6634
|
}
|
|
6634
|
-
concat(
|
|
6635
|
-
let next = super.concat(
|
|
6635
|
+
concat(schema14) {
|
|
6636
|
+
let next = super.concat(schema14);
|
|
6636
6637
|
next.innerType = this.innerType;
|
|
6637
|
-
if (
|
|
6638
|
+
if (schema14.innerType)
|
|
6638
6639
|
next.innerType = next.innerType ? (
|
|
6639
6640
|
// @ts-expect-error Lazy doesn't have concat and will break
|
|
6640
|
-
next.innerType.concat(
|
|
6641
|
-
) :
|
|
6641
|
+
next.innerType.concat(schema14.innerType)
|
|
6642
|
+
) : schema14.innerType;
|
|
6642
6643
|
return next;
|
|
6643
6644
|
}
|
|
6644
|
-
of(
|
|
6645
|
+
of(schema14) {
|
|
6645
6646
|
let next = this.clone();
|
|
6646
|
-
if (!isSchema(
|
|
6647
|
-
next.innerType =
|
|
6647
|
+
if (!isSchema(schema14)) throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema14));
|
|
6648
|
+
next.innerType = schema14;
|
|
6648
6649
|
next.spec = Object.assign({}, next.spec, {
|
|
6649
|
-
types:
|
|
6650
|
+
types: schema14
|
|
6650
6651
|
});
|
|
6651
6652
|
return next;
|
|
6652
6653
|
}
|
|
@@ -6794,7 +6795,7 @@ var TupleSchema = class extends Schema {
|
|
|
6794
6795
|
describe(options) {
|
|
6795
6796
|
const next = (options ? this.resolve(options) : this).clone();
|
|
6796
6797
|
const base = super.describe(options);
|
|
6797
|
-
base.innerType = next.spec.types.map((
|
|
6798
|
+
base.innerType = next.spec.types.map((schema14, index) => {
|
|
6798
6799
|
var _innerOptions;
|
|
6799
6800
|
let innerOptions = options;
|
|
6800
6801
|
if ((_innerOptions = innerOptions) != null && _innerOptions.value) {
|
|
@@ -6803,7 +6804,7 @@ var TupleSchema = class extends Schema {
|
|
|
6803
6804
|
value: innerOptions.value[index]
|
|
6804
6805
|
});
|
|
6805
6806
|
}
|
|
6806
|
-
return
|
|
6807
|
+
return schema14.describe(innerOptions);
|
|
6807
6808
|
});
|
|
6808
6809
|
return base;
|
|
6809
6810
|
}
|
|
@@ -6852,6 +6853,7 @@ var EnumFoodFlavor = /* @__PURE__ */ ((EnumFoodFlavor3) => {
|
|
|
6852
6853
|
EnumFoodFlavor3["SAVOURY"] = "Savoury";
|
|
6853
6854
|
EnumFoodFlavor3["SPICY"] = "Spicy";
|
|
6854
6855
|
EnumFoodFlavor3["SWEET"] = "Sweet";
|
|
6856
|
+
EnumFoodFlavor3["OTHER"] = "Other";
|
|
6855
6857
|
return EnumFoodFlavor3;
|
|
6856
6858
|
})(EnumFoodFlavor || {});
|
|
6857
6859
|
var EnumResourceType = /* @__PURE__ */ ((EnumResourceType22) => {
|
|
@@ -10208,7 +10210,7 @@ var socialMediaSchema = create$3({
|
|
|
10208
10210
|
is: (name) => !!name,
|
|
10209
10211
|
// If name has a value
|
|
10210
10212
|
then: () => normalizedUrlTransform().required("Link is required when name is set").url("Link must be a valid URL").label("Social Media Link"),
|
|
10211
|
-
otherwise: (
|
|
10213
|
+
otherwise: (schema14) => schema14.notRequired()
|
|
10212
10214
|
})
|
|
10213
10215
|
});
|
|
10214
10216
|
var globalResourceSchema = create$3().shape({
|
|
@@ -10281,21 +10283,21 @@ var paymentInfoSchema = create$3({
|
|
|
10281
10283
|
paymentMethod: create$8().oneOf(Object.values(EnumPaymentMethod)).required("Please select a Payment method"),
|
|
10282
10284
|
accountHolderName: create$6().when("paymentMethod", {
|
|
10283
10285
|
is: "bank_transfer",
|
|
10284
|
-
then: (
|
|
10285
|
-
otherwise: (
|
|
10286
|
+
then: (schema14) => schema14.required("Account holder name is required for bank transfer").trim(),
|
|
10287
|
+
otherwise: (schema14) => schema14.notRequired()
|
|
10286
10288
|
}),
|
|
10287
10289
|
accountNumber: create$6().when("paymentMethod", {
|
|
10288
10290
|
is: "bank_transfer",
|
|
10289
|
-
then: (
|
|
10291
|
+
then: (schema14) => schema14.required("Account number is required for bank transfer").matches(
|
|
10290
10292
|
nzBankAccountRegex,
|
|
10291
10293
|
"Account number must be in format: XX-XXXX-XXXXXXX-XX"
|
|
10292
10294
|
).trim(),
|
|
10293
|
-
otherwise: (
|
|
10295
|
+
otherwise: (schema14) => schema14.notRequired()
|
|
10294
10296
|
}),
|
|
10295
10297
|
link: create$6().when("paymentMethod", {
|
|
10296
|
-
is: (val) => val
|
|
10298
|
+
is: (val) => val === "paypal" || val === "stripe",
|
|
10297
10299
|
then: () => normalizedUrlTransform().url("Link must be a valid URL").required("Link is required for PayPal/Stripe"),
|
|
10298
|
-
otherwise: (
|
|
10300
|
+
otherwise: (schema14) => schema14.notRequired()
|
|
10299
10301
|
})
|
|
10300
10302
|
});
|
|
10301
10303
|
var eventInfoSchema = create$3().shape({
|
|
@@ -10408,8 +10410,8 @@ var userSchema = create$3().shape({
|
|
|
10408
10410
|
confirmPassword: create$6().nullable().trim().label("Confirm Password").when("password", {
|
|
10409
10411
|
is: (val) => !!val,
|
|
10410
10412
|
// only necessary if password typed
|
|
10411
|
-
then: (
|
|
10412
|
-
otherwise: (
|
|
10413
|
+
then: (schema14) => schema14.required("Confirm Password is required").oneOf([create$9("password")], "Passwords must match"),
|
|
10414
|
+
otherwise: (schema14) => schema14.notRequired()
|
|
10413
10415
|
}),
|
|
10414
10416
|
role: create$8().oneOf(Object.values(EnumUserRole)).required("Role is required")
|
|
10415
10417
|
});
|
|
@@ -10527,8 +10529,8 @@ var testerSchema = create$3().shape({
|
|
|
10527
10529
|
email: emailRequiredSchema,
|
|
10528
10530
|
event: create$3().when("resourceType", {
|
|
10529
10531
|
is: (resourceType) => resourceType === "event",
|
|
10530
|
-
otherwise: (
|
|
10531
|
-
then: (
|
|
10532
|
+
otherwise: (schema14) => schema14.nullable().optional(),
|
|
10533
|
+
then: (schema14) => schema14.required("Event information is required").shape(testerEventSchema.fields)
|
|
10532
10534
|
}),
|
|
10533
10535
|
firstName: create$6().required("First name is required"),
|
|
10534
10536
|
lastName: create$6().required("Last name is required"),
|
|
@@ -10546,8 +10548,8 @@ var testerSchema = create$3().shape({
|
|
|
10546
10548
|
).required("Resource Type is required"),
|
|
10547
10549
|
vendor: create$3().when("resourceType", {
|
|
10548
10550
|
is: (resourceType) => resourceType === "vendor",
|
|
10549
|
-
otherwise: (
|
|
10550
|
-
then: (
|
|
10551
|
+
otherwise: (schema14) => schema14.nullable().optional(),
|
|
10552
|
+
then: (schema14) => schema14.required("Vendor information is required").shape(testerVendorSchema.fields)
|
|
10551
10553
|
})
|
|
10552
10554
|
});
|
|
10553
10555
|
var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn2) => {
|
|
@@ -10585,7 +10587,7 @@ var adSchema = create$3().shape({
|
|
|
10585
10587
|
return endDate > now;
|
|
10586
10588
|
}).when("start", {
|
|
10587
10589
|
is: (val) => val && val.length > 0,
|
|
10588
|
-
then: (
|
|
10590
|
+
then: (schema14) => schema14.test(
|
|
10589
10591
|
"is-after-start",
|
|
10590
10592
|
"End date must be after start date",
|
|
10591
10593
|
function(value) {
|
|
@@ -11200,10 +11202,60 @@ ChatSchema.index({
|
|
|
11200
11202
|
});
|
|
11201
11203
|
var ChatModel = import_mongoose5.default.models.Chat || import_mongoose5.default.model("Chat", ChatSchema);
|
|
11202
11204
|
|
|
11203
|
-
// src/mongoose/
|
|
11205
|
+
// src/mongoose/GoogleImportedMarket.ts
|
|
11204
11206
|
var import_mongoose6 = __toESM(require("mongoose"));
|
|
11205
11207
|
var MongooseSchema6 = import_mongoose6.default.Schema;
|
|
11208
|
+
var locationSchema2 = new MongooseSchema6(
|
|
11209
|
+
{
|
|
11210
|
+
lat: { required: true, type: Number },
|
|
11211
|
+
lng: { required: true, type: Number }
|
|
11212
|
+
},
|
|
11213
|
+
{ _id: false }
|
|
11214
|
+
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11215
|
+
);
|
|
11206
11216
|
var schema3 = new MongooseSchema6(
|
|
11217
|
+
{
|
|
11218
|
+
address: { required: true, type: String },
|
|
11219
|
+
businessStatus: { required: false, type: String },
|
|
11220
|
+
claimed: { default: false, required: true, type: Boolean },
|
|
11221
|
+
googleMapsUrl: { required: false, type: String },
|
|
11222
|
+
googlePlaceId: {
|
|
11223
|
+
required: true,
|
|
11224
|
+
type: String,
|
|
11225
|
+
unique: true
|
|
11226
|
+
// unique, indexed
|
|
11227
|
+
},
|
|
11228
|
+
image: { required: false, type: String },
|
|
11229
|
+
// photo_reference only
|
|
11230
|
+
importedAt: { default: () => /* @__PURE__ */ new Date(), required: true, type: Date },
|
|
11231
|
+
location: {
|
|
11232
|
+
required: false,
|
|
11233
|
+
// optional because lat/lng may expire after 30 days
|
|
11234
|
+
type: locationSchema2
|
|
11235
|
+
},
|
|
11236
|
+
name: { required: true, type: String },
|
|
11237
|
+
openingHours: { required: false, type: [String] },
|
|
11238
|
+
phone: { required: false, type: String },
|
|
11239
|
+
photos: { required: false, type: [String] },
|
|
11240
|
+
// array of photo_reference
|
|
11241
|
+
rating: { required: false, type: Number },
|
|
11242
|
+
reviewCount: { required: false, type: Number },
|
|
11243
|
+
slug: { required: true, type: String },
|
|
11244
|
+
website: { required: false, type: String }
|
|
11245
|
+
},
|
|
11246
|
+
{ timestamps: true }
|
|
11247
|
+
);
|
|
11248
|
+
schema3.index({ googlePlaceId: 1 });
|
|
11249
|
+
schema3.index({ name: 1 });
|
|
11250
|
+
schema3.index({ slug: 1 });
|
|
11251
|
+
schema3.index({ address: 1 });
|
|
11252
|
+
schema3.index({ "location.lat": 1, "location.lng": 1 });
|
|
11253
|
+
var GoogleImportedMarketModel = import_mongoose6.default.models.GoogleImportedMarket || import_mongoose6.default.model("GoogleImportedMarket", schema3);
|
|
11254
|
+
|
|
11255
|
+
// src/mongoose/Notification.ts
|
|
11256
|
+
var import_mongoose7 = __toESM(require("mongoose"));
|
|
11257
|
+
var MongooseSchema7 = import_mongoose7.default.Schema;
|
|
11258
|
+
var schema4 = new MongooseSchema7(
|
|
11207
11259
|
{
|
|
11208
11260
|
data: {
|
|
11209
11261
|
resourceId: { required: true, type: String },
|
|
@@ -11226,16 +11278,16 @@ var schema3 = new MongooseSchema6(
|
|
|
11226
11278
|
userId: {
|
|
11227
11279
|
ref: "User",
|
|
11228
11280
|
required: true,
|
|
11229
|
-
type:
|
|
11281
|
+
type: import_mongoose7.default.Schema.Types.ObjectId
|
|
11230
11282
|
}
|
|
11231
11283
|
},
|
|
11232
11284
|
{ timestamps: true }
|
|
11233
11285
|
);
|
|
11234
|
-
|
|
11235
|
-
|
|
11236
|
-
var NotificationModel =
|
|
11286
|
+
schema4.index({ isRead: 1, userId: 1 });
|
|
11287
|
+
schema4.index({ createdAt: -1, userId: 1 });
|
|
11288
|
+
var NotificationModel = import_mongoose7.default.models.Notification || import_mongoose7.default.model("Notification", schema4);
|
|
11237
11289
|
|
|
11238
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
11290
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-OBQRGWV3.mjs
|
|
11239
11291
|
var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
|
|
11240
11292
|
EnumOSPlatform22["ANDROID"] = "android";
|
|
11241
11293
|
EnumOSPlatform22["IOS"] = "ios";
|
|
@@ -11244,9 +11296,9 @@ var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
|
|
|
11244
11296
|
})(EnumOSPlatform2 || {});
|
|
11245
11297
|
|
|
11246
11298
|
// src/mongoose/PushToken.ts
|
|
11247
|
-
var
|
|
11248
|
-
var
|
|
11249
|
-
var
|
|
11299
|
+
var import_mongoose8 = __toESM(require("mongoose"));
|
|
11300
|
+
var MongooseSchema8 = import_mongoose8.default.Schema;
|
|
11301
|
+
var schema5 = new MongooseSchema8(
|
|
11250
11302
|
{
|
|
11251
11303
|
platform: {
|
|
11252
11304
|
enum: Object.values(EnumOSPlatform2),
|
|
@@ -11254,16 +11306,16 @@ var schema4 = new MongooseSchema7(
|
|
|
11254
11306
|
type: String
|
|
11255
11307
|
},
|
|
11256
11308
|
token: { required: true, type: String },
|
|
11257
|
-
userId: { required: true, type:
|
|
11309
|
+
userId: { required: true, type: import_mongoose8.default.Schema.Types.ObjectId }
|
|
11258
11310
|
},
|
|
11259
11311
|
{ timestamps: true }
|
|
11260
11312
|
);
|
|
11261
|
-
var PushTokenModel =
|
|
11313
|
+
var PushTokenModel = import_mongoose8.default.models.PushToken || import_mongoose8.default.model("PushToken", schema5);
|
|
11262
11314
|
|
|
11263
11315
|
// src/mongoose/ResourceActivity.ts
|
|
11264
|
-
var
|
|
11265
|
-
var
|
|
11266
|
-
var ActivitySchema = new
|
|
11316
|
+
var import_mongoose9 = __toESM(require("mongoose"));
|
|
11317
|
+
var MongooseSchema9 = import_mongoose9.default.Schema;
|
|
11318
|
+
var ActivitySchema = new MongooseSchema9(
|
|
11267
11319
|
{
|
|
11268
11320
|
activityType: {
|
|
11269
11321
|
enum: Object.values(EnumActivity),
|
|
@@ -11299,7 +11351,7 @@ var ActivitySchema = new MongooseSchema8(
|
|
|
11299
11351
|
},
|
|
11300
11352
|
{ _id: false }
|
|
11301
11353
|
);
|
|
11302
|
-
var
|
|
11354
|
+
var schema6 = new MongooseSchema9(
|
|
11303
11355
|
{
|
|
11304
11356
|
activity: { default: [], type: [ActivitySchema] },
|
|
11305
11357
|
resourceId: { required: true, type: String },
|
|
@@ -11311,14 +11363,14 @@ var schema5 = new MongooseSchema8(
|
|
|
11311
11363
|
},
|
|
11312
11364
|
{ timestamps: true }
|
|
11313
11365
|
);
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
var ResourceActivityModel =
|
|
11366
|
+
schema6.index({ resourceId: 1, resourceType: 1 }, { unique: true });
|
|
11367
|
+
schema6.index({ "views.location": "2dsphere" });
|
|
11368
|
+
var ResourceActivityModel = import_mongoose9.default.models.ResourceActivity || import_mongoose9.default.model("ResourceActivity", schema6);
|
|
11317
11369
|
|
|
11318
11370
|
// src/mongoose/Tester.ts
|
|
11319
|
-
var
|
|
11320
|
-
var
|
|
11321
|
-
var TesterVendorQuestionarySchema = new
|
|
11371
|
+
var import_mongoose10 = __toESM(require("mongoose"));
|
|
11372
|
+
var MongooseSchema10 = import_mongoose10.default.Schema;
|
|
11373
|
+
var TesterVendorQuestionarySchema = new MongooseSchema10(
|
|
11322
11374
|
{
|
|
11323
11375
|
appearInVideoIntroduction: {
|
|
11324
11376
|
default: false,
|
|
@@ -11345,7 +11397,7 @@ var TesterVendorQuestionarySchema = new MongooseSchema9(
|
|
|
11345
11397
|
},
|
|
11346
11398
|
{ _id: false }
|
|
11347
11399
|
);
|
|
11348
|
-
var TesterVendorSchema = new
|
|
11400
|
+
var TesterVendorSchema = new MongooseSchema10(
|
|
11349
11401
|
{
|
|
11350
11402
|
categories: { required: true, type: [CategorySchema] },
|
|
11351
11403
|
marketsAttended: {
|
|
@@ -11371,7 +11423,7 @@ var TesterVendorSchema = new MongooseSchema9(
|
|
|
11371
11423
|
},
|
|
11372
11424
|
{ _id: false }
|
|
11373
11425
|
);
|
|
11374
|
-
var TesterEventQuestionarySchema = new
|
|
11426
|
+
var TesterEventQuestionarySchema = new MongooseSchema10(
|
|
11375
11427
|
{
|
|
11376
11428
|
allowMarketingAppearance: {
|
|
11377
11429
|
default: false,
|
|
@@ -11406,7 +11458,7 @@ var TesterEventQuestionarySchema = new MongooseSchema9(
|
|
|
11406
11458
|
},
|
|
11407
11459
|
{ _id: false }
|
|
11408
11460
|
);
|
|
11409
|
-
var TesterEventsSchema = new
|
|
11461
|
+
var TesterEventsSchema = new MongooseSchema10(
|
|
11410
11462
|
{
|
|
11411
11463
|
markets: {
|
|
11412
11464
|
required: true,
|
|
@@ -11435,7 +11487,7 @@ var TesterEventsSchema = new MongooseSchema9(
|
|
|
11435
11487
|
},
|
|
11436
11488
|
{ _id: false }
|
|
11437
11489
|
);
|
|
11438
|
-
var TesterSchema = new
|
|
11490
|
+
var TesterSchema = new MongooseSchema10(
|
|
11439
11491
|
{
|
|
11440
11492
|
active: { default: false, required: true, type: Boolean },
|
|
11441
11493
|
approved: { default: false, required: true, type: Boolean },
|
|
@@ -11469,43 +11521,43 @@ var TesterSchema = new MongooseSchema9(
|
|
|
11469
11521
|
timestamps: true
|
|
11470
11522
|
}
|
|
11471
11523
|
);
|
|
11472
|
-
var TesterModel =
|
|
11524
|
+
var TesterModel = import_mongoose10.default.models.Tester || import_mongoose10.default.model("Tester", TesterSchema);
|
|
11473
11525
|
|
|
11474
11526
|
// src/mongoose/User.ts
|
|
11475
|
-
var
|
|
11476
|
-
var
|
|
11477
|
-
var userActivityEventSchema = new
|
|
11527
|
+
var import_mongoose11 = __toESM(require("mongoose"));
|
|
11528
|
+
var MongooseSchema11 = import_mongoose11.default.Schema;
|
|
11529
|
+
var userActivityEventSchema = new MongooseSchema11(
|
|
11478
11530
|
{
|
|
11479
11531
|
dateTime: dateTimeSchema3,
|
|
11480
11532
|
resourceId: {
|
|
11481
11533
|
ref: "Event",
|
|
11482
11534
|
required: false,
|
|
11483
|
-
type:
|
|
11535
|
+
type: import_mongoose11.default.Schema.Types.ObjectId
|
|
11484
11536
|
}
|
|
11485
11537
|
},
|
|
11486
11538
|
{ _id: false }
|
|
11487
11539
|
);
|
|
11488
|
-
var userActivityFavouritesSchema = new
|
|
11540
|
+
var userActivityFavouritesSchema = new MongooseSchema11(
|
|
11489
11541
|
{
|
|
11490
11542
|
events: {
|
|
11491
11543
|
ref: "Event",
|
|
11492
11544
|
required: false,
|
|
11493
|
-
type: [
|
|
11545
|
+
type: [import_mongoose11.default.Schema.Types.ObjectId]
|
|
11494
11546
|
},
|
|
11495
11547
|
partners: {
|
|
11496
11548
|
ref: "Partner",
|
|
11497
11549
|
required: false,
|
|
11498
|
-
type: [
|
|
11550
|
+
type: [import_mongoose11.default.Schema.Types.ObjectId]
|
|
11499
11551
|
},
|
|
11500
11552
|
vendors: {
|
|
11501
11553
|
ref: "Vendor",
|
|
11502
11554
|
required: false,
|
|
11503
|
-
type: [
|
|
11555
|
+
type: [import_mongoose11.default.Schema.Types.ObjectId]
|
|
11504
11556
|
}
|
|
11505
11557
|
},
|
|
11506
11558
|
{ _id: false }
|
|
11507
11559
|
);
|
|
11508
|
-
var stripeSchema = new
|
|
11560
|
+
var stripeSchema = new MongooseSchema11(
|
|
11509
11561
|
{
|
|
11510
11562
|
currentPlan: {
|
|
11511
11563
|
enum: Object.values(EnumUserLicence),
|
|
@@ -11536,7 +11588,7 @@ var stripeSchema = new MongooseSchema10(
|
|
|
11536
11588
|
},
|
|
11537
11589
|
{ _id: false }
|
|
11538
11590
|
);
|
|
11539
|
-
var
|
|
11591
|
+
var schema7 = new MongooseSchema11(
|
|
11540
11592
|
{
|
|
11541
11593
|
active: { default: false, required: true, type: Boolean },
|
|
11542
11594
|
associates: {
|
|
@@ -11552,7 +11604,7 @@ var schema6 = new MongooseSchema10(
|
|
|
11552
11604
|
events: {
|
|
11553
11605
|
ref: "Event",
|
|
11554
11606
|
required: false,
|
|
11555
|
-
type: [
|
|
11607
|
+
type: [import_mongoose11.default.Schema.Types.ObjectId]
|
|
11556
11608
|
},
|
|
11557
11609
|
firstName: { required: true, type: String },
|
|
11558
11610
|
isTester: { default: false, required: true, type: Boolean },
|
|
@@ -11564,7 +11616,7 @@ var schema6 = new MongooseSchema10(
|
|
|
11564
11616
|
partner: {
|
|
11565
11617
|
ref: "Partner",
|
|
11566
11618
|
required: false,
|
|
11567
|
-
type:
|
|
11619
|
+
type: import_mongoose11.default.Schema.Types.ObjectId
|
|
11568
11620
|
},
|
|
11569
11621
|
password: { required: true, type: String },
|
|
11570
11622
|
platform: {
|
|
@@ -11609,20 +11661,20 @@ var schema6 = new MongooseSchema10(
|
|
|
11609
11661
|
vendor: {
|
|
11610
11662
|
ref: "Vendor",
|
|
11611
11663
|
required: false,
|
|
11612
|
-
type:
|
|
11664
|
+
type: import_mongoose11.default.Schema.Types.ObjectId
|
|
11613
11665
|
}
|
|
11614
11666
|
},
|
|
11615
11667
|
{ strict: false, timestamps: true }
|
|
11616
11668
|
);
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
|
|
11620
|
-
var UserModel =
|
|
11669
|
+
schema7.index({ "associates.email": 1 });
|
|
11670
|
+
schema7.index({ "licences.expiryDate": 1 });
|
|
11671
|
+
schema7.index({ "licences.licenceType": 1 });
|
|
11672
|
+
var UserModel = import_mongoose11.default.models.User || import_mongoose11.default.model("User", schema7);
|
|
11621
11673
|
|
|
11622
11674
|
// src/mongoose/VerificationToken.ts
|
|
11623
|
-
var
|
|
11624
|
-
var
|
|
11625
|
-
var
|
|
11675
|
+
var import_mongoose12 = __toESM(require("mongoose"));
|
|
11676
|
+
var MongooseSchema12 = import_mongoose12.default.Schema;
|
|
11677
|
+
var schema8 = new MongooseSchema12(
|
|
11626
11678
|
{
|
|
11627
11679
|
createdAt: {
|
|
11628
11680
|
default: Date.now,
|
|
@@ -11637,12 +11689,12 @@ var schema7 = new MongooseSchema11(
|
|
|
11637
11689
|
},
|
|
11638
11690
|
{ timestamps: true }
|
|
11639
11691
|
);
|
|
11640
|
-
var VerificationTokenModel =
|
|
11692
|
+
var VerificationTokenModel = import_mongoose12.default.models.VerificationToken || import_mongoose12.default.model("VerificationToken", schema8);
|
|
11641
11693
|
|
|
11642
11694
|
// src/mongoose/vendor/Vendor.ts
|
|
11643
|
-
var
|
|
11644
|
-
var
|
|
11645
|
-
var MenuTypeSchema = new
|
|
11695
|
+
var import_mongoose13 = __toESM(require("mongoose"));
|
|
11696
|
+
var MongooseSchema13 = import_mongoose13.default.Schema;
|
|
11697
|
+
var MenuTypeSchema = new MongooseSchema13(
|
|
11646
11698
|
{
|
|
11647
11699
|
description: { required: false, type: String },
|
|
11648
11700
|
name: { required: false, type: String },
|
|
@@ -11652,7 +11704,7 @@ var MenuTypeSchema = new MongooseSchema12(
|
|
|
11652
11704
|
{ _id: false }
|
|
11653
11705
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11654
11706
|
);
|
|
11655
|
-
var LocationsSchema = new
|
|
11707
|
+
var LocationsSchema = new MongooseSchema13(
|
|
11656
11708
|
{
|
|
11657
11709
|
dateTime: {
|
|
11658
11710
|
dateStatus: {
|
|
@@ -11685,7 +11737,7 @@ var LocationsSchema = new MongooseSchema12(
|
|
|
11685
11737
|
{ _id: false }
|
|
11686
11738
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11687
11739
|
);
|
|
11688
|
-
var
|
|
11740
|
+
var schema9 = new MongooseSchema13(
|
|
11689
11741
|
{
|
|
11690
11742
|
...baseResourceFields,
|
|
11691
11743
|
// Importing base resource fields from global.ts
|
|
@@ -11707,7 +11759,7 @@ var schema8 = new MongooseSchema12(
|
|
|
11707
11759
|
vendorInfoId: {
|
|
11708
11760
|
ref: "VendorInfo",
|
|
11709
11761
|
required: false,
|
|
11710
|
-
type:
|
|
11762
|
+
type: import_mongoose13.default.Schema.Types.ObjectId
|
|
11711
11763
|
},
|
|
11712
11764
|
vendorType: {
|
|
11713
11765
|
enum: Object.values(EnumVendorType),
|
|
@@ -11717,24 +11769,24 @@ var schema8 = new MongooseSchema12(
|
|
|
11717
11769
|
},
|
|
11718
11770
|
{ timestamps: true }
|
|
11719
11771
|
);
|
|
11720
|
-
|
|
11721
|
-
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
var VendorModel =
|
|
11772
|
+
schema9.index({ name: 1 });
|
|
11773
|
+
schema9.index({ description: 1 });
|
|
11774
|
+
schema9.index({ region: 1 });
|
|
11775
|
+
schema9.index({ "categories.name": 1 });
|
|
11776
|
+
schema9.index({ "associates.email": 1 });
|
|
11777
|
+
var VendorModel = import_mongoose13.default.models.Vendor || import_mongoose13.default.model("Vendor", schema9);
|
|
11726
11778
|
|
|
11727
11779
|
// src/mongoose/vendor/VendorInfo.ts
|
|
11728
|
-
var
|
|
11729
|
-
var
|
|
11730
|
-
var AttributesSchema = new
|
|
11780
|
+
var import_mongoose14 = __toESM(require("mongoose"));
|
|
11781
|
+
var MongooseSchema14 = import_mongoose14.default.Schema;
|
|
11782
|
+
var AttributesSchema = new MongooseSchema14(
|
|
11731
11783
|
{
|
|
11732
11784
|
details: { required: false, type: String },
|
|
11733
11785
|
isRequired: { default: false, required: true, type: Boolean }
|
|
11734
11786
|
},
|
|
11735
11787
|
{ _id: false }
|
|
11736
11788
|
);
|
|
11737
|
-
var
|
|
11789
|
+
var schema10 = new MongooseSchema14(
|
|
11738
11790
|
{
|
|
11739
11791
|
compliance: {
|
|
11740
11792
|
foodBeverageLicense: { default: false, required: false, type: Boolean },
|
|
@@ -11768,17 +11820,17 @@ var schema9 = new MongooseSchema13(
|
|
|
11768
11820
|
vendorId: {
|
|
11769
11821
|
ref: "Vendor",
|
|
11770
11822
|
required: true,
|
|
11771
|
-
type:
|
|
11823
|
+
type: import_mongoose14.default.Schema.Types.ObjectId
|
|
11772
11824
|
}
|
|
11773
11825
|
},
|
|
11774
11826
|
{ timestamps: true }
|
|
11775
11827
|
);
|
|
11776
|
-
var VendorInfoModel =
|
|
11828
|
+
var VendorInfoModel = import_mongoose14.default.models.VendorInfo || import_mongoose14.default.model("VendorInfo", schema10);
|
|
11777
11829
|
|
|
11778
11830
|
// src/mongoose/event/Event.ts
|
|
11779
|
-
var
|
|
11780
|
-
var
|
|
11781
|
-
var locationsSchema = new
|
|
11831
|
+
var import_mongoose15 = __toESM(require("mongoose"));
|
|
11832
|
+
var MongooseSchema15 = import_mongoose15.default.Schema;
|
|
11833
|
+
var locationsSchema = new MongooseSchema15(
|
|
11782
11834
|
{
|
|
11783
11835
|
city: { required: true, type: String },
|
|
11784
11836
|
coordinates: {
|
|
@@ -11801,7 +11853,7 @@ var locationsSchema = new MongooseSchema14(
|
|
|
11801
11853
|
{ _id: false }
|
|
11802
11854
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11803
11855
|
);
|
|
11804
|
-
var
|
|
11856
|
+
var schema11 = new MongooseSchema15(
|
|
11805
11857
|
{
|
|
11806
11858
|
...baseResourceFields,
|
|
11807
11859
|
// Importing base resource fields from global.ts
|
|
@@ -11809,7 +11861,7 @@ var schema10 = new MongooseSchema14(
|
|
|
11809
11861
|
eventInfoId: {
|
|
11810
11862
|
ref: "EventInfo",
|
|
11811
11863
|
required: false,
|
|
11812
|
-
type:
|
|
11864
|
+
type: import_mongoose15.default.Schema.Types.ObjectId
|
|
11813
11865
|
},
|
|
11814
11866
|
eventType: {
|
|
11815
11867
|
enum: Object.values(EnumEventType),
|
|
@@ -11832,18 +11884,18 @@ var schema10 = new MongooseSchema14(
|
|
|
11832
11884
|
},
|
|
11833
11885
|
{ timestamps: true }
|
|
11834
11886
|
);
|
|
11835
|
-
|
|
11836
|
-
|
|
11837
|
-
|
|
11838
|
-
|
|
11839
|
-
|
|
11840
|
-
|
|
11841
|
-
var EventModel =
|
|
11887
|
+
schema11.index({ name: 1 });
|
|
11888
|
+
schema11.index({ description: 1 });
|
|
11889
|
+
schema11.index({ region: 1 });
|
|
11890
|
+
schema11.index({ location: "2dsphere" });
|
|
11891
|
+
schema11.index({ tags: 1 });
|
|
11892
|
+
schema11.index({ "associates.email": 1 });
|
|
11893
|
+
var EventModel = import_mongoose15.default.models.Event || import_mongoose15.default.model("Event", schema11);
|
|
11842
11894
|
|
|
11843
11895
|
// src/mongoose/Partner.ts
|
|
11844
|
-
var
|
|
11845
|
-
var
|
|
11846
|
-
var
|
|
11896
|
+
var import_mongoose16 = __toESM(require("mongoose"));
|
|
11897
|
+
var MongooseSchema16 = import_mongoose16.default.Schema;
|
|
11898
|
+
var schema12 = new MongooseSchema16(
|
|
11847
11899
|
{
|
|
11848
11900
|
...baseResourceFields,
|
|
11849
11901
|
location: {
|
|
@@ -11859,19 +11911,19 @@ var schema11 = new MongooseSchema15(
|
|
|
11859
11911
|
},
|
|
11860
11912
|
{ timestamps: true }
|
|
11861
11913
|
);
|
|
11862
|
-
|
|
11863
|
-
|
|
11864
|
-
|
|
11865
|
-
|
|
11866
|
-
|
|
11867
|
-
var PartnerModel =
|
|
11914
|
+
schema12.index({ name: 1 });
|
|
11915
|
+
schema12.index({ description: 1 });
|
|
11916
|
+
schema12.index({ region: 1 });
|
|
11917
|
+
schema12.index({ location: "2dsphere" });
|
|
11918
|
+
schema12.index({ "associates.email": 1 });
|
|
11919
|
+
var PartnerModel = import_mongoose16.default.models.Partner || import_mongoose16.default.model("Partner", schema12);
|
|
11868
11920
|
|
|
11869
11921
|
// src/mongoose/Post.ts
|
|
11870
|
-
var
|
|
11871
|
-
var
|
|
11872
|
-
var contentSchema = new
|
|
11922
|
+
var import_mongoose17 = __toESM(require("mongoose"));
|
|
11923
|
+
var MongooseSchema17 = import_mongoose17.default.Schema;
|
|
11924
|
+
var contentSchema = new MongooseSchema17(
|
|
11873
11925
|
{
|
|
11874
|
-
contentData:
|
|
11926
|
+
contentData: import_mongoose17.Schema.Types.Mixed,
|
|
11875
11927
|
contentOrder: { required: true, type: Number },
|
|
11876
11928
|
contentType: {
|
|
11877
11929
|
enum: Object.values(EnumPostContentType),
|
|
@@ -11881,7 +11933,7 @@ var contentSchema = new MongooseSchema16(
|
|
|
11881
11933
|
},
|
|
11882
11934
|
{ _id: false }
|
|
11883
11935
|
);
|
|
11884
|
-
var
|
|
11936
|
+
var schema13 = new MongooseSchema17(
|
|
11885
11937
|
{
|
|
11886
11938
|
active: { default: true, required: true, type: Boolean },
|
|
11887
11939
|
caption: { required: true, type: String },
|
|
@@ -11896,15 +11948,15 @@ var schema12 = new MongooseSchema16(
|
|
|
11896
11948
|
},
|
|
11897
11949
|
{ timestamps: true }
|
|
11898
11950
|
);
|
|
11899
|
-
|
|
11900
|
-
|
|
11901
|
-
var PostModel =
|
|
11951
|
+
schema13.index({ title: 1 });
|
|
11952
|
+
schema13.index({ tags: 1 });
|
|
11953
|
+
var PostModel = import_mongoose17.default.models.Post || import_mongoose17.default.model("Post", schema13);
|
|
11902
11954
|
|
|
11903
11955
|
// src/mongoose/AppSetting.ts
|
|
11904
|
-
var
|
|
11905
|
-
var
|
|
11956
|
+
var import_mongoose18 = __toESM(require("mongoose"));
|
|
11957
|
+
var MongooseSchema18 = import_mongoose18.default.Schema;
|
|
11906
11958
|
var APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
|
|
11907
|
-
var AppSettingSchema = new
|
|
11959
|
+
var AppSettingSchema = new MongooseSchema18(
|
|
11908
11960
|
{
|
|
11909
11961
|
appVersion: { default: "1.0.1", required: true, type: String },
|
|
11910
11962
|
key: {
|
|
@@ -11919,7 +11971,7 @@ var AppSettingSchema = new MongooseSchema17(
|
|
|
11919
11971
|
},
|
|
11920
11972
|
{ timestamps: true }
|
|
11921
11973
|
);
|
|
11922
|
-
var AppSettingModel =
|
|
11974
|
+
var AppSettingModel = import_mongoose18.default.models.AppSetting || import_mongoose18.default.model("AppSetting", AppSettingSchema);
|
|
11923
11975
|
// Annotate the CommonJS export names for ESM import in node:
|
|
11924
11976
|
0 && (module.exports = {
|
|
11925
11977
|
APP_SETTINGS_ID,
|
|
@@ -11929,6 +11981,7 @@ var AppSettingModel = import_mongoose17.default.models.AppSetting || import_mong
|
|
|
11929
11981
|
ChatModel,
|
|
11930
11982
|
EventInfoModel,
|
|
11931
11983
|
EventModel,
|
|
11984
|
+
GoogleImportedMarketModel,
|
|
11932
11985
|
NotificationModel,
|
|
11933
11986
|
ParticipantSchema,
|
|
11934
11987
|
PartnerModel,
|