@ordersail/storefront-sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../src/resources/products.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE7C,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC;mBAG/C,KAAK,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;kBAMrC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ7B"}
@@ -0,0 +1,16 @@
1
+ export function createProductsResource(client) {
2
+ return {
3
+ list: async (query = {}) => {
4
+ const { data } = await client.GET("/products", { params: { query } });
5
+ return data;
6
+ },
7
+ getById: async (id) => {
8
+ const path = {
9
+ id: String(id),
10
+ };
11
+ const { data } = await client.GET("/products/{id}", { params: { path } });
12
+ return data;
13
+ },
14
+ };
15
+ }
16
+ //# sourceMappingURL=products.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"products.js","sourceRoot":"","sources":["../../src/resources/products.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,sBAAsB,CAAC,MAAqB;IAC1D,OAAO;QACL,IAAI,EAAE,KAAK,EACT,QAA0D,EAAE,EAC5D,EAAE;YACF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;YACtE,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,EAAE,KAAK,EAAE,EAAU,EAAE,EAAE;YAC5B,MAAM,IAAI,GAAyD;gBACjE,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC;aACf,CAAC;YACF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,gBAAgB,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;YAC1E,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC"}