@vectora/contracts 1.0.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.
- package/LICENSE.md +25 -0
- package/dist/events/auth/index.d.ts +1 -0
- package/dist/events/auth/index.js +17 -0
- package/dist/events/auth/verification-request.interface.d.ts +5 -0
- package/dist/events/auth/verification-request.interface.js +2 -0
- package/dist/events/index.d.ts +1 -0
- package/dist/events/index.js +17 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +19 -0
- package/dist/proto/index.d.ts +1 -0
- package/dist/proto/index.js +17 -0
- package/dist/proto/paths.d.ts +18 -0
- package/dist/proto/paths.js +27 -0
- package/dist/utils/data-transformer.util.d.ts +55 -0
- package/dist/utils/data-transformer.util.js +141 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +17 -0
- package/gen/go/mapbox-direction-v1.pb.go +621 -0
- package/gen/go/mapbox-geocode-v1.pb.go +473 -0
- package/gen/go/mapbox-matrix-v1.pb.go +337 -0
- package/gen/go/mapbox-optimization-v1.pb.go +422 -0
- package/gen/go/mapbox-search-v1.pb.go +699 -0
- package/gen/ts/common-geocode-v1.ts +368 -0
- package/gen/ts/common-pagination-v1.ts +713 -0
- package/gen/ts/fleet-truck-v1.ts +1102 -0
- package/gen/ts/fleet-unit-v1.ts +9 -0
- package/gen/ts/google/protobuf/field_mask.ts +295 -0
- package/gen/ts/google/protobuf/wrappers.ts +544 -0
- package/gen/ts/identify-account-v1.ts +9 -0
- package/gen/ts/identify-auth-v1.ts +9 -0
- package/gen/ts/identify-company-v1.ts +1025 -0
- package/gen/ts/identify-role-v1.ts +9 -0
- package/gen/ts/identify-user-v1.ts +9 -0
- package/gen/ts/mapbox-direction-v1.ts +718 -0
- package/gen/ts/mapbox-geocode-v1.ts +511 -0
- package/gen/ts/mapbox-matrix-v1.ts +369 -0
- package/gen/ts/mapbox-optimization-v1.ts +472 -0
- package/gen/ts/mapbox-search-v1.ts +803 -0
- package/gen/ts/shipments-freight-v1.ts +9 -0
- package/gen/ts/shipments-loads-v1.ts +9 -0
- package/gen/ts/shipments-rate-v1.ts +9 -0
- package/gen/ts/shipments-stop-v1.ts +9 -0
- package/package.json +40 -0
- package/proto/common-geocode-v1.proto +10 -0
- package/proto/common-pagination-v1.proto +39 -0
- package/proto/fleet-truck-v1.proto +145 -0
- package/proto/fleet-unit-v1.proto +3 -0
- package/proto/identify-account-v1.proto +3 -0
- package/proto/identify-auth-v1.proto +3 -0
- package/proto/identify-company-v1.proto +114 -0
- package/proto/identify-role-v1.proto +3 -0
- package/proto/identify-user-v1.proto +3 -0
- package/proto/mapbox-direction-v1.proto +61 -0
- package/proto/mapbox-geocode-v1.proto +47 -0
- package/proto/mapbox-matrix-v1.proto +34 -0
- package/proto/mapbox-optimization-v1.proto +43 -0
- package/proto/mapbox-search-v1.proto +68 -0
- package/proto/shipments-freight-v1.proto +3 -0
- package/proto/shipments-loads-v1.proto +3 -0
- package/proto/shipments-rate-v1.proto +3 -0
- package/proto/shipments-stop-v1.proto +3 -0
|
@@ -0,0 +1,713 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.2
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: common-pagination-v1.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
|
|
10
|
+
export const protobufPackage = "common_pagination.v1";
|
|
11
|
+
|
|
12
|
+
export interface PaginateQuery {
|
|
13
|
+
page?: number | undefined;
|
|
14
|
+
limit?: number | undefined;
|
|
15
|
+
search?: string | undefined;
|
|
16
|
+
path?: string | undefined;
|
|
17
|
+
sortBy: string[];
|
|
18
|
+
filter: { [key: string]: string };
|
|
19
|
+
select: string[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface PaginateQuery_FilterEntry {
|
|
23
|
+
key: string;
|
|
24
|
+
value: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface PaginateMeta {
|
|
28
|
+
itemsPerPage: number;
|
|
29
|
+
totalItems: number;
|
|
30
|
+
currentPage: number;
|
|
31
|
+
totalPages: number;
|
|
32
|
+
sortBy: string[];
|
|
33
|
+
filter: { [key: string]: string };
|
|
34
|
+
links: PaginateMeta_Links | undefined;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface PaginateMeta_FilterEntry {
|
|
38
|
+
key: string;
|
|
39
|
+
value: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface PaginateMeta_Links {
|
|
43
|
+
first: string;
|
|
44
|
+
previous: string;
|
|
45
|
+
current: string;
|
|
46
|
+
next: string;
|
|
47
|
+
last: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface FilterQuery {
|
|
51
|
+
search?: string | undefined;
|
|
52
|
+
path?: string | undefined;
|
|
53
|
+
sortBy: string[];
|
|
54
|
+
filter: { [key: string]: string };
|
|
55
|
+
select: string[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface FilterQuery_FilterEntry {
|
|
59
|
+
key: string;
|
|
60
|
+
value: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function createBasePaginateQuery(): PaginateQuery {
|
|
64
|
+
return { page: undefined, limit: undefined, search: undefined, path: undefined, sortBy: [], filter: {}, select: [] };
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export const PaginateQuery: MessageFns<PaginateQuery> = {
|
|
68
|
+
encode(message: PaginateQuery, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
69
|
+
if (message.page !== undefined) {
|
|
70
|
+
writer.uint32(8).int32(message.page);
|
|
71
|
+
}
|
|
72
|
+
if (message.limit !== undefined) {
|
|
73
|
+
writer.uint32(16).int32(message.limit);
|
|
74
|
+
}
|
|
75
|
+
if (message.search !== undefined) {
|
|
76
|
+
writer.uint32(26).string(message.search);
|
|
77
|
+
}
|
|
78
|
+
if (message.path !== undefined) {
|
|
79
|
+
writer.uint32(34).string(message.path);
|
|
80
|
+
}
|
|
81
|
+
for (const v of message.sortBy) {
|
|
82
|
+
writer.uint32(42).string(v!);
|
|
83
|
+
}
|
|
84
|
+
globalThis.Object.entries(message.filter).forEach(([key, value]: [string, string]) => {
|
|
85
|
+
PaginateQuery_FilterEntry.encode({ key: key as any, value }, writer.uint32(50).fork()).join();
|
|
86
|
+
});
|
|
87
|
+
for (const v of message.select) {
|
|
88
|
+
writer.uint32(58).string(v!);
|
|
89
|
+
}
|
|
90
|
+
return writer;
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PaginateQuery {
|
|
94
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
95
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
96
|
+
const message = createBasePaginateQuery();
|
|
97
|
+
while (reader.pos < end) {
|
|
98
|
+
const tag = reader.uint32();
|
|
99
|
+
switch (tag >>> 3) {
|
|
100
|
+
case 1: {
|
|
101
|
+
if (tag !== 8) {
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
message.page = reader.int32();
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
case 2: {
|
|
109
|
+
if (tag !== 16) {
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
message.limit = reader.int32();
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
case 3: {
|
|
117
|
+
if (tag !== 26) {
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
message.search = reader.string();
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
case 4: {
|
|
125
|
+
if (tag !== 34) {
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
message.path = reader.string();
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
case 5: {
|
|
133
|
+
if (tag !== 42) {
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
message.sortBy.push(reader.string());
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
case 6: {
|
|
141
|
+
if (tag !== 50) {
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const entry6 = PaginateQuery_FilterEntry.decode(reader, reader.uint32());
|
|
146
|
+
if (entry6.value !== undefined) {
|
|
147
|
+
message.filter[entry6.key] = entry6.value;
|
|
148
|
+
}
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
case 7: {
|
|
152
|
+
if (tag !== 58) {
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
message.select.push(reader.string());
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
reader.skip(tag & 7);
|
|
164
|
+
}
|
|
165
|
+
return message;
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
create<I extends Exact<DeepPartial<PaginateQuery>, I>>(base?: I): PaginateQuery {
|
|
169
|
+
return PaginateQuery.fromPartial(base ?? ({} as any));
|
|
170
|
+
},
|
|
171
|
+
fromPartial<I extends Exact<DeepPartial<PaginateQuery>, I>>(object: I): PaginateQuery {
|
|
172
|
+
const message = createBasePaginateQuery();
|
|
173
|
+
message.page = object.page ?? undefined;
|
|
174
|
+
message.limit = object.limit ?? undefined;
|
|
175
|
+
message.search = object.search ?? undefined;
|
|
176
|
+
message.path = object.path ?? undefined;
|
|
177
|
+
message.sortBy = object.sortBy?.map((e) => e) || [];
|
|
178
|
+
message.filter = (globalThis.Object.entries(object.filter ?? {}) as [string, string][]).reduce(
|
|
179
|
+
(acc: { [key: string]: string }, [key, value]: [string, string]) => {
|
|
180
|
+
if (value !== undefined) {
|
|
181
|
+
acc[key] = globalThis.String(value);
|
|
182
|
+
}
|
|
183
|
+
return acc;
|
|
184
|
+
},
|
|
185
|
+
{},
|
|
186
|
+
);
|
|
187
|
+
message.select = object.select?.map((e) => e) || [];
|
|
188
|
+
return message;
|
|
189
|
+
},
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
function createBasePaginateQuery_FilterEntry(): PaginateQuery_FilterEntry {
|
|
193
|
+
return { key: "", value: "" };
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export const PaginateQuery_FilterEntry: MessageFns<PaginateQuery_FilterEntry> = {
|
|
197
|
+
encode(message: PaginateQuery_FilterEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
198
|
+
if (message.key !== "") {
|
|
199
|
+
writer.uint32(10).string(message.key);
|
|
200
|
+
}
|
|
201
|
+
if (message.value !== "") {
|
|
202
|
+
writer.uint32(18).string(message.value);
|
|
203
|
+
}
|
|
204
|
+
return writer;
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PaginateQuery_FilterEntry {
|
|
208
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
209
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
210
|
+
const message = createBasePaginateQuery_FilterEntry();
|
|
211
|
+
while (reader.pos < end) {
|
|
212
|
+
const tag = reader.uint32();
|
|
213
|
+
switch (tag >>> 3) {
|
|
214
|
+
case 1: {
|
|
215
|
+
if (tag !== 10) {
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
message.key = reader.string();
|
|
220
|
+
continue;
|
|
221
|
+
}
|
|
222
|
+
case 2: {
|
|
223
|
+
if (tag !== 18) {
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
message.value = reader.string();
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
reader.skip(tag & 7);
|
|
235
|
+
}
|
|
236
|
+
return message;
|
|
237
|
+
},
|
|
238
|
+
|
|
239
|
+
create<I extends Exact<DeepPartial<PaginateQuery_FilterEntry>, I>>(base?: I): PaginateQuery_FilterEntry {
|
|
240
|
+
return PaginateQuery_FilterEntry.fromPartial(base ?? ({} as any));
|
|
241
|
+
},
|
|
242
|
+
fromPartial<I extends Exact<DeepPartial<PaginateQuery_FilterEntry>, I>>(object: I): PaginateQuery_FilterEntry {
|
|
243
|
+
const message = createBasePaginateQuery_FilterEntry();
|
|
244
|
+
message.key = object.key ?? "";
|
|
245
|
+
message.value = object.value ?? "";
|
|
246
|
+
return message;
|
|
247
|
+
},
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
function createBasePaginateMeta(): PaginateMeta {
|
|
251
|
+
return { itemsPerPage: 0, totalItems: 0, currentPage: 0, totalPages: 0, sortBy: [], filter: {}, links: undefined };
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export const PaginateMeta: MessageFns<PaginateMeta> = {
|
|
255
|
+
encode(message: PaginateMeta, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
256
|
+
if (message.itemsPerPage !== 0) {
|
|
257
|
+
writer.uint32(8).int32(message.itemsPerPage);
|
|
258
|
+
}
|
|
259
|
+
if (message.totalItems !== 0) {
|
|
260
|
+
writer.uint32(16).int32(message.totalItems);
|
|
261
|
+
}
|
|
262
|
+
if (message.currentPage !== 0) {
|
|
263
|
+
writer.uint32(24).int32(message.currentPage);
|
|
264
|
+
}
|
|
265
|
+
if (message.totalPages !== 0) {
|
|
266
|
+
writer.uint32(32).int32(message.totalPages);
|
|
267
|
+
}
|
|
268
|
+
for (const v of message.sortBy) {
|
|
269
|
+
writer.uint32(42).string(v!);
|
|
270
|
+
}
|
|
271
|
+
globalThis.Object.entries(message.filter).forEach(([key, value]: [string, string]) => {
|
|
272
|
+
PaginateMeta_FilterEntry.encode({ key: key as any, value }, writer.uint32(50).fork()).join();
|
|
273
|
+
});
|
|
274
|
+
if (message.links !== undefined) {
|
|
275
|
+
PaginateMeta_Links.encode(message.links, writer.uint32(58).fork()).join();
|
|
276
|
+
}
|
|
277
|
+
return writer;
|
|
278
|
+
},
|
|
279
|
+
|
|
280
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PaginateMeta {
|
|
281
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
282
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
283
|
+
const message = createBasePaginateMeta();
|
|
284
|
+
while (reader.pos < end) {
|
|
285
|
+
const tag = reader.uint32();
|
|
286
|
+
switch (tag >>> 3) {
|
|
287
|
+
case 1: {
|
|
288
|
+
if (tag !== 8) {
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
message.itemsPerPage = reader.int32();
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
case 2: {
|
|
296
|
+
if (tag !== 16) {
|
|
297
|
+
break;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
message.totalItems = reader.int32();
|
|
301
|
+
continue;
|
|
302
|
+
}
|
|
303
|
+
case 3: {
|
|
304
|
+
if (tag !== 24) {
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
message.currentPage = reader.int32();
|
|
309
|
+
continue;
|
|
310
|
+
}
|
|
311
|
+
case 4: {
|
|
312
|
+
if (tag !== 32) {
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
message.totalPages = reader.int32();
|
|
317
|
+
continue;
|
|
318
|
+
}
|
|
319
|
+
case 5: {
|
|
320
|
+
if (tag !== 42) {
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
message.sortBy.push(reader.string());
|
|
325
|
+
continue;
|
|
326
|
+
}
|
|
327
|
+
case 6: {
|
|
328
|
+
if (tag !== 50) {
|
|
329
|
+
break;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
const entry6 = PaginateMeta_FilterEntry.decode(reader, reader.uint32());
|
|
333
|
+
if (entry6.value !== undefined) {
|
|
334
|
+
message.filter[entry6.key] = entry6.value;
|
|
335
|
+
}
|
|
336
|
+
continue;
|
|
337
|
+
}
|
|
338
|
+
case 7: {
|
|
339
|
+
if (tag !== 58) {
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
message.links = PaginateMeta_Links.decode(reader, reader.uint32());
|
|
344
|
+
continue;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
348
|
+
break;
|
|
349
|
+
}
|
|
350
|
+
reader.skip(tag & 7);
|
|
351
|
+
}
|
|
352
|
+
return message;
|
|
353
|
+
},
|
|
354
|
+
|
|
355
|
+
create<I extends Exact<DeepPartial<PaginateMeta>, I>>(base?: I): PaginateMeta {
|
|
356
|
+
return PaginateMeta.fromPartial(base ?? ({} as any));
|
|
357
|
+
},
|
|
358
|
+
fromPartial<I extends Exact<DeepPartial<PaginateMeta>, I>>(object: I): PaginateMeta {
|
|
359
|
+
const message = createBasePaginateMeta();
|
|
360
|
+
message.itemsPerPage = object.itemsPerPage ?? 0;
|
|
361
|
+
message.totalItems = object.totalItems ?? 0;
|
|
362
|
+
message.currentPage = object.currentPage ?? 0;
|
|
363
|
+
message.totalPages = object.totalPages ?? 0;
|
|
364
|
+
message.sortBy = object.sortBy?.map((e) => e) || [];
|
|
365
|
+
message.filter = (globalThis.Object.entries(object.filter ?? {}) as [string, string][]).reduce(
|
|
366
|
+
(acc: { [key: string]: string }, [key, value]: [string, string]) => {
|
|
367
|
+
if (value !== undefined) {
|
|
368
|
+
acc[key] = globalThis.String(value);
|
|
369
|
+
}
|
|
370
|
+
return acc;
|
|
371
|
+
},
|
|
372
|
+
{},
|
|
373
|
+
);
|
|
374
|
+
message.links = (object.links !== undefined && object.links !== null)
|
|
375
|
+
? PaginateMeta_Links.fromPartial(object.links)
|
|
376
|
+
: undefined;
|
|
377
|
+
return message;
|
|
378
|
+
},
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
function createBasePaginateMeta_FilterEntry(): PaginateMeta_FilterEntry {
|
|
382
|
+
return { key: "", value: "" };
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export const PaginateMeta_FilterEntry: MessageFns<PaginateMeta_FilterEntry> = {
|
|
386
|
+
encode(message: PaginateMeta_FilterEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
387
|
+
if (message.key !== "") {
|
|
388
|
+
writer.uint32(10).string(message.key);
|
|
389
|
+
}
|
|
390
|
+
if (message.value !== "") {
|
|
391
|
+
writer.uint32(18).string(message.value);
|
|
392
|
+
}
|
|
393
|
+
return writer;
|
|
394
|
+
},
|
|
395
|
+
|
|
396
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PaginateMeta_FilterEntry {
|
|
397
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
398
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
399
|
+
const message = createBasePaginateMeta_FilterEntry();
|
|
400
|
+
while (reader.pos < end) {
|
|
401
|
+
const tag = reader.uint32();
|
|
402
|
+
switch (tag >>> 3) {
|
|
403
|
+
case 1: {
|
|
404
|
+
if (tag !== 10) {
|
|
405
|
+
break;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
message.key = reader.string();
|
|
409
|
+
continue;
|
|
410
|
+
}
|
|
411
|
+
case 2: {
|
|
412
|
+
if (tag !== 18) {
|
|
413
|
+
break;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
message.value = reader.string();
|
|
417
|
+
continue;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
421
|
+
break;
|
|
422
|
+
}
|
|
423
|
+
reader.skip(tag & 7);
|
|
424
|
+
}
|
|
425
|
+
return message;
|
|
426
|
+
},
|
|
427
|
+
|
|
428
|
+
create<I extends Exact<DeepPartial<PaginateMeta_FilterEntry>, I>>(base?: I): PaginateMeta_FilterEntry {
|
|
429
|
+
return PaginateMeta_FilterEntry.fromPartial(base ?? ({} as any));
|
|
430
|
+
},
|
|
431
|
+
fromPartial<I extends Exact<DeepPartial<PaginateMeta_FilterEntry>, I>>(object: I): PaginateMeta_FilterEntry {
|
|
432
|
+
const message = createBasePaginateMeta_FilterEntry();
|
|
433
|
+
message.key = object.key ?? "";
|
|
434
|
+
message.value = object.value ?? "";
|
|
435
|
+
return message;
|
|
436
|
+
},
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
function createBasePaginateMeta_Links(): PaginateMeta_Links {
|
|
440
|
+
return { first: "", previous: "", current: "", next: "", last: "" };
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export const PaginateMeta_Links: MessageFns<PaginateMeta_Links> = {
|
|
444
|
+
encode(message: PaginateMeta_Links, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
445
|
+
if (message.first !== "") {
|
|
446
|
+
writer.uint32(10).string(message.first);
|
|
447
|
+
}
|
|
448
|
+
if (message.previous !== "") {
|
|
449
|
+
writer.uint32(18).string(message.previous);
|
|
450
|
+
}
|
|
451
|
+
if (message.current !== "") {
|
|
452
|
+
writer.uint32(26).string(message.current);
|
|
453
|
+
}
|
|
454
|
+
if (message.next !== "") {
|
|
455
|
+
writer.uint32(34).string(message.next);
|
|
456
|
+
}
|
|
457
|
+
if (message.last !== "") {
|
|
458
|
+
writer.uint32(42).string(message.last);
|
|
459
|
+
}
|
|
460
|
+
return writer;
|
|
461
|
+
},
|
|
462
|
+
|
|
463
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PaginateMeta_Links {
|
|
464
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
465
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
466
|
+
const message = createBasePaginateMeta_Links();
|
|
467
|
+
while (reader.pos < end) {
|
|
468
|
+
const tag = reader.uint32();
|
|
469
|
+
switch (tag >>> 3) {
|
|
470
|
+
case 1: {
|
|
471
|
+
if (tag !== 10) {
|
|
472
|
+
break;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
message.first = reader.string();
|
|
476
|
+
continue;
|
|
477
|
+
}
|
|
478
|
+
case 2: {
|
|
479
|
+
if (tag !== 18) {
|
|
480
|
+
break;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
message.previous = reader.string();
|
|
484
|
+
continue;
|
|
485
|
+
}
|
|
486
|
+
case 3: {
|
|
487
|
+
if (tag !== 26) {
|
|
488
|
+
break;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
message.current = reader.string();
|
|
492
|
+
continue;
|
|
493
|
+
}
|
|
494
|
+
case 4: {
|
|
495
|
+
if (tag !== 34) {
|
|
496
|
+
break;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
message.next = reader.string();
|
|
500
|
+
continue;
|
|
501
|
+
}
|
|
502
|
+
case 5: {
|
|
503
|
+
if (tag !== 42) {
|
|
504
|
+
break;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
message.last = reader.string();
|
|
508
|
+
continue;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
512
|
+
break;
|
|
513
|
+
}
|
|
514
|
+
reader.skip(tag & 7);
|
|
515
|
+
}
|
|
516
|
+
return message;
|
|
517
|
+
},
|
|
518
|
+
|
|
519
|
+
create<I extends Exact<DeepPartial<PaginateMeta_Links>, I>>(base?: I): PaginateMeta_Links {
|
|
520
|
+
return PaginateMeta_Links.fromPartial(base ?? ({} as any));
|
|
521
|
+
},
|
|
522
|
+
fromPartial<I extends Exact<DeepPartial<PaginateMeta_Links>, I>>(object: I): PaginateMeta_Links {
|
|
523
|
+
const message = createBasePaginateMeta_Links();
|
|
524
|
+
message.first = object.first ?? "";
|
|
525
|
+
message.previous = object.previous ?? "";
|
|
526
|
+
message.current = object.current ?? "";
|
|
527
|
+
message.next = object.next ?? "";
|
|
528
|
+
message.last = object.last ?? "";
|
|
529
|
+
return message;
|
|
530
|
+
},
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
function createBaseFilterQuery(): FilterQuery {
|
|
534
|
+
return { search: undefined, path: undefined, sortBy: [], filter: {}, select: [] };
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
export const FilterQuery: MessageFns<FilterQuery> = {
|
|
538
|
+
encode(message: FilterQuery, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
539
|
+
if (message.search !== undefined) {
|
|
540
|
+
writer.uint32(10).string(message.search);
|
|
541
|
+
}
|
|
542
|
+
if (message.path !== undefined) {
|
|
543
|
+
writer.uint32(18).string(message.path);
|
|
544
|
+
}
|
|
545
|
+
for (const v of message.sortBy) {
|
|
546
|
+
writer.uint32(26).string(v!);
|
|
547
|
+
}
|
|
548
|
+
globalThis.Object.entries(message.filter).forEach(([key, value]: [string, string]) => {
|
|
549
|
+
FilterQuery_FilterEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).join();
|
|
550
|
+
});
|
|
551
|
+
for (const v of message.select) {
|
|
552
|
+
writer.uint32(42).string(v!);
|
|
553
|
+
}
|
|
554
|
+
return writer;
|
|
555
|
+
},
|
|
556
|
+
|
|
557
|
+
decode(input: BinaryReader | Uint8Array, length?: number): FilterQuery {
|
|
558
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
559
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
560
|
+
const message = createBaseFilterQuery();
|
|
561
|
+
while (reader.pos < end) {
|
|
562
|
+
const tag = reader.uint32();
|
|
563
|
+
switch (tag >>> 3) {
|
|
564
|
+
case 1: {
|
|
565
|
+
if (tag !== 10) {
|
|
566
|
+
break;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
message.search = reader.string();
|
|
570
|
+
continue;
|
|
571
|
+
}
|
|
572
|
+
case 2: {
|
|
573
|
+
if (tag !== 18) {
|
|
574
|
+
break;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
message.path = reader.string();
|
|
578
|
+
continue;
|
|
579
|
+
}
|
|
580
|
+
case 3: {
|
|
581
|
+
if (tag !== 26) {
|
|
582
|
+
break;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
message.sortBy.push(reader.string());
|
|
586
|
+
continue;
|
|
587
|
+
}
|
|
588
|
+
case 4: {
|
|
589
|
+
if (tag !== 34) {
|
|
590
|
+
break;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
const entry4 = FilterQuery_FilterEntry.decode(reader, reader.uint32());
|
|
594
|
+
if (entry4.value !== undefined) {
|
|
595
|
+
message.filter[entry4.key] = entry4.value;
|
|
596
|
+
}
|
|
597
|
+
continue;
|
|
598
|
+
}
|
|
599
|
+
case 5: {
|
|
600
|
+
if (tag !== 42) {
|
|
601
|
+
break;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
message.select.push(reader.string());
|
|
605
|
+
continue;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
609
|
+
break;
|
|
610
|
+
}
|
|
611
|
+
reader.skip(tag & 7);
|
|
612
|
+
}
|
|
613
|
+
return message;
|
|
614
|
+
},
|
|
615
|
+
|
|
616
|
+
create<I extends Exact<DeepPartial<FilterQuery>, I>>(base?: I): FilterQuery {
|
|
617
|
+
return FilterQuery.fromPartial(base ?? ({} as any));
|
|
618
|
+
},
|
|
619
|
+
fromPartial<I extends Exact<DeepPartial<FilterQuery>, I>>(object: I): FilterQuery {
|
|
620
|
+
const message = createBaseFilterQuery();
|
|
621
|
+
message.search = object.search ?? undefined;
|
|
622
|
+
message.path = object.path ?? undefined;
|
|
623
|
+
message.sortBy = object.sortBy?.map((e) => e) || [];
|
|
624
|
+
message.filter = (globalThis.Object.entries(object.filter ?? {}) as [string, string][]).reduce(
|
|
625
|
+
(acc: { [key: string]: string }, [key, value]: [string, string]) => {
|
|
626
|
+
if (value !== undefined) {
|
|
627
|
+
acc[key] = globalThis.String(value);
|
|
628
|
+
}
|
|
629
|
+
return acc;
|
|
630
|
+
},
|
|
631
|
+
{},
|
|
632
|
+
);
|
|
633
|
+
message.select = object.select?.map((e) => e) || [];
|
|
634
|
+
return message;
|
|
635
|
+
},
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
function createBaseFilterQuery_FilterEntry(): FilterQuery_FilterEntry {
|
|
639
|
+
return { key: "", value: "" };
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
export const FilterQuery_FilterEntry: MessageFns<FilterQuery_FilterEntry> = {
|
|
643
|
+
encode(message: FilterQuery_FilterEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
644
|
+
if (message.key !== "") {
|
|
645
|
+
writer.uint32(10).string(message.key);
|
|
646
|
+
}
|
|
647
|
+
if (message.value !== "") {
|
|
648
|
+
writer.uint32(18).string(message.value);
|
|
649
|
+
}
|
|
650
|
+
return writer;
|
|
651
|
+
},
|
|
652
|
+
|
|
653
|
+
decode(input: BinaryReader | Uint8Array, length?: number): FilterQuery_FilterEntry {
|
|
654
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
655
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
656
|
+
const message = createBaseFilterQuery_FilterEntry();
|
|
657
|
+
while (reader.pos < end) {
|
|
658
|
+
const tag = reader.uint32();
|
|
659
|
+
switch (tag >>> 3) {
|
|
660
|
+
case 1: {
|
|
661
|
+
if (tag !== 10) {
|
|
662
|
+
break;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
message.key = reader.string();
|
|
666
|
+
continue;
|
|
667
|
+
}
|
|
668
|
+
case 2: {
|
|
669
|
+
if (tag !== 18) {
|
|
670
|
+
break;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
message.value = reader.string();
|
|
674
|
+
continue;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
678
|
+
break;
|
|
679
|
+
}
|
|
680
|
+
reader.skip(tag & 7);
|
|
681
|
+
}
|
|
682
|
+
return message;
|
|
683
|
+
},
|
|
684
|
+
|
|
685
|
+
create<I extends Exact<DeepPartial<FilterQuery_FilterEntry>, I>>(base?: I): FilterQuery_FilterEntry {
|
|
686
|
+
return FilterQuery_FilterEntry.fromPartial(base ?? ({} as any));
|
|
687
|
+
},
|
|
688
|
+
fromPartial<I extends Exact<DeepPartial<FilterQuery_FilterEntry>, I>>(object: I): FilterQuery_FilterEntry {
|
|
689
|
+
const message = createBaseFilterQuery_FilterEntry();
|
|
690
|
+
message.key = object.key ?? "";
|
|
691
|
+
message.value = object.value ?? "";
|
|
692
|
+
return message;
|
|
693
|
+
},
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
697
|
+
|
|
698
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
699
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
700
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
701
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
702
|
+
: Partial<T>;
|
|
703
|
+
|
|
704
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
705
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
706
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
707
|
+
|
|
708
|
+
export interface MessageFns<T> {
|
|
709
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
710
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
711
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
712
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
713
|
+
}
|