@sagebox-be/proto-contracts 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/interfaces/sagebox.d.ts +100 -5
- package/dist/interfaces/sagebox.js +598 -39
- package/dist/types/sagebox.d.ts +167 -5
- package/dist/types/sagebox.js +1019 -102
- package/package.json +1 -1
- package/proto/sagebox.proto +79 -7
package/dist/types/sagebox.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v6.33.2
|
|
6
6
|
// source: sagebox.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.AddressServiceClient = exports.AddressServiceService = exports.ProductServiceClient = exports.ProductServiceService = exports.AddressUnit = exports.AttributeValueInput = exports.ProductSkuInput = exports.Media = exports.Product = exports.GetWardsResponse = exports.GetDistrictsResponse = exports.GetProvincesResponse = exports.GetWardsRequest = exports.GetDistrictsRequest = exports.GetProvincesRequest = exports.ProductResponse = exports.GetProductsResponse = exports.CreateProductRequest = exports.GetProductByIdRequest = exports.GetProductsByCategoryIdRequest = exports.protobufPackage = void 0;
|
|
8
|
+
exports.ProductOutboxServiceClient = exports.ProductOutboxServiceService = exports.AddressServiceClient = exports.AddressServiceService = exports.ProductServiceClient = exports.ProductServiceService = exports.RetryEsResponse = exports.RetryOutboxResponse = exports.PublishOutboxResponse = exports.RetryEsRequest = exports.RetryOutboxRequest = exports.PublishOutboxRequest = exports.AddressUnit = exports.AttributeValueInput = exports.ProductSkuInput = exports.Media = exports.Sku = exports.Product = exports.GetWardsResponse = exports.GetDistrictsResponse = exports.GetProvincesResponse = exports.GetWardsRequest = exports.GetDistrictsRequest = exports.GetProvincesRequest = exports.SkuResponse = exports.ProductResponse = exports.GetProductsResponse = exports.UpdateSkuRequest = exports.CreateProductRequest = exports.GetProductByIdRequest = exports.GetProductsByCategoryIdRequest = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
11
|
const grpc_js_1 = require("@grpc/grpc-js");
|
|
@@ -119,10 +119,9 @@ exports.GetProductByIdRequest = {
|
|
|
119
119
|
function createBaseCreateProductRequest() {
|
|
120
120
|
return {
|
|
121
121
|
name: '',
|
|
122
|
-
|
|
122
|
+
brandId: undefined,
|
|
123
123
|
description: '',
|
|
124
124
|
categoryId: '',
|
|
125
|
-
storeId: '',
|
|
126
125
|
status: '',
|
|
127
126
|
mediaKeys: [],
|
|
128
127
|
skus: [],
|
|
@@ -133,8 +132,8 @@ exports.CreateProductRequest = {
|
|
|
133
132
|
if (message.name !== '') {
|
|
134
133
|
writer.uint32(10).string(message.name);
|
|
135
134
|
}
|
|
136
|
-
if (message.
|
|
137
|
-
writer.uint32(18).string(message.
|
|
135
|
+
if (message.brandId !== undefined) {
|
|
136
|
+
writer.uint32(18).string(message.brandId);
|
|
138
137
|
}
|
|
139
138
|
if (message.description !== '') {
|
|
140
139
|
writer.uint32(26).string(message.description);
|
|
@@ -142,9 +141,6 @@ exports.CreateProductRequest = {
|
|
|
142
141
|
if (message.categoryId !== '') {
|
|
143
142
|
writer.uint32(34).string(message.categoryId);
|
|
144
143
|
}
|
|
145
|
-
if (message.storeId !== '') {
|
|
146
|
-
writer.uint32(42).string(message.storeId);
|
|
147
|
-
}
|
|
148
144
|
if (message.status !== '') {
|
|
149
145
|
writer.uint32(50).string(message.status);
|
|
150
146
|
}
|
|
@@ -174,7 +170,7 @@ exports.CreateProductRequest = {
|
|
|
174
170
|
if (tag !== 18) {
|
|
175
171
|
break;
|
|
176
172
|
}
|
|
177
|
-
message.
|
|
173
|
+
message.brandId = reader.string();
|
|
178
174
|
continue;
|
|
179
175
|
}
|
|
180
176
|
case 3: {
|
|
@@ -191,13 +187,6 @@ exports.CreateProductRequest = {
|
|
|
191
187
|
message.categoryId = reader.string();
|
|
192
188
|
continue;
|
|
193
189
|
}
|
|
194
|
-
case 5: {
|
|
195
|
-
if (tag !== 42) {
|
|
196
|
-
break;
|
|
197
|
-
}
|
|
198
|
-
message.storeId = reader.string();
|
|
199
|
-
continue;
|
|
200
|
-
}
|
|
201
190
|
case 6: {
|
|
202
191
|
if (tag !== 50) {
|
|
203
192
|
break;
|
|
@@ -230,14 +219,15 @@ exports.CreateProductRequest = {
|
|
|
230
219
|
fromJSON(object) {
|
|
231
220
|
return {
|
|
232
221
|
name: isSet(object.name) ? globalThis.String(object.name) : '',
|
|
233
|
-
|
|
222
|
+
brandId: isSet(object.brandId)
|
|
223
|
+
? globalThis.String(object.brandId)
|
|
224
|
+
: undefined,
|
|
234
225
|
description: isSet(object.description)
|
|
235
226
|
? globalThis.String(object.description)
|
|
236
227
|
: '',
|
|
237
228
|
categoryId: isSet(object.categoryId)
|
|
238
229
|
? globalThis.String(object.categoryId)
|
|
239
230
|
: '',
|
|
240
|
-
storeId: isSet(object.storeId) ? globalThis.String(object.storeId) : '',
|
|
241
231
|
status: isSet(object.status) ? globalThis.String(object.status) : '',
|
|
242
232
|
mediaKeys: globalThis.Array.isArray(object?.mediaKeys)
|
|
243
233
|
? object.mediaKeys.map((e) => globalThis.String(e))
|
|
@@ -252,8 +242,8 @@ exports.CreateProductRequest = {
|
|
|
252
242
|
if (message.name !== '') {
|
|
253
243
|
obj.name = message.name;
|
|
254
244
|
}
|
|
255
|
-
if (message.
|
|
256
|
-
obj.
|
|
245
|
+
if (message.brandId !== undefined) {
|
|
246
|
+
obj.brandId = message.brandId;
|
|
257
247
|
}
|
|
258
248
|
if (message.description !== '') {
|
|
259
249
|
obj.description = message.description;
|
|
@@ -261,9 +251,6 @@ exports.CreateProductRequest = {
|
|
|
261
251
|
if (message.categoryId !== '') {
|
|
262
252
|
obj.categoryId = message.categoryId;
|
|
263
253
|
}
|
|
264
|
-
if (message.storeId !== '') {
|
|
265
|
-
obj.storeId = message.storeId;
|
|
266
|
-
}
|
|
267
254
|
if (message.status !== '') {
|
|
268
255
|
obj.status = message.status;
|
|
269
256
|
}
|
|
@@ -281,10 +268,9 @@ exports.CreateProductRequest = {
|
|
|
281
268
|
fromPartial(object) {
|
|
282
269
|
const message = createBaseCreateProductRequest();
|
|
283
270
|
message.name = object.name ?? '';
|
|
284
|
-
message.
|
|
271
|
+
message.brandId = object.brandId ?? undefined;
|
|
285
272
|
message.description = object.description ?? '';
|
|
286
273
|
message.categoryId = object.categoryId ?? '';
|
|
287
|
-
message.storeId = object.storeId ?? '';
|
|
288
274
|
message.status = object.status ?? '';
|
|
289
275
|
message.mediaKeys = object.mediaKeys?.map((e) => e) || [];
|
|
290
276
|
message.skus =
|
|
@@ -292,6 +278,185 @@ exports.CreateProductRequest = {
|
|
|
292
278
|
return message;
|
|
293
279
|
},
|
|
294
280
|
};
|
|
281
|
+
function createBaseUpdateSkuRequest() {
|
|
282
|
+
return {
|
|
283
|
+
id: '',
|
|
284
|
+
price: undefined,
|
|
285
|
+
width: undefined,
|
|
286
|
+
height: undefined,
|
|
287
|
+
length: undefined,
|
|
288
|
+
weight: undefined,
|
|
289
|
+
mediaKeys: [],
|
|
290
|
+
attributeValues: [],
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
exports.UpdateSkuRequest = {
|
|
294
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
295
|
+
if (message.id !== '') {
|
|
296
|
+
writer.uint32(10).string(message.id);
|
|
297
|
+
}
|
|
298
|
+
if (message.price !== undefined) {
|
|
299
|
+
writer.uint32(16).int32(message.price);
|
|
300
|
+
}
|
|
301
|
+
if (message.width !== undefined) {
|
|
302
|
+
writer.uint32(24).int32(message.width);
|
|
303
|
+
}
|
|
304
|
+
if (message.height !== undefined) {
|
|
305
|
+
writer.uint32(32).int32(message.height);
|
|
306
|
+
}
|
|
307
|
+
if (message.length !== undefined) {
|
|
308
|
+
writer.uint32(40).int32(message.length);
|
|
309
|
+
}
|
|
310
|
+
if (message.weight !== undefined) {
|
|
311
|
+
writer.uint32(48).int32(message.weight);
|
|
312
|
+
}
|
|
313
|
+
for (const v of message.mediaKeys) {
|
|
314
|
+
writer.uint32(58).string(v);
|
|
315
|
+
}
|
|
316
|
+
for (const v of message.attributeValues) {
|
|
317
|
+
exports.AttributeValueInput.encode(v, writer.uint32(66).fork()).join();
|
|
318
|
+
}
|
|
319
|
+
return writer;
|
|
320
|
+
},
|
|
321
|
+
decode(input, length) {
|
|
322
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
323
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
324
|
+
const message = createBaseUpdateSkuRequest();
|
|
325
|
+
while (reader.pos < end) {
|
|
326
|
+
const tag = reader.uint32();
|
|
327
|
+
switch (tag >>> 3) {
|
|
328
|
+
case 1: {
|
|
329
|
+
if (tag !== 10) {
|
|
330
|
+
break;
|
|
331
|
+
}
|
|
332
|
+
message.id = reader.string();
|
|
333
|
+
continue;
|
|
334
|
+
}
|
|
335
|
+
case 2: {
|
|
336
|
+
if (tag !== 16) {
|
|
337
|
+
break;
|
|
338
|
+
}
|
|
339
|
+
message.price = reader.int32();
|
|
340
|
+
continue;
|
|
341
|
+
}
|
|
342
|
+
case 3: {
|
|
343
|
+
if (tag !== 24) {
|
|
344
|
+
break;
|
|
345
|
+
}
|
|
346
|
+
message.width = reader.int32();
|
|
347
|
+
continue;
|
|
348
|
+
}
|
|
349
|
+
case 4: {
|
|
350
|
+
if (tag !== 32) {
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
message.height = reader.int32();
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
case 5: {
|
|
357
|
+
if (tag !== 40) {
|
|
358
|
+
break;
|
|
359
|
+
}
|
|
360
|
+
message.length = reader.int32();
|
|
361
|
+
continue;
|
|
362
|
+
}
|
|
363
|
+
case 6: {
|
|
364
|
+
if (tag !== 48) {
|
|
365
|
+
break;
|
|
366
|
+
}
|
|
367
|
+
message.weight = reader.int32();
|
|
368
|
+
continue;
|
|
369
|
+
}
|
|
370
|
+
case 7: {
|
|
371
|
+
if (tag !== 58) {
|
|
372
|
+
break;
|
|
373
|
+
}
|
|
374
|
+
message.mediaKeys.push(reader.string());
|
|
375
|
+
continue;
|
|
376
|
+
}
|
|
377
|
+
case 8: {
|
|
378
|
+
if (tag !== 66) {
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
message.attributeValues.push(exports.AttributeValueInput.decode(reader, reader.uint32()));
|
|
382
|
+
continue;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
386
|
+
break;
|
|
387
|
+
}
|
|
388
|
+
reader.skip(tag & 7);
|
|
389
|
+
}
|
|
390
|
+
return message;
|
|
391
|
+
},
|
|
392
|
+
fromJSON(object) {
|
|
393
|
+
return {
|
|
394
|
+
id: isSet(object.id) ? globalThis.String(object.id) : '',
|
|
395
|
+
price: isSet(object.price) ? globalThis.Number(object.price) : undefined,
|
|
396
|
+
width: isSet(object.width) ? globalThis.Number(object.width) : undefined,
|
|
397
|
+
height: isSet(object.height)
|
|
398
|
+
? globalThis.Number(object.height)
|
|
399
|
+
: undefined,
|
|
400
|
+
length: isSet(object.length)
|
|
401
|
+
? globalThis.Number(object.length)
|
|
402
|
+
: undefined,
|
|
403
|
+
weight: isSet(object.weight)
|
|
404
|
+
? globalThis.Number(object.weight)
|
|
405
|
+
: undefined,
|
|
406
|
+
mediaKeys: globalThis.Array.isArray(object?.mediaKeys)
|
|
407
|
+
? object.mediaKeys.map((e) => globalThis.String(e))
|
|
408
|
+
: [],
|
|
409
|
+
attributeValues: globalThis.Array.isArray(object?.attributeValues)
|
|
410
|
+
? object.attributeValues.map((e) => exports.AttributeValueInput.fromJSON(e))
|
|
411
|
+
: [],
|
|
412
|
+
};
|
|
413
|
+
},
|
|
414
|
+
toJSON(message) {
|
|
415
|
+
const obj = {};
|
|
416
|
+
if (message.id !== '') {
|
|
417
|
+
obj.id = message.id;
|
|
418
|
+
}
|
|
419
|
+
if (message.price !== undefined) {
|
|
420
|
+
obj.price = Math.round(message.price);
|
|
421
|
+
}
|
|
422
|
+
if (message.width !== undefined) {
|
|
423
|
+
obj.width = Math.round(message.width);
|
|
424
|
+
}
|
|
425
|
+
if (message.height !== undefined) {
|
|
426
|
+
obj.height = Math.round(message.height);
|
|
427
|
+
}
|
|
428
|
+
if (message.length !== undefined) {
|
|
429
|
+
obj.length = Math.round(message.length);
|
|
430
|
+
}
|
|
431
|
+
if (message.weight !== undefined) {
|
|
432
|
+
obj.weight = Math.round(message.weight);
|
|
433
|
+
}
|
|
434
|
+
if (message.mediaKeys?.length) {
|
|
435
|
+
obj.mediaKeys = message.mediaKeys;
|
|
436
|
+
}
|
|
437
|
+
if (message.attributeValues?.length) {
|
|
438
|
+
obj.attributeValues = message.attributeValues.map((e) => exports.AttributeValueInput.toJSON(e));
|
|
439
|
+
}
|
|
440
|
+
return obj;
|
|
441
|
+
},
|
|
442
|
+
create(base) {
|
|
443
|
+
return exports.UpdateSkuRequest.fromPartial(base ?? {});
|
|
444
|
+
},
|
|
445
|
+
fromPartial(object) {
|
|
446
|
+
const message = createBaseUpdateSkuRequest();
|
|
447
|
+
message.id = object.id ?? '';
|
|
448
|
+
message.price = object.price ?? undefined;
|
|
449
|
+
message.width = object.width ?? undefined;
|
|
450
|
+
message.height = object.height ?? undefined;
|
|
451
|
+
message.length = object.length ?? undefined;
|
|
452
|
+
message.weight = object.weight ?? undefined;
|
|
453
|
+
message.mediaKeys = object.mediaKeys?.map((e) => e) || [];
|
|
454
|
+
message.attributeValues =
|
|
455
|
+
object.attributeValues?.map((e) => exports.AttributeValueInput.fromPartial(e)) ||
|
|
456
|
+
[];
|
|
457
|
+
return message;
|
|
458
|
+
},
|
|
459
|
+
};
|
|
295
460
|
function createBaseGetProductsResponse() {
|
|
296
461
|
return { products: [] };
|
|
297
462
|
}
|
|
@@ -421,6 +586,77 @@ exports.ProductResponse = {
|
|
|
421
586
|
return message;
|
|
422
587
|
},
|
|
423
588
|
};
|
|
589
|
+
function createBaseSkuResponse() {
|
|
590
|
+
return { sku: undefined, error: '' };
|
|
591
|
+
}
|
|
592
|
+
exports.SkuResponse = {
|
|
593
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
594
|
+
if (message.sku !== undefined) {
|
|
595
|
+
exports.Sku.encode(message.sku, writer.uint32(10).fork()).join();
|
|
596
|
+
}
|
|
597
|
+
if (message.error !== '') {
|
|
598
|
+
writer.uint32(18).string(message.error);
|
|
599
|
+
}
|
|
600
|
+
return writer;
|
|
601
|
+
},
|
|
602
|
+
decode(input, length) {
|
|
603
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
604
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
605
|
+
const message = createBaseSkuResponse();
|
|
606
|
+
while (reader.pos < end) {
|
|
607
|
+
const tag = reader.uint32();
|
|
608
|
+
switch (tag >>> 3) {
|
|
609
|
+
case 1: {
|
|
610
|
+
if (tag !== 10) {
|
|
611
|
+
break;
|
|
612
|
+
}
|
|
613
|
+
message.sku = exports.Sku.decode(reader, reader.uint32());
|
|
614
|
+
continue;
|
|
615
|
+
}
|
|
616
|
+
case 2: {
|
|
617
|
+
if (tag !== 18) {
|
|
618
|
+
break;
|
|
619
|
+
}
|
|
620
|
+
message.error = reader.string();
|
|
621
|
+
continue;
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
625
|
+
break;
|
|
626
|
+
}
|
|
627
|
+
reader.skip(tag & 7);
|
|
628
|
+
}
|
|
629
|
+
return message;
|
|
630
|
+
},
|
|
631
|
+
fromJSON(object) {
|
|
632
|
+
return {
|
|
633
|
+
sku: isSet(object.sku) ? exports.Sku.fromJSON(object.sku) : undefined,
|
|
634
|
+
error: isSet(object.error) ? globalThis.String(object.error) : '',
|
|
635
|
+
};
|
|
636
|
+
},
|
|
637
|
+
toJSON(message) {
|
|
638
|
+
const obj = {};
|
|
639
|
+
if (message.sku !== undefined) {
|
|
640
|
+
obj.sku = exports.Sku.toJSON(message.sku);
|
|
641
|
+
}
|
|
642
|
+
if (message.error !== '') {
|
|
643
|
+
obj.error = message.error;
|
|
644
|
+
}
|
|
645
|
+
return obj;
|
|
646
|
+
},
|
|
647
|
+
create(base) {
|
|
648
|
+
return exports.SkuResponse.fromPartial(base ?? {});
|
|
649
|
+
},
|
|
650
|
+
fromPartial(object) {
|
|
651
|
+
const message = createBaseSkuResponse();
|
|
652
|
+
message.sku =
|
|
653
|
+
object.sku !== undefined && object.sku !== null
|
|
654
|
+
? exports.Sku.fromPartial(object.sku)
|
|
655
|
+
: undefined;
|
|
656
|
+
message.error = object.error ?? '';
|
|
657
|
+
return message;
|
|
658
|
+
},
|
|
659
|
+
};
|
|
424
660
|
function createBaseGetProvincesRequest() {
|
|
425
661
|
return {};
|
|
426
662
|
}
|
|
@@ -756,11 +992,10 @@ function createBaseProduct() {
|
|
|
756
992
|
return {
|
|
757
993
|
id: '',
|
|
758
994
|
name: '',
|
|
759
|
-
|
|
995
|
+
brandId: undefined,
|
|
760
996
|
description: '',
|
|
761
997
|
keywords: '',
|
|
762
998
|
categoryId: '',
|
|
763
|
-
storeId: '',
|
|
764
999
|
viewedCount: 0,
|
|
765
1000
|
status: '',
|
|
766
1001
|
url: '',
|
|
@@ -777,8 +1012,8 @@ exports.Product = {
|
|
|
777
1012
|
if (message.name !== '') {
|
|
778
1013
|
writer.uint32(18).string(message.name);
|
|
779
1014
|
}
|
|
780
|
-
if (message.
|
|
781
|
-
writer.uint32(26).string(message.
|
|
1015
|
+
if (message.brandId !== undefined) {
|
|
1016
|
+
writer.uint32(26).string(message.brandId);
|
|
782
1017
|
}
|
|
783
1018
|
if (message.description !== '') {
|
|
784
1019
|
writer.uint32(34).string(message.description);
|
|
@@ -789,9 +1024,6 @@ exports.Product = {
|
|
|
789
1024
|
if (message.categoryId !== '') {
|
|
790
1025
|
writer.uint32(50).string(message.categoryId);
|
|
791
1026
|
}
|
|
792
|
-
if (message.storeId !== '') {
|
|
793
|
-
writer.uint32(58).string(message.storeId);
|
|
794
|
-
}
|
|
795
1027
|
if (message.viewedCount !== 0) {
|
|
796
1028
|
writer.uint32(64).int32(message.viewedCount);
|
|
797
1029
|
}
|
|
@@ -837,7 +1069,7 @@ exports.Product = {
|
|
|
837
1069
|
if (tag !== 26) {
|
|
838
1070
|
break;
|
|
839
1071
|
}
|
|
840
|
-
message.
|
|
1072
|
+
message.brandId = reader.string();
|
|
841
1073
|
continue;
|
|
842
1074
|
}
|
|
843
1075
|
case 4: {
|
|
@@ -861,13 +1093,6 @@ exports.Product = {
|
|
|
861
1093
|
message.categoryId = reader.string();
|
|
862
1094
|
continue;
|
|
863
1095
|
}
|
|
864
|
-
case 7: {
|
|
865
|
-
if (tag !== 58) {
|
|
866
|
-
break;
|
|
867
|
-
}
|
|
868
|
-
message.storeId = reader.string();
|
|
869
|
-
continue;
|
|
870
|
-
}
|
|
871
1096
|
case 8: {
|
|
872
1097
|
if (tag !== 64) {
|
|
873
1098
|
break;
|
|
@@ -922,7 +1147,9 @@ exports.Product = {
|
|
|
922
1147
|
return {
|
|
923
1148
|
id: isSet(object.id) ? globalThis.String(object.id) : '',
|
|
924
1149
|
name: isSet(object.name) ? globalThis.String(object.name) : '',
|
|
925
|
-
|
|
1150
|
+
brandId: isSet(object.brandId)
|
|
1151
|
+
? globalThis.String(object.brandId)
|
|
1152
|
+
: undefined,
|
|
926
1153
|
description: isSet(object.description)
|
|
927
1154
|
? globalThis.String(object.description)
|
|
928
1155
|
: '',
|
|
@@ -932,7 +1159,6 @@ exports.Product = {
|
|
|
932
1159
|
categoryId: isSet(object.categoryId)
|
|
933
1160
|
? globalThis.String(object.categoryId)
|
|
934
1161
|
: '',
|
|
935
|
-
storeId: isSet(object.storeId) ? globalThis.String(object.storeId) : '',
|
|
936
1162
|
viewedCount: isSet(object.viewedCount)
|
|
937
1163
|
? globalThis.Number(object.viewedCount)
|
|
938
1164
|
: 0,
|
|
@@ -957,8 +1183,8 @@ exports.Product = {
|
|
|
957
1183
|
if (message.name !== '') {
|
|
958
1184
|
obj.name = message.name;
|
|
959
1185
|
}
|
|
960
|
-
if (message.
|
|
961
|
-
obj.
|
|
1186
|
+
if (message.brandId !== undefined) {
|
|
1187
|
+
obj.brandId = message.brandId;
|
|
962
1188
|
}
|
|
963
1189
|
if (message.description !== '') {
|
|
964
1190
|
obj.description = message.description;
|
|
@@ -969,9 +1195,6 @@ exports.Product = {
|
|
|
969
1195
|
if (message.categoryId !== '') {
|
|
970
1196
|
obj.categoryId = message.categoryId;
|
|
971
1197
|
}
|
|
972
|
-
if (message.storeId !== '') {
|
|
973
|
-
obj.storeId = message.storeId;
|
|
974
|
-
}
|
|
975
1198
|
if (message.viewedCount !== 0) {
|
|
976
1199
|
obj.viewedCount = Math.round(message.viewedCount);
|
|
977
1200
|
}
|
|
@@ -999,11 +1222,10 @@ exports.Product = {
|
|
|
999
1222
|
const message = createBaseProduct();
|
|
1000
1223
|
message.id = object.id ?? '';
|
|
1001
1224
|
message.name = object.name ?? '';
|
|
1002
|
-
message.
|
|
1225
|
+
message.brandId = object.brandId ?? undefined;
|
|
1003
1226
|
message.description = object.description ?? '';
|
|
1004
1227
|
message.keywords = object.keywords ?? '';
|
|
1005
1228
|
message.categoryId = object.categoryId ?? '';
|
|
1006
|
-
message.storeId = object.storeId ?? '';
|
|
1007
1229
|
message.viewedCount = object.viewedCount ?? 0;
|
|
1008
1230
|
message.status = object.status ?? '';
|
|
1009
1231
|
message.url = object.url ?? '';
|
|
@@ -1013,35 +1235,66 @@ exports.Product = {
|
|
|
1013
1235
|
return message;
|
|
1014
1236
|
},
|
|
1015
1237
|
};
|
|
1016
|
-
function
|
|
1017
|
-
return {
|
|
1238
|
+
function createBaseSku() {
|
|
1239
|
+
return {
|
|
1240
|
+
id: '',
|
|
1241
|
+
skuNo: '',
|
|
1242
|
+
productId: '',
|
|
1243
|
+
price: 0,
|
|
1244
|
+
width: 0,
|
|
1245
|
+
height: 0,
|
|
1246
|
+
length: 0,
|
|
1247
|
+
weight: 0,
|
|
1248
|
+
media: [],
|
|
1249
|
+
inactive: false,
|
|
1250
|
+
createdAt: '',
|
|
1251
|
+
updatedAt: '',
|
|
1252
|
+
};
|
|
1018
1253
|
}
|
|
1019
|
-
exports.
|
|
1254
|
+
exports.Sku = {
|
|
1020
1255
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1021
1256
|
if (message.id !== '') {
|
|
1022
1257
|
writer.uint32(10).string(message.id);
|
|
1023
1258
|
}
|
|
1024
|
-
if (message.
|
|
1025
|
-
writer.uint32(18).string(message.
|
|
1259
|
+
if (message.skuNo !== '') {
|
|
1260
|
+
writer.uint32(18).string(message.skuNo);
|
|
1026
1261
|
}
|
|
1027
|
-
if (message.
|
|
1028
|
-
writer.uint32(26).string(message.
|
|
1262
|
+
if (message.productId !== '') {
|
|
1263
|
+
writer.uint32(26).string(message.productId);
|
|
1029
1264
|
}
|
|
1030
|
-
if (message.
|
|
1031
|
-
writer.uint32(
|
|
1265
|
+
if (message.price !== 0) {
|
|
1266
|
+
writer.uint32(32).int64(message.price);
|
|
1267
|
+
}
|
|
1268
|
+
if (message.width !== 0) {
|
|
1269
|
+
writer.uint32(40).int32(message.width);
|
|
1270
|
+
}
|
|
1271
|
+
if (message.height !== 0) {
|
|
1272
|
+
writer.uint32(48).int32(message.height);
|
|
1273
|
+
}
|
|
1274
|
+
if (message.length !== 0) {
|
|
1275
|
+
writer.uint32(56).int32(message.length);
|
|
1276
|
+
}
|
|
1277
|
+
if (message.weight !== 0) {
|
|
1278
|
+
writer.uint32(64).int32(message.weight);
|
|
1279
|
+
}
|
|
1280
|
+
for (const v of message.media) {
|
|
1281
|
+
exports.Media.encode(v, writer.uint32(74).fork()).join();
|
|
1282
|
+
}
|
|
1283
|
+
if (message.inactive !== false) {
|
|
1284
|
+
writer.uint32(80).bool(message.inactive);
|
|
1032
1285
|
}
|
|
1033
1286
|
if (message.createdAt !== '') {
|
|
1034
|
-
writer.uint32(
|
|
1287
|
+
writer.uint32(90).string(message.createdAt);
|
|
1035
1288
|
}
|
|
1036
1289
|
if (message.updatedAt !== '') {
|
|
1037
|
-
writer.uint32(
|
|
1290
|
+
writer.uint32(98).string(message.updatedAt);
|
|
1038
1291
|
}
|
|
1039
1292
|
return writer;
|
|
1040
1293
|
},
|
|
1041
1294
|
decode(input, length) {
|
|
1042
1295
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1043
1296
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1044
|
-
const message =
|
|
1297
|
+
const message = createBaseSku();
|
|
1045
1298
|
while (reader.pos < end) {
|
|
1046
1299
|
const tag = reader.uint32();
|
|
1047
1300
|
switch (tag >>> 3) {
|
|
@@ -1056,56 +1309,266 @@ exports.Media = {
|
|
|
1056
1309
|
if (tag !== 18) {
|
|
1057
1310
|
break;
|
|
1058
1311
|
}
|
|
1059
|
-
message.
|
|
1312
|
+
message.skuNo = reader.string();
|
|
1060
1313
|
continue;
|
|
1061
1314
|
}
|
|
1062
1315
|
case 3: {
|
|
1063
1316
|
if (tag !== 26) {
|
|
1064
1317
|
break;
|
|
1065
1318
|
}
|
|
1066
|
-
message.
|
|
1319
|
+
message.productId = reader.string();
|
|
1067
1320
|
continue;
|
|
1068
1321
|
}
|
|
1069
1322
|
case 4: {
|
|
1070
|
-
if (tag !==
|
|
1323
|
+
if (tag !== 32) {
|
|
1071
1324
|
break;
|
|
1072
1325
|
}
|
|
1073
|
-
message.
|
|
1326
|
+
message.price = longToNumber(reader.int64());
|
|
1074
1327
|
continue;
|
|
1075
1328
|
}
|
|
1076
1329
|
case 5: {
|
|
1077
|
-
if (tag !==
|
|
1330
|
+
if (tag !== 40) {
|
|
1078
1331
|
break;
|
|
1079
1332
|
}
|
|
1080
|
-
message.
|
|
1333
|
+
message.width = reader.int32();
|
|
1081
1334
|
continue;
|
|
1082
1335
|
}
|
|
1083
1336
|
case 6: {
|
|
1084
|
-
if (tag !==
|
|
1337
|
+
if (tag !== 48) {
|
|
1085
1338
|
break;
|
|
1086
1339
|
}
|
|
1087
|
-
message.
|
|
1340
|
+
message.height = reader.int32();
|
|
1088
1341
|
continue;
|
|
1089
1342
|
}
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1343
|
+
case 7: {
|
|
1344
|
+
if (tag !== 56) {
|
|
1345
|
+
break;
|
|
1346
|
+
}
|
|
1347
|
+
message.length = reader.int32();
|
|
1348
|
+
continue;
|
|
1349
|
+
}
|
|
1350
|
+
case 8: {
|
|
1351
|
+
if (tag !== 64) {
|
|
1352
|
+
break;
|
|
1353
|
+
}
|
|
1354
|
+
message.weight = reader.int32();
|
|
1355
|
+
continue;
|
|
1356
|
+
}
|
|
1357
|
+
case 9: {
|
|
1358
|
+
if (tag !== 74) {
|
|
1359
|
+
break;
|
|
1360
|
+
}
|
|
1361
|
+
message.media.push(exports.Media.decode(reader, reader.uint32()));
|
|
1362
|
+
continue;
|
|
1363
|
+
}
|
|
1364
|
+
case 10: {
|
|
1365
|
+
if (tag !== 80) {
|
|
1366
|
+
break;
|
|
1367
|
+
}
|
|
1368
|
+
message.inactive = reader.bool();
|
|
1369
|
+
continue;
|
|
1370
|
+
}
|
|
1371
|
+
case 11: {
|
|
1372
|
+
if (tag !== 90) {
|
|
1373
|
+
break;
|
|
1374
|
+
}
|
|
1375
|
+
message.createdAt = reader.string();
|
|
1376
|
+
continue;
|
|
1377
|
+
}
|
|
1378
|
+
case 12: {
|
|
1379
|
+
if (tag !== 98) {
|
|
1380
|
+
break;
|
|
1381
|
+
}
|
|
1382
|
+
message.updatedAt = reader.string();
|
|
1383
|
+
continue;
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1387
|
+
break;
|
|
1388
|
+
}
|
|
1389
|
+
reader.skip(tag & 7);
|
|
1390
|
+
}
|
|
1391
|
+
return message;
|
|
1392
|
+
},
|
|
1393
|
+
fromJSON(object) {
|
|
1394
|
+
return {
|
|
1395
|
+
id: isSet(object.id) ? globalThis.String(object.id) : '',
|
|
1396
|
+
skuNo: isSet(object.skuNo) ? globalThis.String(object.skuNo) : '',
|
|
1397
|
+
productId: isSet(object.productId)
|
|
1398
|
+
? globalThis.String(object.productId)
|
|
1399
|
+
: '',
|
|
1400
|
+
price: isSet(object.price) ? globalThis.Number(object.price) : 0,
|
|
1401
|
+
width: isSet(object.width) ? globalThis.Number(object.width) : 0,
|
|
1402
|
+
height: isSet(object.height) ? globalThis.Number(object.height) : 0,
|
|
1403
|
+
length: isSet(object.length) ? globalThis.Number(object.length) : 0,
|
|
1404
|
+
weight: isSet(object.weight) ? globalThis.Number(object.weight) : 0,
|
|
1405
|
+
media: globalThis.Array.isArray(object?.media)
|
|
1406
|
+
? object.media.map((e) => exports.Media.fromJSON(e))
|
|
1407
|
+
: [],
|
|
1408
|
+
inactive: isSet(object.inactive)
|
|
1409
|
+
? globalThis.Boolean(object.inactive)
|
|
1410
|
+
: false,
|
|
1411
|
+
createdAt: isSet(object.createdAt)
|
|
1412
|
+
? globalThis.String(object.createdAt)
|
|
1413
|
+
: '',
|
|
1414
|
+
updatedAt: isSet(object.updatedAt)
|
|
1415
|
+
? globalThis.String(object.updatedAt)
|
|
1416
|
+
: '',
|
|
1417
|
+
};
|
|
1418
|
+
},
|
|
1419
|
+
toJSON(message) {
|
|
1420
|
+
const obj = {};
|
|
1421
|
+
if (message.id !== '') {
|
|
1422
|
+
obj.id = message.id;
|
|
1423
|
+
}
|
|
1424
|
+
if (message.skuNo !== '') {
|
|
1425
|
+
obj.skuNo = message.skuNo;
|
|
1426
|
+
}
|
|
1427
|
+
if (message.productId !== '') {
|
|
1428
|
+
obj.productId = message.productId;
|
|
1429
|
+
}
|
|
1430
|
+
if (message.price !== 0) {
|
|
1431
|
+
obj.price = Math.round(message.price);
|
|
1432
|
+
}
|
|
1433
|
+
if (message.width !== 0) {
|
|
1434
|
+
obj.width = Math.round(message.width);
|
|
1435
|
+
}
|
|
1436
|
+
if (message.height !== 0) {
|
|
1437
|
+
obj.height = Math.round(message.height);
|
|
1438
|
+
}
|
|
1439
|
+
if (message.length !== 0) {
|
|
1440
|
+
obj.length = Math.round(message.length);
|
|
1441
|
+
}
|
|
1442
|
+
if (message.weight !== 0) {
|
|
1443
|
+
obj.weight = Math.round(message.weight);
|
|
1444
|
+
}
|
|
1445
|
+
if (message.media?.length) {
|
|
1446
|
+
obj.media = message.media.map((e) => exports.Media.toJSON(e));
|
|
1447
|
+
}
|
|
1448
|
+
if (message.inactive !== false) {
|
|
1449
|
+
obj.inactive = message.inactive;
|
|
1450
|
+
}
|
|
1451
|
+
if (message.createdAt !== '') {
|
|
1452
|
+
obj.createdAt = message.createdAt;
|
|
1453
|
+
}
|
|
1454
|
+
if (message.updatedAt !== '') {
|
|
1455
|
+
obj.updatedAt = message.updatedAt;
|
|
1456
|
+
}
|
|
1457
|
+
return obj;
|
|
1458
|
+
},
|
|
1459
|
+
create(base) {
|
|
1460
|
+
return exports.Sku.fromPartial(base ?? {});
|
|
1461
|
+
},
|
|
1462
|
+
fromPartial(object) {
|
|
1463
|
+
const message = createBaseSku();
|
|
1464
|
+
message.id = object.id ?? '';
|
|
1465
|
+
message.skuNo = object.skuNo ?? '';
|
|
1466
|
+
message.productId = object.productId ?? '';
|
|
1467
|
+
message.price = object.price ?? 0;
|
|
1468
|
+
message.width = object.width ?? 0;
|
|
1469
|
+
message.height = object.height ?? 0;
|
|
1470
|
+
message.length = object.length ?? 0;
|
|
1471
|
+
message.weight = object.weight ?? 0;
|
|
1472
|
+
message.media = object.media?.map((e) => exports.Media.fromPartial(e)) || [];
|
|
1473
|
+
message.inactive = object.inactive ?? false;
|
|
1474
|
+
message.createdAt = object.createdAt ?? '';
|
|
1475
|
+
message.updatedAt = object.updatedAt ?? '';
|
|
1476
|
+
return message;
|
|
1477
|
+
},
|
|
1478
|
+
};
|
|
1479
|
+
function createBaseMedia() {
|
|
1480
|
+
return { id: '', key: '', url: '', type: '', createdAt: '', updatedAt: '' };
|
|
1481
|
+
}
|
|
1482
|
+
exports.Media = {
|
|
1483
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1484
|
+
if (message.id !== '') {
|
|
1485
|
+
writer.uint32(10).string(message.id);
|
|
1486
|
+
}
|
|
1487
|
+
if (message.key !== '') {
|
|
1488
|
+
writer.uint32(18).string(message.key);
|
|
1489
|
+
}
|
|
1490
|
+
if (message.url !== '') {
|
|
1491
|
+
writer.uint32(26).string(message.url);
|
|
1492
|
+
}
|
|
1493
|
+
if (message.type !== '') {
|
|
1494
|
+
writer.uint32(34).string(message.type);
|
|
1495
|
+
}
|
|
1496
|
+
if (message.createdAt !== '') {
|
|
1497
|
+
writer.uint32(42).string(message.createdAt);
|
|
1498
|
+
}
|
|
1499
|
+
if (message.updatedAt !== '') {
|
|
1500
|
+
writer.uint32(50).string(message.updatedAt);
|
|
1501
|
+
}
|
|
1502
|
+
return writer;
|
|
1503
|
+
},
|
|
1504
|
+
decode(input, length) {
|
|
1505
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1506
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1507
|
+
const message = createBaseMedia();
|
|
1508
|
+
while (reader.pos < end) {
|
|
1509
|
+
const tag = reader.uint32();
|
|
1510
|
+
switch (tag >>> 3) {
|
|
1511
|
+
case 1: {
|
|
1512
|
+
if (tag !== 10) {
|
|
1513
|
+
break;
|
|
1514
|
+
}
|
|
1515
|
+
message.id = reader.string();
|
|
1516
|
+
continue;
|
|
1517
|
+
}
|
|
1518
|
+
case 2: {
|
|
1519
|
+
if (tag !== 18) {
|
|
1520
|
+
break;
|
|
1521
|
+
}
|
|
1522
|
+
message.key = reader.string();
|
|
1523
|
+
continue;
|
|
1524
|
+
}
|
|
1525
|
+
case 3: {
|
|
1526
|
+
if (tag !== 26) {
|
|
1527
|
+
break;
|
|
1528
|
+
}
|
|
1529
|
+
message.url = reader.string();
|
|
1530
|
+
continue;
|
|
1531
|
+
}
|
|
1532
|
+
case 4: {
|
|
1533
|
+
if (tag !== 34) {
|
|
1534
|
+
break;
|
|
1535
|
+
}
|
|
1536
|
+
message.type = reader.string();
|
|
1537
|
+
continue;
|
|
1538
|
+
}
|
|
1539
|
+
case 5: {
|
|
1540
|
+
if (tag !== 42) {
|
|
1541
|
+
break;
|
|
1542
|
+
}
|
|
1543
|
+
message.createdAt = reader.string();
|
|
1544
|
+
continue;
|
|
1545
|
+
}
|
|
1546
|
+
case 6: {
|
|
1547
|
+
if (tag !== 50) {
|
|
1548
|
+
break;
|
|
1549
|
+
}
|
|
1550
|
+
message.updatedAt = reader.string();
|
|
1551
|
+
continue;
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1555
|
+
break;
|
|
1556
|
+
}
|
|
1557
|
+
reader.skip(tag & 7);
|
|
1558
|
+
}
|
|
1559
|
+
return message;
|
|
1560
|
+
},
|
|
1561
|
+
fromJSON(object) {
|
|
1562
|
+
return {
|
|
1563
|
+
id: isSet(object.id) ? globalThis.String(object.id) : '',
|
|
1564
|
+
key: isSet(object.key) ? globalThis.String(object.key) : '',
|
|
1565
|
+
url: isSet(object.url) ? globalThis.String(object.url) : '',
|
|
1566
|
+
type: isSet(object.type) ? globalThis.String(object.type) : '',
|
|
1567
|
+
createdAt: isSet(object.createdAt)
|
|
1568
|
+
? globalThis.String(object.createdAt)
|
|
1569
|
+
: '',
|
|
1570
|
+
updatedAt: isSet(object.updatedAt)
|
|
1571
|
+
? globalThis.String(object.updatedAt)
|
|
1109
1572
|
: '',
|
|
1110
1573
|
};
|
|
1111
1574
|
},
|
|
@@ -1149,7 +1612,11 @@ function createBaseProductSkuInput() {
|
|
|
1149
1612
|
return {
|
|
1150
1613
|
price: 0,
|
|
1151
1614
|
quantity: 0,
|
|
1152
|
-
|
|
1615
|
+
width: 0,
|
|
1616
|
+
height: 0,
|
|
1617
|
+
length: 0,
|
|
1618
|
+
warehouseId: '',
|
|
1619
|
+
weight: 0,
|
|
1153
1620
|
mediaKeys: [],
|
|
1154
1621
|
attributeValues: [],
|
|
1155
1622
|
};
|
|
@@ -1162,14 +1629,26 @@ exports.ProductSkuInput = {
|
|
|
1162
1629
|
if (message.quantity !== 0) {
|
|
1163
1630
|
writer.uint32(16).int32(message.quantity);
|
|
1164
1631
|
}
|
|
1165
|
-
if (message.
|
|
1166
|
-
writer.uint32(
|
|
1632
|
+
if (message.width !== 0) {
|
|
1633
|
+
writer.uint32(24).int32(message.width);
|
|
1634
|
+
}
|
|
1635
|
+
if (message.height !== 0) {
|
|
1636
|
+
writer.uint32(32).int32(message.height);
|
|
1637
|
+
}
|
|
1638
|
+
if (message.length !== 0) {
|
|
1639
|
+
writer.uint32(40).int32(message.length);
|
|
1640
|
+
}
|
|
1641
|
+
if (message.warehouseId !== '') {
|
|
1642
|
+
writer.uint32(50).string(message.warehouseId);
|
|
1643
|
+
}
|
|
1644
|
+
if (message.weight !== 0) {
|
|
1645
|
+
writer.uint32(56).int32(message.weight);
|
|
1167
1646
|
}
|
|
1168
1647
|
for (const v of message.mediaKeys) {
|
|
1169
|
-
writer.uint32(
|
|
1648
|
+
writer.uint32(66).string(v);
|
|
1170
1649
|
}
|
|
1171
1650
|
for (const v of message.attributeValues) {
|
|
1172
|
-
exports.AttributeValueInput.encode(v, writer.uint32(
|
|
1651
|
+
exports.AttributeValueInput.encode(v, writer.uint32(74).fork()).join();
|
|
1173
1652
|
}
|
|
1174
1653
|
return writer;
|
|
1175
1654
|
},
|
|
@@ -1195,21 +1674,49 @@ exports.ProductSkuInput = {
|
|
|
1195
1674
|
continue;
|
|
1196
1675
|
}
|
|
1197
1676
|
case 3: {
|
|
1198
|
-
if (tag !==
|
|
1677
|
+
if (tag !== 24) {
|
|
1199
1678
|
break;
|
|
1200
1679
|
}
|
|
1201
|
-
message.
|
|
1680
|
+
message.width = reader.int32();
|
|
1202
1681
|
continue;
|
|
1203
1682
|
}
|
|
1204
1683
|
case 4: {
|
|
1205
|
-
if (tag !==
|
|
1684
|
+
if (tag !== 32) {
|
|
1206
1685
|
break;
|
|
1207
1686
|
}
|
|
1208
|
-
message.
|
|
1687
|
+
message.height = reader.int32();
|
|
1209
1688
|
continue;
|
|
1210
1689
|
}
|
|
1211
1690
|
case 5: {
|
|
1212
|
-
if (tag !==
|
|
1691
|
+
if (tag !== 40) {
|
|
1692
|
+
break;
|
|
1693
|
+
}
|
|
1694
|
+
message.length = reader.int32();
|
|
1695
|
+
continue;
|
|
1696
|
+
}
|
|
1697
|
+
case 6: {
|
|
1698
|
+
if (tag !== 50) {
|
|
1699
|
+
break;
|
|
1700
|
+
}
|
|
1701
|
+
message.warehouseId = reader.string();
|
|
1702
|
+
continue;
|
|
1703
|
+
}
|
|
1704
|
+
case 7: {
|
|
1705
|
+
if (tag !== 56) {
|
|
1706
|
+
break;
|
|
1707
|
+
}
|
|
1708
|
+
message.weight = reader.int32();
|
|
1709
|
+
continue;
|
|
1710
|
+
}
|
|
1711
|
+
case 8: {
|
|
1712
|
+
if (tag !== 66) {
|
|
1713
|
+
break;
|
|
1714
|
+
}
|
|
1715
|
+
message.mediaKeys.push(reader.string());
|
|
1716
|
+
continue;
|
|
1717
|
+
}
|
|
1718
|
+
case 9: {
|
|
1719
|
+
if (tag !== 74) {
|
|
1213
1720
|
break;
|
|
1214
1721
|
}
|
|
1215
1722
|
message.attributeValues.push(exports.AttributeValueInput.decode(reader, reader.uint32()));
|
|
@@ -1227,7 +1734,13 @@ exports.ProductSkuInput = {
|
|
|
1227
1734
|
return {
|
|
1228
1735
|
price: isSet(object.price) ? globalThis.Number(object.price) : 0,
|
|
1229
1736
|
quantity: isSet(object.quantity) ? globalThis.Number(object.quantity) : 0,
|
|
1230
|
-
|
|
1737
|
+
width: isSet(object.width) ? globalThis.Number(object.width) : 0,
|
|
1738
|
+
height: isSet(object.height) ? globalThis.Number(object.height) : 0,
|
|
1739
|
+
length: isSet(object.length) ? globalThis.Number(object.length) : 0,
|
|
1740
|
+
warehouseId: isSet(object.warehouseId)
|
|
1741
|
+
? globalThis.String(object.warehouseId)
|
|
1742
|
+
: '',
|
|
1743
|
+
weight: isSet(object.weight) ? globalThis.Number(object.weight) : 0,
|
|
1231
1744
|
mediaKeys: globalThis.Array.isArray(object?.mediaKeys)
|
|
1232
1745
|
? object.mediaKeys.map((e) => globalThis.String(e))
|
|
1233
1746
|
: [],
|
|
@@ -1244,8 +1757,20 @@ exports.ProductSkuInput = {
|
|
|
1244
1757
|
if (message.quantity !== 0) {
|
|
1245
1758
|
obj.quantity = Math.round(message.quantity);
|
|
1246
1759
|
}
|
|
1247
|
-
if (message.
|
|
1248
|
-
obj.
|
|
1760
|
+
if (message.width !== 0) {
|
|
1761
|
+
obj.width = Math.round(message.width);
|
|
1762
|
+
}
|
|
1763
|
+
if (message.height !== 0) {
|
|
1764
|
+
obj.height = Math.round(message.height);
|
|
1765
|
+
}
|
|
1766
|
+
if (message.length !== 0) {
|
|
1767
|
+
obj.length = Math.round(message.length);
|
|
1768
|
+
}
|
|
1769
|
+
if (message.warehouseId !== '') {
|
|
1770
|
+
obj.warehouseId = message.warehouseId;
|
|
1771
|
+
}
|
|
1772
|
+
if (message.weight !== 0) {
|
|
1773
|
+
obj.weight = Math.round(message.weight);
|
|
1249
1774
|
}
|
|
1250
1775
|
if (message.mediaKeys?.length) {
|
|
1251
1776
|
obj.mediaKeys = message.mediaKeys;
|
|
@@ -1262,7 +1787,11 @@ exports.ProductSkuInput = {
|
|
|
1262
1787
|
const message = createBaseProductSkuInput();
|
|
1263
1788
|
message.price = object.price ?? 0;
|
|
1264
1789
|
message.quantity = object.quantity ?? 0;
|
|
1265
|
-
message.
|
|
1790
|
+
message.width = object.width ?? 0;
|
|
1791
|
+
message.height = object.height ?? 0;
|
|
1792
|
+
message.length = object.length ?? 0;
|
|
1793
|
+
message.warehouseId = object.warehouseId ?? '';
|
|
1794
|
+
message.weight = object.weight ?? 0;
|
|
1266
1795
|
message.mediaKeys = object.mediaKeys?.map((e) => e) || [];
|
|
1267
1796
|
message.attributeValues =
|
|
1268
1797
|
object.attributeValues?.map((e) => exports.AttributeValueInput.fromPartial(e)) ||
|
|
@@ -1421,6 +1950,327 @@ exports.AddressUnit = {
|
|
|
1421
1950
|
return message;
|
|
1422
1951
|
},
|
|
1423
1952
|
};
|
|
1953
|
+
function createBasePublishOutboxRequest() {
|
|
1954
|
+
return {};
|
|
1955
|
+
}
|
|
1956
|
+
exports.PublishOutboxRequest = {
|
|
1957
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
1958
|
+
return writer;
|
|
1959
|
+
},
|
|
1960
|
+
decode(input, length) {
|
|
1961
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1962
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1963
|
+
const message = createBasePublishOutboxRequest();
|
|
1964
|
+
while (reader.pos < end) {
|
|
1965
|
+
const tag = reader.uint32();
|
|
1966
|
+
switch (tag >>> 3) {
|
|
1967
|
+
}
|
|
1968
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1969
|
+
break;
|
|
1970
|
+
}
|
|
1971
|
+
reader.skip(tag & 7);
|
|
1972
|
+
}
|
|
1973
|
+
return message;
|
|
1974
|
+
},
|
|
1975
|
+
fromJSON(_) {
|
|
1976
|
+
return {};
|
|
1977
|
+
},
|
|
1978
|
+
toJSON(_) {
|
|
1979
|
+
const obj = {};
|
|
1980
|
+
return obj;
|
|
1981
|
+
},
|
|
1982
|
+
create(base) {
|
|
1983
|
+
return exports.PublishOutboxRequest.fromPartial(base ?? {});
|
|
1984
|
+
},
|
|
1985
|
+
fromPartial(_) {
|
|
1986
|
+
const message = createBasePublishOutboxRequest();
|
|
1987
|
+
return message;
|
|
1988
|
+
},
|
|
1989
|
+
};
|
|
1990
|
+
function createBaseRetryOutboxRequest() {
|
|
1991
|
+
return {};
|
|
1992
|
+
}
|
|
1993
|
+
exports.RetryOutboxRequest = {
|
|
1994
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
1995
|
+
return writer;
|
|
1996
|
+
},
|
|
1997
|
+
decode(input, length) {
|
|
1998
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1999
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2000
|
+
const message = createBaseRetryOutboxRequest();
|
|
2001
|
+
while (reader.pos < end) {
|
|
2002
|
+
const tag = reader.uint32();
|
|
2003
|
+
switch (tag >>> 3) {
|
|
2004
|
+
}
|
|
2005
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2006
|
+
break;
|
|
2007
|
+
}
|
|
2008
|
+
reader.skip(tag & 7);
|
|
2009
|
+
}
|
|
2010
|
+
return message;
|
|
2011
|
+
},
|
|
2012
|
+
fromJSON(_) {
|
|
2013
|
+
return {};
|
|
2014
|
+
},
|
|
2015
|
+
toJSON(_) {
|
|
2016
|
+
const obj = {};
|
|
2017
|
+
return obj;
|
|
2018
|
+
},
|
|
2019
|
+
create(base) {
|
|
2020
|
+
return exports.RetryOutboxRequest.fromPartial(base ?? {});
|
|
2021
|
+
},
|
|
2022
|
+
fromPartial(_) {
|
|
2023
|
+
const message = createBaseRetryOutboxRequest();
|
|
2024
|
+
return message;
|
|
2025
|
+
},
|
|
2026
|
+
};
|
|
2027
|
+
function createBaseRetryEsRequest() {
|
|
2028
|
+
return {};
|
|
2029
|
+
}
|
|
2030
|
+
exports.RetryEsRequest = {
|
|
2031
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
2032
|
+
return writer;
|
|
2033
|
+
},
|
|
2034
|
+
decode(input, length) {
|
|
2035
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2036
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2037
|
+
const message = createBaseRetryEsRequest();
|
|
2038
|
+
while (reader.pos < end) {
|
|
2039
|
+
const tag = reader.uint32();
|
|
2040
|
+
switch (tag >>> 3) {
|
|
2041
|
+
}
|
|
2042
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2043
|
+
break;
|
|
2044
|
+
}
|
|
2045
|
+
reader.skip(tag & 7);
|
|
2046
|
+
}
|
|
2047
|
+
return message;
|
|
2048
|
+
},
|
|
2049
|
+
fromJSON(_) {
|
|
2050
|
+
return {};
|
|
2051
|
+
},
|
|
2052
|
+
toJSON(_) {
|
|
2053
|
+
const obj = {};
|
|
2054
|
+
return obj;
|
|
2055
|
+
},
|
|
2056
|
+
create(base) {
|
|
2057
|
+
return exports.RetryEsRequest.fromPartial(base ?? {});
|
|
2058
|
+
},
|
|
2059
|
+
fromPartial(_) {
|
|
2060
|
+
const message = createBaseRetryEsRequest();
|
|
2061
|
+
return message;
|
|
2062
|
+
},
|
|
2063
|
+
};
|
|
2064
|
+
function createBasePublishOutboxResponse() {
|
|
2065
|
+
return { success: false, error: '' };
|
|
2066
|
+
}
|
|
2067
|
+
exports.PublishOutboxResponse = {
|
|
2068
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2069
|
+
if (message.success !== false) {
|
|
2070
|
+
writer.uint32(8).bool(message.success);
|
|
2071
|
+
}
|
|
2072
|
+
if (message.error !== '') {
|
|
2073
|
+
writer.uint32(18).string(message.error);
|
|
2074
|
+
}
|
|
2075
|
+
return writer;
|
|
2076
|
+
},
|
|
2077
|
+
decode(input, length) {
|
|
2078
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2079
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2080
|
+
const message = createBasePublishOutboxResponse();
|
|
2081
|
+
while (reader.pos < end) {
|
|
2082
|
+
const tag = reader.uint32();
|
|
2083
|
+
switch (tag >>> 3) {
|
|
2084
|
+
case 1: {
|
|
2085
|
+
if (tag !== 8) {
|
|
2086
|
+
break;
|
|
2087
|
+
}
|
|
2088
|
+
message.success = reader.bool();
|
|
2089
|
+
continue;
|
|
2090
|
+
}
|
|
2091
|
+
case 2: {
|
|
2092
|
+
if (tag !== 18) {
|
|
2093
|
+
break;
|
|
2094
|
+
}
|
|
2095
|
+
message.error = reader.string();
|
|
2096
|
+
continue;
|
|
2097
|
+
}
|
|
2098
|
+
}
|
|
2099
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2100
|
+
break;
|
|
2101
|
+
}
|
|
2102
|
+
reader.skip(tag & 7);
|
|
2103
|
+
}
|
|
2104
|
+
return message;
|
|
2105
|
+
},
|
|
2106
|
+
fromJSON(object) {
|
|
2107
|
+
return {
|
|
2108
|
+
success: isSet(object.success)
|
|
2109
|
+
? globalThis.Boolean(object.success)
|
|
2110
|
+
: false,
|
|
2111
|
+
error: isSet(object.error) ? globalThis.String(object.error) : '',
|
|
2112
|
+
};
|
|
2113
|
+
},
|
|
2114
|
+
toJSON(message) {
|
|
2115
|
+
const obj = {};
|
|
2116
|
+
if (message.success !== false) {
|
|
2117
|
+
obj.success = message.success;
|
|
2118
|
+
}
|
|
2119
|
+
if (message.error !== '') {
|
|
2120
|
+
obj.error = message.error;
|
|
2121
|
+
}
|
|
2122
|
+
return obj;
|
|
2123
|
+
},
|
|
2124
|
+
create(base) {
|
|
2125
|
+
return exports.PublishOutboxResponse.fromPartial(base ?? {});
|
|
2126
|
+
},
|
|
2127
|
+
fromPartial(object) {
|
|
2128
|
+
const message = createBasePublishOutboxResponse();
|
|
2129
|
+
message.success = object.success ?? false;
|
|
2130
|
+
message.error = object.error ?? '';
|
|
2131
|
+
return message;
|
|
2132
|
+
},
|
|
2133
|
+
};
|
|
2134
|
+
function createBaseRetryOutboxResponse() {
|
|
2135
|
+
return { success: false, error: '' };
|
|
2136
|
+
}
|
|
2137
|
+
exports.RetryOutboxResponse = {
|
|
2138
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2139
|
+
if (message.success !== false) {
|
|
2140
|
+
writer.uint32(8).bool(message.success);
|
|
2141
|
+
}
|
|
2142
|
+
if (message.error !== '') {
|
|
2143
|
+
writer.uint32(18).string(message.error);
|
|
2144
|
+
}
|
|
2145
|
+
return writer;
|
|
2146
|
+
},
|
|
2147
|
+
decode(input, length) {
|
|
2148
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2149
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2150
|
+
const message = createBaseRetryOutboxResponse();
|
|
2151
|
+
while (reader.pos < end) {
|
|
2152
|
+
const tag = reader.uint32();
|
|
2153
|
+
switch (tag >>> 3) {
|
|
2154
|
+
case 1: {
|
|
2155
|
+
if (tag !== 8) {
|
|
2156
|
+
break;
|
|
2157
|
+
}
|
|
2158
|
+
message.success = reader.bool();
|
|
2159
|
+
continue;
|
|
2160
|
+
}
|
|
2161
|
+
case 2: {
|
|
2162
|
+
if (tag !== 18) {
|
|
2163
|
+
break;
|
|
2164
|
+
}
|
|
2165
|
+
message.error = reader.string();
|
|
2166
|
+
continue;
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2170
|
+
break;
|
|
2171
|
+
}
|
|
2172
|
+
reader.skip(tag & 7);
|
|
2173
|
+
}
|
|
2174
|
+
return message;
|
|
2175
|
+
},
|
|
2176
|
+
fromJSON(object) {
|
|
2177
|
+
return {
|
|
2178
|
+
success: isSet(object.success)
|
|
2179
|
+
? globalThis.Boolean(object.success)
|
|
2180
|
+
: false,
|
|
2181
|
+
error: isSet(object.error) ? globalThis.String(object.error) : '',
|
|
2182
|
+
};
|
|
2183
|
+
},
|
|
2184
|
+
toJSON(message) {
|
|
2185
|
+
const obj = {};
|
|
2186
|
+
if (message.success !== false) {
|
|
2187
|
+
obj.success = message.success;
|
|
2188
|
+
}
|
|
2189
|
+
if (message.error !== '') {
|
|
2190
|
+
obj.error = message.error;
|
|
2191
|
+
}
|
|
2192
|
+
return obj;
|
|
2193
|
+
},
|
|
2194
|
+
create(base) {
|
|
2195
|
+
return exports.RetryOutboxResponse.fromPartial(base ?? {});
|
|
2196
|
+
},
|
|
2197
|
+
fromPartial(object) {
|
|
2198
|
+
const message = createBaseRetryOutboxResponse();
|
|
2199
|
+
message.success = object.success ?? false;
|
|
2200
|
+
message.error = object.error ?? '';
|
|
2201
|
+
return message;
|
|
2202
|
+
},
|
|
2203
|
+
};
|
|
2204
|
+
function createBaseRetryEsResponse() {
|
|
2205
|
+
return { success: false, error: '' };
|
|
2206
|
+
}
|
|
2207
|
+
exports.RetryEsResponse = {
|
|
2208
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2209
|
+
if (message.success !== false) {
|
|
2210
|
+
writer.uint32(8).bool(message.success);
|
|
2211
|
+
}
|
|
2212
|
+
if (message.error !== '') {
|
|
2213
|
+
writer.uint32(18).string(message.error);
|
|
2214
|
+
}
|
|
2215
|
+
return writer;
|
|
2216
|
+
},
|
|
2217
|
+
decode(input, length) {
|
|
2218
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2219
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2220
|
+
const message = createBaseRetryEsResponse();
|
|
2221
|
+
while (reader.pos < end) {
|
|
2222
|
+
const tag = reader.uint32();
|
|
2223
|
+
switch (tag >>> 3) {
|
|
2224
|
+
case 1: {
|
|
2225
|
+
if (tag !== 8) {
|
|
2226
|
+
break;
|
|
2227
|
+
}
|
|
2228
|
+
message.success = reader.bool();
|
|
2229
|
+
continue;
|
|
2230
|
+
}
|
|
2231
|
+
case 2: {
|
|
2232
|
+
if (tag !== 18) {
|
|
2233
|
+
break;
|
|
2234
|
+
}
|
|
2235
|
+
message.error = reader.string();
|
|
2236
|
+
continue;
|
|
2237
|
+
}
|
|
2238
|
+
}
|
|
2239
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2240
|
+
break;
|
|
2241
|
+
}
|
|
2242
|
+
reader.skip(tag & 7);
|
|
2243
|
+
}
|
|
2244
|
+
return message;
|
|
2245
|
+
},
|
|
2246
|
+
fromJSON(object) {
|
|
2247
|
+
return {
|
|
2248
|
+
success: isSet(object.success)
|
|
2249
|
+
? globalThis.Boolean(object.success)
|
|
2250
|
+
: false,
|
|
2251
|
+
error: isSet(object.error) ? globalThis.String(object.error) : '',
|
|
2252
|
+
};
|
|
2253
|
+
},
|
|
2254
|
+
toJSON(message) {
|
|
2255
|
+
const obj = {};
|
|
2256
|
+
if (message.success !== false) {
|
|
2257
|
+
obj.success = message.success;
|
|
2258
|
+
}
|
|
2259
|
+
if (message.error !== '') {
|
|
2260
|
+
obj.error = message.error;
|
|
2261
|
+
}
|
|
2262
|
+
return obj;
|
|
2263
|
+
},
|
|
2264
|
+
create(base) {
|
|
2265
|
+
return exports.RetryEsResponse.fromPartial(base ?? {});
|
|
2266
|
+
},
|
|
2267
|
+
fromPartial(object) {
|
|
2268
|
+
const message = createBaseRetryEsResponse();
|
|
2269
|
+
message.success = object.success ?? false;
|
|
2270
|
+
message.error = object.error ?? '';
|
|
2271
|
+
return message;
|
|
2272
|
+
},
|
|
2273
|
+
};
|
|
1424
2274
|
exports.ProductServiceService = {
|
|
1425
2275
|
getProductsByCategoryId: {
|
|
1426
2276
|
path: '/sagebox.ProductService/GetProductsByCategoryId',
|
|
@@ -1449,6 +2299,15 @@ exports.ProductServiceService = {
|
|
|
1449
2299
|
responseSerialize: (value) => Buffer.from(exports.ProductResponse.encode(value).finish()),
|
|
1450
2300
|
responseDeserialize: (value) => exports.ProductResponse.decode(value),
|
|
1451
2301
|
},
|
|
2302
|
+
updateSku: {
|
|
2303
|
+
path: '/sagebox.ProductService/UpdateSku',
|
|
2304
|
+
requestStream: false,
|
|
2305
|
+
responseStream: false,
|
|
2306
|
+
requestSerialize: (value) => Buffer.from(exports.UpdateSkuRequest.encode(value).finish()),
|
|
2307
|
+
requestDeserialize: (value) => exports.UpdateSkuRequest.decode(value),
|
|
2308
|
+
responseSerialize: (value) => Buffer.from(exports.SkuResponse.encode(value).finish()),
|
|
2309
|
+
responseDeserialize: (value) => exports.SkuResponse.decode(value),
|
|
2310
|
+
},
|
|
1452
2311
|
};
|
|
1453
2312
|
exports.ProductServiceClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.ProductServiceService, 'sagebox.ProductService');
|
|
1454
2313
|
exports.AddressServiceService = {
|
|
@@ -1481,6 +2340,64 @@ exports.AddressServiceService = {
|
|
|
1481
2340
|
},
|
|
1482
2341
|
};
|
|
1483
2342
|
exports.AddressServiceClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.AddressServiceService, 'sagebox.AddressService');
|
|
2343
|
+
exports.ProductOutboxServiceService = {
|
|
2344
|
+
publishProductOutbox: {
|
|
2345
|
+
path: '/sagebox.ProductOutboxService/PublishProductOutbox',
|
|
2346
|
+
requestStream: false,
|
|
2347
|
+
responseStream: false,
|
|
2348
|
+
requestSerialize: (value) => Buffer.from(exports.PublishOutboxRequest.encode(value).finish()),
|
|
2349
|
+
requestDeserialize: (value) => exports.PublishOutboxRequest.decode(value),
|
|
2350
|
+
responseSerialize: (value) => Buffer.from(exports.PublishOutboxResponse.encode(value).finish()),
|
|
2351
|
+
responseDeserialize: (value) => exports.PublishOutboxResponse.decode(value),
|
|
2352
|
+
},
|
|
2353
|
+
retryProductOutbox: {
|
|
2354
|
+
path: '/sagebox.ProductOutboxService/RetryProductOutbox',
|
|
2355
|
+
requestStream: false,
|
|
2356
|
+
responseStream: false,
|
|
2357
|
+
requestSerialize: (value) => Buffer.from(exports.RetryOutboxRequest.encode(value).finish()),
|
|
2358
|
+
requestDeserialize: (value) => exports.RetryOutboxRequest.decode(value),
|
|
2359
|
+
responseSerialize: (value) => Buffer.from(exports.RetryOutboxResponse.encode(value).finish()),
|
|
2360
|
+
responseDeserialize: (value) => exports.RetryOutboxResponse.decode(value),
|
|
2361
|
+
},
|
|
2362
|
+
publishInventoryOutbox: {
|
|
2363
|
+
path: '/sagebox.ProductOutboxService/PublishInventoryOutbox',
|
|
2364
|
+
requestStream: false,
|
|
2365
|
+
responseStream: false,
|
|
2366
|
+
requestSerialize: (value) => Buffer.from(exports.PublishOutboxRequest.encode(value).finish()),
|
|
2367
|
+
requestDeserialize: (value) => exports.PublishOutboxRequest.decode(value),
|
|
2368
|
+
responseSerialize: (value) => Buffer.from(exports.PublishOutboxResponse.encode(value).finish()),
|
|
2369
|
+
responseDeserialize: (value) => exports.PublishOutboxResponse.decode(value),
|
|
2370
|
+
},
|
|
2371
|
+
retryInventoryOutbox: {
|
|
2372
|
+
path: '/sagebox.ProductOutboxService/RetryInventoryOutbox',
|
|
2373
|
+
requestStream: false,
|
|
2374
|
+
responseStream: false,
|
|
2375
|
+
requestSerialize: (value) => Buffer.from(exports.RetryOutboxRequest.encode(value).finish()),
|
|
2376
|
+
requestDeserialize: (value) => exports.RetryOutboxRequest.decode(value),
|
|
2377
|
+
responseSerialize: (value) => Buffer.from(exports.RetryOutboxResponse.encode(value).finish()),
|
|
2378
|
+
responseDeserialize: (value) => exports.RetryOutboxResponse.decode(value),
|
|
2379
|
+
},
|
|
2380
|
+
retryElasticsearchSync: {
|
|
2381
|
+
path: '/sagebox.ProductOutboxService/RetryElasticsearchSync',
|
|
2382
|
+
requestStream: false,
|
|
2383
|
+
responseStream: false,
|
|
2384
|
+
requestSerialize: (value) => Buffer.from(exports.RetryEsRequest.encode(value).finish()),
|
|
2385
|
+
requestDeserialize: (value) => exports.RetryEsRequest.decode(value),
|
|
2386
|
+
responseSerialize: (value) => Buffer.from(exports.RetryEsResponse.encode(value).finish()),
|
|
2387
|
+
responseDeserialize: (value) => exports.RetryEsResponse.decode(value),
|
|
2388
|
+
},
|
|
2389
|
+
};
|
|
2390
|
+
exports.ProductOutboxServiceClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.ProductOutboxServiceService, 'sagebox.ProductOutboxService');
|
|
2391
|
+
function longToNumber(int64) {
|
|
2392
|
+
const num = globalThis.Number(int64.toString());
|
|
2393
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
2394
|
+
throw new globalThis.Error('Value is larger than Number.MAX_SAFE_INTEGER');
|
|
2395
|
+
}
|
|
2396
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
2397
|
+
throw new globalThis.Error('Value is smaller than Number.MIN_SAFE_INTEGER');
|
|
2398
|
+
}
|
|
2399
|
+
return num;
|
|
2400
|
+
}
|
|
1484
2401
|
function isSet(value) {
|
|
1485
2402
|
return value !== null && value !== undefined;
|
|
1486
2403
|
}
|