@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
|
@@ -4656,10 +4656,10 @@ var Condition = class _Condition {
|
|
|
4656
4656
|
otherwise
|
|
4657
4657
|
} = config;
|
|
4658
4658
|
let check = typeof is === "function" ? is : (...values) => values.every((value) => value === is);
|
|
4659
|
-
return new _Condition(refs, (values,
|
|
4659
|
+
return new _Condition(refs, (values, schema14) => {
|
|
4660
4660
|
var _branch;
|
|
4661
4661
|
let branch = check(...values) ? then : otherwise;
|
|
4662
|
-
return (_branch = branch == null ? void 0 : branch(
|
|
4662
|
+
return (_branch = branch == null ? void 0 : branch(schema14)) != null ? _branch : schema14;
|
|
4663
4663
|
});
|
|
4664
4664
|
}
|
|
4665
4665
|
constructor(refs, builder) {
|
|
@@ -4673,13 +4673,13 @@ var Condition = class _Condition {
|
|
|
4673
4673
|
// TODO: ? operator here?
|
|
4674
4674
|
ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context)
|
|
4675
4675
|
));
|
|
4676
|
-
let
|
|
4677
|
-
if (
|
|
4678
|
-
|
|
4676
|
+
let schema14 = this.fn(values, base, options);
|
|
4677
|
+
if (schema14 === void 0 || // @ts-ignore this can be base
|
|
4678
|
+
schema14 === base) {
|
|
4679
4679
|
return base;
|
|
4680
4680
|
}
|
|
4681
|
-
if (!isSchema(
|
|
4682
|
-
return
|
|
4681
|
+
if (!isSchema(schema14)) throw new TypeError("conditions must return a schema object");
|
|
4682
|
+
return schema14.resolve(options);
|
|
4683
4683
|
}
|
|
4684
4684
|
};
|
|
4685
4685
|
var prefixes = {
|
|
@@ -4749,7 +4749,7 @@ function createValidation(config) {
|
|
|
4749
4749
|
path = "",
|
|
4750
4750
|
options,
|
|
4751
4751
|
originalValue,
|
|
4752
|
-
schema:
|
|
4752
|
+
schema: schema14
|
|
4753
4753
|
}, panic, next) {
|
|
4754
4754
|
const {
|
|
4755
4755
|
name,
|
|
@@ -4761,8 +4761,8 @@ function createValidation(config) {
|
|
|
4761
4761
|
let {
|
|
4762
4762
|
parent,
|
|
4763
4763
|
context,
|
|
4764
|
-
abortEarly =
|
|
4765
|
-
disableStackTrace =
|
|
4764
|
+
abortEarly = schema14.spec.abortEarly,
|
|
4765
|
+
disableStackTrace = schema14.spec.disableStackTrace
|
|
4766
4766
|
} = options;
|
|
4767
4767
|
const resolveOptions = {
|
|
4768
4768
|
value,
|
|
@@ -4773,9 +4773,9 @@ function createValidation(config) {
|
|
|
4773
4773
|
const nextParams = resolveParams(Object.assign({
|
|
4774
4774
|
value,
|
|
4775
4775
|
originalValue,
|
|
4776
|
-
label:
|
|
4776
|
+
label: schema14.spec.label,
|
|
4777
4777
|
path: overrides.path || path,
|
|
4778
|
-
spec:
|
|
4778
|
+
spec: schema14.spec,
|
|
4779
4779
|
disableStackTrace: overrides.disableStackTrace || disableStackTrace
|
|
4780
4780
|
}, params, overrides.params), resolveOptions);
|
|
4781
4781
|
const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name, nextParams.disableStackTrace);
|
|
@@ -4794,7 +4794,7 @@ function createValidation(config) {
|
|
|
4794
4794
|
},
|
|
4795
4795
|
options,
|
|
4796
4796
|
originalValue,
|
|
4797
|
-
schema:
|
|
4797
|
+
schema: schema14
|
|
4798
4798
|
};
|
|
4799
4799
|
const handleResult = (validOrError) => {
|
|
4800
4800
|
if (ValidationError.isError(validOrError)) invalid(validOrError);
|
|
@@ -4838,42 +4838,42 @@ function resolveParams(params, options) {
|
|
|
4838
4838
|
function resolveMaybeRef(item, options) {
|
|
4839
4839
|
return Reference.isRef(item) ? item.getValue(options.value, options.parent, options.context) : item;
|
|
4840
4840
|
}
|
|
4841
|
-
function getIn(
|
|
4841
|
+
function getIn(schema14, path, value, context = value) {
|
|
4842
4842
|
let parent, lastPart, lastPartDebug;
|
|
4843
4843
|
if (!path) return {
|
|
4844
4844
|
parent,
|
|
4845
4845
|
parentPath: path,
|
|
4846
|
-
schema:
|
|
4846
|
+
schema: schema14
|
|
4847
4847
|
};
|
|
4848
4848
|
(0, import_property_expr.forEach)(path, (_part, isBracket, isArray) => {
|
|
4849
4849
|
let part = isBracket ? _part.slice(1, _part.length - 1) : _part;
|
|
4850
|
-
|
|
4850
|
+
schema14 = schema14.resolve({
|
|
4851
4851
|
context,
|
|
4852
4852
|
parent,
|
|
4853
4853
|
value
|
|
4854
4854
|
});
|
|
4855
|
-
let isTuple =
|
|
4855
|
+
let isTuple = schema14.type === "tuple";
|
|
4856
4856
|
let idx = isArray ? parseInt(part, 10) : 0;
|
|
4857
|
-
if (
|
|
4857
|
+
if (schema14.innerType || isTuple) {
|
|
4858
4858
|
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]"`);
|
|
4859
4859
|
if (value && idx >= value.length) {
|
|
4860
4860
|
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. `);
|
|
4861
4861
|
}
|
|
4862
4862
|
parent = value;
|
|
4863
4863
|
value = value && value[idx];
|
|
4864
|
-
|
|
4864
|
+
schema14 = isTuple ? schema14.spec.types[idx] : schema14.innerType;
|
|
4865
4865
|
}
|
|
4866
4866
|
if (!isArray) {
|
|
4867
|
-
if (!
|
|
4867
|
+
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}")`);
|
|
4868
4868
|
parent = value;
|
|
4869
4869
|
value = value && value[part];
|
|
4870
|
-
|
|
4870
|
+
schema14 = schema14.fields[part];
|
|
4871
4871
|
}
|
|
4872
4872
|
lastPart = part;
|
|
4873
4873
|
lastPartDebug = isBracket ? "[" + _part + "]" : "." + _part;
|
|
4874
4874
|
});
|
|
4875
4875
|
return {
|
|
4876
|
-
schema:
|
|
4876
|
+
schema: schema14,
|
|
4877
4877
|
parent,
|
|
4878
4878
|
parentPath: lastPart
|
|
4879
4879
|
};
|
|
@@ -5073,20 +5073,20 @@ var Schema = class {
|
|
|
5073
5073
|
this._mutate = before;
|
|
5074
5074
|
return result;
|
|
5075
5075
|
}
|
|
5076
|
-
concat(
|
|
5077
|
-
if (!
|
|
5078
|
-
if (
|
|
5076
|
+
concat(schema14) {
|
|
5077
|
+
if (!schema14 || schema14 === this) return this;
|
|
5078
|
+
if (schema14.type !== this.type && this.type !== "mixed") throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema14.type}`);
|
|
5079
5079
|
let base = this;
|
|
5080
|
-
let combined =
|
|
5080
|
+
let combined = schema14.clone();
|
|
5081
5081
|
const mergedSpec = Object.assign({}, base.spec, combined.spec);
|
|
5082
5082
|
combined.spec = mergedSpec;
|
|
5083
5083
|
combined.internalTests = Object.assign({}, base.internalTests, combined.internalTests);
|
|
5084
|
-
combined._whitelist = base._whitelist.merge(
|
|
5085
|
-
combined._blacklist = base._blacklist.merge(
|
|
5084
|
+
combined._whitelist = base._whitelist.merge(schema14._whitelist, schema14._blacklist);
|
|
5085
|
+
combined._blacklist = base._blacklist.merge(schema14._blacklist, schema14._whitelist);
|
|
5086
5086
|
combined.tests = base.tests;
|
|
5087
5087
|
combined.exclusiveTests = base.exclusiveTests;
|
|
5088
5088
|
combined.withMutation((next) => {
|
|
5089
|
-
|
|
5089
|
+
schema14.tests.forEach((fn) => {
|
|
5090
5090
|
next.test(fn.OPTIONS);
|
|
5091
5091
|
});
|
|
5092
5092
|
});
|
|
@@ -5102,15 +5102,15 @@ var Schema = class {
|
|
|
5102
5102
|
return this._typeCheck(v);
|
|
5103
5103
|
}
|
|
5104
5104
|
resolve(options) {
|
|
5105
|
-
let
|
|
5106
|
-
if (
|
|
5107
|
-
let conditions =
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5105
|
+
let schema14 = this;
|
|
5106
|
+
if (schema14.conditions.length) {
|
|
5107
|
+
let conditions = schema14.conditions;
|
|
5108
|
+
schema14 = schema14.clone();
|
|
5109
|
+
schema14.conditions = [];
|
|
5110
|
+
schema14 = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema14);
|
|
5111
|
+
schema14 = schema14.resolve(options);
|
|
5112
5112
|
}
|
|
5113
|
-
return
|
|
5113
|
+
return schema14;
|
|
5114
5114
|
}
|
|
5115
5115
|
resolveOptions(options) {
|
|
5116
5116
|
var _options$strict, _options$abortEarly, _options$recursive, _options$disableStack;
|
|
@@ -5266,11 +5266,11 @@ attempted value: ${formattedValue}
|
|
|
5266
5266
|
}
|
|
5267
5267
|
validate(value, options) {
|
|
5268
5268
|
var _options$disableStack2;
|
|
5269
|
-
let
|
|
5269
|
+
let schema14 = this.resolve(Object.assign({}, options, {
|
|
5270
5270
|
value
|
|
5271
5271
|
}));
|
|
5272
|
-
let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 :
|
|
5273
|
-
return new Promise((resolve, reject) =>
|
|
5272
|
+
let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema14.spec.disableStackTrace;
|
|
5273
|
+
return new Promise((resolve, reject) => schema14._validate(value, options, (error, parsed) => {
|
|
5274
5274
|
if (ValidationError.isError(error)) error.value = parsed;
|
|
5275
5275
|
reject(error);
|
|
5276
5276
|
}, (errors, validated) => {
|
|
@@ -5280,12 +5280,12 @@ attempted value: ${formattedValue}
|
|
|
5280
5280
|
}
|
|
5281
5281
|
validateSync(value, options) {
|
|
5282
5282
|
var _options$disableStack3;
|
|
5283
|
-
let
|
|
5283
|
+
let schema14 = this.resolve(Object.assign({}, options, {
|
|
5284
5284
|
value
|
|
5285
5285
|
}));
|
|
5286
5286
|
let result;
|
|
5287
|
-
let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 :
|
|
5288
|
-
|
|
5287
|
+
let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema14.spec.disableStackTrace;
|
|
5288
|
+
schema14._validate(value, Object.assign({}, options, {
|
|
5289
5289
|
sync: true
|
|
5290
5290
|
}), (error, parsed) => {
|
|
5291
5291
|
if (ValidationError.isError(error)) error.value = parsed;
|
|
@@ -5319,8 +5319,8 @@ attempted value: ${formattedValue}
|
|
|
5319
5319
|
return typeof defaultValue === "function" ? defaultValue.call(this, options) : clone(defaultValue);
|
|
5320
5320
|
}
|
|
5321
5321
|
getDefault(options) {
|
|
5322
|
-
let
|
|
5323
|
-
return
|
|
5322
|
+
let schema14 = this.resolve(options || {});
|
|
5323
|
+
return schema14._getDefault(options);
|
|
5324
5324
|
}
|
|
5325
5325
|
default(def) {
|
|
5326
5326
|
if (arguments.length === 0) {
|
|
@@ -5553,13 +5553,13 @@ attempted value: ${formattedValue}
|
|
|
5553
5553
|
return description;
|
|
5554
5554
|
}
|
|
5555
5555
|
get ["~standard"]() {
|
|
5556
|
-
const
|
|
5556
|
+
const schema14 = this;
|
|
5557
5557
|
const standard = {
|
|
5558
5558
|
version: 1,
|
|
5559
5559
|
vendor: "yup",
|
|
5560
5560
|
async validate(value) {
|
|
5561
5561
|
try {
|
|
5562
|
-
const result = await
|
|
5562
|
+
const result = await schema14.validate(value, {
|
|
5563
5563
|
abortEarly: false
|
|
5564
5564
|
});
|
|
5565
5565
|
return {
|
|
@@ -5583,9 +5583,9 @@ for (const method of ["validate", "validateSync"]) Schema.prototype[`${method}At
|
|
|
5583
5583
|
const {
|
|
5584
5584
|
parent,
|
|
5585
5585
|
parentPath,
|
|
5586
|
-
schema:
|
|
5586
|
+
schema: schema14
|
|
5587
5587
|
} = getIn(this, path, value, options.context);
|
|
5588
|
-
return
|
|
5588
|
+
return schema14[method](parent && parent[parentPath], Object.assign({}, options, {
|
|
5589
5589
|
parent,
|
|
5590
5590
|
path
|
|
5591
5591
|
}));
|
|
@@ -5759,7 +5759,7 @@ var StringSchema = class extends Schema {
|
|
|
5759
5759
|
});
|
|
5760
5760
|
}
|
|
5761
5761
|
required(message) {
|
|
5762
|
-
return super.required(message).withMutation((
|
|
5762
|
+
return super.required(message).withMutation((schema14) => schema14.test({
|
|
5763
5763
|
message: message || mixed.required,
|
|
5764
5764
|
name: "required",
|
|
5765
5765
|
skipAbsent: true,
|
|
@@ -5767,9 +5767,9 @@ var StringSchema = class extends Schema {
|
|
|
5767
5767
|
}));
|
|
5768
5768
|
}
|
|
5769
5769
|
notRequired() {
|
|
5770
|
-
return super.notRequired().withMutation((
|
|
5771
|
-
|
|
5772
|
-
return
|
|
5770
|
+
return super.notRequired().withMutation((schema14) => {
|
|
5771
|
+
schema14.tests = schema14.tests.filter((t) => t.OPTIONS.name !== "required");
|
|
5772
|
+
return schema14;
|
|
5773
5773
|
});
|
|
5774
5774
|
}
|
|
5775
5775
|
length(length, message = string.length) {
|
|
@@ -6147,7 +6147,7 @@ function sortByKeyOrder(keys) {
|
|
|
6147
6147
|
return findIndex(keys, a) - findIndex(keys, b);
|
|
6148
6148
|
};
|
|
6149
6149
|
}
|
|
6150
|
-
var parseJson = (value, _,
|
|
6150
|
+
var parseJson = (value, _, schema14) => {
|
|
6151
6151
|
if (typeof value !== "string") {
|
|
6152
6152
|
return value;
|
|
6153
6153
|
}
|
|
@@ -6156,30 +6156,30 @@ var parseJson = (value, _, schema13) => {
|
|
|
6156
6156
|
parsed = JSON.parse(value);
|
|
6157
6157
|
} catch (err) {
|
|
6158
6158
|
}
|
|
6159
|
-
return
|
|
6159
|
+
return schema14.isType(parsed) ? parsed : value;
|
|
6160
6160
|
};
|
|
6161
|
-
function deepPartial(
|
|
6162
|
-
if ("fields" in
|
|
6161
|
+
function deepPartial(schema14) {
|
|
6162
|
+
if ("fields" in schema14) {
|
|
6163
6163
|
const partial = {};
|
|
6164
|
-
for (const [key, fieldSchema] of Object.entries(
|
|
6164
|
+
for (const [key, fieldSchema] of Object.entries(schema14.fields)) {
|
|
6165
6165
|
partial[key] = deepPartial(fieldSchema);
|
|
6166
6166
|
}
|
|
6167
|
-
return
|
|
6167
|
+
return schema14.setFields(partial);
|
|
6168
6168
|
}
|
|
6169
|
-
if (
|
|
6170
|
-
const nextArray =
|
|
6169
|
+
if (schema14.type === "array") {
|
|
6170
|
+
const nextArray = schema14.optional();
|
|
6171
6171
|
if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);
|
|
6172
6172
|
return nextArray;
|
|
6173
6173
|
}
|
|
6174
|
-
if (
|
|
6175
|
-
return
|
|
6176
|
-
types:
|
|
6174
|
+
if (schema14.type === "tuple") {
|
|
6175
|
+
return schema14.optional().clone({
|
|
6176
|
+
types: schema14.spec.types.map(deepPartial)
|
|
6177
6177
|
});
|
|
6178
6178
|
}
|
|
6179
|
-
if ("optional" in
|
|
6180
|
-
return
|
|
6179
|
+
if ("optional" in schema14) {
|
|
6180
|
+
return schema14.optional();
|
|
6181
6181
|
}
|
|
6182
|
-
return
|
|
6182
|
+
return schema14;
|
|
6183
6183
|
}
|
|
6184
6184
|
var deepHas = (obj, p) => {
|
|
6185
6185
|
const path = [...(0, import_property_expr.normalizePath)(p)];
|
|
@@ -6310,8 +6310,8 @@ var ObjectSchema = class extends Schema {
|
|
|
6310
6310
|
next._sortErrors = this._sortErrors;
|
|
6311
6311
|
return next;
|
|
6312
6312
|
}
|
|
6313
|
-
concat(
|
|
6314
|
-
let next = super.concat(
|
|
6313
|
+
concat(schema14) {
|
|
6314
|
+
let next = super.concat(schema14);
|
|
6315
6315
|
let nextFields = next.fields;
|
|
6316
6316
|
for (let [field, schemaOrRef] of Object.entries(this.fields)) {
|
|
6317
6317
|
const target = nextFields[field];
|
|
@@ -6319,7 +6319,7 @@ var ObjectSchema = class extends Schema {
|
|
|
6319
6319
|
}
|
|
6320
6320
|
return next.withMutation((s2) => (
|
|
6321
6321
|
// XXX: excludes here is wrong
|
|
6322
|
-
s2.setFields(nextFields, [...this._excludedEdges, ...
|
|
6322
|
+
s2.setFields(nextFields, [...this._excludedEdges, ...schema14._excludedEdges])
|
|
6323
6323
|
));
|
|
6324
6324
|
}
|
|
6325
6325
|
_getDefault(options) {
|
|
@@ -6364,8 +6364,8 @@ var ObjectSchema = class extends Schema {
|
|
|
6364
6364
|
}
|
|
6365
6365
|
partial() {
|
|
6366
6366
|
const partial = {};
|
|
6367
|
-
for (const [key,
|
|
6368
|
-
partial[key] = "optional" in
|
|
6367
|
+
for (const [key, schema14] of Object.entries(this.fields)) {
|
|
6368
|
+
partial[key] = "optional" in schema14 && schema14.optional instanceof Function ? schema14.optional() : schema14;
|
|
6369
6369
|
}
|
|
6370
6370
|
return this.setFields(partial);
|
|
6371
6371
|
}
|
|
@@ -6567,22 +6567,22 @@ var ArraySchema = class extends Schema {
|
|
|
6567
6567
|
json() {
|
|
6568
6568
|
return this.transform(parseJson);
|
|
6569
6569
|
}
|
|
6570
|
-
concat(
|
|
6571
|
-
let next = super.concat(
|
|
6570
|
+
concat(schema14) {
|
|
6571
|
+
let next = super.concat(schema14);
|
|
6572
6572
|
next.innerType = this.innerType;
|
|
6573
|
-
if (
|
|
6573
|
+
if (schema14.innerType)
|
|
6574
6574
|
next.innerType = next.innerType ? (
|
|
6575
6575
|
// @ts-expect-error Lazy doesn't have concat and will break
|
|
6576
|
-
next.innerType.concat(
|
|
6577
|
-
) :
|
|
6576
|
+
next.innerType.concat(schema14.innerType)
|
|
6577
|
+
) : schema14.innerType;
|
|
6578
6578
|
return next;
|
|
6579
6579
|
}
|
|
6580
|
-
of(
|
|
6580
|
+
of(schema14) {
|
|
6581
6581
|
let next = this.clone();
|
|
6582
|
-
if (!isSchema(
|
|
6583
|
-
next.innerType =
|
|
6582
|
+
if (!isSchema(schema14)) throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema14));
|
|
6583
|
+
next.innerType = schema14;
|
|
6584
6584
|
next.spec = Object.assign({}, next.spec, {
|
|
6585
|
-
types:
|
|
6585
|
+
types: schema14
|
|
6586
6586
|
});
|
|
6587
6587
|
return next;
|
|
6588
6588
|
}
|
|
@@ -6730,7 +6730,7 @@ var TupleSchema = class extends Schema {
|
|
|
6730
6730
|
describe(options) {
|
|
6731
6731
|
const next = (options ? this.resolve(options) : this).clone();
|
|
6732
6732
|
const base = super.describe(options);
|
|
6733
|
-
base.innerType = next.spec.types.map((
|
|
6733
|
+
base.innerType = next.spec.types.map((schema14, index) => {
|
|
6734
6734
|
var _innerOptions;
|
|
6735
6735
|
let innerOptions = options;
|
|
6736
6736
|
if ((_innerOptions = innerOptions) != null && _innerOptions.value) {
|
|
@@ -6739,7 +6739,7 @@ var TupleSchema = class extends Schema {
|
|
|
6739
6739
|
value: innerOptions.value[index]
|
|
6740
6740
|
});
|
|
6741
6741
|
}
|
|
6742
|
-
return
|
|
6742
|
+
return schema14.describe(innerOptions);
|
|
6743
6743
|
});
|
|
6744
6744
|
return base;
|
|
6745
6745
|
}
|
|
@@ -6788,6 +6788,7 @@ var EnumFoodFlavor = /* @__PURE__ */ ((EnumFoodFlavor3) => {
|
|
|
6788
6788
|
EnumFoodFlavor3["SAVOURY"] = "Savoury";
|
|
6789
6789
|
EnumFoodFlavor3["SPICY"] = "Spicy";
|
|
6790
6790
|
EnumFoodFlavor3["SWEET"] = "Sweet";
|
|
6791
|
+
EnumFoodFlavor3["OTHER"] = "Other";
|
|
6791
6792
|
return EnumFoodFlavor3;
|
|
6792
6793
|
})(EnumFoodFlavor || {});
|
|
6793
6794
|
var EnumResourceType = /* @__PURE__ */ ((EnumResourceType22) => {
|
|
@@ -10144,7 +10145,7 @@ var socialMediaSchema = create$3({
|
|
|
10144
10145
|
is: (name) => !!name,
|
|
10145
10146
|
// If name has a value
|
|
10146
10147
|
then: () => normalizedUrlTransform().required("Link is required when name is set").url("Link must be a valid URL").label("Social Media Link"),
|
|
10147
|
-
otherwise: (
|
|
10148
|
+
otherwise: (schema14) => schema14.notRequired()
|
|
10148
10149
|
})
|
|
10149
10150
|
});
|
|
10150
10151
|
var globalResourceSchema = create$3().shape({
|
|
@@ -10217,21 +10218,21 @@ var paymentInfoSchema = create$3({
|
|
|
10217
10218
|
paymentMethod: create$8().oneOf(Object.values(EnumPaymentMethod)).required("Please select a Payment method"),
|
|
10218
10219
|
accountHolderName: create$6().when("paymentMethod", {
|
|
10219
10220
|
is: "bank_transfer",
|
|
10220
|
-
then: (
|
|
10221
|
-
otherwise: (
|
|
10221
|
+
then: (schema14) => schema14.required("Account holder name is required for bank transfer").trim(),
|
|
10222
|
+
otherwise: (schema14) => schema14.notRequired()
|
|
10222
10223
|
}),
|
|
10223
10224
|
accountNumber: create$6().when("paymentMethod", {
|
|
10224
10225
|
is: "bank_transfer",
|
|
10225
|
-
then: (
|
|
10226
|
+
then: (schema14) => schema14.required("Account number is required for bank transfer").matches(
|
|
10226
10227
|
nzBankAccountRegex,
|
|
10227
10228
|
"Account number must be in format: XX-XXXX-XXXXXXX-XX"
|
|
10228
10229
|
).trim(),
|
|
10229
|
-
otherwise: (
|
|
10230
|
+
otherwise: (schema14) => schema14.notRequired()
|
|
10230
10231
|
}),
|
|
10231
10232
|
link: create$6().when("paymentMethod", {
|
|
10232
|
-
is: (val) => val
|
|
10233
|
+
is: (val) => val === "paypal" || val === "stripe",
|
|
10233
10234
|
then: () => normalizedUrlTransform().url("Link must be a valid URL").required("Link is required for PayPal/Stripe"),
|
|
10234
|
-
otherwise: (
|
|
10235
|
+
otherwise: (schema14) => schema14.notRequired()
|
|
10235
10236
|
})
|
|
10236
10237
|
});
|
|
10237
10238
|
var eventInfoSchema = create$3().shape({
|
|
@@ -10344,8 +10345,8 @@ var userSchema = create$3().shape({
|
|
|
10344
10345
|
confirmPassword: create$6().nullable().trim().label("Confirm Password").when("password", {
|
|
10345
10346
|
is: (val) => !!val,
|
|
10346
10347
|
// only necessary if password typed
|
|
10347
|
-
then: (
|
|
10348
|
-
otherwise: (
|
|
10348
|
+
then: (schema14) => schema14.required("Confirm Password is required").oneOf([create$9("password")], "Passwords must match"),
|
|
10349
|
+
otherwise: (schema14) => schema14.notRequired()
|
|
10349
10350
|
}),
|
|
10350
10351
|
role: create$8().oneOf(Object.values(EnumUserRole)).required("Role is required")
|
|
10351
10352
|
});
|
|
@@ -10463,8 +10464,8 @@ var testerSchema = create$3().shape({
|
|
|
10463
10464
|
email: emailRequiredSchema,
|
|
10464
10465
|
event: create$3().when("resourceType", {
|
|
10465
10466
|
is: (resourceType) => resourceType === "event",
|
|
10466
|
-
otherwise: (
|
|
10467
|
-
then: (
|
|
10467
|
+
otherwise: (schema14) => schema14.nullable().optional(),
|
|
10468
|
+
then: (schema14) => schema14.required("Event information is required").shape(testerEventSchema.fields)
|
|
10468
10469
|
}),
|
|
10469
10470
|
firstName: create$6().required("First name is required"),
|
|
10470
10471
|
lastName: create$6().required("Last name is required"),
|
|
@@ -10482,8 +10483,8 @@ var testerSchema = create$3().shape({
|
|
|
10482
10483
|
).required("Resource Type is required"),
|
|
10483
10484
|
vendor: create$3().when("resourceType", {
|
|
10484
10485
|
is: (resourceType) => resourceType === "vendor",
|
|
10485
|
-
otherwise: (
|
|
10486
|
-
then: (
|
|
10486
|
+
otherwise: (schema14) => schema14.nullable().optional(),
|
|
10487
|
+
then: (schema14) => schema14.required("Vendor information is required").shape(testerVendorSchema.fields)
|
|
10487
10488
|
})
|
|
10488
10489
|
});
|
|
10489
10490
|
var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn2) => {
|
|
@@ -10521,7 +10522,7 @@ var adSchema = create$3().shape({
|
|
|
10521
10522
|
return endDate > now;
|
|
10522
10523
|
}).when("start", {
|
|
10523
10524
|
is: (val) => val && val.length > 0,
|
|
10524
|
-
then: (
|
|
10525
|
+
then: (schema14) => schema14.test(
|
|
10525
10526
|
"is-after-start",
|
|
10526
10527
|
"End date must be after start date",
|
|
10527
10528
|
function(value) {
|
|
@@ -11136,10 +11137,60 @@ ChatSchema.index({
|
|
|
11136
11137
|
});
|
|
11137
11138
|
var ChatModel = mongoose5.models.Chat || mongoose5.model("Chat", ChatSchema);
|
|
11138
11139
|
|
|
11139
|
-
// src/mongoose/
|
|
11140
|
+
// src/mongoose/GoogleImportedMarket.ts
|
|
11140
11141
|
import mongoose6 from "mongoose";
|
|
11141
11142
|
var MongooseSchema6 = mongoose6.Schema;
|
|
11143
|
+
var locationSchema2 = new MongooseSchema6(
|
|
11144
|
+
{
|
|
11145
|
+
lat: { required: true, type: Number },
|
|
11146
|
+
lng: { required: true, type: Number }
|
|
11147
|
+
},
|
|
11148
|
+
{ _id: false }
|
|
11149
|
+
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11150
|
+
);
|
|
11142
11151
|
var schema3 = new MongooseSchema6(
|
|
11152
|
+
{
|
|
11153
|
+
address: { required: true, type: String },
|
|
11154
|
+
businessStatus: { required: false, type: String },
|
|
11155
|
+
claimed: { default: false, required: true, type: Boolean },
|
|
11156
|
+
googleMapsUrl: { required: false, type: String },
|
|
11157
|
+
googlePlaceId: {
|
|
11158
|
+
required: true,
|
|
11159
|
+
type: String,
|
|
11160
|
+
unique: true
|
|
11161
|
+
// unique, indexed
|
|
11162
|
+
},
|
|
11163
|
+
image: { required: false, type: String },
|
|
11164
|
+
// photo_reference only
|
|
11165
|
+
importedAt: { default: () => /* @__PURE__ */ new Date(), required: true, type: Date },
|
|
11166
|
+
location: {
|
|
11167
|
+
required: false,
|
|
11168
|
+
// optional because lat/lng may expire after 30 days
|
|
11169
|
+
type: locationSchema2
|
|
11170
|
+
},
|
|
11171
|
+
name: { required: true, type: String },
|
|
11172
|
+
openingHours: { required: false, type: [String] },
|
|
11173
|
+
phone: { required: false, type: String },
|
|
11174
|
+
photos: { required: false, type: [String] },
|
|
11175
|
+
// array of photo_reference
|
|
11176
|
+
rating: { required: false, type: Number },
|
|
11177
|
+
reviewCount: { required: false, type: Number },
|
|
11178
|
+
slug: { required: true, type: String },
|
|
11179
|
+
website: { required: false, type: String }
|
|
11180
|
+
},
|
|
11181
|
+
{ timestamps: true }
|
|
11182
|
+
);
|
|
11183
|
+
schema3.index({ googlePlaceId: 1 });
|
|
11184
|
+
schema3.index({ name: 1 });
|
|
11185
|
+
schema3.index({ slug: 1 });
|
|
11186
|
+
schema3.index({ address: 1 });
|
|
11187
|
+
schema3.index({ "location.lat": 1, "location.lng": 1 });
|
|
11188
|
+
var GoogleImportedMarketModel = mongoose6.models.GoogleImportedMarket || mongoose6.model("GoogleImportedMarket", schema3);
|
|
11189
|
+
|
|
11190
|
+
// src/mongoose/Notification.ts
|
|
11191
|
+
import mongoose7 from "mongoose";
|
|
11192
|
+
var MongooseSchema7 = mongoose7.Schema;
|
|
11193
|
+
var schema4 = new MongooseSchema7(
|
|
11143
11194
|
{
|
|
11144
11195
|
data: {
|
|
11145
11196
|
resourceId: { required: true, type: String },
|
|
@@ -11162,16 +11213,16 @@ var schema3 = new MongooseSchema6(
|
|
|
11162
11213
|
userId: {
|
|
11163
11214
|
ref: "User",
|
|
11164
11215
|
required: true,
|
|
11165
|
-
type:
|
|
11216
|
+
type: mongoose7.Schema.Types.ObjectId
|
|
11166
11217
|
}
|
|
11167
11218
|
},
|
|
11168
11219
|
{ timestamps: true }
|
|
11169
11220
|
);
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
var NotificationModel =
|
|
11221
|
+
schema4.index({ isRead: 1, userId: 1 });
|
|
11222
|
+
schema4.index({ createdAt: -1, userId: 1 });
|
|
11223
|
+
var NotificationModel = mongoose7.models.Notification || mongoose7.model("Notification", schema4);
|
|
11173
11224
|
|
|
11174
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
11225
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-OBQRGWV3.mjs
|
|
11175
11226
|
var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
|
|
11176
11227
|
EnumOSPlatform22["ANDROID"] = "android";
|
|
11177
11228
|
EnumOSPlatform22["IOS"] = "ios";
|
|
@@ -11180,9 +11231,9 @@ var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
|
|
|
11180
11231
|
})(EnumOSPlatform2 || {});
|
|
11181
11232
|
|
|
11182
11233
|
// src/mongoose/PushToken.ts
|
|
11183
|
-
import
|
|
11184
|
-
var
|
|
11185
|
-
var
|
|
11234
|
+
import mongoose8 from "mongoose";
|
|
11235
|
+
var MongooseSchema8 = mongoose8.Schema;
|
|
11236
|
+
var schema5 = new MongooseSchema8(
|
|
11186
11237
|
{
|
|
11187
11238
|
platform: {
|
|
11188
11239
|
enum: Object.values(EnumOSPlatform2),
|
|
@@ -11190,16 +11241,16 @@ var schema4 = new MongooseSchema7(
|
|
|
11190
11241
|
type: String
|
|
11191
11242
|
},
|
|
11192
11243
|
token: { required: true, type: String },
|
|
11193
|
-
userId: { required: true, type:
|
|
11244
|
+
userId: { required: true, type: mongoose8.Schema.Types.ObjectId }
|
|
11194
11245
|
},
|
|
11195
11246
|
{ timestamps: true }
|
|
11196
11247
|
);
|
|
11197
|
-
var PushTokenModel =
|
|
11248
|
+
var PushTokenModel = mongoose8.models.PushToken || mongoose8.model("PushToken", schema5);
|
|
11198
11249
|
|
|
11199
11250
|
// src/mongoose/ResourceActivity.ts
|
|
11200
|
-
import
|
|
11201
|
-
var
|
|
11202
|
-
var ActivitySchema = new
|
|
11251
|
+
import mongoose9 from "mongoose";
|
|
11252
|
+
var MongooseSchema9 = mongoose9.Schema;
|
|
11253
|
+
var ActivitySchema = new MongooseSchema9(
|
|
11203
11254
|
{
|
|
11204
11255
|
activityType: {
|
|
11205
11256
|
enum: Object.values(EnumActivity),
|
|
@@ -11235,7 +11286,7 @@ var ActivitySchema = new MongooseSchema8(
|
|
|
11235
11286
|
},
|
|
11236
11287
|
{ _id: false }
|
|
11237
11288
|
);
|
|
11238
|
-
var
|
|
11289
|
+
var schema6 = new MongooseSchema9(
|
|
11239
11290
|
{
|
|
11240
11291
|
activity: { default: [], type: [ActivitySchema] },
|
|
11241
11292
|
resourceId: { required: true, type: String },
|
|
@@ -11247,14 +11298,14 @@ var schema5 = new MongooseSchema8(
|
|
|
11247
11298
|
},
|
|
11248
11299
|
{ timestamps: true }
|
|
11249
11300
|
);
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
var ResourceActivityModel =
|
|
11301
|
+
schema6.index({ resourceId: 1, resourceType: 1 }, { unique: true });
|
|
11302
|
+
schema6.index({ "views.location": "2dsphere" });
|
|
11303
|
+
var ResourceActivityModel = mongoose9.models.ResourceActivity || mongoose9.model("ResourceActivity", schema6);
|
|
11253
11304
|
|
|
11254
11305
|
// src/mongoose/Tester.ts
|
|
11255
|
-
import
|
|
11256
|
-
var
|
|
11257
|
-
var TesterVendorQuestionarySchema = new
|
|
11306
|
+
import mongoose10 from "mongoose";
|
|
11307
|
+
var MongooseSchema10 = mongoose10.Schema;
|
|
11308
|
+
var TesterVendorQuestionarySchema = new MongooseSchema10(
|
|
11258
11309
|
{
|
|
11259
11310
|
appearInVideoIntroduction: {
|
|
11260
11311
|
default: false,
|
|
@@ -11281,7 +11332,7 @@ var TesterVendorQuestionarySchema = new MongooseSchema9(
|
|
|
11281
11332
|
},
|
|
11282
11333
|
{ _id: false }
|
|
11283
11334
|
);
|
|
11284
|
-
var TesterVendorSchema = new
|
|
11335
|
+
var TesterVendorSchema = new MongooseSchema10(
|
|
11285
11336
|
{
|
|
11286
11337
|
categories: { required: true, type: [CategorySchema] },
|
|
11287
11338
|
marketsAttended: {
|
|
@@ -11307,7 +11358,7 @@ var TesterVendorSchema = new MongooseSchema9(
|
|
|
11307
11358
|
},
|
|
11308
11359
|
{ _id: false }
|
|
11309
11360
|
);
|
|
11310
|
-
var TesterEventQuestionarySchema = new
|
|
11361
|
+
var TesterEventQuestionarySchema = new MongooseSchema10(
|
|
11311
11362
|
{
|
|
11312
11363
|
allowMarketingAppearance: {
|
|
11313
11364
|
default: false,
|
|
@@ -11342,7 +11393,7 @@ var TesterEventQuestionarySchema = new MongooseSchema9(
|
|
|
11342
11393
|
},
|
|
11343
11394
|
{ _id: false }
|
|
11344
11395
|
);
|
|
11345
|
-
var TesterEventsSchema = new
|
|
11396
|
+
var TesterEventsSchema = new MongooseSchema10(
|
|
11346
11397
|
{
|
|
11347
11398
|
markets: {
|
|
11348
11399
|
required: true,
|
|
@@ -11371,7 +11422,7 @@ var TesterEventsSchema = new MongooseSchema9(
|
|
|
11371
11422
|
},
|
|
11372
11423
|
{ _id: false }
|
|
11373
11424
|
);
|
|
11374
|
-
var TesterSchema = new
|
|
11425
|
+
var TesterSchema = new MongooseSchema10(
|
|
11375
11426
|
{
|
|
11376
11427
|
active: { default: false, required: true, type: Boolean },
|
|
11377
11428
|
approved: { default: false, required: true, type: Boolean },
|
|
@@ -11405,43 +11456,43 @@ var TesterSchema = new MongooseSchema9(
|
|
|
11405
11456
|
timestamps: true
|
|
11406
11457
|
}
|
|
11407
11458
|
);
|
|
11408
|
-
var TesterModel =
|
|
11459
|
+
var TesterModel = mongoose10.models.Tester || mongoose10.model("Tester", TesterSchema);
|
|
11409
11460
|
|
|
11410
11461
|
// src/mongoose/User.ts
|
|
11411
|
-
import
|
|
11412
|
-
var
|
|
11413
|
-
var userActivityEventSchema = new
|
|
11462
|
+
import mongoose11 from "mongoose";
|
|
11463
|
+
var MongooseSchema11 = mongoose11.Schema;
|
|
11464
|
+
var userActivityEventSchema = new MongooseSchema11(
|
|
11414
11465
|
{
|
|
11415
11466
|
dateTime: dateTimeSchema3,
|
|
11416
11467
|
resourceId: {
|
|
11417
11468
|
ref: "Event",
|
|
11418
11469
|
required: false,
|
|
11419
|
-
type:
|
|
11470
|
+
type: mongoose11.Schema.Types.ObjectId
|
|
11420
11471
|
}
|
|
11421
11472
|
},
|
|
11422
11473
|
{ _id: false }
|
|
11423
11474
|
);
|
|
11424
|
-
var userActivityFavouritesSchema = new
|
|
11475
|
+
var userActivityFavouritesSchema = new MongooseSchema11(
|
|
11425
11476
|
{
|
|
11426
11477
|
events: {
|
|
11427
11478
|
ref: "Event",
|
|
11428
11479
|
required: false,
|
|
11429
|
-
type: [
|
|
11480
|
+
type: [mongoose11.Schema.Types.ObjectId]
|
|
11430
11481
|
},
|
|
11431
11482
|
partners: {
|
|
11432
11483
|
ref: "Partner",
|
|
11433
11484
|
required: false,
|
|
11434
|
-
type: [
|
|
11485
|
+
type: [mongoose11.Schema.Types.ObjectId]
|
|
11435
11486
|
},
|
|
11436
11487
|
vendors: {
|
|
11437
11488
|
ref: "Vendor",
|
|
11438
11489
|
required: false,
|
|
11439
|
-
type: [
|
|
11490
|
+
type: [mongoose11.Schema.Types.ObjectId]
|
|
11440
11491
|
}
|
|
11441
11492
|
},
|
|
11442
11493
|
{ _id: false }
|
|
11443
11494
|
);
|
|
11444
|
-
var stripeSchema = new
|
|
11495
|
+
var stripeSchema = new MongooseSchema11(
|
|
11445
11496
|
{
|
|
11446
11497
|
currentPlan: {
|
|
11447
11498
|
enum: Object.values(EnumUserLicence),
|
|
@@ -11472,7 +11523,7 @@ var stripeSchema = new MongooseSchema10(
|
|
|
11472
11523
|
},
|
|
11473
11524
|
{ _id: false }
|
|
11474
11525
|
);
|
|
11475
|
-
var
|
|
11526
|
+
var schema7 = new MongooseSchema11(
|
|
11476
11527
|
{
|
|
11477
11528
|
active: { default: false, required: true, type: Boolean },
|
|
11478
11529
|
associates: {
|
|
@@ -11488,7 +11539,7 @@ var schema6 = new MongooseSchema10(
|
|
|
11488
11539
|
events: {
|
|
11489
11540
|
ref: "Event",
|
|
11490
11541
|
required: false,
|
|
11491
|
-
type: [
|
|
11542
|
+
type: [mongoose11.Schema.Types.ObjectId]
|
|
11492
11543
|
},
|
|
11493
11544
|
firstName: { required: true, type: String },
|
|
11494
11545
|
isTester: { default: false, required: true, type: Boolean },
|
|
@@ -11500,7 +11551,7 @@ var schema6 = new MongooseSchema10(
|
|
|
11500
11551
|
partner: {
|
|
11501
11552
|
ref: "Partner",
|
|
11502
11553
|
required: false,
|
|
11503
|
-
type:
|
|
11554
|
+
type: mongoose11.Schema.Types.ObjectId
|
|
11504
11555
|
},
|
|
11505
11556
|
password: { required: true, type: String },
|
|
11506
11557
|
platform: {
|
|
@@ -11545,20 +11596,20 @@ var schema6 = new MongooseSchema10(
|
|
|
11545
11596
|
vendor: {
|
|
11546
11597
|
ref: "Vendor",
|
|
11547
11598
|
required: false,
|
|
11548
|
-
type:
|
|
11599
|
+
type: mongoose11.Schema.Types.ObjectId
|
|
11549
11600
|
}
|
|
11550
11601
|
},
|
|
11551
11602
|
{ strict: false, timestamps: true }
|
|
11552
11603
|
);
|
|
11553
|
-
|
|
11554
|
-
|
|
11555
|
-
|
|
11556
|
-
var UserModel =
|
|
11604
|
+
schema7.index({ "associates.email": 1 });
|
|
11605
|
+
schema7.index({ "licences.expiryDate": 1 });
|
|
11606
|
+
schema7.index({ "licences.licenceType": 1 });
|
|
11607
|
+
var UserModel = mongoose11.models.User || mongoose11.model("User", schema7);
|
|
11557
11608
|
|
|
11558
11609
|
// src/mongoose/VerificationToken.ts
|
|
11559
|
-
import
|
|
11560
|
-
var
|
|
11561
|
-
var
|
|
11610
|
+
import mongoose12 from "mongoose";
|
|
11611
|
+
var MongooseSchema12 = mongoose12.Schema;
|
|
11612
|
+
var schema8 = new MongooseSchema12(
|
|
11562
11613
|
{
|
|
11563
11614
|
createdAt: {
|
|
11564
11615
|
default: Date.now,
|
|
@@ -11573,12 +11624,12 @@ var schema7 = new MongooseSchema11(
|
|
|
11573
11624
|
},
|
|
11574
11625
|
{ timestamps: true }
|
|
11575
11626
|
);
|
|
11576
|
-
var VerificationTokenModel =
|
|
11627
|
+
var VerificationTokenModel = mongoose12.models.VerificationToken || mongoose12.model("VerificationToken", schema8);
|
|
11577
11628
|
|
|
11578
11629
|
// src/mongoose/vendor/Vendor.ts
|
|
11579
|
-
import
|
|
11580
|
-
var
|
|
11581
|
-
var MenuTypeSchema = new
|
|
11630
|
+
import mongoose13 from "mongoose";
|
|
11631
|
+
var MongooseSchema13 = mongoose13.Schema;
|
|
11632
|
+
var MenuTypeSchema = new MongooseSchema13(
|
|
11582
11633
|
{
|
|
11583
11634
|
description: { required: false, type: String },
|
|
11584
11635
|
name: { required: false, type: String },
|
|
@@ -11588,7 +11639,7 @@ var MenuTypeSchema = new MongooseSchema12(
|
|
|
11588
11639
|
{ _id: false }
|
|
11589
11640
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11590
11641
|
);
|
|
11591
|
-
var LocationsSchema = new
|
|
11642
|
+
var LocationsSchema = new MongooseSchema13(
|
|
11592
11643
|
{
|
|
11593
11644
|
dateTime: {
|
|
11594
11645
|
dateStatus: {
|
|
@@ -11621,7 +11672,7 @@ var LocationsSchema = new MongooseSchema12(
|
|
|
11621
11672
|
{ _id: false }
|
|
11622
11673
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11623
11674
|
);
|
|
11624
|
-
var
|
|
11675
|
+
var schema9 = new MongooseSchema13(
|
|
11625
11676
|
{
|
|
11626
11677
|
...baseResourceFields,
|
|
11627
11678
|
// Importing base resource fields from global.ts
|
|
@@ -11643,7 +11694,7 @@ var schema8 = new MongooseSchema12(
|
|
|
11643
11694
|
vendorInfoId: {
|
|
11644
11695
|
ref: "VendorInfo",
|
|
11645
11696
|
required: false,
|
|
11646
|
-
type:
|
|
11697
|
+
type: mongoose13.Schema.Types.ObjectId
|
|
11647
11698
|
},
|
|
11648
11699
|
vendorType: {
|
|
11649
11700
|
enum: Object.values(EnumVendorType),
|
|
@@ -11653,24 +11704,24 @@ var schema8 = new MongooseSchema12(
|
|
|
11653
11704
|
},
|
|
11654
11705
|
{ timestamps: true }
|
|
11655
11706
|
);
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
|
|
11659
|
-
|
|
11660
|
-
|
|
11661
|
-
var VendorModel =
|
|
11707
|
+
schema9.index({ name: 1 });
|
|
11708
|
+
schema9.index({ description: 1 });
|
|
11709
|
+
schema9.index({ region: 1 });
|
|
11710
|
+
schema9.index({ "categories.name": 1 });
|
|
11711
|
+
schema9.index({ "associates.email": 1 });
|
|
11712
|
+
var VendorModel = mongoose13.models.Vendor || mongoose13.model("Vendor", schema9);
|
|
11662
11713
|
|
|
11663
11714
|
// src/mongoose/vendor/VendorInfo.ts
|
|
11664
|
-
import
|
|
11665
|
-
var
|
|
11666
|
-
var AttributesSchema = new
|
|
11715
|
+
import mongoose14 from "mongoose";
|
|
11716
|
+
var MongooseSchema14 = mongoose14.Schema;
|
|
11717
|
+
var AttributesSchema = new MongooseSchema14(
|
|
11667
11718
|
{
|
|
11668
11719
|
details: { required: false, type: String },
|
|
11669
11720
|
isRequired: { default: false, required: true, type: Boolean }
|
|
11670
11721
|
},
|
|
11671
11722
|
{ _id: false }
|
|
11672
11723
|
);
|
|
11673
|
-
var
|
|
11724
|
+
var schema10 = new MongooseSchema14(
|
|
11674
11725
|
{
|
|
11675
11726
|
compliance: {
|
|
11676
11727
|
foodBeverageLicense: { default: false, required: false, type: Boolean },
|
|
@@ -11704,17 +11755,17 @@ var schema9 = new MongooseSchema13(
|
|
|
11704
11755
|
vendorId: {
|
|
11705
11756
|
ref: "Vendor",
|
|
11706
11757
|
required: true,
|
|
11707
|
-
type:
|
|
11758
|
+
type: mongoose14.Schema.Types.ObjectId
|
|
11708
11759
|
}
|
|
11709
11760
|
},
|
|
11710
11761
|
{ timestamps: true }
|
|
11711
11762
|
);
|
|
11712
|
-
var VendorInfoModel =
|
|
11763
|
+
var VendorInfoModel = mongoose14.models.VendorInfo || mongoose14.model("VendorInfo", schema10);
|
|
11713
11764
|
|
|
11714
11765
|
// src/mongoose/event/Event.ts
|
|
11715
|
-
import
|
|
11716
|
-
var
|
|
11717
|
-
var locationsSchema = new
|
|
11766
|
+
import mongoose15 from "mongoose";
|
|
11767
|
+
var MongooseSchema15 = mongoose15.Schema;
|
|
11768
|
+
var locationsSchema = new MongooseSchema15(
|
|
11718
11769
|
{
|
|
11719
11770
|
city: { required: true, type: String },
|
|
11720
11771
|
coordinates: {
|
|
@@ -11737,7 +11788,7 @@ var locationsSchema = new MongooseSchema14(
|
|
|
11737
11788
|
{ _id: false }
|
|
11738
11789
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11739
11790
|
);
|
|
11740
|
-
var
|
|
11791
|
+
var schema11 = new MongooseSchema15(
|
|
11741
11792
|
{
|
|
11742
11793
|
...baseResourceFields,
|
|
11743
11794
|
// Importing base resource fields from global.ts
|
|
@@ -11745,7 +11796,7 @@ var schema10 = new MongooseSchema14(
|
|
|
11745
11796
|
eventInfoId: {
|
|
11746
11797
|
ref: "EventInfo",
|
|
11747
11798
|
required: false,
|
|
11748
|
-
type:
|
|
11799
|
+
type: mongoose15.Schema.Types.ObjectId
|
|
11749
11800
|
},
|
|
11750
11801
|
eventType: {
|
|
11751
11802
|
enum: Object.values(EnumEventType),
|
|
@@ -11768,18 +11819,18 @@ var schema10 = new MongooseSchema14(
|
|
|
11768
11819
|
},
|
|
11769
11820
|
{ timestamps: true }
|
|
11770
11821
|
);
|
|
11771
|
-
|
|
11772
|
-
|
|
11773
|
-
|
|
11774
|
-
|
|
11775
|
-
|
|
11776
|
-
|
|
11777
|
-
var EventModel =
|
|
11822
|
+
schema11.index({ name: 1 });
|
|
11823
|
+
schema11.index({ description: 1 });
|
|
11824
|
+
schema11.index({ region: 1 });
|
|
11825
|
+
schema11.index({ location: "2dsphere" });
|
|
11826
|
+
schema11.index({ tags: 1 });
|
|
11827
|
+
schema11.index({ "associates.email": 1 });
|
|
11828
|
+
var EventModel = mongoose15.models.Event || mongoose15.model("Event", schema11);
|
|
11778
11829
|
|
|
11779
11830
|
// src/mongoose/Partner.ts
|
|
11780
|
-
import
|
|
11781
|
-
var
|
|
11782
|
-
var
|
|
11831
|
+
import mongoose16 from "mongoose";
|
|
11832
|
+
var MongooseSchema16 = mongoose16.Schema;
|
|
11833
|
+
var schema12 = new MongooseSchema16(
|
|
11783
11834
|
{
|
|
11784
11835
|
...baseResourceFields,
|
|
11785
11836
|
location: {
|
|
@@ -11795,17 +11846,17 @@ var schema11 = new MongooseSchema15(
|
|
|
11795
11846
|
},
|
|
11796
11847
|
{ timestamps: true }
|
|
11797
11848
|
);
|
|
11798
|
-
|
|
11799
|
-
|
|
11800
|
-
|
|
11801
|
-
|
|
11802
|
-
|
|
11803
|
-
var PartnerModel =
|
|
11849
|
+
schema12.index({ name: 1 });
|
|
11850
|
+
schema12.index({ description: 1 });
|
|
11851
|
+
schema12.index({ region: 1 });
|
|
11852
|
+
schema12.index({ location: "2dsphere" });
|
|
11853
|
+
schema12.index({ "associates.email": 1 });
|
|
11854
|
+
var PartnerModel = mongoose16.models.Partner || mongoose16.model("Partner", schema12);
|
|
11804
11855
|
|
|
11805
11856
|
// src/mongoose/Post.ts
|
|
11806
|
-
import
|
|
11807
|
-
var
|
|
11808
|
-
var contentSchema = new
|
|
11857
|
+
import mongoose17, { Schema as Schema2 } from "mongoose";
|
|
11858
|
+
var MongooseSchema17 = mongoose17.Schema;
|
|
11859
|
+
var contentSchema = new MongooseSchema17(
|
|
11809
11860
|
{
|
|
11810
11861
|
contentData: Schema2.Types.Mixed,
|
|
11811
11862
|
contentOrder: { required: true, type: Number },
|
|
@@ -11817,7 +11868,7 @@ var contentSchema = new MongooseSchema16(
|
|
|
11817
11868
|
},
|
|
11818
11869
|
{ _id: false }
|
|
11819
11870
|
);
|
|
11820
|
-
var
|
|
11871
|
+
var schema13 = new MongooseSchema17(
|
|
11821
11872
|
{
|
|
11822
11873
|
active: { default: true, required: true, type: Boolean },
|
|
11823
11874
|
caption: { required: true, type: String },
|
|
@@ -11832,15 +11883,15 @@ var schema12 = new MongooseSchema16(
|
|
|
11832
11883
|
},
|
|
11833
11884
|
{ timestamps: true }
|
|
11834
11885
|
);
|
|
11835
|
-
|
|
11836
|
-
|
|
11837
|
-
var PostModel =
|
|
11886
|
+
schema13.index({ title: 1 });
|
|
11887
|
+
schema13.index({ tags: 1 });
|
|
11888
|
+
var PostModel = mongoose17.models.Post || mongoose17.model("Post", schema13);
|
|
11838
11889
|
|
|
11839
11890
|
// src/mongoose/AppSetting.ts
|
|
11840
|
-
import
|
|
11841
|
-
var
|
|
11891
|
+
import mongoose18 from "mongoose";
|
|
11892
|
+
var MongooseSchema18 = mongoose18.Schema;
|
|
11842
11893
|
var APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
|
|
11843
|
-
var AppSettingSchema = new
|
|
11894
|
+
var AppSettingSchema = new MongooseSchema18(
|
|
11844
11895
|
{
|
|
11845
11896
|
appVersion: { default: "1.0.1", required: true, type: String },
|
|
11846
11897
|
key: {
|
|
@@ -11855,7 +11906,7 @@ var AppSettingSchema = new MongooseSchema17(
|
|
|
11855
11906
|
},
|
|
11856
11907
|
{ timestamps: true }
|
|
11857
11908
|
);
|
|
11858
|
-
var AppSettingModel =
|
|
11909
|
+
var AppSettingModel = mongoose18.models.AppSetting || mongoose18.model("AppSetting", AppSettingSchema);
|
|
11859
11910
|
|
|
11860
11911
|
export {
|
|
11861
11912
|
EnumAdStatus,
|
|
@@ -11876,6 +11927,7 @@ export {
|
|
|
11876
11927
|
AdModel,
|
|
11877
11928
|
ParticipantSchema,
|
|
11878
11929
|
ChatModel,
|
|
11930
|
+
GoogleImportedMarketModel,
|
|
11879
11931
|
NotificationModel,
|
|
11880
11932
|
PushTokenModel,
|
|
11881
11933
|
ResourceActivityModel,
|
|
@@ -11915,4 +11967,4 @@ react/cjs/react.development.js:
|
|
|
11915
11967
|
* LICENSE file in the root directory of this source tree.
|
|
11916
11968
|
*)
|
|
11917
11969
|
*/
|
|
11918
|
-
//# sourceMappingURL=chunk-
|
|
11970
|
+
//# sourceMappingURL=chunk-5JEBH7MU.mjs.map
|