@shipengine/react-api 1.7.0 → 1.9.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/index.js CHANGED
@@ -114,6 +114,80 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
114
114
  throw error;
115
115
  });
116
116
 
117
+ var __async$v = (__this, __arguments, generator) => {
118
+ return new Promise((resolve, reject) => {
119
+ var fulfilled = (value) => {
120
+ try {
121
+ step(generator.next(value));
122
+ } catch (e) {
123
+ reject(e);
124
+ }
125
+ };
126
+ var rejected = (value) => {
127
+ try {
128
+ step(generator.throw(value));
129
+ } catch (e) {
130
+ reject(e);
131
+ }
132
+ };
133
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
134
+ step((generator = generator.apply(__this, __arguments)).next());
135
+ });
136
+ };
137
+ const useCreateAccountImage = () => {
138
+ const { client } = useShipEngine();
139
+ return reactQuery.useMutation({
140
+ mutationFn: (data) => __async$v(void 0, null, function* () {
141
+ const result = yield client.accountSettings.createImage(data);
142
+ return result.data;
143
+ }),
144
+ mutationKey: ["useCreateAccountImage"],
145
+ onError
146
+ });
147
+ };
148
+
149
+ var __async$u = (__this, __arguments, generator) => {
150
+ return new Promise((resolve, reject) => {
151
+ var fulfilled = (value) => {
152
+ try {
153
+ step(generator.next(value));
154
+ } catch (e) {
155
+ reject(e);
156
+ }
157
+ };
158
+ var rejected = (value) => {
159
+ try {
160
+ step(generator.throw(value));
161
+ } catch (e) {
162
+ reject(e);
163
+ }
164
+ };
165
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
166
+ step((generator = generator.apply(__this, __arguments)).next());
167
+ });
168
+ };
169
+ const useDeleteAccountImage = () => {
170
+ const { client } = useShipEngine();
171
+ return reactQuery.useMutation({
172
+ mutationFn: (labelImageId) => __async$u(void 0, null, function* () {
173
+ const result = yield client.accountSettings.deleteImage(labelImageId);
174
+ return result.data;
175
+ }),
176
+ mutationKey: ["useDeleteAccountImage"],
177
+ onError
178
+ });
179
+ };
180
+
181
+ const useGetAccountImages = () => {
182
+ const { client } = useShipEngine();
183
+ return reactQuery.useQuery({
184
+ onError,
185
+ queryFn: () => client.accountSettings.getImages(),
186
+ queryKey: ["useGetAccountImages"],
187
+ select: (result) => result.data
188
+ });
189
+ };
190
+
117
191
  const useGetAccountSettings = () => {
118
192
  const { client } = useShipEngine();
119
193
  return reactQuery.useQuery({
@@ -124,7 +198,39 @@ const useGetAccountSettings = () => {
124
198
  });
125
199
  };
126
200
 
127
- var __async$r = (__this, __arguments, generator) => {
201
+ var __async$t = (__this, __arguments, generator) => {
202
+ return new Promise((resolve, reject) => {
203
+ var fulfilled = (value) => {
204
+ try {
205
+ step(generator.next(value));
206
+ } catch (e) {
207
+ reject(e);
208
+ }
209
+ };
210
+ var rejected = (value) => {
211
+ try {
212
+ step(generator.throw(value));
213
+ } catch (e) {
214
+ reject(e);
215
+ }
216
+ };
217
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
218
+ step((generator = generator.apply(__this, __arguments)).next());
219
+ });
220
+ };
221
+ const useUpdateAccountImage = () => {
222
+ const { client } = useShipEngine();
223
+ return reactQuery.useMutation({
224
+ mutationFn: (data) => __async$t(void 0, null, function* () {
225
+ const result = yield client.accountSettings.updateImage(data);
226
+ return result.data;
227
+ }),
228
+ mutationKey: ["useUpdateAccountImage"],
229
+ onError
230
+ });
231
+ };
232
+
233
+ var __async$s = (__this, __arguments, generator) => {
128
234
  return new Promise((resolve, reject) => {
129
235
  var fulfilled = (value) => {
130
236
  try {
@@ -147,7 +253,7 @@ var __async$r = (__this, __arguments, generator) => {
147
253
  const useUpdateAccountSettings = () => {
148
254
  const { client } = useShipEngine();
149
255
  return reactQuery.useMutation({
150
- mutationFn: (settings) => __async$r(void 0, null, function* () {
256
+ mutationFn: (settings) => __async$s(void 0, null, function* () {
151
257
  const result = yield client.accountSettings.update(settings);
152
258
  return result.data;
153
259
  }),
@@ -156,7 +262,7 @@ const useUpdateAccountSettings = () => {
156
262
  });
157
263
  };
158
264
 
159
- var __async$q = (__this, __arguments, generator) => {
265
+ var __async$r = (__this, __arguments, generator) => {
160
266
  return new Promise((resolve, reject) => {
161
267
  var fulfilled = (value) => {
162
268
  try {
@@ -179,7 +285,7 @@ var __async$q = (__this, __arguments, generator) => {
179
285
  const useParseAddress = () => {
180
286
  const { client } = useShipEngine();
181
287
  return reactQuery.useMutation({
182
- mutationFn: (_0) => __async$q(void 0, [_0], function* ({ address, text }) {
288
+ mutationFn: (_0) => __async$r(void 0, [_0], function* ({ address, text }) {
183
289
  const result = yield client.addresses.parse(text, address);
184
290
  return result.data;
185
291
  }),
@@ -188,7 +294,7 @@ const useParseAddress = () => {
188
294
  });
189
295
  };
190
296
 
191
- var __async$p = (__this, __arguments, generator) => {
297
+ var __async$q = (__this, __arguments, generator) => {
192
298
  return new Promise((resolve, reject) => {
193
299
  var fulfilled = (value) => {
194
300
  try {
@@ -211,7 +317,7 @@ var __async$p = (__this, __arguments, generator) => {
211
317
  const useValidateAddresses = () => {
212
318
  const { client } = useShipEngine();
213
319
  return reactQuery.useMutation({
214
- mutationFn: (addresses) => __async$p(void 0, null, function* () {
320
+ mutationFn: (addresses) => __async$q(void 0, null, function* () {
215
321
  const result = yield client.addresses.validate(addresses);
216
322
  return result.data;
217
323
  }),
@@ -220,7 +326,7 @@ const useValidateAddresses = () => {
220
326
  });
221
327
  };
222
328
 
223
- var __async$o = (__this, __arguments, generator) => {
329
+ var __async$p = (__this, __arguments, generator) => {
224
330
  return new Promise((resolve, reject) => {
225
331
  var fulfilled = (value) => {
226
332
  try {
@@ -243,7 +349,7 @@ var __async$o = (__this, __arguments, generator) => {
243
349
  const useAddFunds = () => {
244
350
  const { client } = useShipEngine();
245
351
  return reactQuery.useMutation({
246
- mutationFn: (_0) => __async$o(void 0, [_0], function* ({ carrierId, funds }) {
352
+ mutationFn: (_0) => __async$p(void 0, [_0], function* ({ carrierId, funds }) {
247
353
  const result = yield client.carriers.addFunds(carrierId, funds);
248
354
  return result.data;
249
355
  }),
@@ -252,7 +358,7 @@ const useAddFunds = () => {
252
358
  });
253
359
  };
254
360
 
255
- var __async$n = (__this, __arguments, generator) => {
361
+ var __async$o = (__this, __arguments, generator) => {
256
362
  return new Promise((resolve, reject) => {
257
363
  var fulfilled = (value) => {
258
364
  try {
@@ -275,7 +381,7 @@ var __async$n = (__this, __arguments, generator) => {
275
381
  const useConnectCarrier = () => {
276
382
  const { client } = useShipEngine();
277
383
  return reactQuery.useMutation({
278
- mutationFn: (params) => __async$n(void 0, null, function* () {
384
+ mutationFn: (params) => __async$o(void 0, null, function* () {
279
385
  const result = yield client.carriers.connect(params);
280
386
  return result.data;
281
387
  }),
@@ -412,7 +518,7 @@ const useListCarriers = () => {
412
518
  });
413
519
  };
414
520
 
415
- var __async$m = (__this, __arguments, generator) => {
521
+ var __async$n = (__this, __arguments, generator) => {
416
522
  return new Promise((resolve, reject) => {
417
523
  var fulfilled = (value) => {
418
524
  try {
@@ -436,7 +542,7 @@ const useUpdateAutoFunding = (carrierId) => {
436
542
  const { client } = useShipEngine();
437
543
  const queryClient = reactQuery.useQueryClient();
438
544
  return reactQuery.useMutation({
439
- mutationFn: (options) => __async$m(void 0, null, function* () {
545
+ mutationFn: (options) => __async$n(void 0, null, function* () {
440
546
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
441
547
  return result.data;
442
548
  }),
@@ -475,7 +581,7 @@ const useListCustomPackageTypes = () => {
475
581
  });
476
582
  };
477
583
 
478
- var __async$l = (__this, __arguments, generator) => {
584
+ var __async$m = (__this, __arguments, generator) => {
479
585
  return new Promise((resolve, reject) => {
480
586
  var fulfilled = (value) => {
481
587
  try {
@@ -498,7 +604,7 @@ var __async$l = (__this, __arguments, generator) => {
498
604
  const useCreateFundingSource = () => {
499
605
  const { client } = useShipEngine();
500
606
  return reactQuery.useMutation({
501
- mutationFn: (fundingSource) => __async$l(void 0, null, function* () {
607
+ mutationFn: (fundingSource) => __async$m(void 0, null, function* () {
502
608
  const result = yield client.fundingSources.create(fundingSource);
503
609
  return result.data;
504
610
  }),
@@ -507,7 +613,7 @@ const useCreateFundingSource = () => {
507
613
  });
508
614
  };
509
615
 
510
- var __async$k = (__this, __arguments, generator) => {
616
+ var __async$l = (__this, __arguments, generator) => {
511
617
  return new Promise((resolve, reject) => {
512
618
  var fulfilled = (value) => {
513
619
  try {
@@ -530,7 +636,7 @@ var __async$k = (__this, __arguments, generator) => {
530
636
  const useFundingSourcesAddFunds = (fundingSourceId) => {
531
637
  const { client } = useShipEngine();
532
638
  return reactQuery.useMutation({
533
- mutationFn: (funds) => __async$k(void 0, null, function* () {
639
+ mutationFn: (funds) => __async$l(void 0, null, function* () {
534
640
  const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
535
641
  return result.data;
536
642
  }),
@@ -559,7 +665,7 @@ const useListFundingSources = () => {
559
665
  });
560
666
  };
561
667
 
562
- var __async$j = (__this, __arguments, generator) => {
668
+ var __async$k = (__this, __arguments, generator) => {
563
669
  return new Promise((resolve, reject) => {
564
670
  var fulfilled = (value) => {
565
671
  try {
@@ -582,7 +688,7 @@ var __async$j = (__this, __arguments, generator) => {
582
688
  const useRegisterCarrier = () => {
583
689
  const { client } = useShipEngine();
584
690
  return reactQuery.useMutation({
585
- mutationFn: (carrier) => __async$j(void 0, null, function* () {
691
+ mutationFn: (carrier) => __async$k(void 0, null, function* () {
586
692
  const result = yield client.fundingSources.registerCarrier(carrier);
587
693
  return result.data;
588
694
  }),
@@ -591,7 +697,7 @@ const useRegisterCarrier = () => {
591
697
  });
592
698
  };
593
699
 
594
- var __async$i = (__this, __arguments, generator) => {
700
+ var __async$j = (__this, __arguments, generator) => {
595
701
  return new Promise((resolve, reject) => {
596
702
  var fulfilled = (value) => {
597
703
  try {
@@ -614,7 +720,7 @@ var __async$i = (__this, __arguments, generator) => {
614
720
  const useUpdateFundingSource = () => {
615
721
  const { client } = useShipEngine();
616
722
  return reactQuery.useMutation({
617
- mutationFn: (_0) => __async$i(void 0, [_0], function* ({
723
+ mutationFn: (_0) => __async$j(void 0, [_0], function* ({
618
724
  billingInfo,
619
725
  creditCardInfo,
620
726
  fundingSourceId
@@ -681,7 +787,7 @@ var __objRest$5 = (source, exclude) => {
681
787
  }
682
788
  return target;
683
789
  };
684
- var __async$h = (__this, __arguments, generator) => {
790
+ var __async$i = (__this, __arguments, generator) => {
685
791
  return new Promise((resolve, reject) => {
686
792
  var fulfilled = (value) => {
687
793
  try {
@@ -704,7 +810,7 @@ var __async$h = (__this, __arguments, generator) => {
704
810
  const useCreateLabel = () => {
705
811
  const { client } = useShipEngine();
706
812
  return reactQuery.useMutation({
707
- mutationFn: (_a) => __async$h(void 0, null, function* () {
813
+ mutationFn: (_a) => __async$i(void 0, null, function* () {
708
814
  var _b = _a, { rateId } = _b, options = __objRest$5(_b, ["rateId"]);
709
815
  const result = yield client.labels.createByRateId(rateId, options);
710
816
  return result.data;
@@ -740,7 +846,7 @@ const useListLabels = (params) => {
740
846
  });
741
847
  };
742
848
 
743
- var __async$g = (__this, __arguments, generator) => {
849
+ var __async$h = (__this, __arguments, generator) => {
744
850
  return new Promise((resolve, reject) => {
745
851
  var fulfilled = (value) => {
746
852
  try {
@@ -763,7 +869,7 @@ var __async$g = (__this, __arguments, generator) => {
763
869
  const useVoidLabel = () => {
764
870
  const { client } = useShipEngine();
765
871
  return reactQuery.useMutation({
766
- mutationFn: (labelId) => __async$g(void 0, null, function* () {
872
+ mutationFn: (labelId) => __async$h(void 0, null, function* () {
767
873
  const result = yield client.labels.void(labelId);
768
874
  return result.data;
769
875
  }),
@@ -782,7 +888,7 @@ const useListOrderSources = () => {
782
888
  });
783
889
  };
784
890
 
785
- var __async$f = (__this, __arguments, generator) => {
891
+ var __async$g = (__this, __arguments, generator) => {
786
892
  return new Promise((resolve, reject) => {
787
893
  var fulfilled = (value) => {
788
894
  try {
@@ -805,7 +911,7 @@ var __async$f = (__this, __arguments, generator) => {
805
911
  const useRefreshOrderSourceAsync = () => {
806
912
  const { client } = useShipEngine();
807
913
  return reactQuery.useMutation({
808
- mutationFn: (orderSourceId) => __async$f(void 0, null, function* () {
914
+ mutationFn: (orderSourceId) => __async$g(void 0, null, function* () {
809
915
  const result = yield client.orderSources.refresh(orderSourceId);
810
916
  return result.data;
811
917
  }),
@@ -816,9 +922,9 @@ const useRefreshOrderSource = () => {
816
922
  const { client } = useShipEngine();
817
923
  const { mutateAsync: refreshOrderSourceAsync } = useRefreshOrderSourceAsync();
818
924
  return reactQuery.useMutation({
819
- mutationFn: (orderSourceId) => __async$f(void 0, null, function* () {
925
+ mutationFn: (orderSourceId) => __async$g(void 0, null, function* () {
820
926
  yield refreshOrderSourceAsync(orderSourceId);
821
- const waitResult = yield retryUntil(() => __async$f(void 0, null, function* () {
927
+ const waitResult = yield retryUntil(() => __async$g(void 0, null, function* () {
822
928
  const { data: checkResult } = yield client.orderSources.get(orderSourceId);
823
929
  if (["preparing_update", "updating"].includes(checkResult.refreshInfo.status)) {
824
930
  throw new jsApi.SE.CodedError("Order source is still refreshing");
@@ -832,7 +938,7 @@ const useRefreshOrderSource = () => {
832
938
  });
833
939
  };
834
940
 
835
- var __async$e = (__this, __arguments, generator) => {
941
+ var __async$f = (__this, __arguments, generator) => {
836
942
  return new Promise((resolve, reject) => {
837
943
  var fulfilled = (value) => {
838
944
  try {
@@ -855,7 +961,7 @@ var __async$e = (__this, __arguments, generator) => {
855
961
  const useCreateRateCard = () => {
856
962
  const { client } = useShipEngine();
857
963
  return reactQuery.useMutation({
858
- mutationFn: (rateCard) => __async$e(void 0, null, function* () {
964
+ mutationFn: (rateCard) => __async$f(void 0, null, function* () {
859
965
  const result = yield client.rateCards.create(rateCard);
860
966
  return result.data;
861
967
  }),
@@ -902,7 +1008,7 @@ const useListRateCards = (carrierIds) => {
902
1008
  });
903
1009
  };
904
1010
 
905
- var __async$d = (__this, __arguments, generator) => {
1011
+ var __async$e = (__this, __arguments, generator) => {
906
1012
  return new Promise((resolve, reject) => {
907
1013
  var fulfilled = (value) => {
908
1014
  try {
@@ -925,7 +1031,7 @@ var __async$d = (__this, __arguments, generator) => {
925
1031
  const usePublishRateCard = () => {
926
1032
  const { client } = useShipEngine();
927
1033
  return reactQuery.useMutation({
928
- mutationFn: (rateCardId) => __async$d(void 0, null, function* () {
1034
+ mutationFn: (rateCardId) => __async$e(void 0, null, function* () {
929
1035
  return yield client.rateCards.publish(rateCardId);
930
1036
  }),
931
1037
  mutationKey: ["usePublishRateCard"],
@@ -933,7 +1039,7 @@ const usePublishRateCard = () => {
933
1039
  });
934
1040
  };
935
1041
 
936
- var __async$c = (__this, __arguments, generator) => {
1042
+ var __async$d = (__this, __arguments, generator) => {
937
1043
  return new Promise((resolve, reject) => {
938
1044
  var fulfilled = (value) => {
939
1045
  try {
@@ -956,7 +1062,7 @@ var __async$c = (__this, __arguments, generator) => {
956
1062
  const useUpdateRateCard = () => {
957
1063
  const { client } = useShipEngine();
958
1064
  return reactQuery.useMutation({
959
- mutationFn: (rateCard) => __async$c(void 0, null, function* () {
1065
+ mutationFn: (rateCard) => __async$d(void 0, null, function* () {
960
1066
  const result = yield client.rateCards.update(rateCard);
961
1067
  return result.data;
962
1068
  }),
@@ -965,7 +1071,7 @@ const useUpdateRateCard = () => {
965
1071
  });
966
1072
  };
967
1073
 
968
- var __async$b = (__this, __arguments, generator) => {
1074
+ var __async$c = (__this, __arguments, generator) => {
969
1075
  return new Promise((resolve, reject) => {
970
1076
  var fulfilled = (value) => {
971
1077
  try {
@@ -988,7 +1094,7 @@ var __async$b = (__this, __arguments, generator) => {
988
1094
  const useUploadRateCard = () => {
989
1095
  const { client } = useShipEngine();
990
1096
  return reactQuery.useMutation({
991
- mutationFn: (_0) => __async$b(void 0, [_0], function* ({ rateCardId, file }) {
1097
+ mutationFn: (_0) => __async$c(void 0, [_0], function* ({ rateCardId, file }) {
992
1098
  const result = yield client.rateCards.upload(rateCardId, file);
993
1099
  return result.data;
994
1100
  }),
@@ -997,7 +1103,7 @@ const useUploadRateCard = () => {
997
1103
  });
998
1104
  };
999
1105
 
1000
- var __async$a = (__this, __arguments, generator) => {
1106
+ var __async$b = (__this, __arguments, generator) => {
1001
1107
  return new Promise((resolve, reject) => {
1002
1108
  var fulfilled = (value) => {
1003
1109
  try {
@@ -1020,7 +1126,7 @@ var __async$a = (__this, __arguments, generator) => {
1020
1126
  const useDeleteRateCard = () => {
1021
1127
  const { client } = useShipEngine();
1022
1128
  return reactQuery.useMutation({
1023
- mutationFn: (rateCardId) => __async$a(void 0, null, function* () {
1129
+ mutationFn: (rateCardId) => __async$b(void 0, null, function* () {
1024
1130
  const result = yield client.rateCards.delete(rateCardId);
1025
1131
  return result.data;
1026
1132
  }),
@@ -1029,7 +1135,7 @@ const useDeleteRateCard = () => {
1029
1135
  });
1030
1136
  };
1031
1137
 
1032
- var __async$9 = (__this, __arguments, generator) => {
1138
+ var __async$a = (__this, __arguments, generator) => {
1033
1139
  return new Promise((resolve, reject) => {
1034
1140
  var fulfilled = (value) => {
1035
1141
  try {
@@ -1052,7 +1158,7 @@ var __async$9 = (__this, __arguments, generator) => {
1052
1158
  const useCalculateRates = () => {
1053
1159
  const { client } = useShipEngine();
1054
1160
  return reactQuery.useMutation({
1055
- mutationFn: (_0) => __async$9(void 0, [_0], function* ({ rateOptions, shipmentId }) {
1161
+ mutationFn: (_0) => __async$a(void 0, [_0], function* ({ rateOptions, shipmentId }) {
1056
1162
  const result = yield client.rates.calculateByShipmentId(shipmentId, rateOptions);
1057
1163
  return result.data;
1058
1164
  }),
@@ -1102,7 +1208,7 @@ var __objRest$4 = (source, exclude) => {
1102
1208
  }
1103
1209
  return target;
1104
1210
  };
1105
- var __async$8 = (__this, __arguments, generator) => {
1211
+ var __async$9 = (__this, __arguments, generator) => {
1106
1212
  return new Promise((resolve, reject) => {
1107
1213
  var fulfilled = (value) => {
1108
1214
  try {
@@ -1125,7 +1231,7 @@ var __async$8 = (__this, __arguments, generator) => {
1125
1231
  const useNotifySalesOrderShipped = () => {
1126
1232
  const { client } = useShipEngine();
1127
1233
  return reactQuery.useMutation({
1128
- mutationFn: (_a) => __async$8(void 0, null, function* () {
1234
+ mutationFn: (_a) => __async$9(void 0, null, function* () {
1129
1235
  var _b = _a, { salesOrderId } = _b, tracking = __objRest$4(_b, ["salesOrderId"]);
1130
1236
  const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
1131
1237
  return result.data;
@@ -1150,7 +1256,7 @@ var __objRest$3 = (source, exclude) => {
1150
1256
  }
1151
1257
  return target;
1152
1258
  };
1153
- var __async$7 = (__this, __arguments, generator) => {
1259
+ var __async$8 = (__this, __arguments, generator) => {
1154
1260
  return new Promise((resolve, reject) => {
1155
1261
  var fulfilled = (value) => {
1156
1262
  try {
@@ -1173,7 +1279,7 @@ var __async$7 = (__this, __arguments, generator) => {
1173
1279
  const useCreateSalesOrderShipment = () => {
1174
1280
  const { client } = useShipEngine();
1175
1281
  return reactQuery.useMutation({
1176
- mutationFn: (_a) => __async$7(void 0, null, function* () {
1282
+ mutationFn: (_a) => __async$8(void 0, null, function* () {
1177
1283
  var _b = _a, { salesOrderId } = _b, shipment = __objRest$3(_b, ["salesOrderId"]);
1178
1284
  const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
1179
1285
  return result.data;
@@ -1224,7 +1330,7 @@ var __objRest$2 = (source, exclude) => {
1224
1330
  }
1225
1331
  return target;
1226
1332
  };
1227
- var __async$6 = (__this, __arguments, generator) => {
1333
+ var __async$7 = (__this, __arguments, generator) => {
1228
1334
  return new Promise((resolve, reject) => {
1229
1335
  var fulfilled = (value) => {
1230
1336
  try {
@@ -1247,7 +1353,7 @@ var __async$6 = (__this, __arguments, generator) => {
1247
1353
  const useUpdateSalesOrderShipment = () => {
1248
1354
  const { client } = useShipEngine();
1249
1355
  return reactQuery.useMutation({
1250
- mutationFn: (_a) => __async$6(void 0, null, function* () {
1356
+ mutationFn: (_a) => __async$7(void 0, null, function* () {
1251
1357
  var _b = _a, { shipmentId } = _b, shipment = __objRest$2(_b, ["shipmentId"]);
1252
1358
  const result = yield client.salesOrderShipments.update(shipmentId, shipment);
1253
1359
  return result.data;
@@ -1276,7 +1382,7 @@ var __spreadValues = (a, b) => {
1276
1382
  return a;
1277
1383
  };
1278
1384
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
1279
- var __async$5 = (__this, __arguments, generator) => {
1385
+ var __async$6 = (__this, __arguments, generator) => {
1280
1386
  return new Promise((resolve, reject) => {
1281
1387
  var fulfilled = (value) => {
1282
1388
  try {
@@ -1299,7 +1405,7 @@ var __async$5 = (__this, __arguments, generator) => {
1299
1405
  const useCreateShipment = () => {
1300
1406
  const { client } = useShipEngine();
1301
1407
  return reactQuery.useMutation({
1302
- mutationFn: (shipment) => __async$5(void 0, null, function* () {
1408
+ mutationFn: (shipment) => __async$6(void 0, null, function* () {
1303
1409
  var _a;
1304
1410
  if (shipment.warehouseId === void 0) {
1305
1411
  throw new jsApi.SE.CodedError("errorMessages.noWarehouses", {
@@ -1397,7 +1503,7 @@ const useListShippingRules = () => {
1397
1503
  });
1398
1504
  };
1399
1505
 
1400
- var __async$4 = (__this, __arguments, generator) => {
1506
+ var __async$5 = (__this, __arguments, generator) => {
1401
1507
  return new Promise((resolve, reject) => {
1402
1508
  var fulfilled = (value) => {
1403
1509
  try {
@@ -1420,7 +1526,7 @@ var __async$4 = (__this, __arguments, generator) => {
1420
1526
  const useCreateShippingRule = () => {
1421
1527
  const { client } = useShipEngine();
1422
1528
  return reactQuery.useMutation({
1423
- mutationFn: (shippingRule) => __async$4(void 0, null, function* () {
1529
+ mutationFn: (shippingRule) => __async$5(void 0, null, function* () {
1424
1530
  const result = yield client.shippingRules.create(shippingRule);
1425
1531
  return result.data;
1426
1532
  }),
@@ -1429,7 +1535,7 @@ const useCreateShippingRule = () => {
1429
1535
  });
1430
1536
  };
1431
1537
 
1432
- var __async$3 = (__this, __arguments, generator) => {
1538
+ var __async$4 = (__this, __arguments, generator) => {
1433
1539
  return new Promise((resolve, reject) => {
1434
1540
  var fulfilled = (value) => {
1435
1541
  try {
@@ -1452,7 +1558,7 @@ var __async$3 = (__this, __arguments, generator) => {
1452
1558
  const useDeleteShippingRule = () => {
1453
1559
  const { client } = useShipEngine();
1454
1560
  return reactQuery.useMutation({
1455
- mutationFn: (shippingRuleId) => __async$3(void 0, null, function* () {
1561
+ mutationFn: (shippingRuleId) => __async$4(void 0, null, function* () {
1456
1562
  const result = yield client.shippingRules.delete(shippingRuleId);
1457
1563
  return result.data;
1458
1564
  }),
@@ -1461,7 +1567,7 @@ const useDeleteShippingRule = () => {
1461
1567
  });
1462
1568
  };
1463
1569
 
1464
- var __async$2 = (__this, __arguments, generator) => {
1570
+ var __async$3 = (__this, __arguments, generator) => {
1465
1571
  return new Promise((resolve, reject) => {
1466
1572
  var fulfilled = (value) => {
1467
1573
  try {
@@ -1484,7 +1590,7 @@ var __async$2 = (__this, __arguments, generator) => {
1484
1590
  const useCreateWarehouse = () => {
1485
1591
  const { client } = useShipEngine();
1486
1592
  return reactQuery.useMutation({
1487
- mutationFn: (data) => __async$2(void 0, null, function* () {
1593
+ mutationFn: (data) => __async$3(void 0, null, function* () {
1488
1594
  const result = yield client.warehouses.create(data);
1489
1595
  return result.data;
1490
1596
  }),
@@ -1493,7 +1599,7 @@ const useCreateWarehouse = () => {
1493
1599
  });
1494
1600
  };
1495
1601
 
1496
- var __async$1 = (__this, __arguments, generator) => {
1602
+ var __async$2 = (__this, __arguments, generator) => {
1497
1603
  return new Promise((resolve, reject) => {
1498
1604
  var fulfilled = (value) => {
1499
1605
  try {
@@ -1516,7 +1622,7 @@ var __async$1 = (__this, __arguments, generator) => {
1516
1622
  const useDeleteWarehouse = () => {
1517
1623
  const { client } = useShipEngine();
1518
1624
  return reactQuery.useMutation({
1519
- mutationFn: (_0) => __async$1(void 0, [_0], function* ({ warehouseId }) {
1625
+ mutationFn: (_0) => __async$2(void 0, [_0], function* ({ warehouseId }) {
1520
1626
  const result = yield client.warehouses.delete(warehouseId);
1521
1627
  return result.data;
1522
1628
  }),
@@ -1552,7 +1658,7 @@ var __objRest = (source, exclude) => {
1552
1658
  }
1553
1659
  return target;
1554
1660
  };
1555
- var __async = (__this, __arguments, generator) => {
1661
+ var __async$1 = (__this, __arguments, generator) => {
1556
1662
  return new Promise((resolve, reject) => {
1557
1663
  var fulfilled = (value) => {
1558
1664
  try {
@@ -1575,7 +1681,7 @@ var __async = (__this, __arguments, generator) => {
1575
1681
  const useUpdateWarehouse = () => {
1576
1682
  const { client } = useShipEngine();
1577
1683
  return reactQuery.useMutation({
1578
- mutationFn: (_a) => __async(void 0, null, function* () {
1684
+ mutationFn: (_a) => __async$1(void 0, null, function* () {
1579
1685
  var _b = _a, { warehouseId } = _b, warehouse = __objRest(_b, ["warehouseId"]);
1580
1686
  const result = yield client.warehouses.update(warehouseId, warehouse);
1581
1687
  return result.data;
@@ -1595,6 +1701,38 @@ const useGetAccountBillingPlan = () => {
1595
1701
  });
1596
1702
  };
1597
1703
 
1704
+ var __async = (__this, __arguments, generator) => {
1705
+ return new Promise((resolve, reject) => {
1706
+ var fulfilled = (value) => {
1707
+ try {
1708
+ step(generator.next(value));
1709
+ } catch (e) {
1710
+ reject(e);
1711
+ }
1712
+ };
1713
+ var rejected = (value) => {
1714
+ try {
1715
+ step(generator.throw(value));
1716
+ } catch (e) {
1717
+ reject(e);
1718
+ }
1719
+ };
1720
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
1721
+ step((generator = generator.apply(__this, __arguments)).next());
1722
+ });
1723
+ };
1724
+ const useUpdateAccountBillingPlan = () => {
1725
+ const { client } = useShipEngine();
1726
+ return reactQuery.useMutation({
1727
+ mutationFn: (code) => __async(void 0, null, function* () {
1728
+ const result = yield client.accountBillingPlan.update({ code });
1729
+ return result.data;
1730
+ }),
1731
+ mutationKey: ["useUpdateAccountBillingPlan"],
1732
+ onError
1733
+ });
1734
+ };
1735
+
1598
1736
  exports.ShipEngine = ShipEngine;
1599
1737
  exports.ShipEngineContext = ShipEngineContext;
1600
1738
  exports.delay = delay;
@@ -1604,6 +1742,7 @@ exports.retryUntil = retryUntil;
1604
1742
  exports.useAddFunds = useAddFunds;
1605
1743
  exports.useCalculateRates = useCalculateRates;
1606
1744
  exports.useConnectCarrier = useConnectCarrier;
1745
+ exports.useCreateAccountImage = useCreateAccountImage;
1607
1746
  exports.useCreateFundingSource = useCreateFundingSource;
1608
1747
  exports.useCreateLabel = useCreateLabel;
1609
1748
  exports.useCreateRateCard = useCreateRateCard;
@@ -1611,12 +1750,14 @@ exports.useCreateSalesOrderShipment = useCreateSalesOrderShipment;
1611
1750
  exports.useCreateShipment = useCreateShipment;
1612
1751
  exports.useCreateShippingRule = useCreateShippingRule;
1613
1752
  exports.useCreateWarehouse = useCreateWarehouse;
1753
+ exports.useDeleteAccountImage = useDeleteAccountImage;
1614
1754
  exports.useDeleteRateCard = useDeleteRateCard;
1615
1755
  exports.useDeleteShippingRule = useDeleteShippingRule;
1616
1756
  exports.useDeleteWarehouse = useDeleteWarehouse;
1617
1757
  exports.useDownloadRateCard = useDownloadRateCard;
1618
1758
  exports.useFundingSourcesAddFunds = useFundingSourcesAddFunds;
1619
1759
  exports.useGetAccountBillingPlan = useGetAccountBillingPlan;
1760
+ exports.useGetAccountImages = useGetAccountImages;
1620
1761
  exports.useGetAccountSettings = useGetAccountSettings;
1621
1762
  exports.useGetAutoFundingConfiguration = useGetAutoFundingConfiguration;
1622
1763
  exports.useGetCarrierById = useGetCarrierById;
@@ -1654,6 +1795,8 @@ exports.useRefreshOrderSource = useRefreshOrderSource;
1654
1795
  exports.useRefreshOrderSourceAsync = useRefreshOrderSourceAsync;
1655
1796
  exports.useRegisterCarrier = useRegisterCarrier;
1656
1797
  exports.useShipEngine = useShipEngine;
1798
+ exports.useUpdateAccountBillingPlan = useUpdateAccountBillingPlan;
1799
+ exports.useUpdateAccountImage = useUpdateAccountImage;
1657
1800
  exports.useUpdateAccountSettings = useUpdateAccountSettings;
1658
1801
  exports.useUpdateAutoFunding = useUpdateAutoFunding;
1659
1802
  exports.useUpdateFundingSource = useUpdateFundingSource;