geniebox-shared-lib 2.1.2 → 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.
@@ -0,0 +1,1617 @@
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: endpoint.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.EndpointServiceService = exports.ENDPOINT_SERVICE_NAME = exports.DeleteEndpointResponse = exports.ListEndpointsResponse = exports.GetEndpointByIdResponse = exports.UpdateEndpointResponse = exports.CreateEndpointResponse = exports.ValidateEndpointResponse = exports.PricingResponse = exports.ModelsResponse = exports.ProvidersResponse = exports.DeleteEndpointRequest = exports.ListEndpointsRequest = exports.GetEndpointByIdRequest = exports.UpdateEndpointRequest = exports.CreateEndpointRequest = exports.ValidateEndpointRequest = exports.PricingRequest = exports.ModelsRequest = exports.ProvidersRequest = exports.EndpointRequest = exports.EndpointConfig = exports.Pricing = exports.Model = exports.Provider = exports.ENDPOINT_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.EndpointServiceControllerMethods = EndpointServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const wire_1 = require("@bufbuild/protobuf/wire");
12
+ const microservices_1 = require("@nestjs/microservices");
13
+ exports.protobufPackage = "endpoint";
14
+ exports.ENDPOINT_PACKAGE_NAME = "endpoint";
15
+ function createBaseProvider() {
16
+ return {
17
+ id: "",
18
+ name: "",
19
+ displayName: "",
20
+ description: "",
21
+ baseUrl: "",
22
+ isActive: false,
23
+ metadata: "",
24
+ createdAt: "",
25
+ updatedAt: "",
26
+ };
27
+ }
28
+ exports.Provider = {
29
+ encode(message, writer = new wire_1.BinaryWriter()) {
30
+ if (message.id !== "") {
31
+ writer.uint32(10).string(message.id);
32
+ }
33
+ if (message.name !== "") {
34
+ writer.uint32(18).string(message.name);
35
+ }
36
+ if (message.displayName !== "") {
37
+ writer.uint32(26).string(message.displayName);
38
+ }
39
+ if (message.description !== "") {
40
+ writer.uint32(34).string(message.description);
41
+ }
42
+ if (message.baseUrl !== "") {
43
+ writer.uint32(42).string(message.baseUrl);
44
+ }
45
+ if (message.isActive !== false) {
46
+ writer.uint32(48).bool(message.isActive);
47
+ }
48
+ if (message.metadata !== "") {
49
+ writer.uint32(58).string(message.metadata);
50
+ }
51
+ if (message.createdAt !== "") {
52
+ writer.uint32(66).string(message.createdAt);
53
+ }
54
+ if (message.updatedAt !== "") {
55
+ writer.uint32(74).string(message.updatedAt);
56
+ }
57
+ return writer;
58
+ },
59
+ decode(input, length) {
60
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
61
+ const end = length === undefined ? reader.len : reader.pos + length;
62
+ const message = createBaseProvider();
63
+ while (reader.pos < end) {
64
+ const tag = reader.uint32();
65
+ switch (tag >>> 3) {
66
+ case 1: {
67
+ if (tag !== 10) {
68
+ break;
69
+ }
70
+ message.id = reader.string();
71
+ continue;
72
+ }
73
+ case 2: {
74
+ if (tag !== 18) {
75
+ break;
76
+ }
77
+ message.name = reader.string();
78
+ continue;
79
+ }
80
+ case 3: {
81
+ if (tag !== 26) {
82
+ break;
83
+ }
84
+ message.displayName = reader.string();
85
+ continue;
86
+ }
87
+ case 4: {
88
+ if (tag !== 34) {
89
+ break;
90
+ }
91
+ message.description = reader.string();
92
+ continue;
93
+ }
94
+ case 5: {
95
+ if (tag !== 42) {
96
+ break;
97
+ }
98
+ message.baseUrl = reader.string();
99
+ continue;
100
+ }
101
+ case 6: {
102
+ if (tag !== 48) {
103
+ break;
104
+ }
105
+ message.isActive = reader.bool();
106
+ continue;
107
+ }
108
+ case 7: {
109
+ if (tag !== 58) {
110
+ break;
111
+ }
112
+ message.metadata = reader.string();
113
+ continue;
114
+ }
115
+ case 8: {
116
+ if (tag !== 66) {
117
+ break;
118
+ }
119
+ message.createdAt = reader.string();
120
+ continue;
121
+ }
122
+ case 9: {
123
+ if (tag !== 74) {
124
+ break;
125
+ }
126
+ message.updatedAt = reader.string();
127
+ continue;
128
+ }
129
+ }
130
+ if ((tag & 7) === 4 || tag === 0) {
131
+ break;
132
+ }
133
+ reader.skip(tag & 7);
134
+ }
135
+ return message;
136
+ },
137
+ };
138
+ function createBaseModel() {
139
+ return {
140
+ id: "",
141
+ providerId: "",
142
+ providerName: "",
143
+ name: "",
144
+ displayName: "",
145
+ description: "",
146
+ contextWindow: 0,
147
+ maxTokens: 0,
148
+ supportStreaming: false,
149
+ isActive: false,
150
+ metadata: "",
151
+ createdAt: "",
152
+ updatedAt: "",
153
+ };
154
+ }
155
+ exports.Model = {
156
+ encode(message, writer = new wire_1.BinaryWriter()) {
157
+ if (message.id !== "") {
158
+ writer.uint32(10).string(message.id);
159
+ }
160
+ if (message.providerId !== "") {
161
+ writer.uint32(18).string(message.providerId);
162
+ }
163
+ if (message.providerName !== "") {
164
+ writer.uint32(26).string(message.providerName);
165
+ }
166
+ if (message.name !== "") {
167
+ writer.uint32(34).string(message.name);
168
+ }
169
+ if (message.displayName !== "") {
170
+ writer.uint32(42).string(message.displayName);
171
+ }
172
+ if (message.description !== "") {
173
+ writer.uint32(50).string(message.description);
174
+ }
175
+ if (message.contextWindow !== 0) {
176
+ writer.uint32(56).int32(message.contextWindow);
177
+ }
178
+ if (message.maxTokens !== 0) {
179
+ writer.uint32(64).int32(message.maxTokens);
180
+ }
181
+ if (message.supportStreaming !== false) {
182
+ writer.uint32(72).bool(message.supportStreaming);
183
+ }
184
+ if (message.isActive !== false) {
185
+ writer.uint32(80).bool(message.isActive);
186
+ }
187
+ if (message.metadata !== "") {
188
+ writer.uint32(90).string(message.metadata);
189
+ }
190
+ if (message.createdAt !== "") {
191
+ writer.uint32(98).string(message.createdAt);
192
+ }
193
+ if (message.updatedAt !== "") {
194
+ writer.uint32(106).string(message.updatedAt);
195
+ }
196
+ return writer;
197
+ },
198
+ decode(input, length) {
199
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
200
+ const end = length === undefined ? reader.len : reader.pos + length;
201
+ const message = createBaseModel();
202
+ while (reader.pos < end) {
203
+ const tag = reader.uint32();
204
+ switch (tag >>> 3) {
205
+ case 1: {
206
+ if (tag !== 10) {
207
+ break;
208
+ }
209
+ message.id = reader.string();
210
+ continue;
211
+ }
212
+ case 2: {
213
+ if (tag !== 18) {
214
+ break;
215
+ }
216
+ message.providerId = reader.string();
217
+ continue;
218
+ }
219
+ case 3: {
220
+ if (tag !== 26) {
221
+ break;
222
+ }
223
+ message.providerName = reader.string();
224
+ continue;
225
+ }
226
+ case 4: {
227
+ if (tag !== 34) {
228
+ break;
229
+ }
230
+ message.name = reader.string();
231
+ continue;
232
+ }
233
+ case 5: {
234
+ if (tag !== 42) {
235
+ break;
236
+ }
237
+ message.displayName = reader.string();
238
+ continue;
239
+ }
240
+ case 6: {
241
+ if (tag !== 50) {
242
+ break;
243
+ }
244
+ message.description = reader.string();
245
+ continue;
246
+ }
247
+ case 7: {
248
+ if (tag !== 56) {
249
+ break;
250
+ }
251
+ message.contextWindow = reader.int32();
252
+ continue;
253
+ }
254
+ case 8: {
255
+ if (tag !== 64) {
256
+ break;
257
+ }
258
+ message.maxTokens = reader.int32();
259
+ continue;
260
+ }
261
+ case 9: {
262
+ if (tag !== 72) {
263
+ break;
264
+ }
265
+ message.supportStreaming = reader.bool();
266
+ continue;
267
+ }
268
+ case 10: {
269
+ if (tag !== 80) {
270
+ break;
271
+ }
272
+ message.isActive = reader.bool();
273
+ continue;
274
+ }
275
+ case 11: {
276
+ if (tag !== 90) {
277
+ break;
278
+ }
279
+ message.metadata = reader.string();
280
+ continue;
281
+ }
282
+ case 12: {
283
+ if (tag !== 98) {
284
+ break;
285
+ }
286
+ message.createdAt = reader.string();
287
+ continue;
288
+ }
289
+ case 13: {
290
+ if (tag !== 106) {
291
+ break;
292
+ }
293
+ message.updatedAt = reader.string();
294
+ continue;
295
+ }
296
+ }
297
+ if ((tag & 7) === 4 || tag === 0) {
298
+ break;
299
+ }
300
+ reader.skip(tag & 7);
301
+ }
302
+ return message;
303
+ },
304
+ };
305
+ function createBasePricing() {
306
+ return {
307
+ id: "",
308
+ modelId: "",
309
+ modelName: "",
310
+ inputTokenPrice: 0,
311
+ outputTokenPrice: 0,
312
+ currency: "",
313
+ effectiveFrom: "",
314
+ effectiveTo: "",
315
+ createdAt: "",
316
+ updatedAt: "",
317
+ };
318
+ }
319
+ exports.Pricing = {
320
+ encode(message, writer = new wire_1.BinaryWriter()) {
321
+ if (message.id !== "") {
322
+ writer.uint32(10).string(message.id);
323
+ }
324
+ if (message.modelId !== "") {
325
+ writer.uint32(18).string(message.modelId);
326
+ }
327
+ if (message.modelName !== "") {
328
+ writer.uint32(26).string(message.modelName);
329
+ }
330
+ if (message.inputTokenPrice !== 0) {
331
+ writer.uint32(33).double(message.inputTokenPrice);
332
+ }
333
+ if (message.outputTokenPrice !== 0) {
334
+ writer.uint32(41).double(message.outputTokenPrice);
335
+ }
336
+ if (message.currency !== "") {
337
+ writer.uint32(50).string(message.currency);
338
+ }
339
+ if (message.effectiveFrom !== "") {
340
+ writer.uint32(58).string(message.effectiveFrom);
341
+ }
342
+ if (message.effectiveTo !== "") {
343
+ writer.uint32(66).string(message.effectiveTo);
344
+ }
345
+ if (message.createdAt !== "") {
346
+ writer.uint32(74).string(message.createdAt);
347
+ }
348
+ if (message.updatedAt !== "") {
349
+ writer.uint32(82).string(message.updatedAt);
350
+ }
351
+ return writer;
352
+ },
353
+ decode(input, length) {
354
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
355
+ const end = length === undefined ? reader.len : reader.pos + length;
356
+ const message = createBasePricing();
357
+ while (reader.pos < end) {
358
+ const tag = reader.uint32();
359
+ switch (tag >>> 3) {
360
+ case 1: {
361
+ if (tag !== 10) {
362
+ break;
363
+ }
364
+ message.id = reader.string();
365
+ continue;
366
+ }
367
+ case 2: {
368
+ if (tag !== 18) {
369
+ break;
370
+ }
371
+ message.modelId = reader.string();
372
+ continue;
373
+ }
374
+ case 3: {
375
+ if (tag !== 26) {
376
+ break;
377
+ }
378
+ message.modelName = reader.string();
379
+ continue;
380
+ }
381
+ case 4: {
382
+ if (tag !== 33) {
383
+ break;
384
+ }
385
+ message.inputTokenPrice = reader.double();
386
+ continue;
387
+ }
388
+ case 5: {
389
+ if (tag !== 41) {
390
+ break;
391
+ }
392
+ message.outputTokenPrice = reader.double();
393
+ continue;
394
+ }
395
+ case 6: {
396
+ if (tag !== 50) {
397
+ break;
398
+ }
399
+ message.currency = reader.string();
400
+ continue;
401
+ }
402
+ case 7: {
403
+ if (tag !== 58) {
404
+ break;
405
+ }
406
+ message.effectiveFrom = reader.string();
407
+ continue;
408
+ }
409
+ case 8: {
410
+ if (tag !== 66) {
411
+ break;
412
+ }
413
+ message.effectiveTo = reader.string();
414
+ continue;
415
+ }
416
+ case 9: {
417
+ if (tag !== 74) {
418
+ break;
419
+ }
420
+ message.createdAt = reader.string();
421
+ continue;
422
+ }
423
+ case 10: {
424
+ if (tag !== 82) {
425
+ break;
426
+ }
427
+ message.updatedAt = reader.string();
428
+ continue;
429
+ }
430
+ }
431
+ if ((tag & 7) === 4 || tag === 0) {
432
+ break;
433
+ }
434
+ reader.skip(tag & 7);
435
+ }
436
+ return message;
437
+ },
438
+ };
439
+ function createBaseEndpointConfig() {
440
+ return {
441
+ id: "",
442
+ path: "",
443
+ providerId: "",
444
+ providerName: "",
445
+ queueName: "",
446
+ methods: [],
447
+ description: "",
448
+ isActive: false,
449
+ metadata: "",
450
+ createdAt: "",
451
+ updatedAt: "",
452
+ };
453
+ }
454
+ exports.EndpointConfig = {
455
+ encode(message, writer = new wire_1.BinaryWriter()) {
456
+ if (message.id !== "") {
457
+ writer.uint32(10).string(message.id);
458
+ }
459
+ if (message.path !== "") {
460
+ writer.uint32(18).string(message.path);
461
+ }
462
+ if (message.providerId !== "") {
463
+ writer.uint32(26).string(message.providerId);
464
+ }
465
+ if (message.providerName !== "") {
466
+ writer.uint32(34).string(message.providerName);
467
+ }
468
+ if (message.queueName !== "") {
469
+ writer.uint32(42).string(message.queueName);
470
+ }
471
+ for (const v of message.methods) {
472
+ writer.uint32(50).string(v);
473
+ }
474
+ if (message.description !== "") {
475
+ writer.uint32(58).string(message.description);
476
+ }
477
+ if (message.isActive !== false) {
478
+ writer.uint32(64).bool(message.isActive);
479
+ }
480
+ if (message.metadata !== "") {
481
+ writer.uint32(74).string(message.metadata);
482
+ }
483
+ if (message.createdAt !== "") {
484
+ writer.uint32(82).string(message.createdAt);
485
+ }
486
+ if (message.updatedAt !== "") {
487
+ writer.uint32(90).string(message.updatedAt);
488
+ }
489
+ return writer;
490
+ },
491
+ decode(input, length) {
492
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
493
+ const end = length === undefined ? reader.len : reader.pos + length;
494
+ const message = createBaseEndpointConfig();
495
+ while (reader.pos < end) {
496
+ const tag = reader.uint32();
497
+ switch (tag >>> 3) {
498
+ case 1: {
499
+ if (tag !== 10) {
500
+ break;
501
+ }
502
+ message.id = reader.string();
503
+ continue;
504
+ }
505
+ case 2: {
506
+ if (tag !== 18) {
507
+ break;
508
+ }
509
+ message.path = reader.string();
510
+ continue;
511
+ }
512
+ case 3: {
513
+ if (tag !== 26) {
514
+ break;
515
+ }
516
+ message.providerId = reader.string();
517
+ continue;
518
+ }
519
+ case 4: {
520
+ if (tag !== 34) {
521
+ break;
522
+ }
523
+ message.providerName = reader.string();
524
+ continue;
525
+ }
526
+ case 5: {
527
+ if (tag !== 42) {
528
+ break;
529
+ }
530
+ message.queueName = reader.string();
531
+ continue;
532
+ }
533
+ case 6: {
534
+ if (tag !== 50) {
535
+ break;
536
+ }
537
+ message.methods.push(reader.string());
538
+ continue;
539
+ }
540
+ case 7: {
541
+ if (tag !== 58) {
542
+ break;
543
+ }
544
+ message.description = reader.string();
545
+ continue;
546
+ }
547
+ case 8: {
548
+ if (tag !== 64) {
549
+ break;
550
+ }
551
+ message.isActive = reader.bool();
552
+ continue;
553
+ }
554
+ case 9: {
555
+ if (tag !== 74) {
556
+ break;
557
+ }
558
+ message.metadata = reader.string();
559
+ continue;
560
+ }
561
+ case 10: {
562
+ if (tag !== 82) {
563
+ break;
564
+ }
565
+ message.createdAt = reader.string();
566
+ continue;
567
+ }
568
+ case 11: {
569
+ if (tag !== 90) {
570
+ break;
571
+ }
572
+ message.updatedAt = reader.string();
573
+ continue;
574
+ }
575
+ }
576
+ if ((tag & 7) === 4 || tag === 0) {
577
+ break;
578
+ }
579
+ reader.skip(tag & 7);
580
+ }
581
+ return message;
582
+ },
583
+ };
584
+ function createBaseEndpointRequest() {
585
+ return { path: "" };
586
+ }
587
+ exports.EndpointRequest = {
588
+ encode(message, writer = new wire_1.BinaryWriter()) {
589
+ if (message.path !== "") {
590
+ writer.uint32(10).string(message.path);
591
+ }
592
+ return writer;
593
+ },
594
+ decode(input, length) {
595
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
596
+ const end = length === undefined ? reader.len : reader.pos + length;
597
+ const message = createBaseEndpointRequest();
598
+ while (reader.pos < end) {
599
+ const tag = reader.uint32();
600
+ switch (tag >>> 3) {
601
+ case 1: {
602
+ if (tag !== 10) {
603
+ break;
604
+ }
605
+ message.path = reader.string();
606
+ continue;
607
+ }
608
+ }
609
+ if ((tag & 7) === 4 || tag === 0) {
610
+ break;
611
+ }
612
+ reader.skip(tag & 7);
613
+ }
614
+ return message;
615
+ },
616
+ };
617
+ function createBaseProvidersRequest() {
618
+ return { activeOnly: false };
619
+ }
620
+ exports.ProvidersRequest = {
621
+ encode(message, writer = new wire_1.BinaryWriter()) {
622
+ if (message.activeOnly !== false) {
623
+ writer.uint32(8).bool(message.activeOnly);
624
+ }
625
+ return writer;
626
+ },
627
+ decode(input, length) {
628
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
629
+ const end = length === undefined ? reader.len : reader.pos + length;
630
+ const message = createBaseProvidersRequest();
631
+ while (reader.pos < end) {
632
+ const tag = reader.uint32();
633
+ switch (tag >>> 3) {
634
+ case 1: {
635
+ if (tag !== 8) {
636
+ break;
637
+ }
638
+ message.activeOnly = reader.bool();
639
+ continue;
640
+ }
641
+ }
642
+ if ((tag & 7) === 4 || tag === 0) {
643
+ break;
644
+ }
645
+ reader.skip(tag & 7);
646
+ }
647
+ return message;
648
+ },
649
+ };
650
+ function createBaseModelsRequest() {
651
+ return { providerId: "", activeOnly: false };
652
+ }
653
+ exports.ModelsRequest = {
654
+ encode(message, writer = new wire_1.BinaryWriter()) {
655
+ if (message.providerId !== "") {
656
+ writer.uint32(10).string(message.providerId);
657
+ }
658
+ if (message.activeOnly !== false) {
659
+ writer.uint32(16).bool(message.activeOnly);
660
+ }
661
+ return writer;
662
+ },
663
+ decode(input, length) {
664
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
665
+ const end = length === undefined ? reader.len : reader.pos + length;
666
+ const message = createBaseModelsRequest();
667
+ while (reader.pos < end) {
668
+ const tag = reader.uint32();
669
+ switch (tag >>> 3) {
670
+ case 1: {
671
+ if (tag !== 10) {
672
+ break;
673
+ }
674
+ message.providerId = reader.string();
675
+ continue;
676
+ }
677
+ case 2: {
678
+ if (tag !== 16) {
679
+ break;
680
+ }
681
+ message.activeOnly = reader.bool();
682
+ continue;
683
+ }
684
+ }
685
+ if ((tag & 7) === 4 || tag === 0) {
686
+ break;
687
+ }
688
+ reader.skip(tag & 7);
689
+ }
690
+ return message;
691
+ },
692
+ };
693
+ function createBasePricingRequest() {
694
+ return { modelId: "", currency: "" };
695
+ }
696
+ exports.PricingRequest = {
697
+ encode(message, writer = new wire_1.BinaryWriter()) {
698
+ if (message.modelId !== "") {
699
+ writer.uint32(10).string(message.modelId);
700
+ }
701
+ if (message.currency !== "") {
702
+ writer.uint32(18).string(message.currency);
703
+ }
704
+ return writer;
705
+ },
706
+ decode(input, length) {
707
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
708
+ const end = length === undefined ? reader.len : reader.pos + length;
709
+ const message = createBasePricingRequest();
710
+ while (reader.pos < end) {
711
+ const tag = reader.uint32();
712
+ switch (tag >>> 3) {
713
+ case 1: {
714
+ if (tag !== 10) {
715
+ break;
716
+ }
717
+ message.modelId = reader.string();
718
+ continue;
719
+ }
720
+ case 2: {
721
+ if (tag !== 18) {
722
+ break;
723
+ }
724
+ message.currency = reader.string();
725
+ continue;
726
+ }
727
+ }
728
+ if ((tag & 7) === 4 || tag === 0) {
729
+ break;
730
+ }
731
+ reader.skip(tag & 7);
732
+ }
733
+ return message;
734
+ },
735
+ };
736
+ function createBaseValidateEndpointRequest() {
737
+ return { path: "", method: "" };
738
+ }
739
+ exports.ValidateEndpointRequest = {
740
+ encode(message, writer = new wire_1.BinaryWriter()) {
741
+ if (message.path !== "") {
742
+ writer.uint32(10).string(message.path);
743
+ }
744
+ if (message.method !== "") {
745
+ writer.uint32(18).string(message.method);
746
+ }
747
+ return writer;
748
+ },
749
+ decode(input, length) {
750
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
751
+ const end = length === undefined ? reader.len : reader.pos + length;
752
+ const message = createBaseValidateEndpointRequest();
753
+ while (reader.pos < end) {
754
+ const tag = reader.uint32();
755
+ switch (tag >>> 3) {
756
+ case 1: {
757
+ if (tag !== 10) {
758
+ break;
759
+ }
760
+ message.path = reader.string();
761
+ continue;
762
+ }
763
+ case 2: {
764
+ if (tag !== 18) {
765
+ break;
766
+ }
767
+ message.method = reader.string();
768
+ continue;
769
+ }
770
+ }
771
+ if ((tag & 7) === 4 || tag === 0) {
772
+ break;
773
+ }
774
+ reader.skip(tag & 7);
775
+ }
776
+ return message;
777
+ },
778
+ };
779
+ function createBaseCreateEndpointRequest() {
780
+ return {
781
+ path: "",
782
+ providerId: "",
783
+ queueName: "",
784
+ methods: [],
785
+ description: "",
786
+ isActive: false,
787
+ metadata: "",
788
+ };
789
+ }
790
+ exports.CreateEndpointRequest = {
791
+ encode(message, writer = new wire_1.BinaryWriter()) {
792
+ if (message.path !== "") {
793
+ writer.uint32(10).string(message.path);
794
+ }
795
+ if (message.providerId !== "") {
796
+ writer.uint32(18).string(message.providerId);
797
+ }
798
+ if (message.queueName !== "") {
799
+ writer.uint32(26).string(message.queueName);
800
+ }
801
+ for (const v of message.methods) {
802
+ writer.uint32(34).string(v);
803
+ }
804
+ if (message.description !== "") {
805
+ writer.uint32(42).string(message.description);
806
+ }
807
+ if (message.isActive !== false) {
808
+ writer.uint32(48).bool(message.isActive);
809
+ }
810
+ if (message.metadata !== "") {
811
+ writer.uint32(58).string(message.metadata);
812
+ }
813
+ return writer;
814
+ },
815
+ decode(input, length) {
816
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
817
+ const end = length === undefined ? reader.len : reader.pos + length;
818
+ const message = createBaseCreateEndpointRequest();
819
+ while (reader.pos < end) {
820
+ const tag = reader.uint32();
821
+ switch (tag >>> 3) {
822
+ case 1: {
823
+ if (tag !== 10) {
824
+ break;
825
+ }
826
+ message.path = reader.string();
827
+ continue;
828
+ }
829
+ case 2: {
830
+ if (tag !== 18) {
831
+ break;
832
+ }
833
+ message.providerId = reader.string();
834
+ continue;
835
+ }
836
+ case 3: {
837
+ if (tag !== 26) {
838
+ break;
839
+ }
840
+ message.queueName = reader.string();
841
+ continue;
842
+ }
843
+ case 4: {
844
+ if (tag !== 34) {
845
+ break;
846
+ }
847
+ message.methods.push(reader.string());
848
+ continue;
849
+ }
850
+ case 5: {
851
+ if (tag !== 42) {
852
+ break;
853
+ }
854
+ message.description = reader.string();
855
+ continue;
856
+ }
857
+ case 6: {
858
+ if (tag !== 48) {
859
+ break;
860
+ }
861
+ message.isActive = reader.bool();
862
+ continue;
863
+ }
864
+ case 7: {
865
+ if (tag !== 58) {
866
+ break;
867
+ }
868
+ message.metadata = reader.string();
869
+ continue;
870
+ }
871
+ }
872
+ if ((tag & 7) === 4 || tag === 0) {
873
+ break;
874
+ }
875
+ reader.skip(tag & 7);
876
+ }
877
+ return message;
878
+ },
879
+ };
880
+ function createBaseUpdateEndpointRequest() {
881
+ return {
882
+ id: "",
883
+ path: "",
884
+ providerId: "",
885
+ queueName: "",
886
+ methods: [],
887
+ description: "",
888
+ isActive: false,
889
+ metadata: "",
890
+ };
891
+ }
892
+ exports.UpdateEndpointRequest = {
893
+ encode(message, writer = new wire_1.BinaryWriter()) {
894
+ if (message.id !== "") {
895
+ writer.uint32(10).string(message.id);
896
+ }
897
+ if (message.path !== "") {
898
+ writer.uint32(18).string(message.path);
899
+ }
900
+ if (message.providerId !== "") {
901
+ writer.uint32(26).string(message.providerId);
902
+ }
903
+ if (message.queueName !== "") {
904
+ writer.uint32(34).string(message.queueName);
905
+ }
906
+ for (const v of message.methods) {
907
+ writer.uint32(42).string(v);
908
+ }
909
+ if (message.description !== "") {
910
+ writer.uint32(50).string(message.description);
911
+ }
912
+ if (message.isActive !== false) {
913
+ writer.uint32(56).bool(message.isActive);
914
+ }
915
+ if (message.metadata !== "") {
916
+ writer.uint32(66).string(message.metadata);
917
+ }
918
+ return writer;
919
+ },
920
+ decode(input, length) {
921
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
922
+ const end = length === undefined ? reader.len : reader.pos + length;
923
+ const message = createBaseUpdateEndpointRequest();
924
+ while (reader.pos < end) {
925
+ const tag = reader.uint32();
926
+ switch (tag >>> 3) {
927
+ case 1: {
928
+ if (tag !== 10) {
929
+ break;
930
+ }
931
+ message.id = reader.string();
932
+ continue;
933
+ }
934
+ case 2: {
935
+ if (tag !== 18) {
936
+ break;
937
+ }
938
+ message.path = reader.string();
939
+ continue;
940
+ }
941
+ case 3: {
942
+ if (tag !== 26) {
943
+ break;
944
+ }
945
+ message.providerId = reader.string();
946
+ continue;
947
+ }
948
+ case 4: {
949
+ if (tag !== 34) {
950
+ break;
951
+ }
952
+ message.queueName = reader.string();
953
+ continue;
954
+ }
955
+ case 5: {
956
+ if (tag !== 42) {
957
+ break;
958
+ }
959
+ message.methods.push(reader.string());
960
+ continue;
961
+ }
962
+ case 6: {
963
+ if (tag !== 50) {
964
+ break;
965
+ }
966
+ message.description = reader.string();
967
+ continue;
968
+ }
969
+ case 7: {
970
+ if (tag !== 56) {
971
+ break;
972
+ }
973
+ message.isActive = reader.bool();
974
+ continue;
975
+ }
976
+ case 8: {
977
+ if (tag !== 66) {
978
+ break;
979
+ }
980
+ message.metadata = reader.string();
981
+ continue;
982
+ }
983
+ }
984
+ if ((tag & 7) === 4 || tag === 0) {
985
+ break;
986
+ }
987
+ reader.skip(tag & 7);
988
+ }
989
+ return message;
990
+ },
991
+ };
992
+ function createBaseGetEndpointByIdRequest() {
993
+ return { id: "" };
994
+ }
995
+ exports.GetEndpointByIdRequest = {
996
+ encode(message, writer = new wire_1.BinaryWriter()) {
997
+ if (message.id !== "") {
998
+ writer.uint32(10).string(message.id);
999
+ }
1000
+ return writer;
1001
+ },
1002
+ decode(input, length) {
1003
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1004
+ const end = length === undefined ? reader.len : reader.pos + length;
1005
+ const message = createBaseGetEndpointByIdRequest();
1006
+ while (reader.pos < end) {
1007
+ const tag = reader.uint32();
1008
+ switch (tag >>> 3) {
1009
+ case 1: {
1010
+ if (tag !== 10) {
1011
+ break;
1012
+ }
1013
+ message.id = reader.string();
1014
+ continue;
1015
+ }
1016
+ }
1017
+ if ((tag & 7) === 4 || tag === 0) {
1018
+ break;
1019
+ }
1020
+ reader.skip(tag & 7);
1021
+ }
1022
+ return message;
1023
+ },
1024
+ };
1025
+ function createBaseListEndpointsRequest() {
1026
+ return { activeOnly: false, providerId: "" };
1027
+ }
1028
+ exports.ListEndpointsRequest = {
1029
+ encode(message, writer = new wire_1.BinaryWriter()) {
1030
+ if (message.activeOnly !== false) {
1031
+ writer.uint32(8).bool(message.activeOnly);
1032
+ }
1033
+ if (message.providerId !== "") {
1034
+ writer.uint32(18).string(message.providerId);
1035
+ }
1036
+ return writer;
1037
+ },
1038
+ decode(input, length) {
1039
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1040
+ const end = length === undefined ? reader.len : reader.pos + length;
1041
+ const message = createBaseListEndpointsRequest();
1042
+ while (reader.pos < end) {
1043
+ const tag = reader.uint32();
1044
+ switch (tag >>> 3) {
1045
+ case 1: {
1046
+ if (tag !== 8) {
1047
+ break;
1048
+ }
1049
+ message.activeOnly = reader.bool();
1050
+ continue;
1051
+ }
1052
+ case 2: {
1053
+ if (tag !== 18) {
1054
+ break;
1055
+ }
1056
+ message.providerId = reader.string();
1057
+ continue;
1058
+ }
1059
+ }
1060
+ if ((tag & 7) === 4 || tag === 0) {
1061
+ break;
1062
+ }
1063
+ reader.skip(tag & 7);
1064
+ }
1065
+ return message;
1066
+ },
1067
+ };
1068
+ function createBaseDeleteEndpointRequest() {
1069
+ return { id: "", hardDelete: false };
1070
+ }
1071
+ exports.DeleteEndpointRequest = {
1072
+ encode(message, writer = new wire_1.BinaryWriter()) {
1073
+ if (message.id !== "") {
1074
+ writer.uint32(10).string(message.id);
1075
+ }
1076
+ if (message.hardDelete !== false) {
1077
+ writer.uint32(16).bool(message.hardDelete);
1078
+ }
1079
+ return writer;
1080
+ },
1081
+ decode(input, length) {
1082
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1083
+ const end = length === undefined ? reader.len : reader.pos + length;
1084
+ const message = createBaseDeleteEndpointRequest();
1085
+ while (reader.pos < end) {
1086
+ const tag = reader.uint32();
1087
+ switch (tag >>> 3) {
1088
+ case 1: {
1089
+ if (tag !== 10) {
1090
+ break;
1091
+ }
1092
+ message.id = reader.string();
1093
+ continue;
1094
+ }
1095
+ case 2: {
1096
+ if (tag !== 16) {
1097
+ break;
1098
+ }
1099
+ message.hardDelete = reader.bool();
1100
+ continue;
1101
+ }
1102
+ }
1103
+ if ((tag & 7) === 4 || tag === 0) {
1104
+ break;
1105
+ }
1106
+ reader.skip(tag & 7);
1107
+ }
1108
+ return message;
1109
+ },
1110
+ };
1111
+ function createBaseProvidersResponse() {
1112
+ return { providers: [] };
1113
+ }
1114
+ exports.ProvidersResponse = {
1115
+ encode(message, writer = new wire_1.BinaryWriter()) {
1116
+ for (const v of message.providers) {
1117
+ exports.Provider.encode(v, writer.uint32(10).fork()).join();
1118
+ }
1119
+ return writer;
1120
+ },
1121
+ decode(input, length) {
1122
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1123
+ const end = length === undefined ? reader.len : reader.pos + length;
1124
+ const message = createBaseProvidersResponse();
1125
+ while (reader.pos < end) {
1126
+ const tag = reader.uint32();
1127
+ switch (tag >>> 3) {
1128
+ case 1: {
1129
+ if (tag !== 10) {
1130
+ break;
1131
+ }
1132
+ message.providers.push(exports.Provider.decode(reader, reader.uint32()));
1133
+ continue;
1134
+ }
1135
+ }
1136
+ if ((tag & 7) === 4 || tag === 0) {
1137
+ break;
1138
+ }
1139
+ reader.skip(tag & 7);
1140
+ }
1141
+ return message;
1142
+ },
1143
+ };
1144
+ function createBaseModelsResponse() {
1145
+ return { models: [] };
1146
+ }
1147
+ exports.ModelsResponse = {
1148
+ encode(message, writer = new wire_1.BinaryWriter()) {
1149
+ for (const v of message.models) {
1150
+ exports.Model.encode(v, writer.uint32(10).fork()).join();
1151
+ }
1152
+ return writer;
1153
+ },
1154
+ decode(input, length) {
1155
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1156
+ const end = length === undefined ? reader.len : reader.pos + length;
1157
+ const message = createBaseModelsResponse();
1158
+ while (reader.pos < end) {
1159
+ const tag = reader.uint32();
1160
+ switch (tag >>> 3) {
1161
+ case 1: {
1162
+ if (tag !== 10) {
1163
+ break;
1164
+ }
1165
+ message.models.push(exports.Model.decode(reader, reader.uint32()));
1166
+ continue;
1167
+ }
1168
+ }
1169
+ if ((tag & 7) === 4 || tag === 0) {
1170
+ break;
1171
+ }
1172
+ reader.skip(tag & 7);
1173
+ }
1174
+ return message;
1175
+ },
1176
+ };
1177
+ function createBasePricingResponse() {
1178
+ return { pricing: [] };
1179
+ }
1180
+ exports.PricingResponse = {
1181
+ encode(message, writer = new wire_1.BinaryWriter()) {
1182
+ for (const v of message.pricing) {
1183
+ exports.Pricing.encode(v, writer.uint32(10).fork()).join();
1184
+ }
1185
+ return writer;
1186
+ },
1187
+ decode(input, length) {
1188
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1189
+ const end = length === undefined ? reader.len : reader.pos + length;
1190
+ const message = createBasePricingResponse();
1191
+ while (reader.pos < end) {
1192
+ const tag = reader.uint32();
1193
+ switch (tag >>> 3) {
1194
+ case 1: {
1195
+ if (tag !== 10) {
1196
+ break;
1197
+ }
1198
+ message.pricing.push(exports.Pricing.decode(reader, reader.uint32()));
1199
+ continue;
1200
+ }
1201
+ }
1202
+ if ((tag & 7) === 4 || tag === 0) {
1203
+ break;
1204
+ }
1205
+ reader.skip(tag & 7);
1206
+ }
1207
+ return message;
1208
+ },
1209
+ };
1210
+ function createBaseValidateEndpointResponse() {
1211
+ return { isValid: false, error: "" };
1212
+ }
1213
+ exports.ValidateEndpointResponse = {
1214
+ encode(message, writer = new wire_1.BinaryWriter()) {
1215
+ if (message.isValid !== false) {
1216
+ writer.uint32(8).bool(message.isValid);
1217
+ }
1218
+ if (message.error !== "") {
1219
+ writer.uint32(18).string(message.error);
1220
+ }
1221
+ if (message.config !== undefined) {
1222
+ exports.EndpointConfig.encode(message.config, writer.uint32(26).fork()).join();
1223
+ }
1224
+ return writer;
1225
+ },
1226
+ decode(input, length) {
1227
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1228
+ const end = length === undefined ? reader.len : reader.pos + length;
1229
+ const message = createBaseValidateEndpointResponse();
1230
+ while (reader.pos < end) {
1231
+ const tag = reader.uint32();
1232
+ switch (tag >>> 3) {
1233
+ case 1: {
1234
+ if (tag !== 8) {
1235
+ break;
1236
+ }
1237
+ message.isValid = reader.bool();
1238
+ continue;
1239
+ }
1240
+ case 2: {
1241
+ if (tag !== 18) {
1242
+ break;
1243
+ }
1244
+ message.error = reader.string();
1245
+ continue;
1246
+ }
1247
+ case 3: {
1248
+ if (tag !== 26) {
1249
+ break;
1250
+ }
1251
+ message.config = exports.EndpointConfig.decode(reader, reader.uint32());
1252
+ continue;
1253
+ }
1254
+ }
1255
+ if ((tag & 7) === 4 || tag === 0) {
1256
+ break;
1257
+ }
1258
+ reader.skip(tag & 7);
1259
+ }
1260
+ return message;
1261
+ },
1262
+ };
1263
+ function createBaseCreateEndpointResponse() {
1264
+ return { success: false, error: "" };
1265
+ }
1266
+ exports.CreateEndpointResponse = {
1267
+ encode(message, writer = new wire_1.BinaryWriter()) {
1268
+ if (message.endpoint !== undefined) {
1269
+ exports.EndpointConfig.encode(message.endpoint, writer.uint32(10).fork()).join();
1270
+ }
1271
+ if (message.success !== false) {
1272
+ writer.uint32(16).bool(message.success);
1273
+ }
1274
+ if (message.error !== "") {
1275
+ writer.uint32(26).string(message.error);
1276
+ }
1277
+ return writer;
1278
+ },
1279
+ decode(input, length) {
1280
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1281
+ const end = length === undefined ? reader.len : reader.pos + length;
1282
+ const message = createBaseCreateEndpointResponse();
1283
+ while (reader.pos < end) {
1284
+ const tag = reader.uint32();
1285
+ switch (tag >>> 3) {
1286
+ case 1: {
1287
+ if (tag !== 10) {
1288
+ break;
1289
+ }
1290
+ message.endpoint = exports.EndpointConfig.decode(reader, reader.uint32());
1291
+ continue;
1292
+ }
1293
+ case 2: {
1294
+ if (tag !== 16) {
1295
+ break;
1296
+ }
1297
+ message.success = reader.bool();
1298
+ continue;
1299
+ }
1300
+ case 3: {
1301
+ if (tag !== 26) {
1302
+ break;
1303
+ }
1304
+ message.error = reader.string();
1305
+ continue;
1306
+ }
1307
+ }
1308
+ if ((tag & 7) === 4 || tag === 0) {
1309
+ break;
1310
+ }
1311
+ reader.skip(tag & 7);
1312
+ }
1313
+ return message;
1314
+ },
1315
+ };
1316
+ function createBaseUpdateEndpointResponse() {
1317
+ return { success: false, error: "" };
1318
+ }
1319
+ exports.UpdateEndpointResponse = {
1320
+ encode(message, writer = new wire_1.BinaryWriter()) {
1321
+ if (message.endpoint !== undefined) {
1322
+ exports.EndpointConfig.encode(message.endpoint, writer.uint32(10).fork()).join();
1323
+ }
1324
+ if (message.success !== false) {
1325
+ writer.uint32(16).bool(message.success);
1326
+ }
1327
+ if (message.error !== "") {
1328
+ writer.uint32(26).string(message.error);
1329
+ }
1330
+ return writer;
1331
+ },
1332
+ decode(input, length) {
1333
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1334
+ const end = length === undefined ? reader.len : reader.pos + length;
1335
+ const message = createBaseUpdateEndpointResponse();
1336
+ while (reader.pos < end) {
1337
+ const tag = reader.uint32();
1338
+ switch (tag >>> 3) {
1339
+ case 1: {
1340
+ if (tag !== 10) {
1341
+ break;
1342
+ }
1343
+ message.endpoint = exports.EndpointConfig.decode(reader, reader.uint32());
1344
+ continue;
1345
+ }
1346
+ case 2: {
1347
+ if (tag !== 16) {
1348
+ break;
1349
+ }
1350
+ message.success = reader.bool();
1351
+ continue;
1352
+ }
1353
+ case 3: {
1354
+ if (tag !== 26) {
1355
+ break;
1356
+ }
1357
+ message.error = reader.string();
1358
+ continue;
1359
+ }
1360
+ }
1361
+ if ((tag & 7) === 4 || tag === 0) {
1362
+ break;
1363
+ }
1364
+ reader.skip(tag & 7);
1365
+ }
1366
+ return message;
1367
+ },
1368
+ };
1369
+ function createBaseGetEndpointByIdResponse() {
1370
+ return { found: false };
1371
+ }
1372
+ exports.GetEndpointByIdResponse = {
1373
+ encode(message, writer = new wire_1.BinaryWriter()) {
1374
+ if (message.endpoint !== undefined) {
1375
+ exports.EndpointConfig.encode(message.endpoint, writer.uint32(10).fork()).join();
1376
+ }
1377
+ if (message.found !== false) {
1378
+ writer.uint32(16).bool(message.found);
1379
+ }
1380
+ return writer;
1381
+ },
1382
+ decode(input, length) {
1383
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1384
+ const end = length === undefined ? reader.len : reader.pos + length;
1385
+ const message = createBaseGetEndpointByIdResponse();
1386
+ while (reader.pos < end) {
1387
+ const tag = reader.uint32();
1388
+ switch (tag >>> 3) {
1389
+ case 1: {
1390
+ if (tag !== 10) {
1391
+ break;
1392
+ }
1393
+ message.endpoint = exports.EndpointConfig.decode(reader, reader.uint32());
1394
+ continue;
1395
+ }
1396
+ case 2: {
1397
+ if (tag !== 16) {
1398
+ break;
1399
+ }
1400
+ message.found = reader.bool();
1401
+ continue;
1402
+ }
1403
+ }
1404
+ if ((tag & 7) === 4 || tag === 0) {
1405
+ break;
1406
+ }
1407
+ reader.skip(tag & 7);
1408
+ }
1409
+ return message;
1410
+ },
1411
+ };
1412
+ function createBaseListEndpointsResponse() {
1413
+ return { endpoints: [], total: 0 };
1414
+ }
1415
+ exports.ListEndpointsResponse = {
1416
+ encode(message, writer = new wire_1.BinaryWriter()) {
1417
+ for (const v of message.endpoints) {
1418
+ exports.EndpointConfig.encode(v, writer.uint32(10).fork()).join();
1419
+ }
1420
+ if (message.total !== 0) {
1421
+ writer.uint32(16).int32(message.total);
1422
+ }
1423
+ return writer;
1424
+ },
1425
+ decode(input, length) {
1426
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1427
+ const end = length === undefined ? reader.len : reader.pos + length;
1428
+ const message = createBaseListEndpointsResponse();
1429
+ while (reader.pos < end) {
1430
+ const tag = reader.uint32();
1431
+ switch (tag >>> 3) {
1432
+ case 1: {
1433
+ if (tag !== 10) {
1434
+ break;
1435
+ }
1436
+ message.endpoints.push(exports.EndpointConfig.decode(reader, reader.uint32()));
1437
+ continue;
1438
+ }
1439
+ case 2: {
1440
+ if (tag !== 16) {
1441
+ break;
1442
+ }
1443
+ message.total = reader.int32();
1444
+ continue;
1445
+ }
1446
+ }
1447
+ if ((tag & 7) === 4 || tag === 0) {
1448
+ break;
1449
+ }
1450
+ reader.skip(tag & 7);
1451
+ }
1452
+ return message;
1453
+ },
1454
+ };
1455
+ function createBaseDeleteEndpointResponse() {
1456
+ return { success: false, error: "" };
1457
+ }
1458
+ exports.DeleteEndpointResponse = {
1459
+ encode(message, writer = new wire_1.BinaryWriter()) {
1460
+ if (message.success !== false) {
1461
+ writer.uint32(8).bool(message.success);
1462
+ }
1463
+ if (message.error !== "") {
1464
+ writer.uint32(18).string(message.error);
1465
+ }
1466
+ return writer;
1467
+ },
1468
+ decode(input, length) {
1469
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1470
+ const end = length === undefined ? reader.len : reader.pos + length;
1471
+ const message = createBaseDeleteEndpointResponse();
1472
+ while (reader.pos < end) {
1473
+ const tag = reader.uint32();
1474
+ switch (tag >>> 3) {
1475
+ case 1: {
1476
+ if (tag !== 8) {
1477
+ break;
1478
+ }
1479
+ message.success = reader.bool();
1480
+ continue;
1481
+ }
1482
+ case 2: {
1483
+ if (tag !== 18) {
1484
+ break;
1485
+ }
1486
+ message.error = reader.string();
1487
+ continue;
1488
+ }
1489
+ }
1490
+ if ((tag & 7) === 4 || tag === 0) {
1491
+ break;
1492
+ }
1493
+ reader.skip(tag & 7);
1494
+ }
1495
+ return message;
1496
+ },
1497
+ };
1498
+ function EndpointServiceControllerMethods() {
1499
+ return function (constructor) {
1500
+ const grpcMethods = [
1501
+ "getEndpointConfig",
1502
+ "getProviders",
1503
+ "getModels",
1504
+ "getPricing",
1505
+ "validateEndpoint",
1506
+ "createEndpoint",
1507
+ "updateEndpoint",
1508
+ "getEndpointById",
1509
+ "listEndpoints",
1510
+ "deleteEndpoint",
1511
+ ];
1512
+ for (const method of grpcMethods) {
1513
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
1514
+ (0, microservices_1.GrpcMethod)("EndpointService", method)(constructor.prototype[method], method, descriptor);
1515
+ }
1516
+ const grpcStreamMethods = [];
1517
+ for (const method of grpcStreamMethods) {
1518
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
1519
+ (0, microservices_1.GrpcStreamMethod)("EndpointService", method)(constructor.prototype[method], method, descriptor);
1520
+ }
1521
+ };
1522
+ }
1523
+ exports.ENDPOINT_SERVICE_NAME = "EndpointService";
1524
+ exports.EndpointServiceService = {
1525
+ /** Existing methods */
1526
+ getEndpointConfig: {
1527
+ path: "/endpoint.EndpointService/GetEndpointConfig",
1528
+ requestStream: false,
1529
+ responseStream: false,
1530
+ requestSerialize: (value) => Buffer.from(exports.EndpointRequest.encode(value).finish()),
1531
+ requestDeserialize: (value) => exports.EndpointRequest.decode(value),
1532
+ responseSerialize: (value) => Buffer.from(exports.EndpointConfig.encode(value).finish()),
1533
+ responseDeserialize: (value) => exports.EndpointConfig.decode(value),
1534
+ },
1535
+ getProviders: {
1536
+ path: "/endpoint.EndpointService/GetProviders",
1537
+ requestStream: false,
1538
+ responseStream: false,
1539
+ requestSerialize: (value) => Buffer.from(exports.ProvidersRequest.encode(value).finish()),
1540
+ requestDeserialize: (value) => exports.ProvidersRequest.decode(value),
1541
+ responseSerialize: (value) => Buffer.from(exports.ProvidersResponse.encode(value).finish()),
1542
+ responseDeserialize: (value) => exports.ProvidersResponse.decode(value),
1543
+ },
1544
+ getModels: {
1545
+ path: "/endpoint.EndpointService/GetModels",
1546
+ requestStream: false,
1547
+ responseStream: false,
1548
+ requestSerialize: (value) => Buffer.from(exports.ModelsRequest.encode(value).finish()),
1549
+ requestDeserialize: (value) => exports.ModelsRequest.decode(value),
1550
+ responseSerialize: (value) => Buffer.from(exports.ModelsResponse.encode(value).finish()),
1551
+ responseDeserialize: (value) => exports.ModelsResponse.decode(value),
1552
+ },
1553
+ getPricing: {
1554
+ path: "/endpoint.EndpointService/GetPricing",
1555
+ requestStream: false,
1556
+ responseStream: false,
1557
+ requestSerialize: (value) => Buffer.from(exports.PricingRequest.encode(value).finish()),
1558
+ requestDeserialize: (value) => exports.PricingRequest.decode(value),
1559
+ responseSerialize: (value) => Buffer.from(exports.PricingResponse.encode(value).finish()),
1560
+ responseDeserialize: (value) => exports.PricingResponse.decode(value),
1561
+ },
1562
+ validateEndpoint: {
1563
+ path: "/endpoint.EndpointService/ValidateEndpoint",
1564
+ requestStream: false,
1565
+ responseStream: false,
1566
+ requestSerialize: (value) => Buffer.from(exports.ValidateEndpointRequest.encode(value).finish()),
1567
+ requestDeserialize: (value) => exports.ValidateEndpointRequest.decode(value),
1568
+ responseSerialize: (value) => Buffer.from(exports.ValidateEndpointResponse.encode(value).finish()),
1569
+ responseDeserialize: (value) => exports.ValidateEndpointResponse.decode(value),
1570
+ },
1571
+ /** CRUD methods for endpoints */
1572
+ createEndpoint: {
1573
+ path: "/endpoint.EndpointService/CreateEndpoint",
1574
+ requestStream: false,
1575
+ responseStream: false,
1576
+ requestSerialize: (value) => Buffer.from(exports.CreateEndpointRequest.encode(value).finish()),
1577
+ requestDeserialize: (value) => exports.CreateEndpointRequest.decode(value),
1578
+ responseSerialize: (value) => Buffer.from(exports.CreateEndpointResponse.encode(value).finish()),
1579
+ responseDeserialize: (value) => exports.CreateEndpointResponse.decode(value),
1580
+ },
1581
+ updateEndpoint: {
1582
+ path: "/endpoint.EndpointService/UpdateEndpoint",
1583
+ requestStream: false,
1584
+ responseStream: false,
1585
+ requestSerialize: (value) => Buffer.from(exports.UpdateEndpointRequest.encode(value).finish()),
1586
+ requestDeserialize: (value) => exports.UpdateEndpointRequest.decode(value),
1587
+ responseSerialize: (value) => Buffer.from(exports.UpdateEndpointResponse.encode(value).finish()),
1588
+ responseDeserialize: (value) => exports.UpdateEndpointResponse.decode(value),
1589
+ },
1590
+ getEndpointById: {
1591
+ path: "/endpoint.EndpointService/GetEndpointById",
1592
+ requestStream: false,
1593
+ responseStream: false,
1594
+ requestSerialize: (value) => Buffer.from(exports.GetEndpointByIdRequest.encode(value).finish()),
1595
+ requestDeserialize: (value) => exports.GetEndpointByIdRequest.decode(value),
1596
+ responseSerialize: (value) => Buffer.from(exports.GetEndpointByIdResponse.encode(value).finish()),
1597
+ responseDeserialize: (value) => exports.GetEndpointByIdResponse.decode(value),
1598
+ },
1599
+ listEndpoints: {
1600
+ path: "/endpoint.EndpointService/ListEndpoints",
1601
+ requestStream: false,
1602
+ responseStream: false,
1603
+ requestSerialize: (value) => Buffer.from(exports.ListEndpointsRequest.encode(value).finish()),
1604
+ requestDeserialize: (value) => exports.ListEndpointsRequest.decode(value),
1605
+ responseSerialize: (value) => Buffer.from(exports.ListEndpointsResponse.encode(value).finish()),
1606
+ responseDeserialize: (value) => exports.ListEndpointsResponse.decode(value),
1607
+ },
1608
+ deleteEndpoint: {
1609
+ path: "/endpoint.EndpointService/DeleteEndpoint",
1610
+ requestStream: false,
1611
+ responseStream: false,
1612
+ requestSerialize: (value) => Buffer.from(exports.DeleteEndpointRequest.encode(value).finish()),
1613
+ requestDeserialize: (value) => exports.DeleteEndpointRequest.decode(value),
1614
+ responseSerialize: (value) => Buffer.from(exports.DeleteEndpointResponse.encode(value).finish()),
1615
+ responseDeserialize: (value) => exports.DeleteEndpointResponse.decode(value),
1616
+ },
1617
+ };