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