@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.
@@ -5,9 +5,10 @@
5
5
  // protoc v6.33.2
6
6
  // source: sagebox.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ADDRESS_SERVICE_NAME = exports.PRODUCT_SERVICE_NAME = 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.SAGEBOX_PACKAGE_NAME = exports.protobufPackage = void 0;
8
+ exports.PRODUCT_OUTBOX_SERVICE_NAME = exports.ADDRESS_SERVICE_NAME = exports.PRODUCT_SERVICE_NAME = 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.SAGEBOX_PACKAGE_NAME = exports.protobufPackage = void 0;
9
9
  exports.ProductServiceControllerMethods = ProductServiceControllerMethods;
10
10
  exports.AddressServiceControllerMethods = AddressServiceControllerMethods;
11
+ exports.ProductOutboxServiceControllerMethods = ProductOutboxServiceControllerMethods;
11
12
  /* eslint-disable */
12
13
  const wire_1 = require("@bufbuild/protobuf/wire");
13
14
  const microservices_1 = require("@nestjs/microservices");
@@ -82,10 +83,8 @@ exports.GetProductByIdRequest = {
82
83
  function createBaseCreateProductRequest() {
83
84
  return {
84
85
  name: '',
85
- title: '',
86
86
  description: '',
87
87
  categoryId: '',
88
- storeId: '',
89
88
  status: '',
90
89
  mediaKeys: [],
91
90
  skus: [],
@@ -96,8 +95,8 @@ exports.CreateProductRequest = {
96
95
  if (message.name !== '') {
97
96
  writer.uint32(10).string(message.name);
98
97
  }
99
- if (message.title !== '') {
100
- writer.uint32(18).string(message.title);
98
+ if (message.brandId !== undefined) {
99
+ writer.uint32(18).string(message.brandId);
101
100
  }
102
101
  if (message.description !== '') {
103
102
  writer.uint32(26).string(message.description);
@@ -105,9 +104,6 @@ exports.CreateProductRequest = {
105
104
  if (message.categoryId !== '') {
106
105
  writer.uint32(34).string(message.categoryId);
107
106
  }
108
- if (message.storeId !== '') {
109
- writer.uint32(42).string(message.storeId);
110
- }
111
107
  if (message.status !== '') {
112
108
  writer.uint32(50).string(message.status);
113
109
  }
@@ -137,7 +133,7 @@ exports.CreateProductRequest = {
137
133
  if (tag !== 18) {
138
134
  break;
139
135
  }
140
- message.title = reader.string();
136
+ message.brandId = reader.string();
141
137
  continue;
142
138
  }
143
139
  case 3: {
@@ -154,18 +150,114 @@ exports.CreateProductRequest = {
154
150
  message.categoryId = reader.string();
155
151
  continue;
156
152
  }
153
+ case 6: {
154
+ if (tag !== 50) {
155
+ break;
156
+ }
157
+ message.status = reader.string();
158
+ continue;
159
+ }
160
+ case 7: {
161
+ if (tag !== 58) {
162
+ break;
163
+ }
164
+ message.mediaKeys.push(reader.string());
165
+ continue;
166
+ }
167
+ case 8: {
168
+ if (tag !== 66) {
169
+ break;
170
+ }
171
+ message.skus.push(exports.ProductSkuInput.decode(reader, reader.uint32()));
172
+ continue;
173
+ }
174
+ }
175
+ if ((tag & 7) === 4 || tag === 0) {
176
+ break;
177
+ }
178
+ reader.skip(tag & 7);
179
+ }
180
+ return message;
181
+ },
182
+ };
183
+ function createBaseUpdateSkuRequest() {
184
+ return { id: '', mediaKeys: [], attributeValues: [] };
185
+ }
186
+ exports.UpdateSkuRequest = {
187
+ encode(message, writer = new wire_1.BinaryWriter()) {
188
+ if (message.id !== '') {
189
+ writer.uint32(10).string(message.id);
190
+ }
191
+ if (message.price !== undefined) {
192
+ writer.uint32(16).int32(message.price);
193
+ }
194
+ if (message.width !== undefined) {
195
+ writer.uint32(24).int32(message.width);
196
+ }
197
+ if (message.height !== undefined) {
198
+ writer.uint32(32).int32(message.height);
199
+ }
200
+ if (message.length !== undefined) {
201
+ writer.uint32(40).int32(message.length);
202
+ }
203
+ if (message.weight !== undefined) {
204
+ writer.uint32(48).int32(message.weight);
205
+ }
206
+ for (const v of message.mediaKeys) {
207
+ writer.uint32(58).string(v);
208
+ }
209
+ for (const v of message.attributeValues) {
210
+ exports.AttributeValueInput.encode(v, writer.uint32(66).fork()).join();
211
+ }
212
+ return writer;
213
+ },
214
+ decode(input, length) {
215
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
216
+ const end = length === undefined ? reader.len : reader.pos + length;
217
+ const message = createBaseUpdateSkuRequest();
218
+ while (reader.pos < end) {
219
+ const tag = reader.uint32();
220
+ switch (tag >>> 3) {
221
+ case 1: {
222
+ if (tag !== 10) {
223
+ break;
224
+ }
225
+ message.id = reader.string();
226
+ continue;
227
+ }
228
+ case 2: {
229
+ if (tag !== 16) {
230
+ break;
231
+ }
232
+ message.price = reader.int32();
233
+ continue;
234
+ }
235
+ case 3: {
236
+ if (tag !== 24) {
237
+ break;
238
+ }
239
+ message.width = reader.int32();
240
+ continue;
241
+ }
242
+ case 4: {
243
+ if (tag !== 32) {
244
+ break;
245
+ }
246
+ message.height = reader.int32();
247
+ continue;
248
+ }
157
249
  case 5: {
158
- if (tag !== 42) {
250
+ if (tag !== 40) {
159
251
  break;
160
252
  }
161
- message.storeId = reader.string();
253
+ message.length = reader.int32();
162
254
  continue;
163
255
  }
164
256
  case 6: {
165
- if (tag !== 50) {
257
+ if (tag !== 48) {
166
258
  break;
167
259
  }
168
- message.status = reader.string();
260
+ message.weight = reader.int32();
169
261
  continue;
170
262
  }
171
263
  case 7: {
@@ -179,7 +271,7 @@ exports.CreateProductRequest = {
179
271
  if (tag !== 66) {
180
272
  break;
181
273
  }
182
- message.skus.push(exports.ProductSkuInput.decode(reader, reader.uint32()));
274
+ message.attributeValues.push(exports.AttributeValueInput.decode(reader, reader.uint32()));
183
275
  continue;
184
276
  }
185
277
  }
@@ -267,6 +359,49 @@ exports.ProductResponse = {
267
359
  return message;
268
360
  },
269
361
  };
362
+ function createBaseSkuResponse() {
363
+ return { sku: undefined, error: '' };
364
+ }
365
+ exports.SkuResponse = {
366
+ encode(message, writer = new wire_1.BinaryWriter()) {
367
+ if (message.sku !== undefined) {
368
+ exports.Sku.encode(message.sku, writer.uint32(10).fork()).join();
369
+ }
370
+ if (message.error !== '') {
371
+ writer.uint32(18).string(message.error);
372
+ }
373
+ return writer;
374
+ },
375
+ decode(input, length) {
376
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
377
+ const end = length === undefined ? reader.len : reader.pos + length;
378
+ const message = createBaseSkuResponse();
379
+ while (reader.pos < end) {
380
+ const tag = reader.uint32();
381
+ switch (tag >>> 3) {
382
+ case 1: {
383
+ if (tag !== 10) {
384
+ break;
385
+ }
386
+ message.sku = exports.Sku.decode(reader, reader.uint32());
387
+ continue;
388
+ }
389
+ case 2: {
390
+ if (tag !== 18) {
391
+ break;
392
+ }
393
+ message.error = reader.string();
394
+ continue;
395
+ }
396
+ }
397
+ if ((tag & 7) === 4 || tag === 0) {
398
+ break;
399
+ }
400
+ reader.skip(tag & 7);
401
+ }
402
+ return message;
403
+ },
404
+ };
270
405
  function createBaseGetProvincesRequest() {
271
406
  return {};
272
407
  }
@@ -469,11 +604,9 @@ function createBaseProduct() {
469
604
  return {
470
605
  id: '',
471
606
  name: '',
472
- title: '',
473
607
  description: '',
474
608
  keywords: '',
475
609
  categoryId: '',
476
- storeId: '',
477
610
  viewedCount: 0,
478
611
  status: '',
479
612
  url: '',
@@ -490,8 +623,8 @@ exports.Product = {
490
623
  if (message.name !== '') {
491
624
  writer.uint32(18).string(message.name);
492
625
  }
493
- if (message.title !== '') {
494
- writer.uint32(26).string(message.title);
626
+ if (message.brandId !== undefined) {
627
+ writer.uint32(26).string(message.brandId);
495
628
  }
496
629
  if (message.description !== '') {
497
630
  writer.uint32(34).string(message.description);
@@ -502,9 +635,6 @@ exports.Product = {
502
635
  if (message.categoryId !== '') {
503
636
  writer.uint32(50).string(message.categoryId);
504
637
  }
505
- if (message.storeId !== '') {
506
- writer.uint32(58).string(message.storeId);
507
- }
508
638
  if (message.viewedCount !== 0) {
509
639
  writer.uint32(64).int32(message.viewedCount);
510
640
  }
@@ -550,7 +680,7 @@ exports.Product = {
550
680
  if (tag !== 26) {
551
681
  break;
552
682
  }
553
- message.title = reader.string();
683
+ message.brandId = reader.string();
554
684
  continue;
555
685
  }
556
686
  case 4: {
@@ -574,13 +704,6 @@ exports.Product = {
574
704
  message.categoryId = reader.string();
575
705
  continue;
576
706
  }
577
- case 7: {
578
- if (tag !== 58) {
579
- break;
580
- }
581
- message.storeId = reader.string();
582
- continue;
583
- }
584
707
  case 8: {
585
708
  if (tag !== 64) {
586
709
  break;
@@ -632,6 +755,162 @@ exports.Product = {
632
755
  return message;
633
756
  },
634
757
  };
758
+ function createBaseSku() {
759
+ return {
760
+ id: '',
761
+ skuNo: '',
762
+ productId: '',
763
+ price: 0,
764
+ width: 0,
765
+ height: 0,
766
+ length: 0,
767
+ weight: 0,
768
+ media: [],
769
+ inactive: false,
770
+ createdAt: '',
771
+ updatedAt: '',
772
+ };
773
+ }
774
+ exports.Sku = {
775
+ encode(message, writer = new wire_1.BinaryWriter()) {
776
+ if (message.id !== '') {
777
+ writer.uint32(10).string(message.id);
778
+ }
779
+ if (message.skuNo !== '') {
780
+ writer.uint32(18).string(message.skuNo);
781
+ }
782
+ if (message.productId !== '') {
783
+ writer.uint32(26).string(message.productId);
784
+ }
785
+ if (message.price !== 0) {
786
+ writer.uint32(32).int64(message.price);
787
+ }
788
+ if (message.width !== 0) {
789
+ writer.uint32(40).int32(message.width);
790
+ }
791
+ if (message.height !== 0) {
792
+ writer.uint32(48).int32(message.height);
793
+ }
794
+ if (message.length !== 0) {
795
+ writer.uint32(56).int32(message.length);
796
+ }
797
+ if (message.weight !== 0) {
798
+ writer.uint32(64).int32(message.weight);
799
+ }
800
+ for (const v of message.media) {
801
+ exports.Media.encode(v, writer.uint32(74).fork()).join();
802
+ }
803
+ if (message.inactive !== false) {
804
+ writer.uint32(80).bool(message.inactive);
805
+ }
806
+ if (message.createdAt !== '') {
807
+ writer.uint32(90).string(message.createdAt);
808
+ }
809
+ if (message.updatedAt !== '') {
810
+ writer.uint32(98).string(message.updatedAt);
811
+ }
812
+ return writer;
813
+ },
814
+ decode(input, length) {
815
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
816
+ const end = length === undefined ? reader.len : reader.pos + length;
817
+ const message = createBaseSku();
818
+ while (reader.pos < end) {
819
+ const tag = reader.uint32();
820
+ switch (tag >>> 3) {
821
+ case 1: {
822
+ if (tag !== 10) {
823
+ break;
824
+ }
825
+ message.id = reader.string();
826
+ continue;
827
+ }
828
+ case 2: {
829
+ if (tag !== 18) {
830
+ break;
831
+ }
832
+ message.skuNo = reader.string();
833
+ continue;
834
+ }
835
+ case 3: {
836
+ if (tag !== 26) {
837
+ break;
838
+ }
839
+ message.productId = reader.string();
840
+ continue;
841
+ }
842
+ case 4: {
843
+ if (tag !== 32) {
844
+ break;
845
+ }
846
+ message.price = longToNumber(reader.int64());
847
+ continue;
848
+ }
849
+ case 5: {
850
+ if (tag !== 40) {
851
+ break;
852
+ }
853
+ message.width = reader.int32();
854
+ continue;
855
+ }
856
+ case 6: {
857
+ if (tag !== 48) {
858
+ break;
859
+ }
860
+ message.height = reader.int32();
861
+ continue;
862
+ }
863
+ case 7: {
864
+ if (tag !== 56) {
865
+ break;
866
+ }
867
+ message.length = reader.int32();
868
+ continue;
869
+ }
870
+ case 8: {
871
+ if (tag !== 64) {
872
+ break;
873
+ }
874
+ message.weight = reader.int32();
875
+ continue;
876
+ }
877
+ case 9: {
878
+ if (tag !== 74) {
879
+ break;
880
+ }
881
+ message.media.push(exports.Media.decode(reader, reader.uint32()));
882
+ continue;
883
+ }
884
+ case 10: {
885
+ if (tag !== 80) {
886
+ break;
887
+ }
888
+ message.inactive = reader.bool();
889
+ continue;
890
+ }
891
+ case 11: {
892
+ if (tag !== 90) {
893
+ break;
894
+ }
895
+ message.createdAt = reader.string();
896
+ continue;
897
+ }
898
+ case 12: {
899
+ if (tag !== 98) {
900
+ break;
901
+ }
902
+ message.updatedAt = reader.string();
903
+ continue;
904
+ }
905
+ }
906
+ if ((tag & 7) === 4 || tag === 0) {
907
+ break;
908
+ }
909
+ reader.skip(tag & 7);
910
+ }
911
+ return message;
912
+ },
913
+ };
635
914
  function createBaseMedia() {
636
915
  return { id: '', key: '', url: '', type: '', createdAt: '', updatedAt: '' };
637
916
  }
@@ -716,7 +995,17 @@ exports.Media = {
716
995
  },
717
996
  };
718
997
  function createBaseProductSkuInput() {
719
- return { price: 0, quantity: 0, mediaKeys: [], attributeValues: [] };
998
+ return {
999
+ price: 0,
1000
+ quantity: 0,
1001
+ width: 0,
1002
+ height: 0,
1003
+ length: 0,
1004
+ warehouseId: '',
1005
+ weight: 0,
1006
+ mediaKeys: [],
1007
+ attributeValues: [],
1008
+ };
720
1009
  }
721
1010
  exports.ProductSkuInput = {
722
1011
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -726,14 +1015,26 @@ exports.ProductSkuInput = {
726
1015
  if (message.quantity !== 0) {
727
1016
  writer.uint32(16).int32(message.quantity);
728
1017
  }
729
- if (message.brand !== undefined) {
730
- writer.uint32(26).string(message.brand);
1018
+ if (message.width !== 0) {
1019
+ writer.uint32(24).int32(message.width);
1020
+ }
1021
+ if (message.height !== 0) {
1022
+ writer.uint32(32).int32(message.height);
1023
+ }
1024
+ if (message.length !== 0) {
1025
+ writer.uint32(40).int32(message.length);
1026
+ }
1027
+ if (message.warehouseId !== '') {
1028
+ writer.uint32(50).string(message.warehouseId);
1029
+ }
1030
+ if (message.weight !== 0) {
1031
+ writer.uint32(56).int32(message.weight);
731
1032
  }
732
1033
  for (const v of message.mediaKeys) {
733
- writer.uint32(34).string(v);
1034
+ writer.uint32(66).string(v);
734
1035
  }
735
1036
  for (const v of message.attributeValues) {
736
- exports.AttributeValueInput.encode(v, writer.uint32(42).fork()).join();
1037
+ exports.AttributeValueInput.encode(v, writer.uint32(74).fork()).join();
737
1038
  }
738
1039
  return writer;
739
1040
  },
@@ -759,21 +1060,49 @@ exports.ProductSkuInput = {
759
1060
  continue;
760
1061
  }
761
1062
  case 3: {
762
- if (tag !== 26) {
1063
+ if (tag !== 24) {
763
1064
  break;
764
1065
  }
765
- message.brand = reader.string();
1066
+ message.width = reader.int32();
766
1067
  continue;
767
1068
  }
768
1069
  case 4: {
769
- if (tag !== 34) {
1070
+ if (tag !== 32) {
770
1071
  break;
771
1072
  }
772
- message.mediaKeys.push(reader.string());
1073
+ message.height = reader.int32();
773
1074
  continue;
774
1075
  }
775
1076
  case 5: {
776
- if (tag !== 42) {
1077
+ if (tag !== 40) {
1078
+ break;
1079
+ }
1080
+ message.length = reader.int32();
1081
+ continue;
1082
+ }
1083
+ case 6: {
1084
+ if (tag !== 50) {
1085
+ break;
1086
+ }
1087
+ message.warehouseId = reader.string();
1088
+ continue;
1089
+ }
1090
+ case 7: {
1091
+ if (tag !== 56) {
1092
+ break;
1093
+ }
1094
+ message.weight = reader.int32();
1095
+ continue;
1096
+ }
1097
+ case 8: {
1098
+ if (tag !== 66) {
1099
+ break;
1100
+ }
1101
+ message.mediaKeys.push(reader.string());
1102
+ continue;
1103
+ }
1104
+ case 9: {
1105
+ if (tag !== 74) {
777
1106
  break;
778
1107
  }
779
1108
  message.attributeValues.push(exports.AttributeValueInput.decode(reader, reader.uint32()));
@@ -884,12 +1213,211 @@ exports.AddressUnit = {
884
1213
  return message;
885
1214
  },
886
1215
  };
1216
+ function createBasePublishOutboxRequest() {
1217
+ return {};
1218
+ }
1219
+ exports.PublishOutboxRequest = {
1220
+ encode(_, writer = new wire_1.BinaryWriter()) {
1221
+ return writer;
1222
+ },
1223
+ decode(input, length) {
1224
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1225
+ const end = length === undefined ? reader.len : reader.pos + length;
1226
+ const message = createBasePublishOutboxRequest();
1227
+ while (reader.pos < end) {
1228
+ const tag = reader.uint32();
1229
+ switch (tag >>> 3) {
1230
+ }
1231
+ if ((tag & 7) === 4 || tag === 0) {
1232
+ break;
1233
+ }
1234
+ reader.skip(tag & 7);
1235
+ }
1236
+ return message;
1237
+ },
1238
+ };
1239
+ function createBaseRetryOutboxRequest() {
1240
+ return {};
1241
+ }
1242
+ exports.RetryOutboxRequest = {
1243
+ encode(_, writer = new wire_1.BinaryWriter()) {
1244
+ return writer;
1245
+ },
1246
+ decode(input, length) {
1247
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1248
+ const end = length === undefined ? reader.len : reader.pos + length;
1249
+ const message = createBaseRetryOutboxRequest();
1250
+ while (reader.pos < end) {
1251
+ const tag = reader.uint32();
1252
+ switch (tag >>> 3) {
1253
+ }
1254
+ if ((tag & 7) === 4 || tag === 0) {
1255
+ break;
1256
+ }
1257
+ reader.skip(tag & 7);
1258
+ }
1259
+ return message;
1260
+ },
1261
+ };
1262
+ function createBaseRetryEsRequest() {
1263
+ return {};
1264
+ }
1265
+ exports.RetryEsRequest = {
1266
+ encode(_, writer = new wire_1.BinaryWriter()) {
1267
+ return writer;
1268
+ },
1269
+ decode(input, length) {
1270
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1271
+ const end = length === undefined ? reader.len : reader.pos + length;
1272
+ const message = createBaseRetryEsRequest();
1273
+ while (reader.pos < end) {
1274
+ const tag = reader.uint32();
1275
+ switch (tag >>> 3) {
1276
+ }
1277
+ if ((tag & 7) === 4 || tag === 0) {
1278
+ break;
1279
+ }
1280
+ reader.skip(tag & 7);
1281
+ }
1282
+ return message;
1283
+ },
1284
+ };
1285
+ function createBasePublishOutboxResponse() {
1286
+ return { success: false, error: '' };
1287
+ }
1288
+ exports.PublishOutboxResponse = {
1289
+ encode(message, writer = new wire_1.BinaryWriter()) {
1290
+ if (message.success !== false) {
1291
+ writer.uint32(8).bool(message.success);
1292
+ }
1293
+ if (message.error !== '') {
1294
+ writer.uint32(18).string(message.error);
1295
+ }
1296
+ return writer;
1297
+ },
1298
+ decode(input, length) {
1299
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1300
+ const end = length === undefined ? reader.len : reader.pos + length;
1301
+ const message = createBasePublishOutboxResponse();
1302
+ while (reader.pos < end) {
1303
+ const tag = reader.uint32();
1304
+ switch (tag >>> 3) {
1305
+ case 1: {
1306
+ if (tag !== 8) {
1307
+ break;
1308
+ }
1309
+ message.success = reader.bool();
1310
+ continue;
1311
+ }
1312
+ case 2: {
1313
+ if (tag !== 18) {
1314
+ break;
1315
+ }
1316
+ message.error = reader.string();
1317
+ continue;
1318
+ }
1319
+ }
1320
+ if ((tag & 7) === 4 || tag === 0) {
1321
+ break;
1322
+ }
1323
+ reader.skip(tag & 7);
1324
+ }
1325
+ return message;
1326
+ },
1327
+ };
1328
+ function createBaseRetryOutboxResponse() {
1329
+ return { success: false, error: '' };
1330
+ }
1331
+ exports.RetryOutboxResponse = {
1332
+ encode(message, writer = new wire_1.BinaryWriter()) {
1333
+ if (message.success !== false) {
1334
+ writer.uint32(8).bool(message.success);
1335
+ }
1336
+ if (message.error !== '') {
1337
+ writer.uint32(18).string(message.error);
1338
+ }
1339
+ return writer;
1340
+ },
1341
+ decode(input, length) {
1342
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1343
+ const end = length === undefined ? reader.len : reader.pos + length;
1344
+ const message = createBaseRetryOutboxResponse();
1345
+ while (reader.pos < end) {
1346
+ const tag = reader.uint32();
1347
+ switch (tag >>> 3) {
1348
+ case 1: {
1349
+ if (tag !== 8) {
1350
+ break;
1351
+ }
1352
+ message.success = reader.bool();
1353
+ continue;
1354
+ }
1355
+ case 2: {
1356
+ if (tag !== 18) {
1357
+ break;
1358
+ }
1359
+ message.error = reader.string();
1360
+ continue;
1361
+ }
1362
+ }
1363
+ if ((tag & 7) === 4 || tag === 0) {
1364
+ break;
1365
+ }
1366
+ reader.skip(tag & 7);
1367
+ }
1368
+ return message;
1369
+ },
1370
+ };
1371
+ function createBaseRetryEsResponse() {
1372
+ return { success: false, error: '' };
1373
+ }
1374
+ exports.RetryEsResponse = {
1375
+ encode(message, writer = new wire_1.BinaryWriter()) {
1376
+ if (message.success !== false) {
1377
+ writer.uint32(8).bool(message.success);
1378
+ }
1379
+ if (message.error !== '') {
1380
+ writer.uint32(18).string(message.error);
1381
+ }
1382
+ return writer;
1383
+ },
1384
+ decode(input, length) {
1385
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1386
+ const end = length === undefined ? reader.len : reader.pos + length;
1387
+ const message = createBaseRetryEsResponse();
1388
+ while (reader.pos < end) {
1389
+ const tag = reader.uint32();
1390
+ switch (tag >>> 3) {
1391
+ case 1: {
1392
+ if (tag !== 8) {
1393
+ break;
1394
+ }
1395
+ message.success = reader.bool();
1396
+ continue;
1397
+ }
1398
+ case 2: {
1399
+ if (tag !== 18) {
1400
+ break;
1401
+ }
1402
+ message.error = reader.string();
1403
+ continue;
1404
+ }
1405
+ }
1406
+ if ((tag & 7) === 4 || tag === 0) {
1407
+ break;
1408
+ }
1409
+ reader.skip(tag & 7);
1410
+ }
1411
+ return message;
1412
+ },
1413
+ };
887
1414
  function ProductServiceControllerMethods() {
888
1415
  return function (constructor) {
889
1416
  const grpcMethods = [
890
1417
  'getProductsByCategoryId',
891
1418
  'getProductById',
892
1419
  'createProduct',
1420
+ 'updateSku',
893
1421
  ];
894
1422
  for (const method of grpcMethods) {
895
1423
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
@@ -918,3 +1446,34 @@ function AddressServiceControllerMethods() {
918
1446
  };
919
1447
  }
920
1448
  exports.ADDRESS_SERVICE_NAME = 'AddressService';
1449
+ function ProductOutboxServiceControllerMethods() {
1450
+ return function (constructor) {
1451
+ const grpcMethods = [
1452
+ 'publishProductOutbox',
1453
+ 'retryProductOutbox',
1454
+ 'publishInventoryOutbox',
1455
+ 'retryInventoryOutbox',
1456
+ 'retryElasticsearchSync',
1457
+ ];
1458
+ for (const method of grpcMethods) {
1459
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
1460
+ (0, microservices_1.GrpcMethod)('ProductOutboxService', method)(constructor.prototype[method], method, descriptor);
1461
+ }
1462
+ const grpcStreamMethods = [];
1463
+ for (const method of grpcStreamMethods) {
1464
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
1465
+ (0, microservices_1.GrpcStreamMethod)('ProductOutboxService', method)(constructor.prototype[method], method, descriptor);
1466
+ }
1467
+ };
1468
+ }
1469
+ exports.PRODUCT_OUTBOX_SERVICE_NAME = 'ProductOutboxService';
1470
+ function longToNumber(int64) {
1471
+ const num = globalThis.Number(int64.toString());
1472
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
1473
+ throw new globalThis.Error('Value is larger than Number.MAX_SAFE_INTEGER');
1474
+ }
1475
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
1476
+ throw new globalThis.Error('Value is smaller than Number.MIN_SAFE_INTEGER');
1477
+ }
1478
+ return num;
1479
+ }