@djust-b2b/djust-front-sdk 1.21.3 → 1.21.4
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/README.md +41 -10
- package/lib/settings/fetch-instance.js +0 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,19 +1,50 @@
|
|
|
1
|
+
# Introduction
|
|
1
2
|
|
|
2
|
-
DJUST Front SDK
|
|
3
|
+
**DJUST Front SDK** is a JavaScript development kit designed to simplify and optimize API calls to the DJUST backend. It offers a secure, high-performance, and ready-to-use solution for integration partners, thus facilitating the implementation of robust e-commerce solutions for your clients.
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
## 🚀 **Why use DJUST Front SDK ?**
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
### **🔒 Secure API Calls**
|
|
10
|
+
Ensure secure communications between your frontend applications and the DJUST backend through integrated mechanisms for managing requests and responses.
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
### **⚡ Performance Optimization**
|
|
13
|
+
DJUST Front SDK is designed to:
|
|
14
|
+
- Minimize response times through optimized methods.
|
|
15
|
+
- Efficiently manage API calls by avoiding redundancies.
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
### **🧩 A Simplified Integration**
|
|
18
|
+
- **Easy to configure** : A clear and documented API for a quick start.
|
|
19
|
+
- **Universal** : Compatible with all JavaScript environments (Vue.js, React, Nuxt, Angular, etc.).
|
|
14
20
|
|
|
15
|
-
|
|
21
|
+
### **🔧 Flexibility and Modularity**
|
|
22
|
+
Use only the methods you need for your projects. The SDK is modular, allowing you to tailor the integration according to your clients' requirements.
|
|
16
23
|
|
|
24
|
+
---
|
|
17
25
|
|
|
18
|
-
|
|
19
|
-
|
|
26
|
+
## 🛡️ **Security and Compliance**
|
|
27
|
+
|
|
28
|
+
The SDK incorporates best practices to ensure :
|
|
29
|
+
- A **secure management of authentication tokens**.
|
|
30
|
+
- Compliance with security standards to protect data exchanges.
|
|
31
|
+
- A **reliability** in requests through centralized error handling.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 📈 **Benefits for Partners**
|
|
36
|
+
|
|
37
|
+
- **Accelerate your integrations** : Save time by using a ready-to-use SDK.
|
|
38
|
+
- **Secure your projects** : Assure your clients with robust and secure backend calls.
|
|
39
|
+
- **Maximize performance** : Provide smooth experiences with fast and optimized interactions.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 📄 **Licence**
|
|
44
|
+
|
|
45
|
+
DJUST Front SDK is distributed under the **MIT license**, providing you with complete freedom to use it in your projects.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
With **DJUST Front SDK**, simplify your backend integrations, ensure exceptional performance, and provide reliable and secure e-commerce solutions for your clients.
|
|
@@ -94,12 +94,6 @@ const enhancedFetch = async ({ path, method, params = {}, body, }) => {
|
|
|
94
94
|
"dj-api-key": apiKey,
|
|
95
95
|
"Content-Type": "application/json",
|
|
96
96
|
});
|
|
97
|
-
// if (isBrowser()) {
|
|
98
|
-
// const token = getCookie("token");
|
|
99
|
-
// if (token) {
|
|
100
|
-
// requestHeaders.append("Authorization", `Bearer ${token}`);
|
|
101
|
-
// }
|
|
102
|
-
// }
|
|
103
97
|
if (!isPublicRoute(path, method) && accessToken)
|
|
104
98
|
requestHeaders.append("Authorization", `Bearer ${accessToken}`);
|
|
105
99
|
if (locale)
|