@medusajs/js-sdk 0.0.2-snapshot-20240925105124 → 0.0.2-snapshot-20240926160837
Sign up to get free protection for your applications and to get access to all the features.
- 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/package.json +7 -4
@@ -0,0 +1,15 @@
|
|
1
|
+
import { HttpTypes } from "@medusajs/types";
|
2
|
+
import { Client } from "../client";
|
3
|
+
import { ClientHeaders } from "../types";
|
4
|
+
export declare class ApiKey {
|
5
|
+
private client;
|
6
|
+
constructor(client: Client);
|
7
|
+
list(queryParams?: HttpTypes.AdminGetApiKeysParams, headers?: ClientHeaders): Promise<HttpTypes.PaginatedResponse<HttpTypes.AdminApiKeyListResponse>>;
|
8
|
+
create(body: HttpTypes.AdminCreateApiKey, query?: HttpTypes.AdminGetApiKeysParams, headers?: ClientHeaders): Promise<HttpTypes.AdminApiKeyResponse>;
|
9
|
+
revoke(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminApiKeyResponse>;
|
10
|
+
retrieve(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminApiKeyResponse>;
|
11
|
+
update(id: string, body: HttpTypes.AdminUpdateApiKey, query?: HttpTypes.AdminGetApiKeysParams, headers?: ClientHeaders): Promise<HttpTypes.AdminApiKeyResponse>;
|
12
|
+
delete(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminApiKeyDeleteResponse>;
|
13
|
+
batchSalesChannels(id: string, body: HttpTypes.AdminBatchLink, headers?: ClientHeaders): Promise<HttpTypes.AdminApiKeyResponse>;
|
14
|
+
}
|
15
|
+
//# sourceMappingURL=api-key.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"api-key.d.ts","sourceRoot":"","sources":["../../../src/admin/api-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,iBAAiB,CAAA;AAC9D,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,IAAI,CACR,WAAW,CAAC,EAAE,SAAS,CAAC,qBAAqB,EAC7C,OAAO,CAAC,EAAE,aAAa;IAUnB,MAAM,CACV,IAAI,EAAE,SAAS,CAAC,iBAAiB,EACjC,KAAK,CAAC,EAAE,SAAS,CAAC,qBAAqB,EACvC,OAAO,CAAC,EAAE,aAAa;IAanB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;IAU1C,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;IAS5C,MAAM,CACV,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,iBAAiB,EACjC,KAAK,CAAC,EAAE,SAAS,CAAC,qBAAqB,EACvC,OAAO,CAAC,EAAE,aAAa;IAanB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;IAU1C,kBAAkB,CACtB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,cAAc,EAC9B,OAAO,CAAC,EAAE,aAAa;CAW1B"}
|
@@ -0,0 +1,75 @@
|
|
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 ApiKey {
|
11
|
+
constructor(client) {
|
12
|
+
this.client = client;
|
13
|
+
}
|
14
|
+
list(queryParams, headers) {
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
16
|
+
return yield this.client.fetch(`/admin/api-keys`, {
|
17
|
+
query: queryParams,
|
18
|
+
headers,
|
19
|
+
});
|
20
|
+
});
|
21
|
+
}
|
22
|
+
create(body, query, headers) {
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
24
|
+
return yield this.client.fetch(`/admin/api-keys`, {
|
25
|
+
method: "POST",
|
26
|
+
headers,
|
27
|
+
body,
|
28
|
+
query,
|
29
|
+
});
|
30
|
+
});
|
31
|
+
}
|
32
|
+
revoke(id, headers) {
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
34
|
+
return yield this.client.fetch(`/admin/api-keys/${id}/revoke`, {
|
35
|
+
method: "POST",
|
36
|
+
headers,
|
37
|
+
});
|
38
|
+
});
|
39
|
+
}
|
40
|
+
retrieve(id, headers) {
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
42
|
+
return yield this.client.fetch(`/admin/api-keys/${id}`, {
|
43
|
+
headers,
|
44
|
+
});
|
45
|
+
});
|
46
|
+
}
|
47
|
+
update(id, body, query, headers) {
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
49
|
+
return yield this.client.fetch(`/admin/api-keys/${id}`, {
|
50
|
+
method: "POST",
|
51
|
+
headers,
|
52
|
+
body,
|
53
|
+
query,
|
54
|
+
});
|
55
|
+
});
|
56
|
+
}
|
57
|
+
delete(id, headers) {
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
59
|
+
return yield this.client.fetch(`/admin/api-keys/${id}`, {
|
60
|
+
method: "DELETE",
|
61
|
+
headers,
|
62
|
+
});
|
63
|
+
});
|
64
|
+
}
|
65
|
+
batchSalesChannels(id, body, headers) {
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
67
|
+
return yield this.client.fetch(`/admin/api-keys/${id}/sales-channels`, {
|
68
|
+
method: "POST",
|
69
|
+
headers,
|
70
|
+
body,
|
71
|
+
});
|
72
|
+
});
|
73
|
+
}
|
74
|
+
}
|
75
|
+
//# sourceMappingURL=api-key.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"api-key.js","sourceRoot":"","sources":["../../../src/admin/api-key.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,OAAO,MAAM;IAEjB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEK,IAAI,CACR,WAA6C,EAC7C,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAE5B,iBAAiB,EAAE;gBACnB,KAAK,EAAE,WAAW;gBAClB,OAAO;aACR,CAAC,CAAA;QACJ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C;KAAA;CACF"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { HttpTypes } from "@medusajs/types";
|
2
|
+
import { Client } from "../client";
|
3
|
+
import { ClientHeaders } from "../types";
|
4
|
+
export declare class Campaign {
|
5
|
+
private client;
|
6
|
+
constructor(client: Client);
|
7
|
+
retrieve(id: string, query?: HttpTypes.AdminGetCampaignParams, headers?: ClientHeaders): Promise<HttpTypes.AdminCampaignResponse>;
|
8
|
+
list(query?: HttpTypes.AdminGetCampaignsParams, headers?: ClientHeaders): Promise<HttpTypes.AdminCampaignListResponse>;
|
9
|
+
create(payload: HttpTypes.AdminCreateCampaign, headers?: ClientHeaders): Promise<HttpTypes.AdminCampaignResponse>;
|
10
|
+
update(id: string, payload: HttpTypes.AdminUpdateCampaign, headers?: ClientHeaders): Promise<HttpTypes.AdminCampaignResponse>;
|
11
|
+
delete(id: string, headers?: ClientHeaders): Promise<HttpTypes.DeleteResponse<"campaign">>;
|
12
|
+
batchPromotions(id: string, payload: HttpTypes.AdminBatchLink, headers?: ClientHeaders): Promise<HttpTypes.AdminCampaignResponse>;
|
13
|
+
}
|
14
|
+
//# sourceMappingURL=campaign.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"campaign.d.ts","sourceRoot":"","sources":["../../../src/admin/campaign.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,QAAQ;IACnB,OAAO,CAAC,MAAM,CAAQ;gBACV,MAAM,EAAE,MAAM;IAIpB,QAAQ,CACZ,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,SAAS,CAAC,sBAAsB,EACxC,OAAO,CAAC,EAAE,aAAa;IAWnB,IAAI,CACR,KAAK,CAAC,EAAE,SAAS,CAAC,uBAAuB,EACzC,OAAO,CAAC,EAAE,aAAa;IAWnB,MAAM,CACV,OAAO,EAAE,SAAS,CAAC,mBAAmB,EACtC,OAAO,CAAC,EAAE,aAAa;IAYnB,MAAM,CACV,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,SAAS,CAAC,mBAAmB,EACtC,OAAO,CAAC,EAAE,aAAa;IAYnB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;IAU1C,eAAe,CACnB,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,SAAS,CAAC,cAAc,EACjC,OAAO,CAAC,EAAE,aAAa;CAW1B"}
|
@@ -0,0 +1,66 @@
|
|
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 Campaign {
|
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/campaigns/${id}`, {
|
17
|
+
headers,
|
18
|
+
query,
|
19
|
+
});
|
20
|
+
});
|
21
|
+
}
|
22
|
+
list(query, headers) {
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
24
|
+
return yield this.client.fetch(`/admin/campaigns`, {
|
25
|
+
headers,
|
26
|
+
query,
|
27
|
+
});
|
28
|
+
});
|
29
|
+
}
|
30
|
+
create(payload, headers) {
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
32
|
+
return yield this.client.fetch(`/admin/campaigns`, {
|
33
|
+
method: "POST",
|
34
|
+
headers,
|
35
|
+
body: payload,
|
36
|
+
});
|
37
|
+
});
|
38
|
+
}
|
39
|
+
update(id, payload, headers) {
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
41
|
+
return yield this.client.fetch(`/admin/campaigns/${id}`, {
|
42
|
+
method: "POST",
|
43
|
+
headers,
|
44
|
+
body: payload,
|
45
|
+
});
|
46
|
+
});
|
47
|
+
}
|
48
|
+
delete(id, headers) {
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
50
|
+
return yield this.client.fetch(`/admin/campaigns/${id}`, {
|
51
|
+
method: "DELETE",
|
52
|
+
headers,
|
53
|
+
});
|
54
|
+
});
|
55
|
+
}
|
56
|
+
batchPromotions(id, payload, headers) {
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
58
|
+
return yield this.client.fetch(`/admin/campaigns/${id}/promotions`, {
|
59
|
+
method: "POST",
|
60
|
+
headers,
|
61
|
+
body: payload,
|
62
|
+
});
|
63
|
+
});
|
64
|
+
}
|
65
|
+
}
|
66
|
+
//# sourceMappingURL=campaign.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"campaign.js","sourceRoot":"","sources":["../../../src/admin/campaign.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,OAAO,QAAQ;IAEnB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEK,QAAQ,CACZ,EAAU,EACV,KAAwC,EACxC,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,oBAAoB,EAAE,EAAE,EACxB;gBACE,OAAO;gBACP,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,IAAI,CACR,KAAyC,EACzC,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,kBAAkB,EAClB;gBACE,OAAO;gBACP,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,MAAM,CACV,OAAsC,EACtC,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,kBAAkB,EAClB;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI,EAAE,OAAO;aACd,CACF,CAAA;QACH,CAAC;KAAA;IAEK,MAAM,CACV,EAAU,EACV,OAAsC,EACtC,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,oBAAoB,EAAE,EAAE,EACxB;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI,EAAE,OAAO;aACd,CACF,CAAA;QACH,CAAC;KAAA;IAEK,MAAM,CAAC,EAAU,EAAE,OAAuB;;YAC9C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,oBAAoB,EAAE,EAAE,EACxB;gBACE,MAAM,EAAE,QAAQ;gBAChB,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAEK,eAAe,CACnB,EAAU,EACV,OAAiC,EACjC,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,oBAAoB,EAAE,aAAa,EACnC;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI,EAAE,OAAO;aACd,CACF,CAAA;QACH,CAAC;KAAA;CACF"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { HttpTypes } from "@medusajs/types";
|
2
|
+
import { Client } from "../client";
|
3
|
+
import { ClientHeaders } from "../types";
|
4
|
+
export declare class Claim {
|
5
|
+
private client;
|
6
|
+
constructor(client: Client);
|
7
|
+
list(query?: HttpTypes.AdminClaimListParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimListResponse>;
|
8
|
+
retrieve(id: string, query?: HttpTypes.AdminClaimParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
9
|
+
create(body: HttpTypes.AdminCreateClaim, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
10
|
+
cancel(id: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
11
|
+
delete(id: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimDeleteResponse>;
|
12
|
+
addItems(id: string, body: HttpTypes.AdminAddClaimItems, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
13
|
+
updateItem(id: string, actionId: string, body: HttpTypes.AdminUpdateClaimItem, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
14
|
+
removeItem(id: string, actionId: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminReturnResponse>;
|
15
|
+
addInboundItems(id: string, body: HttpTypes.AdminAddClaimInboundItems, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
16
|
+
updateInboundItem(id: string, actionId: string, body: HttpTypes.AdminUpdateClaimInboundItem, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
17
|
+
removeInboundItem(id: string, actionId: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
18
|
+
addInboundShipping(id: string, body: HttpTypes.AdminClaimAddInboundShipping, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
19
|
+
updateInboundShipping(id: string, actionId: string, body: HttpTypes.AdminClaimUpdateInboundShipping, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
20
|
+
deleteInboundShipping(id: string, actionId: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
21
|
+
addOutboundItems(id: string, body: HttpTypes.AdminAddClaimOutboundItems, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
22
|
+
updateOutboundItem(id: string, actionId: string, body: HttpTypes.AdminUpdateClaimOutboundItem, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
23
|
+
removeOutboundItem(id: string, actionId: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
24
|
+
addOutboundShipping(id: string, body: HttpTypes.AdminClaimAddOutboundShipping, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
25
|
+
updateOutboundShipping(id: string, actionId: string, body: HttpTypes.AdminClaimUpdateOutboundShipping, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
26
|
+
deleteOutboundShipping(id: string, actionId: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
27
|
+
request(id: string, body: HttpTypes.AdminRequestClaim, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
28
|
+
cancelRequest(id: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
29
|
+
}
|
30
|
+
//# sourceMappingURL=claim.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"claim.d.ts","sourceRoot":"","sources":["../../../src/admin/claim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,KAAK;IAChB,OAAO,CAAC,MAAM,CAAQ;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CAAC,6BAA6B,EAC7C,KAAK,CAAC,EAAE,SAAS,CAAC,YAAY,EAC9B,OAAO,CAAC,EAAE,aAAa;IAanB,sBAAsB,CAC1B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,SAAS,CAAC,gCAAgC,EAChD,KAAK,CAAC,EAAE,SAAS,CAAC,YAAY,EAC9B,OAAO,CAAC,EAAE,aAAa;IAanB,sBAAsB,CAC1B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE,SAAS,CAAC,YAAY,EAC9B,OAAO,CAAC,EAAE,aAAa;IAYnB,OAAO,CACX,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,iBAAiB,EACjC,KAAK,CAAC,EAAE,SAAS,CAAC,YAAY,EAC9B,OAAO,CAAC,EAAE,aAAa;IAanB,aAAa,CACjB,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,SAAS,CAAC,YAAY,EAC9B,OAAO,CAAC,EAAE,aAAa;CAW1B"}
|
@@ -0,0 +1,223 @@
|
|
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 Claim {
|
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/claims`, {
|
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/claims/${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/claims`, {
|
33
|
+
method: "POST",
|
34
|
+
headers,
|
35
|
+
body,
|
36
|
+
query,
|
37
|
+
});
|
38
|
+
});
|
39
|
+
}
|
40
|
+
cancel(id, query, headers) {
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
42
|
+
return yield this.client.fetch(`/admin/claims/${id}/cancel`, {
|
43
|
+
method: "POST",
|
44
|
+
headers,
|
45
|
+
query,
|
46
|
+
});
|
47
|
+
});
|
48
|
+
}
|
49
|
+
delete(id, query, headers) {
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
51
|
+
return yield this.client.fetch(`/admin/claims/${id}`, {
|
52
|
+
method: "DELETE",
|
53
|
+
headers,
|
54
|
+
query,
|
55
|
+
});
|
56
|
+
});
|
57
|
+
}
|
58
|
+
addItems(id, body, query, headers) {
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
60
|
+
return yield this.client.fetch(`/admin/claims/${id}/claim-items`, {
|
61
|
+
method: "POST",
|
62
|
+
headers,
|
63
|
+
body,
|
64
|
+
query,
|
65
|
+
});
|
66
|
+
});
|
67
|
+
}
|
68
|
+
updateItem(id, actionId, body, query, headers) {
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
70
|
+
return yield this.client.fetch(`/admin/claims/${id}/claim-items/${actionId}`, {
|
71
|
+
method: "POST",
|
72
|
+
headers,
|
73
|
+
body,
|
74
|
+
query,
|
75
|
+
});
|
76
|
+
});
|
77
|
+
}
|
78
|
+
removeItem(id, actionId, query, headers) {
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
80
|
+
return yield this.client.fetch(`/admin/claims/${id}/claim-items/${actionId}`, {
|
81
|
+
method: "DELETE",
|
82
|
+
headers,
|
83
|
+
query,
|
84
|
+
});
|
85
|
+
});
|
86
|
+
}
|
87
|
+
addInboundItems(id, body, query, headers) {
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
89
|
+
return yield this.client.fetch(`/admin/claims/${id}/inbound/items`, {
|
90
|
+
method: "POST",
|
91
|
+
headers,
|
92
|
+
body,
|
93
|
+
query,
|
94
|
+
});
|
95
|
+
});
|
96
|
+
}
|
97
|
+
updateInboundItem(id, actionId, body, query, headers) {
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
99
|
+
return yield this.client.fetch(`/admin/claims/${id}/inbound/items/${actionId}`, {
|
100
|
+
method: "POST",
|
101
|
+
headers,
|
102
|
+
body,
|
103
|
+
query,
|
104
|
+
});
|
105
|
+
});
|
106
|
+
}
|
107
|
+
removeInboundItem(id, actionId, query, headers) {
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
109
|
+
return yield this.client.fetch(`/admin/claims/${id}/inbound/items/${actionId}`, {
|
110
|
+
method: "DELETE",
|
111
|
+
headers,
|
112
|
+
query,
|
113
|
+
});
|
114
|
+
});
|
115
|
+
}
|
116
|
+
addInboundShipping(id, body, query, headers) {
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
118
|
+
return yield this.client.fetch(`/admin/claims/${id}/inbound/shipping-method`, {
|
119
|
+
method: "POST",
|
120
|
+
headers,
|
121
|
+
body,
|
122
|
+
query,
|
123
|
+
});
|
124
|
+
});
|
125
|
+
}
|
126
|
+
updateInboundShipping(id, actionId, body, query, headers) {
|
127
|
+
return __awaiter(this, void 0, void 0, function* () {
|
128
|
+
return yield this.client.fetch(`/admin/claims/${id}/inbound/shipping-method/${actionId}`, {
|
129
|
+
method: "POST",
|
130
|
+
headers,
|
131
|
+
body,
|
132
|
+
query,
|
133
|
+
});
|
134
|
+
});
|
135
|
+
}
|
136
|
+
deleteInboundShipping(id, actionId, query, headers) {
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
138
|
+
return yield this.client.fetch(`/admin/claims/${id}/inbound/shipping-method/${actionId}`, {
|
139
|
+
method: "DELETE",
|
140
|
+
headers,
|
141
|
+
query,
|
142
|
+
});
|
143
|
+
});
|
144
|
+
}
|
145
|
+
addOutboundItems(id, body, query, headers) {
|
146
|
+
return __awaiter(this, void 0, void 0, function* () {
|
147
|
+
return yield this.client.fetch(`/admin/claims/${id}/outbound/items`, {
|
148
|
+
method: "POST",
|
149
|
+
headers,
|
150
|
+
body,
|
151
|
+
query,
|
152
|
+
});
|
153
|
+
});
|
154
|
+
}
|
155
|
+
updateOutboundItem(id, actionId, body, query, headers) {
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
157
|
+
return yield this.client.fetch(`/admin/claims/${id}/outbound/items/${actionId}`, {
|
158
|
+
method: "POST",
|
159
|
+
headers,
|
160
|
+
body,
|
161
|
+
query,
|
162
|
+
});
|
163
|
+
});
|
164
|
+
}
|
165
|
+
removeOutboundItem(id, actionId, query, headers) {
|
166
|
+
return __awaiter(this, void 0, void 0, function* () {
|
167
|
+
return yield this.client.fetch(`/admin/claims/${id}/outbound/items/${actionId}`, {
|
168
|
+
method: "DELETE",
|
169
|
+
headers,
|
170
|
+
query,
|
171
|
+
});
|
172
|
+
});
|
173
|
+
}
|
174
|
+
addOutboundShipping(id, body, query, headers) {
|
175
|
+
return __awaiter(this, void 0, void 0, function* () {
|
176
|
+
return yield this.client.fetch(`/admin/claims/${id}/outbound/shipping-method`, {
|
177
|
+
method: "POST",
|
178
|
+
headers,
|
179
|
+
body,
|
180
|
+
query,
|
181
|
+
});
|
182
|
+
});
|
183
|
+
}
|
184
|
+
updateOutboundShipping(id, actionId, body, query, headers) {
|
185
|
+
return __awaiter(this, void 0, void 0, function* () {
|
186
|
+
return yield this.client.fetch(`/admin/claims/${id}/outbound/shipping-method/${actionId}`, {
|
187
|
+
method: "POST",
|
188
|
+
headers,
|
189
|
+
body,
|
190
|
+
query,
|
191
|
+
});
|
192
|
+
});
|
193
|
+
}
|
194
|
+
deleteOutboundShipping(id, actionId, query, headers) {
|
195
|
+
return __awaiter(this, void 0, void 0, function* () {
|
196
|
+
return yield this.client.fetch(`/admin/claims/${id}/outbound/shipping-method/${actionId}`, {
|
197
|
+
method: "DELETE",
|
198
|
+
headers,
|
199
|
+
query,
|
200
|
+
});
|
201
|
+
});
|
202
|
+
}
|
203
|
+
request(id, body, query, headers) {
|
204
|
+
return __awaiter(this, void 0, void 0, function* () {
|
205
|
+
return yield this.client.fetch(`/admin/claims/${id}/request`, {
|
206
|
+
method: "POST",
|
207
|
+
headers,
|
208
|
+
body,
|
209
|
+
query,
|
210
|
+
});
|
211
|
+
});
|
212
|
+
}
|
213
|
+
cancelRequest(id, query, headers) {
|
214
|
+
return __awaiter(this, void 0, void 0, function* () {
|
215
|
+
return yield this.client.fetch(`/admin/claims/${id}/request`, {
|
216
|
+
method: "DELETE",
|
217
|
+
headers,
|
218
|
+
query,
|
219
|
+
});
|
220
|
+
});
|
221
|
+
}
|
222
|
+
}
|
223
|
+
//# sourceMappingURL=claim.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"claim.js","sourceRoot":"","sources":["../../../src/admin/claim.ts"],"names":[],"mappings":";;;;;;;;;AAKA,MAAM,OAAO,KAAK;IAEhB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEK,IAAI,CAAC,KAAsC,EAAE,OAAuB;;YACxE,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,eAAe,EACf;gBACE,KAAK;gBACL,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAEK,QAAQ,CACZ,EAAU,EACV,KAAkC,EAClC,OAAuB;;YAEvB,OAAO,MAAM,I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IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,iBAAiB,EAAE,UAAU,EAC7B;gBACE,MAAM,EAAE,QAAQ;gBAChB,OAAO;gBACP,KAAK;aACN,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 Currency {
|
5
|
+
private client;
|
6
|
+
constructor(client: Client);
|
7
|
+
list(query?: HttpTypes.AdminCurrencyListParams, headers?: ClientHeaders): Promise<HttpTypes.AdminCurrencyListResponse>;
|
8
|
+
retrieve(id: string, query?: HttpTypes.AdminCurrencyParams, headers?: ClientHeaders): Promise<HttpTypes.AdminCurrencyResponse>;
|
9
|
+
}
|
10
|
+
//# sourceMappingURL=currency.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"currency.d.ts","sourceRoot":"","sources":["../../../src/admin/currency.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,QAAQ;IACnB,OAAO,CAAC,MAAM,CAAQ;gBACV,MAAM,EAAE,MAAM;IAIpB,IAAI,CACR,KAAK,CAAC,EAAE,SAAS,CAAC,uBAAuB,EACzC,OAAO,CAAC,EAAE,aAAa;IAWnB,QAAQ,CACZ,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,SAAS,CAAC,mBAAmB,EACrC,OAAO,CAAC,EAAE,aAAa;CAU1B"}
|
@@ -0,0 +1,31 @@
|
|
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 Currency {
|
11
|
+
constructor(client) {
|
12
|
+
this.client = client;
|
13
|
+
}
|
14
|
+
list(query, headers) {
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
16
|
+
return this.client.fetch(`/admin/currencies`, {
|
17
|
+
headers,
|
18
|
+
query,
|
19
|
+
});
|
20
|
+
});
|
21
|
+
}
|
22
|
+
retrieve(id, query, headers) {
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
24
|
+
return this.client.fetch(`/admin/currencies/${id}`, {
|
25
|
+
headers,
|
26
|
+
query,
|
27
|
+
});
|
28
|
+
});
|
29
|
+
}
|
30
|
+
}
|
31
|
+
//# sourceMappingURL=currency.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"currency.js","sourceRoot":"","sources":["../../../src/admin/currency.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,OAAO,QAAQ;IAEnB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEK,IAAI,CACR,KAAyC,EACzC,OAAuB;;YAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,mBAAmB,EACnB;gBACE,OAAO;gBACP,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,QAAQ,CACZ,EAAU,EACV,KAAqC,EACrC,OAAuB;;YAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,qBAAqB,EAAE,EAAE,EACzB;gBACE,OAAO;gBACP,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;CACF"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { HttpTypes } from "@medusajs/types";
|
2
|
+
import { Client } from "../client";
|
3
|
+
import { ClientHeaders } from "../types";
|
4
|
+
export declare class CustomerGroup {
|
5
|
+
private client;
|
6
|
+
constructor(client: Client);
|
7
|
+
retrieve(id: string, query?: HttpTypes.AdminGetCustomerGroupParams, headers?: ClientHeaders): Promise<HttpTypes.AdminCustomerGroupResponse>;
|
8
|
+
list(query?: HttpTypes.AdminGetCustomerGroupsParams, headers?: ClientHeaders): Promise<HttpTypes.AdminCustomerGroupListResponse>;
|
9
|
+
create(body: HttpTypes.AdminCreateCustomerGroup, query?: HttpTypes.AdminGetCustomerGroupsParams, headers?: ClientHeaders): Promise<HttpTypes.AdminCustomerGroupResponse>;
|
10
|
+
update(id: string, body: HttpTypes.AdminUpdateCustomerGroup, query?: HttpTypes.AdminGetCustomerGroupsParams, headers?: ClientHeaders): Promise<HttpTypes.AdminCustomerGroupResponse>;
|
11
|
+
delete(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminCustomerGroupDeleteResponse>;
|
12
|
+
batchCustomers(id: string, body: HttpTypes.AdminBatchLink, headers?: ClientHeaders): Promise<HttpTypes.AdminCustomerGroupResponse>;
|
13
|
+
}
|
14
|
+
//# sourceMappingURL=customer-group.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"customer-group.d.ts","sourceRoot":"","sources":["../../../src/admin/customer-group.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,aAAa;IACxB,OAAO,CAAC,MAAM,CAAQ;gBACV,MAAM,EAAE,MAAM;IAIpB,QAAQ,CACZ,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,SAAS,CAAC,2BAA2B,EAC7C,OAAO,CAAC,EAAE,aAAa;IAYnB,IAAI,CACR,KAAK,CAAC,EAAE,SAAS,CAAC,4BAA4B,EAC9C,OAAO,CAAC,EAAE,aAAa;IAYnB,MAAM,CACV,IAAI,EAAE,SAAS,CAAC,wBAAwB,EACxC,KAAK,CAAC,EAAE,SAAS,CAAC,4BAA4B,EAC9C,OAAO,CAAC,EAAE,aAAa;IAanB,MAAM,CACV,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,wBAAwB,EACxC,KAAK,CAAC,EAAE,SAAS,CAAC,4BAA4B,EAC9C,OAAO,CAAC,EAAE,aAAa;IAanB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;IAU1C,cAAc,CAClB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,cAAc,EAC9B,OAAO,CAAC,EAAE,aAAa;CAW1B"}
|
@@ -0,0 +1,70 @@
|
|
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 CustomerGroup {
|
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/customer-groups/${id}`, {
|
17
|
+
method: "GET",
|
18
|
+
query,
|
19
|
+
headers,
|
20
|
+
});
|
21
|
+
});
|
22
|
+
}
|
23
|
+
list(query, headers) {
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
25
|
+
return yield this.client.fetch(`/admin/customer-groups`, {
|
26
|
+
method: "GET",
|
27
|
+
headers,
|
28
|
+
query,
|
29
|
+
});
|
30
|
+
});
|
31
|
+
}
|
32
|
+
create(body, query, headers) {
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
34
|
+
return yield this.client.fetch(`/admin/customer-groups`, {
|
35
|
+
method: "POST",
|
36
|
+
headers,
|
37
|
+
body,
|
38
|
+
query,
|
39
|
+
});
|
40
|
+
});
|
41
|
+
}
|
42
|
+
update(id, body, query, headers) {
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
44
|
+
return yield this.client.fetch(`/admin/customer-groups/${id}`, {
|
45
|
+
method: "POST",
|
46
|
+
headers,
|
47
|
+
body,
|
48
|
+
query,
|
49
|
+
});
|
50
|
+
});
|
51
|
+
}
|
52
|
+
delete(id, headers) {
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
54
|
+
return yield this.client.fetch(`/admin/customer-groups/${id}`, {
|
55
|
+
method: "DELETE",
|
56
|
+
headers,
|
57
|
+
});
|
58
|
+
});
|
59
|
+
}
|
60
|
+
batchCustomers(id, body, headers) {
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
62
|
+
return yield this.client.fetch(`/admin/customer-groups/${id}/customers`, {
|
63
|
+
method: "POST",
|
64
|
+
headers,
|
65
|
+
body,
|
66
|
+
});
|
67
|
+
});
|
68
|
+
}
|
69
|
+
}
|
70
|
+
//# sourceMappingURL=customer-group.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"customer-group.js","sourceRoot":"","sources":["../../../src/admin/customer-group.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,OAAO,aAAa;IAExB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEK,QAAQ,CACZ,EAAU,EACV,KA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,CAAC;KAAA;CACF"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { FindParams, HttpTypes, SelectParams } from "@medusajs/types";
|
2
|
+
import { Client } from "../client";
|
3
|
+
import { ClientHeaders } from "../types";
|
4
|
+
export declare class Customer {
|
5
|
+
private client;
|
6
|
+
constructor(client: Client);
|
7
|
+
create(body: HttpTypes.AdminCreateCustomer, query?: SelectParams, headers?: ClientHeaders): Promise<{
|
8
|
+
customer: HttpTypes.AdminCustomer;
|
9
|
+
}>;
|
10
|
+
update(id: string, body: HttpTypes.AdminUpdateCustomer, query?: SelectParams, headers?: ClientHeaders): Promise<{
|
11
|
+
customer: HttpTypes.AdminCustomer;
|
12
|
+
}>;
|
13
|
+
list(queryParams?: FindParams & HttpTypes.AdminCustomerFilters, headers?: ClientHeaders): Promise<HttpTypes.PaginatedResponse<{
|
14
|
+
customers: HttpTypes.AdminCustomer[];
|
15
|
+
}>>;
|
16
|
+
retrieve(id: string, query?: SelectParams, headers?: ClientHeaders): Promise<{
|
17
|
+
customer: HttpTypes.AdminCustomer;
|
18
|
+
}>;
|
19
|
+
delete(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminCustomerDeleteResponse>;
|
20
|
+
}
|
21
|
+
//# sourceMappingURL=customer.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"customer.d.ts","sourceRoot":"","sources":["../../../src/admin/customer.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,QAAQ;IACnB,OAAO,CAAC,MAAM,CAAQ;gBACV,MAAM,EAAE,MAAM;IAIpB,MAAM,CACV,IAAI,EAAE,SAAS,CAAC,mBAAmB,EACnC,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;kBAGX,SAAS,CAAC,aAAa;;IAS/B,MAAM,CACV,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,mBAAmB,EACnC,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;kBAEc,SAAS,CAAC,aAAa;;IAWxD,IAAI,CACR,WAAW,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,oBAAoB,EACzD,OAAO,CAAC,EAAE,aAAa;mBAGU,SAAS,CAAC,aAAa,EAAE;;IAOtD,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,aAAa;kBACjC,SAAS,CAAC,aAAa;;IASxD,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;CASjD"}
|