@lyxa.ai/core 1.3.297 → 1.3.299
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/libraries/mongo/models/embedded/service-order-flag.model.d.ts +1 -1
- package/dist/libraries/mongo/models/embedded/service-order-flag.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/vat.model.js.map +1 -1
- package/dist/libraries/mongo/models/service-order.model.d.ts +5 -4
- package/dist/libraries/mongo/models/service-order.model.js +5 -0
- package/dist/libraries/mongo/models/service-order.model.js.map +1 -1
- package/dist/libraries/mongo/models/vendor.model.js.map +1 -1
- package/dist/libraries/notification/index.d.ts +15 -3
- package/dist/libraries/notification/index.js +18 -13
- package/dist/libraries/notification/index.js.map +1 -1
- package/dist/libraries/trpc/middlewares/auth.d.ts +1 -1
- package/dist/libraries/trpc/middlewares/createRoleProtectedProcedure.d.ts +1 -1
- package/dist/libraries/trpc/middlewares/phone-verified.d.ts +1 -1
- package/dist/libraries/trpc/middlewares/publicUserDecoder.d.ts +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/dist/types/utilities/validation/common-validation.d.ts +12 -12
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-order-flag.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/service-order-flag.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,qDAAoE;AAEpE,MAAa,gBAAgB;IAErB,MAAM,CAAU;IAGhB,UAAU,CAA0B;IAGpC,SAAS,CAAQ;IAGjB,UAAU,CAAW;IAGrB,UAAU,CAAQ;CACzB;AAfD,4CAeC;AAbO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACF;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,6BAAsB,EAAE,CAAC;;oDAC1B;AAGpC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;8BACrB,IAAI;mDAAC;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;oDACZ;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACD,IAAI;oDAAC","sourcesContent":["import { prop } from '@typegoose/typegoose';\nimport { ServiceOrderActionType } from '../../../../utilities/enum';\n\nexport class ServiceOrderFlag {\n\t@prop({ required: true })\n\tpublic reason!: string;\n\n\t@prop({ required: true, type: String, enum: ServiceOrderActionType })\n\tpublic actionType!: ServiceOrderActionType;\n\n\t@prop({ type: Date, default: Date.now })\n\tpublic flaggedAt
|
|
1
|
+
{"version":3,"file":"service-order-flag.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/service-order-flag.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,qDAAoE;AAEpE,MAAa,gBAAgB;IAErB,MAAM,CAAU;IAGhB,UAAU,CAA0B;IAGpC,SAAS,CAAQ;IAGjB,UAAU,CAAW;IAGrB,UAAU,CAAQ;CACzB;AAfD,4CAeC;AAbO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACF;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,6BAAsB,EAAE,CAAC;;oDAC1B;AAGpC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;8BACrB,IAAI;mDAAC;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;oDACZ;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACD,IAAI;oDAAC","sourcesContent":["import { prop } from '@typegoose/typegoose';\nimport { ServiceOrderActionType } from '../../../../utilities/enum';\n\nexport class ServiceOrderFlag {\n\t@prop({ required: true })\n\tpublic reason!: string;\n\n\t@prop({ required: true, type: String, enum: ServiceOrderActionType })\n\tpublic actionType!: ServiceOrderActionType;\n\n\t@prop({ type: Date, default: Date.now })\n\tpublic flaggedAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isResolved?: boolean;\n\n\t@prop({ type: Date })\n\tpublic resolvedAt?: Date;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vat.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/vat.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAE5C,
|
|
1
|
+
{"version":3,"file":"vat.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/vat.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAE5C,MAAa,GAAG;IAER,UAAU,CAAU;IAGpB,mBAAmB,CAAU;CACpC;AAND,kBAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;uCACR;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;gDACC","sourcesContent":["import { prop } from '@typegoose/typegoose';\n\nexport class Vat {\n\t@prop({ type: Number, default: 0 })\n\tpublic companyVat?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryCompanyVat?: number;\n}\n"]}
|
|
@@ -8,7 +8,7 @@ import { ServiceCart } from './service-cart.model';
|
|
|
8
8
|
import { ServiceOrderFinance } from './embedded/service-order-finance.model';
|
|
9
9
|
import { ServiceOrderCancel } from './embedded/service-order-cance.model';
|
|
10
10
|
import { ServiceOrderStatusTimeline } from './embedded/status-timeline.model';
|
|
11
|
-
import { Review } from '.';
|
|
11
|
+
import { Review, VendorParent } from '.';
|
|
12
12
|
import { RegularOrderAddress } from './shared/address.model';
|
|
13
13
|
import { OrderSlotRange } from './shared/duration.model';
|
|
14
14
|
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
@@ -16,6 +16,7 @@ export declare class ServiceOrder extends TimeStamps {
|
|
|
16
16
|
orderId?: string;
|
|
17
17
|
user: Ref<User>;
|
|
18
18
|
vendor: Ref<Vendor>;
|
|
19
|
+
parent: Ref<VendorParent>;
|
|
19
20
|
serviceType: ServiceType;
|
|
20
21
|
subServiceType?: SubServiceType;
|
|
21
22
|
cart: Ref<ServiceCart>;
|
|
@@ -33,12 +34,12 @@ export declare class ServiceOrder extends TimeStamps {
|
|
|
33
34
|
completionTimeInMinutes?: number;
|
|
34
35
|
isUrgentOrder?: boolean;
|
|
35
36
|
urgentAt?: Date;
|
|
36
|
-
isOverdue
|
|
37
|
+
isOverdue?: boolean;
|
|
37
38
|
overdueAt?: Date;
|
|
38
39
|
finance: ServiceOrderFinance;
|
|
39
40
|
orderCancel?: ServiceOrderCancel;
|
|
40
|
-
statusTimeline
|
|
41
|
-
bufferTime
|
|
41
|
+
statusTimeline?: ServiceOrderStatusTimeline[];
|
|
42
|
+
bufferTime?: number;
|
|
42
43
|
isOrderReviewed?: boolean;
|
|
43
44
|
isReviewNotificationSent?: boolean;
|
|
44
45
|
reviews?: Ref<Review>[];
|
|
@@ -29,6 +29,7 @@ let ServiceOrder = class ServiceOrder extends defaultClasses_1.TimeStamps {
|
|
|
29
29
|
orderId;
|
|
30
30
|
user;
|
|
31
31
|
vendor;
|
|
32
|
+
parent;
|
|
32
33
|
serviceType;
|
|
33
34
|
subServiceType;
|
|
34
35
|
cart;
|
|
@@ -69,6 +70,10 @@ __decorate([
|
|
|
69
70
|
(0, typegoose_1.prop)({ required: true, ref: () => vendor_model_1.Vendor }),
|
|
70
71
|
__metadata("design:type", Object)
|
|
71
72
|
], ServiceOrder.prototype, "vendor", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typegoose_1.prop)({ required: true, ref: () => _1.VendorParent }),
|
|
75
|
+
__metadata("design:type", Object)
|
|
76
|
+
], ServiceOrder.prototype, "parent", void 0);
|
|
72
77
|
__decorate([
|
|
73
78
|
(0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ServiceType }),
|
|
74
79
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoE;AACpE,6CAAoC;AACpC,iDAAwC;AACxC,kDAAuG;AACvG,6DAAoD;AACpD,kFAAuE;AACvE,6DAAmD;AACnD,wFAA6E;AAC7E,oFAA0E;AAC1E,4EAA8E;AAC9E,kEAA6D;AAC7D,
|
|
1
|
+
{"version":3,"file":"service-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoE;AACpE,6CAAoC;AACpC,iDAAwC;AACxC,kDAAuG;AACvG,6DAAoD;AACpD,kFAAuE;AACvE,6DAAmD;AACnD,wFAA6E;AAC7E,oFAA0E;AAC1E,4EAA8E;AAC9E,kEAA6D;AAC7D,wBAAuD;AACvD,0DAA6D;AAC7D,4DAAyD;AACzD,4EAAqE;AAQ9D,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,2BAAU;IAEpC,OAAO,CAAU;IAGjB,IAAI,CAAa;IAGjB,MAAM,CAAe;IAGrB,MAAM,CAAqB;IAG3B,WAAW,CAAe;IAG1B,cAAc,CAAkB;IAGhC,IAAI,CAAoB;IAGxB,WAAW,CAAuB;IAGlC,SAAS,CAAkB;IA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c;QAC5B,UAAU,EAAE,KAAK;KACjB,CAAC;;6CAC6B;uBAvGnB,YAAY;IANxB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;IAClF,IAAA,eAAG,EAAe,MAAM,EAAE,KAAK;QAC/B,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,OAAO,GAAG,MAAM,IAAA,yBAAU,EAAC,eAAY,EAAE,kBAAW,CAAC,OAAO,CAAC,CAAC;QACpE,CAAC;IACF,CAAC,CAAC;GACW,YAAY,CAwGxB","sourcesContent":["import { modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport { User } from './user.model';\nimport { Vendor } from './vendor.model';\nimport { ServiceOrderStatus, CounterType, ServiceType, SubServiceType } from '../../../utilities/enum';\nimport { Professional } from './professional.model';\nimport { ServiceOrderFlag } from './embedded/service-order-flag.model';\nimport { ServiceCart } from './service-cart.model';\nimport { ServiceOrderFinance } from './embedded/service-order-finance.model';\nimport { ServiceOrderCancel } from './embedded/service-order-cance.model';\nimport { ServiceOrderStatusTimeline } from './embedded/status-timeline.model';\nimport { generateId } from '../../../utilities/id-generator';\nimport { CounterModel, Review, VendorParent } from '.';\nimport { RegularOrderAddress } from './shared/address.model';\nimport { OrderSlotRange } from './shared/duration.model';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\n\n@modelOptions({ schemaOptions: { collection: 'serviceOrders', timestamps: true } })\n@pre<ServiceOrder>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.orderId = await generateId(CounterModel, CounterType.BOOKING);\n\t}\n})\nexport class ServiceOrder extends TimeStamps {\n\t@prop({ type: String, unique: true })\n\tpublic orderId?: string;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ required: true, ref: () => Vendor })\n\tpublic vendor!: Ref<Vendor>;\n\n\t@prop({ required: true, ref: () => VendorParent })\n\tpublic parent!: Ref<VendorParent>;\n\n\t@prop({ required: true, type: String, enum: ServiceType })\n\tpublic serviceType!: ServiceType;\n\n\t@prop({ type: String, enum: SubServiceType })\n\tpublic subServiceType?: SubServiceType;\n\n\t@prop({ required: true, ref: () => ServiceCart })\n\tpublic cart!: Ref<ServiceCart>;\n\n\t@prop({ required: true, type: () => RegularOrderAddress })\n\tpublic userAddress!: RegularOrderAddress;\n\n\t@prop({ required: true, type: OrderSlotRange, _id: false })\n\tpublic slotRange!: OrderSlotRange;\n\n\t@prop({ type: String, enum: ServiceOrderStatus, default: ServiceOrderStatus.PENDING })\n\tpublic status!: ServiceOrderStatus;\n\n\t// @prop({ type: String })\n\t// public userNotes?: string;\n\n\t// @prop({ type: String })\n\t// public vendorNotes?: string;\n\n\t@prop({ ref: () => Professional })\n\tpublic professionals?: Ref<Professional>[];\n\n\t@prop({ ref: () => Professional })\n\tpublic responsibleProfessional?: Ref<Professional>;\n\n\t@prop({ type: () => ServiceOrderFlag, _id: false })\n\tpublic flag?: ServiceOrderFlag;\n\n\t@prop({ type: Date, default: new Date() })\n\tpublic processedAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic placedAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic startedAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic estimatedCompletionTime?: Date;\n\n\t@prop({ type: Date })\n\tpublic completedAt?: Date;\n\n\t@prop({ type: Number })\n\tpublic completionTimeInMinutes?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isUrgentOrder?: boolean;\n\n\t@prop({ type: Date })\n\tpublic urgentAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isOverdue?: boolean;\n\n\t@prop({ type: Date })\n\tpublic overdueAt?: Date;\n\n\t@prop({ required: true, type: ServiceOrderFinance, _id: false })\n\tpublic finance!: ServiceOrderFinance;\n\n\t@prop({ type: () => ServiceOrderCancel, _id: false })\n\tpublic orderCancel?: ServiceOrderCancel;\n\n\t@prop({ type: () => [ServiceOrderStatusTimeline], default: [] })\n\tpublic statusTimeline?: ServiceOrderStatusTimeline[];\n\n\t@prop({ type: Number })\n\tpublic bufferTime?: number; // minutes\n\n\t// @prop({ type: String })\n\t// public instruction?: string;\n\n\t// Review feature\n\t@prop({ type: Boolean, default: false })\n\tpublic isOrderReviewed?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReviewNotificationSent?: boolean;\n\n\t@prop({\n\t\tref: () => Review,\n\t\tforeignField: 'serviceOrder',\n\t\tlocalField: '_id',\n\t})\n\tpublic reviews?: Ref<Review>[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vendor.model.js","sourceRoot":"/","sources":["libraries/mongo/models/vendor.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAqF;AACrF,4EAAqE;AACrE,kDAA2E;AAC3E,wEAA8D;AAC9D,0DAAiD;AACjD,8DAA2D;AAC3D,6CAAoC;AACpC,wBAA+C;AAC/C,0FAA+E;AAC/E,kEAA6D;AActD,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,2BAAU;IAE9B,QAAQ,CAAU;IAGlB,IAAI,CAAU;IAGd,SAAS,CAAU;IAGnB,KAAK,CAAU;IAGf,MAAM,
|
|
1
|
+
{"version":3,"file":"vendor.model.js","sourceRoot":"/","sources":["libraries/mongo/models/vendor.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAqF;AACrF,4EAAqE;AACrE,kDAA2E;AAC3E,wEAA8D;AAC9D,0DAAiD;AACjD,8DAA2D;AAC3D,6CAAoC;AACpC,wBAA+C;AAC/C,0FAA+E;AAC/E,kEAA6D;AActD,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,2BAAU;IAE9B,QAAQ,CAAU;IAGlB,IAAI,CAAU;IAGd,SAAS,CAAU;IAGnB,KAAK,CAAU;IAGf,MAAM,CAAqB;IAG3B,WAAW,CAAe;IAG1B,MAAM,CAAU;IA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re } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { CounterType, ServiceType, Status } from '../../../utilities/enum';\nimport { ShopDocument } from './embedded/shop-document.model';\nimport { Address } from './shared/address.model';\nimport { WorkHourSetting } from './shared/work-hour.model';\nimport { Zone } from './zone.model';\nimport { VendorParent, CounterModel } from '.';\nimport { ServiceOrderSettings } from './embedded/service-order-settings.model';\nimport { generateId } from '../../../utilities/id-generator';\n\n@modelOptions({\n\tschemaOptions: { collection: 'vendors' },\n\toptions: { allowMixed: Severity.ALLOW },\n})\n@Index({ name: 1, serviceType: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\n@Index({ parent: 1, status: 1, isVisibleToUser: 1, deletedAt: 1 })\n@Index({ serviceType: 1, zones: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\n@pre<Vendor>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.vendorId = await generateId(CounterModel, CounterType.VENDOR);\n\t}\n})\nexport class Vendor extends TimeStamps {\n\t@prop({ type: String, unique: true, index: true })\n\tpublic vendorId?: string;\n\n\t@prop({ required: true, type: String })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic ownerName!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic email!: string;\n\n\t@prop({ required: true, ref: () => VendorParent })\n\tpublic parent!: Ref<VendorParent>;\n\n\t@prop({ type: String, enum: ServiceType })\n\tpublic serviceType?: ServiceType;\n\n\t@prop({ required: true, type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status!: Status;\n\n\t@prop({ required: true, type: String })\n\tpublic phoneNumber!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic userPhoneNumber!: string;\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic additionalPhoneNumbers?: string[];\n\n\t@prop({ required: true, type: Address })\n\tpublic address!: Address;\n\n\t@prop({ required: true, ref: () => Zone })\n\tpublic zones!: Ref<Zone>[];\n\n\t@prop({ type: String })\n\tpublic logo?: string;\n\n\t@prop({ type: String })\n\tpublic banner?: string;\n\n\t@prop({ type: ShopDocument })\n\tpublic document?: ShopDocument;\n\n\t@prop({ default: 0, type: () => Number })\n\tpublic avgRating?: number;\n\n\t@prop({ required: true, type: Boolean })\n\tpublic isVisibleToUser!: boolean;\n\n\t@prop({ default: 0, type: () => Number })\n\tpublic ordersCount?: number;\n\n\t@prop({ default: 0, type: () => Number })\n\tpublic customersCount?: number;\n\n\t@prop({ type: String, maxlength: 100 })\n\tpublic bobContactName?: string;\n\n\t@prop({ type: String, maxlength: 15 })\n\tpublic bobContactPhoneNumber?: string;\n\n\t@prop({ type: () => ServiceOrderSettings })\n\tpublic orderSettings?: ServiceOrderSettings;\n\n\t@prop({ type: WorkHourSetting })\n\tpublic workHourSetting?: WorkHourSetting;\n}\n"]}
|
|
@@ -4,17 +4,29 @@ import mongoose from 'mongoose';
|
|
|
4
4
|
import { FCMNotificationPayload } from '../firebase/fcmService';
|
|
5
5
|
export interface NotificationEventData {
|
|
6
6
|
accountType: NotificationAccountType;
|
|
7
|
-
recipientId
|
|
8
|
-
isGlobal: boolean;
|
|
7
|
+
recipientId: mongoose.Types.ObjectId;
|
|
9
8
|
isClickable: boolean;
|
|
10
9
|
clickType?: ClickType | null;
|
|
11
10
|
clickableUrl?: string | null;
|
|
12
11
|
notificationType?: PushNotificationEventType;
|
|
13
12
|
[key: string]: any;
|
|
14
13
|
}
|
|
14
|
+
export type NotificationGlobalEventData = Omit<NotificationEventData, 'recipientId'>;
|
|
15
15
|
export interface NotificationEventType extends Omit<FCMNotificationPayload, 'data'> {
|
|
16
16
|
data: NotificationEventData;
|
|
17
17
|
}
|
|
18
|
+
export interface NotificationGlobalEventType extends Omit<FCMNotificationPayload, 'data'> {
|
|
19
|
+
data: NotificationGlobalEventData;
|
|
20
|
+
}
|
|
18
21
|
export declare class NotificationEvent extends BaseEvent<NotificationEventType> {
|
|
19
|
-
constructor(payload: Partial<NotificationEventType
|
|
22
|
+
constructor(payload: Partial<Omit<NotificationEventType, 'data'>> & {
|
|
23
|
+
data: Partial<NotificationEventData> & {
|
|
24
|
+
recipientId: mongoose.Types.ObjectId;
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
export declare class NotificationGlobalEvent extends BaseEvent<NotificationGlobalEventType> {
|
|
29
|
+
constructor(payload: Partial<Omit<NotificationGlobalEventType, 'data'>> & {
|
|
30
|
+
data?: Partial<NotificationGlobalEventData>;
|
|
31
|
+
});
|
|
20
32
|
}
|
|
@@ -1,29 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.NotificationEvent = void 0;
|
|
3
|
+
exports.NotificationGlobalEvent = exports.NotificationEvent = void 0;
|
|
7
4
|
const enum_1 = require("../../utilities/enum");
|
|
8
5
|
const BaseEvent_1 = require("../event/BaseEvent");
|
|
9
|
-
const mongoose_1 = __importDefault(require("mongoose"));
|
|
10
6
|
class NotificationEvent extends BaseEvent_1.BaseEvent {
|
|
11
7
|
constructor(payload) {
|
|
12
|
-
const defaultData = {
|
|
13
|
-
isClickable: false,
|
|
14
|
-
isGlobal: false,
|
|
15
|
-
accountType: enum_1.NotificationAccountType.USER,
|
|
16
|
-
recipientId: new mongoose_1.default.Types.ObjectId(),
|
|
17
|
-
};
|
|
18
8
|
const finalPayload = {
|
|
19
9
|
...payload,
|
|
20
10
|
data: {
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
isClickable: false,
|
|
12
|
+
accountType: enum_1.NotificationAccountType.USER,
|
|
13
|
+
...payload.data,
|
|
23
14
|
},
|
|
24
15
|
};
|
|
25
16
|
super('notification', finalPayload);
|
|
26
17
|
}
|
|
27
18
|
}
|
|
28
19
|
exports.NotificationEvent = NotificationEvent;
|
|
20
|
+
class NotificationGlobalEvent extends BaseEvent_1.BaseEvent {
|
|
21
|
+
constructor(payload) {
|
|
22
|
+
const finalPayload = {
|
|
23
|
+
...payload,
|
|
24
|
+
data: {
|
|
25
|
+
isClickable: false,
|
|
26
|
+
accountType: enum_1.NotificationAccountType.USER,
|
|
27
|
+
...payload.data,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
super('notification-global', finalPayload);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.NotificationGlobalEvent = NotificationGlobalEvent;
|
|
29
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/notification/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/notification/index.ts"],"names":[],"mappings":";;;AAAA,+CAAqG;AACrG,kDAA+C;AAwB/C,MAAa,iBAAkB,SAAQ,qBAAgC;IACtE,YACC,OAEC;QAED,MAAM,YAAY,GAA0B;YAC3C,GAAG,OAAO;YACV,IAAI,EAAE;gBACL,WAAW,EAAE,KAAK;gBAClB,WAAW,EAAE,8BAAuB,CAAC,IAAI;gBACzC,GAAG,OAAO,CAAC,IAAI;aACf;SACD,CAAC;QAEF,KAAK,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IACrC,CAAC;CACD;AAjBD,8CAiBC;AAED,MAAa,uBAAwB,SAAQ,qBAAsC;IAClF,YACC,OAEC;QAED,MAAM,YAAY,GAAgC;YACjD,GAAG,OAAO;YACV,IAAI,EAAE;gBACL,WAAW,EAAE,KAAK;gBAClB,WAAW,EAAE,8BAAuB,CAAC,IAAI;gBACzC,GAAG,OAAO,CAAC,IAAI;aACf;SACD,CAAC;QAEF,KAAK,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC;IAC5C,CAAC;CACD;AAjBD,0DAiBC","sourcesContent":["import { ClickType, NotificationAccountType, PushNotificationEventType } from '../../utilities/enum';\nimport { BaseEvent } from '../event/BaseEvent';\nimport mongoose from 'mongoose';\nimport { FCMNotificationPayload } from '../firebase/fcmService';\n\nexport interface NotificationEventData {\n\taccountType: NotificationAccountType;\n\trecipientId: mongoose.Types.ObjectId;\n\tisClickable: boolean;\n\tclickType?: ClickType | null;\n\tclickableUrl?: string | null;\n\tnotificationType?: PushNotificationEventType;\n\t[key: string]: any;\n}\n\nexport type NotificationGlobalEventData = Omit<NotificationEventData, 'recipientId'>;\n\nexport interface NotificationEventType extends Omit<FCMNotificationPayload, 'data'> {\n\tdata: NotificationEventData;\n}\n\nexport interface NotificationGlobalEventType extends Omit<FCMNotificationPayload, 'data'> {\n\tdata: NotificationGlobalEventData;\n}\n\nexport class NotificationEvent extends BaseEvent<NotificationEventType> {\n\tconstructor(\n\t\tpayload: Partial<Omit<NotificationEventType, 'data'>> & {\n\t\t\tdata: Partial<NotificationEventData> & { recipientId: mongoose.Types.ObjectId };\n\t\t}\n\t) {\n\t\tconst finalPayload: NotificationEventType = {\n\t\t\t...payload,\n\t\t\tdata: {\n\t\t\t\tisClickable: false,\n\t\t\t\taccountType: NotificationAccountType.USER,\n\t\t\t\t...payload.data,\n\t\t\t},\n\t\t};\n\n\t\tsuper('notification', finalPayload);\n\t}\n}\n\nexport class NotificationGlobalEvent extends BaseEvent<NotificationGlobalEventType> {\n\tconstructor(\n\t\tpayload: Partial<Omit<NotificationGlobalEventType, 'data'>> & {\n\t\t\tdata?: Partial<NotificationGlobalEventData>;\n\t\t},\n\t) {\n\t\tconst finalPayload: NotificationGlobalEventType = {\n\t\t\t...payload,\n\t\t\tdata: {\n\t\t\t\tisClickable: false,\n\t\t\t\taccountType: NotificationAccountType.USER,\n\t\t\t\t...payload.data,\n\t\t\t},\n\t\t};\n\n\t\tsuper('notification-global', finalPayload);\n\t}\n}"]}
|
|
@@ -5,10 +5,10 @@ interface AuthOptions {
|
|
|
5
5
|
autoRefresh?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare function createAuthenticatedProcedure(options: AuthOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
|
|
8
|
-
req: import("http").IncomingMessage;
|
|
9
8
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
10
9
|
tokenType: TokenType | undefined;
|
|
11
10
|
entity: import("../context").EntityContext | undefined;
|
|
11
|
+
req: import("http").IncomingMessage;
|
|
12
12
|
requestId: string | undefined;
|
|
13
13
|
usedRefreshToken: boolean | undefined;
|
|
14
14
|
tokenRenewed: boolean | undefined;
|
|
@@ -4,10 +4,10 @@ interface RoleProtectedOptions {
|
|
|
4
4
|
allowedRoles: string[];
|
|
5
5
|
}
|
|
6
6
|
export declare function createRoleProtectedProcedure(options: RoleProtectedOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
|
|
7
|
-
req: import("http").IncomingMessage;
|
|
8
7
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
9
8
|
tokenType: import("../../auth").TokenType | undefined;
|
|
10
9
|
entity: import("../context").EntityContext | undefined;
|
|
10
|
+
req: import("http").IncomingMessage;
|
|
11
11
|
requestId: string | undefined;
|
|
12
12
|
usedRefreshToken: boolean | undefined;
|
|
13
13
|
tokenRenewed: boolean | undefined;
|
|
@@ -3,10 +3,10 @@ interface PhoneVerifiedOptions {
|
|
|
3
3
|
entityTypes: AuthEntityType[];
|
|
4
4
|
}
|
|
5
5
|
export declare function createPhoneVerifiedProcedure(options: PhoneVerifiedOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
|
|
6
|
-
req: import("http").IncomingMessage;
|
|
7
6
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
8
7
|
tokenType: import("../../auth").TokenType | undefined;
|
|
9
8
|
entity: import("../context").EntityContext | undefined;
|
|
9
|
+
req: import("http").IncomingMessage;
|
|
10
10
|
requestId: string | undefined;
|
|
11
11
|
usedRefreshToken: boolean | undefined;
|
|
12
12
|
tokenRenewed: boolean | undefined;
|
|
@@ -5,10 +5,10 @@ interface AuthOptions {
|
|
|
5
5
|
autoRefresh?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare function publicUserDecoder(options: AuthOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
|
|
8
|
-
req: import("http").IncomingMessage;
|
|
9
8
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
10
9
|
tokenType: TokenType | undefined;
|
|
11
10
|
entity: import("../context").EntityContext | undefined;
|
|
11
|
+
req: import("http").IncomingMessage;
|
|
12
12
|
requestId: string | undefined;
|
|
13
13
|
usedRefreshToken: boolean | undefined;
|
|
14
14
|
tokenRenewed: boolean | undefined;
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
|
@@ -26,8 +26,8 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
|
|
|
26
26
|
searchFields?: string[] | undefined;
|
|
27
27
|
} | undefined;
|
|
28
28
|
sort?: Record<string, 1 | -1> | undefined;
|
|
29
|
-
populate?: any;
|
|
30
29
|
select?: Record<string, 0 | 1> | undefined;
|
|
30
|
+
populate?: any;
|
|
31
31
|
query?: Record<string, any> | undefined;
|
|
32
32
|
}, {
|
|
33
33
|
search?: {
|
|
@@ -36,8 +36,8 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
|
|
|
36
36
|
} | undefined;
|
|
37
37
|
sort?: Record<string, 1 | -1> | undefined;
|
|
38
38
|
size?: number | undefined;
|
|
39
|
-
populate?: any;
|
|
40
39
|
select?: Record<string, 0 | 1> | undefined;
|
|
40
|
+
populate?: any;
|
|
41
41
|
query?: Record<string, any> | undefined;
|
|
42
42
|
page?: number | undefined;
|
|
43
43
|
}>>;
|
|
@@ -736,12 +736,12 @@ export declare const GetByIdInputSchema: z.ZodObject<{
|
|
|
736
736
|
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
|
|
737
737
|
}, "strip", z.ZodTypeAny, {
|
|
738
738
|
_id: import("mongoose").Types.ObjectId;
|
|
739
|
-
populate?: any;
|
|
740
739
|
select?: Record<string, 0 | 1> | undefined;
|
|
740
|
+
populate?: any;
|
|
741
741
|
}, {
|
|
742
742
|
_id: string | import("mongoose").Types.ObjectId;
|
|
743
|
-
populate?: any;
|
|
744
743
|
select?: Record<string, 0 | 1> | undefined;
|
|
744
|
+
populate?: any;
|
|
745
745
|
}>;
|
|
746
746
|
export type GetByIdInputDTO = DTO<typeof GetByIdInputSchema>;
|
|
747
747
|
export declare const GetProductByIdInputSchema: z.ZodObject<{
|
|
@@ -754,12 +754,12 @@ export declare const GetProductByIdInputSchema: z.ZodObject<{
|
|
|
754
754
|
_id: import("mongoose").Types.ObjectId;
|
|
755
755
|
withAttributeHiddenItems: boolean;
|
|
756
756
|
withAddonsHiddenItems: boolean;
|
|
757
|
-
populate?: any;
|
|
758
757
|
select?: Record<string, 0 | 1> | undefined;
|
|
758
|
+
populate?: any;
|
|
759
759
|
}, {
|
|
760
760
|
_id: string | import("mongoose").Types.ObjectId;
|
|
761
|
-
populate?: any;
|
|
762
761
|
select?: Record<string, 0 | 1> | undefined;
|
|
762
|
+
populate?: any;
|
|
763
763
|
withAttributeHiddenItems?: boolean | undefined;
|
|
764
764
|
withAddonsHiddenItems?: boolean | undefined;
|
|
765
765
|
}>;
|
|
@@ -773,14 +773,14 @@ export declare const GetOrderByIdInputSchema: z.ZodObject<{
|
|
|
773
773
|
}, "strip", z.ZodTypeAny, {
|
|
774
774
|
_id: import("mongoose").Types.ObjectId;
|
|
775
775
|
groupByCategories: boolean;
|
|
776
|
-
populate?: any;
|
|
777
776
|
select?: Record<string, 0 | 1> | undefined;
|
|
777
|
+
populate?: any;
|
|
778
778
|
userOrderCompletionScope?: UserOrderCompletionScope | undefined;
|
|
779
779
|
}, {
|
|
780
780
|
_id: string | import("mongoose").Types.ObjectId;
|
|
781
781
|
groupByCategories: boolean;
|
|
782
|
-
populate?: any;
|
|
783
782
|
select?: Record<string, 0 | 1> | undefined;
|
|
783
|
+
populate?: any;
|
|
784
784
|
userOrderCompletionScope?: UserOrderCompletionScope | undefined;
|
|
785
785
|
}>;
|
|
786
786
|
export type GetOrderByIdInputDTO = DTO<typeof GetOrderByIdInputSchema>;
|
|
@@ -788,11 +788,11 @@ export declare const GetByTokenInputSchema: z.ZodOptional<z.ZodObject<{
|
|
|
788
788
|
select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
|
|
789
789
|
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
|
|
790
790
|
}, "strip", z.ZodTypeAny, {
|
|
791
|
-
populate?: any;
|
|
792
791
|
select?: Record<string, 0 | 1> | undefined;
|
|
793
|
-
}, {
|
|
794
792
|
populate?: any;
|
|
793
|
+
}, {
|
|
795
794
|
select?: Record<string, 0 | 1> | undefined;
|
|
795
|
+
populate?: any;
|
|
796
796
|
}>>;
|
|
797
797
|
export type GetByTokenInputDTO = DTO<typeof GetByTokenInputSchema>;
|
|
798
798
|
export declare const GetOneQuerySchema: z.ZodObject<{
|
|
@@ -800,12 +800,12 @@ export declare const GetOneQuerySchema: z.ZodObject<{
|
|
|
800
800
|
select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
|
|
801
801
|
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
|
|
802
802
|
}, "strip", z.ZodTypeAny, {
|
|
803
|
-
populate?: any;
|
|
804
803
|
select?: Record<string, 0 | 1> | undefined;
|
|
804
|
+
populate?: any;
|
|
805
805
|
query?: Record<string, any> | undefined;
|
|
806
806
|
}, {
|
|
807
|
-
populate?: any;
|
|
808
807
|
select?: Record<string, 0 | 1> | undefined;
|
|
808
|
+
populate?: any;
|
|
809
809
|
query?: Record<string, any> | undefined;
|
|
810
810
|
}>;
|
|
811
811
|
export type GetOneQueryDTO = DTO<typeof GetOneQuerySchema>;
|