@vipros-org/sdk 3.0.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/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # @vipros-org/sdk
2
+
3
+ Official JavaScript SDK for integrating VIPros cashback and loyalty points into your e-commerce website.
4
+
5
+ ## Installation via CDN (Recommended)
6
+
7
+ No npm install required. Add this to your HTML:
8
+
9
+ ### Production
10
+
11
+ ```html
12
+ <script src="https://cdn.jsdelivr.net/npm/@vipros-org/sdk@latest/vipros-sdk.min.js"></script>
13
+ ```
14
+
15
+ ### Staging (pre-production)
16
+
17
+ ```html
18
+ <script src="https://cdn.jsdelivr.net/npm/@vipros-org/sdk@beta/vipros-sdk.min.js"></script>
19
+ ```
20
+
21
+ ### Specific version
22
+
23
+ ```html
24
+ <script src="https://cdn.jsdelivr.net/npm/@vipros-org/sdk@3.0.0/vipros-sdk.min.js"></script>
25
+ ```
26
+
27
+ ## Quick Start
28
+
29
+ ```html
30
+ <script src="https://cdn.jsdelivr.net/npm/@vipros-org/sdk@latest/vipros-sdk.min.js"></script>
31
+
32
+ <script>
33
+ ViprosSDK.init({
34
+ apiKey: 'your-api-key'
35
+ });
36
+ </script>
37
+
38
+ <vipros-offer-card ean="4007123684731" price="89.99"></vipros-offer-card>
39
+ ```
40
+
41
+ ## Optional CSS
42
+
43
+ ```html
44
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@vipros-org/sdk@latest/vipros-sdk.min.css">
45
+ ```
46
+
47
+ ## API
48
+
49
+ | Method | Description |
50
+ |--------|-------------|
51
+ | `ViprosSDK.init(config)` | Initialize with API key |
52
+ | `ViprosSDK.getProductData(ean)` | Get product data |
53
+ | `ViprosSDK.getStats()` | Runtime statistics |
54
+ | `ViprosSDK.clearCache()` | Clear cached data |
55
+ | `ViprosSDK.refreshAll()` | Refresh all cards |
56
+ | `ViprosSDK.on(event, cb)` | Listen for events |
57
+
58
+ ## Support
59
+
60
+ - Email: tech@vipros.fr
61
+ - Issues: https://github.com/Do-It-VIPros/vipros-connect/issues
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@vipros-org/sdk",
3
+ "version": "3.0.0",
4
+ "description": "VIPros Partner SDK - Cashback and loyalty points integration for e-commerce",
5
+ "main": "vipros-sdk.min.js",
6
+ "module": "vipros-sdk.js",
7
+ "files": [
8
+ "vipros-sdk.js",
9
+ "vipros-sdk.min.js",
10
+ "vipros-sdk.css",
11
+ "vipros-sdk.min.css"
12
+ ],
13
+ "keywords": [
14
+ "vipros",
15
+ "cashback",
16
+ "loyalty",
17
+ "sdk",
18
+ "e-commerce",
19
+ "vipoints"
20
+ ],
21
+ "author": "VIPros <tech@vipros.fr>",
22
+ "license": "UNLICENSED",
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "https://github.com/Do-It-VIPros/vipros-connect.git"
26
+ },
27
+ "homepage": "https://vipros.fr",
28
+ "publishConfig": {
29
+ "access": "public",
30
+ "registry": "https://registry.npmjs.org/"
31
+ }
32
+ }