@atomic-solutions/woocommerce-api-client 0.1.5 → 0.3.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.
- package/dist/client/index.d.mts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +8 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +8 -1
- package/dist/client/index.mjs.map +1 -1
- package/dist/http/index.d.mts +2 -2
- package/dist/http/index.d.ts +2 -2
- package/dist/http/index.js +8 -1
- package/dist/http/index.js.map +1 -1
- package/dist/http/index.mjs +8 -1
- package/dist/http/index.mjs.map +1 -1
- package/dist/index.d.mts +130 -2
- package/dist/index.d.ts +130 -2
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{types-B7CKE1bj.d.mts → types-CgTmmyIP.d.mts} +3 -1
- package/dist/{types-B7CKE1bj.d.ts → types-CgTmmyIP.d.ts} +3 -1
- package/dist/utils/index.d.mts +2 -2
- package/dist/utils/index.d.ts +2 -2
- package/package.json +2 -2
package/dist/client/index.mjs
CHANGED
|
@@ -432,7 +432,14 @@ var error = (...args) => {
|
|
|
432
432
|
// src/http/interceptors/request.ts
|
|
433
433
|
var requiresAuth = (url) => {
|
|
434
434
|
if (!url) return false;
|
|
435
|
-
const authEndpoints = [
|
|
435
|
+
const authEndpoints = [
|
|
436
|
+
"/jwt-auth/",
|
|
437
|
+
"/customers/me",
|
|
438
|
+
"/wp/v2/users/me",
|
|
439
|
+
// Store API non-cart endpoints: inject JWT when available so authenticated
|
|
440
|
+
// users can access their own resources (e.g. orders, personalised product data)
|
|
441
|
+
"/wc/store/v1/order"
|
|
442
|
+
];
|
|
436
443
|
return authEndpoints.some((endpoint) => url.includes(endpoint));
|
|
437
444
|
};
|
|
438
445
|
var requiresCartAuth = (url) => {
|