geniebox-shared-lib 2.1.1 → 2.1.3
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/endpoint.client.d.ts +12 -0
- package/dist/endpoint.client.js +43 -0
- package/dist/endpoint.interface.d.ts +338 -0
- package/dist/endpoint.interface.js +1617 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +36 -23
- package/dist/shared.module.d.ts +1 -1
- package/dist/shared.module.js +13 -13
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OnModuleInit } from "@nestjs/common";
|
|
2
|
+
import { ClientGrpc } from "@nestjs/microservices";
|
|
3
|
+
import { EndpointServiceClient } from "./endpoint.interface";
|
|
4
|
+
export declare class EndpointClient implements OnModuleInit {
|
|
5
|
+
private readonly client;
|
|
6
|
+
private readonly logger;
|
|
7
|
+
private endpointClient?;
|
|
8
|
+
constructor(client: ClientGrpc);
|
|
9
|
+
onModuleInit(): void;
|
|
10
|
+
get service(): EndpointServiceClient;
|
|
11
|
+
isReady(): boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 EndpointClient_1;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.EndpointClient = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
let EndpointClient = EndpointClient_1 = class EndpointClient {
|
|
19
|
+
constructor(client) {
|
|
20
|
+
this.client = client;
|
|
21
|
+
this.logger = new common_1.Logger(EndpointClient_1.name);
|
|
22
|
+
}
|
|
23
|
+
onModuleInit() {
|
|
24
|
+
this.endpointClient =
|
|
25
|
+
this.client.getService("EndpointService");
|
|
26
|
+
this.logger.log("EndpointServiceClient initialized");
|
|
27
|
+
}
|
|
28
|
+
get service() {
|
|
29
|
+
if (!this.endpointClient) {
|
|
30
|
+
throw new common_1.InternalServerErrorException("EndpointService is not initialized yet");
|
|
31
|
+
}
|
|
32
|
+
return this.endpointClient;
|
|
33
|
+
}
|
|
34
|
+
isReady() {
|
|
35
|
+
return !!this.endpointClient;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.EndpointClient = EndpointClient;
|
|
39
|
+
exports.EndpointClient = EndpointClient = EndpointClient_1 = __decorate([
|
|
40
|
+
(0, common_1.Injectable)(),
|
|
41
|
+
__param(0, (0, common_1.Inject)("ENDPOINT_PACKAGE")),
|
|
42
|
+
__metadata("design:paramtypes", [Object])
|
|
43
|
+
], EndpointClient);
|
|
@@ -0,0 +1,338 @@
|
|
|
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 = "endpoint";
|
|
5
|
+
export interface Provider {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
displayName: string;
|
|
9
|
+
description: string;
|
|
10
|
+
baseUrl: string;
|
|
11
|
+
isActive: boolean;
|
|
12
|
+
/** JSON string */
|
|
13
|
+
metadata: string;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
}
|
|
17
|
+
export interface Model {
|
|
18
|
+
id: string;
|
|
19
|
+
providerId: string;
|
|
20
|
+
providerName: string;
|
|
21
|
+
name: string;
|
|
22
|
+
displayName: string;
|
|
23
|
+
description: string;
|
|
24
|
+
contextWindow: number;
|
|
25
|
+
maxTokens: number;
|
|
26
|
+
supportStreaming: boolean;
|
|
27
|
+
isActive: boolean;
|
|
28
|
+
/** JSON string */
|
|
29
|
+
metadata: string;
|
|
30
|
+
createdAt: string;
|
|
31
|
+
updatedAt: string;
|
|
32
|
+
}
|
|
33
|
+
export interface Pricing {
|
|
34
|
+
id: string;
|
|
35
|
+
modelId: string;
|
|
36
|
+
modelName: string;
|
|
37
|
+
/** price per 1000 input tokens */
|
|
38
|
+
inputTokenPrice: number;
|
|
39
|
+
/** price per 1000 output tokens */
|
|
40
|
+
outputTokenPrice: number;
|
|
41
|
+
currency: string;
|
|
42
|
+
effectiveFrom: string;
|
|
43
|
+
effectiveTo: string;
|
|
44
|
+
createdAt: string;
|
|
45
|
+
updatedAt: string;
|
|
46
|
+
}
|
|
47
|
+
export interface EndpointConfig {
|
|
48
|
+
id: string;
|
|
49
|
+
path: string;
|
|
50
|
+
providerId: string;
|
|
51
|
+
providerName: string;
|
|
52
|
+
queueName: string;
|
|
53
|
+
methods: string[];
|
|
54
|
+
description: string;
|
|
55
|
+
isActive: boolean;
|
|
56
|
+
/** JSON string */
|
|
57
|
+
metadata: string;
|
|
58
|
+
createdAt: string;
|
|
59
|
+
updatedAt: string;
|
|
60
|
+
}
|
|
61
|
+
export interface EndpointRequest {
|
|
62
|
+
/** e.g.: /openai/create */
|
|
63
|
+
path: string;
|
|
64
|
+
}
|
|
65
|
+
export interface ProvidersRequest {
|
|
66
|
+
/** only active providers */
|
|
67
|
+
activeOnly: boolean;
|
|
68
|
+
}
|
|
69
|
+
export interface ModelsRequest {
|
|
70
|
+
/** filter by provider */
|
|
71
|
+
providerId: string;
|
|
72
|
+
/** only active models */
|
|
73
|
+
activeOnly: boolean;
|
|
74
|
+
}
|
|
75
|
+
export interface PricingRequest {
|
|
76
|
+
/** filter by model */
|
|
77
|
+
modelId: string;
|
|
78
|
+
/** currency (USD, EUR, etc.) */
|
|
79
|
+
currency: string;
|
|
80
|
+
}
|
|
81
|
+
export interface ValidateEndpointRequest {
|
|
82
|
+
path: string;
|
|
83
|
+
/** GET, POST, etc. */
|
|
84
|
+
method: string;
|
|
85
|
+
}
|
|
86
|
+
export interface CreateEndpointRequest {
|
|
87
|
+
/** required, must be unique */
|
|
88
|
+
path: string;
|
|
89
|
+
/** required */
|
|
90
|
+
providerId: string;
|
|
91
|
+
/** required */
|
|
92
|
+
queueName: string;
|
|
93
|
+
/** required, e.g. ["POST"] */
|
|
94
|
+
methods: string[];
|
|
95
|
+
/** optional */
|
|
96
|
+
description: string;
|
|
97
|
+
/** optional, defaults to true */
|
|
98
|
+
isActive: boolean;
|
|
99
|
+
/** optional, JSON string */
|
|
100
|
+
metadata: string;
|
|
101
|
+
}
|
|
102
|
+
export interface UpdateEndpointRequest {
|
|
103
|
+
/** required */
|
|
104
|
+
id: string;
|
|
105
|
+
/** optional */
|
|
106
|
+
path: string;
|
|
107
|
+
/** optional */
|
|
108
|
+
providerId: string;
|
|
109
|
+
/** optional */
|
|
110
|
+
queueName: string;
|
|
111
|
+
/** optional */
|
|
112
|
+
methods: string[];
|
|
113
|
+
/** optional */
|
|
114
|
+
description: string;
|
|
115
|
+
/** optional */
|
|
116
|
+
isActive: boolean;
|
|
117
|
+
/** optional, JSON string */
|
|
118
|
+
metadata: string;
|
|
119
|
+
}
|
|
120
|
+
export interface GetEndpointByIdRequest {
|
|
121
|
+
/** required */
|
|
122
|
+
id: string;
|
|
123
|
+
}
|
|
124
|
+
export interface ListEndpointsRequest {
|
|
125
|
+
/** optional, filter by isActive */
|
|
126
|
+
activeOnly: boolean;
|
|
127
|
+
/** optional, filter by provider */
|
|
128
|
+
providerId: string;
|
|
129
|
+
}
|
|
130
|
+
export interface DeleteEndpointRequest {
|
|
131
|
+
/** required */
|
|
132
|
+
id: string;
|
|
133
|
+
/** optional, if true performs hard delete, otherwise soft delete (isActive=false) */
|
|
134
|
+
hardDelete: boolean;
|
|
135
|
+
}
|
|
136
|
+
export interface ProvidersResponse {
|
|
137
|
+
providers: Provider[];
|
|
138
|
+
}
|
|
139
|
+
export interface ModelsResponse {
|
|
140
|
+
models: Model[];
|
|
141
|
+
}
|
|
142
|
+
export interface PricingResponse {
|
|
143
|
+
pricing: Pricing[];
|
|
144
|
+
}
|
|
145
|
+
export interface ValidateEndpointResponse {
|
|
146
|
+
isValid: boolean;
|
|
147
|
+
error: string;
|
|
148
|
+
config?: EndpointConfig | undefined;
|
|
149
|
+
}
|
|
150
|
+
export interface CreateEndpointResponse {
|
|
151
|
+
endpoint?: EndpointConfig | undefined;
|
|
152
|
+
success: boolean;
|
|
153
|
+
error: string;
|
|
154
|
+
}
|
|
155
|
+
export interface UpdateEndpointResponse {
|
|
156
|
+
endpoint?: EndpointConfig | undefined;
|
|
157
|
+
success: boolean;
|
|
158
|
+
error: string;
|
|
159
|
+
}
|
|
160
|
+
export interface GetEndpointByIdResponse {
|
|
161
|
+
endpoint?: EndpointConfig | undefined;
|
|
162
|
+
found: boolean;
|
|
163
|
+
}
|
|
164
|
+
export interface ListEndpointsResponse {
|
|
165
|
+
endpoints: EndpointConfig[];
|
|
166
|
+
total: number;
|
|
167
|
+
}
|
|
168
|
+
export interface DeleteEndpointResponse {
|
|
169
|
+
success: boolean;
|
|
170
|
+
error: string;
|
|
171
|
+
}
|
|
172
|
+
export declare const ENDPOINT_PACKAGE_NAME = "endpoint";
|
|
173
|
+
export declare const Provider: MessageFns<Provider>;
|
|
174
|
+
export declare const Model: MessageFns<Model>;
|
|
175
|
+
export declare const Pricing: MessageFns<Pricing>;
|
|
176
|
+
export declare const EndpointConfig: MessageFns<EndpointConfig>;
|
|
177
|
+
export declare const EndpointRequest: MessageFns<EndpointRequest>;
|
|
178
|
+
export declare const ProvidersRequest: MessageFns<ProvidersRequest>;
|
|
179
|
+
export declare const ModelsRequest: MessageFns<ModelsRequest>;
|
|
180
|
+
export declare const PricingRequest: MessageFns<PricingRequest>;
|
|
181
|
+
export declare const ValidateEndpointRequest: MessageFns<ValidateEndpointRequest>;
|
|
182
|
+
export declare const CreateEndpointRequest: MessageFns<CreateEndpointRequest>;
|
|
183
|
+
export declare const UpdateEndpointRequest: MessageFns<UpdateEndpointRequest>;
|
|
184
|
+
export declare const GetEndpointByIdRequest: MessageFns<GetEndpointByIdRequest>;
|
|
185
|
+
export declare const ListEndpointsRequest: MessageFns<ListEndpointsRequest>;
|
|
186
|
+
export declare const DeleteEndpointRequest: MessageFns<DeleteEndpointRequest>;
|
|
187
|
+
export declare const ProvidersResponse: MessageFns<ProvidersResponse>;
|
|
188
|
+
export declare const ModelsResponse: MessageFns<ModelsResponse>;
|
|
189
|
+
export declare const PricingResponse: MessageFns<PricingResponse>;
|
|
190
|
+
export declare const ValidateEndpointResponse: MessageFns<ValidateEndpointResponse>;
|
|
191
|
+
export declare const CreateEndpointResponse: MessageFns<CreateEndpointResponse>;
|
|
192
|
+
export declare const UpdateEndpointResponse: MessageFns<UpdateEndpointResponse>;
|
|
193
|
+
export declare const GetEndpointByIdResponse: MessageFns<GetEndpointByIdResponse>;
|
|
194
|
+
export declare const ListEndpointsResponse: MessageFns<ListEndpointsResponse>;
|
|
195
|
+
export declare const DeleteEndpointResponse: MessageFns<DeleteEndpointResponse>;
|
|
196
|
+
export interface EndpointServiceClient {
|
|
197
|
+
/** Existing methods */
|
|
198
|
+
getEndpointConfig(request: EndpointRequest, metadata?: Metadata): Observable<EndpointConfig>;
|
|
199
|
+
getProviders(request: ProvidersRequest, metadata?: Metadata): Observable<ProvidersResponse>;
|
|
200
|
+
getModels(request: ModelsRequest, metadata?: Metadata): Observable<ModelsResponse>;
|
|
201
|
+
getPricing(request: PricingRequest, metadata?: Metadata): Observable<PricingResponse>;
|
|
202
|
+
validateEndpoint(request: ValidateEndpointRequest, metadata?: Metadata): Observable<ValidateEndpointResponse>;
|
|
203
|
+
/** CRUD methods for endpoints */
|
|
204
|
+
createEndpoint(request: CreateEndpointRequest, metadata?: Metadata): Observable<CreateEndpointResponse>;
|
|
205
|
+
updateEndpoint(request: UpdateEndpointRequest, metadata?: Metadata): Observable<UpdateEndpointResponse>;
|
|
206
|
+
getEndpointById(request: GetEndpointByIdRequest, metadata?: Metadata): Observable<GetEndpointByIdResponse>;
|
|
207
|
+
listEndpoints(request: ListEndpointsRequest, metadata?: Metadata): Observable<ListEndpointsResponse>;
|
|
208
|
+
deleteEndpoint(request: DeleteEndpointRequest, metadata?: Metadata): Observable<DeleteEndpointResponse>;
|
|
209
|
+
}
|
|
210
|
+
export interface EndpointServiceController {
|
|
211
|
+
/** Existing methods */
|
|
212
|
+
getEndpointConfig(request: EndpointRequest, metadata?: Metadata): Promise<EndpointConfig> | Observable<EndpointConfig> | EndpointConfig;
|
|
213
|
+
getProviders(request: ProvidersRequest, metadata?: Metadata): Promise<ProvidersResponse> | Observable<ProvidersResponse> | ProvidersResponse;
|
|
214
|
+
getModels(request: ModelsRequest, metadata?: Metadata): Promise<ModelsResponse> | Observable<ModelsResponse> | ModelsResponse;
|
|
215
|
+
getPricing(request: PricingRequest, metadata?: Metadata): Promise<PricingResponse> | Observable<PricingResponse> | PricingResponse;
|
|
216
|
+
validateEndpoint(request: ValidateEndpointRequest, metadata?: Metadata): Promise<ValidateEndpointResponse> | Observable<ValidateEndpointResponse> | ValidateEndpointResponse;
|
|
217
|
+
/** CRUD methods for endpoints */
|
|
218
|
+
createEndpoint(request: CreateEndpointRequest, metadata?: Metadata): Promise<CreateEndpointResponse> | Observable<CreateEndpointResponse> | CreateEndpointResponse;
|
|
219
|
+
updateEndpoint(request: UpdateEndpointRequest, metadata?: Metadata): Promise<UpdateEndpointResponse> | Observable<UpdateEndpointResponse> | UpdateEndpointResponse;
|
|
220
|
+
getEndpointById(request: GetEndpointByIdRequest, metadata?: Metadata): Promise<GetEndpointByIdResponse> | Observable<GetEndpointByIdResponse> | GetEndpointByIdResponse;
|
|
221
|
+
listEndpoints(request: ListEndpointsRequest, metadata?: Metadata): Promise<ListEndpointsResponse> | Observable<ListEndpointsResponse> | ListEndpointsResponse;
|
|
222
|
+
deleteEndpoint(request: DeleteEndpointRequest, metadata?: Metadata): Promise<DeleteEndpointResponse> | Observable<DeleteEndpointResponse> | DeleteEndpointResponse;
|
|
223
|
+
}
|
|
224
|
+
export declare function EndpointServiceControllerMethods(): (constructor: Function) => void;
|
|
225
|
+
export declare const ENDPOINT_SERVICE_NAME = "EndpointService";
|
|
226
|
+
export type EndpointServiceService = typeof EndpointServiceService;
|
|
227
|
+
export declare const EndpointServiceService: {
|
|
228
|
+
/** Existing methods */
|
|
229
|
+
readonly getEndpointConfig: {
|
|
230
|
+
readonly path: "/endpoint.EndpointService/GetEndpointConfig";
|
|
231
|
+
readonly requestStream: false;
|
|
232
|
+
readonly responseStream: false;
|
|
233
|
+
readonly requestSerialize: (value: EndpointRequest) => Buffer;
|
|
234
|
+
readonly requestDeserialize: (value: Buffer) => EndpointRequest;
|
|
235
|
+
readonly responseSerialize: (value: EndpointConfig) => Buffer;
|
|
236
|
+
readonly responseDeserialize: (value: Buffer) => EndpointConfig;
|
|
237
|
+
};
|
|
238
|
+
readonly getProviders: {
|
|
239
|
+
readonly path: "/endpoint.EndpointService/GetProviders";
|
|
240
|
+
readonly requestStream: false;
|
|
241
|
+
readonly responseStream: false;
|
|
242
|
+
readonly requestSerialize: (value: ProvidersRequest) => Buffer;
|
|
243
|
+
readonly requestDeserialize: (value: Buffer) => ProvidersRequest;
|
|
244
|
+
readonly responseSerialize: (value: ProvidersResponse) => Buffer;
|
|
245
|
+
readonly responseDeserialize: (value: Buffer) => ProvidersResponse;
|
|
246
|
+
};
|
|
247
|
+
readonly getModels: {
|
|
248
|
+
readonly path: "/endpoint.EndpointService/GetModels";
|
|
249
|
+
readonly requestStream: false;
|
|
250
|
+
readonly responseStream: false;
|
|
251
|
+
readonly requestSerialize: (value: ModelsRequest) => Buffer;
|
|
252
|
+
readonly requestDeserialize: (value: Buffer) => ModelsRequest;
|
|
253
|
+
readonly responseSerialize: (value: ModelsResponse) => Buffer;
|
|
254
|
+
readonly responseDeserialize: (value: Buffer) => ModelsResponse;
|
|
255
|
+
};
|
|
256
|
+
readonly getPricing: {
|
|
257
|
+
readonly path: "/endpoint.EndpointService/GetPricing";
|
|
258
|
+
readonly requestStream: false;
|
|
259
|
+
readonly responseStream: false;
|
|
260
|
+
readonly requestSerialize: (value: PricingRequest) => Buffer;
|
|
261
|
+
readonly requestDeserialize: (value: Buffer) => PricingRequest;
|
|
262
|
+
readonly responseSerialize: (value: PricingResponse) => Buffer;
|
|
263
|
+
readonly responseDeserialize: (value: Buffer) => PricingResponse;
|
|
264
|
+
};
|
|
265
|
+
readonly validateEndpoint: {
|
|
266
|
+
readonly path: "/endpoint.EndpointService/ValidateEndpoint";
|
|
267
|
+
readonly requestStream: false;
|
|
268
|
+
readonly responseStream: false;
|
|
269
|
+
readonly requestSerialize: (value: ValidateEndpointRequest) => Buffer;
|
|
270
|
+
readonly requestDeserialize: (value: Buffer) => ValidateEndpointRequest;
|
|
271
|
+
readonly responseSerialize: (value: ValidateEndpointResponse) => Buffer;
|
|
272
|
+
readonly responseDeserialize: (value: Buffer) => ValidateEndpointResponse;
|
|
273
|
+
};
|
|
274
|
+
/** CRUD methods for endpoints */
|
|
275
|
+
readonly createEndpoint: {
|
|
276
|
+
readonly path: "/endpoint.EndpointService/CreateEndpoint";
|
|
277
|
+
readonly requestStream: false;
|
|
278
|
+
readonly responseStream: false;
|
|
279
|
+
readonly requestSerialize: (value: CreateEndpointRequest) => Buffer;
|
|
280
|
+
readonly requestDeserialize: (value: Buffer) => CreateEndpointRequest;
|
|
281
|
+
readonly responseSerialize: (value: CreateEndpointResponse) => Buffer;
|
|
282
|
+
readonly responseDeserialize: (value: Buffer) => CreateEndpointResponse;
|
|
283
|
+
};
|
|
284
|
+
readonly updateEndpoint: {
|
|
285
|
+
readonly path: "/endpoint.EndpointService/UpdateEndpoint";
|
|
286
|
+
readonly requestStream: false;
|
|
287
|
+
readonly responseStream: false;
|
|
288
|
+
readonly requestSerialize: (value: UpdateEndpointRequest) => Buffer;
|
|
289
|
+
readonly requestDeserialize: (value: Buffer) => UpdateEndpointRequest;
|
|
290
|
+
readonly responseSerialize: (value: UpdateEndpointResponse) => Buffer;
|
|
291
|
+
readonly responseDeserialize: (value: Buffer) => UpdateEndpointResponse;
|
|
292
|
+
};
|
|
293
|
+
readonly getEndpointById: {
|
|
294
|
+
readonly path: "/endpoint.EndpointService/GetEndpointById";
|
|
295
|
+
readonly requestStream: false;
|
|
296
|
+
readonly responseStream: false;
|
|
297
|
+
readonly requestSerialize: (value: GetEndpointByIdRequest) => Buffer;
|
|
298
|
+
readonly requestDeserialize: (value: Buffer) => GetEndpointByIdRequest;
|
|
299
|
+
readonly responseSerialize: (value: GetEndpointByIdResponse) => Buffer;
|
|
300
|
+
readonly responseDeserialize: (value: Buffer) => GetEndpointByIdResponse;
|
|
301
|
+
};
|
|
302
|
+
readonly listEndpoints: {
|
|
303
|
+
readonly path: "/endpoint.EndpointService/ListEndpoints";
|
|
304
|
+
readonly requestStream: false;
|
|
305
|
+
readonly responseStream: false;
|
|
306
|
+
readonly requestSerialize: (value: ListEndpointsRequest) => Buffer;
|
|
307
|
+
readonly requestDeserialize: (value: Buffer) => ListEndpointsRequest;
|
|
308
|
+
readonly responseSerialize: (value: ListEndpointsResponse) => Buffer;
|
|
309
|
+
readonly responseDeserialize: (value: Buffer) => ListEndpointsResponse;
|
|
310
|
+
};
|
|
311
|
+
readonly deleteEndpoint: {
|
|
312
|
+
readonly path: "/endpoint.EndpointService/DeleteEndpoint";
|
|
313
|
+
readonly requestStream: false;
|
|
314
|
+
readonly responseStream: false;
|
|
315
|
+
readonly requestSerialize: (value: DeleteEndpointRequest) => Buffer;
|
|
316
|
+
readonly requestDeserialize: (value: Buffer) => DeleteEndpointRequest;
|
|
317
|
+
readonly responseSerialize: (value: DeleteEndpointResponse) => Buffer;
|
|
318
|
+
readonly responseDeserialize: (value: Buffer) => DeleteEndpointResponse;
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
export interface EndpointServiceServer extends UntypedServiceImplementation {
|
|
322
|
+
/** Existing methods */
|
|
323
|
+
getEndpointConfig: handleUnaryCall<EndpointRequest, EndpointConfig>;
|
|
324
|
+
getProviders: handleUnaryCall<ProvidersRequest, ProvidersResponse>;
|
|
325
|
+
getModels: handleUnaryCall<ModelsRequest, ModelsResponse>;
|
|
326
|
+
getPricing: handleUnaryCall<PricingRequest, PricingResponse>;
|
|
327
|
+
validateEndpoint: handleUnaryCall<ValidateEndpointRequest, ValidateEndpointResponse>;
|
|
328
|
+
/** CRUD methods for endpoints */
|
|
329
|
+
createEndpoint: handleUnaryCall<CreateEndpointRequest, CreateEndpointResponse>;
|
|
330
|
+
updateEndpoint: handleUnaryCall<UpdateEndpointRequest, UpdateEndpointResponse>;
|
|
331
|
+
getEndpointById: handleUnaryCall<GetEndpointByIdRequest, GetEndpointByIdResponse>;
|
|
332
|
+
listEndpoints: handleUnaryCall<ListEndpointsRequest, ListEndpointsResponse>;
|
|
333
|
+
deleteEndpoint: handleUnaryCall<DeleteEndpointRequest, DeleteEndpointResponse>;
|
|
334
|
+
}
|
|
335
|
+
export interface MessageFns<T> {
|
|
336
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
337
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
338
|
+
}
|