@lyxa.ai/core 1.3.229 → 1.3.231
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/adjustment-information.model.d.ts +3 -0
- package/dist/libraries/mongo/models/embedded/adjustment-information.model.js +11 -0
- package/dist/libraries/mongo/models/embedded/adjustment-information.model.js.map +1 -1
- package/dist/libraries/mongo/models/line-item.model.d.ts +2 -0
- package/dist/libraries/mongo/models/line-item.model.js +10 -0
- package/dist/libraries/mongo/models/line-item.model.js.map +1 -1
- package/dist/libraries/socket/connections/presence.d.ts +1 -0
- package/dist/libraries/socket/connections/presence.js +10 -0
- package/dist/libraries/socket/connections/presence.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
|
@@ -3,10 +3,13 @@ import { AdjustmentReason, AdjustmentStatus, AdjustmentType } from '../../../../
|
|
|
3
3
|
import { Product } from '../product.model';
|
|
4
4
|
import { LineItem } from '../line-item.model';
|
|
5
5
|
import { Admin } from '../admin.model';
|
|
6
|
+
import { LineItemAttribute } from './line-item-attribute.model';
|
|
6
7
|
export declare class AdjustedLineItem {
|
|
7
8
|
lineItem: Ref<LineItem>;
|
|
8
9
|
note?: string;
|
|
9
10
|
adjustmentStatus?: AdjustmentStatus;
|
|
11
|
+
isAttributeAdjustedOnly?: boolean;
|
|
12
|
+
adjustedAttributes?: LineItemAttribute[][];
|
|
10
13
|
adjustedQuantity?: number;
|
|
11
14
|
}
|
|
12
15
|
export declare class AdjustmentInformation {
|
|
@@ -15,10 +15,13 @@ const enum_1 = require("../../../../utilities/enum");
|
|
|
15
15
|
const line_item_model_1 = require("../line-item.model");
|
|
16
16
|
const admin_model_1 = require("../admin.model");
|
|
17
17
|
const mongoose_1 = require("mongoose");
|
|
18
|
+
const line_item_attribute_model_1 = require("./line-item-attribute.model");
|
|
18
19
|
class AdjustedLineItem {
|
|
19
20
|
lineItem;
|
|
20
21
|
note;
|
|
21
22
|
adjustmentStatus;
|
|
23
|
+
isAttributeAdjustedOnly;
|
|
24
|
+
adjustedAttributes;
|
|
22
25
|
adjustedQuantity;
|
|
23
26
|
}
|
|
24
27
|
exports.AdjustedLineItem = AdjustedLineItem;
|
|
@@ -34,6 +37,14 @@ __decorate([
|
|
|
34
37
|
(0, typegoose_1.prop)({ type: String, enum: enum_1.AdjustmentStatus }),
|
|
35
38
|
__metadata("design:type", String)
|
|
36
39
|
], AdjustedLineItem.prototype, "adjustmentStatus", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
42
|
+
__metadata("design:type", Boolean)
|
|
43
|
+
], AdjustedLineItem.prototype, "isAttributeAdjustedOnly", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typegoose_1.prop)({ type: () => [[line_item_attribute_model_1.LineItemAttribute]], default: [] }),
|
|
46
|
+
__metadata("design:type", Array)
|
|
47
|
+
], AdjustedLineItem.prototype, "adjustedAttributes", void 0);
|
|
37
48
|
__decorate([
|
|
38
49
|
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
39
50
|
__metadata("design:type", Number)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adjustment-information.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/adjustment-information.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2D;AAC3D,qDAAgG;AAEhG,wDAA8C;AAC9C,gDAAuC;AACvC,uCAAiC;
|
|
1
|
+
{"version":3,"file":"adjustment-information.model.js","sourceRoot":"/","sources":["libraries/mongo/models/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;;4DACR;AAGvC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;yDACX;AAGpC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC;8BACvB,IAAI;oDAAC;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAc,EAAE,CAAC;;yDACN;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wDACT;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;gDACD","sourcesContent":["import { prop, PropType, Ref } from '@typegoose/typegoose';\nimport { AdjustmentReason, AdjustmentStatus, AdjustmentType } from '../../../../utilities/enum';\nimport { Product } from '../product.model';\nimport { LineItem } from '../line-item.model';\nimport { Admin } from '../admin.model';\nimport { Types } from 'mongoose';\nimport { LineItemAttribute } from './line-item-attribute.model';\n\nexport class AdjustedLineItem {\n\t@prop({ required: true, ref: () => LineItem })\n\tpublic lineItem!: Ref<LineItem>;\n\n\t@prop({ type: String, maxlength: 150 })\n\tpublic note?: string;\n\n\t@prop({ type: String, enum: AdjustmentStatus })\n\tpublic adjustmentStatus?: AdjustmentStatus;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAttributeAdjustedOnly?: boolean;\n\n\t@prop({ type: () => [[LineItemAttribute]], default: [] })\n\tpublic adjustedAttributes?: LineItemAttribute[][];\n\n\t@prop({ type: Number, default: 0 })\n\tpublic adjustedQuantity?: number;\n}\n\nexport class AdjustmentInformation {\n\t@prop({ type: String, enum: AdjustmentReason })\n\tpublic reason?: AdjustmentReason;\n\n\t@prop({ type: () => [Types.ObjectId] }, PropType.MAP)\n\tpublic suggestedProduct?: Map<string, Ref<Product>[]>;\n\n\t@prop({ type: () => [AdjustedLineItem], default: [] })\n\tpublic adjustedLineItems?: AdjustedLineItem[];\n\n\t@prop({ type: Date, default: () => new Date() })\n\tpublic requestedAt?: Date;\n\n\t@prop({ type: () => Date })\n\tpublic resolvedAt?: Date;\n\n\t@prop({ ref: () => Admin })\n\tpublic admin?: Ref<Admin>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isRequestByShop?: boolean;\n}\n\nexport class AdjustmentHistory {\n\t@prop({ type: () => [Types.ObjectId] }, PropType.MAP)\n\tpublic suggestedProduct?: Map<string, Ref<Product>[]>;\n\n\t@prop({ type: () => [AdjustedLineItem], default: [] })\n\tpublic adjustedLineItems?: AdjustedLineItem[];\n\n\t@prop({ type: () => [AdjustedLineItem], default: [] })\n\tpublic addedLineItems?: AdjustedLineItem[];\n\n\t@prop({ type: Date, default: new Date() })\n\tpublic timestamp?: Date;\n\n\t@prop({ type: String, enum: AdjustmentType })\n\tpublic adjustmentType?: AdjustmentType;\n\n\t@prop({ required: true, type: String })\n\tpublic adjustmentRef!: string;\n\n\t@prop({ ref: () => Admin })\n\tpublic admin?: Ref<Admin>;\n}\n"]}
|
|
@@ -34,6 +34,8 @@ export declare class LineItem extends TimeStamps {
|
|
|
34
34
|
calculationSnap?: Record<string, unknown>;
|
|
35
35
|
isAdjusted?: boolean;
|
|
36
36
|
isPartialAdjusted?: boolean;
|
|
37
|
+
isAttributeAdjustedOnly?: boolean;
|
|
38
|
+
adjustedAttributes?: LineItemAttribute[][];
|
|
37
39
|
adjustedQuantity?: number;
|
|
38
40
|
isB1G1?: boolean;
|
|
39
41
|
adjustReason?: string;
|
|
@@ -46,6 +46,8 @@ let LineItem = class LineItem extends defaultClasses_1.TimeStamps {
|
|
|
46
46
|
calculationSnap;
|
|
47
47
|
isAdjusted;
|
|
48
48
|
isPartialAdjusted;
|
|
49
|
+
isAttributeAdjustedOnly;
|
|
50
|
+
adjustedAttributes;
|
|
49
51
|
adjustedQuantity;
|
|
50
52
|
isB1G1;
|
|
51
53
|
adjustReason;
|
|
@@ -136,6 +138,14 @@ __decorate([
|
|
|
136
138
|
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
137
139
|
__metadata("design:type", Boolean)
|
|
138
140
|
], LineItem.prototype, "isPartialAdjusted", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
143
|
+
__metadata("design:type", Boolean)
|
|
144
|
+
], LineItem.prototype, "isAttributeAdjustedOnly", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
(0, typegoose_1.prop)({ type: () => [[line_item_attribute_model_1.LineItemAttribute]], default: [] }),
|
|
147
|
+
__metadata("design:type", Array)
|
|
148
|
+
], LineItem.prototype, "adjustedAttributes", void 0);
|
|
139
149
|
__decorate([
|
|
140
150
|
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
141
151
|
__metadata("design:type", Number)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-item.model.js","sourceRoot":"/","sources":["libraries/mongo/models/line-item.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0F;AAC1F,4EAAqE;AACrE,6CAAoC;AACpC,mDAA0C;AAC1C,4EAAuE;AACvE,kDAAgE;AAChE,oFAAyE;AACzE,6CAAoC;AACpC,6CAAoC;AACpC,iDAAwC;AACxC,qDAA4C;AAC5C,uDAA8C;AAC9C,sEAA4D;AAC5D,qEAA2D;AAC3D,uEAA6D;AAqBtD,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,2BAAU;IAEhC,IAAI,CAAa;IAGjB,IAAI,CAAa;IAGjB,IAAI,CAAa;IAGjB,MAAM,CAAe;IAGrB,QAAQ,CAAY;IAGpB,QAAQ,CAAiB;IAGzB,OAAO,CAAgB;IAGvB,WAAW,CAAe;IAG1B,UAAU,CAAW;IAGrB,UAAU,CAAoB;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,EAAE,CAAC;KAC9C,CAAC;;iDAC4C;mBA/FlC,QAAQ;IAhBpB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE;YACd,UAAU,EAAE,WAAW;YACvB,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC1B,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;SAC5B;QACD,OAAO,EAAE;YACR,UAAU,EAAE,oBAAQ,CAAC,KAAK;SAC1B;KACD,CAAC;IACD,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAClB,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAC3B,IAAA,iBAAK,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACrB,IAAA,iBAAK,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;IAC1B,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAChC,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;GACpB,QAAQ,CAgGpB","sourcesContent":["import { prop, Ref, index, modelOptions, Severity, mongoose } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Cart } from './cart.model';\nimport { Product } from './product.model';\nimport { OrderPriceBreakdown } from './embedded/price-breakdown.model';\nimport { ItemType, PriceOption } from '../../../utilities/enum';\nimport { LineItemAttribute } from './embedded/line-item-attribute.model';\nimport { User } from './user.model';\nimport { Shop } from './shop.model';\nimport { Parent } from './parent.model';\nimport { Category } from './category.model';\nimport { Marketing } from './marketing.model';\nimport { ProductSnap } from './embedded/product-snap.model';\nimport { CartParticipant } from './cart-participant.model';\nimport { ProductMarketing } from './product-marketing.model';\n\n/**\n * LineItem model - Represents individual items in a cart\n */\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'lineItems',\n\t\ttoJSON: { virtuals: true },\n\t\ttoObject: { virtuals: true },\n\t},\n\toptions: {\n\t\tallowMixed: Severity.ALLOW,\n\t},\n})\n@index({ cart: 1 })\n@index({ cart: 1, user: 1 })\n@index({ product: 1 })\n@index({ lineItemHash: 1 })\n@index({ shop: 1, deletedAt: 1 })\n@index({ shop: 1, createdAt: 1 })\nexport class LineItem extends TimeStamps {\n\t@prop({ required: true, ref: () => Cart })\n\tpublic cart!: Ref<Cart>;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, ref: () => Parent })\n\tpublic parent!: Ref<Parent>;\n\n\t@prop({ required: true, type: String, enum: ItemType })\n\tpublic itemType!: ItemType;\n\n\t@prop({ required: true, ref: () => Category })\n\tpublic category!: Ref<Category>;\n\n\t@prop({ required: true, ref: () => Product })\n\tpublic product!: Ref<Product>;\n\n\t@prop({ type: ProductSnap, _id: false })\n\tpublic productSnap?: ProductSnap;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isStockOut?: boolean;\n\n\t@prop({ ref: () => Marketing, default: [] })\n\tpublic marketings?: Ref<Marketing>[];\n\n\t@prop({ ref: () => ProductMarketing, default: [] })\n\tpublic productMarketings?: Ref<ProductMarketing>[];\n\n\t@prop({ min: 1, default: 1 })\n\tpublic quantity?: number;\n\n\t@prop({ type: String, enum: PriceOption, default: PriceOption.SINGLE_PRICE, _id: false })\n\tpublic priceOption?: PriceOption;\n\n\t@prop({ required: true, type: OrderPriceBreakdown, _id: false })\n\tpublic priceBreakdown!: OrderPriceBreakdown;\n\n\t@prop({ type: () => [[LineItemAttribute]], default: [] })\n\tpublic attributes?: LineItemAttribute[][];\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic removedIngredients?: string[];\n\n\t@prop({ type: String })\n\tpublic specialInstructions?: string;\n\n\t@prop({ type: mongoose.Schema.Types.Mixed, _id: false })\n\tpublic calculationSnap?: Record<string, unknown>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAdjusted?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isPartialAdjusted?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAttributeAdjustedOnly?: boolean;\n\n\t@prop({ type: () => [[LineItemAttribute]], default: [] })\n\tpublic adjustedAttributes?: LineItemAttribute[][];\n\n\t@prop({ type: Number, default: 0 })\n\tpublic adjustedQuantity?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isB1G1?: boolean;\n\n\t@prop({ type: String })\n\tpublic adjustReason?: string;\n\n\t@prop({ type: String, select: false })\n\tpublic lineItemHash?: string;\n\n\t@prop({ type: String, select: false })\n\tpublic adjustmentRef?: string;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isSkipped?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAddedAfterAdjustmentReq?: boolean;\n\n\t@prop({\n\t\tref: () => CartParticipant,\n\t\tforeignField: 'cart',\n\t\tlocalField: 'cart',\n\t\tjustOne: true,\n\t\tmatch: (doc: LineItem) => ({ user: doc.user }),\n\t})\n\tpublic cartParticipant?: Ref<CartParticipant>;\n}\n"]}
|
|
@@ -2,4 +2,5 @@ import { AuthEntityType } from '../../auth';
|
|
|
2
2
|
export declare function setUserOnline(userId: string, type: AuthEntityType, timestamp?: number): Promise<void>;
|
|
3
3
|
export declare function setUserOffline(userId: string, type: AuthEntityType): Promise<void>;
|
|
4
4
|
export declare function getOnlineUsers(type: AuthEntityType, page?: number, pageSize?: number): Promise<string[]>;
|
|
5
|
+
export declare function getOnlineUsersCount(type: AuthEntityType, activeWindowMs?: number): Promise<number>;
|
|
5
6
|
export declare function isUserOnline(userId: string, type: AuthEntityType): Promise<boolean>;
|
|
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.setUserOnline = setUserOnline;
|
|
4
4
|
exports.setUserOffline = setUserOffline;
|
|
5
5
|
exports.getOnlineUsers = getOnlineUsers;
|
|
6
|
+
exports.getOnlineUsersCount = getOnlineUsersCount;
|
|
6
7
|
exports.isUserOnline = isUserOnline;
|
|
7
8
|
const __1 = require("../../..");
|
|
9
|
+
const dayjs_1 = require("../../../utilities/dayjs");
|
|
8
10
|
const keys_1 = require("./keys");
|
|
9
11
|
async function setUserOnline(userId, type, timestamp = Date.now()) {
|
|
10
12
|
const redis = (0, __1.getLibraries)().getRedisService().redisClient;
|
|
@@ -21,6 +23,14 @@ async function getOnlineUsers(type, page = 1, pageSize = 100) {
|
|
|
21
23
|
const end = start + pageSize - 1;
|
|
22
24
|
return await redis.zrange(zsetKey, start, end);
|
|
23
25
|
}
|
|
26
|
+
async function getOnlineUsersCount(type, activeWindowMs = 60000) {
|
|
27
|
+
const redis = (0, __1.getLibraries)().getRedisService().redisClient;
|
|
28
|
+
const zsetKey = (0, keys_1.kOnlineEntities)(type);
|
|
29
|
+
const now = (0, dayjs_1.dayjs)().valueOf();
|
|
30
|
+
const min = now - activeWindowMs;
|
|
31
|
+
await redis.zremrangebyscore(zsetKey, 0, min);
|
|
32
|
+
return await redis.zcount(zsetKey, min, now);
|
|
33
|
+
}
|
|
24
34
|
async function isUserOnline(userId, type) {
|
|
25
35
|
const redis = (0, __1.getLibraries)().getRedisService().redisClient;
|
|
26
36
|
const score = await redis.zscore((0, keys_1.kOnlineEntities)(type), userId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presence.js","sourceRoot":"/","sources":["libraries/socket/connections/presence.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"presence.js","sourceRoot":"/","sources":["libraries/socket/connections/presence.ts"],"names":[],"mappings":";;AASA,sCAGC;AAKD,wCAGC;AAKD,wCAUC;AAED,kDAaC;AAED,oCAIC;AAxDD,gCAAwC;AACxC,oDAAiD;AAEjD,iCAAyC;AAMlC,KAAK,UAAU,aAAa,CAA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G,GAAG,GAAG,cAAc,CAAC;IAEjC,MAAM,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;IAE9C,OAAO,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC9C,CAAC;AAEM,KAAK,UAAU,YAAY,CAAC,MAAc,EAAE,IAAoB;IACtE,MAAM,KAAK,GAAG,IAAA,gBAAY,GAAE,CAAC,eAAe,EAAE,CAAC,WAAoB,CAAC;IACpE,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,IAAA,sBAAe,EAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;IAChE,OAAO,KAAK,KAAK,IAAI,CAAC;AACvB,CAAC","sourcesContent":["import { getLibraries } from '../../..';\nimport { dayjs } from '../../../utilities/dayjs';\nimport { AuthEntityType } from '../../auth';\nimport { kOnlineEntities } from './keys';\nimport type { Redis } from 'ioredis';\n\n/**\n * Add or update a user as online in the type-based ZSET.\n */\nexport async function setUserOnline(userId: string, type: AuthEntityType, timestamp: number = Date.now()) {\n\tconst redis = getLibraries().getRedisService().redisClient as Redis;\n\tawait redis.zadd(kOnlineEntities(type), timestamp, userId);\n}\n\n/**\n * Remove a user from the type-based online ZSET (on disconnect).\n */\nexport async function setUserOffline(userId: string, type: AuthEntityType) {\n\tconst redis = getLibraries().getRedisService().redisClient as Redis;\n\tawait redis.zrem(kOnlineEntities(type), userId);\n}\n\n/**\n * Paginate online users for a given entity type (deep pagination, scalable).\n */\nexport async function getOnlineUsers(\n\ttype: AuthEntityType,\n\tpage: number = 1,\n\tpageSize: number = 100\n): Promise<string[]> {\n\tconst redis = getLibraries().getRedisService().redisClient as Redis;\n\tconst zsetKey = kOnlineEntities(type);\n\tconst start = (page - 1) * pageSize;\n\tconst end = start + pageSize - 1;\n\treturn await redis.zrange(zsetKey, start, end);\n}\n\nexport async function getOnlineUsersCount(\n\ttype: AuthEntityType,\n\tactiveWindowMs: number = 60000\n): Promise<number> {\n\tconst redis = getLibraries().getRedisService().redisClient as Redis;\n\tconst zsetKey = kOnlineEntities(type);\n\n\tconst now = dayjs().valueOf();\n\tconst min = now - activeWindowMs;\n\n\tawait redis.zremrangebyscore(zsetKey, 0, min);\n\n\treturn await redis.zcount(zsetKey, min, now);\n}\n\nexport async function isUserOnline(userId: string, type: AuthEntityType): Promise<boolean> {\n\tconst redis = getLibraries().getRedisService().redisClient as Redis;\n\tconst score = await redis.zscore(kOnlineEntities(type), userId);\n\treturn score !== null;\n}\n\n/**\n * Example usage:\n *\n * import { getConnectedEntityByType } from './type-queries';\n *\n * // For entity type 'user', get page 2, 100 per page:\n * const users = await getConnectedEntityByType('user', 2, 100);\n */\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;
|
|
8
9
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
9
10
|
tokenType: TokenType | undefined;
|
|
10
11
|
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;
|
|
7
8
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
8
9
|
tokenType: import("../../auth").TokenType | undefined;
|
|
9
10
|
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;
|
|
6
7
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
7
8
|
tokenType: import("../../auth").TokenType | undefined;
|
|
8
9
|
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;
|
|
8
9
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
9
10
|
tokenType: TokenType | undefined;
|
|
10
11
|
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
|
-
select?: Record<string, 0 | 1> | undefined;
|
|
30
29
|
populate?: any;
|
|
30
|
+
select?: Record<string, 0 | 1> | undefined;
|
|
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
|
-
select?: Record<string, 0 | 1> | undefined;
|
|
40
39
|
populate?: any;
|
|
40
|
+
select?: Record<string, 0 | 1> | undefined;
|
|
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
|
-
select?: Record<string, 0 | 1> | undefined;
|
|
737
736
|
populate?: any;
|
|
737
|
+
select?: Record<string, 0 | 1> | undefined;
|
|
738
738
|
}, {
|
|
739
739
|
_id: string | import("mongoose").Types.ObjectId;
|
|
740
|
-
select?: Record<string, 0 | 1> | undefined;
|
|
741
740
|
populate?: any;
|
|
741
|
+
select?: Record<string, 0 | 1> | undefined;
|
|
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
|
-
select?: Record<string, 0 | 1> | undefined;
|
|
755
754
|
populate?: any;
|
|
755
|
+
select?: Record<string, 0 | 1> | undefined;
|
|
756
756
|
}, {
|
|
757
757
|
_id: string | import("mongoose").Types.ObjectId;
|
|
758
|
-
select?: Record<string, 0 | 1> | undefined;
|
|
759
758
|
populate?: any;
|
|
759
|
+
select?: Record<string, 0 | 1> | undefined;
|
|
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
|
-
select?: Record<string, 0 | 1> | undefined;
|
|
772
771
|
populate?: any;
|
|
772
|
+
select?: Record<string, 0 | 1> | undefined;
|
|
773
773
|
userOrderCompletionScope?: UserOrderCompletionScope | undefined;
|
|
774
774
|
}, {
|
|
775
775
|
_id: string | import("mongoose").Types.ObjectId;
|
|
776
|
-
select?: Record<string, 0 | 1> | undefined;
|
|
777
776
|
populate?: any;
|
|
777
|
+
select?: Record<string, 0 | 1> | undefined;
|
|
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
|
-
select?: Record<string, 0 | 1> | undefined;
|
|
786
785
|
populate?: any;
|
|
787
|
-
}, {
|
|
788
786
|
select?: Record<string, 0 | 1> | undefined;
|
|
787
|
+
}, {
|
|
789
788
|
populate?: any;
|
|
789
|
+
select?: Record<string, 0 | 1> | undefined;
|
|
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
|
-
select?: Record<string, 0 | 1> | undefined;
|
|
798
797
|
populate?: any;
|
|
798
|
+
select?: Record<string, 0 | 1> | undefined;
|
|
799
799
|
query?: Record<string, any> | undefined;
|
|
800
800
|
}, {
|
|
801
|
-
select?: Record<string, 0 | 1> | undefined;
|
|
802
801
|
populate?: any;
|
|
802
|
+
select?: Record<string, 0 | 1> | undefined;
|
|
803
803
|
query?: Record<string, any> | undefined;
|
|
804
804
|
}>;
|
|
805
805
|
export type GetOneQueryDTO = DTO<typeof GetOneQuerySchema>;
|