@medusajs/js-sdk 0.0.2-snapshot-20240531094527 → 0.0.2-snapshot-20240607093839

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. package/dist/admin/customer.d.ts +20 -0
  2. package/dist/admin/customer.js +40 -0
  3. package/dist/admin/customer.js.map +1 -0
  4. package/dist/admin/fulfillment-provider.d.ts +8 -0
  5. package/dist/admin/fulfillment-provider.js +13 -0
  6. package/dist/admin/fulfillment-provider.js.map +1 -0
  7. package/dist/admin/fulfillment-set.d.ts +12 -0
  8. package/dist/admin/fulfillment-set.js +41 -0
  9. package/dist/admin/fulfillment-set.js.map +1 -0
  10. package/dist/admin/fulfillment.d.ts +10 -0
  11. package/dist/admin/fulfillment.js +29 -0
  12. package/dist/admin/fulfillment.js.map +1 -0
  13. package/dist/admin/index.d.ts +30 -76
  14. package/dist/admin/index.js +30 -168
  15. package/dist/admin/index.js.map +1 -1
  16. package/dist/admin/invite.d.ts +25 -0
  17. package/dist/admin/invite.js +46 -0
  18. package/dist/admin/invite.js.map +1 -0
  19. package/dist/admin/order.d.ts +22 -0
  20. package/dist/admin/order.js +39 -0
  21. package/dist/admin/order.js.map +1 -0
  22. package/dist/admin/product-collection.d.ts +23 -0
  23. package/dist/admin/product-collection.js +47 -0
  24. package/dist/admin/product-collection.js.map +1 -0
  25. package/dist/admin/product.d.ts +10 -0
  26. package/dist/admin/product.js +14 -0
  27. package/dist/admin/product.js.map +1 -0
  28. package/dist/admin/region.d.ts +20 -0
  29. package/dist/admin/region.js +40 -0
  30. package/dist/admin/region.js.map +1 -0
  31. package/dist/admin/sales-channel.d.ts +13 -0
  32. package/dist/admin/sales-channel.js +49 -0
  33. package/dist/admin/sales-channel.js.map +1 -0
  34. package/dist/admin/shipping-option.d.ts +12 -0
  35. package/dist/admin/shipping-option.js +42 -0
  36. package/dist/admin/shipping-option.js.map +1 -0
  37. package/dist/admin/shipping-profile.d.ts +12 -0
  38. package/dist/admin/shipping-profile.js +42 -0
  39. package/dist/admin/shipping-profile.js.map +1 -0
  40. package/dist/admin/stock-location.d.ts +14 -0
  41. package/dist/admin/stock-location.js +56 -0
  42. package/dist/admin/stock-location.js.map +1 -0
  43. package/dist/admin/tax-rate.d.ts +12 -0
  44. package/dist/admin/tax-rate.js +43 -0
  45. package/dist/admin/tax-rate.js.map +1 -0
  46. package/dist/admin/tax-region.d.ts +11 -0
  47. package/dist/admin/tax-region.js +36 -0
  48. package/dist/admin/tax-region.js.map +1 -0
  49. package/dist/admin/upload.d.ts +14 -0
  50. package/dist/admin/upload.js +46 -0
  51. package/dist/admin/upload.js.map +1 -0
  52. package/dist/client.js +6 -1
  53. package/dist/client.js.map +1 -1
  54. package/dist/types.d.ts +1 -1
  55. package/package.json +2 -2
