@netresearch/node-magento-eqp 4.0.8 → 4.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 +62 -55
- package/eslint.config.mjs +18 -0
- package/package.json +16 -10
- package/renovate.json +2 -3
package/README.md
CHANGED
|
@@ -1,86 +1,93 @@
|
|
|
1
|
-
|
|
2
|
-
<p>
|
|
3
|
-
<a href="https://npmjs.com/package/@netresearch/node-magento-eqp">
|
|
4
|
-
<img alt="Version" src="https://img.shields.io/npm/v/@netresearch/node-magento-eqp?style=for-the-badge" />
|
|
5
|
-
</a>
|
|
1
|
+
# @netresearch/node-magento-eqp
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@netresearch/node-magento-eqp)
|
|
4
|
+
[](https://github.com/netresearch/node-magento-eqp/actions/workflows/lint.and.build.yml)
|
|
5
|
+
[](https://github.com/netresearch/node-magento-eqp/actions/workflows/codeql.yml)
|
|
6
|
+
[](https://github.com/netresearch/node-magento-eqp/blob/main/LICENSE)
|
|
7
|
+
[](https://nodejs.org)
|
|
8
|
+
[](https://www.typescriptlang.org/)
|
|
9
|
+
[](https://netresearch.github.io/node-magento-eqp)
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
<img alt="Build status" src="https://img.shields.io/github/workflow/status/netresearch/node-magento-eqp/%F0%9F%94%8E%20Lint?style=for-the-badge" />
|
|
13
|
-
</a>
|
|
11
|
+
TypeScript API wrapper for the [Adobe Commerce Marketplace EQP API](https://developer.adobe.com/commerce/marketplace/guides/eqp/v1/).
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
<img alt="Documentation" src="https://img.shields.io/badge/Documentation-available-green.svg?style=for-the-badge">
|
|
17
|
-
</a>
|
|
13
|
+
## Installation
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</p>
|
|
23
|
-
|
|
24
|
-
> Simple API wrapper around the Magento Marketplace EQP API
|
|
25
|
-
|
|
26
|
-
The primary focus of this package is, to provide a simple API wrapper and typings (unfinished) around the [Magento Marketplace EQP API](https://devdocs.magento.com/marketplace/eqp/v1/api.html).
|
|
15
|
+
```sh
|
|
16
|
+
yarn add @netresearch/node-magento-eqp
|
|
17
|
+
```
|
|
27
18
|
|
|
28
|
-
|
|
19
|
+
or
|
|
29
20
|
|
|
30
21
|
```sh
|
|
31
|
-
|
|
22
|
+
npm install @netresearch/node-magento-eqp
|
|
32
23
|
```
|
|
33
24
|
|
|
34
25
|
## Usage
|
|
35
26
|
|
|
36
|
-
|
|
27
|
+
### TypeScript (ES Modules)
|
|
37
28
|
|
|
38
29
|
```typescript
|
|
39
|
-
import
|
|
40
|
-
|
|
41
|
-
const eqp = new MagentoEQP.EQP();
|
|
42
|
-
|
|
43
|
-
async function main() {
|
|
44
|
-
await eqp.authenticate('APP_ID', 'APP_SECRET');
|
|
30
|
+
import { EQP } from '@netresearch/node-magento-eqp';
|
|
45
31
|
|
|
46
|
-
|
|
32
|
+
const eqp = new EQP({
|
|
33
|
+
appId: 'YOUR_APP_ID',
|
|
34
|
+
appSecret: 'YOUR_APP_SECRET',
|
|
35
|
+
environment: 'sandbox' // or 'production' (default)
|
|
36
|
+
});
|
|
47
37
|
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
main();
|
|
38
|
+
const packages = await eqp.packageService.getPackages();
|
|
52
39
|
```
|
|
53
40
|
|
|
54
|
-
|
|
41
|
+
### JavaScript (CommonJS)
|
|
55
42
|
|
|
56
|
-
```
|
|
57
|
-
const
|
|
43
|
+
```javascript
|
|
44
|
+
const { EQP } = require('@netresearch/node-magento-eqp');
|
|
58
45
|
|
|
59
|
-
|
|
46
|
+
(async () => {
|
|
47
|
+
const eqp = new EQP({
|
|
48
|
+
appId: 'YOUR_APP_ID',
|
|
49
|
+
appSecret: 'YOUR_APP_SECRET'
|
|
50
|
+
});
|
|
60
51
|
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
const packages = await eqp.packageService.getPackages();
|
|
53
|
+
console.log(packages);
|
|
54
|
+
})();
|
|
55
|
+
```
|
|
63
56
|
|
|
64
|
-
|
|
57
|
+
### Available services
|
|
65
58
|
|
|
66
|
-
|
|
67
|
-
|
|
59
|
+
| Service | Description |
|
|
60
|
+
| ----------------- | ------------------------------------------ |
|
|
61
|
+
| `packageService` | List and retrieve extension/theme packages |
|
|
62
|
+
| `fileService` | File upload metadata |
|
|
63
|
+
| `userService` | User profile management |
|
|
64
|
+
| `keyService` | Magento access keys (M1/M2) |
|
|
65
|
+
| `callbackService` | Webhook registration and event enrichment |
|
|
66
|
+
| `reportService` | Marketplace analytics (experimental) |
|
|
68
67
|
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
### Constructor options
|
|
69
|
+
|
|
70
|
+
| Option | Type | Default | Description |
|
|
71
|
+
| ------------- | --------------------------- | -------------- | --------------------------- |
|
|
72
|
+
| `appId` | `string` | _required_ | Your EQP application ID |
|
|
73
|
+
| `appSecret` | `string` | _required_ | Your EQP application secret |
|
|
74
|
+
| `environment` | `'production' \| 'sandbox'` | `'production'` | API environment |
|
|
75
|
+
| `autoRefresh` | `boolean` | `false` | _Reserved for future use_ |
|
|
76
|
+
| `expiresIn` | `number` | `360` | _Reserved for future use_ |
|
|
77
|
+
| `adapter` | `Adapter` | `AxiosAdapter` | Custom HTTP adapter |
|
|
71
78
|
|
|
72
|
-
##
|
|
79
|
+
## API documentation
|
|
73
80
|
|
|
74
|
-
|
|
81
|
+
Full API documentation is available at [netresearch.github.io/node-magento-eqp](https://netresearch.github.io/node-magento-eqp).
|
|
75
82
|
|
|
76
|
-
|
|
83
|
+
## Related packages
|
|
77
84
|
|
|
78
|
-
|
|
85
|
+
- [`@netresearch/node-red-contrib-magento-eqp`](https://github.com/netresearch/node-red-contrib-magento-eqp) — Node-RED nodes for Magento EQP callbacks
|
|
79
86
|
|
|
80
|
-
|
|
87
|
+
## Contributing
|
|
81
88
|
|
|
82
|
-
|
|
89
|
+
Contributions, issues, and feature requests are welcome. See the [contributing guide](CONTRIBUTING.md) for details.
|
|
83
90
|
|
|
84
|
-
|
|
91
|
+
## License
|
|
85
92
|
|
|
86
|
-
|
|
93
|
+
[MIT](LICENSE) - Netresearch DTT GmbH
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import eslint from '@eslint/js';
|
|
2
|
+
import tseslint from 'typescript-eslint';
|
|
3
|
+
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
4
|
+
|
|
5
|
+
export default tseslint.config(
|
|
6
|
+
{
|
|
7
|
+
ignores: ['dist/', 'docs/', 'node_modules/'],
|
|
8
|
+
},
|
|
9
|
+
eslint.configs.recommended,
|
|
10
|
+
...tseslint.configs.recommended,
|
|
11
|
+
eslintConfigPrettier,
|
|
12
|
+
{
|
|
13
|
+
files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'],
|
|
14
|
+
rules: {
|
|
15
|
+
'@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netresearch/node-magento-eqp",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Simple API wrapper around the Magento Marketplace EQP API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -15,24 +15,30 @@
|
|
|
15
15
|
"build:lib": "tsc",
|
|
16
16
|
"build:lib:dev": "tsc -w",
|
|
17
17
|
"build:docs": "typedoc --out docs --entryPoints src/index.ts",
|
|
18
|
-
"lint": "eslint src
|
|
19
|
-
"prepack": "yarn build:lib"
|
|
18
|
+
"lint": "eslint src",
|
|
19
|
+
"prepack": "yarn build:lib",
|
|
20
|
+
"prepare": "husky"
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|
|
22
|
-
"@
|
|
23
|
-
"@
|
|
24
|
-
"
|
|
25
|
-
"eslint": "^9.8.0",
|
|
23
|
+
"@eslint/js": "^10.0.0",
|
|
24
|
+
"@types/node": "^24.0.0",
|
|
25
|
+
"eslint": "^10.0.0",
|
|
26
26
|
"eslint-config-prettier": "^10.0.0",
|
|
27
|
+
"husky": "^9.1.7",
|
|
28
|
+
"lint-staged": "^16.2.7",
|
|
27
29
|
"prettier": "^3.0.0",
|
|
28
|
-
"ts-node": "^10.9.1",
|
|
29
30
|
"typedoc": "^0.28.0",
|
|
30
|
-
"typescript": "^5.1.6"
|
|
31
|
+
"typescript": "^5.1.6",
|
|
32
|
+
"typescript-eslint": "^8.0.0"
|
|
31
33
|
},
|
|
32
34
|
"dependencies": {
|
|
33
|
-
"axios": "1.
|
|
35
|
+
"axios": "1.13.5",
|
|
34
36
|
"tslib": "^2.6.0"
|
|
35
37
|
},
|
|
38
|
+
"lint-staged": {
|
|
39
|
+
"*.{ts,mts,cts,tsx}": "eslint",
|
|
40
|
+
"*.{ts,mts,cts,tsx,js,mjs,json,md,yml,yaml}": "prettier --write"
|
|
41
|
+
},
|
|
36
42
|
"engines": {
|
|
37
43
|
"node": ">=20"
|
|
38
44
|
}
|
package/renovate.json
CHANGED