@lyxa.ai/core 1.0.165 → 1.0.166-test
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/dispatcher/index.d.ts +2 -1
- package/dist/libraries/dispatcher/index.js +2 -1
- package/dist/libraries/dispatcher/index.js.map +1 -1
- package/dist/libraries/event/events/admin-logs-event.d.ts +1 -1
- package/dist/libraries/event/events/admin-logs-event.js.map +1 -1
- package/dist/libraries/mongo/models/core-user.model.d.ts +1 -2
- package/dist/libraries/mongo/models/core-user.model.js +2 -7
- package/dist/libraries/mongo/models/core-user.model.js.map +1 -1
- package/dist/libraries/mongo/models/notification.model.d.ts +4 -3
- package/dist/libraries/mongo/models/notification.model.js +15 -11
- package/dist/libraries/mongo/models/notification.model.js.map +1 -1
- package/dist/libraries/mongo/models/user.model.d.ts +2 -2
- package/dist/libraries/mongo/models/user.model.js +5 -5
- package/dist/libraries/mongo/models/user.model.js.map +1 -1
- package/dist/libraries/trpc/context.d.ts +2 -1
- package/dist/libraries/trpc/context.js.map +1 -1
- package/dist/libraries/trpc/index.d.ts +43 -153
- package/dist/libraries/trpc/middlewares/auth.d.ts +10 -32
- package/dist/libraries/trpc/middlewares/phone-verified.d.ts +10 -32
- package/dist/libraries/trpc/middlewares/publicUserDecoder.d.ts +10 -32
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/dist/types/utilities/enum.d.ts +13 -1
- package/dist/types/utilities/enum.js +12 -0
- package/dist/types/utilities/enum.js.map +1 -1
- package/dist/utilities/common/logs-common-methods.d.ts +8 -0
- package/dist/utilities/common/logs-common-methods.js +13 -0
- package/dist/utilities/common/logs-common-methods.js.map +1 -1
- package/dist/utilities/enum.d.ts +13 -1
- package/dist/utilities/enum.js +12 -0
- package/dist/utilities/enum.js.map +1 -1
- package/package.json +3 -3
|
@@ -5,5 +5,6 @@ export declare class MicroServiceDispatcher {
|
|
|
5
5
|
constructor(secretService: SecretManagerService);
|
|
6
6
|
getMicroService<T extends AnyRouter>(serviceName: string, customURL?: string, options?: {
|
|
7
7
|
headers?: Record<string, string>;
|
|
8
|
-
|
|
8
|
+
transformer?: any;
|
|
9
|
+
}): Promise<import("@trpc/client").TRPCClient<T>>;
|
|
9
10
|
}
|
|
@@ -25,11 +25,12 @@ let MicroServiceDispatcher = class MicroServiceDispatcher {
|
|
|
25
25
|
if (!deploymentURL) {
|
|
26
26
|
throw new Error('The requested service does not have a configured secret URL');
|
|
27
27
|
}
|
|
28
|
-
return (0, client_1.
|
|
28
|
+
return (0, client_1.createTRPCClient)({
|
|
29
29
|
links: [
|
|
30
30
|
(0, client_1.httpBatchLink)({
|
|
31
31
|
url: deploymentURL,
|
|
32
32
|
headers: async () => options?.headers ?? {},
|
|
33
|
+
transformer: options?.transformer,
|
|
33
34
|
}),
|
|
34
35
|
],
|
|
35
36
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/dispatcher/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAiC;AACjC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/dispatcher/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAiC;AACjC,yCAA+D;AAE/D,wCAAkD;AAG3C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAC1B,cAAc,CAAuB;IAE7C,YAAY,aAAmC;QAC9C,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;IACrC,CAAC;IAEM,KAAK,CAAC,eAAe,CAC3B,WAAmB,EACnB,SAAkB,EAClB,OAGC;QAED,MAAM,aAAa,GAClB,SAAS;YACT,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAChC,2BAA2B,GAAG,WAAW,CAAC,WAAW,EAAE,GAAG,WAAW,CACrE,CAAC,CAAC;QAEJ,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;QAE9C,IAAI,CAAC,aAAa,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;QAChF,CAAC;QAED,OAAO,IAAA,yBAAgB,EAAI;YAC1B,KAAK,EAAE;gBACN,IAAA,sBAAa,EAAC;oBACb,GAAG,EAAE,aAAa;oBAClB,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE;oBAC3C,WAAW,EAAE,OAAO,EAAE,WAAW;iBACjC,CAAC;aACF;SAED,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AAtCY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,gBAAO,GAAE;qCAIkB,8BAAoB;GAHnC,sBAAsB,CAsClC","sourcesContent":["import { Service } from 'typedi';\nimport { createTRPCClient, httpBatchLink } from '@trpc/client';\nimport { AnyRouter } from '@trpc/server';\nimport { SecretManagerService } from '../secrets';\n\n@Service()\nexport class MicroServiceDispatcher {\n\tprivate _secretService: SecretManagerService;\n\n\tconstructor(secretService: SecretManagerService) {\n\t\tthis._secretService = secretService;\n\t}\n\n\tpublic async getMicroService<T extends AnyRouter>(\n\t\tserviceName: string,\n\t\tcustomURL?: string,\n\t\toptions?: {\n\t\t\theaders?: Record<string, string>;\n\t\t\ttransformer?: any;\n\t\t}\n\t) {\n\t\tconst deploymentURL =\n\t\t\tcustomURL ??\n\t\t\t(await this._secretService.getKey(\n\t\t\t\t'DEPLOYMENTS_MICROSERVICE_' + serviceName.toUpperCase() + '_ENDPOINT'\n\t\t\t));\n\n\t\tconsole.log(deploymentURL, 'deploymentURL--');\n\n\t\tif (!deploymentURL) {\n\t\t\tthrow new Error('The requested service does not have a configured secret URL');\n\t\t}\n\n\t\treturn createTRPCClient<T>({\n\t\t\tlinks: [\n\t\t\t\thttpBatchLink({\n\t\t\t\t\turl: deploymentURL,\n\t\t\t\t\theaders: async () => options?.headers ?? {},\n\t\t\t\t\ttransformer: options?.transformer,\n\t\t\t\t}),\n\t\t\t],\n\t\t\t//special http request header that has a token\n\t\t});\n\t}\n}\n"]}
|
|
@@ -18,7 +18,7 @@ declare const ActivityLogValidationSchema: z.ZodObject<{
|
|
|
18
18
|
oldDocument?: any;
|
|
19
19
|
newDocument?: any;
|
|
20
20
|
}>;
|
|
21
|
-
type CreateActivityLogDTO = DTO<typeof ActivityLogValidationSchema>;
|
|
21
|
+
export type CreateActivityLogDTO = DTO<typeof ActivityLogValidationSchema>;
|
|
22
22
|
export declare class AdminActivityLogsEvent extends BaseEvent<Record<string, unknown>> {
|
|
23
23
|
constructor(payload: CreateActivityLogDTO);
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-logs-event.js","sourceRoot":"/","sources":["libraries/event/events/admin-logs-event.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAAyC;AACzC,8CAAkD;AAClD,kDAAqE;AACrE,uFAA0G;AAE1G,MAAM,UAAU,GAAG;IAClB,KAAK,EAAE,iCAAa,CAAC,QAAQ,CAAC,OAAO,CAAC;IACtC,YAAY,EAAE,iCAAa,CAAC,QAAQ,CAAC,iCAA0B,EAAE,eAAe,CAAC;IACjF,WAAW,EAAE,OAAC,CAAC,GAAG,EAAE;IACpB,WAAW,EAAE,OAAC,CAAC,GAAG,EAAE;CACpB,CAAC;AACF,MAAM,aAAa,GAAG,IAAA,uCAAmB,EAAC,UAAU,CAAC,CAAC;AACtD,MAAM,EACL,UAAU,EAAE,2BAA2B,GACvC,GAAG,aAAa,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAIrD,MAAa,sBAAuB,SAAQ,qBAAkC;IAC7E,YAAY,OAA6B;QACxC,KAAK,CAAC,8BAAiB,CAAC,yBAAyB,EAAE,OAAkC,CAAC,CAAC;IACxF,CAAC;CACD;AAJD,wDAIC","sourcesContent":["import { z } from 'zod';\nimport { BaseEvent } from '../BaseEvent';\nimport { PublishEventEnums } from '../EventEnums';\nimport { AdminLogsUpdatedFieldsType } from '../../../utilities/enum';\nimport { createSchemaBuilder, DTO, ZodValidation } from '../../../utilities/validation/global-validation';\n\nconst baseFields = {\n\tadmin: ZodValidation.objectId('Admin'),\n\tupdatedField: ZodValidation.enumType(AdminLogsUpdatedFieldsType, 'Updated Field'),\n\toldDocument: z.any(),\n\tnewDocument: z.any(),\n};\nconst schemaBuilder = createSchemaBuilder(baseFields);\nconst {\n\tBaseSchema: ActivityLogValidationSchema,\n} = schemaBuilder.getAllSchemas({ createdAt: true });\n\
|
|
1
|
+
{"version":3,"file":"admin-logs-event.js","sourceRoot":"/","sources":["libraries/event/events/admin-logs-event.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAAyC;AACzC,8CAAkD;AAClD,kDAAqE;AACrE,uFAA0G;AAE1G,MAAM,UAAU,GAAG;IAClB,KAAK,EAAE,iCAAa,CAAC,QAAQ,CAAC,OAAO,CAAC;IACtC,YAAY,EAAE,iCAAa,CAAC,QAAQ,CAAC,iCAA0B,EAAE,eAAe,CAAC;IACjF,WAAW,EAAE,OAAC,CAAC,GAAG,EAAE;IACpB,WAAW,EAAE,OAAC,CAAC,GAAG,EAAE;CACpB,CAAC;AACF,MAAM,aAAa,GAAG,IAAA,uCAAmB,EAAC,UAAU,CAAC,CAAC;AACtD,MAAM,EACL,UAAU,EAAE,2BAA2B,GACvC,GAAG,aAAa,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAIrD,MAAa,sBAAuB,SAAQ,qBAAkC;IAC7E,YAAY,OAA6B;QACxC,KAAK,CAAC,8BAAiB,CAAC,yBAAyB,EAAE,OAAkC,CAAC,CAAC;IACxF,CAAC;CACD;AAJD,wDAIC","sourcesContent":["import { z } from 'zod';\nimport { BaseEvent } from '../BaseEvent';\nimport { PublishEventEnums } from '../EventEnums';\nimport { AdminLogsUpdatedFieldsType } from '../../../utilities/enum';\nimport { createSchemaBuilder, DTO, ZodValidation } from '../../../utilities/validation/global-validation';\n\nconst baseFields = {\n\tadmin: ZodValidation.objectId('Admin'),\n\tupdatedField: ZodValidation.enumType(AdminLogsUpdatedFieldsType, 'Updated Field'),\n\toldDocument: z.any(),\n\tnewDocument: z.any(),\n};\nconst schemaBuilder = createSchemaBuilder(baseFields);\nconst {\n\tBaseSchema: ActivityLogValidationSchema,\n} = schemaBuilder.getAllSchemas({ createdAt: true });\n\nexport type CreateActivityLogDTO = DTO<typeof ActivityLogValidationSchema>;\n\nexport class AdminActivityLogsEvent extends BaseEvent<Record<string, unknown>> {\n\tconstructor(payload: CreateActivityLogDTO) {\n\t\tsuper(PublishEventEnums.ADMIN_ACTIVITY_LOGS_EVENT, payload as Record<string, unknown>);\n\t}\n}"]}
|
|
@@ -6,10 +6,9 @@ export declare class CoreUser extends TimeStamps {
|
|
|
6
6
|
gender?: string;
|
|
7
7
|
dob?: Date;
|
|
8
8
|
countryISO2: string;
|
|
9
|
-
fcmTokens?: string[];
|
|
10
9
|
profilePhoto?: string;
|
|
11
10
|
status?: Status;
|
|
12
11
|
deviceIds: string[];
|
|
13
12
|
stripeCustomerId?: string;
|
|
14
|
-
|
|
13
|
+
rewardPoints?: number;
|
|
15
14
|
}
|
|
@@ -19,12 +19,11 @@ let CoreUser = class CoreUser extends defaultClasses_1.TimeStamps {
|
|
|
19
19
|
gender;
|
|
20
20
|
dob;
|
|
21
21
|
countryISO2;
|
|
22
|
-
fcmTokens;
|
|
23
22
|
profilePhoto;
|
|
24
23
|
status;
|
|
25
24
|
deviceIds;
|
|
26
25
|
stripeCustomerId;
|
|
27
|
-
|
|
26
|
+
rewardPoints;
|
|
28
27
|
};
|
|
29
28
|
exports.CoreUser = CoreUser;
|
|
30
29
|
__decorate([
|
|
@@ -47,10 +46,6 @@ __decorate([
|
|
|
47
46
|
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
48
47
|
__metadata("design:type", String)
|
|
49
48
|
], CoreUser.prototype, "countryISO2", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, typegoose_1.prop)({ type: () => [String], default: [] }),
|
|
52
|
-
__metadata("design:type", Array)
|
|
53
|
-
], CoreUser.prototype, "fcmTokens", void 0);
|
|
54
49
|
__decorate([
|
|
55
50
|
(0, typegoose_1.prop)({ type: String }),
|
|
56
51
|
__metadata("design:type", String)
|
|
@@ -70,7 +65,7 @@ __decorate([
|
|
|
70
65
|
__decorate([
|
|
71
66
|
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
72
67
|
__metadata("design:type", Number)
|
|
73
|
-
], CoreUser.prototype, "
|
|
68
|
+
], CoreUser.prototype, "rewardPoints", void 0);
|
|
74
69
|
exports.CoreUser = CoreUser = __decorate([
|
|
75
70
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'coreUsers' } })
|
|
76
71
|
], CoreUser);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-user.model.js","sourceRoot":"/","sources":["libraries/mongo/models/core-user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,4EAAqE;AACrE,kDAAiD;AAG1C,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,2BAAU;IAEhC,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,MAAM,CAAU;IAGhB,GAAG,CAAQ;IAGX,WAAW,CAAU;IAGrB,
|
|
1
|
+
{"version":3,"file":"core-user.model.js","sourceRoot":"/","sources":["libraries/mongo/models/core-user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,4EAAqE;AACrE,kDAAiD;AAG1C,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,2BAAU;IAEhC,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,MAAM,CAAU;IAGhB,GAAG,CAAQ;IAGX,WAAW,CAAU;IAGrB,YAAY,CAAU;IAGtB,MAAM,CAAU;IAGhB,SAAS,CAAY;IAGrB,gBAAgB,CAAU;IAG1B,YAAY,CAA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ps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Status } from '../../../utilities/enum';\n\n@modelOptions({ schemaOptions: { collection: 'coreUsers' } })\nexport class CoreUser extends TimeStamps {\n\t@prop({ required: true, type: String })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic email!: string;\n\n\t@prop({ required: false, type: String })\n\tpublic gender?: string;\n\n\t@prop({ required: false, type: Date })\n\tpublic dob?: Date;\n\n\t@prop({ required: true, type: String })\n\tpublic countryISO2!: string;\n\n\t@prop({ type: String })\n\tpublic profilePhoto?: string;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ required: true, type: () => [String] })\n\tpublic deviceIds!: string[];\n\n\t@prop({ type: String })\n\tpublic stripeCustomerId?: string;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic rewardPoints?: number;\n}\n"]}
|
|
@@ -3,7 +3,6 @@ import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
|
3
3
|
import { ClickType, NotificationAccountType } from '../../../utilities/enum';
|
|
4
4
|
import { Admin } from './admin.model';
|
|
5
5
|
import { BOBFinance } from './bob-finance.model';
|
|
6
|
-
import { CoreUser } from './core-user.model';
|
|
7
6
|
import { ListContainer } from './list-container.model';
|
|
8
7
|
import { Order } from './order.model';
|
|
9
8
|
import { Parent } from './parent.model';
|
|
@@ -12,14 +11,15 @@ import { Product } from './product.model';
|
|
|
12
11
|
import { RequestArea } from './request-area.model';
|
|
13
12
|
import { Rider } from './rider.model';
|
|
14
13
|
import { Shop } from './shop.model';
|
|
14
|
+
import { User } from './user.model';
|
|
15
15
|
export declare class Notification extends TimeStamps {
|
|
16
16
|
title: string;
|
|
17
17
|
body: string;
|
|
18
18
|
image?: string;
|
|
19
19
|
sound?: string;
|
|
20
20
|
accountType: NotificationAccountType;
|
|
21
|
-
isGlobal
|
|
22
|
-
users?: Ref<
|
|
21
|
+
isGlobal: boolean;
|
|
22
|
+
users?: Ref<User>[];
|
|
23
23
|
parents?: Ref<Parent>[];
|
|
24
24
|
shops?: Ref<Shop>[];
|
|
25
25
|
riders?: Ref<Rider>[];
|
|
@@ -35,5 +35,6 @@ export declare class Notification extends TimeStamps {
|
|
|
35
35
|
clickableBOBFinance?: Ref<BOBFinance>;
|
|
36
36
|
clickableRequestArea?: Ref<RequestArea>;
|
|
37
37
|
isSendByAdmin?: boolean;
|
|
38
|
+
createdBy?: Ref<Admin>;
|
|
38
39
|
seenBy?: mongoose.Types.ObjectId[];
|
|
39
40
|
}
|
|
@@ -15,7 +15,6 @@ const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
|
15
15
|
const enum_1 = require("../../../utilities/enum");
|
|
16
16
|
const admin_model_1 = require("./admin.model");
|
|
17
17
|
const bob_finance_model_1 = require("./bob-finance.model");
|
|
18
|
-
const core_user_model_1 = require("./core-user.model");
|
|
19
18
|
const list_container_model_1 = require("./list-container.model");
|
|
20
19
|
const order_model_1 = require("./order.model");
|
|
21
20
|
const parent_model_1 = require("./parent.model");
|
|
@@ -24,6 +23,7 @@ const product_model_1 = require("./product.model");
|
|
|
24
23
|
const request_area_model_1 = require("./request-area.model");
|
|
25
24
|
const rider_model_1 = require("./rider.model");
|
|
26
25
|
const shop_model_1 = require("./shop.model");
|
|
26
|
+
const user_model_1 = require("./user.model");
|
|
27
27
|
let Notification = class Notification extends defaultClasses_1.TimeStamps {
|
|
28
28
|
title;
|
|
29
29
|
body;
|
|
@@ -47,15 +47,16 @@ let Notification = class Notification extends defaultClasses_1.TimeStamps {
|
|
|
47
47
|
clickableBOBFinance;
|
|
48
48
|
clickableRequestArea;
|
|
49
49
|
isSendByAdmin;
|
|
50
|
+
createdBy;
|
|
50
51
|
seenBy;
|
|
51
52
|
};
|
|
52
53
|
exports.Notification = Notification;
|
|
53
54
|
__decorate([
|
|
54
|
-
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
55
|
+
(0, typegoose_1.prop)({ required: true, type: String, maxlength: 50 }),
|
|
55
56
|
__metadata("design:type", String)
|
|
56
57
|
], Notification.prototype, "title", void 0);
|
|
57
58
|
__decorate([
|
|
58
|
-
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
59
|
+
(0, typegoose_1.prop)({ required: true, type: String, maxlength: 250 }),
|
|
59
60
|
__metadata("design:type", String)
|
|
60
61
|
], Notification.prototype, "body", void 0);
|
|
61
62
|
__decorate([
|
|
@@ -71,11 +72,11 @@ __decorate([
|
|
|
71
72
|
__metadata("design:type", String)
|
|
72
73
|
], Notification.prototype, "accountType", void 0);
|
|
73
74
|
__decorate([
|
|
74
|
-
(0, typegoose_1.prop)({
|
|
75
|
+
(0, typegoose_1.prop)({ required: true, type: Boolean }),
|
|
75
76
|
__metadata("design:type", Boolean)
|
|
76
77
|
], Notification.prototype, "isGlobal", void 0);
|
|
77
78
|
__decorate([
|
|
78
|
-
(0, typegoose_1.prop)({ ref: () =>
|
|
79
|
+
(0, typegoose_1.prop)({ ref: () => user_model_1.User, default: [] }),
|
|
79
80
|
__metadata("design:type", Array)
|
|
80
81
|
], Notification.prototype, "users", void 0);
|
|
81
82
|
__decorate([
|
|
@@ -138,17 +139,20 @@ __decorate([
|
|
|
138
139
|
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
139
140
|
__metadata("design:type", Boolean)
|
|
140
141
|
], Notification.prototype, "isSendByAdmin", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, typegoose_1.prop)({ ref: () => admin_model_1.Admin }),
|
|
144
|
+
__metadata("design:type", Object)
|
|
145
|
+
], Notification.prototype, "createdBy", void 0);
|
|
141
146
|
__decorate([
|
|
142
147
|
(0, typegoose_1.prop)({ type: () => [typegoose_1.mongoose.Types.ObjectId], default: [] }),
|
|
143
148
|
__metadata("design:type", Array)
|
|
144
149
|
], Notification.prototype, "seenBy", void 0);
|
|
145
150
|
exports.Notification = Notification = __decorate([
|
|
146
151
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'notifications' } }),
|
|
147
|
-
(0, typegoose_1.index)({
|
|
148
|
-
(0, typegoose_1.index)({
|
|
149
|
-
(0, typegoose_1.index)({
|
|
150
|
-
(0, typegoose_1.index)({
|
|
151
|
-
(0, typegoose_1.index)({
|
|
152
|
-
(0, typegoose_1.index)({ accountType: 1, type: 1, createdAt: 1 })
|
|
152
|
+
(0, typegoose_1.index)({ isGlobal: 1, users: 1, createdAt: -1 }, { partialFilterExpression: { accountType: enum_1.NotificationAccountType.USER, deletedAt: null } }),
|
|
153
|
+
(0, typegoose_1.index)({ isGlobal: 1, shops: 1, createdAt: -1 }, { partialFilterExpression: { accountType: enum_1.NotificationAccountType.SHOP, deletedAt: null } }),
|
|
154
|
+
(0, typegoose_1.index)({ isGlobal: 1, riders: 1, createdAt: -1 }, { partialFilterExpression: { accountType: enum_1.NotificationAccountType.RIDER, deletedAt: null } }),
|
|
155
|
+
(0, typegoose_1.index)({ isGlobal: 1, admins: 1, createdAt: -1 }, { partialFilterExpression: { accountType: enum_1.NotificationAccountType.ADMIN, deletedAt: null } }),
|
|
156
|
+
(0, typegoose_1.index)({ isGlobal: 1, parents: 1, createdAt: -1 }, { partialFilterExpression: { accountType: enum_1.NotificationAccountType.PARENT, deletedAt: null } })
|
|
153
157
|
], Notification);
|
|
154
158
|
//# sourceMappingURL=notification.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.model.js","sourceRoot":"/","sources":["libraries/mongo/models/notification.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAgF;AAChF,4EAAqE;AACrE,kDAA6E;AAC7E,+CAAsC;AACtC,2DAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"notification.model.js","sourceRoot":"/","sources":["libraries/mongo/models/notification.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAgF;AAChF,4EAAqE;AACrE,kDAA6E;AAC7E,+CAAsC;AACtC,2DAAiD;AACjD,iEAAuD;AACvD,+CAAsC;AACtC,iDAAw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AAE,CAC3F;IACA,IAAA,iBAAK,EACL,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,EACzC,EAAE,uBAAuB,EAAE,EAAE,WAAW,EAAE,8BAAuB,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAC5F;IACA,IAAA,iBAAK,EACL,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,EACzC,EAAE,uBAAuB,EAAE,EAAE,WAAW,EAAE,8BAAuB,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAC5F;IACA,IAAA,iBAAK,EACL,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,EAC1C,EAAE,uBAAuB,EAAE,EAAE,WAAW,EAAE,8BAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAC7F;GACY,YAAY,CAwExB","sourcesContent":["import { index, modelOptions, mongoose, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { ClickType, NotificationAccountType } from '../../../utilities/enum';\nimport { Admin } from './admin.model';\nimport { BOBFinance } from './bob-finance.model';\nimport { ListContainer } from './list-container.model';\nimport { Order } from './order.model';\nimport { Parent } from './parent.model';\nimport { Payout } from './payout.model';\nimport { Product } from './product.model';\nimport { RequestArea } from './request-area.model';\nimport { Rider } from './rider.model';\nimport { Shop } from './shop.model';\nimport { User } from './user.model';\n\n@modelOptions({ schemaOptions: { collection: 'notifications' } })\n@index(\n\t{ isGlobal: 1, users: 1, createdAt: -1 },\n\t{ partialFilterExpression: { accountType: NotificationAccountType.USER, deletedAt: null } }\n)\n@index(\n\t{ isGlobal: 1, shops: 1, createdAt: -1 },\n\t{ partialFilterExpression: { accountType: NotificationAccountType.SHOP, deletedAt: null } }\n)\n@index(\n\t{ isGlobal: 1, riders: 1, createdAt: -1 },\n\t{ partialFilterExpression: { accountType: NotificationAccountType.RIDER, deletedAt: null } }\n)\n@index(\n\t{ isGlobal: 1, admins: 1, createdAt: -1 },\n\t{ partialFilterExpression: { accountType: NotificationAccountType.ADMIN, deletedAt: null } }\n)\n@index(\n\t{ isGlobal: 1, parents: 1, createdAt: -1 },\n\t{ partialFilterExpression: { accountType: NotificationAccountType.PARENT, deletedAt: null } }\n)\nexport class Notification extends TimeStamps {\n\t@prop({ required: true, type: String, maxlength: 50 })\n\tpublic title!: string;\n\n\t@prop({ required: true, type: String, maxlength: 250 })\n\tpublic body!: string;\n\n\t@prop({ type: String })\n\tpublic image?: string;\n\n\t@prop({ type: String })\n\tpublic sound?: string;\n\n\t@prop({ required: true, type: String, enum: NotificationAccountType })\n\tpublic accountType!: NotificationAccountType;\n\n\t@prop({ required: true, type: Boolean })\n\tpublic isGlobal!: boolean;\n\n\t@prop({ ref: () => User, default: [] })\n\tpublic users?: Ref<User>[];\n\n\t@prop({ ref: () => Parent, default: [] })\n\tpublic parents?: Ref<Parent>[];\n\n\t@prop({ ref: () => Shop, default: [] })\n\tpublic shops?: Ref<Shop>[];\n\n\t@prop({ ref: () => Rider, default: [] })\n\tpublic riders?: Ref<Rider>[];\n\n\t@prop({ ref: () => Admin, default: [] })\n\tpublic admins?: Ref<Admin>[];\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isClickable?: boolean;\n\n\t@prop({ type: String, enum: ClickType })\n\tpublic clickType?: ClickType;\n\n\t@prop({ type: String, trim: true })\n\tpublic clickableUrl?: string;\n\n\t@prop({ ref: () => Order })\n\tpublic clickableOrder?: Ref<Order>;\n\n\t@prop({ ref: () => Shop })\n\tpublic clickableShop?: Ref<Shop>;\n\n\t@prop({ ref: () => Product })\n\tpublic clickableProduct?: Ref<Product>;\n\n\t@prop({ ref: () => ListContainer })\n\tpublic clickableListContainer?: Ref<ListContainer>;\n\n\t@prop({ ref: () => Payout })\n\tpublic clickablePayout?: Ref<Payout>;\n\n\t@prop({ ref: () => BOBFinance })\n\tpublic clickableBOBFinance?: Ref<BOBFinance>;\n\n\t@prop({ ref: () => RequestArea })\n\tpublic clickableRequestArea?: Ref<RequestArea>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isSendByAdmin?: boolean;\n\n\t@prop({ ref: () => Admin })\n\tpublic createdBy?: Ref<Admin>;\n\n\t@prop({ type: () => [mongoose.Types.ObjectId], default: [] })\n\tpublic seenBy?: mongoose.Types.ObjectId[];\n}\n"]}
|
|
@@ -6,14 +6,13 @@ import { Shop } from './shop.model';
|
|
|
6
6
|
import { UserAddress } from './shared/address.model';
|
|
7
7
|
import { Coupon } from './coupon.model';
|
|
8
8
|
import { Subscription } from './subscription.model';
|
|
9
|
-
import { OnlineStatus
|
|
9
|
+
import { OnlineStatus } from '../../../utilities/enum';
|
|
10
10
|
import { OTPFields } from './embedded/otp-fields.model';
|
|
11
11
|
export declare class User extends TimeStamps {
|
|
12
12
|
coreUser: Ref<CoreUser>;
|
|
13
13
|
favoriteProducts?: Ref<Product>[];
|
|
14
14
|
favoriteShops?: Ref<Shop>[];
|
|
15
15
|
addresses?: UserAddress[];
|
|
16
|
-
status?: Status;
|
|
17
16
|
orderCompleted?: number;
|
|
18
17
|
repeatedOrderAt?: Date;
|
|
19
18
|
walletBalance?: number;
|
|
@@ -29,6 +28,7 @@ export declare class User extends TimeStamps {
|
|
|
29
28
|
phoneOtpInfo?: OTPFields;
|
|
30
29
|
isPhoneVerified?: boolean;
|
|
31
30
|
onlineStatus?: OnlineStatus;
|
|
31
|
+
fcmTokens?: string[];
|
|
32
32
|
static updateWallet(this: ReturnModelType<typeof User>, userId: string, amount: number): Promise<(import("mongoose").Document<unknown, import("@typegoose/typegoose/lib/types").BeAnObject, User, import("@typegoose/typegoose/lib/types").BeAnyObject> & Omit<User & {
|
|
33
33
|
_id: import("mongoose").Types.ObjectId;
|
|
34
34
|
} & {
|
|
@@ -26,7 +26,6 @@ let User = User_1 = class User extends defaultClasses_1.TimeStamps {
|
|
|
26
26
|
favoriteProducts;
|
|
27
27
|
favoriteShops;
|
|
28
28
|
addresses;
|
|
29
|
-
status;
|
|
30
29
|
orderCompleted;
|
|
31
30
|
repeatedOrderAt;
|
|
32
31
|
walletBalance;
|
|
@@ -42,6 +41,7 @@ let User = User_1 = class User extends defaultClasses_1.TimeStamps {
|
|
|
42
41
|
phoneOtpInfo;
|
|
43
42
|
isPhoneVerified;
|
|
44
43
|
onlineStatus;
|
|
44
|
+
fcmTokens;
|
|
45
45
|
static async updateWallet(userId, amount) {
|
|
46
46
|
return this.findByIdAndUpdate(userId, { $inc: { walletBalance: amount } }, { new: true });
|
|
47
47
|
}
|
|
@@ -63,10 +63,6 @@ __decorate([
|
|
|
63
63
|
(0, typegoose_1.prop)({ type: () => [address_model_1.UserAddress] }),
|
|
64
64
|
__metadata("design:type", Array)
|
|
65
65
|
], User.prototype, "addresses", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, typegoose_1.prop)({ type: String, enum: enum_1.Status, default: enum_1.Status.ACTIVE }),
|
|
68
|
-
__metadata("design:type", String)
|
|
69
|
-
], User.prototype, "status", void 0);
|
|
70
66
|
__decorate([
|
|
71
67
|
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
72
68
|
__metadata("design:type", Number)
|
|
@@ -131,6 +127,10 @@ __decorate([
|
|
|
131
127
|
}),
|
|
132
128
|
__metadata("design:type", String)
|
|
133
129
|
], User.prototype, "onlineStatus", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, typegoose_1.prop)({ type: () => [String], default: [] }),
|
|
132
|
+
__metadata("design:type", Array)
|
|
133
|
+
], User.prototype, "fcmTokens", void 0);
|
|
134
134
|
exports.User = User = User_1 = __decorate([
|
|
135
135
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'users' } }),
|
|
136
136
|
(0, typegoose_1.index)({ createdAt: 1, addresses: 1 })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.model.js","sourceRoot":"/","sources":["libraries/mongo/models/user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,oDAAuF;AACvF,4EAAqE;AACrE,uDAA6C;AAC7C,mDAA0C;AAC1C,6CAAoC;AACpC,0DAAqD;AACrD,iDAAwC;AACxC,6DAAoD;AACpD,kDAAiF;AACjF,kEAAwD;AAIjD,IAAM,IAAI,YAAV,MAAM,IAAK,SAAQ,2BAAU;IAE5B,QAAQ,CAAiB;IAGzB,gBAAgB,CAAkB;IAGlC,aAAa,CAAe;IAG5B,SAAS,CAAiB;IAG1B,
|
|
1
|
+
{"version":3,"file":"user.model.js","sourceRoot":"/","sources":["libraries/mongo/models/user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,oDAAuF;AACvF,4EAAqE;AACrE,uDAA6C;AAC7C,mDAA0C;AAC1C,6CAAoC;AACpC,0DAAqD;AACrD,iDAAwC;AACxC,6DAAoD;AACpD,kDAAiF;AACjF,kEAAwD;AAIjD,IAAM,IAAI,YAAV,MAAM,IAAK,SAAQ,2BAAU;IAE5B,QAAQ,CAAiB;IAGzB,gBAAgB,CAAkB;IAGlC,aAAa,CAAe;IAG5B,SAAS,CAAiB;IAG1B,cAAc,CAAU;IAGxB,eAAe,CAAQ;IAGvB,aAAa,CAAU;IAGvB,OAAO,CAAiB;IAGxB,yBAAyB,CAAU;IAGnC,kBAAkB,CAAU;IAG5B,iCAAiC,CAAU;IAG3C,qBAAqB,CAAW;IAGhC,YAAY,CAAe;IAG3B,YAAY,CAAqB;IAGjC,YAAY,CAAW;IAGvB,WAAW,CAAU;IAGrB,YAAY,CAAa;IAGzB,eAAe,CAAW;IAO1B,YAAY,CAAgB;IAG5B,SAAS,CAAY;IAErB,MAAM,CAAC,KAAK,CAAC,YAAY,CAAqC,MAAc,EAAE,MAAc;QAClG,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,EA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ACzB,IAAI,CAoEhB","sourcesContent":["import { index, modelOptions, prop, Ref, ReturnModelType } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { CoreUser } from './core-user.model';\nimport { Product } from './product.model';\nimport { Shop } from './shop.model';\nimport { UserAddress } from './shared/address.model';\nimport { Coupon } from './coupon.model';\nimport { Subscription } from './subscription.model';\nimport { OnlineStatus, ShopOnlineStatus, Status } from '../../../utilities/enum';\nimport { OTPFields } from './embedded/otp-fields.model';\n\n@modelOptions({ schemaOptions: { collection: 'users' } })\n@index({ createdAt: 1, addresses: 1 })\nexport class User extends TimeStamps {\n\t@prop({ required: true, ref: () => CoreUser })\n\tpublic coreUser!: Ref<CoreUser>;\n\n\t@prop({ type: () => [String], ref: () => Product })\n\tpublic favoriteProducts?: Ref<Product>[];\n\n\t@prop({ type: () => [String], ref: () => Shop })\n\tpublic favoriteShops?: Ref<Shop>[];\n\n\t@prop({ type: () => [UserAddress] })\n\tpublic addresses?: UserAddress[];\n\n\t@prop({ type: Number, default: 0 })\n\tpublic orderCompleted?: number;\n\n\t@prop({ type: Date })\n\tpublic repeatedOrderAt?: Date;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic walletBalance?: number;\n\n\t@prop({ ref: () => Coupon })\n\tpublic coupons?: Ref<Coupon>[];\n\n\t@prop({ type: String })\n\tpublic newUserCouponDiscountType?: string;\n\n\t@prop({ type: Number })\n\tpublic newUserCouponValue?: number;\n\n\t@prop({ type: Number })\n\tpublic newUserCouponMaximumDiscountLimit?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isNewUserCouponShowed?: boolean;\n\n\t@prop({ ref: () => Coupon })\n\tpublic referralCode?: Ref<Coupon>;\n\n\t@prop({ type: String, ref: () => Subscription })\n\tpublic subscription?: Ref<Subscription>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isSubscribed?: boolean;\n\n\t@prop({ type: String, unique: true, sparse: true })\n\tpublic phoneNumber?: string;\n\n\t@prop({ type: () => OTPFields })\n\tpublic phoneOtpInfo?: OTPFields;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isPhoneVerified?: boolean;\n\n\t@prop({\n\t\ttype: String,\n\t\tenum: OnlineStatus,\n\t\tdefault: OnlineStatus.OFFLINE,\n\t})\n\tpublic onlineStatus?: OnlineStatus;\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic fcmTokens?: string[];\n\n\tpublic static async updateWallet(this: ReturnModelType<typeof User>, userId: string, amount: number) {\n\t\treturn this.findByIdAndUpdate(userId, { $inc: { walletBalance: amount } }, { new: true });\n\t}\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateHTTPContextOptions } from '@trpc/server/
|
|
1
|
+
import { CreateHTTPContextOptions } from '@trpc/server/adapters/standalone';
|
|
2
2
|
import type { CreateWSSContextFnOptions } from '@trpc/server/adapters/ws';
|
|
3
3
|
import { AuthEntityType } from '../auth';
|
|
4
4
|
import jwt from 'jsonwebtoken';
|
|
@@ -24,6 +24,7 @@ export declare const createLyxaWsContext: (opts: CreateWSSContextFnOptions) => P
|
|
|
24
24
|
tokenRenewed: boolean;
|
|
25
25
|
req: import("http").IncomingMessage;
|
|
26
26
|
res: import("ws").WebSocket;
|
|
27
|
+
info: import("@trpc/server/dist/unstable-core-do-not-import.d-C6mFWtNG.cjs").TRPCRequestInfo;
|
|
27
28
|
}>;
|
|
28
29
|
export type LyxaContext = Awaited<ReturnType<typeof createLyxaContext>>;
|
|
29
30
|
export type LyxaWSContext = Awaited<ReturnType<typeof createLyxaWsContext>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"/","sources":["libraries/trpc/context.ts"],"names":[],"mappings":";;;AAqBO,MAAM,iBAAiB,GAAG,KAAK,EACrC,IAA8B,EAC0B,EAAE;IAC1D,OAAO;QACN,GAAG,IAAI;QACP,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,gBAAgB,EAAE,KAAK;QACvB,YAAY,EAAE,KAAK;KACnB,CAAC;AACH,CAAC,CAAC;AAXW,QAAA,iBAAiB,qBAW5B;AAEK,MAAM,mBAAmB,GAAG,KAAK,EAAE,IAA+B,EAAE,EAAE;IAC5E,OAAO;QACN,GAAG,IAAI;QACP,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,gBAAgB,EAAE,KAAK;QACvB,YAAY,EAAE,KAAK;KACnB,CAAC;AACH,CAAC,CAAC;AATW,QAAA,mBAAmB,uBAS9B","sourcesContent":["import { CreateHTTPContextOptions } from '@trpc/server/
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"/","sources":["libraries/trpc/context.ts"],"names":[],"mappings":";;;AAqBO,MAAM,iBAAiB,GAAG,KAAK,EACrC,IAA8B,EAC0B,EAAE;IAC1D,OAAO;QACN,GAAG,IAAI;QACP,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,gBAAgB,EAAE,KAAK;QACvB,YAAY,EAAE,KAAK;KACnB,CAAC;AACH,CAAC,CAAC;AAXW,QAAA,iBAAiB,qBAW5B;AAEK,MAAM,mBAAmB,GAAG,KAAK,EAAE,IAA+B,EAAE,EAAE;IAC5E,OAAO;QACN,GAAG,IAAI;QACP,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,gBAAgB,EAAE,KAAK;QACvB,YAAY,EAAE,KAAK;KACnB,CAAC;AACH,CAAC,CAAC;AATW,QAAA,mBAAmB,uBAS9B","sourcesContent":["import { CreateHTTPContextOptions } from '@trpc/server/adapters/standalone';\nimport type { CreateWSSContextFnOptions } from '@trpc/server/adapters/ws';\nimport { AuthEntityType } from '../auth';\nimport jwt from 'jsonwebtoken';\nimport { TokenType } from '../auth';\nimport { request } from 'http';\n\nexport interface EntityContext extends jwt.JwtPayload {\n\tid: string;\n\ttype: AuthEntityType;\n\tparameters: Record<string, unknown>;\n}\n\nexport interface LyxaContextParams {\n\tentity?: EntityContext;\n\trequestId?: string;\n\ttokenType?: TokenType;\n\tusedRefreshToken?: boolean;\n\ttokenRenewed?: boolean;\n}\n\nexport const createLyxaContext = async (\n\topts: CreateHTTPContextOptions\n): Promise<CreateHTTPContextOptions & LyxaContextParams> => {\n\treturn {\n\t\t...opts,\n\t\tentity: undefined,\n\t\trequestId: undefined,\n\t\ttokenType: undefined,\n\t\tusedRefreshToken: false,\n\t\ttokenRenewed: false,\n\t};\n};\n\nexport const createLyxaWsContext = async (opts: CreateWSSContextFnOptions) => {\n\treturn {\n\t\t...opts,\n\t\tentity: undefined,\n\t\trequestId: undefined,\n\t\ttokenType: undefined,\n\t\tusedRefreshToken: false,\n\t\ttokenRenewed: false,\n\t};\n};\n\nexport type LyxaContext = Awaited<ReturnType<typeof createLyxaContext>>;\nexport type LyxaWSContext = Awaited<ReturnType<typeof createLyxaWsContext>>;\n"]}
|
|
@@ -1,178 +1,68 @@
|
|
|
1
|
-
export declare const t: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
stack: undefined;
|
|
14
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
15
|
-
};
|
|
16
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
17
|
-
}>;
|
|
18
|
-
procedure: import("@trpc/server").ProcedureBuilder<{
|
|
19
|
-
_config: import("@trpc/server").RootConfig<{
|
|
20
|
-
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
21
|
-
meta: object;
|
|
22
|
-
errorShape: {
|
|
23
|
-
message: string;
|
|
24
|
-
data: {
|
|
25
|
-
stack: undefined;
|
|
26
|
-
path: undefined;
|
|
27
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
28
|
-
httpStatus: number;
|
|
29
|
-
};
|
|
30
|
-
stack: undefined;
|
|
31
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
32
|
-
};
|
|
33
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
34
|
-
}>;
|
|
35
|
-
_ctx_out: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
36
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
|
37
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
38
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
39
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
40
|
-
_meta: object;
|
|
41
|
-
}>;
|
|
42
|
-
middleware: <TNewParams extends import("@trpc/server").ProcedureParams<import("@trpc/server").AnyRootConfig, unknown, unknown, unknown, unknown, unknown, unknown>>(fn: import("@trpc/server").MiddlewareFunction<{
|
|
43
|
-
_config: import("@trpc/server").RootConfig<{
|
|
44
|
-
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
45
|
-
meta: object;
|
|
46
|
-
errorShape: {
|
|
47
|
-
message: string;
|
|
48
|
-
data: {
|
|
49
|
-
stack: undefined;
|
|
50
|
-
path: undefined;
|
|
51
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
52
|
-
httpStatus: number;
|
|
53
|
-
};
|
|
54
|
-
stack: undefined;
|
|
55
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
56
|
-
};
|
|
57
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
58
|
-
}>;
|
|
59
|
-
_ctx_out: {};
|
|
60
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
61
|
-
_input_in: unknown;
|
|
62
|
-
_output_in: unknown;
|
|
63
|
-
_output_out: unknown;
|
|
64
|
-
_meta: object;
|
|
65
|
-
}, TNewParams>) => import("@trpc/server").MiddlewareBuilder<{
|
|
66
|
-
_config: import("@trpc/server").RootConfig<{
|
|
67
|
-
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
68
|
-
meta: object;
|
|
69
|
-
errorShape: {
|
|
70
|
-
message: string;
|
|
71
|
-
data: {
|
|
72
|
-
stack: undefined;
|
|
73
|
-
path: undefined;
|
|
74
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
75
|
-
httpStatus: number;
|
|
76
|
-
};
|
|
77
|
-
stack: undefined;
|
|
78
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
79
|
-
};
|
|
80
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
81
|
-
}>;
|
|
82
|
-
_ctx_out: {};
|
|
83
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
84
|
-
_input_in: unknown;
|
|
85
|
-
_output_in: unknown;
|
|
86
|
-
_output_out: unknown;
|
|
87
|
-
_meta: object;
|
|
88
|
-
}, TNewParams>;
|
|
89
|
-
router: <TProcRouterRecord extends import("@trpc/server").ProcedureRouterRecord>(procedures: TProcRouterRecord) => import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
|
|
90
|
-
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
91
|
-
meta: object;
|
|
92
|
-
errorShape: {
|
|
93
|
-
message: string;
|
|
94
|
-
data: {
|
|
95
|
-
stack: undefined;
|
|
96
|
-
path: undefined;
|
|
97
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
98
|
-
httpStatus: number;
|
|
99
|
-
};
|
|
100
|
-
stack: undefined;
|
|
101
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
102
|
-
};
|
|
103
|
-
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
104
|
-
}>, TProcRouterRecord>;
|
|
105
|
-
mergeRouters: typeof import("@trpc/server").mergeRouters;
|
|
106
|
-
createCallerFactory: <TRouter extends import("@trpc/server").Router<import("@trpc/server").AnyRouterDef<import("@trpc/server").RootConfig<{
|
|
107
|
-
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
108
|
-
meta: object;
|
|
109
|
-
errorShape: {
|
|
110
|
-
message: string;
|
|
111
|
-
data: {
|
|
112
|
-
stack: undefined;
|
|
113
|
-
path: undefined;
|
|
114
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
115
|
-
httpStatus: number;
|
|
116
|
-
};
|
|
1
|
+
export declare const t: import("@trpc/server").TRPCRootObject<import("@trpc/server/dist/adapters/standalone.cjs").CreateHTTPContextOptions & import("./context").LyxaContextParams, object, {
|
|
2
|
+
errorFormatter({ shape, error }: {
|
|
3
|
+
error: import("@trpc/server").TRPCError;
|
|
4
|
+
type: import("@trpc/server").ProcedureType | "unknown";
|
|
5
|
+
path: string | undefined;
|
|
6
|
+
input: unknown;
|
|
7
|
+
ctx: (import("@trpc/server/dist/adapters/standalone.cjs").CreateHTTPContextOptions & import("./context").LyxaContextParams) | undefined;
|
|
8
|
+
shape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
9
|
+
}): {
|
|
10
|
+
message: string;
|
|
11
|
+
data: {
|
|
117
12
|
stack: undefined;
|
|
118
|
-
|
|
13
|
+
path: undefined;
|
|
14
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
15
|
+
httpStatus: number;
|
|
119
16
|
};
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
data: {
|
|
130
|
-
stack: undefined;
|
|
131
|
-
path: undefined;
|
|
132
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
133
|
-
httpStatus: number;
|
|
134
|
-
};
|
|
17
|
+
stack: undefined;
|
|
18
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
19
|
+
};
|
|
20
|
+
}, {
|
|
21
|
+
ctx: import("@trpc/server/dist/adapters/standalone.cjs").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
22
|
+
meta: object;
|
|
23
|
+
errorShape: {
|
|
24
|
+
message: string;
|
|
25
|
+
data: {
|
|
135
26
|
stack: undefined;
|
|
136
|
-
|
|
27
|
+
path: undefined;
|
|
28
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
29
|
+
httpStatus: number;
|
|
137
30
|
};
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
143
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
144
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
145
|
-
_meta: object;
|
|
31
|
+
stack: undefined;
|
|
32
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
33
|
+
};
|
|
34
|
+
transformer: false;
|
|
146
35
|
}>;
|
|
147
|
-
export declare const
|
|
148
|
-
|
|
36
|
+
export declare const publicProcedure: import("@trpc/server").TRPCProcedureBuilder<import("@trpc/server/dist/adapters/standalone.cjs").CreateHTTPContextOptions & import("./context").LyxaContextParams, object, object, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
37
|
+
export declare const createTRPCRouter: import("@trpc/server").TRPCRouterBuilder<{
|
|
38
|
+
ctx: import("@trpc/server/dist/adapters/standalone.cjs").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
149
39
|
meta: object;
|
|
150
40
|
errorShape: {
|
|
151
41
|
message: string;
|
|
152
42
|
data: {
|
|
153
43
|
stack: undefined;
|
|
154
44
|
path: undefined;
|
|
155
|
-
code: import("@trpc/server
|
|
45
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
156
46
|
httpStatus: number;
|
|
157
47
|
};
|
|
158
48
|
stack: undefined;
|
|
159
|
-
code: import("@trpc/server
|
|
49
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
160
50
|
};
|
|
161
|
-
transformer:
|
|
162
|
-
}
|
|
163
|
-
export declare const createCallerFactory:
|
|
164
|
-
ctx: import("@trpc/server/dist/adapters/standalone").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
51
|
+
transformer: false;
|
|
52
|
+
}>;
|
|
53
|
+
export declare const createCallerFactory: import("@trpc/server").TRPCRouterCallerFactory<{
|
|
54
|
+
ctx: import("@trpc/server/dist/adapters/standalone.cjs").CreateHTTPContextOptions & import("./context").LyxaContextParams;
|
|
165
55
|
meta: object;
|
|
166
56
|
errorShape: {
|
|
167
57
|
message: string;
|
|
168
58
|
data: {
|
|
169
59
|
stack: undefined;
|
|
170
60
|
path: undefined;
|
|
171
|
-
code: import("@trpc/server
|
|
61
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
172
62
|
httpStatus: number;
|
|
173
63
|
};
|
|
174
64
|
stack: undefined;
|
|
175
|
-
code: import("@trpc/server
|
|
65
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
176
66
|
};
|
|
177
|
-
transformer:
|
|
178
|
-
}
|
|
67
|
+
transformer: false;
|
|
68
|
+
}>;
|