@lyxa.ai/core 1.4.314 → 1.4.316
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/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/libraries/configuration/index.d.ts +0 -1
- package/dist/libraries/configuration/index.js +0 -6
- package/dist/libraries/configuration/index.js.map +1 -1
- package/dist/libraries/mongo/models/index.d.ts +3 -0
- package/dist/libraries/mongo/models/index.js +4 -1
- package/dist/libraries/mongo/models/index.js.map +1 -1
- package/dist/libraries/mongo/models/user-shop-history.model.d.ts +8 -0
- package/dist/libraries/mongo/models/user-shop-history.model.js +34 -0
- package/dist/libraries/mongo/models/user-shop-history.model.js.map +1 -0
- package/dist/libraries/secrets/index.d.ts +2 -0
- package/dist/libraries/secrets/index.js +29 -11
- package/dist/libraries/secrets/index.js.map +1 -1
- package/dist/libraries/socket/events/chatroom-message-send.socket.event.d.ts +33 -33
- package/dist/libraries/socket/events/order-actions.socket.event.d.ts +20 -20
- package/dist/libraries/socket/events/rider-location-update.socket.event.d.ts +8 -8
- package/dist/libraries/socket/events/ticket-actions.socket.event.d.ts +8 -8
- package/dist/libraries/socket/events/ticket-assign.socket.event.d.ts +40 -40
- package/dist/libraries/trpc/middlewares/auth.d.ts +2 -2
- package/dist/libraries/trpc/middlewares/createRoleProtectedProcedure.d.ts +2 -2
- package/dist/libraries/trpc/middlewares/phone-verified.d.ts +2 -2
- package/dist/libraries/trpc/middlewares/publicUserDecoder.d.ts +2 -2
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/dist/utilities/environment/rabbitmq-environments.d.ts +2 -1
- package/dist/utilities/environment/rabbitmq-environments.js +12 -10
- package/dist/utilities/environment/rabbitmq-environments.js.map +1 -1
- package/dist/utilities/environment/redis-environments.d.ts +1 -1
- package/dist/utilities/environment/redis-environments.js +13 -10
- package/dist/utilities/environment/redis-environments.js.map +1 -1
- package/package.json +1 -1
|
@@ -13,14 +13,14 @@ export declare const TicketAssignSocketOutputSchema: z.ZodObject<{
|
|
|
13
13
|
name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
14
14
|
profilePhoto: z.ZodNullable<z.ZodString> | z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
15
15
|
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
type: UserRef;
|
|
17
16
|
_id: import("mongoose").Types.ObjectId;
|
|
18
17
|
name: string;
|
|
18
|
+
type: UserRef;
|
|
19
19
|
profilePhoto: string | null;
|
|
20
20
|
}, {
|
|
21
|
-
type: UserRef;
|
|
22
21
|
_id: string | import("mongoose").Types.ObjectId;
|
|
23
22
|
name: string;
|
|
23
|
+
type: UserRef;
|
|
24
24
|
profilePhoto: string | null;
|
|
25
25
|
}>;
|
|
26
26
|
createdAt: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
|
|
@@ -39,41 +39,41 @@ export declare const TicketAssignSocketOutputSchema: z.ZodObject<{
|
|
|
39
39
|
}>;
|
|
40
40
|
unreadCount: z.ZodNumber;
|
|
41
41
|
}, "strip", z.ZodTypeAny, {
|
|
42
|
-
status: TicketStatus;
|
|
43
|
-
type: TicketType;
|
|
44
|
-
_id: import("mongoose").Types.ObjectId;
|
|
45
42
|
createdAt: Date;
|
|
46
43
|
updatedAt: Date;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
};
|
|
51
|
-
unreadCount: number;
|
|
44
|
+
_id: import("mongoose").Types.ObjectId;
|
|
45
|
+
status: TicketStatus;
|
|
46
|
+
type: TicketType;
|
|
52
47
|
client: {
|
|
53
|
-
type: UserRef;
|
|
54
48
|
_id: import("mongoose").Types.ObjectId;
|
|
55
49
|
name: string;
|
|
50
|
+
type: UserRef;
|
|
56
51
|
profilePhoto: string | null;
|
|
57
52
|
};
|
|
53
|
+
lastMessage: {
|
|
54
|
+
createdAt: Date;
|
|
55
|
+
content: string;
|
|
56
|
+
};
|
|
57
|
+
unreadCount: number;
|
|
58
58
|
chatroomId: import("mongoose").Types.ObjectId;
|
|
59
59
|
orderId?: import("mongoose").Types.ObjectId | undefined;
|
|
60
60
|
}, {
|
|
61
|
-
status: TicketStatus;
|
|
62
|
-
type: TicketType;
|
|
63
|
-
_id: string | import("mongoose").Types.ObjectId;
|
|
64
61
|
createdAt: string | Date;
|
|
65
62
|
updatedAt: string | Date;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
};
|
|
70
|
-
unreadCount: number;
|
|
63
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
64
|
+
status: TicketStatus;
|
|
65
|
+
type: TicketType;
|
|
71
66
|
client: {
|
|
72
|
-
type: UserRef;
|
|
73
67
|
_id: string | import("mongoose").Types.ObjectId;
|
|
74
68
|
name: string;
|
|
69
|
+
type: UserRef;
|
|
75
70
|
profilePhoto: string | null;
|
|
76
71
|
};
|
|
72
|
+
lastMessage: {
|
|
73
|
+
createdAt: string | Date;
|
|
74
|
+
content: string;
|
|
75
|
+
};
|
|
76
|
+
unreadCount: number;
|
|
77
77
|
chatroomId: string | import("mongoose").Types.ObjectId;
|
|
78
78
|
orderId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
79
79
|
}>;
|
|
@@ -91,14 +91,14 @@ export declare class TicketAssignEvent extends BaseSocketEvent<typeof TicketAssi
|
|
|
91
91
|
name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
92
92
|
profilePhoto: z.ZodNullable<z.ZodString> | z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
93
93
|
}, "strip", z.ZodTypeAny, {
|
|
94
|
-
type: UserRef;
|
|
95
94
|
_id: import("mongoose").Types.ObjectId;
|
|
96
95
|
name: string;
|
|
96
|
+
type: UserRef;
|
|
97
97
|
profilePhoto: string | null;
|
|
98
98
|
}, {
|
|
99
|
-
type: UserRef;
|
|
100
99
|
_id: string | import("mongoose").Types.ObjectId;
|
|
101
100
|
name: string;
|
|
101
|
+
type: UserRef;
|
|
102
102
|
profilePhoto: string | null;
|
|
103
103
|
}>;
|
|
104
104
|
createdAt: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
|
|
@@ -117,41 +117,41 @@ export declare class TicketAssignEvent extends BaseSocketEvent<typeof TicketAssi
|
|
|
117
117
|
}>;
|
|
118
118
|
unreadCount: z.ZodNumber;
|
|
119
119
|
}, "strip", z.ZodTypeAny, {
|
|
120
|
-
status: TicketStatus;
|
|
121
|
-
type: TicketType;
|
|
122
|
-
_id: import("mongoose").Types.ObjectId;
|
|
123
120
|
createdAt: Date;
|
|
124
121
|
updatedAt: Date;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
};
|
|
129
|
-
unreadCount: number;
|
|
122
|
+
_id: import("mongoose").Types.ObjectId;
|
|
123
|
+
status: TicketStatus;
|
|
124
|
+
type: TicketType;
|
|
130
125
|
client: {
|
|
131
|
-
type: UserRef;
|
|
132
126
|
_id: import("mongoose").Types.ObjectId;
|
|
133
127
|
name: string;
|
|
128
|
+
type: UserRef;
|
|
134
129
|
profilePhoto: string | null;
|
|
135
130
|
};
|
|
131
|
+
lastMessage: {
|
|
132
|
+
createdAt: Date;
|
|
133
|
+
content: string;
|
|
134
|
+
};
|
|
135
|
+
unreadCount: number;
|
|
136
136
|
chatroomId: import("mongoose").Types.ObjectId;
|
|
137
137
|
orderId?: import("mongoose").Types.ObjectId | undefined;
|
|
138
138
|
}, {
|
|
139
|
-
status: TicketStatus;
|
|
140
|
-
type: TicketType;
|
|
141
|
-
_id: string | import("mongoose").Types.ObjectId;
|
|
142
139
|
createdAt: string | Date;
|
|
143
140
|
updatedAt: string | Date;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
};
|
|
148
|
-
unreadCount: number;
|
|
141
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
142
|
+
status: TicketStatus;
|
|
143
|
+
type: TicketType;
|
|
149
144
|
client: {
|
|
150
|
-
type: UserRef;
|
|
151
145
|
_id: string | import("mongoose").Types.ObjectId;
|
|
152
146
|
name: string;
|
|
147
|
+
type: UserRef;
|
|
153
148
|
profilePhoto: string | null;
|
|
154
149
|
};
|
|
150
|
+
lastMessage: {
|
|
151
|
+
createdAt: string | Date;
|
|
152
|
+
content: string;
|
|
153
|
+
};
|
|
154
|
+
unreadCount: number;
|
|
155
155
|
chatroomId: string | import("mongoose").Types.ObjectId;
|
|
156
156
|
orderId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
157
157
|
}>;
|
|
@@ -5,12 +5,12 @@ 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
|
-
requestId: string | undefined;
|
|
9
8
|
entity: import("../context").EntityContext | undefined;
|
|
9
|
+
requestId: string | undefined;
|
|
10
10
|
req: import("http").IncomingMessage;
|
|
11
11
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
12
|
-
tokenType: TokenType | undefined;
|
|
13
12
|
usedRefreshToken: boolean | undefined;
|
|
14
13
|
tokenRenewed: boolean | undefined;
|
|
14
|
+
tokenType: TokenType | undefined;
|
|
15
15
|
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
16
16
|
export {};
|
|
@@ -4,12 +4,12 @@ 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
|
-
requestId: string | undefined;
|
|
8
7
|
entity: import("../context").EntityContext | undefined;
|
|
8
|
+
requestId: string | undefined;
|
|
9
9
|
req: import("http").IncomingMessage;
|
|
10
10
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
11
|
-
tokenType: import("../../auth").TokenType | undefined;
|
|
12
11
|
usedRefreshToken: boolean | undefined;
|
|
13
12
|
tokenRenewed: boolean | undefined;
|
|
13
|
+
tokenType: import("../../auth").TokenType | undefined;
|
|
14
14
|
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
15
15
|
export {};
|
|
@@ -3,12 +3,12 @@ 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
|
-
requestId: string | undefined;
|
|
7
6
|
entity: import("../context").EntityContext | undefined;
|
|
7
|
+
requestId: string | undefined;
|
|
8
8
|
req: import("http").IncomingMessage;
|
|
9
9
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
10
|
-
tokenType: import("../../auth").TokenType | undefined;
|
|
11
10
|
usedRefreshToken: boolean | undefined;
|
|
12
11
|
tokenRenewed: boolean | undefined;
|
|
12
|
+
tokenType: import("../../auth").TokenType | undefined;
|
|
13
13
|
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
14
14
|
export {};
|
|
@@ -5,12 +5,12 @@ 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
|
-
requestId: string | undefined;
|
|
9
8
|
entity: import("../context").EntityContext | undefined;
|
|
9
|
+
requestId: string | undefined;
|
|
10
10
|
req: import("http").IncomingMessage;
|
|
11
11
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
12
|
-
tokenType: TokenType | undefined;
|
|
13
12
|
usedRefreshToken: boolean | undefined;
|
|
14
13
|
tokenRenewed: boolean | undefined;
|
|
14
|
+
tokenType: TokenType | undefined;
|
|
15
15
|
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
16
16
|
export {};
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { EnvironmentConfigurationType } from '../../libraries/configuration/types/EnvironmentConfigurationType';
|
|
2
|
-
|
|
2
|
+
import { SecretManagerService } from '../../libraries/secrets';
|
|
3
|
+
export declare function getRabbitMQUrl(environment: EnvironmentConfigurationType, secretManagerService: SecretManagerService): Promise<string>;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getRabbitMQUrl = getRabbitMQUrl;
|
|
4
4
|
const EnvironmentConfigurationType_1 = require("../../libraries/configuration/types/EnvironmentConfigurationType");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
const LOCAL_ENVIRONMENTS = new Set([
|
|
6
|
+
EnvironmentConfigurationType_1.EnvironmentConfigurationType.LOCAL,
|
|
7
|
+
EnvironmentConfigurationType_1.EnvironmentConfigurationType.MOCK,
|
|
8
|
+
]);
|
|
9
|
+
async function getRabbitMQUrl(environment, secretManagerService) {
|
|
10
|
+
if (LOCAL_ENVIRONMENTS.has(environment)) {
|
|
11
|
+
return '';
|
|
12
|
+
}
|
|
13
|
+
const rabbitMQUrl = await secretManagerService.getKey('RABBITMQ_URL');
|
|
14
|
+
return rabbitMQUrl ?? '';
|
|
15
|
+
}
|
|
14
16
|
//# sourceMappingURL=rabbitmq-environments.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rabbitmq-environments.js","sourceRoot":"/","sources":["utilities/environment/rabbitmq-environments.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rabbitmq-environments.js","sourceRoot":"/","sources":["utilities/environment/rabbitmq-environments.ts"],"names":[],"mappings":";;AAQA,wCAWC;AAnBD,mHAAgH;AAGhH,MAAM,kBAAkB,GAA8C,IAAI,GAAG,CAAC;IAC7E,2DAA4B,CAAC,KAAK;IAClC,2DAA4B,CAAC,IAAI;CACjC,CAAC,CAAC;AAEI,KAAK,UAAU,cAAc,CACnC,WAAyC,EACzC,oBAA0C;IAE1C,IAAI,kBAAkB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;QACzC,OAAO,EAAE,CAAC;IACX,CAAC;IAED,MAAM,WAAW,GAAG,MAAM,oBAAoB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IAEtE,OAAO,WAAW,IAAI,EAAE,CAAC;AAC1B,CAAC","sourcesContent":["import { EnvironmentConfigurationType } from '../../libraries/configuration/types/EnvironmentConfigurationType';\nimport { SecretManagerService } from '../../libraries/secrets';\n\nconst LOCAL_ENVIRONMENTS: ReadonlySet<EnvironmentConfigurationType> = new Set([\n\tEnvironmentConfigurationType.LOCAL,\n\tEnvironmentConfigurationType.MOCK,\n]);\n\nexport async function getRabbitMQUrl(\n\tenvironment: EnvironmentConfigurationType,\n\tsecretManagerService: SecretManagerService\n): Promise<string> {\n\tif (LOCAL_ENVIRONMENTS.has(environment)) {\n\t\treturn '';\n\t}\n\n\tconst rabbitMQUrl = await secretManagerService.getKey('RABBITMQ_URL');\n\n\treturn rabbitMQUrl ?? '';\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { EnvironmentConfigurationType } from '../../libraries/configuration/types/EnvironmentConfigurationType';
|
|
2
|
-
export declare
|
|
2
|
+
export declare function getRedisUrl(environment: EnvironmentConfigurationType): Promise<string>;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getRedisUrl = getRedisUrl;
|
|
4
4
|
const EnvironmentConfigurationType_1 = require("../../libraries/configuration/types/EnvironmentConfigurationType");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
5
|
+
const secrets_1 = require("../../libraries/secrets");
|
|
6
|
+
const LOCAL_ENVIRONMENTS = new Set([
|
|
7
|
+
EnvironmentConfigurationType_1.EnvironmentConfigurationType.LOCAL,
|
|
8
|
+
EnvironmentConfigurationType_1.EnvironmentConfigurationType.MOCK,
|
|
9
|
+
]);
|
|
10
|
+
async function getRedisUrl(environment) {
|
|
11
|
+
if (LOCAL_ENVIRONMENTS.has(environment)) {
|
|
12
|
+
return '';
|
|
13
|
+
}
|
|
14
|
+
const redisUrl = await (0, secrets_1.fetchSecretDirect)(environment, 'REDIS_URL');
|
|
15
|
+
return redisUrl ?? '';
|
|
16
|
+
}
|
|
14
17
|
//# sourceMappingURL=redis-environments.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis-environments.js","sourceRoot":"/","sources":["utilities/environment/redis-environments.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"redis-environments.js","sourceRoot":"/","sources":["utilities/environment/redis-environments.ts"],"names":[],"mappings":";;AAQA,kCAQC;AAhBD,mHAAgH;AAChH,qDAA4D;AAE5D,MAAM,kBAAkB,GAA8C,IAAI,GAAG,CAAC;IAC7E,2DAA4B,CAAC,KAAK;IAClC,2DAA4B,CAAC,IAAI;CACjC,CAAC,CAAC;AAEI,KAAK,UAAU,WAAW,CAAC,WAAyC;IAC1E,IAAI,kBAAkB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;QACzC,OAAO,EAAE,CAAC;IACX,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,IAAA,2BAAiB,EAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IAEnE,OAAO,QAAQ,IAAI,EAAE,CAAC;AACvB,CAAC","sourcesContent":["import { EnvironmentConfigurationType } from '../../libraries/configuration/types/EnvironmentConfigurationType';\nimport { fetchSecretDirect } from '../../libraries/secrets';\n\nconst LOCAL_ENVIRONMENTS: ReadonlySet<EnvironmentConfigurationType> = new Set([\n\tEnvironmentConfigurationType.LOCAL,\n\tEnvironmentConfigurationType.MOCK,\n]);\n\nexport async function getRedisUrl(environment: EnvironmentConfigurationType): Promise<string> {\n\tif (LOCAL_ENVIRONMENTS.has(environment)) {\n\t\treturn '';\n\t}\n\n\tconst redisUrl = await fetchSecretDirect(environment, 'REDIS_URL');\n\n\treturn redisUrl ?? '';\n}\n"]}
|