geniebox-shared-lib 1.0.65 → 1.0.68
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.
|
@@ -3,7 +3,7 @@ import type { handleUnaryCall, Metadata, UntypedServiceImplementation } from "@g
|
|
|
3
3
|
import { Observable } from "rxjs";
|
|
4
4
|
export declare const protobufPackage = "ai";
|
|
5
5
|
export interface AIResponse {
|
|
6
|
-
|
|
6
|
+
requestId: string;
|
|
7
7
|
}
|
|
8
8
|
export interface AIRequest {
|
|
9
9
|
provider: string;
|
package/dist/ai/ai.interface.js
CHANGED
|
@@ -13,12 +13,12 @@ const microservices_1 = require("@nestjs/microservices");
|
|
|
13
13
|
exports.protobufPackage = "ai";
|
|
14
14
|
exports.AI_PACKAGE_NAME = "ai";
|
|
15
15
|
function createBaseAIResponse() {
|
|
16
|
-
return {
|
|
16
|
+
return { requestId: "" };
|
|
17
17
|
}
|
|
18
18
|
exports.AIResponse = {
|
|
19
19
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
20
|
-
if (message.
|
|
21
|
-
writer.uint32(10).string(message.
|
|
20
|
+
if (message.requestId !== "") {
|
|
21
|
+
writer.uint32(10).string(message.requestId);
|
|
22
22
|
}
|
|
23
23
|
return writer;
|
|
24
24
|
},
|
|
@@ -33,7 +33,7 @@ exports.AIResponse = {
|
|
|
33
33
|
if (tag !== 10) {
|
|
34
34
|
break;
|
|
35
35
|
}
|
|
36
|
-
message.
|
|
36
|
+
message.requestId = reader.string();
|
|
37
37
|
continue;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { OnModuleInit } from "@nestjs/common";
|
|
2
2
|
import { ClientGrpc } from "@nestjs/microservices";
|
|
3
|
-
import { EventServiceClient } from "./event.interface";
|
|
3
|
+
import { EventMessage, EventServiceClient } from "./event.interface";
|
|
4
|
+
import { Observable } from "rxjs";
|
|
4
5
|
export declare class EventClient implements OnModuleInit {
|
|
5
6
|
private readonly client;
|
|
6
7
|
private readonly logger;
|
|
@@ -8,4 +9,5 @@ export declare class EventClient implements OnModuleInit {
|
|
|
8
9
|
constructor(client: ClientGrpc);
|
|
9
10
|
onModuleInit(): void;
|
|
10
11
|
get service(): EventServiceClient;
|
|
12
|
+
subscribe(userId: string): Observable<EventMessage>;
|
|
11
13
|
}
|
|
@@ -36,6 +36,9 @@ let EventClient = EventClient_1 = class EventClient {
|
|
|
36
36
|
}
|
|
37
37
|
return this.eventClient;
|
|
38
38
|
}
|
|
39
|
+
subscribe(userId) {
|
|
40
|
+
return this.service.subscribe({ userId });
|
|
41
|
+
}
|
|
39
42
|
};
|
|
40
43
|
exports.EventClient = EventClient;
|
|
41
44
|
exports.EventClient = EventClient = EventClient_1 = __decorate([
|