geniebox-shared-lib 1.0.45 → 1.0.46
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/ai/ai.client.d.ts +12 -0
- package/dist/ai/ai.client.js +42 -0
- package/dist/ai/ai.interface.d.ts +46 -0
- package/dist/ai/ai.interface.js +129 -0
- package/dist/ai/google/protobuf/empty.interface.d.ts +19 -0
- package/dist/ai/google/protobuf/empty.interface.js +35 -0
- package/dist/ai/google/protobuf/struct.interface.d.ts +91 -0
- package/dist/ai/google/protobuf/struct.interface.js +300 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -1
- package/dist/shared.module.d.ts +4 -0
- package/dist/shared.module.js +31 -0
- package/package.json +3 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OnModuleInit } from "@nestjs/common";
|
|
2
|
+
import { ClientGrpc } from "@nestjs/microservices";
|
|
3
|
+
import { AIServiceClient } from "./ai.interface";
|
|
4
|
+
export declare class AIClient implements OnModuleInit {
|
|
5
|
+
private readonly client;
|
|
6
|
+
private readonly logger;
|
|
7
|
+
private aiClient?;
|
|
8
|
+
constructor(client: ClientGrpc);
|
|
9
|
+
onModuleInit(): void;
|
|
10
|
+
get service(): AIServiceClient;
|
|
11
|
+
isReady(): boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var AIClient_1;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.AIClient = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
let AIClient = AIClient_1 = class AIClient {
|
|
19
|
+
constructor(client) {
|
|
20
|
+
this.client = client;
|
|
21
|
+
this.logger = new common_1.Logger(AIClient_1.name);
|
|
22
|
+
}
|
|
23
|
+
onModuleInit() {
|
|
24
|
+
this.aiClient = this.client.getService("AIService");
|
|
25
|
+
this.logger.log("AIServiceClient initialized");
|
|
26
|
+
}
|
|
27
|
+
get service() {
|
|
28
|
+
if (!this.aiClient) {
|
|
29
|
+
throw new common_1.InternalServerErrorException("AIService is not initialized yet");
|
|
30
|
+
}
|
|
31
|
+
return this.aiClient;
|
|
32
|
+
}
|
|
33
|
+
isReady() {
|
|
34
|
+
return !!this.aiClient;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.AIClient = AIClient;
|
|
38
|
+
exports.AIClient = AIClient = AIClient_1 = __decorate([
|
|
39
|
+
(0, common_1.Injectable)(),
|
|
40
|
+
__param(0, (0, common_1.Inject)("AI_PACKAGE")),
|
|
41
|
+
__metadata("design:paramtypes", [Object])
|
|
42
|
+
], AIClient);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import type { handleUnaryCall, Metadata, UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
3
|
+
import { Observable } from "rxjs";
|
|
4
|
+
export declare const protobufPackage = "ai";
|
|
5
|
+
export interface AIResponse {
|
|
6
|
+
output?: {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
} | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface AIRequest {
|
|
11
|
+
provider: string;
|
|
12
|
+
method: string;
|
|
13
|
+
payload?: {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
} | undefined;
|
|
16
|
+
}
|
|
17
|
+
export declare const AI_PACKAGE_NAME = "ai";
|
|
18
|
+
export declare const AIResponse: MessageFns<AIResponse>;
|
|
19
|
+
export declare const AIRequest: MessageFns<AIRequest>;
|
|
20
|
+
export interface AIServiceClient {
|
|
21
|
+
call(request: AIRequest, metadata?: Metadata): Observable<AIResponse>;
|
|
22
|
+
}
|
|
23
|
+
export interface AIServiceController {
|
|
24
|
+
call(request: AIRequest, metadata?: Metadata): Promise<AIResponse> | Observable<AIResponse> | AIResponse;
|
|
25
|
+
}
|
|
26
|
+
export declare function AIServiceControllerMethods(): (constructor: Function) => void;
|
|
27
|
+
export declare const AI_SERVICE_NAME = "AIService";
|
|
28
|
+
export type AIServiceService = typeof AIServiceService;
|
|
29
|
+
export declare const AIServiceService: {
|
|
30
|
+
readonly call: {
|
|
31
|
+
readonly path: "/ai.AIService/Call";
|
|
32
|
+
readonly requestStream: false;
|
|
33
|
+
readonly responseStream: false;
|
|
34
|
+
readonly requestSerialize: (value: AIRequest) => Buffer;
|
|
35
|
+
readonly requestDeserialize: (value: Buffer) => AIRequest;
|
|
36
|
+
readonly responseSerialize: (value: AIResponse) => Buffer;
|
|
37
|
+
readonly responseDeserialize: (value: Buffer) => AIResponse;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export interface AIServiceServer extends UntypedServiceImplementation {
|
|
41
|
+
call: handleUnaryCall<AIRequest, AIResponse>;
|
|
42
|
+
}
|
|
43
|
+
export interface MessageFns<T> {
|
|
44
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
45
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
46
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.7.7
|
|
5
|
+
// protoc v5.28.2
|
|
6
|
+
// source: ai.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.AIServiceService = exports.AI_SERVICE_NAME = exports.AIRequest = exports.AIResponse = exports.AI_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
|
+
exports.AIServiceControllerMethods = AIServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
12
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
13
|
+
const protobufjs_1 = require("protobufjs");
|
|
14
|
+
const struct_interface_1 = require("./google/protobuf/struct.interface");
|
|
15
|
+
exports.protobufPackage = "ai";
|
|
16
|
+
exports.AI_PACKAGE_NAME = "ai";
|
|
17
|
+
function createBaseAIResponse() {
|
|
18
|
+
return {};
|
|
19
|
+
}
|
|
20
|
+
exports.AIResponse = {
|
|
21
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
22
|
+
if (message.output !== undefined) {
|
|
23
|
+
struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.output), writer.uint32(10).fork()).join();
|
|
24
|
+
}
|
|
25
|
+
return writer;
|
|
26
|
+
},
|
|
27
|
+
decode(input, length) {
|
|
28
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
29
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
30
|
+
const message = createBaseAIResponse();
|
|
31
|
+
while (reader.pos < end) {
|
|
32
|
+
const tag = reader.uint32();
|
|
33
|
+
switch (tag >>> 3) {
|
|
34
|
+
case 1: {
|
|
35
|
+
if (tag !== 10) {
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
message.output = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
reader.skip(tag & 7);
|
|
46
|
+
}
|
|
47
|
+
return message;
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
function createBaseAIRequest() {
|
|
51
|
+
return { provider: "", method: "" };
|
|
52
|
+
}
|
|
53
|
+
exports.AIRequest = {
|
|
54
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
55
|
+
if (message.provider !== "") {
|
|
56
|
+
writer.uint32(10).string(message.provider);
|
|
57
|
+
}
|
|
58
|
+
if (message.method !== "") {
|
|
59
|
+
writer.uint32(18).string(message.method);
|
|
60
|
+
}
|
|
61
|
+
if (message.payload !== undefined) {
|
|
62
|
+
struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.payload), writer.uint32(26).fork()).join();
|
|
63
|
+
}
|
|
64
|
+
return writer;
|
|
65
|
+
},
|
|
66
|
+
decode(input, length) {
|
|
67
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
68
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
69
|
+
const message = createBaseAIRequest();
|
|
70
|
+
while (reader.pos < end) {
|
|
71
|
+
const tag = reader.uint32();
|
|
72
|
+
switch (tag >>> 3) {
|
|
73
|
+
case 1: {
|
|
74
|
+
if (tag !== 10) {
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
message.provider = reader.string();
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
case 2: {
|
|
81
|
+
if (tag !== 18) {
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
message.method = reader.string();
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
case 3: {
|
|
88
|
+
if (tag !== 26) {
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
message.payload = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
reader.skip(tag & 7);
|
|
99
|
+
}
|
|
100
|
+
return message;
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
protobufjs_1.wrappers[".google.protobuf.Struct"] = { fromObject: struct_interface_1.Struct.wrap, toObject: struct_interface_1.Struct.unwrap };
|
|
104
|
+
function AIServiceControllerMethods() {
|
|
105
|
+
return function (constructor) {
|
|
106
|
+
const grpcMethods = ["call"];
|
|
107
|
+
for (const method of grpcMethods) {
|
|
108
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
109
|
+
(0, microservices_1.GrpcMethod)("AIService", method)(constructor.prototype[method], method, descriptor);
|
|
110
|
+
}
|
|
111
|
+
const grpcStreamMethods = [];
|
|
112
|
+
for (const method of grpcStreamMethods) {
|
|
113
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
114
|
+
(0, microservices_1.GrpcStreamMethod)("AIService", method)(constructor.prototype[method], method, descriptor);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
exports.AI_SERVICE_NAME = "AIService";
|
|
119
|
+
exports.AIServiceService = {
|
|
120
|
+
call: {
|
|
121
|
+
path: "/ai.AIService/Call",
|
|
122
|
+
requestStream: false,
|
|
123
|
+
responseStream: false,
|
|
124
|
+
requestSerialize: (value) => Buffer.from(exports.AIRequest.encode(value).finish()),
|
|
125
|
+
requestDeserialize: (value) => exports.AIRequest.decode(value),
|
|
126
|
+
responseSerialize: (value) => Buffer.from(exports.AIResponse.encode(value).finish()),
|
|
127
|
+
responseDeserialize: (value) => exports.AIResponse.decode(value),
|
|
128
|
+
},
|
|
129
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "google.protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* A generic empty message that you can re-use to avoid defining duplicated
|
|
5
|
+
* empty messages in your APIs. A typical example is to use it as the request
|
|
6
|
+
* or the response type of an API method. For instance:
|
|
7
|
+
*
|
|
8
|
+
* service Foo {
|
|
9
|
+
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface Empty {
|
|
13
|
+
}
|
|
14
|
+
export declare const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|
|
15
|
+
export declare const Empty: MessageFns<Empty>;
|
|
16
|
+
export interface MessageFns<T> {
|
|
17
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
18
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
19
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.7.7
|
|
5
|
+
// protoc v5.28.2
|
|
6
|
+
// source: google/protobuf/empty.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.Empty = exports.GOOGLE_PROTOBUF_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
exports.protobufPackage = "google.protobuf";
|
|
12
|
+
exports.GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|
|
13
|
+
function createBaseEmpty() {
|
|
14
|
+
return {};
|
|
15
|
+
}
|
|
16
|
+
exports.Empty = {
|
|
17
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
18
|
+
return writer;
|
|
19
|
+
},
|
|
20
|
+
decode(input, length) {
|
|
21
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
22
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
23
|
+
const message = createBaseEmpty();
|
|
24
|
+
while (reader.pos < end) {
|
|
25
|
+
const tag = reader.uint32();
|
|
26
|
+
switch (tag >>> 3) {
|
|
27
|
+
}
|
|
28
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
reader.skip(tag & 7);
|
|
32
|
+
}
|
|
33
|
+
return message;
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "google.protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* `NullValue` is a singleton enumeration to represent the null value for the
|
|
5
|
+
* `Value` type union.
|
|
6
|
+
*
|
|
7
|
+
* The JSON representation for `NullValue` is JSON `null`.
|
|
8
|
+
*/
|
|
9
|
+
export declare enum NullValue {
|
|
10
|
+
/** NULL_VALUE - Null value. */
|
|
11
|
+
NULL_VALUE = 0,
|
|
12
|
+
UNRECOGNIZED = -1
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* `Struct` represents a structured data value, consisting of fields
|
|
16
|
+
* which map to dynamically typed values. In some languages, `Struct`
|
|
17
|
+
* might be supported by a native representation. For example, in
|
|
18
|
+
* scripting languages like JS a struct is represented as an
|
|
19
|
+
* object. The details of that representation are described together
|
|
20
|
+
* with the proto support for the language.
|
|
21
|
+
*
|
|
22
|
+
* The JSON representation for `Struct` is JSON object.
|
|
23
|
+
*/
|
|
24
|
+
export interface Struct {
|
|
25
|
+
/** Unordered map of dynamically typed values. */
|
|
26
|
+
fields: {
|
|
27
|
+
[key: string]: any | undefined;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface Struct_FieldsEntry {
|
|
31
|
+
key: string;
|
|
32
|
+
value?: any | undefined;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* `Value` represents a dynamically typed value which can be either
|
|
36
|
+
* null, a number, a string, a boolean, a recursive struct value, or a
|
|
37
|
+
* list of values. A producer of value is expected to set one of these
|
|
38
|
+
* variants. Absence of any variant indicates an error.
|
|
39
|
+
*
|
|
40
|
+
* The JSON representation for `Value` is JSON value.
|
|
41
|
+
*/
|
|
42
|
+
export interface Value {
|
|
43
|
+
/** Represents a null value. */
|
|
44
|
+
nullValue?: NullValue | undefined;
|
|
45
|
+
/** Represents a double value. */
|
|
46
|
+
numberValue?: number | undefined;
|
|
47
|
+
/** Represents a string value. */
|
|
48
|
+
stringValue?: string | undefined;
|
|
49
|
+
/** Represents a boolean value. */
|
|
50
|
+
boolValue?: boolean | undefined;
|
|
51
|
+
/** Represents a structured value. */
|
|
52
|
+
structValue?: {
|
|
53
|
+
[key: string]: any;
|
|
54
|
+
} | undefined;
|
|
55
|
+
/** Represents a repeated `Value`. */
|
|
56
|
+
listValue?: Array<any> | undefined;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* `ListValue` is a wrapper around a repeated field of values.
|
|
60
|
+
*
|
|
61
|
+
* The JSON representation for `ListValue` is JSON array.
|
|
62
|
+
*/
|
|
63
|
+
export interface ListValue {
|
|
64
|
+
/** Repeated field of dynamically typed values. */
|
|
65
|
+
values: any[];
|
|
66
|
+
}
|
|
67
|
+
export declare const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|
|
68
|
+
export declare const Struct: MessageFns<Struct> & StructWrapperFns;
|
|
69
|
+
export declare const Struct_FieldsEntry: MessageFns<Struct_FieldsEntry>;
|
|
70
|
+
export declare const Value: MessageFns<Value> & AnyValueWrapperFns;
|
|
71
|
+
export declare const ListValue: MessageFns<ListValue> & ListValueWrapperFns;
|
|
72
|
+
export interface MessageFns<T> {
|
|
73
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
74
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
75
|
+
}
|
|
76
|
+
export interface StructWrapperFns {
|
|
77
|
+
wrap(object: {
|
|
78
|
+
[key: string]: any;
|
|
79
|
+
} | undefined): Struct;
|
|
80
|
+
unwrap(message: Struct): {
|
|
81
|
+
[key: string]: any;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
export interface AnyValueWrapperFns {
|
|
85
|
+
wrap(value: any): Value;
|
|
86
|
+
unwrap(message: any): string | number | boolean | Object | null | Array<any> | undefined;
|
|
87
|
+
}
|
|
88
|
+
export interface ListValueWrapperFns {
|
|
89
|
+
wrap(array: Array<any> | undefined): ListValue;
|
|
90
|
+
unwrap(message: ListValue): Array<any>;
|
|
91
|
+
}
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.7.7
|
|
5
|
+
// protoc v5.28.2
|
|
6
|
+
// source: google/protobuf/struct.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ListValue = exports.Value = exports.Struct_FieldsEntry = exports.Struct = exports.GOOGLE_PROTOBUF_PACKAGE_NAME = exports.NullValue = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
const protobufjs_1 = require("protobufjs");
|
|
12
|
+
exports.protobufPackage = "google.protobuf";
|
|
13
|
+
/**
|
|
14
|
+
* `NullValue` is a singleton enumeration to represent the null value for the
|
|
15
|
+
* `Value` type union.
|
|
16
|
+
*
|
|
17
|
+
* The JSON representation for `NullValue` is JSON `null`.
|
|
18
|
+
*/
|
|
19
|
+
var NullValue;
|
|
20
|
+
(function (NullValue) {
|
|
21
|
+
/** NULL_VALUE - Null value. */
|
|
22
|
+
NullValue[NullValue["NULL_VALUE"] = 0] = "NULL_VALUE";
|
|
23
|
+
NullValue[NullValue["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
24
|
+
})(NullValue || (exports.NullValue = NullValue = {}));
|
|
25
|
+
exports.GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|
|
26
|
+
function createBaseStruct() {
|
|
27
|
+
return { fields: {} };
|
|
28
|
+
}
|
|
29
|
+
exports.Struct = {
|
|
30
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
31
|
+
Object.entries(message.fields).forEach(([key, value]) => {
|
|
32
|
+
if (value !== undefined) {
|
|
33
|
+
exports.Struct_FieldsEntry.encode({ key: key, value }, writer.uint32(10).fork()).join();
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
return writer;
|
|
37
|
+
},
|
|
38
|
+
decode(input, length) {
|
|
39
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
40
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
41
|
+
const message = createBaseStruct();
|
|
42
|
+
while (reader.pos < end) {
|
|
43
|
+
const tag = reader.uint32();
|
|
44
|
+
switch (tag >>> 3) {
|
|
45
|
+
case 1: {
|
|
46
|
+
if (tag !== 10) {
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
const entry1 = exports.Struct_FieldsEntry.decode(reader, reader.uint32());
|
|
50
|
+
if (entry1.value !== undefined) {
|
|
51
|
+
message.fields[entry1.key] = entry1.value;
|
|
52
|
+
}
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
reader.skip(tag & 7);
|
|
60
|
+
}
|
|
61
|
+
return message;
|
|
62
|
+
},
|
|
63
|
+
wrap(object) {
|
|
64
|
+
const struct = createBaseStruct();
|
|
65
|
+
if (object !== undefined) {
|
|
66
|
+
for (const key of Object.keys(object)) {
|
|
67
|
+
struct.fields[key] = exports.Value.wrap(object[key]);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return struct;
|
|
71
|
+
},
|
|
72
|
+
unwrap(message) {
|
|
73
|
+
const object = {};
|
|
74
|
+
if (message.fields) {
|
|
75
|
+
for (const key of Object.keys(message.fields)) {
|
|
76
|
+
object[key] = exports.Value.unwrap(message.fields[key]);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return object;
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
function createBaseStruct_FieldsEntry() {
|
|
83
|
+
return { key: "" };
|
|
84
|
+
}
|
|
85
|
+
exports.Struct_FieldsEntry = {
|
|
86
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
87
|
+
if (message.key !== "") {
|
|
88
|
+
writer.uint32(10).string(message.key);
|
|
89
|
+
}
|
|
90
|
+
if (message.value !== undefined) {
|
|
91
|
+
exports.Value.encode(exports.Value.wrap(message.value), writer.uint32(18).fork()).join();
|
|
92
|
+
}
|
|
93
|
+
return writer;
|
|
94
|
+
},
|
|
95
|
+
decode(input, length) {
|
|
96
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
97
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
98
|
+
const message = createBaseStruct_FieldsEntry();
|
|
99
|
+
while (reader.pos < end) {
|
|
100
|
+
const tag = reader.uint32();
|
|
101
|
+
switch (tag >>> 3) {
|
|
102
|
+
case 1: {
|
|
103
|
+
if (tag !== 10) {
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
message.key = reader.string();
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
case 2: {
|
|
110
|
+
if (tag !== 18) {
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
message.value = exports.Value.unwrap(exports.Value.decode(reader, reader.uint32()));
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
reader.skip(tag & 7);
|
|
121
|
+
}
|
|
122
|
+
return message;
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
function createBaseValue() {
|
|
126
|
+
return {};
|
|
127
|
+
}
|
|
128
|
+
exports.Value = {
|
|
129
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
130
|
+
if (message.nullValue !== undefined) {
|
|
131
|
+
writer.uint32(8).int32(message.nullValue);
|
|
132
|
+
}
|
|
133
|
+
if (message.numberValue !== undefined) {
|
|
134
|
+
writer.uint32(17).double(message.numberValue);
|
|
135
|
+
}
|
|
136
|
+
if (message.stringValue !== undefined) {
|
|
137
|
+
writer.uint32(26).string(message.stringValue);
|
|
138
|
+
}
|
|
139
|
+
if (message.boolValue !== undefined) {
|
|
140
|
+
writer.uint32(32).bool(message.boolValue);
|
|
141
|
+
}
|
|
142
|
+
if (message.structValue !== undefined) {
|
|
143
|
+
exports.Struct.encode(exports.Struct.wrap(message.structValue), writer.uint32(42).fork()).join();
|
|
144
|
+
}
|
|
145
|
+
if (message.listValue !== undefined) {
|
|
146
|
+
exports.ListValue.encode(exports.ListValue.wrap(message.listValue), writer.uint32(50).fork()).join();
|
|
147
|
+
}
|
|
148
|
+
return writer;
|
|
149
|
+
},
|
|
150
|
+
decode(input, length) {
|
|
151
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
152
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
153
|
+
const message = createBaseValue();
|
|
154
|
+
while (reader.pos < end) {
|
|
155
|
+
const tag = reader.uint32();
|
|
156
|
+
switch (tag >>> 3) {
|
|
157
|
+
case 1: {
|
|
158
|
+
if (tag !== 8) {
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
message.nullValue = reader.int32();
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
case 2: {
|
|
165
|
+
if (tag !== 17) {
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
message.numberValue = reader.double();
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
case 3: {
|
|
172
|
+
if (tag !== 26) {
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
message.stringValue = reader.string();
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
case 4: {
|
|
179
|
+
if (tag !== 32) {
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
message.boolValue = reader.bool();
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
case 5: {
|
|
186
|
+
if (tag !== 42) {
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
message.structValue = exports.Struct.unwrap(exports.Struct.decode(reader, reader.uint32()));
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
case 6: {
|
|
193
|
+
if (tag !== 50) {
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
message.listValue = exports.ListValue.unwrap(exports.ListValue.decode(reader, reader.uint32()));
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
reader.skip(tag & 7);
|
|
204
|
+
}
|
|
205
|
+
return message;
|
|
206
|
+
},
|
|
207
|
+
wrap(value) {
|
|
208
|
+
const result = {};
|
|
209
|
+
if (value === null) {
|
|
210
|
+
result.nullValue = NullValue.NULL_VALUE;
|
|
211
|
+
}
|
|
212
|
+
else if (typeof value === "boolean") {
|
|
213
|
+
result.boolValue = value;
|
|
214
|
+
}
|
|
215
|
+
else if (typeof value === "number") {
|
|
216
|
+
result.numberValue = value;
|
|
217
|
+
}
|
|
218
|
+
else if (typeof value === "string") {
|
|
219
|
+
result.stringValue = value;
|
|
220
|
+
}
|
|
221
|
+
else if (globalThis.Array.isArray(value)) {
|
|
222
|
+
result.listValue = exports.ListValue.wrap(value);
|
|
223
|
+
}
|
|
224
|
+
else if (typeof value === "object") {
|
|
225
|
+
result.structValue = exports.Struct.wrap(value);
|
|
226
|
+
}
|
|
227
|
+
else if (typeof value !== "undefined") {
|
|
228
|
+
throw new globalThis.Error("Unsupported any value type: " + typeof value);
|
|
229
|
+
}
|
|
230
|
+
return result;
|
|
231
|
+
},
|
|
232
|
+
unwrap(message) {
|
|
233
|
+
if (message?.hasOwnProperty("stringValue") && message.stringValue !== undefined) {
|
|
234
|
+
return message.stringValue;
|
|
235
|
+
}
|
|
236
|
+
else if (message?.hasOwnProperty("numberValue") && message?.numberValue !== undefined) {
|
|
237
|
+
return message.numberValue;
|
|
238
|
+
}
|
|
239
|
+
else if (message?.hasOwnProperty("boolValue") && message?.boolValue !== undefined) {
|
|
240
|
+
return message.boolValue;
|
|
241
|
+
}
|
|
242
|
+
else if (message?.hasOwnProperty("structValue") && message?.structValue !== undefined) {
|
|
243
|
+
return exports.Struct.unwrap(message.structValue);
|
|
244
|
+
}
|
|
245
|
+
else if (message?.hasOwnProperty("listValue") && message?.listValue !== undefined) {
|
|
246
|
+
return exports.ListValue.unwrap(message.listValue);
|
|
247
|
+
}
|
|
248
|
+
else if (message?.hasOwnProperty("nullValue") && message?.nullValue !== undefined) {
|
|
249
|
+
return null;
|
|
250
|
+
}
|
|
251
|
+
return undefined;
|
|
252
|
+
},
|
|
253
|
+
};
|
|
254
|
+
function createBaseListValue() {
|
|
255
|
+
return { values: [] };
|
|
256
|
+
}
|
|
257
|
+
exports.ListValue = {
|
|
258
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
259
|
+
for (const v of message.values) {
|
|
260
|
+
exports.Value.encode(exports.Value.wrap(v), writer.uint32(10).fork()).join();
|
|
261
|
+
}
|
|
262
|
+
return writer;
|
|
263
|
+
},
|
|
264
|
+
decode(input, length) {
|
|
265
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
266
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
267
|
+
const message = createBaseListValue();
|
|
268
|
+
while (reader.pos < end) {
|
|
269
|
+
const tag = reader.uint32();
|
|
270
|
+
switch (tag >>> 3) {
|
|
271
|
+
case 1: {
|
|
272
|
+
if (tag !== 10) {
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
message.values.push(exports.Value.unwrap(exports.Value.decode(reader, reader.uint32())));
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
282
|
+
reader.skip(tag & 7);
|
|
283
|
+
}
|
|
284
|
+
return message;
|
|
285
|
+
},
|
|
286
|
+
wrap(array) {
|
|
287
|
+
const result = createBaseListValue();
|
|
288
|
+
result.values = (array ?? []).map(exports.Value.wrap);
|
|
289
|
+
return result;
|
|
290
|
+
},
|
|
291
|
+
unwrap(message) {
|
|
292
|
+
if (message?.hasOwnProperty("values") && globalThis.Array.isArray(message.values)) {
|
|
293
|
+
return message.values.map(exports.Value.unwrap);
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
return message;
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
};
|
|
300
|
+
protobufjs_1.wrappers[".google.protobuf.Struct"] = { fromObject: exports.Struct.wrap, toObject: exports.Struct.unwrap };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ export { AuthClient } from "./auth/auth.client";
|
|
|
4
4
|
export { OpenAIClient } from "./openai/openai.client";
|
|
5
5
|
export { MessageFns as UserMessageFns, protobufPackage as UserProtobufPackage, User, CreateUserRequest, CreateUserPersonal, UpdateUserRequest, GetByIdRequest, UserResponse, UsersResponse, FindByEmailRequest, FindByPhoneRequest, UpdateUserPersonal, UpdatePasswordRequest, UpdateEmailVerificationRequest, ResetPasswordData, GetEmailVerificationStatusRequest, EmailVerificationStatusResponse, UserServiceService as UserService, } from "./user/user.interface";
|
|
6
6
|
export { MessageFns as AuthMessageFns, protobufPackage as AuthProtobufPackage, LoginCredentials, RegisterCredentials, LogoutRequest, RefreshRequest, AuthResponse, RefreshTokenResponse, RecoverRequest, ResetPasswordRequest, ConfirmEmailRequest, ConfirmEmailResponse, CheckEmailVerifiedRequest, CheckEmailVerifiedResponse, } from "./auth/auth.interface";
|
|
7
|
+
export { MessageFns as AIMessageFns, protobufPackage as AIProtobufPackage, AIRequest, AIResponse, AIServiceService as AIService, } from "./ai/ai.interface";
|
|
7
8
|
export { MessageFns as OpenAIMessageFns, protobufPackage as OpenAIProtobufPackage, CreateRequest as OpenAICreateRequest, CreateResponse as OpenAICreateResponse, OpenAIServiceService as OpenAIService, } from "./openai/openai.interface";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OpenAIService = exports.OpenAICreateResponse = exports.OpenAICreateRequest = exports.OpenAIProtobufPackage = exports.CheckEmailVerifiedResponse = exports.CheckEmailVerifiedRequest = exports.ConfirmEmailResponse = exports.ConfirmEmailRequest = exports.ResetPasswordRequest = exports.RecoverRequest = exports.RefreshTokenResponse = exports.AuthResponse = exports.RefreshRequest = exports.LogoutRequest = exports.RegisterCredentials = exports.LoginCredentials = exports.AuthProtobufPackage = exports.UserService = exports.EmailVerificationStatusResponse = exports.GetEmailVerificationStatusRequest = exports.ResetPasswordData = exports.UpdateEmailVerificationRequest = exports.UpdatePasswordRequest = exports.UpdateUserPersonal = exports.FindByPhoneRequest = exports.FindByEmailRequest = exports.UsersResponse = exports.UserResponse = exports.GetByIdRequest = exports.UpdateUserRequest = exports.CreateUserPersonal = exports.CreateUserRequest = exports.User = exports.UserProtobufPackage = exports.OpenAIClient = exports.AuthClient = exports.UsersClient = exports.SharedModule = void 0;
|
|
3
|
+
exports.OpenAIService = exports.OpenAICreateResponse = exports.OpenAICreateRequest = exports.OpenAIProtobufPackage = exports.AIService = exports.AIResponse = exports.AIRequest = exports.AIProtobufPackage = exports.CheckEmailVerifiedResponse = exports.CheckEmailVerifiedRequest = exports.ConfirmEmailResponse = exports.ConfirmEmailRequest = exports.ResetPasswordRequest = exports.RecoverRequest = exports.RefreshTokenResponse = exports.AuthResponse = exports.RefreshRequest = exports.LogoutRequest = exports.RegisterCredentials = exports.LoginCredentials = exports.AuthProtobufPackage = exports.UserService = exports.EmailVerificationStatusResponse = exports.GetEmailVerificationStatusRequest = exports.ResetPasswordData = exports.UpdateEmailVerificationRequest = exports.UpdatePasswordRequest = exports.UpdateUserPersonal = exports.FindByPhoneRequest = exports.FindByEmailRequest = exports.UsersResponse = exports.UserResponse = exports.GetByIdRequest = exports.UpdateUserRequest = exports.CreateUserPersonal = exports.CreateUserRequest = exports.User = exports.UserProtobufPackage = exports.OpenAIClient = exports.AuthClient = exports.UsersClient = exports.SharedModule = void 0;
|
|
4
4
|
var shared_module_1 = require("./shared.module");
|
|
5
5
|
Object.defineProperty(exports, "SharedModule", { enumerable: true, get: function () { return shared_module_1.SharedModule; } });
|
|
6
6
|
var user_client_1 = require("./user/user.client");
|
|
@@ -48,6 +48,14 @@ Object.defineProperty(exports, "ConfirmEmailResponse", { enumerable: true, get:
|
|
|
48
48
|
Object.defineProperty(exports, "CheckEmailVerifiedRequest", { enumerable: true, get: function () { return auth_interface_1.CheckEmailVerifiedRequest; } });
|
|
49
49
|
Object.defineProperty(exports, "CheckEmailVerifiedResponse", { enumerable: true, get: function () { return auth_interface_1.CheckEmailVerifiedResponse; } });
|
|
50
50
|
// ============================
|
|
51
|
+
// AI exports
|
|
52
|
+
// ============================
|
|
53
|
+
var ai_interface_1 = require("./ai/ai.interface");
|
|
54
|
+
Object.defineProperty(exports, "AIProtobufPackage", { enumerable: true, get: function () { return ai_interface_1.protobufPackage; } });
|
|
55
|
+
Object.defineProperty(exports, "AIRequest", { enumerable: true, get: function () { return ai_interface_1.AIRequest; } });
|
|
56
|
+
Object.defineProperty(exports, "AIResponse", { enumerable: true, get: function () { return ai_interface_1.AIResponse; } });
|
|
57
|
+
Object.defineProperty(exports, "AIService", { enumerable: true, get: function () { return ai_interface_1.AIServiceService; } });
|
|
58
|
+
// ============================
|
|
51
59
|
// OpenAI exports
|
|
52
60
|
// ============================
|
|
53
61
|
var openai_interface_1 = require("./openai/openai.interface");
|
package/dist/shared.module.d.ts
CHANGED
package/dist/shared.module.js
CHANGED
|
@@ -14,6 +14,7 @@ const path_1 = require("path");
|
|
|
14
14
|
const user_client_1 = require("./user/user.client");
|
|
15
15
|
const auth_client_1 = require("./auth/auth.client");
|
|
16
16
|
const openai_client_1 = require("./openai/openai.client");
|
|
17
|
+
const ai_client_1 = require("./ai/ai.client");
|
|
17
18
|
let SharedModule = SharedModule_1 = class SharedModule {
|
|
18
19
|
static forRoot(options = {}) {
|
|
19
20
|
const clients = [];
|
|
@@ -78,6 +79,36 @@ let SharedModule = SharedModule_1 = class SharedModule {
|
|
|
78
79
|
else {
|
|
79
80
|
providers.push({ provide: auth_client_1.AuthClient, useValue: null });
|
|
80
81
|
}
|
|
82
|
+
// AI
|
|
83
|
+
if (options.ai) {
|
|
84
|
+
clients.push({
|
|
85
|
+
name: "AI_PACKAGE",
|
|
86
|
+
transport: microservices_1.Transport.GRPC,
|
|
87
|
+
options: {
|
|
88
|
+
package: "ai",
|
|
89
|
+
protoPath: (0, path_1.resolve)(process.cwd(), options.ai.protoPath),
|
|
90
|
+
url: options.ai.url,
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
providers.push({
|
|
94
|
+
provide: ai_client_1.AIClient,
|
|
95
|
+
useFactory: (client) => {
|
|
96
|
+
const svc = new ai_client_1.AIClient(client);
|
|
97
|
+
try {
|
|
98
|
+
svc.onModuleInit();
|
|
99
|
+
SharedModule_1.logger.log("AIClient initialized successfully");
|
|
100
|
+
}
|
|
101
|
+
catch (err) {
|
|
102
|
+
SharedModule_1.logger.error("AIClient initialization failed", err);
|
|
103
|
+
}
|
|
104
|
+
return svc;
|
|
105
|
+
},
|
|
106
|
+
inject: ["AI_PACKAGE"],
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
providers.push({ provide: ai_client_1.AIClient, useValue: null });
|
|
111
|
+
}
|
|
81
112
|
// OPENAI
|
|
82
113
|
if (options.openai) {
|
|
83
114
|
clients.push({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "geniebox-shared-lib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.46",
|
|
4
4
|
"description": "Shared NestJS library with gRPC clients",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
"build": "tsc",
|
|
12
12
|
"proto:gen:user": "mkdir -p src/user && protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=src/user --ts_proto_opt=nestJs=true,outputServices=grpc-js,returnObservable=false,addGrpcMetadata=true,fileSuffix=.interface,esModuleInterop=true,useOptionals=true -I=../../libs/protos ../../libs/protos/user.proto",
|
|
13
13
|
"proto:gen:auth": "mkdir -p src/auth && protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=src/auth --ts_proto_opt=nestJs=true,outputServices=grpc-js,returnObservable=false,addGrpcMetadata=true,fileSuffix=.interface,esModuleInterop=true,useOptionals=true -I=../../libs/protos ../../libs/protos/auth.proto",
|
|
14
|
+
"proto:gen:ai": "mkdir -p src/ai && protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=src/ai --ts_proto_opt=nestJs=true,outputServices=grpc-js,returnObservable=false,addGrpcMetadata=true,fileSuffix=.interface,esModuleInterop=true,useOptionals=true -I=../../libs/protos ../../libs/protos/ai.proto",
|
|
14
15
|
"proto:gen:openai": "mkdir -p src/openai && protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=src/openai --ts_proto_opt=nestJs=true,outputServices=grpc-js,returnObservable=false,addGrpcMetadata=true,fileSuffix=.interface,esModuleInterop=true,useOptionals=true -I=../../libs/protos ../../libs/protos/openai.proto",
|
|
15
|
-
"proto:gen": "npm run proto:gen:user && npm run proto:gen:auth && npm run proto:gen:openai",
|
|
16
|
+
"proto:gen": "npm run proto:gen:user && npm run proto:gen:auth && npm run proto:gen:openai && npm run proto:gen:ai",
|
|
16
17
|
"generate": "npm run proto:gen && npm run build",
|
|
17
18
|
"prepublishOnly": "npm run build"
|
|
18
19
|
},
|