@miradorlabs/web-grpc 2.60.0 → 2.62.0

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,85 @@
1
+ // GENERATED CODE -- DO NOT EDIT!
2
+
3
+ 'use strict';
4
+ var grpc = require('@grpc/grpc-js');
5
+ var proto_gateway_web_v1_model_gateway_pb = require('../../../../proto/gateway/web/v1/model_gateway_pb.js');
6
+ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
7
+ var proto_gateway_common_v1_status_pb = require('../../../../proto/gateway/common/v1/status_pb.js');
8
+
9
+ function serialize_gateway_web_v1_ListModelsRequest(arg) {
10
+ if (!(arg instanceof proto_gateway_web_v1_model_gateway_pb.ListModelsRequest)) {
11
+ throw new Error('Expected argument of type gateway.web.v1.ListModelsRequest');
12
+ }
13
+ return Buffer.from(arg.serializeBinary());
14
+ }
15
+
16
+ function deserialize_gateway_web_v1_ListModelsRequest(buffer_arg) {
17
+ return proto_gateway_web_v1_model_gateway_pb.ListModelsRequest.deserializeBinary(new Uint8Array(buffer_arg));
18
+ }
19
+
20
+ function serialize_gateway_web_v1_ListModelsResponse(arg) {
21
+ if (!(arg instanceof proto_gateway_web_v1_model_gateway_pb.ListModelsResponse)) {
22
+ throw new Error('Expected argument of type gateway.web.v1.ListModelsResponse');
23
+ }
24
+ return Buffer.from(arg.serializeBinary());
25
+ }
26
+
27
+ function deserialize_gateway_web_v1_ListModelsResponse(buffer_arg) {
28
+ return proto_gateway_web_v1_model_gateway_pb.ListModelsResponse.deserializeBinary(new Uint8Array(buffer_arg));
29
+ }
30
+
31
+ function serialize_gateway_web_v1_ModelPricesRequest(arg) {
32
+ if (!(arg instanceof proto_gateway_web_v1_model_gateway_pb.ModelPricesRequest)) {
33
+ throw new Error('Expected argument of type gateway.web.v1.ModelPricesRequest');
34
+ }
35
+ return Buffer.from(arg.serializeBinary());
36
+ }
37
+
38
+ function deserialize_gateway_web_v1_ModelPricesRequest(buffer_arg) {
39
+ return proto_gateway_web_v1_model_gateway_pb.ModelPricesRequest.deserializeBinary(new Uint8Array(buffer_arg));
40
+ }
41
+
42
+ function serialize_gateway_web_v1_ModelPricesResponse(arg) {
43
+ if (!(arg instanceof proto_gateway_web_v1_model_gateway_pb.ModelPricesResponse)) {
44
+ throw new Error('Expected argument of type gateway.web.v1.ModelPricesResponse');
45
+ }
46
+ return Buffer.from(arg.serializeBinary());
47
+ }
48
+
49
+ function deserialize_gateway_web_v1_ModelPricesResponse(buffer_arg) {
50
+ return proto_gateway_web_v1_model_gateway_pb.ModelPricesResponse.deserializeBinary(new Uint8Array(buffer_arg));
51
+ }
52
+
53
+
54
+ // ModelGatewayService is the frontend-facing surface for the AI model catalog + pricing. The dataset is
55
+ // global reference data (scraped list prices), so the caller is authorized but the data is not
56
+ // tenant-filtered. It proxies telemetry.api.v1.AIService's model reads.
57
+ var ModelGatewayServiceService = exports.ModelGatewayServiceService = {
58
+ // ListModels returns a lightweight, deduplicated, sorted list of model names across all price sources.
59
+ // The frontend loads it once and filters the search bar client-side.
60
+ listModels: {
61
+ path: '/gateway.web.v1.ModelGatewayService/ListModels',
62
+ requestStream: false,
63
+ responseStream: false,
64
+ requestType: proto_gateway_web_v1_model_gateway_pb.ListModelsRequest,
65
+ responseType: proto_gateway_web_v1_model_gateway_pb.ListModelsResponse,
66
+ requestSerialize: serialize_gateway_web_v1_ListModelsRequest,
67
+ requestDeserialize: deserialize_gateway_web_v1_ListModelsRequest,
68
+ responseSerialize: serialize_gateway_web_v1_ListModelsResponse,
69
+ responseDeserialize: deserialize_gateway_web_v1_ListModelsResponse,
70
+ },
71
+ // ListModelPrices returns the latest price per provider for one model, source-collapsed on the backend.
72
+ listModelPrices: {
73
+ path: '/gateway.web.v1.ModelGatewayService/ListModelPrices',
74
+ requestStream: false,
75
+ responseStream: false,
76
+ requestType: proto_gateway_web_v1_model_gateway_pb.ModelPricesRequest,
77
+ responseType: proto_gateway_web_v1_model_gateway_pb.ModelPricesResponse,
78
+ requestSerialize: serialize_gateway_web_v1_ModelPricesRequest,
79
+ requestDeserialize: deserialize_gateway_web_v1_ModelPricesRequest,
80
+ responseSerialize: serialize_gateway_web_v1_ModelPricesResponse,
81
+ responseDeserialize: deserialize_gateway_web_v1_ModelPricesResponse,
82
+ },
83
+ };
84
+
85
+ exports.ModelGatewayServiceClient = grpc.makeGenericClientConstructor(ModelGatewayServiceService, 'ModelGatewayService');