@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 CHANGED
@@ -1,86 +1,93 @@
1
- <h1 align="center">Welcome to node-magento-eqp 👋</h1>
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
- <a href="https://github.com/netresearch/node-magento-eqp/blob/master/LICENSE" target="_blank">
8
- <img alt="License: MIT" src="https://img.shields.io/npm/l/@netresearch/node-magento-eqp.svg?style=for-the-badge" />
9
- </a>
3
+ [![npm version](https://img.shields.io/npm/v/@netresearch/node-magento-eqp?style=flat-square)](https://www.npmjs.com/package/@netresearch/node-magento-eqp)
4
+ [![CI](https://img.shields.io/github/actions/workflow/status/netresearch/node-magento-eqp/lint.and.build.yml?branch=main&style=flat-square&label=CI)](https://github.com/netresearch/node-magento-eqp/actions/workflows/lint.and.build.yml)
5
+ [![CodeQL](https://img.shields.io/github/actions/workflow/status/netresearch/node-magento-eqp/codeql.yml?branch=main&style=flat-square&label=CodeQL)](https://github.com/netresearch/node-magento-eqp/actions/workflows/codeql.yml)
6
+ [![License: MIT](https://img.shields.io/npm/l/@netresearch/node-magento-eqp?style=flat-square)](https://github.com/netresearch/node-magento-eqp/blob/main/LICENSE)
7
+ [![Node.js](https://img.shields.io/node/v/@netresearch/node-magento-eqp?style=flat-square)](https://nodejs.org)
8
+ [![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue?style=flat-square)](https://www.typescriptlang.org/)
9
+ [![Documentation](https://img.shields.io/badge/docs-TypeDoc-green?style=flat-square)](https://netresearch.github.io/node-magento-eqp)
10
10
 
11
- <a href="https://github.com/netresearch/node-magento-eqp/actions" target="_blank">
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
- <a href="https://netresearch.github.io/node-magento-eqp" target="_blank">
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
- <a href="https://twitter.com/netresearch" target="_blank">
20
- <img alt="Twitter: Netresearch" src="https://img.shields.io/twitter/follow/netresearch?style=for-the-badge" />
21
- </a>
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
- ## Install
19
+ or
29
20
 
30
21
  ```sh
31
- yarn install @netresearch/node-magento-eqp
22
+ npm install @netresearch/node-magento-eqp
32
23
  ```
33
24
 
34
25
  ## Usage
35
26
 
36
- Usage in TypeScript (with ES Modules)
27
+ ### TypeScript (ES Modules)
37
28
 
38
29
  ```typescript
39
- import * as MagentoEQP from '@netresearch/node-magento-eqp';
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
- const packages = await eqp.getPackages();
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
- // Do something with the packages
49
- }
50
-
51
- main();
38
+ const packages = await eqp.packageService.getPackages();
52
39
  ```
53
40
 
54
- Usage in JavaScript (with CommonJS)
41
+ ### JavaScript (CommonJS)
55
42
 
56
- ```typescript
57
- const MagentoEQP = require('@netresearch/node-magento-eqp');
43
+ ```javascript
44
+ const { EQP } = require('@netresearch/node-magento-eqp');
58
45
 
59
- const eqp = new MagentoEQP.EQP();
46
+ (async () => {
47
+ const eqp = new EQP({
48
+ appId: 'YOUR_APP_ID',
49
+ appSecret: 'YOUR_APP_SECRET'
50
+ });
60
51
 
61
- async function main() {
62
- await eqp.authenticate('APP_ID', 'APP_SECRET');
52
+ const packages = await eqp.packageService.getPackages();
53
+ console.log(packages);
54
+ })();
55
+ ```
63
56
 
64
- const packages = await eqp.getPackages();
57
+ ### Available services
65
58
 
66
- // Do something with the packages
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
- main();
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
- ## Author
79
+ ## API documentation
73
80
 
74
- 👤 **TheDevMinerTV <tobigames200@gmail.com>**
81
+ Full API documentation is available at [netresearch.github.io/node-magento-eqp](https://netresearch.github.io/node-magento-eqp).
75
82
 
76
- - Github: [@TheDevMinerTV](https://github.com/TheDevMinerTV)
83
+ ## Related packages
77
84
 
78
- ## 🤝 Contributing
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
- Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/netresearch/node-magento-eqp/issues). You can also take a look at the [contributing guide](https://github.com/netresearch/node-magento-eqp/blob/master/CONTRIBUTING.md).
87
+ ## Contributing
81
88
 
82
- ## Show your support
89
+ Contributions, issues, and feature requests are welcome. See the [contributing guide](CONTRIBUTING.md) for details.
83
90
 
84
- Give a ⭐️ if this project helped you!
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.8",
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 --ext .ts",
19
- "prepack": "yarn build:lib"
18
+ "lint": "eslint src",
19
+ "prepack": "yarn build:lib",
20
+ "prepare": "husky"
20
21
  },
21
22
  "devDependencies": {
22
- "@types/node": "^22.0.0",
23
- "@typescript-eslint/eslint-plugin": "^8.0.0",
24
- "@typescript-eslint/parser": "^8.0.0",
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.12.2",
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
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
- "extends": [
4
- "config:base"
5
- ]
3
+ "extends": ["config:recommended", ":automergeMinor", ":automergePatch"],
4
+ "platformAutomerge": true
6
5
  }