@medusajs/js-sdk 0.0.2-snapshot-20240520151134 → 0.0.2-snapshot-20240520183547
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/store/index.d.ts +7 -5
- package/dist/store/index.js +1 -0
- package/dist/store/index.js.map +1 -1
- package/dist/types.d.ts +5 -1
- package/package.json +2 -2
package/dist/store/index.d.ts
CHANGED
@@ -14,7 +14,7 @@ export declare class Store {
|
|
14
14
|
};
|
15
15
|
collection: {
|
16
16
|
list: (query?: FindParams & HttpTypes.StoreCollectionFilters, headers?: ClientHeaders) => Promise<HttpTypes.PaginatedResponse<{
|
17
|
-
collections: HttpTypes.StoreCollection;
|
17
|
+
collections: HttpTypes.StoreCollection[];
|
18
18
|
}>>;
|
19
19
|
retrieve: (id: string, query?: SelectParams, headers?: ClientHeaders) => Promise<{
|
20
20
|
collection: HttpTypes.StoreCollection;
|
@@ -22,15 +22,15 @@ export declare class Store {
|
|
22
22
|
};
|
23
23
|
category: {
|
24
24
|
list: (query?: FindParams & HttpTypes.StoreProductCategoryFilters, headers?: ClientHeaders) => Promise<HttpTypes.PaginatedResponse<{
|
25
|
-
|
25
|
+
product_categories: HttpTypes.StoreProductCategory[];
|
26
26
|
}>>;
|
27
27
|
retrieve: (id: string, query?: SelectParams, headers?: ClientHeaders) => Promise<{
|
28
|
-
|
28
|
+
product_category: HttpTypes.StoreProductCategory;
|
29
29
|
}>;
|
30
30
|
};
|
31
31
|
product: {
|
32
32
|
list: (query?: FindParams & HttpTypes.StoreProductFilters, headers?: ClientHeaders) => Promise<HttpTypes.PaginatedResponse<{
|
33
|
-
products: HttpTypes.StoreProduct;
|
33
|
+
products: HttpTypes.StoreProduct[];
|
34
34
|
}>>;
|
35
35
|
retrieve: (id: string, query?: SelectParams, headers?: ClientHeaders) => Promise<{
|
36
36
|
product: HttpTypes.StoreProduct;
|
@@ -70,7 +70,9 @@ export declare class Store {
|
|
70
70
|
}>;
|
71
71
|
};
|
72
72
|
fulfillment: {
|
73
|
-
listCartOptions: (query?: FindParams
|
73
|
+
listCartOptions: (query?: FindParams & {
|
74
|
+
cart_id: string;
|
75
|
+
}, headers?: ClientHeaders) => Promise<any>;
|
74
76
|
};
|
75
77
|
payment: {
|
76
78
|
listPaymentProviders: (query?: FindParams & HttpTypes.StorePaymentProviderFilters, headers?: ClientHeaders) => Promise<{
|
package/dist/store/index.js
CHANGED
package/dist/store/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAUA,MAAM,OAAO,KAAK;IAGhB,YAAY,MAAc;QAInB,WAAM,GAAG;YACd,IAAI,EAAE,KAAK,EACT,KAAiD,EACjD,OAAuB,EACvB,EAAE;gBACF,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAEtB,gBAAgB,EAAE;oBAClB,KAAK;oBACL,OAAO;iBACR,CAAC,CAAA;YACJ,CAAC;YACD,QAAQ,EAAE,KAAK,EACb,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;SACF,CAAA;QAEM,eAAU,GAAG;YAClB,IAAI,EAAE,KAAK,EACT,KAAqD,EACrD,OAAuB,EACvB,EAAE;gBACF,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAEtB,oBAAoB,EAAE;oBACtB,KAAK;oBACL,OAAO;iBACR,CAAC,CAAA;YACJ,CAAC;YACD,QAAQ,EAAE,KAAK,EACb,EAAU,EACV,KAAoB,EACpB,OAAuB,EACvB,EAAE;gBACF,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,sBAAsB,EAAE,EAAE,EAC1B;oBACE,KAAK;oBACL,OAAO;iBACR,CACF,CAAA;YACH,CAAC;SACF,CAAA;QAEM,aAAQ,GAAG;YAChB,IAAI,EAAE,KAAK,EACT,KAA0D,EAC1D,OAAuB,EACvB,EAAE;gBACF,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAUA,MAAM,OAAO,KAAK;IAGhB,YAAY,MAAc;QAInB,WAAM,GAAG;YACd,IAAI,EAAE,KAAK,EACT,KAAiD,EACjD,OAAuB,EACvB,EAAE;gBACF,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAEtB,gBAAgB,EAAE;oBAClB,KAAK;oBACL,OAAO;iBACR,CAAC,CAAA;YACJ,CAAC;YACD,QAAQ,EAAE,KAAK,EACb,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;SACF,CAAA;QAEM,eAAU,GAAG;YAClB,IAAI,EAAE,KAAK,EACT,KAAqD,EACrD,OAAuB,EACvB,EAAE;gBACF,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAEtB,oBAAoB,EAAE;oBACtB,KAAK;oBACL,OAAO;iBACR,CAAC,CAAA;YACJ,CAAC;YACD,QAAQ,EAAE,KAAK,EACb,EAAU,EACV,KAAoB,EACpB,OAAuB,EACvB,EAAE;gBACF,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,sBAAsB,EAAE,EAAE,EAC1B;oBACE,KAAK;oBACL,OAAO;iBACR,CACF,CAAA;YACH,CAAC;SACF,CAAA;QAEM,aAAQ,GAAG;YAChB,IAAI,EAAE,KAAK,EACT,KAA0D,EAC1D,OAAuB,EACvB,EAAE;gBACF,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAItB,2BAA2B,EAAE;oBAC7B,KAAK;oBACL,OAAO;iBACR,CAAC,CAAA;YACJ,CAAC;YACD,QAAQ,EAAE,KAAK,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,KAAK;iBACN,CAAC,CAAA;YACJ,CAAC;SACF,CAAA;QAEM,UAAK,GAAG;YACb,QAAQ,EAAE,KAAK,EACb,EAAU,EACV,KAAoB,EACpB,OAAuB,EACvB,EAAE;gBACF,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,iBAAiB,EAAE,EAAE,EACrB;oBACE,OAAO;oBACP,KAAK;iBACN,CACF,CAAA;YACH,CAAC;SACF,CAAA;QA3TC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;CA2TF"}
|
package/dist/types.d.ts
CHANGED
@@ -18,7 +18,11 @@ export type Config = {
|
|
18
18
|
debug?: boolean;
|
19
19
|
};
|
20
20
|
export type FetchParams = Parameters<typeof fetch>;
|
21
|
-
export type ClientHeaders = Record<string, string
|
21
|
+
export type ClientHeaders = Record<string, string | {
|
22
|
+
next: {
|
23
|
+
tags: string[];
|
24
|
+
};
|
25
|
+
}>;
|
22
26
|
export type FetchInput = FetchParams[0];
|
23
27
|
export type FetchArgs = Omit<RequestInit, "headers" | "body"> & {
|
24
28
|
query?: Record<string, any>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/js-sdk",
|
3
|
-
"version": "0.0.2-snapshot-
|
3
|
+
"version": "0.0.2-snapshot-20240520183547",
|
4
4
|
"description": "SDK for the Medusa API",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"repository": {
|
@@ -28,7 +28,7 @@
|
|
28
28
|
"typescript": "^5.1.6"
|
29
29
|
},
|
30
30
|
"dependencies": {
|
31
|
-
"@medusajs/types": "1.12.0-snapshot-
|
31
|
+
"@medusajs/types": "1.12.0-snapshot-20240520183547",
|
32
32
|
"qs": "^6.12.1"
|
33
33
|
},
|
34
34
|
"scripts": {
|