@lyxa.ai/core 1.4.43 → 1.4.45
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/cart-participant.model.d.ts +2 -0
- package/dist/libraries/mongo/models/cart-participant.model.js +6 -0
- package/dist/libraries/mongo/models/cart-participant.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/order-finance.model.d.ts +3 -0
- package/dist/libraries/mongo/models/embedded/order-finance.model.js +6 -0
- package/dist/libraries/mongo/models/embedded/order-finance.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/payment-record.model.d.ts +2 -2
- package/dist/libraries/mongo/models/embedded/payment-record.model.js +10 -10
- package/dist/libraries/mongo/models/embedded/payment-record.model.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
|
@@ -7,6 +7,7 @@ import { RegularOrderPricing } from './embedded/order-pricing.model';
|
|
|
7
7
|
import { CartStatus } from '../../../utilities/enum';
|
|
8
8
|
import { Shop } from './shop.model';
|
|
9
9
|
import { PaymentRecord } from './embedded/payment-record.model';
|
|
10
|
+
import { Card } from './card.model';
|
|
10
11
|
export declare class CartParticipant extends TimeStamps {
|
|
11
12
|
cart: Ref<Cart>;
|
|
12
13
|
user: Ref<User>;
|
|
@@ -16,6 +17,7 @@ export declare class CartParticipant extends TimeStamps {
|
|
|
16
17
|
spentAmount: number;
|
|
17
18
|
secondarySpentAmount: number;
|
|
18
19
|
paymentInformation?: PaymentInformation;
|
|
20
|
+
card?: Ref<Card>;
|
|
19
21
|
paymentRecords?: PaymentRecord[];
|
|
20
22
|
isCreator: boolean;
|
|
21
23
|
name: string;
|
|
@@ -19,6 +19,7 @@ const order_pricing_model_1 = require("./embedded/order-pricing.model");
|
|
|
19
19
|
const enum_1 = require("../../../utilities/enum");
|
|
20
20
|
const shop_model_1 = require("./shop.model");
|
|
21
21
|
const payment_record_model_1 = require("./embedded/payment-record.model");
|
|
22
|
+
const card_model_1 = require("./card.model");
|
|
22
23
|
let CartParticipant = class CartParticipant extends defaultClasses_1.TimeStamps {
|
|
23
24
|
cart;
|
|
24
25
|
user;
|
|
@@ -28,6 +29,7 @@ let CartParticipant = class CartParticipant extends defaultClasses_1.TimeStamps
|
|
|
28
29
|
spentAmount;
|
|
29
30
|
secondarySpentAmount;
|
|
30
31
|
paymentInformation;
|
|
32
|
+
card;
|
|
31
33
|
paymentRecords;
|
|
32
34
|
isCreator;
|
|
33
35
|
name;
|
|
@@ -70,6 +72,10 @@ __decorate([
|
|
|
70
72
|
(0, typegoose_1.prop)({ type: () => payment_infromation_model_1.PaymentInformation, _id: false }),
|
|
71
73
|
__metadata("design:type", payment_infromation_model_1.PaymentInformation)
|
|
72
74
|
], CartParticipant.prototype, "paymentInformation", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typegoose_1.prop)({ ref: () => card_model_1.Card }),
|
|
77
|
+
__metadata("design:type", Object)
|
|
78
|
+
], CartParticipant.prototype, "card", void 0);
|
|
73
79
|
__decorate([
|
|
74
80
|
(0, typegoose_1.prop)({ type: () => [payment_record_model_1.PaymentRecord], _id: false, default: [] }),
|
|
75
81
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart-participant.model.js","sourceRoot":"/","sources":["libraries/mongo/models/cart-participant.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAgF;AAChF,4EAAqE;AACrE,6CAAoC;AACpC,oFAA0E;AAC1E,6CAAoC;AACpC,wEAAqE;AACrE,kDAAqD;AACrD,6CAAoC;AACpC,0EAAgE;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BAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;6CAClB;0BAvDZ,eAAe;IAZ3B,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE;YACd,UAAU,EAAE,kBAAkB;YAC9B,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,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC7C,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;GACN,eAAe,CAwD3B","sourcesContent":["import { prop, Ref, index, modelOptions, Severity } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Cart } from './cart.model';\nimport { PaymentInformation } from './embedded/payment-infromation.model';\nimport { User } from './user.model';\nimport { RegularOrderPricing } from './embedded/order-pricing.model';\nimport { CartStatus } from '../../../utilities/enum';\nimport { Shop } from './shop.model';\nimport { PaymentRecord } from './embedded/payment-record.model';\nimport { Card } from './card.model';\n\n/**\n * CartParticipant model - Tracks users participating in a group cart\n */\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'cartParticipants',\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, user: 1 }, { unique: true })\n@index({ cart: 1 })\nexport class CartParticipant 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({ type: Date, default: () => new Date() })\n\tpublic joinedAt!: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReady!: boolean;\n\n\t@prop({ type: Date })\n\tpublic readyAt?: Date;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic spentAmount!: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondarySpentAmount!: number;\n\n\t@prop({ type: () => PaymentInformation, _id: false }) // Todo: Remove this after paymentRecords is fully implemented\n\tpublic paymentInformation?: PaymentInformation;\n\n\t@prop({ ref: () => Card })\n\tpublic card?: Ref<Card>;\n\n\t@prop({ type: () => [PaymentRecord], _id: false, default: [] })\n\tpublic paymentRecords?: PaymentRecord[];\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isCreator!: boolean;\n\n\t@prop({ required: true, type: String })\n\tpublic name!: string;\n\n\t@prop({ type: String })\n\tpublic profilePhoto?: string;\n\n\t@prop({ type: String })\n\tpublic phoneNumber?: string;\n\n\t@prop({ type: () => RegularOrderPricing })\n\tpublic pricing?: RegularOrderPricing;\n\n\t@prop({\n\t\tenum: CartStatus,\n\t\ttype: String,\n\t\tdefault: CartStatus.ACTIVE,\n\t\trequired: true,\n\t})\n\tpublic cartStatus!: CartStatus;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n}\n"]}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import { Ref } from '@typegoose/typegoose';
|
|
1
2
|
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
2
3
|
import { PaymentInformation } from './payment-infromation.model';
|
|
3
4
|
import { PaymentMethod } from '../../../../utilities/enum';
|
|
4
5
|
import { RiderProfit } from './profit.model';
|
|
5
6
|
import { CashSettlement } from './cash-settlement.model';
|
|
6
7
|
import { PaymentRecord } from './payment-record.model';
|
|
8
|
+
import { Card } from '../card.model';
|
|
7
9
|
export declare class OrderFinance extends TimeStamps {
|
|
8
10
|
exchangeRate?: number;
|
|
9
11
|
paymentMethod?: PaymentMethod;
|
|
10
12
|
paymentInformation?: PaymentInformation;
|
|
13
|
+
card?: Ref<Card>;
|
|
11
14
|
paymentRecords?: PaymentRecord[];
|
|
12
15
|
riderProfit?: RiderProfit;
|
|
13
16
|
cashSettlement?: CashSettlement;
|
|
@@ -17,10 +17,12 @@ const enum_1 = require("../../../../utilities/enum");
|
|
|
17
17
|
const profit_model_1 = require("./profit.model");
|
|
18
18
|
const cash_settlement_model_1 = require("./cash-settlement.model");
|
|
19
19
|
const payment_record_model_1 = require("./payment-record.model");
|
|
20
|
+
const card_model_1 = require("../card.model");
|
|
20
21
|
class OrderFinance extends defaultClasses_1.TimeStamps {
|
|
21
22
|
exchangeRate;
|
|
22
23
|
paymentMethod;
|
|
23
24
|
paymentInformation;
|
|
25
|
+
card;
|
|
24
26
|
paymentRecords;
|
|
25
27
|
riderProfit;
|
|
26
28
|
cashSettlement;
|
|
@@ -38,6 +40,10 @@ __decorate([
|
|
|
38
40
|
(0, typegoose_1.prop)({ type: () => payment_infromation_model_1.PaymentInformation, _id: false }),
|
|
39
41
|
__metadata("design:type", payment_infromation_model_1.PaymentInformation)
|
|
40
42
|
], OrderFinance.prototype, "paymentInformation", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typegoose_1.prop)({ ref: () => card_model_1.Card }),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], OrderFinance.prototype, "card", void 0);
|
|
41
47
|
__decorate([
|
|
42
48
|
(0, typegoose_1.prop)({ type: () => [payment_record_model_1.PaymentRecord], _id: false, default: [] }),
|
|
43
49
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-finance.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/order-finance.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"order-finance.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/order-finance.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,4EAAqE;AACrE,2EAAiE;AACjE,qDAA2D;AAC3D,iDAA6C;AAC7C,mEAAyD;AACzD,iEAAuD;AACvD,8CAAqC;AAErC,MAAa,YAAa,SAAQ,2BAAU;IAEpC,YAAY,CAAU;IAGtB,aAAa,CAAiB;IAG9B,kBAAkB,CAAsB;IAGxC,IAAI,CAAa;IAGjB,cAAc,CAAmB;IAGjC,WAAW,CAAe;IAG1B,cAAc,CAAkB;CACvC;AArBD,oCAqBC;AAnBO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;kDACN;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAa,EAAE,OAAO,EAAE,oBAAa,CAAC,IAAI,EAAE,CAAC;;mDACpC;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,8CAAkB,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;8BACzB,8CAAkB;wDAAC;AAGxC;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;0CACF;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,oCAAa,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;oDACvB;AAGjC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,0BAAW,EAAE,CAAC;8BACb,0BAAW;iDAAC;AAG1B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,sCAAc,EAAE,CAAC;8BACb,sCAAc;oDAAC","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { PaymentInformation } from './payment-infromation.model';\nimport { PaymentMethod } from '../../../../utilities/enum';\nimport { RiderProfit } from './profit.model';\nimport { CashSettlement } from './cash-settlement.model';\nimport { PaymentRecord } from './payment-record.model';\nimport { Card } from '../card.model';\n\nexport class OrderFinance extends TimeStamps {\n\t@prop({ type: Number, default: 0 })\n\tpublic exchangeRate?: number;\n\n\t@prop({ type: String, enum: PaymentMethod, default: PaymentMethod.CASH })\n\tpublic paymentMethod?: PaymentMethod;\n\n\t@prop({ type: () => PaymentInformation, _id: false }) // Todo: Remove this after paymentRecords is fully implemented\n\tpublic paymentInformation?: PaymentInformation;\n\n\t@prop({ ref: () => Card })\n\tpublic card?: Ref<Card>;\n\n\t@prop({ type: () => [PaymentRecord], _id: false, default: [] })\n\tpublic paymentRecords?: PaymentRecord[];\n\n\t@prop({ type: () => RiderProfit })\n\tpublic riderProfit?: RiderProfit;\n\n\t@prop({ type: () => CashSettlement })\n\tpublic cashSettlement?: CashSettlement;\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PaymentProvider } from '../../../../utilities/enum';
|
|
2
2
|
export declare class PaymentRecord {
|
|
3
3
|
provider: PaymentProvider;
|
|
4
|
+
amount: number;
|
|
5
|
+
authorizedAmount: number;
|
|
4
6
|
paymentIntentId?: string;
|
|
5
7
|
orderId?: string;
|
|
6
8
|
transactionId?: string;
|
|
7
|
-
amount: number;
|
|
8
|
-
authorizedAmount: number;
|
|
9
9
|
}
|
|
@@ -14,17 +14,25 @@ const typegoose_1 = require("@typegoose/typegoose");
|
|
|
14
14
|
const enum_1 = require("../../../../utilities/enum");
|
|
15
15
|
class PaymentRecord {
|
|
16
16
|
provider;
|
|
17
|
+
amount;
|
|
18
|
+
authorizedAmount;
|
|
17
19
|
paymentIntentId;
|
|
18
20
|
orderId;
|
|
19
21
|
transactionId;
|
|
20
|
-
amount;
|
|
21
|
-
authorizedAmount;
|
|
22
22
|
}
|
|
23
23
|
exports.PaymentRecord = PaymentRecord;
|
|
24
24
|
__decorate([
|
|
25
25
|
(0, typegoose_1.prop)({ required: true, enum: enum_1.PaymentProvider }),
|
|
26
26
|
__metadata("design:type", String)
|
|
27
27
|
], PaymentRecord.prototype, "provider", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typegoose_1.prop)({ type: Number }),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], PaymentRecord.prototype, "amount", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typegoose_1.prop)({ type: Number }),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], PaymentRecord.prototype, "authorizedAmount", void 0);
|
|
28
36
|
__decorate([
|
|
29
37
|
(0, typegoose_1.prop)({ type: String }),
|
|
30
38
|
__metadata("design:type", String)
|
|
@@ -37,12 +45,4 @@ __decorate([
|
|
|
37
45
|
(0, typegoose_1.prop)({ type: String }),
|
|
38
46
|
__metadata("design:type", String)
|
|
39
47
|
], PaymentRecord.prototype, "transactionId", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typegoose_1.prop)({ type: Number }),
|
|
42
|
-
__metadata("design:type", Number)
|
|
43
|
-
], PaymentRecord.prototype, "amount", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, typegoose_1.prop)({ type: Number }),
|
|
46
|
-
__metadata("design:type", Number)
|
|
47
|
-
], PaymentRecord.prototype, "authorizedAmount", void 0);
|
|
48
48
|
//# sourceMappingURL=payment-record.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-record.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/payment-record.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,qDAA6D;AAE7D,MAAa,aAAa;IAElB,QAAQ,CAAmB;IAG3B,
|
|
1
|
+
{"version":3,"file":"payment-record.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/payment-record.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,qDAA6D;AAE7D,MAAa,aAAa;IAElB,QAAQ,CAAmB;IAG3B,MAAM,CAAU;IAGhB,gBAAgB,CAAU;IAI1B,eAAe,CAAU;IAIzB,OAAO,CAAU;IAGjB,aAAa,CAAU;CAC9B;AApBD,sCAoBC;AAlBO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,sBAAe,EAAE,CAAC;;+CACd;AAG3B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CACA;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDACU;AAI1B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDACS;AAIzB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CACC;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oDACO","sourcesContent":["import { prop } from '@typegoose/typegoose';\nimport { PaymentProvider } from '../../../../utilities/enum';\n\nexport class PaymentRecord {\n\t@prop({ required: true, enum: PaymentProvider })\n\tpublic provider!: PaymentProvider;\n\n\t@prop({ type: Number })\n\tpublic amount!: number;\n\n\t@prop({ type: Number }) // for comparing with percentage increasing feature\n\tpublic authorizedAmount!: number;\n\n\t// Stripe\n\t@prop({ type: String })\n\tpublic paymentIntentId?: string;\n\n\t// Areeba\n\t@prop({ type: String })\n\tpublic orderId?: string;\n\n\t@prop({ type: String })\n\tpublic transactionId?: string;\n}\n"]}
|
|
@@ -5,9 +5,9 @@ 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;
|
|
10
|
+
req: import("http").IncomingMessage;
|
|
11
11
|
requestId: string | undefined;
|
|
12
12
|
entity: import("../context").EntityContext | undefined;
|
|
13
13
|
usedRefreshToken: boolean | undefined;
|
|
@@ -4,9 +4,9 @@ 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;
|
|
9
|
+
req: import("http").IncomingMessage;
|
|
10
10
|
requestId: string | undefined;
|
|
11
11
|
entity: import("../context").EntityContext | undefined;
|
|
12
12
|
usedRefreshToken: boolean | undefined;
|
|
@@ -3,9 +3,9 @@ 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;
|
|
8
|
+
req: import("http").IncomingMessage;
|
|
9
9
|
requestId: string | undefined;
|
|
10
10
|
entity: import("../context").EntityContext | undefined;
|
|
11
11
|
usedRefreshToken: boolean | undefined;
|
|
@@ -5,9 +5,9 @@ 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;
|
|
10
|
+
req: import("http").IncomingMessage;
|
|
11
11
|
requestId: string | undefined;
|
|
12
12
|
entity: import("../context").EntityContext | undefined;
|
|
13
13
|
usedRefreshToken: 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,15 +773,15 @@ export declare const GetOrderByIdInputSchema: z.ZodObject<{
|
|
|
773
773
|
userOrderCompletionScope: z.ZodOptional<z.ZodNativeEnum<typeof UserOrderCompletionScope>>;
|
|
774
774
|
}, "strip", z.ZodTypeAny, {
|
|
775
775
|
_id: import("mongoose").Types.ObjectId;
|
|
776
|
-
populate?: any;
|
|
777
776
|
select?: Record<string, 0 | 1> | undefined;
|
|
777
|
+
populate?: any;
|
|
778
778
|
groupByCategories?: boolean | undefined;
|
|
779
779
|
getParentCategory?: boolean | undefined;
|
|
780
780
|
userOrderCompletionScope?: UserOrderCompletionScope | undefined;
|
|
781
781
|
}, {
|
|
782
782
|
_id: string | import("mongoose").Types.ObjectId;
|
|
783
|
-
populate?: any;
|
|
784
783
|
select?: Record<string, 0 | 1> | undefined;
|
|
784
|
+
populate?: any;
|
|
785
785
|
groupByCategories?: boolean | undefined;
|
|
786
786
|
getParentCategory?: boolean | undefined;
|
|
787
787
|
userOrderCompletionScope?: UserOrderCompletionScope | undefined;
|
|
@@ -791,11 +791,11 @@ export declare const GetByTokenInputSchema: z.ZodOptional<z.ZodObject<{
|
|
|
791
791
|
select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
|
|
792
792
|
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
|
|
793
793
|
}, "strip", z.ZodTypeAny, {
|
|
794
|
-
populate?: any;
|
|
795
794
|
select?: Record<string, 0 | 1> | undefined;
|
|
796
|
-
}, {
|
|
797
795
|
populate?: any;
|
|
796
|
+
}, {
|
|
798
797
|
select?: Record<string, 0 | 1> | undefined;
|
|
798
|
+
populate?: any;
|
|
799
799
|
}>>;
|
|
800
800
|
export type GetByTokenInputDTO = DTO<typeof GetByTokenInputSchema>;
|
|
801
801
|
export declare const GetOneQuerySchema: z.ZodObject<{
|
|
@@ -803,12 +803,12 @@ export declare const GetOneQuerySchema: z.ZodObject<{
|
|
|
803
803
|
select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
|
|
804
804
|
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
|
|
805
805
|
}, "strip", z.ZodTypeAny, {
|
|
806
|
-
populate?: any;
|
|
807
806
|
select?: Record<string, 0 | 1> | undefined;
|
|
807
|
+
populate?: any;
|
|
808
808
|
query?: Record<string, any> | undefined;
|
|
809
809
|
}, {
|
|
810
|
-
populate?: any;
|
|
811
810
|
select?: Record<string, 0 | 1> | undefined;
|
|
811
|
+
populate?: any;
|
|
812
812
|
query?: Record<string, any> | undefined;
|
|
813
813
|
}>;
|
|
814
814
|
export type GetOneQueryDTO = DTO<typeof GetOneQuerySchema>;
|