@dailydotdev/schema 0.3.12 → 0.3.13

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,318 @@
1
+ import { Message, PartialMessage, proto3, FieldList, BinaryReadOptions, JsonValue, JsonReadOptions, PlainMessage } from '@bufbuild/protobuf';
2
+
3
+ /**
4
+ * DataType mirrors the KServe v2 datatype names (FP32, INT64, BYTES, ...).
5
+ * BYTES carries string tensors.
6
+ *
7
+ * @generated from enum onnxserver.v1.DataType
8
+ */
9
+ declare enum DataType {
10
+ /**
11
+ * @generated from enum value: DATA_TYPE_UNSPECIFIED = 0;
12
+ */
13
+ UNSPECIFIED = 0,
14
+ /**
15
+ * @generated from enum value: DATA_TYPE_FP32 = 1;
16
+ */
17
+ FP32 = 1,
18
+ /**
19
+ * @generated from enum value: DATA_TYPE_FP64 = 2;
20
+ */
21
+ FP64 = 2,
22
+ /**
23
+ * @generated from enum value: DATA_TYPE_INT8 = 3;
24
+ */
25
+ INT8 = 3,
26
+ /**
27
+ * @generated from enum value: DATA_TYPE_INT16 = 4;
28
+ */
29
+ INT16 = 4,
30
+ /**
31
+ * @generated from enum value: DATA_TYPE_INT32 = 5;
32
+ */
33
+ INT32 = 5,
34
+ /**
35
+ * @generated from enum value: DATA_TYPE_INT64 = 6;
36
+ */
37
+ INT64 = 6,
38
+ /**
39
+ * @generated from enum value: DATA_TYPE_UINT8 = 7;
40
+ */
41
+ UINT8 = 7,
42
+ /**
43
+ * @generated from enum value: DATA_TYPE_UINT16 = 8;
44
+ */
45
+ UINT16 = 8,
46
+ /**
47
+ * @generated from enum value: DATA_TYPE_UINT32 = 9;
48
+ */
49
+ UINT32 = 9,
50
+ /**
51
+ * @generated from enum value: DATA_TYPE_UINT64 = 10;
52
+ */
53
+ UINT64 = 10,
54
+ /**
55
+ * @generated from enum value: DATA_TYPE_BOOL = 11;
56
+ */
57
+ BOOL = 11,
58
+ /**
59
+ * @generated from enum value: DATA_TYPE_BYTES = 12;
60
+ */
61
+ BYTES = 12
62
+ }
63
+ /**
64
+ * TensorContents holds flat row-major tensor data. Only the field matching
65
+ * the tensor's data type is read. 8- and 16-bit integers travel widened in
66
+ * int32_contents / uint32_contents and are range-checked server-side
67
+ * (KServe v2 InferTensorContents style).
68
+ *
69
+ * @generated from message onnxserver.v1.TensorContents
70
+ */
71
+ declare class TensorContents extends Message<TensorContents> {
72
+ /**
73
+ * @generated from field: repeated float fp32_contents = 1;
74
+ */
75
+ fp32Contents: number[];
76
+ /**
77
+ * @generated from field: repeated double fp64_contents = 2;
78
+ */
79
+ fp64Contents: number[];
80
+ /**
81
+ * Carries INT8, INT16 and INT32 elements.
82
+ *
83
+ * @generated from field: repeated int32 int32_contents = 3;
84
+ */
85
+ int32Contents: number[];
86
+ /**
87
+ * @generated from field: repeated int64 int64_contents = 4;
88
+ */
89
+ int64Contents: bigint[];
90
+ /**
91
+ * Carries UINT8, UINT16 and UINT32 elements.
92
+ *
93
+ * @generated from field: repeated uint32 uint32_contents = 5;
94
+ */
95
+ uint32Contents: number[];
96
+ /**
97
+ * @generated from field: repeated uint64 uint64_contents = 6;
98
+ */
99
+ uint64Contents: bigint[];
100
+ /**
101
+ * @generated from field: repeated bool bool_contents = 7;
102
+ */
103
+ boolContents: boolean[];
104
+ /**
105
+ * Carries BYTES (string tensor) elements, one entry per element.
106
+ *
107
+ * @generated from field: repeated bytes bytes_contents = 8;
108
+ */
109
+ bytesContents: Uint8Array[];
110
+ constructor(data?: PartialMessage<TensorContents>);
111
+ static readonly runtime: typeof proto3;
112
+ static readonly typeName = "onnxserver.v1.TensorContents";
113
+ static readonly fields: FieldList;
114
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TensorContents;
115
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TensorContents;
116
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TensorContents;
117
+ static equals(a: TensorContents | PlainMessage<TensorContents> | undefined, b: TensorContents | PlainMessage<TensorContents> | undefined): boolean;
118
+ }
119
+ /**
120
+ * Tensor is one named tensor. On Predict requests data_type may be left
121
+ * UNSPECIFIED: the model's declared input type is authoritative and the
122
+ * matching contents field is read. Responses always set data_type. The
123
+ * element count of the populated contents field must equal the product of
124
+ * shape.
125
+ *
126
+ * @generated from message onnxserver.v1.Tensor
127
+ */
128
+ declare class Tensor extends Message<Tensor> {
129
+ /**
130
+ * @generated from field: string name = 1;
131
+ */
132
+ name: string;
133
+ /**
134
+ * @generated from field: onnxserver.v1.DataType data_type = 2;
135
+ */
136
+ dataType: DataType;
137
+ /**
138
+ * @generated from field: repeated int64 shape = 3;
139
+ */
140
+ shape: bigint[];
141
+ /**
142
+ * @generated from field: onnxserver.v1.TensorContents contents = 4;
143
+ */
144
+ contents?: TensorContents;
145
+ constructor(data?: PartialMessage<Tensor>);
146
+ static readonly runtime: typeof proto3;
147
+ static readonly typeName = "onnxserver.v1.Tensor";
148
+ static readonly fields: FieldList;
149
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Tensor;
150
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Tensor;
151
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Tensor;
152
+ static equals(a: Tensor | PlainMessage<Tensor> | undefined, b: Tensor | PlainMessage<Tensor> | undefined): boolean;
153
+ }
154
+ /**
155
+ * @generated from message onnxserver.v1.PredictRequest
156
+ */
157
+ declare class PredictRequest extends Message<PredictRequest> {
158
+ /**
159
+ * @generated from field: string model_name = 1;
160
+ */
161
+ modelName: string;
162
+ /**
163
+ * @generated from field: repeated onnxserver.v1.Tensor inputs = 2;
164
+ */
165
+ inputs: Tensor[];
166
+ constructor(data?: PartialMessage<PredictRequest>);
167
+ static readonly runtime: typeof proto3;
168
+ static readonly typeName = "onnxserver.v1.PredictRequest";
169
+ static readonly fields: FieldList;
170
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PredictRequest;
171
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PredictRequest;
172
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PredictRequest;
173
+ static equals(a: PredictRequest | PlainMessage<PredictRequest> | undefined, b: PredictRequest | PlainMessage<PredictRequest> | undefined): boolean;
174
+ }
175
+ /**
176
+ * @generated from message onnxserver.v1.PredictResponse
177
+ */
178
+ declare class PredictResponse extends Message<PredictResponse> {
179
+ /**
180
+ * @generated from field: string model_name = 1;
181
+ */
182
+ modelName: string;
183
+ /**
184
+ * @generated from field: repeated onnxserver.v1.Tensor outputs = 2;
185
+ */
186
+ outputs: Tensor[];
187
+ constructor(data?: PartialMessage<PredictResponse>);
188
+ static readonly runtime: typeof proto3;
189
+ static readonly typeName = "onnxserver.v1.PredictResponse";
190
+ static readonly fields: FieldList;
191
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PredictResponse;
192
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PredictResponse;
193
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PredictResponse;
194
+ static equals(a: PredictResponse | PlainMessage<PredictResponse> | undefined, b: PredictResponse | PlainMessage<PredictResponse> | undefined): boolean;
195
+ }
196
+ /**
197
+ * TensorMeta describes one model input or output. A dimension of -1 is
198
+ * dynamic (e.g. the batch dimension).
199
+ *
200
+ * @generated from message onnxserver.v1.TensorMeta
201
+ */
202
+ declare class TensorMeta extends Message<TensorMeta> {
203
+ /**
204
+ * @generated from field: string name = 1;
205
+ */
206
+ name: string;
207
+ /**
208
+ * @generated from field: onnxserver.v1.DataType data_type = 2;
209
+ */
210
+ dataType: DataType;
211
+ /**
212
+ * @generated from field: repeated int64 shape = 3;
213
+ */
214
+ shape: bigint[];
215
+ constructor(data?: PartialMessage<TensorMeta>);
216
+ static readonly runtime: typeof proto3;
217
+ static readonly typeName = "onnxserver.v1.TensorMeta";
218
+ static readonly fields: FieldList;
219
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TensorMeta;
220
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TensorMeta;
221
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TensorMeta;
222
+ static equals(a: TensorMeta | PlainMessage<TensorMeta> | undefined, b: TensorMeta | PlainMessage<TensorMeta> | undefined): boolean;
223
+ }
224
+ /**
225
+ * @generated from message onnxserver.v1.ModelMetadata
226
+ */
227
+ declare class ModelMetadata extends Message<ModelMetadata> {
228
+ /**
229
+ * @generated from field: string name = 1;
230
+ */
231
+ name: string;
232
+ /**
233
+ * @generated from field: string source = 2;
234
+ */
235
+ source: string;
236
+ /**
237
+ * @generated from field: repeated onnxserver.v1.TensorMeta inputs = 3;
238
+ */
239
+ inputs: TensorMeta[];
240
+ /**
241
+ * @generated from field: repeated onnxserver.v1.TensorMeta outputs = 4;
242
+ */
243
+ outputs: TensorMeta[];
244
+ constructor(data?: PartialMessage<ModelMetadata>);
245
+ static readonly runtime: typeof proto3;
246
+ static readonly typeName = "onnxserver.v1.ModelMetadata";
247
+ static readonly fields: FieldList;
248
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ModelMetadata;
249
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ModelMetadata;
250
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ModelMetadata;
251
+ static equals(a: ModelMetadata | PlainMessage<ModelMetadata> | undefined, b: ModelMetadata | PlainMessage<ModelMetadata> | undefined): boolean;
252
+ }
253
+ /**
254
+ * @generated from message onnxserver.v1.ListModelsRequest
255
+ */
256
+ declare class ListModelsRequest extends Message<ListModelsRequest> {
257
+ constructor(data?: PartialMessage<ListModelsRequest>);
258
+ static readonly runtime: typeof proto3;
259
+ static readonly typeName = "onnxserver.v1.ListModelsRequest";
260
+ static readonly fields: FieldList;
261
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListModelsRequest;
262
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListModelsRequest;
263
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListModelsRequest;
264
+ static equals(a: ListModelsRequest | PlainMessage<ListModelsRequest> | undefined, b: ListModelsRequest | PlainMessage<ListModelsRequest> | undefined): boolean;
265
+ }
266
+ /**
267
+ * @generated from message onnxserver.v1.ListModelsResponse
268
+ */
269
+ declare class ListModelsResponse extends Message<ListModelsResponse> {
270
+ /**
271
+ * @generated from field: repeated onnxserver.v1.ModelMetadata models = 1;
272
+ */
273
+ models: ModelMetadata[];
274
+ constructor(data?: PartialMessage<ListModelsResponse>);
275
+ static readonly runtime: typeof proto3;
276
+ static readonly typeName = "onnxserver.v1.ListModelsResponse";
277
+ static readonly fields: FieldList;
278
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListModelsResponse;
279
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListModelsResponse;
280
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListModelsResponse;
281
+ static equals(a: ListModelsResponse | PlainMessage<ListModelsResponse> | undefined, b: ListModelsResponse | PlainMessage<ListModelsResponse> | undefined): boolean;
282
+ }
283
+ /**
284
+ * @generated from message onnxserver.v1.GetModelRequest
285
+ */
286
+ declare class GetModelRequest extends Message<GetModelRequest> {
287
+ /**
288
+ * @generated from field: string name = 1;
289
+ */
290
+ name: string;
291
+ constructor(data?: PartialMessage<GetModelRequest>);
292
+ static readonly runtime: typeof proto3;
293
+ static readonly typeName = "onnxserver.v1.GetModelRequest";
294
+ static readonly fields: FieldList;
295
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetModelRequest;
296
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetModelRequest;
297
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetModelRequest;
298
+ static equals(a: GetModelRequest | PlainMessage<GetModelRequest> | undefined, b: GetModelRequest | PlainMessage<GetModelRequest> | undefined): boolean;
299
+ }
300
+ /**
301
+ * @generated from message onnxserver.v1.GetModelResponse
302
+ */
303
+ declare class GetModelResponse extends Message<GetModelResponse> {
304
+ /**
305
+ * @generated from field: onnxserver.v1.ModelMetadata model = 1;
306
+ */
307
+ model?: ModelMetadata;
308
+ constructor(data?: PartialMessage<GetModelResponse>);
309
+ static readonly runtime: typeof proto3;
310
+ static readonly typeName = "onnxserver.v1.GetModelResponse";
311
+ static readonly fields: FieldList;
312
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetModelResponse;
313
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetModelResponse;
314
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetModelResponse;
315
+ static equals(a: GetModelResponse | PlainMessage<GetModelResponse> | undefined, b: GetModelResponse | PlainMessage<GetModelResponse> | undefined): boolean;
316
+ }
317
+
318
+ export { DataType, GetModelRequest, GetModelResponse, ListModelsRequest, ListModelsResponse, ModelMetadata, PredictRequest, PredictResponse, Tensor, TensorContents, TensorMeta };
@@ -0,0 +1 @@
1
+ import{Message as t,proto3 as n}from"@bufbuild/protobuf";var e=(t=>(t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.FP32=1]="FP32",t[t.FP64=2]="FP64",t[t.INT8=3]="INT8",t[t.INT16=4]="INT16",t[t.INT32=5]="INT32",t[t.INT64=6]="INT64",t[t.UINT8=7]="UINT8",t[t.UINT16=8]="UINT16",t[t.UINT32=9]="UINT32",t[t.UINT64=10]="UINT64",t[t.BOOL=11]="BOOL",t[t.BYTES=12]="BYTES",t))(e||{});n.util.setEnumType(e,"onnxserver.v1.DataType",[{no:0,name:"DATA_TYPE_UNSPECIFIED"},{no:1,name:"DATA_TYPE_FP32"},{no:2,name:"DATA_TYPE_FP64"},{no:3,name:"DATA_TYPE_INT8"},{no:4,name:"DATA_TYPE_INT16"},{no:5,name:"DATA_TYPE_INT32"},{no:6,name:"DATA_TYPE_INT64"},{no:7,name:"DATA_TYPE_UINT8"},{no:8,name:"DATA_TYPE_UINT16"},{no:9,name:"DATA_TYPE_UINT32"},{no:10,name:"DATA_TYPE_UINT64"},{no:11,name:"DATA_TYPE_BOOL"},{no:12,name:"DATA_TYPE_BYTES"}]);class s extends t{fp32Contents=[];fp64Contents=[];int32Contents=[];int64Contents=[];uint32Contents=[];uint64Contents=[];boolContents=[];bytesContents=[];constructor(t){super(),n.util.initPartial(t,this)}static runtime=n;static typeName="onnxserver.v1.TensorContents";static fields=n.util.newFieldList((()=>[{no:1,name:"fp32_contents",kind:"scalar",T:2,repeated:!0},{no:2,name:"fp64_contents",kind:"scalar",T:1,repeated:!0},{no:3,name:"int32_contents",kind:"scalar",T:5,repeated:!0},{no:4,name:"int64_contents",kind:"scalar",T:3,repeated:!0},{no:5,name:"uint32_contents",kind:"scalar",T:13,repeated:!0},{no:6,name:"uint64_contents",kind:"scalar",T:4,repeated:!0},{no:7,name:"bool_contents",kind:"scalar",T:8,repeated:!0},{no:8,name:"bytes_contents",kind:"scalar",T:12,repeated:!0}]));static fromBinary(t,n){return(new s).fromBinary(t,n)}static fromJson(t,n){return(new s).fromJson(t,n)}static fromJsonString(t,n){return(new s).fromJsonString(t,n)}static equals(t,e){return n.util.equals(s,t,e)}}class r extends t{name="";dataType=0;shape=[];contents;constructor(t){super(),n.util.initPartial(t,this)}static runtime=n;static typeName="onnxserver.v1.Tensor";static fields=n.util.newFieldList((()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"data_type",kind:"enum",T:n.getEnumType(e)},{no:3,name:"shape",kind:"scalar",T:3,repeated:!0},{no:4,name:"contents",kind:"message",T:s}]));static fromBinary(t,n){return(new r).fromBinary(t,n)}static fromJson(t,n){return(new r).fromJson(t,n)}static fromJsonString(t,n){return(new r).fromJsonString(t,n)}static equals(t,e){return n.util.equals(r,t,e)}}class a extends t{modelName="";inputs=[];constructor(t){super(),n.util.initPartial(t,this)}static runtime=n;static typeName="onnxserver.v1.PredictRequest";static fields=n.util.newFieldList((()=>[{no:1,name:"model_name",kind:"scalar",T:9},{no:2,name:"inputs",kind:"message",T:r,repeated:!0}]));static fromBinary(t,n){return(new a).fromBinary(t,n)}static fromJson(t,n){return(new a).fromJson(t,n)}static fromJsonString(t,n){return(new a).fromJsonString(t,n)}static equals(t,e){return n.util.equals(a,t,e)}}class i extends t{modelName="";outputs=[];constructor(t){super(),n.util.initPartial(t,this)}static runtime=n;static typeName="onnxserver.v1.PredictResponse";static fields=n.util.newFieldList((()=>[{no:1,name:"model_name",kind:"scalar",T:9},{no:2,name:"outputs",kind:"message",T:r,repeated:!0}]));static fromBinary(t,n){return(new i).fromBinary(t,n)}static fromJson(t,n){return(new i).fromJson(t,n)}static fromJsonString(t,n){return(new i).fromJsonString(t,n)}static equals(t,e){return n.util.equals(i,t,e)}}class o extends t{name="";dataType=0;shape=[];constructor(t){super(),n.util.initPartial(t,this)}static runtime=n;static typeName="onnxserver.v1.TensorMeta";static fields=n.util.newFieldList((()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"data_type",kind:"enum",T:n.getEnumType(e)},{no:3,name:"shape",kind:"scalar",T:3,repeated:!0}]));static fromBinary(t,n){return(new o).fromBinary(t,n)}static fromJson(t,n){return(new o).fromJson(t,n)}static fromJsonString(t,n){return(new o).fromJsonString(t,n)}static equals(t,e){return n.util.equals(o,t,e)}}class m extends t{name="";source="";inputs=[];outputs=[];constructor(t){super(),n.util.initPartial(t,this)}static runtime=n;static typeName="onnxserver.v1.ModelMetadata";static fields=n.util.newFieldList((()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"source",kind:"scalar",T:9},{no:3,name:"inputs",kind:"message",T:o,repeated:!0},{no:4,name:"outputs",kind:"message",T:o,repeated:!0}]));static fromBinary(t,n){return(new m).fromBinary(t,n)}static fromJson(t,n){return(new m).fromJson(t,n)}static fromJsonString(t,n){return(new m).fromJsonString(t,n)}static equals(t,e){return n.util.equals(m,t,e)}}class u extends t{constructor(t){super(),n.util.initPartial(t,this)}static runtime=n;static typeName="onnxserver.v1.ListModelsRequest";static fields=n.util.newFieldList((()=>[]));static fromBinary(t,n){return(new u).fromBinary(t,n)}static fromJson(t,n){return(new u).fromJson(t,n)}static fromJsonString(t,n){return(new u).fromJsonString(t,n)}static equals(t,e){return n.util.equals(u,t,e)}}class c extends t{models=[];constructor(t){super(),n.util.initPartial(t,this)}static runtime=n;static typeName="onnxserver.v1.ListModelsResponse";static fields=n.util.newFieldList((()=>[{no:1,name:"models",kind:"message",T:m,repeated:!0}]));static fromBinary(t,n){return(new c).fromBinary(t,n)}static fromJson(t,n){return(new c).fromJson(t,n)}static fromJsonString(t,n){return(new c).fromJsonString(t,n)}static equals(t,e){return n.util.equals(c,t,e)}}class l extends t{name="";constructor(t){super(),n.util.initPartial(t,this)}static runtime=n;static typeName="onnxserver.v1.GetModelRequest";static fields=n.util.newFieldList((()=>[{no:1,name:"name",kind:"scalar",T:9}]));static fromBinary(t,n){return(new l).fromBinary(t,n)}static fromJson(t,n){return(new l).fromJson(t,n)}static fromJsonString(t,n){return(new l).fromJsonString(t,n)}static equals(t,e){return n.util.equals(l,t,e)}}class d extends t{model;constructor(t){super(),n.util.initPartial(t,this)}static runtime=n;static typeName="onnxserver.v1.GetModelResponse";static fields=n.util.newFieldList((()=>[{no:1,name:"model",kind:"message",T:m}]));static fromBinary(t,n){return(new d).fromBinary(t,n)}static fromJson(t,n){return(new d).fromJson(t,n)}static fromJsonString(t,n){return(new d).fromJsonString(t,n)}static equals(t,e){return n.util.equals(d,t,e)}}export{e as DataType,l as GetModelRequest,d as GetModelResponse,u as ListModelsRequest,c as ListModelsResponse,m as ModelMetadata,a as PredictRequest,i as PredictResponse,r as Tensor,s as TensorContents,o as TensorMeta};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dailydotdev/schema",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
4
4
  "author": "@dailydotdev",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "scripts": {
16
16
  "build": "tsup",
17
- "prebuild": "(cd generated && barrelsby --delete) && rm -rf dist",
17
+ "prebuild": "(cd generated && barrelsby --delete --exclude \"/onnx-server/\" \"/tei/\") && rm -rf dist",
18
18
  "prepublishOnly": "npm run build"
19
19
  },
