@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,240 @@
|
|
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 Store {
|
11
|
+
constructor(client) {
|
12
|
+
this.region = {
|
13
|
+
list: (query, headers) => __awaiter(this, void 0, void 0, function* () {
|
14
|
+
return this.client.fetch(`/store/regions`, {
|
15
|
+
query,
|
16
|
+
headers,
|
17
|
+
});
|
18
|
+
}),
|
19
|
+
retrieve: (id, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
20
|
+
return this.client.fetch(`/store/regions/${id}`, {
|
21
|
+
query,
|
22
|
+
headers,
|
23
|
+
});
|
24
|
+
}),
|
25
|
+
};
|
26
|
+
this.collection = {
|
27
|
+
list: (query, headers) => __awaiter(this, void 0, void 0, function* () {
|
28
|
+
return this.client.fetch(`/store/collections`, {
|
29
|
+
query,
|
30
|
+
headers,
|
31
|
+
});
|
32
|
+
}),
|
33
|
+
retrieve: (id, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
34
|
+
return this.client.fetch(`/store/collections/${id}`, {
|
35
|
+
query,
|
36
|
+
headers,
|
37
|
+
});
|
38
|
+
}),
|
39
|
+
};
|
40
|
+
this.category = {
|
41
|
+
list: (query, headers) => __awaiter(this, void 0, void 0, function* () {
|
42
|
+
return this.client.fetch(`/store/product-categories`, {
|
43
|
+
query,
|
44
|
+
headers,
|
45
|
+
});
|
46
|
+
}),
|
47
|
+
retrieve: (id, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
48
|
+
return this.client.fetch(`/store/product-categories/${id}`, {
|
49
|
+
query,
|
50
|
+
headers,
|
51
|
+
});
|
52
|
+
}),
|
53
|
+
};
|
54
|
+
this.product = {
|
55
|
+
list: (query, headers) => __awaiter(this, void 0, void 0, function* () {
|
56
|
+
return this.client.fetch(`/store/products`, {
|
57
|
+
query,
|
58
|
+
headers,
|
59
|
+
});
|
60
|
+
}),
|
61
|
+
retrieve: (id, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
62
|
+
return this.client.fetch(`/store/products/${id}`, {
|
63
|
+
query,
|
64
|
+
headers,
|
65
|
+
});
|
66
|
+
}),
|
67
|
+
};
|
68
|
+
this.cart = {
|
69
|
+
create: (body, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
70
|
+
return this.client.fetch(`/store/carts`, {
|
71
|
+
method: "POST",
|
72
|
+
headers,
|
73
|
+
body,
|
74
|
+
query,
|
75
|
+
});
|
76
|
+
}),
|
77
|
+
update: (id, body, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
78
|
+
return this.client.fetch(`/store/carts/${id}`, {
|
79
|
+
method: "POST",
|
80
|
+
headers,
|
81
|
+
body,
|
82
|
+
query,
|
83
|
+
});
|
84
|
+
}),
|
85
|
+
retrieve: (id, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
86
|
+
return this.client.fetch(`/store/carts/${id}`, {
|
87
|
+
headers,
|
88
|
+
query,
|
89
|
+
});
|
90
|
+
}),
|
91
|
+
createLineItem: (cartId, body, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
92
|
+
return this.client.fetch(`/store/carts/${cartId}/line-items`, {
|
93
|
+
method: "POST",
|
94
|
+
headers,
|
95
|
+
body,
|
96
|
+
query,
|
97
|
+
});
|
98
|
+
}),
|
99
|
+
updateLineItem: (cartId, lineItemId, body, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
100
|
+
return this.client.fetch(`/store/carts/${cartId}/line-items/${lineItemId}`, {
|
101
|
+
method: "POST",
|
102
|
+
headers,
|
103
|
+
body,
|
104
|
+
query,
|
105
|
+
});
|
106
|
+
}),
|
107
|
+
deleteLineItem: (cartId, lineItemId, headers) => __awaiter(this, void 0, void 0, function* () {
|
108
|
+
return this.client.fetch(`/store/carts/${cartId}/line-items/${lineItemId}`, {
|
109
|
+
method: "DELETE",
|
110
|
+
headers,
|
111
|
+
});
|
112
|
+
}),
|
113
|
+
addShippingMethod: (cartId, body, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
114
|
+
return this.client.fetch(`/store/carts/${cartId}/shipping-methods`, {
|
115
|
+
method: "POST",
|
116
|
+
headers,
|
117
|
+
body,
|
118
|
+
query,
|
119
|
+
});
|
120
|
+
}),
|
121
|
+
complete: (cartId, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
122
|
+
return this.client.fetch(`/store/carts/${cartId}/complete`, {
|
123
|
+
method: "POST",
|
124
|
+
headers,
|
125
|
+
query,
|
126
|
+
});
|
127
|
+
}),
|
128
|
+
};
|
129
|
+
this.fulfillment = {
|
130
|
+
listCartOptions: (query, headers) => __awaiter(this, void 0, void 0, function* () {
|
131
|
+
return this.client.fetch(`/store/shipping-options`, {
|
132
|
+
headers,
|
133
|
+
query,
|
134
|
+
});
|
135
|
+
}),
|
136
|
+
};
|
137
|
+
this.payment = {
|
138
|
+
listPaymentProviders: (query, headers) => __awaiter(this, void 0, void 0, function* () {
|
139
|
+
return this.client.fetch(`/store/payment-providers`, {
|
140
|
+
headers,
|
141
|
+
query,
|
142
|
+
});
|
143
|
+
}),
|
144
|
+
initiatePaymentSession: (cart, body, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
145
|
+
var _a;
|
146
|
+
let paymentCollectionId = (_a = cart.payment_collection) === null || _a === void 0 ? void 0 : _a.id;
|
147
|
+
if (!paymentCollectionId) {
|
148
|
+
const collectionBody = {
|
149
|
+
cart_id: cart.id,
|
150
|
+
};
|
151
|
+
paymentCollectionId = (yield this.client.fetch(`/store/payment-collections`, {
|
152
|
+
method: "POST",
|
153
|
+
headers,
|
154
|
+
body: collectionBody,
|
155
|
+
})).payment_collection.id;
|
156
|
+
}
|
157
|
+
return this.client.fetch(`/store/payment-collections/${paymentCollectionId}/payment-sessions`, {
|
158
|
+
method: "POST",
|
159
|
+
headers,
|
160
|
+
body,
|
161
|
+
query,
|
162
|
+
});
|
163
|
+
}),
|
164
|
+
};
|
165
|
+
this.order = {
|
166
|
+
list: (query, headers) => __awaiter(this, void 0, void 0, function* () {
|
167
|
+
return this.client.fetch(`/store/orders`, {
|
168
|
+
query,
|
169
|
+
headers,
|
170
|
+
});
|
171
|
+
}),
|
172
|
+
retrieve: (id, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
173
|
+
return this.client.fetch(`/store/orders/${id}`, {
|
174
|
+
headers,
|
175
|
+
query,
|
176
|
+
});
|
177
|
+
}),
|
178
|
+
};
|
179
|
+
this.customer = {
|
180
|
+
create: (body, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
181
|
+
return this.client.fetch(`/store/customers`, {
|
182
|
+
method: "POST",
|
183
|
+
headers,
|
184
|
+
body,
|
185
|
+
query,
|
186
|
+
});
|
187
|
+
}),
|
188
|
+
update: (body, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
189
|
+
return this.client.fetch(`/store/customers/me`, {
|
190
|
+
method: "POST",
|
191
|
+
headers,
|
192
|
+
body,
|
193
|
+
query,
|
194
|
+
});
|
195
|
+
}),
|
196
|
+
retrieve: (query, headers) => __awaiter(this, void 0, void 0, function* () {
|
197
|
+
return this.client.fetch(`/store/customers/me`, {
|
198
|
+
query,
|
199
|
+
headers,
|
200
|
+
});
|
201
|
+
}),
|
202
|
+
createAddress: (body, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
203
|
+
return this.client.fetch(`/store/customers/me/addresses`, {
|
204
|
+
method: "POST",
|
205
|
+
headers,
|
206
|
+
body,
|
207
|
+
query,
|
208
|
+
});
|
209
|
+
}),
|
210
|
+
updateAddress: (addressId, body, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
211
|
+
return this.client.fetch(`/store/customers/me/addresses/${addressId}`, {
|
212
|
+
method: "POST",
|
213
|
+
headers,
|
214
|
+
body,
|
215
|
+
query,
|
216
|
+
});
|
217
|
+
}),
|
218
|
+
listAddress: (query, headers) => __awaiter(this, void 0, void 0, function* () {
|
219
|
+
return this.client.fetch(`/store/customers/me/addresses`, {
|
220
|
+
query,
|
221
|
+
headers,
|
222
|
+
});
|
223
|
+
}),
|
224
|
+
retrieveAddress: (addressId, query, headers) => __awaiter(this, void 0, void 0, function* () {
|
225
|
+
return this.client.fetch(`/store/customers/me/addresses/${addressId}`, {
|
226
|
+
query,
|
227
|
+
headers,
|
228
|
+
});
|
229
|
+
}),
|
230
|
+
deleteAddress: (addressId, headers) => __awaiter(this, void 0, void 0, function* () {
|
231
|
+
return this.client.fetch(`/store/customers/me/addresses/${addressId}`, {
|
232
|
+
method: "DELETE",
|
233
|
+
headers,
|
234
|
+
});
|
235
|
+
}),
|
236
|
+
};
|
237
|
+
this.client = client;
|
238
|
+
}
|
239
|
+
}
|
240
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/index.ts"],"names":[],"mappings":";;;;;;;;;AASA,MAAM,OAAO,KAAK;IAGhB,YAAY,MAAc;QAInB,WAAM,GAAG;YACd,IAAI,EAAE,CACJ,KAAiD,EACjD,OAAuB,EACvB,EAAE;gBACF,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAEtB,gBAAgB,EAAE;oBAClB,KAAK;oBACL,OAAO;iBACR,CAAC,CAAA;YACJ,CAAC,CAAA;YACD,QAAQ,EAAE,CACR,EAAU,EACV,KAAoB,EACpB,OAAuB,EACvB,EAAE;gBACF,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,kBAAkB,EAAE,EAAE,EACtB;oBACE,KAAK;oBACL,OAAO;iBACR,CACF,CAAA;YACH,CAAC,CAAA;SACF,CAAA;QAEM,eAAU,GAAG;YAClB,IAAI,EAAE,CACJ,KAAqD,EACrD,OAAuB,EACvB,EAAE;gBACF,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAEtB,oBAAoB,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S,EAAE,EAAE;oBAC9C,MAAM,EAAE,QAAQ;oBAChB,OAAO;iBACR,CAAC,CAAA;YACJ,CAAC,CAAA;SACF,CAAA;QA5aC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;CA4aF"}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
export type Logger = {
|
2
|
+
error: (...messages: string[]) => void;
|
3
|
+
warn: (...messages: string[]) => void;
|
4
|
+
info: (...messages: string[]) => void;
|
5
|
+
debug: (...messages: string[]) => void;
|
6
|
+
};
|
7
|
+
export type Config = {
|
8
|
+
baseUrl: string;
|
9
|
+
globalHeaders?: ClientHeaders;
|
10
|
+
publishableKey?: string;
|
11
|
+
apiKey?: string;
|
12
|
+
auth?: {
|
13
|
+
type?: "jwt" | "session";
|
14
|
+
jwtTokenStorageKey?: string;
|
15
|
+
jwtTokenStorageMethod?: "local" | "session" | "memory";
|
16
|
+
};
|
17
|
+
logger?: Logger;
|
18
|
+
debug?: boolean;
|
19
|
+
};
|
20
|
+
export type FetchParams = Parameters<typeof fetch>;
|
21
|
+
export type ClientHeaders = Record<string, string | null | {
|
22
|
+
tags: string[];
|
23
|
+
}>;
|
24
|
+
export type FetchInput = FetchParams[0];
|
25
|
+
export type FetchArgs = Omit<RequestInit, "headers" | "body"> & {
|
26
|
+
query?: Record<string, any>;
|
27
|
+
headers?: ClientHeaders;
|
28
|
+
body?: RequestInit["body"] | Record<string, any>;
|
29
|
+
};
|
30
|
+
export type ClientFetch = (input: FetchInput, init?: FetchArgs) => Promise<Response>;
|
31
|
+
export interface ServerSentEventMessage {
|
32
|
+
/** Ignored by the client. */
|
33
|
+
comment?: string;
|
34
|
+
/** A string identifying the type of event described. */
|
35
|
+
event?: string;
|
36
|
+
/** The data field for the message. Split by new lines. */
|
37
|
+
data?: string;
|
38
|
+
/** The event ID to set the {@linkcode EventSource} object's last event ID value. */
|
39
|
+
id?: string | number;
|
40
|
+
/** The reconnection time. */
|
41
|
+
retry?: number;
|
42
|
+
}
|
43
|
+
export interface FetchStreamResponse {
|
44
|
+
stream: AsyncGenerator<ServerSentEventMessage, void, unknown> | null;
|
45
|
+
abort: () => void;
|
46
|
+
}
|
47
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IACtC,IAAI,EAAE,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IACrC,IAAI,EAAE,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IACrC,KAAK,EAAE,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;CACvC,CAAA;AAED,MAAM,MAAM,MAAM,GAAG;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,KAAK,GAAG,SAAS,CAAA;QACxB,kBAAkB,CAAC,EAAE,MAAM,CAAA;QAC3B,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAA;KACvD,CAAA;IACD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAA;AAElD,MAAM,MAAM,aAAa,GAEvB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG;IAAE,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAAA;AAEpD,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,CAAA;AAEvC,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,MAAM,CAAC,GAAG;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CACjD,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,CACxB,KAAK,EAAE,UAAU,EACjB,IAAI,CAAC,EAAE,SAAS,KACb,OAAO,CAAC,QAAQ,CAAC,CAAA;AAGtB,MAAM,WAAW,sBAAsB;IACrC,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oFAAoF;IACpF,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,cAAc,CAAC,sBAAsB,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACpE,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
|
package/dist/index.js
CHANGED
@@ -1,15 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FetchError = void 0;
|
4
|
+
const admin_1 = require("./admin");
|
5
|
+
const auth_1 = require("./auth");
|
6
|
+
const client_1 = require("./client");
|
7
|
+
const store_1 = require("./store");
|
5
8
|
class Medusa {
|
6
9
|
constructor(config) {
|
7
|
-
this.client = new Client(config);
|
8
|
-
this.admin = new Admin(this.client);
|
9
|
-
this.store = new Store(this.client);
|
10
|
-
this.auth = new Auth(this.client, config);
|
10
|
+
this.client = new client_1.Client(config);
|
11
|
+
this.admin = new admin_1.Admin(this.client);
|
12
|
+
this.store = new store_1.Store(this.client);
|
13
|
+
this.auth = new auth_1.Auth(this.client, config);
|
11
14
|
}
|
12
15
|
}
|
13
|
-
|
14
|
-
|
16
|
+
exports.default = Medusa;
|
17
|
+
var client_2 = require("./client");
|
18
|
+
Object.defineProperty(exports, "FetchError", { enumerable: true, get: function () { return client_2.FetchError; } });
|
15
19
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAC/B,iCAA6B;AAC7B,qCAAiC;AACjC,mCAA+B;AAG/B,MAAM,MAAM;IAOV,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,CAAC,MAAM,CAAC,CAAA;QAEhC,IAAI,CAAC,KAAK,GAAG,IAAI,aAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnC,IAAI,CAAC,KAAK,GAAG,IAAI,aAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,WAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC3C,CAAC;CACF;AAED,kBAAe,MAAM,CAAA;AACrB,mCAAqC;AAA5B,oGAAA,UAAU,OAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.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,KAAK;IAChB,OAAO,CAAC,MAAM,CAAQ;gBAEV,MAAM,EAAE,MAAM;IAInB,MAAM;uBAED,UAAU,GAAG,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.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,KAAK;IAChB,OAAO,CAAC,MAAM,CAAQ;gBAEV,MAAM,EAAE,MAAM;IAInB,MAAM;uBAED,UAAU,GAAG,SAAS,CAAC,kBAAkB,YACvC,aAAa;qBAGQ,SAAS,CAAC,WAAW,EAAE;;uBAOlD,MAAM,UACF,YAAY,YACV,aAAa;oBAEY,SAAS,CAAC,WAAW;;MAQ3D;IAEM,UAAU;uBAEL,UAAU,GAAG,SAAS,CAAC,sBAAsB,YAC3C,aAAa;yBAGY,SAAS,CAAC,eAAe,EAAE;;uBAO1D,MAAM,UACF,YAAY,YACV,aAAa;wBAEgB,SAAS,CAAC,eAAe;;MAQnE;IAEM,QAAQ;uBAEH,SAAS,CAAC,0BAA0B,YAClC,aAAa;gCAIC,SAAS,CAAC,oBAAoB,EAAE;;uBAQpD,MAAM,UACF,YAAY,YACV,aAAa;8BAGH,SAAS,CAAC,oBAAoB;;MAMrD;IAEM,OAAO;uBAEF,SAAS,CAAC,kBAAkB,YAC1B,aAAa;uBAWnB,MAAM,UACF,YAAY,YACV,aAAa;MAU1B;IAEM,IAAI;uBAED,SAAS,CAA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;mBAEW,SAAS,CAAC,UAAU;;MAQzD;IAEM,QAAQ;uBAEL,SAAS,CAAC,mBAAmB,UAC3B,YAAY,YACV,aAAa;sBAGX,SAAS,CAAC,aAAa;;uBAS7B,SAAS,CAAC,mBAAmB,UAC3B,YAAY,YACV,aAAa;sBAEc,SAAS,CAAC,aAAa;;2BAUrC,YAAY,YAAY,aAAa;sBACvB,SAAS,CAAC,aAAa;;8BAStD,SAAS,CAAC,0BAA0B,UAClC,YAAY,YACV,aAAa;sBAGX,SAAS,CAAC,aAAa;;mCASxB,MAAM,QACX,SAAS,CAAC,0BAA0B,UAClC,YAAY,YACV,aAAa;sBAEc,SAAS,CAAC,aAAa;;8BAWpD,UAAU,GAAG,SAAS,CAAC,2BAA2B,YAChD,aAAa;uBAGU,SAAS,CAAC,oBAAoB,EAAE;;qCAOtD,MAAM,UACT,YAAY,YACV,aAAa;qBAEa,SAAS,CAAC,oBAAoB;;mCAQnC,MAAM,YAAY,aAAa;MAQjE;CACF"}
|
package/dist/store/index.js
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Store = void 0;
|
4
|
+
class Store {
|
2
5
|
constructor(client) {
|
3
6
|
this.region = {
|
4
7
|
list: async (query, headers) => {
|
@@ -227,4 +230,5 @@ export class Store {
|
|
227
230
|
this.client = client;
|
228
231
|
}
|
229
232
|
}
|
233
|
+
exports.Store = Store;
|
230
234
|
//# sourceMappingURL=index.js.map
|
package/dist/store/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AASA,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":";;;AASA,MAAa,KAAK;IAGhB,YAAY,MAAc;QAInB,WAAM,GAAG;YACd,IAAI,EAAE,KAAK,EACT,KAAiD,EAC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K,EAChB,KAA0D,EAC1D,OAAuB,EACvB,EAAE;gBACF,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAEtB,+BAA+B,EAAE;oBACjC,KAAK;oBACL,OAAO;iBACR,CAAC,CAAA;YACJ,CAAC;YACD,eAAe,EAAE,KAAK,EACpB,SAAiB,EACjB,KAAoB,EACpB,OAAuB,EACvB,EAAE;gBACF,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,iCAAiC,SAAS,EAAE,EAC5C;oBACE,KAAK;oBACL,OAAO;iBACR,CACF,CAAA;YACH,CAAC;YACD,aAAa,EAAE,KAAK,EAAE,SAAiB,EAAE,OAAuB,EAAE,EAAE;gBAClE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAEtB,iCAAiC,SAAS,EAAE,EAAE;oBAC9C,MAAM,EAAE,QAAQ;oBAChB,OAAO;iBACR,CAAC,CAAA;YACJ,CAAC;SACF,CAAA;QA5aC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;CA4aF;AAjbD,sBAibC"}
|
package/dist/types.js
CHANGED
package/package.json
CHANGED
@@ -1,38 +1,46 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/js-sdk",
|
3
|
-
"version": "0.0.2-snapshot-
|
3
|
+
"version": "0.0.2-snapshot-20240926160837",
|
4
4
|
"description": "SDK for the Medusa API",
|
5
5
|
"main": "dist/index.js",
|
6
|
+
"module": "dist/esm/index.js",
|
7
|
+
"types": "dist/index.d.ts",
|
8
|
+
"exports": {
|
9
|
+
"import": "./dist/esm/index.js",
|
10
|
+
"require": "./dist/index.js"
|
11
|
+
},
|
6
12
|
"repository": {
|
7
13
|
"type": "git",
|
8
14
|
"url": "https://github.com/medusajs/medusa",
|
9
15
|
"directory": "packages/core/js-sdk"
|
10
16
|
},
|
11
17
|
"engines": {
|
12
|
-
"node": ">=
|
18
|
+
"node": ">=20"
|
13
19
|
},
|
14
20
|
"publishConfig": {
|
15
21
|
"access": "public"
|
16
22
|
},
|
17
23
|
"files": [
|
18
|
-
"dist"
|
24
|
+
"dist",
|
25
|
+
"!dist/**/__tests__",
|
26
|
+
"!dist/**/__mocks__",
|
27
|
+
"!dist/**/__fixtures__"
|
19
28
|
],
|
20
29
|
"author": "Medusa",
|
21
30
|
"license": "MIT",
|
22
31
|
"devDependencies": {
|
23
|
-
"@medusajs/types": "1.12.0-snapshot-20240925111619",
|
24
|
-
"cross-env": "^5.2.1",
|
25
32
|
"jest": "^29.7.0",
|
26
33
|
"msw": "^2.3.0",
|
27
34
|
"rimraf": "^5.0.1",
|
28
|
-
"typescript": "^5.
|
35
|
+
"typescript": "^5.6.2"
|
29
36
|
},
|
30
37
|
"dependencies": {
|
38
|
+
"@medusajs/types": "1.12.0-snapshot-20240926160837",
|
31
39
|
"fetch-event-stream": "^0.1.5",
|
32
40
|
"qs": "^6.12.1"
|
33
41
|
},
|
34
42
|
"scripts": {
|
35
|
-
"build": "rimraf dist && tsc
|
43
|
+
"build": "rimraf dist && tsc -p tsconfig.json && tsc -p tsconfig.esm.json",
|
36
44
|
"test": "jest --passWithNoTests --runInBand --bail --forceExit",
|
37
45
|
"watch": "tsc --build --watch"
|
38
46
|
}
|