@shopware/api-client 0.0.3 → 0.1.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 +129 -5
- package/api-types/apiSchema-6.5.3.0.json +12154 -0
- package/api-types/apiTypes-6.5.3.0.d.ts +7738 -0
- package/api-types/index.d.ts +1 -1
- package/dist/index.d.ts +162 -160
- package/dist/index.mjs +9 -6
- package/package.json +8 -5
package/dist/index.mjs
CHANGED
|
@@ -23,13 +23,16 @@ function createAPIClient(params) {
|
|
|
23
23
|
pathParam,
|
|
24
24
|
params2
|
|
25
25
|
);
|
|
26
|
-
return apiFetch(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
...
|
|
30
|
-
|
|
26
|
+
return apiFetch(
|
|
27
|
+
requestPath,
|
|
28
|
+
{
|
|
29
|
+
...options,
|
|
30
|
+
headers: {
|
|
31
|
+
...defaultHeaders,
|
|
32
|
+
...options.headers
|
|
33
|
+
}
|
|
31
34
|
}
|
|
32
|
-
|
|
35
|
+
);
|
|
33
36
|
}
|
|
34
37
|
return {
|
|
35
38
|
invoke
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopware/api-client",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Shopware client for API connection.",
|
|
5
5
|
"author": "Shopware",
|
|
6
6
|
"repository": {
|
|
@@ -27,21 +27,24 @@
|
|
|
27
27
|
"import": "./dist/index.mjs"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@types/prettier": "^2.7.
|
|
30
|
+
"@types/prettier": "^2.7.3",
|
|
31
31
|
"@vitest/coverage-c8": "^0.32.2",
|
|
32
32
|
"prettier": "^2.8.8",
|
|
33
33
|
"vitest": "^0.32.2",
|
|
34
|
-
"eslint-config-shopware": "0.0.
|
|
34
|
+
"eslint-config-shopware": "0.0.3",
|
|
35
|
+
"@shopware/api-gen": "0.0.4",
|
|
35
36
|
"tsconfig": "0.0.0"
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|
|
38
|
-
"ofetch": "^1.
|
|
39
|
+
"ofetch": "^1.1.1"
|
|
39
40
|
},
|
|
40
41
|
"scripts": {
|
|
41
42
|
"build": "export NODE_ENV=production && unbuild && pnpm build:types",
|
|
42
43
|
"build:types": "tsc ./src/*.ts --declaration --allowJs --emitDeclarationOnly --outDir ./temp --skipLibCheck",
|
|
43
44
|
"dev": "export NODE_ENV=development && unbuild --stub",
|
|
44
|
-
"
|
|
45
|
+
"generate": "esno ../api-gen/src/cli.ts generate",
|
|
46
|
+
"lint": "eslint src/**/*.ts* --fix --max-warnings=0 && pnpm run typecheck",
|
|
47
|
+
"typecheck": "tsc --noEmit",
|
|
45
48
|
"test": "vitest run && pnpm run test:types",
|
|
46
49
|
"test:types": "vitest typecheck --run",
|
|
47
50
|
"test:bench": "vitest bench",
|