20
20
  "exports": {
@@ -1 +0,0 @@
1
- var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,s={};((e,r)=>{for(var o in r)t(e,o,{get:r[o],enumerable:!0})})(s,{BatchRecommendRequest:()=>l,BatchRecommendResponse:()=>d,RecommendRequest:()=>m,RecommendResponse:()=>u,Recommendation:()=>c}),module.exports=(e=s,((e,s,i,a)=>{if(s&&"object"==typeof s||"function"==typeof s)for(let m of o(s))n.call(e,m)||m===i||t(e,m,{get:()=>s[m],enumerable:!(a=r(s,m))||a.enumerable});return e})(t({},"__esModule",{value:!0}),e));var i=require("@bufbuild/protobuf"),a=require("../../util/error_pb.cjs");class m extends i.Message{seedPostIds=[];n=0;constructor(e){super(),i.proto3.util.initPartial(e,this)}static runtime=i.proto3;static typeName="recommend.RecommendRequest";static fields=i.proto3.util.newFieldList((()=>[{no:1,name:"seed_post_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"n",kind:"scalar",T:13}]));static fromBinary(e,t){return(new m).fromBinary(e,t)}static fromJson(e,t){return(new m).fromJson(e,t)}static fromJsonString(e,t){return(new m).fromJsonString(e,t)}static equals(e,t){return i.proto3.util.equals(m,e,t)}}class c extends i.Message{postId="";score=0;constructor(e){super(),i.proto3.util.initPartial(e,this)}static runtime=i.proto3;static typeName="recommend.Recommendation";static fields=i.proto3.util.newFieldList((()=>[{no:1,name:"post_id",kind:"scalar",T:9},{no:2,name:"score",kind:"scalar",T:2}]));static fromBinary(e,t){return(new c).fromBinary(e,t)}static fromJson(e,t){return(new c).fromJson(e,t)}static fromJsonString(e,t){return(new c).fromJsonString(e,t)}static equals(e,t){return i.proto3.util.equals(c,e,t)}}class u extends i.Message{recommendations=[];modelVersion="";error=[];constructor(e){super(),i.proto3.util.initPartial(e,this)}static runtime=i.proto3;static typeName="recommend.RecommendResponse";static fields=i.proto3.util.newFieldList((()=>[{no:1,name:"recommendations",kind:"message",T:c,repeated:!0},{no:2,name:"model_version",kind:"scalar",T:9},{no:3,name:"error",kind:"message",T:a.Error,repeated:!0}]));static fromBinary(e,t){return(new u).fromBinary(e,t)}static fromJson(e,t){return(new u).fromJson(e,t)}static fromJsonString(e,t){return(new u).fromJsonString(e,t)}static equals(e,t){return i.proto3.util.equals(u,e,t)}}class l extends i.Message{requests=[];constructor(e){super(),i.proto3.util.initPartial(e,this)}static runtime=i.proto3;static typeName="recommend.BatchRecommendRequest";static fields=i.proto3.util.newFieldList((()=>[{no:1,name:"requests",kind:"message",T:m,repeated:!0}]));static fromBinary(e,t){return(new l).fromBinary(e,t)}static fromJson(e,t){return(new l).fromJson(e,t)}static fromJsonString(e,t){return(new l).fromJsonString(e,t)}static equals(e,t){return i.proto3.util.equals(l,e,t)}}class d extends i.Message{responses=[];error=[];constructor(e){super(),i.proto3.util.initPartial(e,this)}static runtime=i.proto3;static typeName="recommend.BatchRecommendResponse";static fields=i.proto3.util.newFieldList((()=>[{no:1,name:"responses",kind:"message",T:u,repeated:!0},{no:2,name:"error",kind:"message",T:a.Error,repeated:!0}]));static fromBinary(e,t){return(new d).fromBinary(e,t)}static fromJson(e,t){return(new d).fromJson(e,t)}static fromJsonString(e,t){return(new d).fromJsonString(e,t)}static equals(e,t){return i.proto3.util.equals(d,e,t)}}
@@ -1,110 +0,0 @@
1
- import { Message, PartialMessage, proto3, FieldList, BinaryReadOptions, JsonValue, JsonReadOptions, PlainMessage } from '@bufbuild/protobuf';
2
- import { Error } from '../../util/error_pb.cjs';
3
-
4
- /**
5
- * @generated from message recommend.RecommendRequest
6
- */
7
- declare class RecommendRequest extends Message<RecommendRequest> {
8
- /**
9
- * @generated from field: repeated string seed_post_ids = 1;
10
- */
11
- seedPostIds: string[];
12
- /**
13
- * @generated from field: uint32 n = 2;
14
- */
15
- n: number;
16
- constructor(data?: PartialMessage<RecommendRequest>);
17
- static readonly runtime: typeof proto3;
18
- static readonly typeName = "recommend.RecommendRequest";
19
- static readonly fields: FieldList;
20
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RecommendRequest;
21
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RecommendRequest;
22
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RecommendRequest;
23
- static equals(a: RecommendRequest | PlainMessage<RecommendRequest> | undefined, b: RecommendRequest | PlainMessage<RecommendRequest> | undefined): boolean;
24
- }
25
- /**
26
- * @generated from message recommend.Recommendation
27
- */
28
- declare class Recommendation extends Message<Recommendation> {
29
- /**
30
- * @generated from field: string post_id = 1;
31
- */
32
- postId: string;
33
- /**
34
- * @generated from field: float score = 2;
35
- */
36
- score: number;
37
- constructor(data?: PartialMessage<Recommendation>);
38
- static readonly runtime: typeof proto3;
39
- static readonly typeName = "recommend.Recommendation";
40
- static readonly fields: FieldList;
41
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Recommendation;
42
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Recommendation;
43
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Recommendation;
44
- static equals(a: Recommendation | PlainMessage<Recommendation> | undefined, b: Recommendation | PlainMessage<Recommendation> | undefined): boolean;
45
- }
46
- /**
47
- * @generated from message recommend.RecommendResponse
48
- */
49
- declare class RecommendResponse extends Message<RecommendResponse> {
50
- /**
51
- * @generated from field: repeated recommend.Recommendation recommendations = 1;
52
- */
53
- recommendations: Recommendation[];
54
- /**
55
- * @generated from field: string model_version = 2;
56
- */
57
- modelVersion: string;
58
- /**
59
- * @generated from field: repeated util.Error error = 3;
60
- */
61
- error: Error[];
62
- constructor(data?: PartialMessage<RecommendResponse>);
63
- static readonly runtime: typeof proto3;
64
- static readonly typeName = "recommend.RecommendResponse";
65
- static readonly fields: FieldList;
66
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RecommendResponse;
67
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RecommendResponse;
68
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RecommendResponse;
69
- static equals(a: RecommendResponse | PlainMessage<RecommendResponse> | undefined, b: RecommendResponse | PlainMessage<RecommendResponse> | undefined): boolean;
70
- }
71
- /**
72
- * @generated from message recommend.BatchRecommendRequest
73
- */
74
- declare class BatchRecommendRequest extends Message<BatchRecommendRequest> {
75
- /**
76
- * @generated from field: repeated recommend.RecommendRequest requests = 1;
77
- */
78
- requests: RecommendRequest[];
79
- constructor(data?: PartialMessage<BatchRecommendRequest>);
80
- static readonly runtime: typeof proto3;
81
- static readonly typeName = "recommend.BatchRecommendRequest";
82
- static readonly fields: FieldList;
83
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BatchRecommendRequest;
84
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BatchRecommendRequest;
85
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BatchRecommendRequest;
86
- static equals(a: BatchRecommendRequest | PlainMessage<BatchRecommendRequest> | undefined, b: BatchRecommendRequest | PlainMessage<BatchRecommendRequest> | undefined): boolean;
87
- }
88
- /**
89
- * @generated from message recommend.BatchRecommendResponse
90
- */
91
- declare class BatchRecommendResponse extends Message<BatchRecommendResponse> {
92
- /**
93
- * @generated from field: repeated recommend.RecommendResponse responses = 1;
94
- */
95
- responses: RecommendResponse[];
96
- /**
97
- * @generated from field: repeated util.Error error = 2;
98
- */
99
- error: Error[];
100
- constructor(data?: PartialMessage<BatchRecommendResponse>);
101
- static readonly runtime: typeof proto3;
102
- static readonly typeName = "recommend.BatchRecommendResponse";
103
- static readonly fields: FieldList;
104
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BatchRecommendResponse;
105
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BatchRecommendResponse;
106
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BatchRecommendResponse;
107
- static equals(a: BatchRecommendResponse | PlainMessage<BatchRecommendResponse> | undefined, b: BatchRecommendResponse | PlainMessage<BatchRecommendResponse> | undefined): boolean;
108
- }
109
-
110
- export { BatchRecommendRequest, BatchRecommendResponse, RecommendRequest, RecommendResponse, Recommendation };
@@ -1,110 +0,0 @@
1
- import { Message, PartialMessage, proto3, FieldList, BinaryReadOptions, JsonValue, JsonReadOptions, PlainMessage } from '@bufbuild/protobuf';
2
- import { Error } from '../../util/error_pb.js';
3
-
4
- /**
5
- * @generated from message recommend.RecommendRequest
6
- */
7
- declare class RecommendRequest extends Message<RecommendRequest> {
8
- /**
9
- * @generated from field: repeated string seed_post_ids = 1;
10
- */
11
- seedPostIds: string[];
12
- /**
13
- * @generated from field: uint32 n = 2;
14
- */
15
- n: number;
16
- constructor(data?: PartialMessage<RecommendRequest>);
17
- static readonly runtime: typeof proto3;
18
- static readonly typeName = "recommend.RecommendRequest";
19
- static readonly fields: FieldList;
20
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RecommendRequest;
21
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RecommendRequest;
22
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RecommendRequest;
23
- static equals(a: RecommendRequest | PlainMessage<RecommendRequest> | undefined, b: RecommendRequest | PlainMessage<RecommendRequest> | undefined): boolean;
24
- }
25
- /**
26
- * @generated from message recommend.Recommendation
27
- */
28
- declare class Recommendation extends Message<Recommendation> {
29
- /**
30
- * @generated from field: string post_id = 1;
31
- */
32
- postId: string;
33
- /**
34
- * @generated from field: float score = 2;
35
- */
36
- score: number;
37
- constructor(data?: PartialMessage<Recommendation>);
38
- static readonly runtime: typeof proto3;
39
- static readonly typeName = "recommend.Recommendation";
40
- static readonly fields: FieldList;
41
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Recommendation;
42
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Recommendation;
43
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Recommendation;
44
- static equals(a: Recommendation | PlainMessage<Recommendation> | undefined, b: Recommendation | PlainMessage<Recommendation> | undefined): boolean;
45
- }
46
- /**
47
- * @generated from message recommend.RecommendResponse
48
- */
49
- declare class RecommendResponse extends Message<RecommendResponse> {
50
- /**
51
- * @generated from field: repeated recommend.Recommendation recommendations = 1;
52
- */
53
- recommendations: Recommendation[];
54
- /**
55
- * @generated from field: string model_version = 2;
56
- */
57
- modelVersion: string;
58
- /**
59
- * @generated from field: repeated util.Error error = 3;
60
- */
61
- error: Error[];
62
- constructor(data?: PartialMessage<RecommendResponse>);
63
- static readonly runtime: typeof proto3;
64
- static readonly typeName = "recommend.RecommendResponse";
65
- static readonly fields: FieldList;
66
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RecommendResponse;
67
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RecommendResponse;
68
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RecommendResponse;
69
- static equals(a: RecommendResponse | PlainMessage<RecommendResponse> | undefined, b: RecommendResponse | PlainMessage<RecommendResponse> | undefined): boolean;
70
- }
71
- /**
72
- * @generated from message recommend.BatchRecommendRequest
73
- */
74
- declare class BatchRecommendRequest extends Message<BatchRecommendRequest> {
75
- /**
76
- * @generated from field: repeated recommend.RecommendRequest requests = 1;
77
- */
78
- requests: RecommendRequest[];
79
- constructor(data?: PartialMessage<BatchRecommendRequest>);
80
- static readonly runtime: typeof proto3;
81
- static readonly typeName = "recommend.BatchRecommendRequest";
82
- static readonly fields: FieldList;
83
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BatchRecommendRequest;
84
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BatchRecommendRequest;
85
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BatchRecommendRequest;
86
- static equals(a: BatchRecommendRequest | PlainMessage<BatchRecommendRequest> | undefined, b: BatchRecommendRequest | PlainMessage<BatchRecommendRequest> | undefined): boolean;
87
- }
88
- /**
89
- * @generated from message recommend.BatchRecommendResponse
90
- */
91
- declare class BatchRecommendResponse extends Message<BatchRecommendResponse> {
92
- /**
93
- * @generated from field: repeated recommend.RecommendResponse responses = 1;
94
- */
95
- responses: RecommendResponse[];
96
- /**
97
- * @generated from field: repeated util.Error error = 2;
98
- */
99
- error: Error[];
100
- constructor(data?: PartialMessage<BatchRecommendResponse>);
101
- static readonly runtime: typeof proto3;
102
- static readonly typeName = "recommend.BatchRecommendResponse";
103
- static readonly fields: FieldList;
104
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BatchRecommendResponse;
105
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BatchRecommendResponse;
106
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BatchRecommendResponse;
107
- static equals(a: BatchRecommendResponse | PlainMessage<BatchRecommendResponse> | undefined, b: BatchRecommendResponse | PlainMessage<BatchRecommendResponse> | undefined): boolean;
108
- }
109
-
110
- export { BatchRecommendRequest, BatchRecommendResponse, RecommendRequest, RecommendResponse, Recommendation };
@@ -1 +0,0 @@
1
- import{Message as t,proto3 as e}from"@bufbuild/protobuf";import{Error as r}from"../../util/error_pb.ts";class n extends t{seedPostIds=[];n=0;constructor(t){super(),e.util.initPartial(t,this)}static runtime=e;static typeName="recommend.RecommendRequest";static fields=e.util.newFieldList((()=>[{no:1,name:"seed_post_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"n",kind:"scalar",T:13}]));static fromBinary(t,e){return(new n).fromBinary(t,e)}static fromJson(t,e){return(new n).fromJson(t,e)}static fromJsonString(t,e){return(new n).fromJsonString(t,e)}static equals(t,r){return e.util.equals(n,t,r)}}class s extends t{postId="";score=0;constructor(t){super(),e.util.initPartial(t,this)}static runtime=e;static typeName="recommend.Recommendation";static fields=e.util.newFieldList((()=>[{no:1,name:"post_id",kind:"scalar",T:9},{no:2,name:"score",kind:"scalar",T:2}]));static fromBinary(t,e){return(new s).fromBinary(t,e)}static fromJson(t,e){return(new s).fromJson(t,e)}static fromJsonString(t,e){return(new s).fromJsonString(t,e)}static equals(t,r){return e.util.equals(s,t,r)}}class i extends t{recommendations=[];modelVersion="";error=[];constructor(t){super(),e.util.initPartial(t,this)}static runtime=e;static typeName="recommend.RecommendResponse";static fields=e.util.newFieldList((()=>[{no:1,name:"recommendations",kind:"message",T:s,repeated:!0},{no:2,name:"model_version",kind:"scalar",T:9},{no:3,name:"error",kind:"message",T:r,repeated:!0}]));static fromBinary(t,e){return(new i).fromBinary(t,e)}static fromJson(t,e){return(new i).fromJson(t,e)}static fromJsonString(t,e){return(new i).fromJsonString(t,e)}static equals(t,r){return e.util.equals(i,t,r)}}class a extends t{requests=[];constructor(t){super(),e.util.initPartial(t,this)}static runtime=e;static typeName="recommend.BatchRecommendRequest";static fields=e.util.newFieldList((()=>[{no:1,name:"requests",kind:"message",T:n,repeated:!0}]));static fromBinary(t,e){return(new a).fromBinary(t,e)}static fromJson(t,e){return(new a).fromJson(t,e)}static fromJsonString(t,e){return(new a).fromJsonString(t,e)}static equals(t,r){return e.util.equals(a,t,r)}}class o extends t{responses=[];error=[];constructor(t){super(),e.util.initPartial(t,this)}static runtime=e;static typeName="recommend.BatchRecommendResponse";static fields=e.util.newFieldList((()=>[{no:1,name:"responses",kind:"message",T:i,repeated:!0},{no:2,name:"error",kind:"message",T:r,repeated:!0}]));static fromBinary(t,e){return(new o).fromBinary(t,e)}static fromJson(t,e){return(new o).fromJson(t,e)}static fromJsonString(t,e){return(new o).fromJsonString(t,e)}static equals(t,r){return e.util.equals(o,t,r)}}export{a as BatchRecommendRequest,o as BatchRecommendResponse,n as RecommendRequest,i as RecommendResponse,s as Recommendation};