@commercengine/pos 0.3.12 → 0.4.1
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.
- package/dist/admin-types.d.mts +721 -773
- package/dist/index.d.mts +1630 -2163
- package/dist/index.mjs +7 -25
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -10
package/dist/index.mjs
CHANGED
|
@@ -809,11 +809,11 @@ function createDefaultPosAuthMiddleware(options) {
|
|
|
809
809
|
/**
|
|
810
810
|
* Environment configuration for POS API
|
|
811
811
|
*/
|
|
812
|
-
let Environment = /* @__PURE__ */ function(Environment
|
|
813
|
-
Environment
|
|
814
|
-
Environment
|
|
815
|
-
Environment
|
|
816
|
-
return Environment
|
|
812
|
+
let Environment = /* @__PURE__ */ function(Environment) {
|
|
813
|
+
Environment["Development"] = "dev";
|
|
814
|
+
Environment["Staging"] = "staging";
|
|
815
|
+
Environment["Production"] = "production";
|
|
816
|
+
return Environment;
|
|
817
817
|
}({});
|
|
818
818
|
/**
|
|
819
819
|
* Build the base URL for POS API requests
|
|
@@ -1850,23 +1850,6 @@ var PosClient = class extends PosAPIClient {
|
|
|
1850
1850
|
return this.executeRequest(() => this.storefrontClient.POST("/pos/orders", { body }));
|
|
1851
1851
|
}
|
|
1852
1852
|
/**
|
|
1853
|
-
* List payment options
|
|
1854
|
-
* @returns Promise with list of payment options
|
|
1855
|
-
* @example
|
|
1856
|
-
* ```typescript
|
|
1857
|
-
* const { data, error } = await pos.listPaymentOptions();
|
|
1858
|
-
*
|
|
1859
|
-
* if (error) {
|
|
1860
|
-
* console.error("Failed to list payment options:", error.message);
|
|
1861
|
-
* } else {
|
|
1862
|
-
* console.log("Payment options:", data.payment_options);
|
|
1863
|
-
* }
|
|
1864
|
-
* ```
|
|
1865
|
-
*/
|
|
1866
|
-
async listPaymentOptions() {
|
|
1867
|
-
return this.executeRequest(() => this.client.GET("/pos/payments/payment-options"));
|
|
1868
|
-
}
|
|
1869
|
-
/**
|
|
1870
1853
|
* Get payment status
|
|
1871
1854
|
* @param pathParams - Order number
|
|
1872
1855
|
* @returns Promise with payment status
|
|
@@ -2757,7 +2740,7 @@ var PosClient = class extends PosAPIClient {
|
|
|
2757
2740
|
* ```
|
|
2758
2741
|
*/
|
|
2759
2742
|
async checkInventory(pathParams) {
|
|
2760
|
-
return this.executeRequest(() => this.
|
|
2743
|
+
return this.executeRequest(() => this.adminClient.GET("/pos/orders/{order_number}/check-inventory", { params: { path: pathParams } }));
|
|
2761
2744
|
}
|
|
2762
2745
|
/**
|
|
2763
2746
|
* Refund shortfall for order (Admin)
|
|
@@ -3071,8 +3054,7 @@ var PosSDK = class {
|
|
|
3071
3054
|
return getTenantIdFromToken(token);
|
|
3072
3055
|
}
|
|
3073
3056
|
};
|
|
3074
|
-
var src_default = PosSDK;
|
|
3075
3057
|
|
|
3076
3058
|
//#endregion
|
|
3077
|
-
export { BrowserTokenStorage, Environment, MemoryTokenStorage, PosAPIClient, PosClient, PosSDK,
|
|
3059
|
+
export { BrowserTokenStorage, Environment, MemoryTokenStorage, PosAPIClient, PosClient, PosSDK, PosSDK as default, ResponseUtils };
|
|
3078
3060
|
//# sourceMappingURL=index.mjs.map
|