@medusajs/js-sdk 0.0.2-snapshot-20240925111619 → 0.0.2-snapshot-20240926160837
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/admin/api-key.js +5 -1
- package/dist/admin/api-key.js.map +1 -1
- package/dist/admin/campaign.js +5 -1
- package/dist/admin/campaign.js.map +1 -1
- package/dist/admin/claim.js +5 -1
- package/dist/admin/claim.js.map +1 -1
- package/dist/admin/currency.js +5 -1
- package/dist/admin/currency.js.map +1 -1
- package/dist/admin/customer-group.js +5 -1
- package/dist/admin/customer-group.js.map +1 -1
- package/dist/admin/customer.d.ts.map +1 -1
- package/dist/admin/customer.js +5 -1
- package/dist/admin/customer.js.map +1 -1
- package/dist/admin/exchange.js +5 -1
- package/dist/admin/exchange.js.map +1 -1
- package/dist/admin/fulfillment-provider.js +5 -1
- package/dist/admin/fulfillment-provider.js.map +1 -1
- package/dist/admin/fulfillment-set.js +5 -1
- package/dist/admin/fulfillment-set.js.map +1 -1
- package/dist/admin/fulfillment.d.ts.map +1 -1
- package/dist/admin/fulfillment.js +5 -1
- package/dist/admin/fulfillment.js.map +1 -1
- package/dist/admin/index.js +90 -83
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/inventory-item.js +5 -1
- package/dist/admin/inventory-item.js.map +1 -1
- package/dist/admin/invite.d.ts.map +1 -1
- package/dist/admin/invite.js +5 -1
- package/dist/admin/invite.js.map +1 -1
- package/dist/admin/notification.js +5 -1
- package/dist/admin/notification.js.map +1 -1
- package/dist/admin/order-edit.js +5 -1
- package/dist/admin/order-edit.js.map +1 -1
- package/dist/admin/order.d.ts.map +1 -1
- package/dist/admin/order.js +5 -1
- package/dist/admin/order.js.map +1 -1
- package/dist/admin/payment-collection.js +5 -1
- package/dist/admin/payment-collection.js.map +1 -1
- package/dist/admin/payment.js +5 -1
- package/dist/admin/payment.js.map +1 -1
- package/dist/admin/price-list.js +5 -1
- package/dist/admin/price-list.js.map +1 -1
- package/dist/admin/price-preference.js +5 -1
- package/dist/admin/price-preference.js.map +1 -1
- package/dist/admin/product-category.js +5 -1
- package/dist/admin/product-category.js.map +1 -1
- package/dist/admin/product-collection.js +5 -1
- package/dist/admin/product-collection.js.map +1 -1
- package/dist/admin/product-tag.js +5 -1
- package/dist/admin/product-tag.js.map +1 -1
- package/dist/admin/product-type.js +5 -1
- package/dist/admin/product-type.js.map +1 -1
- package/dist/admin/product-variant.js +5 -1
- package/dist/admin/product-variant.js.map +1 -1
- package/dist/admin/product.js +5 -1
- package/dist/admin/product.js.map +1 -1
- package/dist/admin/promotion.js +5 -1
- package/dist/admin/promotion.js.map +1 -1
- package/dist/admin/refund-reasons.js +5 -1
- package/dist/admin/refund-reasons.js.map +1 -1
- package/dist/admin/region.d.ts.map +1 -1
- package/dist/admin/region.js +5 -1
- package/dist/admin/region.js.map +1 -1
- package/dist/admin/reservation.js +3 -1
- package/dist/admin/reservation.js.map +1 -1
- package/dist/admin/return-reason.js +5 -1
- package/dist/admin/return-reason.js.map +1 -1
- package/dist/admin/return.js +5 -1
- package/dist/admin/return.js.map +1 -1
- package/dist/admin/sales-channel.js +5 -1
- package/dist/admin/sales-channel.js.map +1 -1
- package/dist/admin/shipping-option.js +5 -1
- package/dist/admin/shipping-option.js.map +1 -1
- package/dist/admin/shipping-profile.js +5 -1
- package/dist/admin/shipping-profile.js.map +1 -1
- package/dist/admin/stock-location.js +5 -1
- package/dist/admin/stock-location.js.map +1 -1
- package/dist/admin/store.js +5 -1
- package/dist/admin/store.js.map +1 -1
- package/dist/admin/tax-rate.js +5 -1
- package/dist/admin/tax-rate.js.map +1 -1
- package/dist/admin/tax-region.js +5 -1
- package/dist/admin/tax-region.js.map +1 -1
- package/dist/admin/upload.d.ts.map +1 -1
- package/dist/admin/upload.js +5 -1
- package/dist/admin/upload.js.map +1 -1
- package/dist/admin/user.js +5 -1
- package/dist/admin/user.js.map +1 -1
- package/dist/admin/workflow-execution.js +5 -1
- package/dist/admin/workflow-execution.js.map +1 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +5 -1
- package/dist/auth/index.js.map +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +16 -8
- package/dist/client.js.map +1 -1
- package/dist/esm/admin/api-key.d.ts +15 -0
- package/dist/esm/admin/api-key.d.ts.map +1 -0
- package/dist/esm/admin/api-key.js +75 -0
- package/dist/esm/admin/api-key.js.map +1 -0
- package/dist/esm/admin/campaign.d.ts +14 -0
- package/dist/esm/admin/campaign.d.ts.map +1 -0
- package/dist/esm/admin/campaign.js +66 -0
- package/dist/esm/admin/campaign.js.map +1 -0
- package/dist/esm/admin/claim.d.ts +30 -0
- package/dist/esm/admin/claim.d.ts.map +1 -0
- package/dist/esm/admin/claim.js +223 -0
- package/dist/esm/admin/claim.js.map +1 -0
- package/dist/esm/admin/currency.d.ts +10 -0
- package/dist/esm/admin/currency.d.ts.map +1 -0
- package/dist/esm/admin/currency.js +31 -0
- package/dist/esm/admin/currency.js.map +1 -0
- package/dist/esm/admin/customer-group.d.ts +14 -0
- package/dist/esm/admin/customer-group.d.ts.map +1 -0
- package/dist/esm/admin/customer-group.js +70 -0
- package/dist/esm/admin/customer-group.js.map +1 -0
- package/dist/esm/admin/customer.d.ts +21 -0
- package/dist/esm/admin/customer.d.ts.map +1 -0
- package/dist/esm/admin/customer.js +59 -0
- package/dist/esm/admin/customer.js.map +1 -0
- package/dist/esm/admin/exchange.d.ts +30 -0
- package/dist/esm/admin/exchange.d.ts.map +1 -0
- package/dist/esm/admin/exchange.js +223 -0
- package/dist/esm/admin/exchange.js.map +1 -0
- package/dist/esm/admin/fulfillment-provider.d.ts +9 -0
- package/dist/esm/admin/fulfillment-provider.d.ts.map +1 -0
- package/dist/esm/admin/fulfillment-provider.js +24 -0
- package/dist/esm/admin/fulfillment-provider.js.map +1 -0
- package/dist/esm/admin/fulfillment-set.d.ts +13 -0
- package/dist/esm/admin/fulfillment-set.d.ts.map +1 -0
- package/dist/esm/admin/fulfillment-set.js +60 -0
- package/dist/esm/admin/fulfillment-set.js.map +1 -0
- package/dist/esm/admin/fulfillment.d.ts +11 -0
- package/dist/esm/admin/fulfillment.d.ts.map +1 -0
- package/dist/esm/admin/fulfillment.js +44 -0
- package/dist/esm/admin/fulfillment.js.map +1 -0
- package/dist/esm/admin/index.d.ts +87 -0
- package/dist/esm/admin/index.d.ts.map +1 -0
- package/dist/esm/admin/index.js +87 -0
- package/dist/esm/admin/index.js.map +1 -0
- package/dist/esm/admin/inventory-item.d.ts +17 -0
- package/dist/esm/admin/inventory-item.d.ts.map +1 -0
- package/dist/esm/admin/inventory-item.js +95 -0
- package/dist/esm/admin/inventory-item.js.map +1 -0
- package/dist/esm/admin/invite.d.ts +26 -0
- package/dist/esm/admin/invite.d.ts.map +1 -0
- package/dist/esm/admin/invite.js +79 -0
- package/dist/esm/admin/invite.js.map +1 -0
- package/dist/esm/admin/notification.d.ts +10 -0
- package/dist/esm/admin/notification.d.ts.map +1 -0
- package/dist/esm/admin/notification.js +33 -0
- package/dist/esm/admin/notification.js.map +1 -0
- package/dist/esm/admin/order-edit.d.ts +16 -0
- package/dist/esm/admin/order-edit.d.ts.map +1 -0
- package/dist/esm/admin/order-edit.js +91 -0
- package/dist/esm/admin/order-edit.js.map +1 -0
- package/dist/esm/admin/order.d.ts +32 -0
- package/dist/esm/admin/order.d.ts.map +1 -0
- package/dist/esm/admin/order.js +94 -0
- package/dist/esm/admin/order.js.map +1 -0
- package/dist/esm/admin/payment-collection.d.ts +13 -0
- package/dist/esm/admin/payment-collection.d.ts.map +1 -0
- package/dist/esm/admin/payment-collection.js +59 -0
- package/dist/esm/admin/payment-collection.js.map +1 -0
- package/dist/esm/admin/payment.d.ts +13 -0
- package/dist/esm/admin/payment.d.ts.map +1 -0
- package/dist/esm/admin/payment.js +59 -0
- package/dist/esm/admin/payment.js.map +1 -0
- package/dist/esm/admin/price-list.d.ts +15 -0
- package/dist/esm/admin/price-list.d.ts.map +1 -0
- package/dist/esm/admin/price-list.js +81 -0
- package/dist/esm/admin/price-list.js.map +1 -0
- package/dist/esm/admin/price-preference.d.ts +13 -0
- package/dist/esm/admin/price-preference.d.ts.map +1 -0
- package/dist/esm/admin/price-preference.js +61 -0
- package/dist/esm/admin/price-preference.js.map +1 -0
- package/dist/esm/admin/product-category.d.ts +14 -0
- package/dist/esm/admin/product-category.d.ts.map +1 -0
- package/dist/esm/admin/product-category.js +69 -0
- package/dist/esm/admin/product-category.js.map +1 -0
- package/dist/esm/admin/product-collection.d.ts +14 -0
- package/dist/esm/admin/product-collection.d.ts.map +1 -0
- package/dist/esm/admin/product-collection.js +68 -0
- package/dist/esm/admin/product-collection.js.map +1 -0
- package/dist/esm/admin/product-tag.d.ts +13 -0
- package/dist/esm/admin/product-tag.d.ts.map +1 -0
- package/dist/esm/admin/product-tag.js +59 -0
- package/dist/esm/admin/product-tag.js.map +1 -0
- package/dist/esm/admin/product-type.d.ts +13 -0
- package/dist/esm/admin/product-type.d.ts.map +1 -0
- package/dist/esm/admin/product-type.js +59 -0
- package/dist/esm/admin/product-type.js.map +1 -0
- package/dist/esm/admin/product-variant.d.ts +9 -0
- package/dist/esm/admin/product-variant.d.ts.map +1 -0
- package/dist/esm/admin/product-variant.js +23 -0
- package/dist/esm/admin/product-variant.js.map +1 -0
- package/dist/esm/admin/product.d.ts +29 -0
- package/dist/esm/admin/product.d.ts.map +1 -0
- package/dist/esm/admin/product.js +211 -0
- package/dist/esm/admin/product.js.map +1 -0
- package/dist/esm/admin/promotion.d.ts +19 -0
- package/dist/esm/admin/promotion.d.ts.map +1 -0
- package/dist/esm/admin/promotion.js +110 -0
- package/dist/esm/admin/promotion.js.map +1 -0
- package/dist/esm/admin/refund-reasons.d.ts +9 -0
- package/dist/esm/admin/refund-reasons.d.ts.map +1 -0
- package/dist/esm/admin/refund-reasons.js +23 -0
- package/dist/esm/admin/refund-reasons.js.map +1 -0
- package/dist/esm/admin/region.d.ts +21 -0
- package/dist/esm/admin/region.d.ts.map +1 -0
- package/dist/esm/admin/region.js +59 -0
- package/dist/esm/admin/region.js.map +1 -0
- package/dist/esm/admin/reservation.d.ts +14 -0
- package/dist/esm/admin/reservation.d.ts.map +1 -0
- package/dist/esm/admin/reservation.js +62 -0
- package/dist/esm/admin/reservation.js.map +1 -0
- package/dist/esm/admin/return-reason.d.ts +13 -0
- package/dist/esm/admin/return-reason.d.ts.map +1 -0
- package/dist/esm/admin/return-reason.js +60 -0
- package/dist/esm/admin/return-reason.js.map +1 -0
- package/dist/esm/admin/return.d.ts +30 -0
- package/dist/esm/admin/return.d.ts.map +1 -0
- package/dist/esm/admin/return.js +224 -0
- package/dist/esm/admin/return.js.map +1 -0
- package/dist/esm/admin/sales-channel.d.ts +15 -0
- package/dist/esm/admin/sales-channel.d.ts.map +1 -0
- package/dist/esm/admin/sales-channel.js +79 -0
- package/dist/esm/admin/sales-channel.js.map +1 -0
- package/dist/esm/admin/shipping-option.d.ts +13 -0
- package/dist/esm/admin/shipping-option.d.ts.map +1 -0
- package/dist/esm/admin/shipping-option.js +61 -0
- package/dist/esm/admin/shipping-option.js.map +1 -0
- package/dist/esm/admin/shipping-profile.d.ts +13 -0
- package/dist/esm/admin/shipping-profile.d.ts.map +1 -0
- package/dist/esm/admin/shipping-profile.js +61 -0
- package/dist/esm/admin/shipping-profile.js.map +1 -0
- package/dist/esm/admin/stock-location.d.ts +16 -0
- package/dist/esm/admin/stock-location.d.ts.map +1 -0
- package/dist/esm/admin/stock-location.js +88 -0
- package/dist/esm/admin/stock-location.js.map +1 -0
- package/dist/esm/admin/store.d.ts +11 -0
- package/dist/esm/admin/store.d.ts.map +1 -0
- package/dist/esm/admin/store.js +43 -0
- package/dist/esm/admin/store.js.map +1 -0
- package/dist/esm/admin/tax-rate.d.ts +13 -0
- package/dist/esm/admin/tax-rate.d.ts.map +1 -0
- package/dist/esm/admin/tax-rate.js +62 -0
- package/dist/esm/admin/tax-rate.js.map +1 -0
- package/dist/esm/admin/tax-region.d.ts +12 -0
- package/dist/esm/admin/tax-region.d.ts.map +1 -0
- package/dist/esm/admin/tax-region.js +53 -0
- package/dist/esm/admin/tax-region.js.map +1 -0
- package/dist/esm/admin/upload.d.ts +15 -0
- package/dist/esm/admin/upload.d.ts.map +1 -0
- package/dist/esm/admin/upload.js +59 -0
- package/dist/esm/admin/upload.js.map +1 -0
- package/dist/esm/admin/user.d.ts +14 -0
- package/dist/esm/admin/user.d.ts.map +1 -0
- package/dist/esm/admin/user.js +67 -0
- package/dist/esm/admin/user.js.map +1 -0
- package/dist/esm/admin/workflow-execution.d.ts +10 -0
- package/dist/esm/admin/workflow-execution.d.ts.map +1 -0
- package/dist/esm/admin/workflow-execution.js +30 -0
- package/dist/esm/admin/workflow-execution.js.map +1 -0
- package/dist/esm/auth/index.d.ts +17 -0
- package/dist/esm/auth/index.d.ts.map +1 -0
- package/dist/esm/auth/index.js +78 -0
- package/dist/esm/auth/index.js.map +1 -0
- package/dist/esm/client.d.ts +59 -0
- package/dist/esm/client.d.ts.map +1 -0
- package/dist/esm/client.js +229 -0
- package/dist/esm/client.js.map +1 -0
- package/dist/esm/index.d.ts +15 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/store/index.d.ts +116 -0
- package/dist/esm/store/index.d.ts.map +1 -0
- package/dist/esm/store/index.js +240 -0
- package/dist/esm/store/index.js.map +1 -0
- package/dist/esm/types.d.ts +47 -0
- package/dist/esm/types.d.ts.map +1 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +5 -1
- package/dist/store/index.js.map +1 -1
- package/dist/types.js +2 -1
- package/package.json +15 -7
@@ -0,0 +1,95 @@
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
+
});
|
9
|
+
};
|
10
|
+
export class InventoryItem {
|
11
|
+
constructor(client) {
|
12
|
+
this.client = client;
|
13
|
+
}
|
14
|
+
create(body, query, headers) {
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
16
|
+
return yield this.client.fetch(`/admin/inventory-items`, {
|
17
|
+
method: "POST",
|
18
|
+
headers,
|
19
|
+
body,
|
20
|
+
query,
|
21
|
+
});
|
22
|
+
});
|
23
|
+
}
|
24
|
+
update(id, body, query, headers) {
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
26
|
+
return yield this.client.fetch(`/admin/inventory-items/${id}`, {
|
27
|
+
method: "POST",
|
28
|
+
headers,
|
29
|
+
body,
|
30
|
+
query,
|
31
|
+
});
|
32
|
+
});
|
33
|
+
}
|
34
|
+
list(query, headers) {
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
36
|
+
return yield this.client.fetch(`/admin/inventory-items`, {
|
37
|
+
query,
|
38
|
+
headers,
|
39
|
+
});
|
40
|
+
});
|
41
|
+
}
|
42
|
+
retrieve(id, query, headers) {
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
44
|
+
return yield this.client.fetch(`/admin/inventory-items/${id}`, {
|
45
|
+
query,
|
46
|
+
headers,
|
47
|
+
});
|
48
|
+
});
|
49
|
+
}
|
50
|
+
delete(id, headers) {
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
52
|
+
return yield this.client.fetch(`/admin/inventory-items/${id}`, {
|
53
|
+
method: "DELETE",
|
54
|
+
headers,
|
55
|
+
});
|
56
|
+
});
|
57
|
+
}
|
58
|
+
listLevels(id, query, headers) {
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
60
|
+
return yield this.client.fetch(`/admin/inventory-items/${id}/location-levels`, {
|
61
|
+
query,
|
62
|
+
headers,
|
63
|
+
});
|
64
|
+
});
|
65
|
+
}
|
66
|
+
updateLevel(id, locationId, body, query, headers) {
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
68
|
+
return yield this.client.fetch(`/admin/inventory-items/${id}/location-levels/${locationId}`, {
|
69
|
+
method: "POST",
|
70
|
+
headers,
|
71
|
+
body,
|
72
|
+
query,
|
73
|
+
});
|
74
|
+
});
|
75
|
+
}
|
76
|
+
deleteLevel(id, locationId, headers) {
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
78
|
+
return yield this.client.fetch(`/admin/inventory-items/${id}/location-levels/${locationId}`, {
|
79
|
+
method: "DELETE",
|
80
|
+
headers,
|
81
|
+
});
|
82
|
+
});
|
83
|
+
}
|
84
|
+
batchUpdateLevels(id, body, query, headers) {
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
86
|
+
return yield this.client.fetch(`/admin/inventory-items/${id}/location-levels/batch`, {
|
87
|
+
method: "POST",
|
88
|
+
headers,
|
89
|
+
body,
|
90
|
+
query,
|
91
|
+
});
|
92
|
+
});
|
93
|
+
}
|
94
|
+
}
|
95
|
+
//# sourceMappingURL=inventory-item.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"inventory-item.js","sourceRoot":"","sources":["../../../src/admin/inventory-item.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,OAAO,aAAa;IAExB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEK,MAAM,CACV,IAAwC,EACxC,KAA8B,EAC9B,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,wBAAwB,EACxB;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,MAAM,CACV,EAAU,EACV,IAAwC,EACxC,KAAoB,EACpB,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,0BAA0B,EAAE,EAAE,EAC9B;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,IAAI,CACR,KAA0C,EAC1C,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,wBAAwB,EACxB;gBACE,KAAK;gBACL,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAEK,QAAQ,CAAC,EAAU,EAAE,KAAoB,EAAE,OAAuB;;YACtE,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,0BAA0B,EAAE,EAAE,EAC9B;gBACE,KAAK;gBACL,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAEK,MAAM,CAAC,EAAU,EAAE,OAAuB;;YAC9C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,0BAA0B,EAAE,EAAE,EAC9B;gBACE,MAAM,EAAE,QAAQ;gBAChB,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAEK,UAAU,CACd,EAAU,EACV,KAA4C,EAC5C,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,0BAA0B,EAAE,kBAAkB,EAC9C;gBACE,KAAK;gBACL,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAEK,WAAW,CACf,EAAU,EACV,UAAkB,EAClB,IAAyC,EACzC,KAAoB,EACpB,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,0BAA0B,EAAE,oBAAoB,UAAU,EAAE,EAC5D;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,WAAW,CAAC,EAAU,EAAE,UAAkB,EAAE,OAAuB;;YACvE,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,0BAA0B,EAAE,oBAAoB,UAAU,EAAE,EAC5D;gBACE,MAAM,EAAE,QAAQ;gBAChB,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAEK,iBAAiB,CACrB,EAAU,EACV,IAAsD,EACtD,KAAoB,EACpB,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,0BAA0B,EAAE,wBAAwB,EACpD;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;CACF"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { FindParams, HttpTypes, SelectParams } from "@medusajs/types";
|
2
|
+
import { Client } from "../client";
|
3
|
+
import { ClientHeaders } from "../types";
|
4
|
+
export declare class Invite {
|
5
|
+
private client;
|
6
|
+
constructor(client: Client);
|
7
|
+
accept(input: HttpTypes.AdminAcceptInvite & {
|
8
|
+
invite_token: string;
|
9
|
+
}, query?: SelectParams, headers?: ClientHeaders): Promise<{
|
10
|
+
user: HttpTypes.AdminUserResponse;
|
11
|
+
}>;
|
12
|
+
create(body: HttpTypes.AdminCreateInvite, query?: SelectParams, headers?: ClientHeaders): Promise<{
|
13
|
+
invite: HttpTypes.AdminInviteResponse;
|
14
|
+
}>;
|
15
|
+
retrieve(id: string, query?: SelectParams, headers?: ClientHeaders): Promise<{
|
16
|
+
invite: HttpTypes.AdminInviteResponse;
|
17
|
+
}>;
|
18
|
+
list(queryParams?: FindParams, headers?: ClientHeaders): Promise<HttpTypes.PaginatedResponse<{
|
19
|
+
invites: HttpTypes.AdminInviteResponse[];
|
20
|
+
}>>;
|
21
|
+
resend(id: string, headers?: ClientHeaders): Promise<{
|
22
|
+
invite: HttpTypes.AdminInviteResponse;
|
23
|
+
}>;
|
24
|
+
delete(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminInviteDeleteResponse>;
|
25
|
+
}
|
26
|
+
//# sourceMappingURL=invite.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["../../../src/admin/invite.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EAET,YAAY,EACb,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAQ;gBACV,MAAM,EAAE,MAAM;IAIpB,MAAM,CACV,KAAK,EAAE,SAAS,CAAC,iBAAiB,GAAG;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,EAC7D,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;cAGgB,SAAS,CAAC,iBAAiB;;IAW9D,MAAM,CACV,IAAI,EAAE,SAAS,CAAC,iBAAiB,EACjC,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;gBAEkB,SAAS,CAAC,mBAAmB;;IAWlE,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,aAAa;gBAC7B,SAAS,CAAC,mBAAmB;;IASlE,IAAI,CAAC,WAAW,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,aAAa;iBAE3B,SAAS,CAAC,mBAAmB,EAAE;;IAO1D,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;gBACL,SAAS,CAAC,mBAAmB;;IASlE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;CASjD"}
|
@@ -0,0 +1,79 @@
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
+
});
|
9
|
+
};
|
10
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
11
|
+
var t = {};
|
12
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
13
|
+
t[p] = s[p];
|
14
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
15
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
16
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
17
|
+
t[p[i]] = s[p[i]];
|
18
|
+
}
|
19
|
+
return t;
|
20
|
+
};
|
21
|
+
export class Invite {
|
22
|
+
constructor(client) {
|
23
|
+
this.client = client;
|
24
|
+
}
|
25
|
+
accept(input, query, headers) {
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
27
|
+
const { invite_token } = input, rest = __rest(input, ["invite_token"]);
|
28
|
+
return yield this.client.fetch(`/admin/invites/accept?token=${input.invite_token}`, {
|
29
|
+
method: "POST",
|
30
|
+
headers,
|
31
|
+
body: rest,
|
32
|
+
query,
|
33
|
+
});
|
34
|
+
});
|
35
|
+
}
|
36
|
+
create(body, query, headers) {
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
38
|
+
return yield this.client.fetch(`/admin/invites`, {
|
39
|
+
method: "POST",
|
40
|
+
headers,
|
41
|
+
body,
|
42
|
+
query,
|
43
|
+
});
|
44
|
+
});
|
45
|
+
}
|
46
|
+
retrieve(id, query, headers) {
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
48
|
+
return yield this.client.fetch(`/admin/invites/${id}`, {
|
49
|
+
headers,
|
50
|
+
query,
|
51
|
+
});
|
52
|
+
});
|
53
|
+
}
|
54
|
+
list(queryParams, headers) {
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
56
|
+
return yield this.client.fetch(`/admin/invites`, {
|
57
|
+
headers,
|
58
|
+
query: queryParams,
|
59
|
+
});
|
60
|
+
});
|
61
|
+
}
|
62
|
+
resend(id, headers) {
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
64
|
+
return yield this.client.fetch(`/admin/invites/${id}/resend`, {
|
65
|
+
method: "POST",
|
66
|
+
headers,
|
67
|
+
});
|
68
|
+
});
|
69
|
+
}
|
70
|
+
delete(id, headers) {
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
72
|
+
return yield this.client.fetch(`/admin/invites/${id}`, {
|
73
|
+
method: "DELETE",
|
74
|
+
headers,
|
75
|
+
});
|
76
|
+
});
|
77
|
+
}
|
78
|
+
}
|
79
|
+
//# sourceMappingURL=invite.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"invite.js","sourceRoot":"","sources":["../../../src/admin/invite.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AASA,MAAM,OAAO,MAAM;IAEjB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEK,MAAM,CACV,KAA6D,EAC7D,KAAoB,EACpB,OAAuB;;YAEvB,MAAM,EAAE,YAAY,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAAjC,gBAAyB,CAAQ,CAAA;YACvC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,+BAA+B,KAAK,CAAC,YAAY,EAAE,EACnD;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI,EAAE,IAAI;gBACV,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,MAAM,CACV,IAAiC,EACjC,KAAoB,EACpB,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,gBAAgB,EAChB;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,QAAQ,CAAC,EAAU,EAAE,KAAoB,EAAE,OAAuB;;YACtE,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,kBAAkB,EAAE,EAAE,EACtB;gBACE,OAAO;gBACP,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,IAAI,CAAC,WAAwB,EAAE,OAAuB;;YAC1D,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAE5B,gBAAgB,EAAE;gBAClB,OAAO;gBACP,KAAK,EAAE,WAAW;aACnB,CAAC,CAAA;QACJ,CAAC;KAAA;IAEK,MAAM,CAAC,EAAU,EAAE,OAAuB;;YAC9C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,kBAAkB,EAAE,SAAS,EAC7B;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAEK,MAAM,CAAC,EAAU,EAAE,OAAuB;;YAC9C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,kBAAkB,EAAE,EAAE,EACtB;gBACE,MAAM,EAAE,QAAQ;gBAChB,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;CACF"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { HttpTypes } from "@medusajs/types";
|
2
|
+
import { Client } from "../client";
|
3
|
+
import { ClientHeaders } from "../types";
|
4
|
+
export declare class Notification {
|
5
|
+
private client;
|
6
|
+
constructor(client: Client);
|
7
|
+
retrieve(id: string, query?: HttpTypes.AdminNotificationParams, headers?: ClientHeaders): Promise<HttpTypes.AdminNotificationResponse>;
|
8
|
+
list(query?: HttpTypes.AdminNotificationListParams, headers?: ClientHeaders): Promise<HttpTypes.AdminNotificationListResponse>;
|
9
|
+
}
|
10
|
+
//# sourceMappingURL=notification.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../src/admin/notification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAQ;gBACV,MAAM,EAAE,MAAM;IAIpB,QAAQ,CACZ,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,SAAS,CAAC,uBAAuB,EACzC,OAAO,CAAC,EAAE,aAAa;IAYnB,IAAI,CACR,KAAK,CAAC,EAAE,SAAS,CAAC,2BAA2B,EAC7C,OAAO,CAAC,EAAE,aAAa;CAW1B"}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
+
});
|
9
|
+
};
|
10
|
+
export class Notification {
|
11
|
+
constructor(client) {
|
12
|
+
this.client = client;
|
13
|
+
}
|
14
|
+
retrieve(id, query, headers) {
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
16
|
+
return yield this.client.fetch(`/admin/notifications/${id}`, {
|
17
|
+
method: "GET",
|
18
|
+
headers,
|
19
|
+
query,
|
20
|
+
});
|
21
|
+
});
|
22
|
+
}
|
23
|
+
list(query, headers) {
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
25
|
+
return yield this.client.fetch(`/admin/notifications`, {
|
26
|
+
method: "GET",
|
27
|
+
headers,
|
28
|
+
query,
|
29
|
+
});
|
30
|
+
});
|
31
|
+
}
|
32
|
+
}
|
33
|
+
//# sourceMappingURL=notification.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"notification.js","sourceRoot":"","sources":["../../../src/admin/notification.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,OAAO,YAAY;IAEvB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEK,QAAQ,CACZ,EAAU,EACV,KAAyC,EACzC,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,wBAAwB,EAAE,EAAE,EAC5B;gBACE,MAAM,EAAE,KAAK;gBACb,OAAO;gBACP,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,IAAI,CACR,KAA6C,EAC7C,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,sBAAsB,EACtB;gBACE,MAAM,EAAE,KAAK;gBACb,OAAO;gBACP,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;CACF"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { HttpTypes } from "@medusajs/types";
|
2
|
+
import { Client } from "../client";
|
3
|
+
import { ClientHeaders } from "../types";
|
4
|
+
export declare class OrderEdit {
|
5
|
+
private client;
|
6
|
+
constructor(client: Client);
|
7
|
+
initiateRequest(body: HttpTypes.AdminInitiateOrderEditRequest, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminOrderEditPreviewResponse>;
|
8
|
+
request(id: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminOrderEditPreviewResponse>;
|
9
|
+
confirm(id: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminOrderEditPreviewResponse>;
|
10
|
+
cancelRequest(id: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminOrderEditDeleteResponse>;
|
11
|
+
addItems(id: string, body: HttpTypes.AdminAddOrderEditItems, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminOrderEditPreviewResponse>;
|
12
|
+
updateOriginalItem(id: string, itemId: string, body: HttpTypes.AdminUpdateOrderEditItem, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminOrderEditPreviewResponse>;
|
13
|
+
updateAddedItem(id: string, actionId: string, body: HttpTypes.AdminUpdateOrderEditItem, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminOrderEditPreviewResponse>;
|
14
|
+
removeAddedItem(id: string, actionId: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminOrderEditPreviewResponse>;
|
15
|
+
}
|
16
|
+
//# sourceMappingURL=order-edit.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"order-edit.d.ts","sourceRoot":"","sources":["../../../src/admin/order-edit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAQ;gBACV,MAAM,EAAE,MAAM;IAIpB,eAAe,CACnB,IAAI,EAAE,SAAS,CAAC,6BAA6B,EAC7C,KAAK,CAAC,EAAE,SAAS,CAAC,YAAY,EAC9B,OAAO,CAAC,EAAE,aAAa;IAanB,OAAO,CACX,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,SAAS,CAAC,YAAY,EAC9B,OAAO,CAAC,EAAE,aAAa;IAYnB,OAAO,CACX,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,SAAS,CAAC,YAAY,EAC9B,OAAO,CAAC,EAAE,aAAa;IAYnB,aAAa,CACjB,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,SAAS,CAAC,YAAY,EAC9B,OAAO,CAAC,EAAE,aAAa;IAYnB,QAAQ,CACZ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,sBAAsB,EACtC,KAAK,CAAC,EAAE,SAAS,CAAC,YAAY,EAC9B,OAAO,CAAC,EAAE,aAAa;IAanB,kBAAkB,CACtB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,SAAS,CAAC,wBAAwB,EACxC,KAAK,CAAC,EAAE,SAAS,CAAC,YAAY,EAC9B,OAAO,CAAC,EAAE,aAAa;IAanB,eAAe,CACnB,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,SAAS,CAAC,wBAAwB,EACxC,KAAK,CAAC,EAAE,SAAS,CAAC,YAAY,EAC9B,OAAO,CAAC,EAAE,aAAa;IAanB,eAAe,CACnB,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE,SAAS,CAAC,YAAY,EAC9B,OAAO,CAAC,EAAE,aAAa;CAW1B"}
|
@@ -0,0 +1,91 @@
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
+
});
|
9
|
+
};
|
10
|
+
export class OrderEdit {
|
11
|
+
constructor(client) {
|
12
|
+
this.client = client;
|
13
|
+
}
|
14
|
+
initiateRequest(body, query, headers) {
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
16
|
+
return yield this.client.fetch(`/admin/order-edits`, {
|
17
|
+
method: "POST",
|
18
|
+
headers,
|
19
|
+
body,
|
20
|
+
query,
|
21
|
+
});
|
22
|
+
});
|
23
|
+
}
|
24
|
+
request(id, query, headers) {
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
26
|
+
return yield this.client.fetch(`/admin/order-edits/${id}/request`, {
|
27
|
+
method: "POST",
|
28
|
+
headers,
|
29
|
+
query,
|
30
|
+
});
|
31
|
+
});
|
32
|
+
}
|
33
|
+
confirm(id, query, headers) {
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
35
|
+
return yield this.client.fetch(`/admin/order-edits/${id}/confirm`, {
|
36
|
+
method: "POST",
|
37
|
+
headers,
|
38
|
+
query,
|
39
|
+
});
|
40
|
+
});
|
41
|
+
}
|
42
|
+
cancelRequest(id, query, headers) {
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
44
|
+
return yield this.client.fetch(`/admin/order-edits/${id}`, {
|
45
|
+
method: "DELETE",
|
46
|
+
headers,
|
47
|
+
query,
|
48
|
+
});
|
49
|
+
});
|
50
|
+
}
|
51
|
+
addItems(id, body, query, headers) {
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
53
|
+
return yield this.client.fetch(`/admin/order-edits/${id}/items`, {
|
54
|
+
method: "POST",
|
55
|
+
headers,
|
56
|
+
body,
|
57
|
+
query,
|
58
|
+
});
|
59
|
+
});
|
60
|
+
}
|
61
|
+
updateOriginalItem(id, itemId, body, query, headers) {
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
63
|
+
return yield this.client.fetch(`/admin/order-edits/${id}/items/item/${itemId}`, {
|
64
|
+
method: "POST",
|
65
|
+
headers,
|
66
|
+
body,
|
67
|
+
query,
|
68
|
+
});
|
69
|
+
});
|
70
|
+
}
|
71
|
+
updateAddedItem(id, actionId, body, query, headers) {
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
73
|
+
return yield this.client.fetch(`/admin/order-edits/${id}/items/${actionId}`, {
|
74
|
+
method: "POST",
|
75
|
+
headers,
|
76
|
+
body,
|
77
|
+
query,
|
78
|
+
});
|
79
|
+
});
|
80
|
+
}
|
81
|
+
removeAddedItem(id, actionId, query, headers) {
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
83
|
+
return yield this.client.fetch(`/admin/order-edits/${id}/items/${actionId}`, {
|
84
|
+
method: "DELETE",
|
85
|
+
headers,
|
86
|
+
query,
|
87
|
+
});
|
88
|
+
});
|
89
|
+
}
|
90
|
+
}
|
91
|
+
//# sourceMappingURL=order-edit.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"order-edit.js","sourceRoot":"","sources":["../../../src/admin/order-edit.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,OAAO,SAAS;IAEpB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEK,eAAe,CACnB,IAA6C,EAC7C,KAA8B,EAC9B,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,oBAAoB,EACpB;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,OAAO,CACX,EAAU,EACV,KAA8B,EAC9B,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,sBAAsB,EAAE,UAAU,EAClC;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,OAAO,CACX,EAAU,EACV,KAA8B,EAC9B,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,sBAAsB,EAAE,UAAU,EAClC;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,aAAa,CACjB,EAAU,EACV,KAA8B,EAC9B,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,sBAAsB,EAAE,EAAE,EAC1B;gBACE,MAAM,EAAE,QAAQ;gBAChB,OAAO;gBACP,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,QAAQ,CACZ,EAAU,EACV,IAAsC,EACtC,KAA8B,EAC9B,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,sBAAsB,EAAE,QAAQ,EAChC;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,kBAAkB,CACtB,EAAU,EACV,MAAc,EACd,IAAwC,EACxC,KAA8B,EAC9B,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,sBAAsB,EAAE,eAAe,MAAM,EAAE,EAC/C;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,eAAe,CACnB,EAAU,EACV,QAAgB,EAChB,IAAwC,EACxC,KAA8B,EAC9B,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,sBAAsB,EAAE,UAAU,QAAQ,EAAE,EAC5C;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,eAAe,CACnB,EAAU,EACV,QAAgB,EAChB,KAA8B,EAC9B,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,sBAAsB,EAAE,UAAU,QAAQ,EAAE,EAC5C;gBACE,MAAM,EAAE,QAAQ;gBAChB,OAAO;gBACP,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;CACF"}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { FindParams, HttpTypes, SelectParams } from "@medusajs/types";
|
2
|
+
import { AdminOrderChangesResponse } from "@medusajs/types/src/http/order/admin/responses";
|
3
|
+
import { Client } from "../client";
|
4
|
+
import { ClientHeaders } from "../types";
|
5
|
+
export declare class Order {
|
6
|
+
private client;
|
7
|
+
constructor(client: Client);
|
8
|
+
retrieve(id: string, query?: SelectParams, headers?: ClientHeaders): Promise<{
|
9
|
+
order: HttpTypes.AdminOrder;
|
10
|
+
}>;
|
11
|
+
retrievePreview(id: string, query?: HttpTypes.AdminOrderFilters, headers?: ClientHeaders): Promise<HttpTypes.AdminOrderPreviewResponse>;
|
12
|
+
list(queryParams?: FindParams & HttpTypes.AdminOrderFilters, headers?: ClientHeaders): Promise<HttpTypes.PaginatedResponse<{
|
13
|
+
orders: HttpTypes.AdminOrder[];
|
14
|
+
}>>;
|
15
|
+
cancel(id: string, headers?: ClientHeaders): Promise<{
|
16
|
+
order: HttpTypes.AdminOrder;
|
17
|
+
}>;
|
18
|
+
createFulfillment(id: string, body: HttpTypes.AdminCreateOrderFulfillment, query?: SelectParams, headers?: ClientHeaders): Promise<{
|
19
|
+
order: HttpTypes.AdminOrder;
|
20
|
+
}>;
|
21
|
+
cancelFulfillment(id: string, fulfillmentId: string, body: HttpTypes.AdminCancelOrderFulfillment, headers?: ClientHeaders): Promise<{
|
22
|
+
order: HttpTypes.AdminOrder;
|
23
|
+
}>;
|
24
|
+
createShipment(id: string, fulfillmentId: string, body: HttpTypes.AdminCreateOrderShipment, query?: SelectParams, headers?: ClientHeaders): Promise<{
|
25
|
+
order: HttpTypes.AdminOrder;
|
26
|
+
}>;
|
27
|
+
markAsDelivered(id: string, fulfillmentId: string, body: HttpTypes.AdminMarkOrderFulfillmentAsDelivered, query?: SelectParams, headers?: ClientHeaders): Promise<{
|
28
|
+
order: HttpTypes.AdminOrder;
|
29
|
+
}>;
|
30
|
+
listChanges(id: string, queryParams?: FindParams & HttpTypes.AdminOrderChangesFilters, headers?: ClientHeaders): Promise<HttpTypes.PaginatedResponse<AdminOrderChangesResponse>>;
|
31
|
+
}
|
32
|
+
//# sourceMappingURL=order.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"order.d.ts","sourceRoot":"","sources":["../../../src/admin/order.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EAET,YAAY,EACb,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAA;AAE1F,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,KAAK;IAChB,OAAO,CAAC,MAAM,CAAQ;gBACV,MAAM,EAAE,MAAM;IAIpB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,aAAa;eAC9B,SAAS,CAAC,UAAU;;IASxD,eAAe,CACnB,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,SAAS,CAAC,iBAAiB,EACnC,OAAO,CAAC,EAAE,aAAa;IAWnB,IAAI,CACR,WAAW,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,iBAAiB,EACtD,OAAO,CAAC,EAAE,aAAa;gBAGO,SAAS,CAAC,UAAU,EAAE;;IAOhD,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;eACN,SAAS,CAAC,UAAU;;IASxD,iBAAiB,CACrB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,2BAA2B,EAC3C,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;eAEiB,SAAS,CAAC,UAAU;;IAWxD,iBAAiB,CACrB,EAAE,EAAE,MAAM,EACV,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,SAAS,CAAC,2BAA2B,EAC3C,OAAO,CAAC,EAAE,aAAa;eAEiB,SAAS,CAAC,UAAU;;IAUxD,cAAc,CAClB,EAAE,EAAE,MAAM,EACV,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,SAAS,CAAC,wBAAwB,EACxC,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;eAEiB,SAAS,CAAC,UAAU;;IAWxD,eAAe,CACnB,EAAE,EAAE,MAAM,EACV,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,SAAS,CAAC,oCAAoC,EACpD,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;eAEiB,SAAS,CAAC,UAAU;;IAWxD,WAAW,CACf,EAAE,EAAE,MAAM,EACV,WAAW,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,wBAAwB,EAC7D,OAAO,CAAC,EAAE,aAAa;CAS1B"}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
+
});
|
9
|
+
};
|
10
|
+
export class Order {
|
11
|
+
constructor(client) {
|
12
|
+
this.client = client;
|
13
|
+
}
|
14
|
+
retrieve(id, query, headers) {
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
16
|
+
return yield this.client.fetch(`/admin/orders/${id}`, {
|
17
|
+
query,
|
18
|
+
headers,
|
19
|
+
});
|
20
|
+
});
|
21
|
+
}
|
22
|
+
retrievePreview(id, query, headers) {
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
24
|
+
return yield this.client.fetch(`/admin/orders/${id}/preview`, {
|
25
|
+
query,
|
26
|
+
headers,
|
27
|
+
});
|
28
|
+
});
|
29
|
+
}
|
30
|
+
list(queryParams, headers) {
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
32
|
+
return yield this.client.fetch(`/admin/orders`, {
|
33
|
+
query: queryParams,
|
34
|
+
headers,
|
35
|
+
});
|
36
|
+
});
|
37
|
+
}
|
38
|
+
cancel(id, headers) {
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
40
|
+
return yield this.client.fetch(`/admin/orders/${id}/cancel`, {
|
41
|
+
method: "POST",
|
42
|
+
headers,
|
43
|
+
});
|
44
|
+
});
|
45
|
+
}
|
46
|
+
createFulfillment(id, body, query, headers) {
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
48
|
+
return yield this.client.fetch(`/admin/orders/${id}/fulfillments`, {
|
49
|
+
method: "POST",
|
50
|
+
headers,
|
51
|
+
body,
|
52
|
+
query,
|
53
|
+
});
|
54
|
+
});
|
55
|
+
}
|
56
|
+
cancelFulfillment(id, fulfillmentId, body, headers) {
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
58
|
+
return yield this.client.fetch(`/admin/orders/${id}/fulfillments/${fulfillmentId}/cancel`, {
|
59
|
+
method: "POST",
|
60
|
+
headers,
|
61
|
+
body,
|
62
|
+
});
|
63
|
+
});
|
64
|
+
}
|
65
|
+
createShipment(id, fulfillmentId, body, query, headers) {
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
67
|
+
return yield this.client.fetch(`/admin/orders/${id}/fulfillments/${fulfillmentId}/shipments`, {
|
68
|
+
method: "POST",
|
69
|
+
headers,
|
70
|
+
body,
|
71
|
+
query,
|
72
|
+
});
|
73
|
+
});
|
74
|
+
}
|
75
|
+
markAsDelivered(id, fulfillmentId, body, query, headers) {
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
77
|
+
return yield this.client.fetch(`/admin/orders/${id}/fulfillments/${fulfillmentId}/mark-as-delivered`, {
|
78
|
+
method: "POST",
|
79
|
+
headers,
|
80
|
+
body,
|
81
|
+
query,
|
82
|
+
});
|
83
|
+
});
|
84
|
+
}
|
85
|
+
listChanges(id, queryParams, headers) {
|
86
|
+
return __awaiter(this, void 0, void 0, function* () {
|
87
|
+
return yield this.client.fetch(`/admin/orders/${id}/changes`, {
|
88
|
+
query: queryParams,
|
89
|
+
headers,
|
90
|
+
});
|
91
|
+
});
|
92
|
+
}
|
93
|
+
}
|
94
|
+
//# sourceMappingURL=order.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../../src/admin/order.ts"],"names":[],"mappings":";;;;;;;;;AAWA,MAAM,OAAO,KAAK;IAEhB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEK,QAAQ,CAAC,EAAU,EAAE,KAAoB,EAAE,OAAuB;;YACtE,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,iBAAiB,EAAE,EAAE,EACrB;gBACE,KAAK;gBACL,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAEK,eAAe,CACnB,EAAU,EACV,KAAmC,EACnC,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,iBAAiB,EAAE,UAAU,EAC7B;gBACE,KAAK;gBACL,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAEK,IAAI,CACR,WAAsD,EACtD,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAE5B,eAAe,EAAE;gBACjB,KAAK,EAAE,WAAW;gBAClB,OAAO;aACR,CAAC,CAAA;QACJ,CAAC;KAAA;IAEK,MAAM,CAAC,EAAU,EAAE,OAAuB;;YAC9C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,iBAAiB,EAAE,SAAS,EAC5B;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAEK,iBAAiB,CACrB,EAAU,EACV,IAA2C,EAC3C,KAAoB,EACpB,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,iBAAiB,EAAE,eAAe,EAClC;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,iBAAiB,CACrB,EAAU,EACV,aAAqB,EACrB,IAA2C,EAC3C,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,iBAAiB,EAAE,iBAAiB,aAAa,SAAS,EAC1D;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;aACL,CACF,CAAA;QACH,CAAC;KAAA;IAEK,cAAc,CAClB,EAAU,EACV,aAAqB,EACrB,IAAwC,EACxC,KAAoB,EACpB,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,iBAAiB,EAAE,iBAAiB,aAAa,YAAY,EAC7D;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,eAAe,CACnB,EAAU,EACV,aAAqB,EACrB,IAAoD,EACpD,KAAoB,EACpB,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,iBAAiB,EAAE,iBAAiB,aAAa,oBAAoB,EACrE;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,WAAW,CACf,EAAU,EACV,WAA6D,EAC7D,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAE5B,iBAAiB,EAAE,UAAU,EAAE;gBAC/B,KAAK,EAAE,WAAW;gBAClB,OAAO;aACR,CAAC,CAAA;QACJ,CAAC;KAAA;CACF"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { HttpTypes, SelectParams } from "@medusajs/types";
|
2
|
+
import { Client } from "../client";
|
3
|
+
import { ClientHeaders } from "../types";
|
4
|
+
export declare class PaymentCollection {
|
5
|
+
private client;
|
6
|
+
constructor(client: Client);
|
7
|
+
list(query?: HttpTypes.AdminPaymentCollectionFilters, headers?: ClientHeaders): Promise<HttpTypes.AdminPaymentCollectionsResponse>;
|
8
|
+
retrieve(id: string, query?: HttpTypes.AdminPaymentCollectionFilters, headers?: ClientHeaders): Promise<HttpTypes.AdminPaymentCollectionResponse>;
|
9
|
+
create(body: HttpTypes.AdminCreatePaymentCollection, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminPaymentCollectionResponse>;
|
10
|
+
delete(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminDeletePaymentCollectionResponse>;
|
11
|
+
markAsPaid(id: string, body: HttpTypes.AdminMarkPaymentCollectionAsPaid, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminPaymentCollectionResponse>;
|
12
|
+
}
|
13
|
+
//# sourceMappingURL=payment-collection.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"payment-collection.d.ts","sourceRoot":"","sources":["../../../src/admin/payment-collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAQ;gBACV,MAAM,EAAE,MAAM;IAIpB,IAAI,CACR,KAAK,CAAC,EAAE,SAAS,CAAC,6BAA6B,EAC/C,OAAO,CAAC,EAAE,aAAa;IAWnB,QAAQ,CACZ,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,SAAS,CAAC,6BAA6B,EAC/C,OAAO,CAAC,EAAE,aAAa;IAWnB,MAAM,CACV,IAAI,EAAE,SAAS,CAAC,4BAA4B,EAC5C,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;IAanB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;IAU1C,UAAU,CACd,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,gCAAgC,EAChD,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;CAY1B"}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
+
});
|
9
|
+
};
|
10
|
+
export class PaymentCollection {
|
11
|
+
constructor(client) {
|
12
|
+
this.client = client;
|
13
|
+
}
|
14
|
+
list(query, headers) {
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
16
|
+
return yield this.client.fetch(`/admin/payment-collections`, {
|
17
|
+
query,
|
18
|
+
headers,
|
19
|
+
});
|
20
|
+
});
|
21
|
+
}
|
22
|
+
retrieve(id, query, headers) {
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
24
|
+
return yield this.client.fetch(`/admin/payment-collections/${id}`, {
|
25
|
+
query,
|
26
|
+
headers,
|
27
|
+
});
|
28
|
+
});
|
29
|
+
}
|
30
|
+
create(body, query, headers) {
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
32
|
+
return yield this.client.fetch(`/admin/payment-collections`, {
|
33
|
+
method: "POST",
|
34
|
+
headers,
|
35
|
+
body,
|
36
|
+
query,
|
37
|
+
});
|
38
|
+
});
|
39
|
+
}
|
40
|
+
delete(id, headers) {
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
42
|
+
return yield this.client.fetch(`/admin/payment-collections/${id}`, {
|
43
|
+
method: "DELETE",
|
44
|
+
headers,
|
45
|
+
});
|
46
|
+
});
|
47
|
+
}
|
48
|
+
markAsPaid(id, body, query, headers) {
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
50
|
+
return yield this.client.fetch(`/admin/payment-collections/${id}/mark-as-paid`, {
|
51
|
+
method: "POST",
|
52
|
+
headers,
|
53
|
+
body,
|
54
|
+
query,
|
55
|
+
});
|
56
|
+
});
|
57
|
+
}
|
58
|
+
}
|
59
|
+
//# sourceMappingURL=payment-collection.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"payment-collection.js","sourceRoot":"","sources":["../../../src/admin/payment-collection.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,OAAO,iBAAiB;IAE5B,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEK,IAAI,CACR,KAA+C,EAC/C,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,4BAA4B,EAC5B;gBACE,KAAK;gBACL,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAEK,QAAQ,CACZ,EAAU,EACV,KAA+C,EAC/C,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,8BAA8B,EAAE,EAAE,EAClC;gBACE,KAAK;gBACL,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAEK,MAAM,CACV,IAA4C,EAC5C,KAAoB,EACpB,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,4BAA4B,EAC5B;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,MAAM,CAAC,EAAU,EAAE,OAAuB;;YAC9C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,8BAA8B,EAAE,EAAE,EAClC;gBACE,MAAM,EAAE,QAAQ;gBAChB,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAEK,UAAU,CACd,EAAU,EACV,IAAgD,EAChD,KAAoB,EACpB,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,8BAA8B,EAAE,eAAe,EAC/C;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;CACF"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { HttpTypes, SelectParams } from "@medusajs/types";
|
2
|
+
import { Client } from "../client";
|
3
|
+
import { ClientHeaders } from "../types";
|
4
|
+
export declare class Payment {
|
5
|
+
private client;
|
6
|
+
constructor(client: Client);
|
7
|
+
list(query?: HttpTypes.AdminPaymentFilters, headers?: ClientHeaders): Promise<HttpTypes.AdminPaymentsResponse>;
|
8
|
+
listPaymentProviders(query?: HttpTypes.AdminGetPaymentProvidersParams, headers?: ClientHeaders): Promise<HttpTypes.AdminPaymentProviderListResponse>;
|
9
|
+
retrieve(id: string, query?: HttpTypes.AdminPaymentFilters, headers?: ClientHeaders): Promise<HttpTypes.AdminPaymentResponse>;
|
10
|
+
capture(id: string, body: HttpTypes.AdminCapturePayment, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminPaymentResponse>;
|
11
|
+
refund(id: string, body: HttpTypes.AdminRefundPayment, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminPaymentResponse>;
|
12
|
+
}
|
13
|
+
//# sourceMappingURL=payment.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../src/admin/payment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,OAAO;IAClB,OAAO,CAAC,MAAM,CAAQ;gBACV,MAAM,EAAE,MAAM;IAIpB,IAAI,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,mBAAmB,EAAE,OAAO,CAAC,EAAE,aAAa;IAUnE,oBAAoB,CACxB,KAAK,CAAC,EAAE,SAAS,CAAC,8BAA8B,EAChD,OAAO,CAAC,EAAE,aAAa;IAWnB,QAAQ,CACZ,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,SAAS,CAAC,mBAAmB,EACrC,OAAO,CAAC,EAAE,aAAa;IAWnB,OAAO,CACX,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,mBAAmB,EACnC,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;IAanB,MAAM,CACV,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,kBAAkB,EAClC,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;CAY1B"}
|