@communecter/cocolight-api-client 1.0.24 → 1.0.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@communecter/cocolight-api-client",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "Client Axios simplifié pour l'API cocolight",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,10 +8,16 @@
8
8
  },
9
9
  "homepage": "https://gitlab.adullact.net/pixelhumain/cocolight-api-client#readme",
10
10
  "main": "./dist/cocolight-api-client.cjs",
11
+ "module": "./dist/cocolight-api-client.vite.mjs.js",
11
12
  "browser": "./dist/cocolight-api-client.browser.js",
12
13
  "exports": {
13
- "import": "./dist/cocolight-api-client.mjs.js",
14
- "require": "./dist/cocolight-api-client.cjs"
14
+ "import": {
15
+ "vite": "./dist/cocolight-api-client.vite.mjs.js",
16
+ "browser": "./dist/cocolight-api-client.vite.mjs.js",
17
+ "default": "./dist/cocolight-api-client.vite.mjs.js"
18
+ },
19
+ "require": "./dist/cocolight-api-client.cjs",
20
+ "default": "./dist/cocolight-api-client.mjs.js"
15
21
  },
16
22
  "type": "module",
17
23
  "scripts": {
@@ -23,7 +29,9 @@
23
29
  "build:browser": "webpack --config webpack.config.standalone.js",
24
30
  "build:node": "webpack --config webpack.config.node.js",
25
31
  "build:esm": "webpack --config webpack.config.esm.mjs",
26
- "build": "npm run generate:module:publish && npm run generate:methodeapi && npm run generate:doc && npm run lint:fix && npm run build:browser && npm run build:node && npm run build:esm",
32
+ "build:esm:rollup": "rollup -c rollup.config.mjs",
33
+ "verif:esm": "webpack --config webpack.config.esm.mjs --profile --json > stats.json",
34
+ "build": "npm run generate:module:publish && npm run generate:methodeapi && npm run generate:doc && npm run lint:fix && npm run build:browser && npm run build:node && npm run build:esm && npm run build:esm:rollup",
27
35
  "build:publish": "npm run build && npm publish --access public",
28
36
  "generate:module": "node ./scripts/transform-json-module.js",
29
37
  "generate:module:publish": "node ./scripts/transform-json-module.publish.js",
@@ -67,6 +75,11 @@
67
75
  "@babel/core": "^7.26.10",
68
76
  "@babel/preset-env": "^7.26.9",
69
77
  "@eslint/js": "^9.23.0",
78
+ "@rollup/plugin-babel": "^6.0.4",
79
+ "@rollup/plugin-commonjs": "^28.0.3",
80
+ "@rollup/plugin-json": "^6.1.0",
81
+ "@rollup/plugin-node-resolve": "^16.0.1",
82
+ "@rollup/plugin-terser": "^0.4.4",
70
83
  "@segment/ajv-human-errors": "^2.15.0",
71
84
  "ajv": "^8.17.1",
72
85
  "ajv-formats": "^3.0.1",
@@ -87,6 +100,8 @@
87
100
  "nodemon": "^3.1.9",
88
101
  "pino": "^9.6.0",
89
102
  "pino-pretty": "^13.0.0",
103
+ "rollup": "^4.40.0",
104
+ "rollup-plugin-peer-deps-external": "^2.2.4",
90
105
  "webpack": "^5.98.0",
91
106
  "webpack-cli": "^6.0.1"
92
107
  }
@@ -1348,6 +1348,21 @@ class EndpointApi {
1348
1348
  return this.callIsConnected("FOLLOW", data);
1349
1349
  }
1350
1350
 
1351
+ /**
1352
+ * Récuperer les data d'un JSON d'un costum : Récuperer les data d'un JSON d'un costum
1353
+ * Constant : GET_COSTUM_JSON
1354
+ * @param {import("./EndpointApi.types").GetCostumJsonData} data - Données envoyées à l'API
1355
+ * @returns {Promise<Object>} - Les données de réponse.
1356
+ * @throws {ApiResponseError} - En cas d'erreur détectée dans la réponse.
1357
+ * @throws {Error} - En cas d'erreur inattendue.
1358
+ */
1359
+ async getCostumJson(data) {
1360
+ if (!data || typeof data !== "object") {
1361
+ throw new TypeError("Le paramètre data doit être un objet.");
1362
+ }
1363
+ return this.call("GET_COSTUM_JSON", data);
1364
+ }
1365
+
1351
1366
  }
1352
1367
 
1353
1368
  export default EndpointApi;
@@ -3482,3 +3482,11 @@ export interface FollowData {
3482
3482
  parentId: string;
3483
3483
  [k: string]: unknown;
3484
3484
  }
3485
+
3486
+
3487
+ export interface GetCostumJsonData {
3488
+ pathParams?: {
3489
+ [k: string]: unknown;
3490
+ };
3491
+ [k: string]: unknown;
3492
+ }