@lyxa.ai/core 1.3.120 → 1.3.122
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/setting.model.d.ts +1 -0
- package/dist/libraries/mongo/models/setting.model.js +5 -0
- package/dist/libraries/mongo/models/setting.model.js.map +1 -1
- package/dist/libraries/mongo/models/zone-extra-time.d.ts +0 -1
- package/dist/libraries/mongo/models/zone-extra-time.js +0 -5
- package/dist/libraries/mongo/models/zone-extra-time.js.map +1 -1
- package/dist/libraries/socket/adapters/socket-subscription.d.ts +3 -1
- package/dist/libraries/socket/adapters/socket-subscription.js +24 -1
- package/dist/libraries/socket/adapters/socket-subscription.js.map +1 -1
- package/dist/libraries/socket/events/order-actions.socket.event.d.ts +2 -15
- package/dist/libraries/socket/events/order-actions.socket.event.js +2 -8
- package/dist/libraries/socket/events/order-actions.socket.event.js.map +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/dist/types/utilities/shared/currency.js +3 -2
- package/dist/types/utilities/shared/currency.js.map +1 -1
- package/dist/types/utilities/validation/common-validation.d.ts +12 -12
- package/dist/utilities/shared/currency.js +3 -2
- package/dist/utilities/shared/currency.js.map +1 -1
- package/package.json +3 -3
|
@@ -50,6 +50,7 @@ let Setting = class Setting extends defaultClasses_1.TimeStamps {
|
|
|
50
50
|
agentNotificationSetting;
|
|
51
51
|
cashbackAmount;
|
|
52
52
|
timezone;
|
|
53
|
+
bufferTimeInSeconds;
|
|
53
54
|
};
|
|
54
55
|
exports.Setting = Setting;
|
|
55
56
|
__decorate([
|
|
@@ -144,6 +145,10 @@ __decorate([
|
|
|
144
145
|
(0, typegoose_1.prop)({ type: String, enum: enum_1.LyxaTimeZoneEnum }),
|
|
145
146
|
__metadata("design:type", String)
|
|
146
147
|
], Setting.prototype, "timezone", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, typegoose_1.prop)({ type: Number, min: 0, default: 600 }),
|
|
150
|
+
__metadata("design:type", Number)
|
|
151
|
+
], Setting.prototype, "bufferTimeInSeconds", void 0);
|
|
147
152
|
exports.Setting = Setting = __decorate([
|
|
148
153
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'settings' } })
|
|
149
154
|
], Setting);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setting.model.js","sourceRoot":"/","sources":["libraries/mongo/models/setting.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA0E;AAC1E,oDAA0D;AAC1D,8DAA2D;AAC3D,wEAA8D;AAC9D,wEAA8D;AAC9D,0EAAgE;AAChE,4EAAkE;AAClE,8EAAoE;AACpE,4EAAqE;AACrE,wEAAsE;AACtE,oFAAyE;AACzE,4FAA0E;AAC1E,8FAA4E;AAC5E,kGAAuF;AACvF,sGAA2F;AAC3F,8FAA2F;AAGpF,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,2BAAU;IAE/B,eAAe,CAAmB;IAGlC,iBAAiB,CAAqB;IAGtC,aAAa,CAAiB;IAG9B,eAAe,CAAmB;IAGlC,cAAc,CAAkB;IAGhC,YAAY,CAAgB;IAG5B,0BAA0B,CAA8B;IAGxD,eAAe,CAAU;IAGzB,aAAa,CAAU;IAGvB,iBAAiB,CAAY;IAG7B,YAAY,CAA0B;IAGtC,kBAAkB,CAAU;IAG5B,8BAA8B,CAAU;IAGxC,KAAK,CAAY;IAGjB,eAAe,CAAmB;IAGlC,cAAc,CAAmB;IAGjC,mBAAmB,CAAW;IAG9B,eAAe,CAAmB;IAGlC,sBAAsB,CAAoC;IAG1D,YAAY,CAAkB;IAG9B,wBAAwB,CAA4B;IAGpD,cAAc,CAAU;IAGxB,QAAQ,CAAoB;
|
|
1
|
+
{"version":3,"file":"setting.model.js","sourceRoot":"/","sources":["libraries/mongo/models/setting.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA0E;AAC1E,oDAA0D;AAC1D,8DAA2D;AAC3D,wEAA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AI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;oDACH;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,gDAAe,EAAE,CAAC;8BACP,gDAAe;gDAAC;AAGlC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,+DAA8B,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;uDACH;AAG1D;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,kCAAY,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;6CACb;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,2DAAwB,EAAE,CAAC;8BACP,2DAAwB;yDAAC;AAGpD;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;+CACJ;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAgB,EAAE,CAAC;;yCACZ;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;;oDACT;kBAvExB,OAAO;IADnB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,CAAC;GAC/C,OAAO,CAwEnB","sourcesContent":["import { LyxaTimeZoneEnum, PaymentMethod } from '../../../utilities/enum';\nimport { modelOptions, prop } from '@typegoose/typegoose';\nimport { WorkHourSetting } from './shared/work-hour.model';\nimport { PlusSettings } from './embedded/plus-settings.model';\nimport { RiderSetting } from './embedded/rider-setting.model';\nimport { PayoutSetting } from './embedded/payout-setting.model';\nimport { CourierSetting } from './embedded/courier-setting.model';\nimport { CurrencySetting } from './embedded/currency-setting.model';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { RiderBatchesSettings } from './embedded/rider-batches.model';\nimport { ServiceFeeSetting } from './embedded/service-fee-setting.model';\nimport { DeliveryCharge } from './embedded/delivery-charge-setting.model';\nimport { CustomerSupport } from './embedded/customer-support-numbers.model';\nimport { AgentNotificationSetting } from './embedded/agent-notification-setting.model';\nimport { BusinessDevelopmentSetting } from './embedded/business-development-setting.model';\nimport { CustomerSupportBatchesSettings } from './embedded/customer-support-batches.model';\n\n@modelOptions({ schemaOptions: { collection: 'settings' } })\nexport class Setting extends TimeStamps {\n\t@prop({ type: () => [DeliveryCharge] })\n\tpublic deliveryCharges: DeliveryCharge[];\n\n\t@prop({ type: ServiceFeeSetting })\n\tpublic serviceFeeSetting?: ServiceFeeSetting;\n\n\t@prop({ type: PayoutSetting })\n\tpublic payoutSetting?: PayoutSetting;\n\n\t@prop({ type: WorkHourSetting })\n\tpublic workHourSetting?: WorkHourSetting;\n\n\t@prop({ type: CourierSetting })\n\tpublic courierSetting?: CourierSetting;\n\n\t@prop({ type: RiderSetting })\n\tpublic riderSetting?: RiderSetting;\n\n\t@prop({ type: BusinessDevelopmentSetting })\n\tpublic businessDevelopmentSetting?: BusinessDevelopmentSetting;\n\n\t@prop({ type: Number, default: Infinity })\n\tpublic payLimitForUser?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic vatPercentage?: number;\n\n\t@prop({ type: () => [Number], default: [] })\n\tpublic riderSearchRanges?: number[];\n\n\t@prop({ type: () => [RiderBatchesSettings], default: [] })\n\tpublic riderBatches?: RiderBatchesSettings[];\n\n\t@prop({ type: Number, default: Infinity })\n\tpublic nearByShopDistance?: number;\n\n\t@prop({ type: Number, default: Infinity })\n\tpublic nearByShopDistanceInHomeScreen?: number;\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic units?: string[];\n\n\t@prop({ type: CurrencySetting })\n\tpublic currencySetting?: CurrencySetting;\n\n\t@prop({ type: () => [String], enum: PaymentMethod, default: [] })\n\tpublic paymentMethods?: PaymentMethod[];\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isGroupOrderEnabled?: boolean;\n\n\t@prop({ type: CustomerSupport })\n\tpublic customerSupport?: CustomerSupport;\n\n\t@prop({ type: () => [CustomerSupportBatchesSettings], default: [] })\n\tpublic customerSupportBatches?: CustomerSupportBatchesSettings[];\n\n\t@prop({ type: () => [PlusSettings], default: [] })\n\tpublic plusSettings?: PlusSettings[];\n\n\t@prop({ type: AgentNotificationSetting })\n\tpublic agentNotificationSetting?: AgentNotificationSetting;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic cashbackAmount?: number;\n\n\t@prop({ type: String, enum: LyxaTimeZoneEnum })\n\tpublic timezone?: LyxaTimeZoneEnum;\n\n\t@prop({ type: Number, min: 0, default: 600 })\n\tpublic bufferTimeInSeconds!: number;\n}\n"]}
|
|
@@ -20,7 +20,6 @@ let ZoneExtraTime = class ZoneExtraTime extends defaultClasses_1.TimeStamps {
|
|
|
20
20
|
zone;
|
|
21
21
|
day;
|
|
22
22
|
extraTimeInSeconds;
|
|
23
|
-
bufferTimeInSeconds;
|
|
24
23
|
isActive;
|
|
25
24
|
};
|
|
26
25
|
exports.ZoneExtraTime = ZoneExtraTime;
|
|
@@ -44,10 +43,6 @@ __decorate([
|
|
|
44
43
|
(0, typegoose_1.Prop)({ type: Number, min: 0, default: 0 }),
|
|
45
44
|
__metadata("design:type", Number)
|
|
46
45
|
], ZoneExtraTime.prototype, "extraTimeInSeconds", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, typegoose_1.Prop)({ type: Number, min: 0, default: 600 }),
|
|
49
|
-
__metadata("design:type", Number)
|
|
50
|
-
], ZoneExtraTime.prototype, "bufferTimeInSeconds", void 0);
|
|
51
46
|
__decorate([
|
|
52
47
|
(0, typegoose_1.Prop)({ type: Boolean, default: true }),
|
|
53
48
|
__metadata("design:type", Boolean)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zone-extra-time.js","sourceRoot":"/","sources":["libraries/mongo/models/zone-extra-time.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,kDAAkD;AAClD,6CAAoC;AAI7B,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,2BAAU;IAErC,KAAK,CAAU;IAGf,GAAG,CAAU;IAGb,IAAI,CAAa;IAGjB,GAAG,CAAW;IAGd,kBAAkB,CAAU;IAG5B,
|
|
1
|
+
{"version":3,"file":"zone-extra-time.js","sourceRoot":"/","sources":["libraries/mongo/models/zone-extra-time.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,kDAAkD;AAClD,6CAAoC;AAI7B,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,2BAAU;IAErC,KAAK,CAAU;IAGf,GAAG,CAAU;IAGb,IAAI,CAAa;IAGjB,GAAG,CAAW;IAGd,kBAAkB,CAAU;IAG5B,QAAQ,CAAW;CAC1B,CAAA;AAlBY,sCAAa;AAElB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACH;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACL;AAGb;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CAClB;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACjC;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;yDACR;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;+CACb;wBAjBd,aAAa;IAFzB,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IACpC,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,kBAAkB,EAAE,EAAE,CAAC;GACvD,aAAa,CAkBzB","sourcesContent":["import { Index, modelOptions, Prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { WeekDay } from '../../../utilities/enum';\nimport { Zone } from './zone.model';\n\n@Index({ zone: 1, day: 1, start: 1 })\n@modelOptions({ schemaOptions: { collection: 'extra_time_slots' } })\nexport class ZoneExtraTime extends TimeStamps {\n\t@Prop({ required: true })\n\tpublic start!: string; // e.g., \"09:00\"\n\n\t@Prop({ required: true })\n\tpublic end!: string; // e.g., \"12:00\"\n\n\t@Prop({ ref: () => Zone, required: true })\n\tpublic zone!: Ref<Zone>;\n\n\t@Prop({ type: Number, enum: WeekDay, required: true })\n\tpublic day!: WeekDay;\n\n\t@Prop({ type: Number, min: 0, default: 0 })\n\tpublic extraTimeInSeconds!: number;\n\n\t@Prop({ type: Boolean, default: true })\n\tpublic isActive!: boolean;\n}"]}
|
|
@@ -3,6 +3,7 @@ import { InputFor, OutputFor } from '../core';
|
|
|
3
3
|
import { TokenType } from '../../auth';
|
|
4
4
|
import { ProcedureResolverOptions } from '@trpc/server/unstable-core-do-not-import';
|
|
5
5
|
import { EntityContext, LyxaHTTPContext } from '../../trpc/context';
|
|
6
|
+
import mongoose from 'mongoose';
|
|
6
7
|
type optsType<TEventType extends SocketEventType, TInput extends InputFor<TEventType>> = ProcedureResolverOptions<object, LyxaHTTPContext, {
|
|
7
8
|
res: import('http').ServerResponse<import('http').IncomingMessage>;
|
|
8
9
|
tokenType: TokenType | undefined;
|
|
@@ -12,6 +13,7 @@ type optsType<TEventType extends SocketEventType, TInput extends InputFor<TEvent
|
|
|
12
13
|
usedRefreshToken: boolean | undefined;
|
|
13
14
|
tokenRenewed: boolean | undefined;
|
|
14
15
|
}, TInput>;
|
|
15
|
-
export declare function
|
|
16
|
+
export declare function getShopIdFromEntity(entity: EntityContext): string | mongoose.Types.ObjectId | mongoose.Types.ObjectId[];
|
|
17
|
+
export declare function getEntityId(entity: EntityContext): string | mongoose.Types.ObjectId | mongoose.Types.ObjectId[];
|
|
16
18
|
export declare function createSocketSubscriptionAdapter<TEventType extends SocketEventType, TInput extends InputFor<TEventType>>(eventType: TEventType): (opts: optsType<TEventType, TInput>) => AsyncGenerator<Awaited<OutputFor<TEventType>>, void, unknown>;
|
|
17
19
|
export {};
|
|
@@ -1,15 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getShopIdFromEntity = getShopIdFromEntity;
|
|
3
4
|
exports.getEntityId = getEntityId;
|
|
4
5
|
exports.createSocketSubscriptionAdapter = createSocketSubscriptionAdapter;
|
|
6
|
+
const enum_1 = require("../../../utilities/enum");
|
|
5
7
|
const core_1 = require("../core");
|
|
6
8
|
const crypto_1 = require("crypto");
|
|
7
9
|
const instance_utils_1 = require("../../../utilities/instance.utils");
|
|
10
|
+
const auth_1 = require("../../auth");
|
|
8
11
|
const events_1 = require("events");
|
|
9
12
|
const index_1 = require("../../../index");
|
|
10
13
|
const connections_1 = require("../connections");
|
|
14
|
+
function getShopIdFromEntity(entity) {
|
|
15
|
+
const params = entity.parameters;
|
|
16
|
+
switch (params?.role) {
|
|
17
|
+
case enum_1.ShopRole.PARENT:
|
|
18
|
+
case enum_1.ShopRole.PARENT_MANAGER:
|
|
19
|
+
case enum_1.ShopRole.PARENT_ORDER_MANAGER:
|
|
20
|
+
return params?.parent;
|
|
21
|
+
case enum_1.ShopRole.SHOP:
|
|
22
|
+
case enum_1.ShopRole.SHOP_MANAGER:
|
|
23
|
+
case enum_1.ShopRole.SHOP_ORDER_MANAGER:
|
|
24
|
+
return params?.shops;
|
|
25
|
+
default:
|
|
26
|
+
return entity.id;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
11
29
|
function getEntityId(entity) {
|
|
12
|
-
|
|
30
|
+
switch (entity.type) {
|
|
31
|
+
case auth_1.AuthEntityType.SELLER:
|
|
32
|
+
return getShopIdFromEntity(entity);
|
|
33
|
+
default:
|
|
34
|
+
return entity.id;
|
|
35
|
+
}
|
|
13
36
|
}
|
|
14
37
|
async function* _createSocketSubscription(eventType, opts) {
|
|
15
38
|
const { ctx } = opts;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socket-subscription.js","sourceRoot":"/","sources":["libraries/socket/adapters/socket-subscription.ts"],"names":[],"mappings":";;AA4CA,
|
|
1
|
+
{"version":3,"file":"socket-subscription.js","sourceRoot":"/","sources":["libraries/socket/adapters/socket-subscription.ts"],"names":[],"mappings":";;AA4CA,kDAiBC;AAED,kCAOC;AA2CD,0EAKC;AAtHD,kDAAoE;AACpE,kCAA0F;AAC1F,mCAAoC;AACpC,sEAAkE;AAClE,qCAAuD;AAGvD,mCAA4B;AAC5B,0CAA8C;AAE9C,gDAIwB;AA8BxB,SAAgB,mBAAmB,CAAC,MAAqB;IACxD,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC;IAEjC,QAAQ,MAAM,EAAE,IAAI,EAAE,CAAC;QACtB,KAAK,eAAQ,CAAC,MAAM,CAAC;QACrB,KAAK,eAAQ,CAAC,cAAc,CAAC;QAC7B,KAAK,eAAQ,CAAC,oBAAoB;YACjC,OAAO,MAAM,EAAE,MAAiC,CAAC;QAElD,KAAK,eAAQ,CAAC,IAAI,CAAC;QACnB,KAAK,eAAQ,CAAC,YAAY,CAAC;QAC3B,KAAK,eAAQ,CAAC,kBAAkB;YAC/B,OAAO,MAAM,EAAE,KAAkC,CAAC;QAEnD;YACC,OAAO,MAAM,CAAC,EAAE,CAAC;IACn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,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC1C,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,+BAA+B,CAAC,CAAC;IAG9E,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;QAC3C,gBAAS,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC5C,IAAA,6CAA+B,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QACpD,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,kCAAkC,CAAC,CAAC;IAClF,CAAC,CAAC,CAAC;IAIH,IAAI,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,IAAA,WAAE,EAAC,OAAO,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;QAC9E,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,kCAAkC,CAAC,CAAC;QACvF,MAAM,IAAW,CAAC;IACnB,CAAC;AACF,CAAC;AAED,SAAgB,+BAA+B,CAG7C,SAAqB;IACtB,OAAO,CAAC,IAAkC,EAAE,EAAE,CAAC,yBAAyB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC3F,CAAC","sourcesContent":["import { SocketEventType, ShopRole } from '../../../utilities/enum';\nimport { EventFactory, InputFor, LocalEventEmitter, LocalSubs, OutputFor } from '../core';\nimport { randomUUID } from 'crypto';\nimport { getInstanceId } from '../../../utilities/instance.utils';\nimport { AuthEntityType, TokenType } from '../../auth';\nimport { ProcedureResolverOptions } from '@trpc/server/unstable-core-do-not-import';\nimport { EntityContext, LyxaHTTPContext } from '../../trpc/context';\nimport { on } from 'events';\nimport { getLibraries } from '../../../index';\nimport mongoose, { get } from 'mongoose';\nimport {\n\tconnectEntityToSocketEvent,\n\tdisconnectEntityFromSocketEvent,\n\tEntitySubscription,\n} from '../connections';\n\ntype optsType<\n\tTEventType extends SocketEventType,\n\tTInput extends InputFor<TEventType>,\n> = ProcedureResolverOptions<\n\tobject,\n\tLyxaHTTPContext,\n\t{\n\t\tres: import('http').ServerResponse<import('http').IncomingMessage>;\n\t\ttokenType: TokenType | undefined;\n\t\tentity: EntityContext | undefined;\n\t\treq: import('http').IncomingMessage;\n\t\trequestId: string | undefined;\n\t\tusedRefreshToken: boolean | undefined;\n\t\ttokenRenewed: boolean | undefined;\n\t},\n\tTInput\n>;\n\ninterface _SubscriptionContext {\n\tentity?: { id: string; type: AuthEntityType };\n\tsignal?: AbortSignal;\n}\n\ninterface _SubscriptionOpts<TEventType extends SocketEventType, TInput extends InputFor<TEventType>> {\n\tctx: _SubscriptionContext;\n\tinput: TInput;\n}\n\nexport function getShopIdFromEntity(entity: EntityContext) {\n\tconst params = entity.parameters;\n\n\tswitch (params?.role) {\n\t\tcase ShopRole.PARENT:\n\t\tcase ShopRole.PARENT_MANAGER:\n\t\tcase ShopRole.PARENT_ORDER_MANAGER:\n\t\t\treturn params?.parent as mongoose.Types.ObjectId;\n\n\t\tcase ShopRole.SHOP:\n\t\tcase ShopRole.SHOP_MANAGER:\n\t\tcase ShopRole.SHOP_ORDER_MANAGER:\n\t\t\treturn params?.shops as mongoose.Types.ObjectId[];\n\n\t\tdefault:\n\t\t\treturn entity.id;\n\t}\n}\n\nexport function getEntityId(entity: EntityContext) {\n\tswitch (entity.type) {\n\t\tcase AuthEntityType.SELLER:\n\t\t\treturn getShopIdFromEntity(entity);\n\t\tdefault:\n\t\t\treturn entity.id;\n\t}\n}\n\nasync function* _createSocketSubscription<\n\tTEventType extends SocketEventType,\n\tTInput extends InputFor<TEventType>,\n>(eventType: TEventType, opts: optsType<TEventType, TInput>) {\n\tconst { ctx } = opts;\n\tconst logger = getLibraries().getLogger().logger;\n\n\t// --- USE getEntityId ---\n\tif (!ctx.entity) throw new Error('Entity is required for socket subscription');\n\tconst entityId = getEntityId(ctx.entity);\n\n\tlogger.debug(`Entity ID: ${entityId}`);\n\tconst entity: EntitySubscription = { id: entityId.toString(), type: ctx.entity.type };\n\n\tconst eventKey = EventFactory.getSubscriptionKey(eventType, opts.input);\n\tconsole.log('Event Key:', eventKey);\n\tconst socketId = randomUUID();\n\tconst socketInfo = { socketId, eventKey, instanceId: getInstanceId() };\n\n\tconst localEE = new LocalEventEmitter(socketId);\n\n\t// --- CONNECT ---\n\tawait connectEntityToSocketEvent(entity, socketInfo);\n\tLocalSubs.bind(entity, eventKey, localEE);\n\tlogger.debug({ entity, socketId, eventKey }, 'Socket subscription connected');\n\n\t// --- DISCONNECT ---\n\topts.signal?.addEventListener('abort', () => {\n\t\tLocalSubs.unbind(entity, eventKey, localEE);\n\t\tdisconnectEntityFromSocketEvent(entity, socketInfo);\n\t\tlogger.debug({ entity, socketId, eventKey }, 'Socket subscription disconnected');\n\t});\n\n\t// --- STREAM EVENTS ---\n\ttype Out = OutputFor<TEventType>;\n\tfor await (const [data] of on(localEE.ee, eventKey, { signal: opts.signal })) {\n\t\tlogger.debug({ entity, socketId, eventKey, data }, 'Socket subscription sending data');\n\t\tyield data as Out;\n\t}\n}\n\nexport function createSocketSubscriptionAdapter<\n\tTEventType extends SocketEventType,\n\tTInput extends InputFor<TEventType>,\n>(eventType: TEventType) {\n\treturn (opts: optsType<TEventType, TInput>) => _createSocketSubscription(eventType, opts);\n}\n\n/**\n * @Example\n * const socketRouterTwo = createTRPCRouter({\n * \tonMessage: createAuthenticatedProcedure({ entityTypes: [AuthEntityType.CRM] })\n * \t\t.input(ChatroomMessageSendSocketInputSchema)\n * \t\t.output(zAsyncIterable({ yield: ChatroomMessageSendOutputSchema }))\n * \t\t.subscription(createSocketSubscriptionAdapter(SocketEventType.CHATROOM_MESSAGE_SEND)),\n * });\n */\n"]}
|
|
@@ -142,24 +142,12 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
|
|
|
142
142
|
orderAction: OrderAction;
|
|
143
143
|
preparationTimeMinutes: number;
|
|
144
144
|
}>;
|
|
145
|
-
export declare const OrderActionsInputSchema: z.
|
|
146
|
-
shopId: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
147
|
-
}, "strip", z.ZodTypeAny, {
|
|
148
|
-
shopId: import("mongoose").Types.ObjectId;
|
|
149
|
-
}, {
|
|
150
|
-
shopId: string | import("mongoose").Types.ObjectId;
|
|
151
|
-
}>;
|
|
145
|
+
export declare const OrderActionsInputSchema: z.ZodUndefined;
|
|
152
146
|
export type OrderActionSocketInputDTO = DTO<typeof OrderActionsInputSchema>;
|
|
153
147
|
export type OrderActionSocketOutputDTO = DTO<typeof OrderActionsOutputSchema>;
|
|
154
148
|
export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof OrderActionsInputSchema, typeof OrderActionsOutputSchema> {
|
|
155
149
|
static readonly schemas: {
|
|
156
|
-
input: z.
|
|
157
|
-
shopId: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
158
|
-
}, "strip", z.ZodTypeAny, {
|
|
159
|
-
shopId: import("mongoose").Types.ObjectId;
|
|
160
|
-
}, {
|
|
161
|
-
shopId: string | import("mongoose").Types.ObjectId;
|
|
162
|
-
}>;
|
|
150
|
+
input: z.ZodUndefined;
|
|
163
151
|
output: z.ZodObject<{
|
|
164
152
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
165
153
|
shopId: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
@@ -298,6 +286,5 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
|
|
|
298
286
|
};
|
|
299
287
|
private static getMessageForAction;
|
|
300
288
|
constructor(payload: OrderActionSocketOutputDTO);
|
|
301
|
-
static identifier(input: z.infer<typeof OrderActionsInputSchema>): string;
|
|
302
289
|
protected getIdentifier(): string;
|
|
303
290
|
}
|
|
@@ -44,9 +44,7 @@ exports.OrderActionsOutputSchema = zod_1.z.object({
|
|
|
44
44
|
createdAt: validation_1.ZodValidation.coerce.date('Order Creation Date'),
|
|
45
45
|
triggerAt: validation_1.ZodValidation.coerce.date('Order Trigger Date'),
|
|
46
46
|
});
|
|
47
|
-
exports.OrderActionsInputSchema = zod_1.z.
|
|
48
|
-
shopId: validation_1.ZodValidation.objectId('shopId'),
|
|
49
|
-
});
|
|
47
|
+
exports.OrderActionsInputSchema = zod_1.z.undefined();
|
|
50
48
|
class OrderActionsSocketEvent extends BaseSocketEvent_1.BaseSocketEvent {
|
|
51
49
|
static schemas = {
|
|
52
50
|
input: exports.OrderActionsInputSchema,
|
|
@@ -73,12 +71,8 @@ class OrderActionsSocketEvent extends BaseSocketEvent_1.BaseSocketEvent {
|
|
|
73
71
|
});
|
|
74
72
|
super(enum_1.SocketEventType.ORDER_ACTIONS, OrderActionsSocketEvent.schemas, payload, undefined, socketNotificationEvent);
|
|
75
73
|
}
|
|
76
|
-
static identifier(input) {
|
|
77
|
-
return input.shopId.toString();
|
|
78
|
-
}
|
|
79
74
|
getIdentifier() {
|
|
80
|
-
|
|
81
|
-
return this.data.shopId.toString();
|
|
75
|
+
return 'default';
|
|
82
76
|
}
|
|
83
77
|
}
|
|
84
78
|
exports.OrderActionsSocketEvent = OrderActionsSocketEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-actions.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/order-actions.socket.event.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+DAAoE;AACpE,kDAA6F;AAC7F,wDAAqD;AACrD,uEAAoE;AAGpE,IAAY,WAIX;AAJD,WAAY,WAAW;IACtB,gCAAiB,CAAA;IACjB,wCAAyB,CAAA;IACzB,0CAA2B,CAAA;AAC5B,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAED,MAAM,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IAChC,GAAG,EAAE,0BAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;IACtC,IAAI,EAAE,0BAAa,CAAC,MAAM,CAAC,WAAW,CAAC;CACvC,CAAC,CAAC;AAEU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,GAAG,EAAE,0BAAa,CAAC,QAAQ,CAAC,UAAU,CAAC;IACvC,MAAM,EAAE,0BAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC;IACxC,OAAO,EAAE,0BAAa,CAAC,MAAM,CAAC,mBAAmB,CAAC;IAClD,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,0BAAa,CAAC,QAAQ,CAAC,yBAAkB,EAAE,QAAQ,CAAC;IACjE,WAAW,EAAE,0BAAa,CAAC,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC;IAC/D,aAAa,EAAE,0BAAa,CAAC,QAAQ,CAAC,oBAAa,EAAE,eAAe,CAAC;IACrE,sBAAsB,EAAE,0BAAa,CAAC,MAAM,CAAC,4BAA4B,EAAE;QAC1E,aAAa,EAAE,IAAI;KACnB,CAAC;IACF,eAAe,EAAE,OAAC,CAAC,MAAM,CAAC;QACzB,aAAa,EAAE,0BAAa,CAAC,QAAQ,CAAC,oBAAa,EAAE,eAAe,CAAC;QACrE,UAAU,EAAE,0BAAa,CAAC,MAAM,CAAC,YAAY,CAAC;QAC9C,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YACjB,KAAK,EAAE,0BAAa,CAAC,MAAM,CAAC,OAAO,CAAC;YACpC,cAAc,EAAE,0BAAa,CAAC,MAAM,CAAC,gBAAgB,CAAC;YACtD,UAAU,EAAE,0BAAa,CAAC,MAAM,CAAC,YAAY,CAAC;YAC9C,mBAAmB,EAAE,0BAAa,CAAC,MAAM,CAAC,qBAAqB,CAAC;YAChE,WAAW,EAAE,0BAAa,CAAC,MAAM,CAAC,aAAa,CAAC;YAChD,oBAAoB,EAAE,0BAAa,CAAC,MAAM,CAAC,sBAAsB,CAAC;YAClE,SAAS,EAAE,0BAAa,CAAC,MAAM,CAAC,UAAU,CAAC;YAC3C,kBAAkB,EAAE,0BAAa,CAAC,MAAM,CAAC,oBAAoB,CAAC;SAC9D,CAAC;KACF,CAAC;IACF,SAAS,EAAE,0BAAa,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC;IAC3D,SAAS,EAAE,0BAAa,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC;CAC1D,CAAC,CAAC;AAEU,QAAA,uBAAuB,GAAG,OAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"order-actions.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/order-actions.socket.event.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+DAAoE;AACpE,kDAA6F;AAC7F,wDAAqD;AACrD,uEAAoE;AAGpE,IAAY,WAIX;AAJD,WAAY,WAAW;IACtB,gCAAiB,CAAA;IACjB,wCAAyB,CAAA;IACzB,0CAA2B,CAAA;AAC5B,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAED,MAAM,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IAChC,GAAG,EAAE,0BAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;IACtC,IAAI,EAAE,0BAAa,CAAC,MAAM,CAAC,WAAW,CAAC;CACvC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B,CAAC;SAC9D,CAAC;KACF,CAAC;IACF,SAAS,EAAE,0BAAa,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC;IAC3D,SAAS,EAAE,0BAAa,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC;CAC1D,CAAC,CAAC;AAEU,QAAA,uBAAuB,GAAG,OAAC,CAAC,SAAS,EAAE,CAAC;AAKrD,MAAa,uBAAwB,SAAQ,iCAG5C;IACA,MAAM,CAAU,OAAO,GAAG;QACzB,KAAK,EAAE,+BAAuB;QAC9B,MAAM,EAAE,gCAAwB;KAChC,CAAC;IAGM,MAAM,CAAC,mBAAmB,CAAC,WAAwB;QAC1D,QAAQ,WAAW,EAAE,CAAC;YACrB,KAAK,WAAW,CAAC,MAAM;gBACtB,OAAO,YAAY,CAAC;YACrB,KAAK,WAAW,CAAC,UAAU;gBAC1B,OAAO,yBAAyB,CAAC;YAClC,KAAK,WAAW,CAAC,WAAW;gBAC3B,OAAO,yBAAyB,CAAC;YAClC;gBACC,OAAO,cAAc,CAAC;QACxB,CAAC;IACF,CAAC;IAED,YAAY,OAAmC;QAC9C,MAAM,OAAO,GAAG,uBAAuB,CAAC,mBAAmB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACjF,MAAM,uBAAuB,GAAG,IAAI,iDAAuB,CAAC;YAC3D,OAAO;YACP,gBAAgB,EAAE,sBAAe,CAAC,aAAa;YAC/C,GAAG,EAAE,OAAO,CAAC,GAAG;SAChB,CAAC,CAAC;QAEH,KAAK,CACJ,sBAAe,CAAC,aAAa,EAC7B,uBAAuB,CAAC,OAAO,EAC/B,OAAO,EACP,SAAS,EACT,uBAAuB,CACvB,CAAC;IACH,CAAC;IAES,aAAa;QACtB,OAAO,SAAS,CAAC;IAClB,CAAC;;AA1CF,0DA2CC","sourcesContent":["import { z } from 'zod';\nimport { DTO, ZodValidation } from '../../../utilities/validation/';\nimport { PaymentMethod, RegularOrderStatus, SocketEventType } from '../../../utilities/enum';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\nimport { SocketNotificationEvent } from './socketNotificationEvent';\nimport { EventFactory } from '../core';\n\nexport enum OrderAction {\n\tPLACED = 'placed',\n\tADJUSTMENT = 'adjustment',\n\tREPLACEMENT = 'replacement',\n}\n\nconst OrderUserSchema = z.object({\n\t_id: ZodValidation.objectId('User ID'),\n\tname: ZodValidation.string('User Name'),\n});\n\nexport const OrderActionsOutputSchema = z.object({\n\t_id: ZodValidation.objectId('Order ID'),\n\tshopId: ZodValidation.objectId('shopId'),\n\torderId: ZodValidation.string('Readable Order ID'),\n\tuser: OrderUserSchema,\n\torderStatus: ZodValidation.enumType(RegularOrderStatus, 'status'),\n\torderAction: ZodValidation.enumType(OrderAction, 'orderAction'),\n\tpaymentMethod: ZodValidation.enumType(PaymentMethod, 'paymentMethod'),\n\tpreparationTimeMinutes: ZodValidation.number('Preparation Time (minutes)', {\n\t\tisNonnegative: true,\n\t}),\n\tadjustedFinance: z.object({\n\t\tpaymentMethod: ZodValidation.enumType(PaymentMethod, 'paymentMethod'),\n\t\tshopProfit: ZodValidation.number('shopProfit'),\n\t\tpricing: z.object({\n\t\t\ttotal: ZodValidation.number('total'),\n\t\t\tsecondaryTotal: ZodValidation.number('secondaryTotal'),\n\t\t\tpaidAmount: ZodValidation.number('paidAmount'),\n\t\t\tsecondaryPaidAmount: ZodValidation.number('secondaryPaidAmount'),\n\t\t\tdeliveryFee: ZodValidation.number('deliveryFee'),\n\t\t\tsecondaryDeliveryFee: ZodValidation.number('secondaryDeliveryFee'),\n\t\t\triderTips: ZodValidation.number('riderTip'),\n\t\t\tsecondaryRiderTips: ZodValidation.number('secondaryRiderTips'),\n\t\t}),\n\t}),\n\tcreatedAt: ZodValidation.coerce.date('Order Creation Date'),\n\ttriggerAt: ZodValidation.coerce.date('Order Trigger Date'),\n});\n\nexport const OrderActionsInputSchema = z.undefined();\n\nexport type OrderActionSocketInputDTO = DTO<typeof OrderActionsInputSchema>;\nexport type OrderActionSocketOutputDTO = DTO<typeof OrderActionsOutputSchema>;\n\nexport class OrderActionsSocketEvent extends BaseSocketEvent<\n\ttypeof OrderActionsInputSchema,\n\ttypeof OrderActionsOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: OrderActionsInputSchema,\n\t\toutput: OrderActionsOutputSchema,\n\t};\n\n\t// Map each OrderAction to its message\n\tprivate static getMessageForAction(orderAction: OrderAction): string {\n\t\tswitch (orderAction) {\n\t\t\tcase OrderAction.PLACED:\n\t\t\t\treturn 'New Order!';\n\t\t\tcase OrderAction.ADJUSTMENT:\n\t\t\t\treturn 'Order has been adjusted';\n\t\t\tcase OrderAction.REPLACEMENT:\n\t\t\t\treturn 'Order has been replaced';\n\t\t\tdefault:\n\t\t\t\treturn 'Order update';\n\t\t}\n\t}\n\n\tconstructor(payload: OrderActionSocketOutputDTO) {\n\t\tconst message = OrderActionsSocketEvent.getMessageForAction(payload.orderAction);\n\t\tconst socketNotificationEvent = new SocketNotificationEvent({\n\t\t\tmessage,\n\t\t\tnotificationType: SocketEventType.ORDER_ACTIONS,\n\t\t\t_id: payload._id,\n\t\t});\n\n\t\tsuper(\n\t\t\tSocketEventType.ORDER_ACTIONS,\n\t\t\tOrderActionsSocketEvent.schemas,\n\t\t\tpayload,\n\t\t\tundefined,\n\t\t\tsocketNotificationEvent\n\t\t);\n\t}\n\n\tprotected getIdentifier(): string {\n\t\treturn 'default';\n\t}\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
|
@@ -5,14 +5,15 @@ exports.BaseCurrencyRoundTo = 0.01;
|
|
|
5
5
|
exports.SecondaryCurrencyRoundTo = 1000;
|
|
6
6
|
const roundCurrencySync = (amount, roundingFactor) => {
|
|
7
7
|
if (typeof amount !== 'number' ||
|
|
8
|
-
isNaN(amount) ||
|
|
8
|
+
Number.isNaN(amount) ||
|
|
9
9
|
typeof roundingFactor !== 'number' ||
|
|
10
10
|
roundingFactor <= 0 ||
|
|
11
11
|
amount === 0) {
|
|
12
12
|
return 0;
|
|
13
13
|
}
|
|
14
14
|
const decimals = (roundingFactor.toString().split('.')[1] || '').length;
|
|
15
|
-
const
|
|
15
|
+
const safeAmount = Number(amount.toFixed(decimals + 2));
|
|
16
|
+
const rounded = Math.round(safeAmount / roundingFactor) * roundingFactor;
|
|
16
17
|
return Number(rounded.toFixed(decimals));
|
|
17
18
|
};
|
|
18
19
|
exports.roundCurrencySync = roundCurrencySync;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"currency.js","sourceRoot":"/","sources":["utilities/shared/currency.ts"],"names":[],"mappings":";;;AACa,QAAA,mBAAmB,GAAG,IAAI,CAAC;AAC3B,QAAA,wBAAwB,GAAG,IAAI,CAAC;AAGtC,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAE,cAAsB,EAAU,EAAE;IACnF,IACC,OAAO,MAAM,KAAK,QAAQ;QAC1B,KAAK,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"currency.js","sourceRoot":"/","sources":["utilities/shared/currency.ts"],"names":[],"mappings":";;;AACa,QAAA,mBAAmB,GAAG,IAAI,CAAC;AAC3B,QAAA,wBAAwB,GAAG,IAAI,CAAC;AAGtC,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAE,cAAsB,EAAU,EAAE;IACnF,IACC,OAAO,MAAM,KAAK,QAAQ;QAC1B,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;QACpB,OAAO,cAAc,KAAK,QAAQ;QAClC,cAAc,IAAI,CAAC;QACnB,MAAM,KAAK,CAAC,EACX,CAAC;QACF,OAAO,CAAC,CAAC;IACV,CAAC;IAED,MAAM,QAAQ,GAAG,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;IAExE,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC;IACxD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,cAAc,CAAC,GAAG,cAAc,CAAC;IAEzE,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC1C,CAAC,CAAC;AAjBW,QAAA,iBAAiB,qBAiB5B;AAGK,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAU,EAAE;IAC3D,OAAO,IAAA,yBAAiB,EAAC,MAAM,EAAE,2BAAmB,CAAC,CAAC;AACvD,CAAC,CAAC;AAFW,QAAA,iBAAiB,qBAE5B;AAEK,MAAM,sBAAsB,GAAG,CAAC,MAAc,EAAU,EAAE;IAChE,OAAO,IAAA,yBAAiB,EAAC,MAAM,EAAE,gCAAwB,CAAC,CAAC;AAC5D,CAAC,CAAC;AAFW,QAAA,sBAAsB,0BAEjC","sourcesContent":["// === Currency Rounding Constants ===\nexport const BaseCurrencyRoundTo = 0.01;\nexport const SecondaryCurrencyRoundTo = 1000;\n\n// === Safely rounds a number to the nearest rounding unit ===\nexport const roundCurrencySync = (amount: number, roundingFactor: number): number => {\n\tif (\n\t\ttypeof amount !== 'number' ||\n\t\tNumber.isNaN(amount) ||\n\t\ttypeof roundingFactor !== 'number' ||\n\t\troundingFactor <= 0 ||\n\t\tamount === 0\n\t) {\n\t\treturn 0;\n\t}\n\n\tconst decimals = (roundingFactor.toString().split('.')[1] || '').length;\n\n\tconst safeAmount = Number(amount.toFixed(decimals + 2));\n\tconst rounded = Math.round(safeAmount / roundingFactor) * roundingFactor;\n\n\treturn Number(rounded.toFixed(decimals));\n};\n\n// === Specific rounding functions for base and secondary currencies ===\nexport const roundBaseCurrency = (amount: number): number => {\n\treturn roundCurrencySync(amount, BaseCurrencyRoundTo);\n};\n\nexport const roundSecondaryCurrency = (amount: number): number => {\n\treturn roundCurrencySync(amount, SecondaryCurrencyRoundTo);\n};\n"]}
|
|
@@ -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
|
}>>;
|
|
@@ -733,12 +733,12 @@ export declare const GetByIdInputSchema: z.ZodObject<{
|
|
|
733
733
|
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
|
|
734
734
|
}, "strip", z.ZodTypeAny, {
|
|
735
735
|
_id: import("mongoose").Types.ObjectId;
|
|
736
|
-
populate?: any;
|
|
737
736
|
select?: Record<string, 0 | 1> | undefined;
|
|
737
|
+
populate?: any;
|
|
738
738
|
}, {
|
|
739
739
|
_id: string | import("mongoose").Types.ObjectId;
|
|
740
|
-
populate?: any;
|
|
741
740
|
select?: Record<string, 0 | 1> | undefined;
|
|
741
|
+
populate?: any;
|
|
742
742
|
}>;
|
|
743
743
|
export type GetByIdInputDTO = DTO<typeof GetByIdInputSchema>;
|
|
744
744
|
export declare const GetProductByIdInputSchema: z.ZodObject<{
|
|
@@ -751,12 +751,12 @@ export declare const GetProductByIdInputSchema: z.ZodObject<{
|
|
|
751
751
|
_id: import("mongoose").Types.ObjectId;
|
|
752
752
|
withAttributeHiddenItems: boolean;
|
|
753
753
|
withAddonsHiddenItems: boolean;
|
|
754
|
-
populate?: any;
|
|
755
754
|
select?: Record<string, 0 | 1> | undefined;
|
|
755
|
+
populate?: any;
|
|
756
756
|
}, {
|
|
757
757
|
_id: string | import("mongoose").Types.ObjectId;
|
|
758
|
-
populate?: any;
|
|
759
758
|
select?: Record<string, 0 | 1> | undefined;
|
|
759
|
+
populate?: any;
|
|
760
760
|
withAttributeHiddenItems?: boolean | undefined;
|
|
761
761
|
withAddonsHiddenItems?: boolean | undefined;
|
|
762
762
|
}>;
|
|
@@ -768,13 +768,13 @@ export declare const GetOrderByIdInputSchema: z.ZodObject<{
|
|
|
768
768
|
userOrderCompletionScope: z.ZodOptional<z.ZodNativeEnum<typeof UserOrderCompletionScope>>;
|
|
769
769
|
}, "strip", z.ZodTypeAny, {
|
|
770
770
|
_id: import("mongoose").Types.ObjectId;
|
|
771
|
-
populate?: any;
|
|
772
771
|
select?: Record<string, 0 | 1> | undefined;
|
|
772
|
+
populate?: any;
|
|
773
773
|
userOrderCompletionScope?: UserOrderCompletionScope | undefined;
|
|
774
774
|
}, {
|
|
775
775
|
_id: string | import("mongoose").Types.ObjectId;
|
|
776
|
-
populate?: any;
|
|
777
776
|
select?: Record<string, 0 | 1> | undefined;
|
|
777
|
+
populate?: any;
|
|
778
778
|
userOrderCompletionScope?: UserOrderCompletionScope | undefined;
|
|
779
779
|
}>;
|
|
780
780
|
export type GetOrderByIdInputDTO = DTO<typeof GetOrderByIdInputSchema>;
|
|
@@ -782,11 +782,11 @@ export declare const GetByTokenInputSchema: z.ZodOptional<z.ZodObject<{
|
|
|
782
782
|
select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
|
|
783
783
|
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
|
|
784
784
|
}, "strip", z.ZodTypeAny, {
|
|
785
|
-
populate?: any;
|
|
786
785
|
select?: Record<string, 0 | 1> | undefined;
|
|
787
|
-
}, {
|
|
788
786
|
populate?: any;
|
|
787
|
+
}, {
|
|
789
788
|
select?: Record<string, 0 | 1> | undefined;
|
|
789
|
+
populate?: any;
|
|
790
790
|
}>>;
|
|
791
791
|
export type GetByTokenInputDTO = DTO<typeof GetByTokenInputSchema>;
|
|
792
792
|
export declare const GetOneQuerySchema: z.ZodObject<{
|
|
@@ -794,12 +794,12 @@ export declare const GetOneQuerySchema: z.ZodObject<{
|
|
|
794
794
|
select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
|
|
795
795
|
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
|
|
796
796
|
}, "strip", z.ZodTypeAny, {
|
|
797
|
-
populate?: any;
|
|
798
797
|
select?: Record<string, 0 | 1> | undefined;
|
|
798
|
+
populate?: any;
|
|
799
799
|
query?: Record<string, any> | undefined;
|
|
800
800
|
}, {
|
|
801
|
-
populate?: any;
|
|
802
801
|
select?: Record<string, 0 | 1> | undefined;
|
|
802
|
+
populate?: any;
|
|
803
803
|
query?: Record<string, any> | undefined;
|
|
804
804
|
}>;
|
|
805
805
|
export type GetOneQueryDTO = DTO<typeof GetOneQuerySchema>;
|
|
@@ -5,14 +5,15 @@ exports.BaseCurrencyRoundTo = 0.01;
|
|
|
5
5
|
exports.SecondaryCurrencyRoundTo = 1000;
|
|
6
6
|
const roundCurrencySync = (amount, roundingFactor) => {
|
|
7
7
|
if (typeof amount !== 'number' ||
|
|
8
|
-
isNaN(amount) ||
|
|
8
|
+
Number.isNaN(amount) ||
|
|
9
9
|
typeof roundingFactor !== 'number' ||
|
|
10
10
|
roundingFactor <= 0 ||
|
|
11
11
|
amount === 0) {
|
|
12
12
|
return 0;
|
|
13
13
|
}
|
|
14
14
|
const decimals = (roundingFactor.toString().split('.')[1] || '').length;
|
|
15
|
-
const
|
|
15
|
+
const safeAmount = Number(amount.toFixed(decimals + 2));
|
|
16
|
+
const rounded = Math.round(safeAmount / roundingFactor) * roundingFactor;
|
|
16
17
|
return Number(rounded.toFixed(decimals));
|
|
17
18
|
};
|
|
18
19
|
exports.roundCurrencySync = roundCurrencySync;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"currency.js","sourceRoot":"/","sources":["utilities/shared/currency.ts"],"names":[],"mappings":";;;AACa,QAAA,mBAAmB,GAAG,IAAI,CAAC;AAC3B,QAAA,wBAAwB,GAAG,IAAI,CAAC;AAGtC,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAE,cAAsB,EAAU,EAAE;IACnF,IACC,OAAO,MAAM,KAAK,QAAQ;QAC1B,KAAK,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"currency.js","sourceRoot":"/","sources":["utilities/shared/currency.ts"],"names":[],"mappings":";;;AACa,QAAA,mBAAmB,GAAG,IAAI,CAAC;AAC3B,QAAA,wBAAwB,GAAG,IAAI,CAAC;AAGtC,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAE,cAAsB,EAAU,EAAE;IACnF,IACC,OAAO,MAAM,KAAK,QAAQ;QAC1B,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;QACpB,OAAO,cAAc,KAAK,QAAQ;QAClC,cAAc,IAAI,CAAC;QACnB,MAAM,KAAK,CAAC,EACX,CAAC;QACF,OAAO,CAAC,CAAC;IACV,CAAC;IAED,MAAM,QAAQ,GAAG,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;IAExE,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC;IACxD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,cAAc,CAAC,GAAG,cAAc,CAAC;IAEzE,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC1C,CAAC,CAAC;AAjBW,QAAA,iBAAiB,qBAiB5B;AAGK,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAU,EAAE;IAC3D,OAAO,IAAA,yBAAiB,EAAC,MAAM,EAAE,2BAAmB,CAAC,CAAC;AACvD,CAAC,CAAC;AAFW,QAAA,iBAAiB,qBAE5B;AAEK,MAAM,sBAAsB,GAAG,CAAC,MAAc,EAAU,EAAE;IAChE,OAAO,IAAA,yBAAiB,EAAC,MAAM,EAAE,gCAAwB,CAAC,CAAC;AAC5D,CAAC,CAAC;AAFW,QAAA,sBAAsB,0BAEjC","sourcesContent":["// === Currency Rounding Constants ===\nexport const BaseCurrencyRoundTo = 0.01;\nexport const SecondaryCurrencyRoundTo = 1000;\n\n// === Safely rounds a number to the nearest rounding unit ===\nexport const roundCurrencySync = (amount: number, roundingFactor: number): number => {\n\tif (\n\t\ttypeof amount !== 'number' ||\n\t\tNumber.isNaN(amount) ||\n\t\ttypeof roundingFactor !== 'number' ||\n\t\troundingFactor <= 0 ||\n\t\tamount === 0\n\t) {\n\t\treturn 0;\n\t}\n\n\tconst decimals = (roundingFactor.toString().split('.')[1] || '').length;\n\n\tconst safeAmount = Number(amount.toFixed(decimals + 2));\n\tconst rounded = Math.round(safeAmount / roundingFactor) * roundingFactor;\n\n\treturn Number(rounded.toFixed(decimals));\n};\n\n// === Specific rounding functions for base and secondary currencies ===\nexport const roundBaseCurrency = (amount: number): number => {\n\treturn roundCurrencySync(amount, BaseCurrencyRoundTo);\n};\n\nexport const roundSecondaryCurrency = (amount: number): number => {\n\treturn roundCurrencySync(amount, SecondaryCurrencyRoundTo);\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyxa.ai/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.122",
|
|
4
4
|
"description": "The Core system of the Lyxa services.",
|
|
5
5
|
"author": "elie <42282499+Internalizable@users.noreply.github.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"@types/twilio": "^3.19.3",
|
|
31
31
|
"amqplib": "^0.10.5",
|
|
32
32
|
"bcryptjs": "^3.0.2",
|
|
33
|
-
"bullmq": "5.
|
|
33
|
+
"bullmq": "^5.56.0",
|
|
34
34
|
"dayjs": "^1.11.13",
|
|
35
35
|
"file-type": "^21.0.0",
|
|
36
36
|
"firebase": "^11.1.0",
|
|
37
37
|
"firebase-admin": "^13.0.1",
|
|
38
|
-
"ioredis": "5.
|
|
38
|
+
"ioredis": "^5.4.1",
|
|
39
39
|
"jsonwebtoken": "^9.0.2",
|
|
40
40
|
"libphonenumber-js": "^1.12.8",
|
|
41
41
|
"mime-types": "^3.0.1",
|