@timardex/cluemart-server-shared 1.0.89 → 1.0.91
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-BZT5T34F.mjs → chunk-EPA7TN5Q.mjs} +70 -16
- package/dist/chunk-EPA7TN5Q.mjs.map +1 -0
- package/dist/index.cjs +70 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.mjs +69 -15
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +70 -15
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +11 -2
- package/dist/mongoose/index.d.ts +11 -2
- package/dist/mongoose/index.mjs +3 -1
- package/dist/service/index.cjs +68 -15
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-BZT5T34F.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { AdType, ReportChatUser, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, ResourceContactDetailsType, PosterUsageType, GoogleImportedMarket, RelationType, ResourceActivityType, TesterType, UserActivityEvent, UserType, VendorType, VendorInfoType, EventType, StallType, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType } from '@timardex/cluemart-shared';
|
|
2
|
+
import { AdType, ReportChatUser, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, ResourceContactDetailsType, PosterUsageType, GoogleImportedMarket, RelationType, ResourceActivityType, TesterType, UserActivityEvent, UserType, VendorType, VendorInfoType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType } from '@timardex/cluemart-shared';
|
|
3
3
|
import mongoose from 'mongoose';
|
|
4
4
|
import { O as ObjectId } from '../Chat-DjrJ0LKo.mjs';
|
|
5
5
|
export { C as ChatModel, N as NotificationModel, P as ParticipantSchema, a as SchemaChatMessageReactionType, S as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, e as SchemaChatType, f as SchemaCreateBulkNotificationInput, g as SchemaNotificationType, d as SchemaParticipantType } from '../Chat-DjrJ0LKo.mjs';
|
|
@@ -479,6 +479,15 @@ declare const StallTypeSchema: mongoose.Schema<StallType, mongoose.Model<StallTy
|
|
|
479
479
|
} & {
|
|
480
480
|
__v: number;
|
|
481
481
|
}>;
|
|
482
|
+
declare const refundPolicySchema: mongoose.Schema<RefundPolicy, mongoose.Model<RefundPolicy, any, any, any, mongoose.Document<unknown, any, RefundPolicy, any, {}> & RefundPolicy & {
|
|
483
|
+
_id: mongoose.Types.ObjectId;
|
|
484
|
+
} & {
|
|
485
|
+
__v: number;
|
|
486
|
+
}, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, RefundPolicy, mongoose.Document<unknown, {}, mongoose.FlatRecord<RefundPolicy>, {}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & mongoose.FlatRecord<RefundPolicy> & {
|
|
487
|
+
_id: mongoose.Types.ObjectId;
|
|
488
|
+
} & {
|
|
489
|
+
__v: number;
|
|
490
|
+
}>;
|
|
482
491
|
type SchemaEventInfoType = Omit<EventInfoType, "eventId"> & {
|
|
483
492
|
eventId: ObjectId;
|
|
484
493
|
};
|
|
@@ -528,4 +537,4 @@ declare const AppSettingModel: mongoose.Model<AppSettingsType, {}, {}, {}, mongo
|
|
|
528
537
|
__v: number;
|
|
529
538
|
}, any>;
|
|
530
539
|
|
|
531
|
-
export { APP_SETTINGS_ID, AdModel, AppSettingModel, CategorySchema, ChatReportModel, EventInfoModel, EventModel, GoogleImportedMarketModel, PartnerModel, PostModel, PushTokenModel, RelationModel, RelationTypeSchema, ResourceActivityModel, ResourceImageTypeSchema, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGoogleImportedMarket, type SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaRelationType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, SocialMediaTypeSchema, StallTypeSchema, TesterModel, UserModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, associatesSchema, baseResourceFields, dateTimeSchema, locationGeoSchema, locationsSchema, relationDatesSchema, resourceRelationsSchema, termsAgreementSchema, userLicenseSchema };
|
|
540
|
+
export { APP_SETTINGS_ID, AdModel, AppSettingModel, CategorySchema, ChatReportModel, EventInfoModel, EventModel, GoogleImportedMarketModel, PartnerModel, PostModel, PushTokenModel, RelationModel, RelationTypeSchema, ResourceActivityModel, ResourceImageTypeSchema, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGoogleImportedMarket, type SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaRelationType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, SocialMediaTypeSchema, StallTypeSchema, TesterModel, UserModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, associatesSchema, baseResourceFields, dateTimeSchema, locationGeoSchema, locationsSchema, refundPolicySchema, relationDatesSchema, resourceRelationsSchema, termsAgreementSchema, userLicenseSchema };
|
package/dist/mongoose/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { AdType, ReportChatUser, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, ResourceContactDetailsType, PosterUsageType, GoogleImportedMarket, RelationType, ResourceActivityType, TesterType, UserActivityEvent, UserType, VendorType, VendorInfoType, EventType, StallType, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType } from '@timardex/cluemart-shared';
|
|
2
|
+
import { AdType, ReportChatUser, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, ResourceContactDetailsType, PosterUsageType, GoogleImportedMarket, RelationType, ResourceActivityType, TesterType, UserActivityEvent, UserType, VendorType, VendorInfoType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType } from '@timardex/cluemart-shared';
|
|
3
3
|
import mongoose from 'mongoose';
|
|
4
4
|
import { O as ObjectId } from '../Chat-DjrJ0LKo.js';
|
|
5
5
|
export { C as ChatModel, N as NotificationModel, P as ParticipantSchema, a as SchemaChatMessageReactionType, S as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, e as SchemaChatType, f as SchemaCreateBulkNotificationInput, g as SchemaNotificationType, d as SchemaParticipantType } from '../Chat-DjrJ0LKo.js';
|
|
@@ -479,6 +479,15 @@ declare const StallTypeSchema: mongoose.Schema<StallType, mongoose.Model<StallTy
|
|
|
479
479
|
} & {
|
|
480
480
|
__v: number;
|
|
481
481
|
}>;
|
|
482
|
+
declare const refundPolicySchema: mongoose.Schema<RefundPolicy, mongoose.Model<RefundPolicy, any, any, any, mongoose.Document<unknown, any, RefundPolicy, any, {}> & RefundPolicy & {
|
|
483
|
+
_id: mongoose.Types.ObjectId;
|
|
484
|
+
} & {
|
|
485
|
+
__v: number;
|
|
486
|
+
}, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, RefundPolicy, mongoose.Document<unknown, {}, mongoose.FlatRecord<RefundPolicy>, {}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & mongoose.FlatRecord<RefundPolicy> & {
|
|
487
|
+
_id: mongoose.Types.ObjectId;
|
|
488
|
+
} & {
|
|
489
|
+
__v: number;
|
|
490
|
+
}>;
|
|
482
491
|
type SchemaEventInfoType = Omit<EventInfoType, "eventId"> & {
|
|
483
492
|
eventId: ObjectId;
|
|
484
493
|
};
|
|
@@ -528,4 +537,4 @@ declare const AppSettingModel: mongoose.Model<AppSettingsType, {}, {}, {}, mongo
|
|
|
528
537
|
__v: number;
|
|
529
538
|
}, any>;
|
|
530
539
|
|
|
531
|
-
export { APP_SETTINGS_ID, AdModel, AppSettingModel, CategorySchema, ChatReportModel, EventInfoModel, EventModel, GoogleImportedMarketModel, PartnerModel, PostModel, PushTokenModel, RelationModel, RelationTypeSchema, ResourceActivityModel, ResourceImageTypeSchema, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGoogleImportedMarket, type SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaRelationType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, SocialMediaTypeSchema, StallTypeSchema, TesterModel, UserModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, associatesSchema, baseResourceFields, dateTimeSchema, locationGeoSchema, locationsSchema, relationDatesSchema, resourceRelationsSchema, termsAgreementSchema, userLicenseSchema };
|
|
540
|
+
export { APP_SETTINGS_ID, AdModel, AppSettingModel, CategorySchema, ChatReportModel, EventInfoModel, EventModel, GoogleImportedMarketModel, PartnerModel, PostModel, PushTokenModel, RelationModel, RelationTypeSchema, ResourceActivityModel, ResourceImageTypeSchema, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGoogleImportedMarket, type SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaRelationType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, SocialMediaTypeSchema, StallTypeSchema, TesterModel, UserModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, associatesSchema, baseResourceFields, dateTimeSchema, locationGeoSchema, locationsSchema, refundPolicySchema, relationDatesSchema, resourceRelationsSchema, termsAgreementSchema, userLicenseSchema };
|
package/dist/mongoose/index.mjs
CHANGED
|
@@ -29,11 +29,12 @@ import {
|
|
|
29
29
|
dateTimeSchema,
|
|
30
30
|
locationGeoSchema,
|
|
31
31
|
locationsSchema,
|
|
32
|
+
refundPolicySchema,
|
|
32
33
|
relationDatesSchema,
|
|
33
34
|
resourceRelationsSchema,
|
|
34
35
|
termsAgreementSchema,
|
|
35
36
|
userLicenseSchema
|
|
36
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-EPA7TN5Q.mjs";
|
|
37
38
|
import "../chunk-3QS3WKRC.mjs";
|
|
38
39
|
export {
|
|
39
40
|
APP_SETTINGS_ID,
|
|
@@ -66,6 +67,7 @@ export {
|
|
|
66
67
|
dateTimeSchema,
|
|
67
68
|
locationGeoSchema,
|
|
68
69
|
locationsSchema,
|
|
70
|
+
refundPolicySchema,
|
|
69
71
|
relationDatesSchema,
|
|
70
72
|
resourceRelationsSchema,
|
|
71
73
|
termsAgreementSchema,
|
package/dist/service/index.cjs
CHANGED
|
@@ -8476,6 +8476,11 @@ var EVENT_INFO = gql`
|
|
|
8476
8476
|
link
|
|
8477
8477
|
paymentMethod
|
|
8478
8478
|
}
|
|
8479
|
+
refundPolicy {
|
|
8480
|
+
category
|
|
8481
|
+
label
|
|
8482
|
+
value
|
|
8483
|
+
}
|
|
8479
8484
|
requirements {
|
|
8480
8485
|
category
|
|
8481
8486
|
label
|
|
@@ -10378,7 +10383,14 @@ var eventInfoSchema = create$3().shape({
|
|
|
10378
10383
|
return value < applicationDeadlineHours;
|
|
10379
10384
|
}
|
|
10380
10385
|
),
|
|
10381
|
-
paymentInfo: create$2().of(paymentInfoSchema).min(1, "At least one payment method is required").required("Payment info is required")
|
|
10386
|
+
paymentInfo: create$2().of(paymentInfoSchema).min(1, "At least one payment method is required").required("Payment info is required"),
|
|
10387
|
+
refundPolicy: create$2().of(
|
|
10388
|
+
create$3({
|
|
10389
|
+
category: create$8().required("Category is required"),
|
|
10390
|
+
label: create$6().required("Label is required"),
|
|
10391
|
+
value: create$7().required("Value is required")
|
|
10392
|
+
})
|
|
10393
|
+
).min(1, "At least one refund policy item is required").required("Refund policy is required")
|
|
10382
10394
|
});
|
|
10383
10395
|
var vendroMenuSchema = create$3().shape({
|
|
10384
10396
|
description: create$6().trim().nullable().defined().test(
|
|
@@ -10431,15 +10443,27 @@ var vendorInfoSchema = create$3().shape({
|
|
|
10431
10443
|
).min(1, "Food flavors list must contain at least one item").required("Food flavors are required"),
|
|
10432
10444
|
packaging: create$2().of(create$6().defined()).min(1, "Packaging list must contain at least one item").required("Packaging is required"),
|
|
10433
10445
|
priceRange: create$3().shape({
|
|
10434
|
-
max: create$
|
|
10446
|
+
max: create$6().required("Max price is required").test(
|
|
10447
|
+
"is-number",
|
|
10448
|
+
"Max price must be a valid number",
|
|
10449
|
+
(value) => value !== void 0 && value !== "" && !isNaN(Number(value))
|
|
10450
|
+
).test(
|
|
10435
10451
|
"is-greater",
|
|
10436
10452
|
"Max price must be greater than or equal to Min price",
|
|
10437
10453
|
function(max) {
|
|
10438
10454
|
const { min } = this.parent;
|
|
10439
|
-
|
|
10455
|
+
if (!max || !min) return true;
|
|
10456
|
+
const maxNum = Number(max);
|
|
10457
|
+
const minNum = Number(min);
|
|
10458
|
+
if (isNaN(maxNum) || isNaN(minNum)) return true;
|
|
10459
|
+
return maxNum >= minNum;
|
|
10440
10460
|
}
|
|
10441
10461
|
),
|
|
10442
|
-
min: create$
|
|
10462
|
+
min: create$6().required("Min price is required").test(
|
|
10463
|
+
"is-number",
|
|
10464
|
+
"Min price must be a valid number",
|
|
10465
|
+
(value) => value !== void 0 && value !== "" && !isNaN(Number(value))
|
|
10466
|
+
)
|
|
10443
10467
|
}),
|
|
10444
10468
|
producedIn: create$2().of(create$6().defined()).min(1, "Produced in list must contain at least one item").required("Produced in is required")
|
|
10445
10469
|
}),
|
|
@@ -10477,8 +10501,24 @@ var vendorInfoSchema = create$3().shape({
|
|
|
10477
10501
|
}).optional(),
|
|
10478
10502
|
stallInfo: create$3().shape({
|
|
10479
10503
|
size: create$3().shape({
|
|
10480
|
-
depth: create$
|
|
10481
|
-
|
|
10504
|
+
depth: create$6().required("Depth is required").test(
|
|
10505
|
+
"is-number",
|
|
10506
|
+
"Depth must be a valid number",
|
|
10507
|
+
(value) => value !== void 0 && value !== "" && !isNaN(Number(value))
|
|
10508
|
+
).test(
|
|
10509
|
+
"is-positive",
|
|
10510
|
+
"Depth must be greater than 0",
|
|
10511
|
+
(value) => value !== void 0 && value !== "" && Number(value) > 0
|
|
10512
|
+
),
|
|
10513
|
+
width: create$6().required("Width is required").test(
|
|
10514
|
+
"is-number",
|
|
10515
|
+
"Width must be a valid number",
|
|
10516
|
+
(value) => value !== void 0 && value !== "" && !isNaN(Number(value))
|
|
10517
|
+
).test(
|
|
10518
|
+
"is-positive",
|
|
10519
|
+
"Width must be greater than 0",
|
|
10520
|
+
(value) => value !== void 0 && value !== "" && Number(value) > 0
|
|
10521
|
+
)
|
|
10482
10522
|
})
|
|
10483
10523
|
}),
|
|
10484
10524
|
vendorId: create$6().trim().required("Vendor ID is required")
|
|
@@ -10716,7 +10756,6 @@ var EnumPostType = /* @__PURE__ */ ((EnumPostType2) => {
|
|
|
10716
10756
|
return EnumPostType2;
|
|
10717
10757
|
})(EnumPostType || {});
|
|
10718
10758
|
var EnumPostContentType = /* @__PURE__ */ ((EnumPostContentType2) => {
|
|
10719
|
-
EnumPostContentType2["COVER"] = "cover";
|
|
10720
10759
|
EnumPostContentType2["IMAGE"] = "image";
|
|
10721
10760
|
EnumPostContentType2["LIST"] = "list";
|
|
10722
10761
|
EnumPostContentType2["TEXTAREA"] = "textarea";
|
|
@@ -11096,19 +11135,28 @@ var requirementsSchema = new MongooseSchema3(
|
|
|
11096
11135
|
// Prevents Mongoose from creating an additional _id field for
|
|
11097
11136
|
}
|
|
11098
11137
|
);
|
|
11138
|
+
var refundPolicySchema = new MongooseSchema3(
|
|
11139
|
+
{
|
|
11140
|
+
category: { required: true, type: String },
|
|
11141
|
+
label: { required: true, type: String },
|
|
11142
|
+
value: { required: true, type: Boolean }
|
|
11143
|
+
},
|
|
11144
|
+
{ _id: false }
|
|
11145
|
+
);
|
|
11099
11146
|
var schema3 = new MongooseSchema3(
|
|
11100
11147
|
{
|
|
11101
11148
|
applicationDeadlineHours: { required: true, type: Number },
|
|
11102
|
-
dateTime: [dateTimeSchema2],
|
|
11149
|
+
dateTime: { required: true, type: [dateTimeSchema2] },
|
|
11103
11150
|
eventId: {
|
|
11104
11151
|
ref: "Event",
|
|
11105
|
-
required:
|
|
11152
|
+
required: true,
|
|
11106
11153
|
type: import_mongoose4.default.Schema.Types.ObjectId
|
|
11107
11154
|
},
|
|
11108
11155
|
packInTime: { required: true, type: Number },
|
|
11109
11156
|
paymentDueHours: { required: true, type: Number },
|
|
11110
|
-
paymentInfo: [paymentInfoSchema2],
|
|
11111
|
-
|
|
11157
|
+
paymentInfo: { required: true, type: [paymentInfoSchema2] },
|
|
11158
|
+
refundPolicy: { required: true, type: [refundPolicySchema] },
|
|
11159
|
+
requirements: { required: false, type: [requirementsSchema] }
|
|
11112
11160
|
},
|
|
11113
11161
|
{ timestamps: true }
|
|
11114
11162
|
);
|
|
@@ -11261,6 +11309,11 @@ var userLicenseSchema = new MongooseSchema5(
|
|
|
11261
11309
|
enum: Object.values(EnumUserLicence),
|
|
11262
11310
|
required: true,
|
|
11263
11311
|
type: String
|
|
11312
|
+
},
|
|
11313
|
+
prevLicenceType: {
|
|
11314
|
+
enum: Object.values(EnumUserLicence),
|
|
11315
|
+
required: false,
|
|
11316
|
+
type: String
|
|
11264
11317
|
}
|
|
11265
11318
|
},
|
|
11266
11319
|
{ _id: false, timestamps: false }
|
|
@@ -12158,8 +12211,8 @@ var schema10 = new MongooseSchema15(
|
|
|
12158
12211
|
},
|
|
12159
12212
|
packaging: { required: true, type: [String] },
|
|
12160
12213
|
priceRange: {
|
|
12161
|
-
max: { required: true, type:
|
|
12162
|
-
min: { required: true, type:
|
|
12214
|
+
max: { required: true, type: String },
|
|
12215
|
+
min: { required: true, type: String }
|
|
12163
12216
|
},
|
|
12164
12217
|
producedIn: { required: true, type: [String] }
|
|
12165
12218
|
},
|
|
@@ -12170,8 +12223,8 @@ var schema10 = new MongooseSchema15(
|
|
|
12170
12223
|
},
|
|
12171
12224
|
stallInfo: {
|
|
12172
12225
|
size: {
|
|
12173
|
-
depth: { required: true, type:
|
|
12174
|
-
width: { required: true, type:
|
|
12226
|
+
depth: { required: true, type: String },
|
|
12227
|
+
width: { required: true, type: String }
|
|
12175
12228
|
}
|
|
12176
12229
|
},
|
|
12177
12230
|
vendorId: {
|