@ehrenkind/shopify-lib 0.8.0 → 0.8.2
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/index.cjs +251 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -3
- package/dist/index.d.ts +25 -3
- package/dist/index.mjs +250 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
CurrencyCode: () => CurrencyCode,
|
|
33
34
|
ShopifyUserError: () => ShopifyUserError,
|
|
34
35
|
bulkUpdateProductVariants: () => bulkUpdateProductVariants,
|
|
35
36
|
calculateRefund: () => calculateRefund,
|
|
@@ -773,6 +774,173 @@ async function cancelOrderById(orderId, retries = 0) {
|
|
|
773
774
|
return true;
|
|
774
775
|
}
|
|
775
776
|
|
|
777
|
+
// src/generated-api-types/admin.types.ts
|
|
778
|
+
var CurrencyCode = /* @__PURE__ */ ((CurrencyCode2) => {
|
|
779
|
+
CurrencyCode2["Aed"] = "AED";
|
|
780
|
+
CurrencyCode2["Afn"] = "AFN";
|
|
781
|
+
CurrencyCode2["All"] = "ALL";
|
|
782
|
+
CurrencyCode2["Amd"] = "AMD";
|
|
783
|
+
CurrencyCode2["Ang"] = "ANG";
|
|
784
|
+
CurrencyCode2["Aoa"] = "AOA";
|
|
785
|
+
CurrencyCode2["Ars"] = "ARS";
|
|
786
|
+
CurrencyCode2["Aud"] = "AUD";
|
|
787
|
+
CurrencyCode2["Awg"] = "AWG";
|
|
788
|
+
CurrencyCode2["Azn"] = "AZN";
|
|
789
|
+
CurrencyCode2["Bam"] = "BAM";
|
|
790
|
+
CurrencyCode2["Bbd"] = "BBD";
|
|
791
|
+
CurrencyCode2["Bdt"] = "BDT";
|
|
792
|
+
CurrencyCode2["Bgn"] = "BGN";
|
|
793
|
+
CurrencyCode2["Bhd"] = "BHD";
|
|
794
|
+
CurrencyCode2["Bif"] = "BIF";
|
|
795
|
+
CurrencyCode2["Bmd"] = "BMD";
|
|
796
|
+
CurrencyCode2["Bnd"] = "BND";
|
|
797
|
+
CurrencyCode2["Bob"] = "BOB";
|
|
798
|
+
CurrencyCode2["Brl"] = "BRL";
|
|
799
|
+
CurrencyCode2["Bsd"] = "BSD";
|
|
800
|
+
CurrencyCode2["Btn"] = "BTN";
|
|
801
|
+
CurrencyCode2["Bwp"] = "BWP";
|
|
802
|
+
CurrencyCode2["Byn"] = "BYN";
|
|
803
|
+
CurrencyCode2["Byr"] = "BYR";
|
|
804
|
+
CurrencyCode2["Bzd"] = "BZD";
|
|
805
|
+
CurrencyCode2["Cad"] = "CAD";
|
|
806
|
+
CurrencyCode2["Cdf"] = "CDF";
|
|
807
|
+
CurrencyCode2["Chf"] = "CHF";
|
|
808
|
+
CurrencyCode2["Clp"] = "CLP";
|
|
809
|
+
CurrencyCode2["Cny"] = "CNY";
|
|
810
|
+
CurrencyCode2["Cop"] = "COP";
|
|
811
|
+
CurrencyCode2["Crc"] = "CRC";
|
|
812
|
+
CurrencyCode2["Cve"] = "CVE";
|
|
813
|
+
CurrencyCode2["Czk"] = "CZK";
|
|
814
|
+
CurrencyCode2["Djf"] = "DJF";
|
|
815
|
+
CurrencyCode2["Dkk"] = "DKK";
|
|
816
|
+
CurrencyCode2["Dop"] = "DOP";
|
|
817
|
+
CurrencyCode2["Dzd"] = "DZD";
|
|
818
|
+
CurrencyCode2["Egp"] = "EGP";
|
|
819
|
+
CurrencyCode2["Ern"] = "ERN";
|
|
820
|
+
CurrencyCode2["Etb"] = "ETB";
|
|
821
|
+
CurrencyCode2["Eur"] = "EUR";
|
|
822
|
+
CurrencyCode2["Fjd"] = "FJD";
|
|
823
|
+
CurrencyCode2["Fkp"] = "FKP";
|
|
824
|
+
CurrencyCode2["Gbp"] = "GBP";
|
|
825
|
+
CurrencyCode2["Gel"] = "GEL";
|
|
826
|
+
CurrencyCode2["Ghs"] = "GHS";
|
|
827
|
+
CurrencyCode2["Gip"] = "GIP";
|
|
828
|
+
CurrencyCode2["Gmd"] = "GMD";
|
|
829
|
+
CurrencyCode2["Gnf"] = "GNF";
|
|
830
|
+
CurrencyCode2["Gtq"] = "GTQ";
|
|
831
|
+
CurrencyCode2["Gyd"] = "GYD";
|
|
832
|
+
CurrencyCode2["Hkd"] = "HKD";
|
|
833
|
+
CurrencyCode2["Hnl"] = "HNL";
|
|
834
|
+
CurrencyCode2["Hrk"] = "HRK";
|
|
835
|
+
CurrencyCode2["Htg"] = "HTG";
|
|
836
|
+
CurrencyCode2["Huf"] = "HUF";
|
|
837
|
+
CurrencyCode2["Idr"] = "IDR";
|
|
838
|
+
CurrencyCode2["Ils"] = "ILS";
|
|
839
|
+
CurrencyCode2["Inr"] = "INR";
|
|
840
|
+
CurrencyCode2["Iqd"] = "IQD";
|
|
841
|
+
CurrencyCode2["Irr"] = "IRR";
|
|
842
|
+
CurrencyCode2["Isk"] = "ISK";
|
|
843
|
+
CurrencyCode2["Jep"] = "JEP";
|
|
844
|
+
CurrencyCode2["Jmd"] = "JMD";
|
|
845
|
+
CurrencyCode2["Jod"] = "JOD";
|
|
846
|
+
CurrencyCode2["Jpy"] = "JPY";
|
|
847
|
+
CurrencyCode2["Kes"] = "KES";
|
|
848
|
+
CurrencyCode2["Kgs"] = "KGS";
|
|
849
|
+
CurrencyCode2["Khr"] = "KHR";
|
|
850
|
+
CurrencyCode2["Kid"] = "KID";
|
|
851
|
+
CurrencyCode2["Kmf"] = "KMF";
|
|
852
|
+
CurrencyCode2["Krw"] = "KRW";
|
|
853
|
+
CurrencyCode2["Kwd"] = "KWD";
|
|
854
|
+
CurrencyCode2["Kyd"] = "KYD";
|
|
855
|
+
CurrencyCode2["Kzt"] = "KZT";
|
|
856
|
+
CurrencyCode2["Lak"] = "LAK";
|
|
857
|
+
CurrencyCode2["Lbp"] = "LBP";
|
|
858
|
+
CurrencyCode2["Lkr"] = "LKR";
|
|
859
|
+
CurrencyCode2["Lrd"] = "LRD";
|
|
860
|
+
CurrencyCode2["Lsl"] = "LSL";
|
|
861
|
+
CurrencyCode2["Ltl"] = "LTL";
|
|
862
|
+
CurrencyCode2["Lvl"] = "LVL";
|
|
863
|
+
CurrencyCode2["Lyd"] = "LYD";
|
|
864
|
+
CurrencyCode2["Mad"] = "MAD";
|
|
865
|
+
CurrencyCode2["Mdl"] = "MDL";
|
|
866
|
+
CurrencyCode2["Mga"] = "MGA";
|
|
867
|
+
CurrencyCode2["Mkd"] = "MKD";
|
|
868
|
+
CurrencyCode2["Mmk"] = "MMK";
|
|
869
|
+
CurrencyCode2["Mnt"] = "MNT";
|
|
870
|
+
CurrencyCode2["Mop"] = "MOP";
|
|
871
|
+
CurrencyCode2["Mru"] = "MRU";
|
|
872
|
+
CurrencyCode2["Mur"] = "MUR";
|
|
873
|
+
CurrencyCode2["Mvr"] = "MVR";
|
|
874
|
+
CurrencyCode2["Mwk"] = "MWK";
|
|
875
|
+
CurrencyCode2["Mxn"] = "MXN";
|
|
876
|
+
CurrencyCode2["Myr"] = "MYR";
|
|
877
|
+
CurrencyCode2["Mzn"] = "MZN";
|
|
878
|
+
CurrencyCode2["Nad"] = "NAD";
|
|
879
|
+
CurrencyCode2["Ngn"] = "NGN";
|
|
880
|
+
CurrencyCode2["Nio"] = "NIO";
|
|
881
|
+
CurrencyCode2["Nok"] = "NOK";
|
|
882
|
+
CurrencyCode2["Npr"] = "NPR";
|
|
883
|
+
CurrencyCode2["Nzd"] = "NZD";
|
|
884
|
+
CurrencyCode2["Omr"] = "OMR";
|
|
885
|
+
CurrencyCode2["Pab"] = "PAB";
|
|
886
|
+
CurrencyCode2["Pen"] = "PEN";
|
|
887
|
+
CurrencyCode2["Pgk"] = "PGK";
|
|
888
|
+
CurrencyCode2["Php"] = "PHP";
|
|
889
|
+
CurrencyCode2["Pkr"] = "PKR";
|
|
890
|
+
CurrencyCode2["Pln"] = "PLN";
|
|
891
|
+
CurrencyCode2["Pyg"] = "PYG";
|
|
892
|
+
CurrencyCode2["Qar"] = "QAR";
|
|
893
|
+
CurrencyCode2["Ron"] = "RON";
|
|
894
|
+
CurrencyCode2["Rsd"] = "RSD";
|
|
895
|
+
CurrencyCode2["Rub"] = "RUB";
|
|
896
|
+
CurrencyCode2["Rwf"] = "RWF";
|
|
897
|
+
CurrencyCode2["Sar"] = "SAR";
|
|
898
|
+
CurrencyCode2["Sbd"] = "SBD";
|
|
899
|
+
CurrencyCode2["Scr"] = "SCR";
|
|
900
|
+
CurrencyCode2["Sdg"] = "SDG";
|
|
901
|
+
CurrencyCode2["Sek"] = "SEK";
|
|
902
|
+
CurrencyCode2["Sgd"] = "SGD";
|
|
903
|
+
CurrencyCode2["Shp"] = "SHP";
|
|
904
|
+
CurrencyCode2["Sll"] = "SLL";
|
|
905
|
+
CurrencyCode2["Sos"] = "SOS";
|
|
906
|
+
CurrencyCode2["Srd"] = "SRD";
|
|
907
|
+
CurrencyCode2["Ssp"] = "SSP";
|
|
908
|
+
CurrencyCode2["Std"] = "STD";
|
|
909
|
+
CurrencyCode2["Stn"] = "STN";
|
|
910
|
+
CurrencyCode2["Syp"] = "SYP";
|
|
911
|
+
CurrencyCode2["Szl"] = "SZL";
|
|
912
|
+
CurrencyCode2["Thb"] = "THB";
|
|
913
|
+
CurrencyCode2["Tjs"] = "TJS";
|
|
914
|
+
CurrencyCode2["Tmt"] = "TMT";
|
|
915
|
+
CurrencyCode2["Tnd"] = "TND";
|
|
916
|
+
CurrencyCode2["Top"] = "TOP";
|
|
917
|
+
CurrencyCode2["Try"] = "TRY";
|
|
918
|
+
CurrencyCode2["Ttd"] = "TTD";
|
|
919
|
+
CurrencyCode2["Twd"] = "TWD";
|
|
920
|
+
CurrencyCode2["Tzs"] = "TZS";
|
|
921
|
+
CurrencyCode2["Uah"] = "UAH";
|
|
922
|
+
CurrencyCode2["Ugx"] = "UGX";
|
|
923
|
+
CurrencyCode2["Usd"] = "USD";
|
|
924
|
+
CurrencyCode2["Usdc"] = "USDC";
|
|
925
|
+
CurrencyCode2["Uyu"] = "UYU";
|
|
926
|
+
CurrencyCode2["Uzs"] = "UZS";
|
|
927
|
+
CurrencyCode2["Ved"] = "VED";
|
|
928
|
+
CurrencyCode2["Vef"] = "VEF";
|
|
929
|
+
CurrencyCode2["Ves"] = "VES";
|
|
930
|
+
CurrencyCode2["Vnd"] = "VND";
|
|
931
|
+
CurrencyCode2["Vuv"] = "VUV";
|
|
932
|
+
CurrencyCode2["Wst"] = "WST";
|
|
933
|
+
CurrencyCode2["Xaf"] = "XAF";
|
|
934
|
+
CurrencyCode2["Xcd"] = "XCD";
|
|
935
|
+
CurrencyCode2["Xof"] = "XOF";
|
|
936
|
+
CurrencyCode2["Xpf"] = "XPF";
|
|
937
|
+
CurrencyCode2["Xxx"] = "XXX";
|
|
938
|
+
CurrencyCode2["Yer"] = "YER";
|
|
939
|
+
CurrencyCode2["Zar"] = "ZAR";
|
|
940
|
+
CurrencyCode2["Zmw"] = "ZMW";
|
|
941
|
+
return CurrencyCode2;
|
|
942
|
+
})(CurrencyCode || {});
|
|
943
|
+
|
|
776
944
|
// src/mutations/refunds/createRefund.ts
|
|
777
945
|
var mutation6 = gql`#graphql
|
|
778
946
|
mutation createRefund($input: RefundInput!) {
|
|
@@ -1023,36 +1191,60 @@ var querySuggestedRefund = gql`#graphql
|
|
|
1023
1191
|
amount
|
|
1024
1192
|
currencyCode
|
|
1025
1193
|
}
|
|
1194
|
+
presentmentMoney {
|
|
1195
|
+
amount
|
|
1196
|
+
currencyCode
|
|
1197
|
+
}
|
|
1026
1198
|
}
|
|
1027
1199
|
maximumRefundableSet {
|
|
1028
1200
|
shopMoney {
|
|
1029
1201
|
amount
|
|
1030
1202
|
currencyCode
|
|
1031
1203
|
}
|
|
1204
|
+
presentmentMoney {
|
|
1205
|
+
amount
|
|
1206
|
+
currencyCode
|
|
1207
|
+
}
|
|
1032
1208
|
}
|
|
1033
1209
|
subtotalSet {
|
|
1034
1210
|
shopMoney {
|
|
1035
1211
|
amount
|
|
1036
1212
|
currencyCode
|
|
1037
1213
|
}
|
|
1214
|
+
presentmentMoney {
|
|
1215
|
+
amount
|
|
1216
|
+
currencyCode
|
|
1217
|
+
}
|
|
1038
1218
|
}
|
|
1039
1219
|
totalTaxSet {
|
|
1040
1220
|
shopMoney {
|
|
1041
1221
|
amount
|
|
1042
1222
|
currencyCode
|
|
1043
1223
|
}
|
|
1224
|
+
presentmentMoney {
|
|
1225
|
+
amount
|
|
1226
|
+
currencyCode
|
|
1227
|
+
}
|
|
1044
1228
|
}
|
|
1045
1229
|
discountedSubtotalSet {
|
|
1046
1230
|
shopMoney {
|
|
1047
1231
|
amount
|
|
1048
1232
|
currencyCode
|
|
1049
1233
|
}
|
|
1234
|
+
presentmentMoney {
|
|
1235
|
+
amount
|
|
1236
|
+
currencyCode
|
|
1237
|
+
}
|
|
1050
1238
|
}
|
|
1051
1239
|
totalCartDiscountAmountSet {
|
|
1052
1240
|
shopMoney {
|
|
1053
1241
|
amount
|
|
1054
1242
|
currencyCode
|
|
1055
1243
|
}
|
|
1244
|
+
presentmentMoney {
|
|
1245
|
+
amount
|
|
1246
|
+
currencyCode
|
|
1247
|
+
}
|
|
1056
1248
|
}
|
|
1057
1249
|
shipping {
|
|
1058
1250
|
amountSet {
|
|
@@ -1060,18 +1252,30 @@ var querySuggestedRefund = gql`#graphql
|
|
|
1060
1252
|
amount
|
|
1061
1253
|
currencyCode
|
|
1062
1254
|
}
|
|
1255
|
+
presentmentMoney {
|
|
1256
|
+
amount
|
|
1257
|
+
currencyCode
|
|
1258
|
+
}
|
|
1063
1259
|
}
|
|
1064
1260
|
maximumRefundableSet {
|
|
1065
1261
|
shopMoney {
|
|
1066
1262
|
amount
|
|
1067
1263
|
currencyCode
|
|
1068
1264
|
}
|
|
1265
|
+
presentmentMoney {
|
|
1266
|
+
amount
|
|
1267
|
+
currencyCode
|
|
1268
|
+
}
|
|
1069
1269
|
}
|
|
1070
1270
|
taxSet {
|
|
1071
1271
|
shopMoney {
|
|
1072
1272
|
amount
|
|
1073
1273
|
currencyCode
|
|
1074
1274
|
}
|
|
1275
|
+
presentmentMoney {
|
|
1276
|
+
amount
|
|
1277
|
+
currencyCode
|
|
1278
|
+
}
|
|
1075
1279
|
}
|
|
1076
1280
|
}
|
|
1077
1281
|
refundLineItems {
|
|
@@ -1085,12 +1289,20 @@ var querySuggestedRefund = gql`#graphql
|
|
|
1085
1289
|
amount
|
|
1086
1290
|
currencyCode
|
|
1087
1291
|
}
|
|
1292
|
+
presentmentMoney {
|
|
1293
|
+
amount
|
|
1294
|
+
currencyCode
|
|
1295
|
+
}
|
|
1088
1296
|
}
|
|
1089
1297
|
totalDiscountSet {
|
|
1090
1298
|
shopMoney {
|
|
1091
1299
|
amount
|
|
1092
1300
|
currencyCode
|
|
1093
1301
|
}
|
|
1302
|
+
presentmentMoney {
|
|
1303
|
+
amount
|
|
1304
|
+
currencyCode
|
|
1305
|
+
}
|
|
1094
1306
|
}
|
|
1095
1307
|
}
|
|
1096
1308
|
quantity
|
|
@@ -1099,18 +1311,30 @@ var querySuggestedRefund = gql`#graphql
|
|
|
1099
1311
|
amount
|
|
1100
1312
|
currencyCode
|
|
1101
1313
|
}
|
|
1314
|
+
presentmentMoney {
|
|
1315
|
+
amount
|
|
1316
|
+
currencyCode
|
|
1317
|
+
}
|
|
1102
1318
|
}
|
|
1103
1319
|
subtotalSet {
|
|
1104
1320
|
shopMoney {
|
|
1105
1321
|
amount
|
|
1106
1322
|
currencyCode
|
|
1107
1323
|
}
|
|
1324
|
+
presentmentMoney {
|
|
1325
|
+
amount
|
|
1326
|
+
currencyCode
|
|
1327
|
+
}
|
|
1108
1328
|
}
|
|
1109
1329
|
totalTaxSet {
|
|
1110
1330
|
shopMoney {
|
|
1111
1331
|
amount
|
|
1112
1332
|
currencyCode
|
|
1113
1333
|
}
|
|
1334
|
+
presentmentMoney {
|
|
1335
|
+
amount
|
|
1336
|
+
currencyCode
|
|
1337
|
+
}
|
|
1114
1338
|
}
|
|
1115
1339
|
restockType
|
|
1116
1340
|
}
|
|
@@ -1122,12 +1346,20 @@ var querySuggestedRefund = gql`#graphql
|
|
|
1122
1346
|
amount
|
|
1123
1347
|
currencyCode
|
|
1124
1348
|
}
|
|
1349
|
+
presentmentMoney {
|
|
1350
|
+
amount
|
|
1351
|
+
currencyCode
|
|
1352
|
+
}
|
|
1125
1353
|
}
|
|
1126
1354
|
maximumRefundableSet {
|
|
1127
1355
|
shopMoney {
|
|
1128
1356
|
amount
|
|
1129
1357
|
currencyCode
|
|
1130
1358
|
}
|
|
1359
|
+
presentmentMoney {
|
|
1360
|
+
amount
|
|
1361
|
+
currencyCode
|
|
1362
|
+
}
|
|
1131
1363
|
}
|
|
1132
1364
|
parentTransaction {
|
|
1133
1365
|
id
|
|
@@ -1606,6 +1838,20 @@ var queryOrderByIdFull = gql`#graphql
|
|
|
1606
1838
|
amount
|
|
1607
1839
|
currencyCode
|
|
1608
1840
|
}
|
|
1841
|
+
presentmentMoney {
|
|
1842
|
+
amount
|
|
1843
|
+
currencyCode
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
currentTotalPriceSet {
|
|
1847
|
+
shopMoney {
|
|
1848
|
+
amount
|
|
1849
|
+
currencyCode
|
|
1850
|
+
}
|
|
1851
|
+
presentmentMoney {
|
|
1852
|
+
amount
|
|
1853
|
+
currencyCode
|
|
1854
|
+
}
|
|
1609
1855
|
}
|
|
1610
1856
|
customer {
|
|
1611
1857
|
id
|
|
@@ -1660,6 +1906,10 @@ var queryOrderByIdFull = gql`#graphql
|
|
|
1660
1906
|
amount
|
|
1661
1907
|
currencyCode
|
|
1662
1908
|
}
|
|
1909
|
+
presentmentMoney {
|
|
1910
|
+
amount
|
|
1911
|
+
currencyCode
|
|
1912
|
+
}
|
|
1663
1913
|
}
|
|
1664
1914
|
}
|
|
1665
1915
|
vendor
|
|
@@ -3019,6 +3269,7 @@ async function getMetaobjectByHandle(handle, retries = 3) {
|
|
|
3019
3269
|
}
|
|
3020
3270
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3021
3271
|
0 && (module.exports = {
|
|
3272
|
+
CurrencyCode,
|
|
3022
3273
|
ShopifyUserError,
|
|
3023
3274
|
bulkUpdateProductVariants,
|
|
3024
3275
|
calculateRefund,
|