@@ -0,0 +1,20 @@
1
+ import { DeleteResponse, 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.AdminCollectionFilters, 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<DeleteResponse<"customer">>;
20
+ }
@@ -0,0 +1,40 @@
1
+ export class Customer {
2
+ constructor(client) {
3
+ this.client = client;
4
+ }
5
+ async create(body, query, headers) {
6
+ return this.client.fetch(`/admin/customers`, {
7
+ method: "POST",
8
+ headers,
9
+ body,
10
+ query,
11
+ });
12
+ }
13
+ async update(id, body, query, headers) {
14
+ return this.client.fetch(`/admin/customers/${id}`, {
15
+ method: "POST",
16
+ headers,
17
+ body,
18
+ query,
19
+ });
20
+ }
21
+ async list(queryParams, headers) {
22
+ return this.client.fetch(`/admin/customers`, {
23
+ headers,
24
+ query: queryParams,
25
+ });
26
+ }
27
+ async retrieve(id, query, headers) {
28
+ return this.client.fetch(`/admin/customers/${id}`, {
29
+ query,
30
+ headers,
31
+ });
32
+ }
33
+ async delete(id, headers) {
34
+ return this.client.fetch(`/admin/customers/${id}`, {
35
+ method: "DELETE",
36
+ headers,
37
+ });
38
+ }
39
+ }
40
+ //# sourceMappingURL=customer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customer.js","sourceRoot":"","sources":["../../src/admin/customer.ts"],"names":[],"mappings":"AAUA,MAAM,OAAO,QAAQ;IAEnB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,MAAM,CACV,IAAmC,EACnC,KAAoB,EACpB,OAAuB;QAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAErB,kBAAkB,EAAE;YACrB,MAAM,EAAE,MAAM;YACd,OAAO;YACP,IAAI;YACJ,KAAK;SACN,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CACV,EAAU,EACV,IAAmC,EACnC,KAAoB,EACpB,OAAuB;QAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,oBAAoB,EAAE,EAAE,EACxB;YACE,MAAM,EAAE,MAAM;YACd,OAAO;YACP,IAAI;YACJ,KAAK;SACN,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,IAAI,CACR,WAA2D,EAC3D,OAAuB;QAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAEtB,kBAAkB,EAAE;YACpB,OAAO;YACP,KAAK,EAAE,WAAW;SACnB,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,EAAU,EAAE,KAAoB,EAAE,OAAuB;QACtE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,oBAAoB,EAAE,EAAE,EACxB;YACE,KAAK;YACL,OAAO;SACR,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,OAAuB;QAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,oBAAoB,EAAE,EAAE,EACxB;YACE,MAAM,EAAE,QAAQ;YAChB,OAAO;SACR,CACF,CAAA;IACH,CAAC;CACF"}
@@ -0,0 +1,8 @@
1
+ import { HttpTypes } from "@medusajs/types";
2
+ import { Client } from "../client";
3
+ import { ClientHeaders } from "../types";
4
+ export declare class FulfillmentProvider {
5
+ private client;
6
+ constructor(client: Client);
7
+ list(query?: HttpTypes.AdminFulfillmentProviderListParams, headers?: ClientHeaders): Promise<HttpTypes.AdminFulfillmentProviderListResponse>;
8
+ }
@@ -0,0 +1,13 @@
1
+ export class FulfillmentProvider {
2
+ constructor(client) {
3
+ this.client = client;
4
+ }
5
+ async list(query, headers) {
6
+ return await this.client.fetch(`/admin/fulfillment-providers`, {
7
+ method: "GET",
8
+ headers,
9
+ query,
10
+ });
11
+ }
12
+ }
13
+ //# sourceMappingURL=fulfillment-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fulfillment-provider.js","sourceRoot":"","sources":["../../src/admin/fulfillment-provider.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,mBAAmB;IAE9B,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,IAAI,CACR,KAAoD,EACpD,OAAuB;QAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,8BAA8B,EAC9B;YACE,MAAM,EAAE,KAAK;YACb,OAAO;YACP,KAAK;SACN,CACF,CAAA;IACH,CAAC;CACF"}
@@ -0,0 +1,12 @@
1
+ import { HttpTypes } from "@medusajs/types";
2
+ import { Client } from "../client";
3
+ import { ClientHeaders } from "../types";
4
+ export declare class FulfillmentSet {
5
+ private client;
6
+ constructor(client: Client);
7
+ delete(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminFulfillmentSetDeleteResponse>;
8
+ createServiceZone(id: string, body: HttpTypes.AdminCreateFulfillmentSetServiceZone, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminFulfillmentResponse>;
9
+ retrieveServiceZones(fulfillmentSetId: string, serviceZoneId: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminServiceZoneResponse>;
10
+ updateServiceZone(fulfillmentSetId: string, serviceZoneId: string, body: HttpTypes.AdminUpdateFulfillmentSetServiceZone, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminFulfillmentResponse>;
11
+ deleteServiceZone(fulfillmentSetId: string, serviceZoneId: string, headers?: ClientHeaders): Promise<HttpTypes.AdminServiceZoneDeleteResponse>;
12
+ }
@@ -0,0 +1,41 @@
1
+ export class FulfillmentSet {
2
+ constructor(client) {
3
+ this.client = client;
4
+ }
5
+ async delete(id, headers) {
6
+ return await this.client.fetch(`/admin/fulfillment-sets/${id}`, {
7
+ method: "DELETE",
8
+ headers,
9
+ });
10
+ }
11
+ async createServiceZone(id, body, query, headers) {
12
+ return await this.client.fetch(`/admin/fulfillment-sets/${id}/service-zones`, {
13
+ method: "POST",
14
+ headers,
15
+ body,
16
+ query,
17
+ });
18
+ }
19
+ async retrieveServiceZones(fulfillmentSetId, serviceZoneId, query, headers) {
20
+ return await this.client.fetch(`/admin/fulfillment-sets/${fulfillmentSetId}/service-zones/${serviceZoneId}`, {
21
+ method: "GET",
22
+ headers,
23
+ query,
24
+ });
25
+ }
26
+ async updateServiceZone(fulfillmentSetId, serviceZoneId, body, query, headers) {
27
+ return await this.client.fetch(`/admin/fulfillment-sets/${fulfillmentSetId}/service-zones/${serviceZoneId}`, {
28
+ method: "POST",
29
+ headers,
30
+ body,
31
+ query,
32
+ });
33
+ }
34
+ async deleteServiceZone(fulfillmentSetId, serviceZoneId, headers) {
35
+ return await this.client.fetch(`/admin/fulfillment-sets/${fulfillmentSetId}/service-zones/${serviceZoneId}`, {
36
+ method: "DELETE",
37
+ headers,
38
+ });
39
+ }
40
+ }
41
+ //# sourceMappingURL=fulfillment-set.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fulfillment-set.js","sourceRoot":"","sources":["../../src/admin/fulfillment-set.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,cAAc;IAEzB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,OAAuB;QAC9C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,2BAA2B,EAAE,EAAE,EAC/B;YACE,MAAM,EAAE,QAAQ;YAChB,OAAO;SACR,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,iBAAiB,CACrB,EAAU,EACV,IAAoD,EACpD,KAA8B,EAC9B,OAAuB;QAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,2BAA2B,EAAE,gBAAgB,EAC7C;YACE,MAAM,EAAE,MAAM;YACd,OAAO;YACP,IAAI;YACJ,KAAK;SACN,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,oBAAoB,CACxB,gBAAwB,EACxB,aAAqB,EACrB,KAA8B,EAC9B,OAAuB;QAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,2BAA2B,gBAAgB,kBAAkB,aAAa,EAAE,EAC5E;YACE,MAAM,EAAE,KAAK;YACb,OAAO;YACP,KAAK;SACN,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,iBAAiB,CACrB,gBAAwB,EACxB,aAAqB,EACrB,IAAoD,EACpD,KAA8B,EAC9B,OAAuB;QAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,2BAA2B,gBAAgB,kBAAkB,aAAa,EAAE,EAC5E;YACE,MAAM,EAAE,MAAM;YACd,OAAO;YACP,IAAI;YACJ,KAAK;SACN,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,iBAAiB,CACrB,gBAAwB,EACxB,aAAqB,EACrB,OAAuB;QAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,2BAA2B,gBAAgB,kBAAkB,aAAa,EAAE,EAC5E;YACE,MAAM,EAAE,QAAQ;YAChB,OAAO;SACR,CACF,CAAA;IACH,CAAC;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 Fulfillment {
5
+ private client;
6
+ constructor(client: Client);
7
+ create(body: HttpTypes.AdminCreateFulfillment, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminFulfillmentResponse>;
8
+ cancel(id: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminFulfillmentResponse>;
9
+ createShipment(id: string, body: HttpTypes.AdminCreateFulfillmentShipment, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminFulfillmentResponse>;
10
+ }
@@ -0,0 +1,29 @@
1
+ export class Fulfillment {
2
+ constructor(client) {
3
+ this.client = client;
4
+ }
5
+ async create(body, query, headers) {
6
+ return await this.client.fetch(`/admin/fulfillments`, {
7
+ method: "POST",
8
+ headers,
9
+ body,
10
+ query,
11
+ });
12
+ }
13
+ async cancel(id, query, headers) {
14
+ return await this.client.fetch(`/admin/fulfillments/${id}`, {
15
+ method: "POST",
16
+ body: {},
17
+ headers,
18
+ });
19
+ }
20
+ async createShipment(id, body, query, headers) {
21
+ return await this.client.fetch(`/admin/fulfillments/${id}/shipments`, {
22
+ method: "POST",
23
+ headers,
24
+ body,
25
+ query,
26
+ });
27
+ }
28
+ }
29
+ //# sourceMappingURL=fulfillment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fulfillment.js","sourceRoot":"","sources":["../../src/admin/fulfillment.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,WAAW;IAEtB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,MAAM,CACV,IAAsC,EACtC,KAA8B,EAC9B,OAAuB;QAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,qBAAqB,EACrB;YACE,MAAM,EAAE,MAAM;YACd,OAAO;YACP,IAAI;YACJ,KAAK;SACN,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,MAAM,CACV,EAAU,EACV,KAA8B,EAC9B,OAAuB;QAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,uBAAuB,EAAE,EAAE,EAC3B;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE;YACR,OAAO;SACR,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,EAAU,EACV,IAA8C,EAC9C,KAA8B,EAC9B,OAAuB;QAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,uBAAuB,EAAE,YAAY,EACrC;YACE,MAAM,EAAE,MAAM;YACd,OAAO;YACP,IAAI;YACJ,KAAK;SACN,CACF,CAAA;IACH,CAAC;CACF"}
@@ -1,80 +1,34 @@
1
- import { DeleteResponse, FindParams, HttpTypes, SelectParams } from "@medusajs/types";
2
1
  import { Client } from "../client";
3
- import { ClientHeaders } from "../types";
2
+ import { Customer } from "./customer";
3
+ import { Fulfillment } from "./fulfillment";
4
+ import { FulfillmentSet } from "./fulfillment-set";
5
+ import { Invite } from "./invite";
6
+ import { Order } from "./order";
7
+ import { Product } from "./product";
8
+ import { ProductCollection } from "./product-collection";
9
+ import { Region } from "./region";
10
+ import { SalesChannel } from "./sales-channel";
11
+ import { ShippingOption } from "./shipping-option";
12
+ import { ShippingProfile } from "./shipping-profile";
13
+ import { StockLocation } from "./stock-location";
14
+ import { TaxRate } from "./tax-rate";
15
+ import { TaxRegion } from "./tax-region";
16
+ import { Upload } from "./upload";
4
17
  export declare class Admin {
5
- private client;
18
+ invite: Invite;
19
+ customer: Customer;
20
+ productCollection: ProductCollection;
21
+ product: Product;
22
+ upload: Upload;
23
+ region: Region;
24
+ stockLocation: StockLocation;
25
+ salesChannel: SalesChannel;
26
+ fulfillmentSet: FulfillmentSet;
27
+ fulfillment: Fulfillment;
28
+ shippingOption: ShippingOption;
29
+ shippingProfile: ShippingProfile;
30
+ order: Order;
31
+ taxRate: TaxRate;
32
+ taxRegion: TaxRegion;
6
33
  constructor(client: Client);
7
- region: {
8
- create: (body: HttpTypes.AdminCreateRegion, query?: SelectParams, headers?: ClientHeaders) => Promise<{
9
- region: HttpTypes.AdminRegion;
10
- }>;
11
- update: (id: string, body: HttpTypes.AdminUpdateRegion, query?: SelectParams, headers?: ClientHeaders) => Promise<{
12
- region: HttpTypes.AdminRegion;
13
- }>;
14
- list: (queryParams?: FindParams & HttpTypes.AdminRegionFilters, headers?: ClientHeaders) => Promise<HttpTypes.PaginatedResponse<{
15
- regions: HttpTypes.AdminRegion[];
16
- }>>;
17
- retrieve: (id: string, query?: SelectParams, headers?: ClientHeaders) => Promise<{
18
- region: HttpTypes.AdminRegion;
19
- }>;
20
- delete: (id: string, headers?: ClientHeaders) => Promise<DeleteResponse<"region">>;
21
- };
22
- invites: {
23
- accept: (input: HttpTypes.AdminAcceptInvite & {
24
- invite_token: string;
25
- }, query?: SelectParams, headers?: ClientHeaders) => Promise<{
26
- user: HttpTypes.AdminUserResponse;
27
- }>;
28
- create: (body: HttpTypes.AdminCreateInvite, query?: SelectParams, headers?: ClientHeaders) => Promise<{
29
- invite: HttpTypes.AdminInviteResponse;
30
- }>;
31
- retrieve: (id: string, query?: SelectParams, headers?: ClientHeaders) => Promise<{
32
- invite: HttpTypes.AdminInviteResponse;
33
- }>;
34
- list: (queryParams?: FindParams, headers?: ClientHeaders) => Promise<HttpTypes.PaginatedResponse<{
35
- invites: HttpTypes.AdminInviteResponse[];
36
- }>>;
37
- resend: (id: string, headers?: ClientHeaders) => Promise<{
38
- invite: HttpTypes.AdminInviteResponse;
39
- }>;
40
- delete: (id: string, headers?: ClientHeaders) => Promise<DeleteResponse<"invite">>;
41
- };
42
- products: {
43
- create: (body: HttpTypes.AdminCreateProduct, query?: SelectParams, headers?: ClientHeaders) => Promise<{
44
- product: HttpTypes.AdminProduct;
45
- }>;
46
- };
47
- customer: {
48
- create: (body: HttpTypes.AdminCreateCustomer, query?: SelectParams, headers?: ClientHeaders) => Promise<{
49
- customer: HttpTypes.AdminCustomer;
50
- }>;
51
- update: (id: string, body: HttpTypes.AdminUpdateCustomer, query?: SelectParams, headers?: ClientHeaders) => Promise<{
52
- customer: HttpTypes.AdminCustomer;
53
- }>;
54
- list: (queryParams?: FindParams & HttpTypes.AdminCollectionFilters, headers?: ClientHeaders) => Promise<HttpTypes.PaginatedResponse<{
55
- customers: HttpTypes.AdminCustomer[];
56
- }>>;
57
- retrieve: (id: string, query?: SelectParams, headers?: ClientHeaders) => Promise<{
58
- customer: HttpTypes.AdminCustomer;
59
- }>;
60
- delete: (id: string, headers?: ClientHeaders) => Promise<DeleteResponse<"customer">>;
61
- };
62
- collection: {
63
- create: (body: HttpTypes.AdminCreateCollection, query?: SelectParams, headers?: ClientHeaders) => Promise<{
64
- collection: HttpTypes.AdminCollection;
65
- }>;
66
- update: (id: string, body: HttpTypes.AdminUpdateCollection, query?: SelectParams, headers?: ClientHeaders) => Promise<{
67
- collection: HttpTypes.AdminCollection;
68
- }>;
69
- list: (queryParams?: FindParams, headers?: ClientHeaders) => Promise<HttpTypes.PaginatedResponse<{
70
- collections: HttpTypes.AdminCollection[];
71
- }>>;
72
- retrieve: (id: string, query?: SelectParams, headers?: ClientHeaders) => Promise<{
73
- collection: HttpTypes.AdminCollection;
74
- }>;
75
- delete: (id: string, headers?: ClientHeaders) => Promise<DeleteResponse<"collection">>;
76
- updateProducts: (id: string, body: HttpTypes.AdminUpdateCollectionProducts, headers?: ClientHeaders) => Promise<{
77
- collection: HttpTypes.AdminCollection;
78
- }>;
79
- };
80
34
  }
@@ -1,173 +1,35 @@
1
+ import { Customer } from "./customer";
2
+ import { Fulfillment } from "./fulfillment";
3
+ import { FulfillmentSet } from "./fulfillment-set";
4
+ import { Invite } from "./invite";
5
+ import { Order } from "./order";
6
+ import { Product } from "./product";
7
+ import { ProductCollection } from "./product-collection";
8
+ import { Region } from "./region";
9
+ import { SalesChannel } from "./sales-channel";
10
+ import { ShippingOption } from "./shipping-option";
11
+ import { ShippingProfile } from "./shipping-profile";
12
+ import { StockLocation } from "./stock-location";
13
+ import { TaxRate } from "./tax-rate";
14
+ import { TaxRegion } from "./tax-region";
15
+ import { Upload } from "./upload";
1
16
  export class Admin {
2
17
  constructor(client) {
3
- this.region = {
4
- create: async (body, query, headers) => {
5
- return await this.client.fetch(`/admin/regions`, {
6
- method: "POST",
7
- headers,
8
- body,
9
- query,
10
- });
11
- },
12
- update: async (id, body, query, headers) => {
13
- return await this.client.fetch(`/admin/regions/${id}`, {
14
- method: "POST",
15
- headers,
16
- body,
17
- query,
18
- });
19
- },
20
- list: async (queryParams, headers) => {
21
- return await this.client.fetch(`/admin/regions`, {
22
- query: queryParams,
23
- headers,
24
- });
25
- },
26
- retrieve: async (id, query, headers) => {
27
- return await this.client.fetch(`/admin/regions/${id}`, {
28
- query,
29
- headers,
30
- });
31
- },
32
- delete: async (id, headers) => {
33
- return await this.client.fetch(`/admin/regions/${id}`, {
34
- method: "DELETE",
35
- headers,
36
- });
37
- },
38
- };
39
- this.invites = {
40
- accept: async (input, query, headers) => {
41
- const { invite_token, ...rest } = input;
42
- return await this.client.fetch(`/admin/invites/accept?token=${input.invite_token}`, {
43
- method: "POST",
44
- headers,
45
- body: rest,
46
- query,
47
- });
48
- },
49
- create: async (body, query, headers) => {
50
- return await this.client.fetch(`/admin/invites`, {
51
- method: "POST",
52
- headers,
53
- body,
54
- query,
55
- });
56
- },
57
- retrieve: async (id, query, headers) => {
58
- return await this.client.fetch(`/admin/invites/${id}`, {
59
- headers,
60
- query,
61
- });
62
- },
63
- list: async (queryParams, headers) => {
64
- return await this.client.fetch(`/admin/invites`, {
65
- headers,
66
- query: queryParams,
67
- });
68
- },
69
- resend: async (id, headers) => {
70
- return await this.client.fetch(`/admin/invites/${id}/resend`, {
71
- headers,
72
- });
73
- },
74
- delete: async (id, headers) => {
75
- return await this.client.fetch(`/admin/invites/${id}`, {
76
- method: "DELETE",
77
- headers,
78
- });
79
- },
80
- };
81
- this.products = {
82
- create: async (body, query, headers) => {
83
- return await this.client.fetch(`/admin/products`, {
84
- method: "POST",
85
- headers,
86
- body,
87
- query,
88
- });
89
- },
90
- };
91
- this.customer = {
92
- create: async (body, query, headers) => {
93
- return this.client.fetch(`/admin/customers`, {
94
- method: "POST",
95
- headers,
96
- body,
97
- query,
98
- });
99
- },
100
- update: async (id, body, query, headers) => {
101
- return this.client.fetch(`/admin/customers/${id}`, {
102
- method: "POST",
103
- headers,
104
- body,
105
- query,
106
- });
107
- },
108
- list: async (queryParams, headers) => {
109
- return this.client.fetch(`/admin/customers`, {
110
- headers,
111
- query: queryParams,
112
- });
113
- },
114
- retrieve: async (id, query, headers) => {
115
- return this.client.fetch(`/admin/customers/${id}`, {
116
- query,
117
- headers,
118
- });
119
- },
120
- delete: async (id, headers) => {
121
- return this.client.fetch(`/admin/customers/${id}`, {
122
- method: "DELETE",
123
- headers,
124
- });
125
- },
126
- };
127
- this.collection = {
128
- create: async (body, query, headers) => {
129
- return this.client.fetch(`/admin/collections`, {
130
- method: "POST",
131
- headers,
132
- body,
133
- query,
134
- });
135
- },
136
- update: async (id, body, query, headers) => {
137
- return this.client.fetch(`/admin/collections/${id}`, {
138
- method: "POST",
139
- headers,
140
- body,
141
- query,
142
- });
143
- },
144
- list: async (queryParams, headers) => {
145
- return this.client.fetch(`/admin/collections`, {
146
- headers,
147
- query: queryParams,
148
- });
149
- },
150
- retrieve: async (id, query, headers) => {
151
- return this.client.fetch(`/admin/collections/${id}`, {
152
- query,
153
- headers,
154
- });
155
- },
156
- delete: async (id, headers) => {
157
- return this.client.fetch(`/admin/collections/${id}`, {
158
- method: "DELETE",
159
- headers,
160
- });
161
- },
162
- updateProducts: async (id, body, headers) => {
163
- return this.client.fetch(`/admin/collections/${id}/products`, {
164
- method: "POST",
165
- headers,
166
- body,
167
- });
168
- },
169
- };
170
- this.client = client;
18
+ this.invite = new Invite(client);
19
+ this.customer = new Customer(client);
20
+ this.productCollection = new ProductCollection(client);
21
+ this.product = new Product(client);
22
+ this.upload = new Upload(client);
23
+ this.region = new Region(client);
24
+ this.stockLocation = new StockLocation(client);
25
+ this.salesChannel = new SalesChannel(client);
26
+ this.fulfillmentSet = new FulfillmentSet(client);
27
+ this.fulfillment = new Fulfillment(client);
28
+ this.shippingOption = new ShippingOption(client);
29
+ this.shippingProfile = new ShippingProfile(client);
30
+ this.order = new Order(client);
31
+ this.taxRate = new TaxRate(client);
32
+ this.taxRegion = new TaxRegion(client);
171
33
  }
172
34
  }
173
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/admin/index.ts"],"names":[],"mappings":"AAUA,MAAM,OAAO,KAAK;IAEhB,YAAY,MAAc;QAInB,WAAM,GAAG;YACd,MAAM,EAAE,KAAK,EACX,IAAiC,EACjC,KAAoB,EACpB,OAAuB,EACvB,EAAE;gBACF,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,gBAAgB,EAChB;oBACE,MAAM,EAAE,MAAM;oBACd,OAAO;oBACP,IAAI;oBACJ,KAAK;iBACN,CACF,CAAA;YACH,CAAC;YACD,MAAM,EAAE,KAAK,EACX,EAA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AI,MAAM,CAAC,MAAM,CAAC,CAAA;QAChC,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,CAAA;QAChC,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,MAAM,CAAC,CAAA;QAC9C,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAA;QAC5C,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAAA;QAChD,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,CAAA;QAC1C,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAAA;QAChD,IAAI,CAAC,eAAe,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,CAAA;QAClD,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAA;QAC9B,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;QAClC,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,MAAM,CAAC,CAAA;IACxC,CAAC;CACF"}
@@ -0,0 +1,25 @@
1
+ import { DeleteResponse, 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<DeleteResponse<"invite">>;
25
+ }
@@ -0,0 +1,46 @@
1
+ export class Invite {
2
+ constructor(client) {
3
+ this.client = client;
4
+ }
5
+ async accept(input, query, headers) {
6
+ const { invite_token, ...rest } = input;
7
+ return await this.client.fetch(`/admin/invites/accept?token=${input.invite_token}`, {
8
+ method: "POST",
9
+ headers,
10
+ body: rest,
11
+ query,
12
+ });
13
+ }
14
+ async create(body, query, headers) {
15
+ return await this.client.fetch(`/admin/invites`, {
16
+ method: "POST",
17
+ headers,
18
+ body,
19
+ query,
20
+ });
21
+ }
22
+ async retrieve(id, query, headers) {
23
+ return await this.client.fetch(`/admin/invites/${id}`, {
24
+ headers,
25
+ query,
26
+ });
27
+ }
28
+ async list(queryParams, headers) {
29
+ return await this.client.fetch(`/admin/invites`, {
30
+ headers,
31
+ query: queryParams,
32
+ });
33
+ }
34
+ async resend(id, headers) {
35
+ return await this.client.fetch(`/admin/invites/${id}/resend`, {
36
+ headers,
37
+ });
38
+ }
39
+ async delete(id, headers) {
40
+ return await this.client.fetch(`/admin/invites/${id}`, {
41
+ method: "DELETE",
42
+ headers,
43
+ });
44
+ }
45
+ }
46
+ //# sourceMappingURL=invite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invite.js","sourceRoot":"","sources":["../../src/admin/invite.ts"],"names":[],"mappings":"AAUA,MAAM,OAAO,MAAM;IAEjB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,MAAM,CACV,KAA6D,EAC7D,KAAoB,EACpB,OAAuB;QAEvB,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAA;QACvC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,+BAA+B,KAAK,CAAC,YAAY,EAAE,EACnD;YACE,MAAM,EAAE,MAAM;YACd,OAAO;YACP,IAAI,EAAE,IAAI;YACV,KAAK;SACN,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,MAAM,CACV,IAAiC,EACjC,KAAoB,EACpB,OAAuB;QAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,gBAAgB,EAChB;YACE,MAAM,EAAE,MAAM;YACd,OAAO;YACP,IAAI;YACJ,KAAK;SACN,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,EAAU,EAAE,KAAoB,EAAE,OAAuB;QACtE,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,kBAAkB,EAAE,EAAE,EACtB;YACE,OAAO;YACP,KAAK;SACN,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,WAAwB,EAAE,OAAuB;QAC1D,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAE5B,gBAAgB,EAAE;YAClB,OAAO;YACP,KAAK,EAAE,WAAW;SACnB,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,OAAuB;QAC9C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,kBAAkB,EAAE,SAAS,EAC7B;YACE,OAAO;SACR,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,OAAuB;QAC9C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,kBAAkB,EAAE,EAAE,EACtB;YACE,MAAM,EAAE,QAAQ;YAChB,OAAO;SACR,CACF,CAAA;IACH,CAAC;CACF"}
@@ -0,0 +1,22 @@
1
+ import { FindParams, HttpTypes, SelectParams } from "@medusajs/types";
2
+ import { Client } from "../client";
3
+ import { ClientHeaders } from "../types";
4
+ export declare class Order {
5
+ private client;
6
+ constructor(client: Client);
7
+ retrieve(id: string, query?: SelectParams, headers?: ClientHeaders): Promise<{
8
+ order: HttpTypes.AdminOrder;
9
+ }>;
10
+ list(queryParams?: FindParams & HttpTypes.AdminOrderFilters, headers?: ClientHeaders): Promise<HttpTypes.PaginatedResponse<{
11
+ orders: HttpTypes.AdminOrder[];
12
+ }>>;
13
+ cancel(id: string, headers?: ClientHeaders): Promise<{
14
+ order: HttpTypes.AdminOrder;
15
+ }>;
16
+ createFulfillment(id: string, body: HttpTypes.AdminCreateOrderFulfillment, query?: SelectParams, headers?: ClientHeaders): Promise<{
17
+ order: HttpTypes.AdminOrder;
18
+ }>;
19
+ cancelFulfillment(id: string, fulfillmentId: string, body: HttpTypes.AdminCancelOrderFulfillment, headers?: ClientHeaders): Promise<{
20
+ order: HttpTypes.AdminOrder;
21
+ }>;
22
+ }