n8n-nodes-amazon-selling-partner-marketplace 0.0.14
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/LICENSE.md +19 -0
- package/README.md +125 -0
- package/dist/credentials/AmazonSpApi.credentials.d.ts +10 -0
- package/dist/credentials/AmazonSpApi.credentials.js +267 -0
- package/dist/credentials/AmazonSpApi.credentials.js.map +1 -0
- package/dist/icons/amazon-sp.dark.svg +13 -0
- package/dist/icons/amazon-sp.svg +13 -0
- package/dist/nodes/AmazonSellingPartner/AmazonSellingPartner.node.d.ts +5 -0
- package/dist/nodes/AmazonSellingPartner/AmazonSellingPartner.node.js +93 -0
- package/dist/nodes/AmazonSellingPartner/AmazonSellingPartner.node.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/AmazonSellingPartner.node.json +18 -0
- package/dist/nodes/AmazonSellingPartner/amazonSpApi.svg +25 -0
- package/dist/nodes/AmazonSellingPartner/core/AuditLogger.d.ts +67 -0
- package/dist/nodes/AmazonSellingPartner/core/AuditLogger.js +296 -0
- package/dist/nodes/AmazonSellingPartner/core/AuditLogger.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/core/ErrorHandler.d.ts +6 -0
- package/dist/nodes/AmazonSellingPartner/core/ErrorHandler.js +82 -0
- package/dist/nodes/AmazonSellingPartner/core/ErrorHandler.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/core/MetricsCollector.d.ts +48 -0
- package/dist/nodes/AmazonSellingPartner/core/MetricsCollector.js +181 -0
- package/dist/nodes/AmazonSellingPartner/core/MetricsCollector.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/core/RateLimiter.d.ts +43 -0
- package/dist/nodes/AmazonSellingPartner/core/RateLimiter.js +260 -0
- package/dist/nodes/AmazonSellingPartner/core/RateLimiter.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/core/SecurityValidator.d.ts +35 -0
- package/dist/nodes/AmazonSellingPartner/core/SecurityValidator.js +383 -0
- package/dist/nodes/AmazonSellingPartner/core/SecurityValidator.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/core/rateLimitConfig.d.ts +14 -0
- package/dist/nodes/AmazonSellingPartner/core/rateLimitConfig.js +93 -0
- package/dist/nodes/AmazonSellingPartner/core/rateLimitConfig.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/descriptions/Custom.description.d.ts +3 -0
- package/dist/nodes/AmazonSellingPartner/descriptions/Custom.description.js +147 -0
- package/dist/nodes/AmazonSellingPartner/descriptions/Custom.description.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/generated/Generated.description.d.ts +4977 -0
- package/dist/nodes/AmazonSellingPartner/generated/Generated.description.js +40893 -0
- package/dist/nodes/AmazonSellingPartner/generated/Generated.description.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/helpers/LwaClient.d.ts +10 -0
- package/dist/nodes/AmazonSellingPartner/helpers/LwaClient.js +79 -0
- package/dist/nodes/AmazonSellingPartner/helpers/LwaClient.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/helpers/RdtClient.d.ts +11 -0
- package/dist/nodes/AmazonSellingPartner/helpers/RdtClient.js +66 -0
- package/dist/nodes/AmazonSellingPartner/helpers/RdtClient.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/helpers/ReportDownloader.d.ts +16 -0
- package/dist/nodes/AmazonSellingPartner/helpers/ReportDownloader.js +65 -0
- package/dist/nodes/AmazonSellingPartner/helpers/ReportDownloader.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/helpers/SigV4Signer.d.ts +4 -0
- package/dist/nodes/AmazonSellingPartner/helpers/SigV4Signer.js +76 -0
- package/dist/nodes/AmazonSellingPartner/helpers/SigV4Signer.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/helpers/SpApiRequest.d.ts +23 -0
- package/dist/nodes/AmazonSellingPartner/helpers/SpApiRequest.js +220 -0
- package/dist/nodes/AmazonSellingPartner/helpers/SpApiRequest.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/helpers/downloadPresigned.d.ts +4 -0
- package/dist/nodes/AmazonSellingPartner/helpers/downloadPresigned.js +16 -0
- package/dist/nodes/AmazonSellingPartner/helpers/downloadPresigned.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/helpers/graphql.d.ts +1 -0
- package/dist/nodes/AmazonSellingPartner/helpers/graphql.js +13 -0
- package/dist/nodes/AmazonSellingPartner/helpers/graphql.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/operations/Custom.operations.d.ts +2 -0
- package/dist/nodes/AmazonSellingPartner/operations/Custom.operations.js +232 -0
- package/dist/nodes/AmazonSellingPartner/operations/Custom.operations.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/operations/Generated.operations.d.ts +2 -0
- package/dist/nodes/AmazonSellingPartner/operations/Generated.operations.js +186 -0
- package/dist/nodes/AmazonSellingPartner/operations/Generated.operations.js.map +1 -0
- package/dist/nodes/AmazonSellingPartner/operations/analytics/constants.d.ts +126 -0
- package/dist/nodes/AmazonSellingPartner/operations/analytics/constants.js +213 -0
- package/dist/nodes/AmazonSellingPartner/operations/analytics/constants.js.map +1 -0
- package/dist/package.json +63 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +63 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright 2022 n8n
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
7
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
8
|
+
so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# n8n-nodes-amazon-selling-partner-marketplace
|
|
2
|
+
|
|
3
|
+
Community node for the Amazon Selling Partner API (SP-API). The node generates resources and operations automatically from the official Amazon SP-API models and includes a flexible Custom API Call.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Follow the n8n community nodes installation guide:
|
|
8
|
+
https://docs.n8n.io/integrations/community-nodes/installation/
|
|
9
|
+
|
|
10
|
+
## Credentials
|
|
11
|
+
|
|
12
|
+
Create an SP-API application in Seller Central and collect the following:
|
|
13
|
+
|
|
14
|
+
- Application ID
|
|
15
|
+
- LWA Client ID
|
|
16
|
+
- LWA Client Secret
|
|
17
|
+
- LWA Refresh Token (from app authorization)
|
|
18
|
+
- AWS Access Key ID
|
|
19
|
+
- AWS Secret Access Key
|
|
20
|
+
- Primary Marketplace (must match your app authorization)
|
|
21
|
+
- AWS Region (must match your marketplace)
|
|
22
|
+
|
|
23
|
+
Notes:
|
|
24
|
+
- Seller ID is optional. If provided, it is used directly. If missing, the node tries to auto-detect via marketplace participations.
|
|
25
|
+
- LWA tokens are refreshed automatically when needed.
|
|
26
|
+
|
|
27
|
+
Official docs:
|
|
28
|
+
- https://developer-docs.amazon.com/sp-api/docs/connecting-to-the-selling-partner-api
|
|
29
|
+
- https://developer-docs.amazon.com/sp-api/docs/registering-your-application
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
### Resources and operations
|
|
34
|
+
|
|
35
|
+
All resources and operations are generated from the official SP-API models repository:
|
|
36
|
+
https://github.com/amzn/selling-partner-api-models/tree/main/models
|
|
37
|
+
|
|
38
|
+
If Amazon adds or updates an API model, the node can be regenerated automatically.
|
|
39
|
+
|
|
40
|
+
### Custom API Call
|
|
41
|
+
|
|
42
|
+
Use the Custom resource when you need an endpoint that is not mapped yet or when you want full control.
|
|
43
|
+
|
|
44
|
+
Custom Request supports:
|
|
45
|
+
- Method
|
|
46
|
+
- Endpoint (path or full URL)
|
|
47
|
+
- Query (JSON)
|
|
48
|
+
- Body (JSON)
|
|
49
|
+
- Headers (JSON)
|
|
50
|
+
- Response type (json or text)
|
|
51
|
+
- Include response metadata
|
|
52
|
+
|
|
53
|
+
You can also use "Request via JSON Definition" to submit a full request object (or an array of requests).
|
|
54
|
+
|
|
55
|
+
#### Example 1: Catalog Items search (Custom Request)
|
|
56
|
+
|
|
57
|
+
- Resource: Custom
|
|
58
|
+
- Operation: Custom Request
|
|
59
|
+
- Method: GET
|
|
60
|
+
- Endpoint: /catalog/2022-04-01/items
|
|
61
|
+
- Query (JSON):
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"marketplaceIds": ["A1PA6795UKMFR9"],
|
|
66
|
+
"keywords": ["keyboard"],
|
|
67
|
+
"includedData": ["summaries"],
|
|
68
|
+
"pageSize": 10
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
#### Example 2: Listings Items get (Custom Request)
|
|
73
|
+
|
|
74
|
+
Replace the placeholders with your sellerId and SKU (you can also use an expression in the Endpoint field).
|
|
75
|
+
|
|
76
|
+
- Resource: Custom
|
|
77
|
+
- Operation: Custom Request
|
|
78
|
+
- Method: GET
|
|
79
|
+
- Endpoint: /listings/2021-08-01/items/SELLER_ID/SKU
|
|
80
|
+
- Query (JSON):
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"marketplaceIds": ["A1PA6795UKMFR9"],
|
|
85
|
+
"includedData": ["summaries"],
|
|
86
|
+
"issueLocale": "de_DE"
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### Example 3: JSON Definition (single request)
|
|
91
|
+
|
|
92
|
+
- Resource: Custom
|
|
93
|
+
- Operation: Request via JSON Definition
|
|
94
|
+
- Request Definition (JSON):
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"method": "GET",
|
|
99
|
+
"endpoint": "/catalog/2022-04-01/items",
|
|
100
|
+
"query": {
|
|
101
|
+
"marketplaceIds": ["A1PA6795UKMFR9"],
|
|
102
|
+
"keywords": ["headphones"],
|
|
103
|
+
"includedData": ["summaries"],
|
|
104
|
+
"pageSize": 5
|
|
105
|
+
},
|
|
106
|
+
"responseType": "json",
|
|
107
|
+
"includeMetadata": false
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Auto-generation
|
|
112
|
+
|
|
113
|
+
To regenerate resources and operations locally:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
npm run generate:spapi
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
A GitLab CI job is included in `.gitlab-ci.yml` to auto-regenerate on a schedule and push updates back to the repository.
|
|
120
|
+
|
|
121
|
+
## Resources
|
|
122
|
+
|
|
123
|
+
- SP-API Reference: https://developer-docs.amazon.com/sp-api/reference/welcome-to-api-references
|
|
124
|
+
- SP-API Models: https://github.com/amzn/selling-partner-api-models
|
|
125
|
+
- n8n Community Nodes: https://docs.n8n.io/integrations/#community-nodes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Icon, IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class AmazonSpApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
icon: Icon;
|
|
6
|
+
documentationUrl: string;
|
|
7
|
+
properties: INodeProperties[];
|
|
8
|
+
authenticate: IAuthenticateGeneric;
|
|
9
|
+
test: ICredentialTestRequest;
|
|
10
|
+
}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AmazonSpApi = void 0;
|
|
4
|
+
class AmazonSpApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'amazonSpApi';
|
|
7
|
+
this.displayName = 'Amazon Selling Partner API';
|
|
8
|
+
this.icon = { light: 'file:../icons/amazon-sp.svg', dark: 'file:../icons/amazon-sp.dark.svg' };
|
|
9
|
+
this.documentationUrl = 'https://developer-docs.amazon.com/sp-api/docs/what-is-the-selling-partner-api';
|
|
10
|
+
this.properties = [
|
|
11
|
+
{
|
|
12
|
+
displayName: 'Environment',
|
|
13
|
+
name: 'environment',
|
|
14
|
+
type: 'options',
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Production',
|
|
18
|
+
value: 'production',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'Sandbox',
|
|
22
|
+
value: 'sandbox',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
default: 'production',
|
|
26
|
+
description: 'The environment to use for API calls. Use Production for live seller data.',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
displayName: 'Primary Marketplace',
|
|
30
|
+
name: 'primaryMarketplace',
|
|
31
|
+
type: 'options',
|
|
32
|
+
options: [
|
|
33
|
+
{
|
|
34
|
+
name: '🇺🇸 United States (amazon.com)',
|
|
35
|
+
value: 'ATVPDKIKX0DER',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: '🇨🇦 Canada (amazon.ca)',
|
|
39
|
+
value: 'A2EUQ1WTGCTBG2',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: '🇲🇽 Mexico (amazon.com.mx)',
|
|
43
|
+
value: 'A1AM78C64UM0Y8',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: '🇧🇷 Brazil (amazon.com.br)',
|
|
47
|
+
value: 'A2Q3Y263D00KWC',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: '🇬🇧 United Kingdom (amazon.co.uk)',
|
|
51
|
+
value: 'A1F83G8C2ARO7P',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: '🇩🇪 Germany (amazon.de)',
|
|
55
|
+
value: 'A1PA6795UKMFR9',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: '🇫🇷 France (amazon.fr)',
|
|
59
|
+
value: 'A13V1IB3VIYZZH',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: '🇮🇹 Italy (amazon.it)',
|
|
63
|
+
value: 'APJ6JRA9NG5V4',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: '🇪🇸 Spain (amazon.es)',
|
|
67
|
+
value: 'A1RKKUPIHCS9HS',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: '🇳🇱 Netherlands (amazon.nl)',
|
|
71
|
+
value: 'A1805IZSGTT6HS',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: '🇵🇱 Poland (amazon.pl)',
|
|
75
|
+
value: 'A1C3SOZRARQ6R3',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: '🇸🇪 Sweden (amazon.se)',
|
|
79
|
+
value: 'A2NODRKZP88ZB9',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: '🇧🇪 Belgium (amazon.com.be)',
|
|
83
|
+
value: 'AMEN7PMS3EDWL',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: '🇮🇳 India (amazon.in)',
|
|
87
|
+
value: 'A21TJRUUN4KGV',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: '🇹🇷 Turkey (amazon.com.tr)',
|
|
91
|
+
value: 'A33AVAJ2PDY3EV',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: '🇦🇪 United Arab Emirates (amazon.ae)',
|
|
95
|
+
value: 'A2VIGQ35RCS4UG',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: '🇸🇦 Saudi Arabia (amazon.sa)',
|
|
99
|
+
value: 'A17E79C6D8DWNP',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: '🇪🇬 Egypt (amazon.eg)',
|
|
103
|
+
value: 'ARBP9OOSHTCHU',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: '🇯🇵 Japan (amazon.co.jp)',
|
|
107
|
+
value: 'A1VC38T7YXB528',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: '🇦🇺 Australia (amazon.com.au)',
|
|
111
|
+
value: 'A39IBJ37TRP1C6',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: '🇸🇬 Singapore (amazon.sg)',
|
|
115
|
+
value: 'A19VAU5U5O7RUS',
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
default: 'A1PA6795UKMFR9',
|
|
119
|
+
required: true,
|
|
120
|
+
description: 'Select the primary marketplace where your SP-API app is authorized. This MUST match the marketplace you selected during app authorization in Seller Central. Selecting the wrong marketplace will cause 403 Unauthorized errors.',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
displayName: 'AWS Region',
|
|
124
|
+
name: 'awsRegion',
|
|
125
|
+
type: 'options',
|
|
126
|
+
options: [
|
|
127
|
+
{
|
|
128
|
+
name: 'North America (US, CA, MX, BR)',
|
|
129
|
+
value: 'us-east-1',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: 'Europe (UK, DE, FR, IT, ES, NL, PL, SE, BE, IN, TR, AE, SA, EG)',
|
|
133
|
+
value: 'eu-west-1',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'Far East (JP, AU, SG)',
|
|
137
|
+
value: 'us-west-2',
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
default: 'eu-west-1',
|
|
141
|
+
description: 'AWS region must match your primary marketplace. North America: US/CA/MX/BR. Europe: UK/DE/FR/IT/ES/NL/PL/SE/BE/IN/TR/AE/SA/EG. Far East: JP/AU/SG.',
|
|
142
|
+
hint: 'This should auto-match your Primary Marketplace selection above',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
displayName: 'Important: Marketplace & Region Mapping',
|
|
146
|
+
name: 'marketplaceNotice',
|
|
147
|
+
type: 'notice',
|
|
148
|
+
default: '',
|
|
149
|
+
description: '⚠️ The AWS Region MUST match your Primary Marketplace: • North America (us-east-1): US, Canada, Mexico, Brazil • Europe (eu-west-1): UK, Germany, France, Italy, Spain, Netherlands, Poland, Sweden, Belgium, India, Turkey, UAE, Saudi Arabia, Egypt • Far East (us-west-2): Japan, Australia, Singapore. Selecting the wrong region will cause 403 Unauthorized errors!',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
displayName: 'Authentication Notice',
|
|
153
|
+
name: 'authNotice',
|
|
154
|
+
type: 'notice',
|
|
155
|
+
default: '',
|
|
156
|
+
description: 'SP-API requests require LWA and AWS SigV4 signing. Provide both LWA and AWS credentials below.',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
displayName: 'Application ID',
|
|
160
|
+
name: 'applicationId',
|
|
161
|
+
type: 'string',
|
|
162
|
+
default: '',
|
|
163
|
+
required: true,
|
|
164
|
+
description: 'Amazon SP-API application ID shown in Seller Central (needed for self-authorization)',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
displayName: 'LWA Client ID',
|
|
168
|
+
name: 'lwaClientId',
|
|
169
|
+
type: 'string',
|
|
170
|
+
default: '',
|
|
171
|
+
required: true,
|
|
172
|
+
description: 'Login with Amazon (LWA) Client ID from your SP-API application',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
displayName: 'LWA Client Secret',
|
|
176
|
+
name: 'lwaClientSecret',
|
|
177
|
+
type: 'string',
|
|
178
|
+
typeOptions: {
|
|
179
|
+
password: true,
|
|
180
|
+
},
|
|
181
|
+
default: '',
|
|
182
|
+
required: true,
|
|
183
|
+
description: 'Login with Amazon (LWA) Client Secret from your SP-API application',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
displayName: 'LWA Refresh Token',
|
|
187
|
+
name: 'lwaRefreshToken',
|
|
188
|
+
type: 'string',
|
|
189
|
+
typeOptions: {
|
|
190
|
+
password: true,
|
|
191
|
+
},
|
|
192
|
+
default: '',
|
|
193
|
+
required: true,
|
|
194
|
+
description: 'Login with Amazon (LWA) Refresh Token obtained during authorization',
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
displayName: 'Seller ID',
|
|
198
|
+
name: 'sellerId',
|
|
199
|
+
type: 'string',
|
|
200
|
+
default: '',
|
|
201
|
+
description: 'Optional: Seller ID to avoid auto-extraction via marketplace participations',
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
displayName: 'AWS Access Key ID',
|
|
205
|
+
name: 'awsAccessKeyId',
|
|
206
|
+
type: 'string',
|
|
207
|
+
default: '',
|
|
208
|
+
required: true,
|
|
209
|
+
description: 'IAM user access key for SigV4 signing',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
displayName: 'AWS Secret Access Key',
|
|
213
|
+
name: 'awsSecretAccessKey',
|
|
214
|
+
type: 'string',
|
|
215
|
+
typeOptions: {
|
|
216
|
+
password: true,
|
|
217
|
+
},
|
|
218
|
+
default: '',
|
|
219
|
+
required: true,
|
|
220
|
+
description: 'IAM user secret key for SigV4 signing',
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
displayName: 'Advanced Options',
|
|
224
|
+
name: 'advancedOptions',
|
|
225
|
+
type: 'collection',
|
|
226
|
+
placeholder: 'Add Advanced Option',
|
|
227
|
+
default: {},
|
|
228
|
+
options: [
|
|
229
|
+
{
|
|
230
|
+
displayName: 'SP-API Endpoint Override',
|
|
231
|
+
name: 'spApiEndpoint',
|
|
232
|
+
type: 'string',
|
|
233
|
+
default: '',
|
|
234
|
+
description: 'Override the default SP-API endpoint URL',
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
},
|
|
238
|
+
];
|
|
239
|
+
this.authenticate = {
|
|
240
|
+
type: 'generic',
|
|
241
|
+
properties: {},
|
|
242
|
+
};
|
|
243
|
+
this.test = {
|
|
244
|
+
request: {
|
|
245
|
+
method: 'POST',
|
|
246
|
+
url: 'https://api.amazon.com/auth/o2/token',
|
|
247
|
+
headers: {
|
|
248
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
249
|
+
'Accept': 'application/json',
|
|
250
|
+
},
|
|
251
|
+
body: '={{"grant_type=refresh_token&refresh_token=" + encodeURIComponent($credentials.lwaRefreshToken) + "&client_id=" + encodeURIComponent($credentials.lwaClientId) + "&client_secret=" + encodeURIComponent($credentials.lwaClientSecret)}}',
|
|
252
|
+
json: false,
|
|
253
|
+
},
|
|
254
|
+
rules: [
|
|
255
|
+
{
|
|
256
|
+
type: 'responseCode',
|
|
257
|
+
properties: {
|
|
258
|
+
value: 200,
|
|
259
|
+
message: 'Invalid LWA credentials or refresh token',
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
],
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
exports.AmazonSpApi = AmazonSpApi;
|
|
267
|
+
//# sourceMappingURL=AmazonSpApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AmazonSpApi.credentials.js","sourceRoot":"","sources":["../../credentials/AmazonSpApi.credentials.ts"],"names":[],"mappings":";;;AASA,MAAa,WAAW;IAAxB;QACC,SAAI,GAAG,a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">
|
|
2
|
+
<g fill="none" fill-rule="evenodd">
|
|
3
|
+
<path d="M37.749 22.336c-3.536 2.59-8.66 3.968-13.075 3.968-6.185 0-11.755-2.27-15.97-6.05-.332-.297-.036-.702.361-.472 4.548 2.628 10.172 4.21 15.98 4.21 3.92 0 8.226-.807 12.19-2.477.598-.251 1.099.392.514.82" fill="#EC912D"/>
|
|
4
|
+
<path d="M39.22 20.668c-.452-.575-2.989-.273-4.129-.137-.345.041-.399-.259-.087-.475 2.024-1.412 5.34-1.004 5.725-.532.388.477-.102 3.778-1.999 5.354-.292.242-.57.113-.44-.207.427-1.059 1.383-3.428.93-4.003" fill="#EC912D"/>
|
|
5
|
+
<path d="M35.172 10.085V8.713a.34.34 0 01.35-.347h6.19c.198 0 .357.142.357.345v1.177c-.002.197-.17.454-.466.863l-3.207 4.546c1.19-.027 2.45.15 3.531.753.244.136.31.338.328.535v1.464c0 .201-.222.435-.456.313-1.905-.99-4.433-1.099-6.54.013-.215.113-.44-.117-.44-.319v-1.39c0-.223.004-.604.23-.943l3.715-5.293h-3.235c-.197 0-.356-.14-.357-.345M12.591 18.65h-1.883a.354.354 0 01-.337-.316l.002-9.597c0-.193.162-.346.363-.346h1.754c.183.009.33.147.342.322v1.253h.036c.457-1.212 1.318-1.777 2.478-1.777 1.178 0 1.916.565 2.444 1.777.457-1.212 1.494-1.777 2.601-1.777.792 0 1.653.323 2.18 1.05.598.808.475 1.98.475 3.01l-.002 6.056a.354.354 0 01-.363.346H20.8a.352.352 0 01-.338-.345v-5.088c0-.404.035-1.414-.053-1.798-.14-.646-.563-.828-1.107-.828-.458 0-.932.303-1.126.788-.193.485-.175 1.292-.175 1.838v5.087a.354.354 0 01-.364.346h-1.88a.352.352 0 01-.339-.345l-.002-5.088c0-1.07.176-2.646-1.16-2.646-1.354 0-1.3 1.535-1.3 2.646l-.001 5.087a.354.354 0 01-.364.346M47.415 10.148c-1.389 0-1.476 1.878-1.476 3.05 0 1.17-.018 3.675 1.459 3.675 1.46 0 1.53-2.02 1.53-3.251 0-.808-.036-1.777-.282-2.545-.211-.667-.633-.929-1.23-.929zm-.017-1.96c2.795 0 4.307 2.384 4.307 5.414 0 2.928-1.67 5.251-4.307 5.251-2.743 0-4.237-2.384-4.237-5.352 0-2.99 1.512-5.312 4.237-5.312zM55.33 18.65h-1.877a.352.352 0 01-.338-.344l-.003-9.601a.356.356 0 01.362-.314h1.747c.164.008.3.12.335.268v1.469h.035c.527-1.314 1.265-1.94 2.566-1.94.844 0 1.67.303 2.198 1.132.492.767.492 2.06.492 2.989v6.04a.357.357 0 01-.36.302h-1.889a.354.354 0 01-.335-.302v-5.212c0-1.05.123-2.585-1.178-2.585-.457 0-.879.303-1.09.767-.263.586-.299 1.172-.299 1.818v5.168a.36.36 0 01-.366.346M32.135 18.627a.391.391 0 01-.444.043c-.626-.516-.738-.754-1.08-1.246-1.034 1.046-1.766 1.36-3.105 1.36-1.585 0-2.818-.972-2.818-2.915 0-1.518.827-2.55 2.008-3.057 1.021-.445 2.449-.526 3.541-.648v-.243c0-.445.035-.97-.229-1.356-.23-.344-.67-.486-1.057-.486-.718 0-1.357.366-1.514 1.123-.033.169-.156.336-.327.344l-1.825-.196c-.155-.035-.326-.157-.281-.391.42-2.199 2.42-2.863 4.211-2.863.917 0 2.114.243 2.836.931.917.85.828 1.984.828 3.219v2.913c0 .876.367 1.26.711 1.733.12.17.147.372-.006.497-.384.32-1.068.91-1.444 1.242l-.005-.004zm-1.898-4.56c0 .73.017 1.336-.353 1.984-.299.526-.775.85-1.303.85-.722 0-1.145-.547-1.145-1.356 0-1.593 1.439-1.882 2.801-1.882v.404zM7.448 18.627a.391.391 0 01-.445.043c-.626-.516-.738-.754-1.08-1.246-1.033 1.046-1.765 1.36-3.104 1.36-1.586 0-2.819-.972-2.819-2.915 0-1.518.828-2.55 2.008-3.057 1.022-.445 2.45-.526 3.541-.648v-.243c0-.445.036-.97-.229-1.356-.229-.344-.67-.486-1.057-.486-.718 0-1.357.366-1.513 1.123-.033.169-.157.336-.328.344L.597 11.35c-.154-.035-.325-.157-.281-.391.42-2.199 2.419-2.863 4.211-2.863.917 0 2.115.243 2.837.931.916.85.828 1.984.828 3.219v2.913c0 .876.366 1.26.71 1.733.12.17.148.372-.005.497-.385.32-1.069.91-1.445 1.242l-.004-.004zm-1.899-4.56c0 .73.018 1.336-.352 1.984-.3.526-.775.85-1.304.85-.722 0-1.145-.547-1.145-1.356 0-1.593 1.44-1.882 2.801-1.882v.404z" fill="#FFF"/>
|
|
6
|
+
<text font-family="AmazonEmber-Regular, Amazon Ember" font-size="19" letter-spacing="-1.244" fill="#FFF">
|
|
7
|
+
<tspan x="65" y="18">seller central</tspan>
|
|
8
|
+
</text>
|
|
9
|
+
<text font-family="AmazonEmber-Regular, Amazon Ember" font-size="10" letter-spacing="-.1" fill="#FFF">
|
|
10
|
+
<tspan x="127.92" y="27">europe</tspan>
|
|
11
|
+
</text>
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg width="159" height="30" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g fill="none" fill-rule="evenodd">
|
|
3
|
+
<path d="M37.749 22.336c-3.536 2.59-8.66 3.968-13.075 3.968-6.185 0-11.755-2.27-15.97-6.05-.332-.297-.036-.702.361-.472 4.548 2.628 10.172 4.21 15.98 4.21 3.92 0 8.226-.807 12.19-2.477.598-.251 1.099.392.514.82" fill="#EC912D"/>
|
|
4
|
+
<path d="M39.22 20.668c-.452-.575-2.989-.273-4.129-.137-.345.041-.399-.259-.087-.475 2.024-1.412 5.34-1.004 5.725-.532.388.477-.102 3.778-1.999 5.354-.292.242-.57.113-.44-.207.427-1.059 1.383-3.428.93-4.003" fill="#EC912D"/>
|
|
5
|
+
<path d="M35.172 10.085V8.713a.34.34 0 01.35-.347h6.19c.198 0 .357.142.357.345v1.177c-.002.197-.17.454-.466.863l-3.207 4.546c1.19-.027 2.45.15 3.531.753.244.136.31.338.328.535v1.464c0 .201-.222.435-.456.313-1.905-.99-4.433-1.099-6.54.013-.215.113-.44-.117-.44-.319v-1.39c0-.223.004-.604.23-.943l3.715-5.293h-3.235c-.197 0-.356-.14-.357-.345M12.591 18.65h-1.883a.354.354 0 01-.337-.316l.002-9.597c0-.193.162-.346.363-.346h1.754c.183.009.33.147.342.322v1.253h.036c.457-1.212 1.318-1.777 2.478-1.777 1.178 0 1.916.565 2.444 1.777.457-1.212 1.494-1.777 2.601-1.777.792 0 1.653.323 2.18 1.05.598.808.475 1.98.475 3.01l-.002 6.056a.354.354 0 01-.363.346H20.8a.352.352 0 01-.338-.345v-5.088c0-.404.035-1.414-.053-1.798-.14-.646-.563-.828-1.107-.828-.458 0-.932.303-1.126.788-.193.485-.175 1.292-.175 1.838v5.087a.354.354 0 01-.364.346h-1.88a.352.352 0 01-.339-.345l-.002-5.088c0-1.07.176-2.646-1.16-2.646-1.354 0-1.3 1.535-1.3 2.646l-.001 5.087a.354.354 0 01-.364.346M47.415 10.148c-1.389 0-1.476 1.878-1.476 3.05 0 1.17-.018 3.675 1.459 3.675 1.46 0 1.53-2.02 1.53-3.251 0-.808-.036-1.777-.282-2.545-.211-.667-.633-.929-1.23-.929zm-.017-1.96c2.795 0 4.307 2.384 4.307 5.414 0 2.928-1.67 5.251-4.307 5.251-2.743 0-4.237-2.384-4.237-5.352 0-2.99 1.512-5.312 4.237-5.312zM55.33 18.65h-1.877a.352.352 0 01-.338-.344l-.003-9.601a.356.356 0 01.362-.314h1.747c.164.008.3.12.335.268v1.469h.035c.527-1.314 1.265-1.94 2.566-1.94.844 0 1.67.303 2.198 1.132.492.767.492 2.06.492 2.989v6.04a.357.357 0 01-.36.302h-1.889a.354.354 0 01-.335-.302v-5.212c0-1.05.123-2.585-1.178-2.585-.457 0-.879.303-1.09.767-.263.586-.299 1.172-.299 1.818v5.168a.36.36 0 01-.366.346M32.135 18.627a.391.391 0 01-.444.043c-.626-.516-.738-.754-1.08-1.246-1.034 1.046-1.766 1.36-3.105 1.36-1.585 0-2.818-.972-2.818-2.915 0-1.518.827-2.55 2.008-3.057 1.021-.445 2.449-.526 3.541-.648v-.243c0-.445.035-.97-.229-1.356-.23-.344-.67-.486-1.057-.486-.718 0-1.357.366-1.514 1.123-.033.169-.156.336-.327.344l-1.825-.196c-.155-.035-.326-.157-.281-.391.42-2.199 2.42-2.863 4.211-2.863.917 0 2.114.243 2.836.931.917.85.828 1.984.828 3.219v2.913c0 .876.367 1.26.711 1.733.12.17.147.372-.006.497-.384.32-1.068.91-1.444 1.242l-.005-.004zm-1.898-4.56c0 .73.017 1.336-.353 1.984-.299.526-.775.85-1.303.85-.722 0-1.145-.547-1.145-1.356 0-1.593 1.439-1.882 2.801-1.882v.404zM7.448 18.627a.391.391 0 01-.445.043c-.626-.516-.738-.754-1.08-1.246-1.033 1.046-1.765 1.36-3.104 1.36-1.586 0-2.819-.972-2.819-2.915 0-1.518.828-2.55 2.008-3.057 1.022-.445 2.45-.526 3.541-.648v-.243c0-.445.036-.97-.229-1.356-.229-.344-.67-.486-1.057-.486-.718 0-1.357.366-1.513 1.123-.033.169-.157.336-.328.344L.597 11.35c-.154-.035-.325-.157-.281-.391.42-2.199 2.419-2.863 4.211-2.863.917 0 2.115.243 2.837.931.916.85.828 1.984.828 3.219v2.913c0 .876.366 1.26.71 1.733.12.17.148.372-.005.497-.385.32-1.069.91-1.445 1.242l-.004-.004zm-1.899-4.56c0 .73.018 1.336-.352 1.984-.3.526-.775.85-1.304.85-.722 0-1.145-.547-1.145-1.356 0-1.593 1.44-1.882 2.801-1.882v.404z" fill="#FFF"/>
|
|
6
|
+
<text font-family="AmazonEmber-Regular, Amazon Ember" font-size="19" letter-spacing="-1.244" fill="#FFF">
|
|
7
|
+
<tspan x="65" y="18">seller central</tspan>
|
|
8
|
+
</text>
|
|
9
|
+
<text font-family="AmazonEmber-Regular, Amazon Ember" font-size="10" letter-spacing="-.1" fill="#FFF">
|
|
10
|
+
<tspan x="127.92" y="27">europe</tspan>
|
|
11
|
+
</text>
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class AmazonSellingPartner implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AmazonSellingPartner = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const Generated_description_1 = require("./generated/Generated.description");
|
|
6
|
+
const Generated_operations_1 = require("./operations/Generated.operations");
|
|
7
|
+
const Custom_description_1 = require("./descriptions/Custom.description");
|
|
8
|
+
const Custom_operations_1 = require("./operations/Custom.operations");
|
|
9
|
+
class AmazonSellingPartner {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.description = {
|
|
12
|
+
displayName: 'Amazon Selling Partner',
|
|
13
|
+
name: 'amazonSellingPartner',
|
|
14
|
+
icon: 'file:amazonSpApi.svg',
|
|
15
|
+
group: ['input'],
|
|
16
|
+
version: 1,
|
|
17
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
18
|
+
description: 'Interact with Amazon Selling Partner API',
|
|
19
|
+
defaults: {
|
|
20
|
+
name: 'Amazon Selling Partner',
|
|
21
|
+
},
|
|
22
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
23
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
24
|
+
credentials: [
|
|
25
|
+
{
|
|
26
|
+
name: 'amazonSpApi',
|
|
27
|
+
required: true,
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
requestDefaults: {
|
|
31
|
+
baseURL: '={{$credentials.spApiEndpoint || $self["getSpApiEndpoint"]($credentials.awsRegion, $credentials.environment)}}',
|
|
32
|
+
headers: {
|
|
33
|
+
'Accept': 'application/json',
|
|
34
|
+
'Content-Type': 'application/json',
|
|
35
|
+
'User-Agent': 'n8n-amazon-sp-api/1.0.0',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
properties: [
|
|
39
|
+
{
|
|
40
|
+
displayName: 'Resource',
|
|
41
|
+
name: 'resource',
|
|
42
|
+
type: 'options',
|
|
43
|
+
noDataExpression: true,
|
|
44
|
+
options: [
|
|
45
|
+
{
|
|
46
|
+
name: 'Custom',
|
|
47
|
+
value: 'custom',
|
|
48
|
+
description: 'Make a custom SP-API request',
|
|
49
|
+
},
|
|
50
|
+
...Generated_description_1.generatedResourceOptions,
|
|
51
|
+
],
|
|
52
|
+
default: 'custom',
|
|
53
|
+
},
|
|
54
|
+
...Generated_description_1.generatedOperations,
|
|
55
|
+
...Generated_description_1.generatedFields,
|
|
56
|
+
...Custom_description_1.customOperations,
|
|
57
|
+
...Custom_description_1.customFields,
|
|
58
|
+
],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
async execute() {
|
|
62
|
+
const items = this.getInputData();
|
|
63
|
+
const returnData = [];
|
|
64
|
+
const resource = this.getNodeParameter('resource', 0);
|
|
65
|
+
const operation = this.getNodeParameter('operation', 0);
|
|
66
|
+
try {
|
|
67
|
+
for (let i = 0; i < items.length; i++) {
|
|
68
|
+
switch (resource) {
|
|
69
|
+
case 'custom': {
|
|
70
|
+
const customResults = await Custom_operations_1.executeCustomOperation.call(this, operation, i);
|
|
71
|
+
returnData.push(...customResults);
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
default: {
|
|
75
|
+
const generatedResults = await Generated_operations_1.executeGeneratedOperation.call(this, resource, operation, i);
|
|
76
|
+
returnData.push(...generatedResults);
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return [this.helpers.returnJsonArray(returnData)];
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
if (error instanceof n8n_workflow_1.NodeOperationError) {
|
|
85
|
+
throw error;
|
|
86
|
+
}
|
|
87
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
88
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Amazon SP-API error: ${errorMessage}`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.AmazonSellingPartner = AmazonSellingPartner;
|
|
93
|
+
//# sourceMappingURL=AmazonSellingPartner.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AmazonSellingPartner.node.js","sourceRoot":"","sources":["../../../nodes/AmazonSellingPartner/AmazonSellingPartner.node.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AAEtB,6EAI2C;AAC3C,4EAA8E;AAC9E,0EAAmF;AACnF,sEAAwE;AAExE,MAAa,oBAAoB;IAAjC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,sBAAsB;YAC5B,IAAI,EAAE,sBAAsB;YAC5B,KAAK,EAAE,CAAC,OAAO,CAAC;YAChB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE;gBACT,IAAI,EAAE,wBAAwB;aAC9B;YACD,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,aAAa;oBACnB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,eAAe,EAAE;gBAChB,OAAO,EAAE,gHAAgH;gBACzH,OAAO,EAAE;oBACR,QAAQ,EAAE,kBAAkB;oBAC5B,cAAc,EAAE,kBAAkB;oBAClC,YAAY,EAAE,yBAAyB;iBACvC;aACD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C,GAAG,gBAAgB,CAAC,CAAC;wBACrC,MAAM;oBACP,CAAC;gBACF,CAAC;YACF,CAAC;YAED,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC;QACnD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAI,KAAK,YAAY,iCAAkB,EAAE,CAAC;gBACzC,MAAM,KAAK,CAAC;YACb,CAAC;YACD,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAAC;YACvF,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,wBAAwB,YAAY,EAAE,CAAC,CAAC;QACtF,CAAC;IACF,CAAC;CAGD;AA1FD,oDA0FC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-amazon-selling-partner-marketplace",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Ecommerce"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"credentialDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://developer-docs.amazon.com/sp-api/docs/connecting-to-the-selling-partner-api"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"primaryDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://developer-docs.amazon.com/sp-api/reference/welcome-to-api-references"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
<svg fill="#000000" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
5
|
+
width="800px" height="800px" viewBox="0 0 35.418 35.418"
|
|
6
|
+
xml:space="preserve">
|
|
7
|
+
<g>
|
|
8
|
+
<path d="M20.948,9.891c-0.857,0.068-1.847,0.136-2.837,0.269c-1.516,0.195-3.032,0.461-4.284,1.053
|
|
9
|
+
c-2.439,0.994-4.088,3.105-4.088,6.209c0,3.898,2.506,5.875,5.669,5.875c1.057,0,1.913-0.129,2.703-0.328
|
|
10
|
+
c1.255-0.396,2.31-1.123,3.562-2.441c0.727,0.99,0.923,1.453,2.177,2.509c0.329,0.133,0.658,0.133,0.922-0.066
|
|
11
|
+
c0.791-0.659,2.174-1.848,2.901-2.508c0.328-0.267,0.263-0.66,0.066-0.992c-0.727-0.924-1.45-1.718-1.45-3.498v-5.943
|
|
12
|
+
c0-2.513,0.195-4.822-1.647-6.537c-1.518-1.391-3.891-1.916-5.735-1.916c-0.264,0-0.527,0-0.792,0
|
|
13
|
+
c-3.362,0.197-6.921,1.647-7.714,5.811c-0.13,0.525,0.267,0.726,0.53,0.793l3.691,0.464c0.396-0.07,0.593-0.398,0.658-0.73
|
|
14
|
+
c0.333-1.449,1.518-2.176,2.836-2.309c0.067,0,0.133,0,0.265,0c0.79,0,1.646,0.332,2.109,0.987
|
|
15
|
+
c0.523,0.795,0.461,1.853,0.461,2.775L20.948,9.891L20.948,9.891z M20.223,17.749c-0.461,0.925-1.253,1.519-2.11,1.718
|
|
16
|
+
c-0.131,0-0.327,0.068-0.526,0.068c-1.45,0-2.31-1.123-2.31-2.775c0-2.11,1.254-3.104,2.836-3.565
|
|
17
|
+
c0.857-0.197,1.847-0.265,2.836-0.265v0.793C20.948,15.243,21.01,16.43,20.223,17.749z M35.418,26.918v0.215
|
|
18
|
+
c-0.035,1.291-0.716,3.768-2.328,5.131c-0.322,0.25-0.645,0.107-0.503-0.254c0.469-1.145,1.541-3.803,1.04-4.412
|
|
19
|
+
c-0.355-0.465-1.826-0.43-3.079-0.322c-0.572,0.072-1.075,0.105-1.469,0.183c-0.357,0.033-0.431-0.287-0.071-0.537
|
|
20
|
+
c0.466-0.323,0.969-0.573,1.541-0.756c2.039-0.608,4.406-0.25,4.729,0.146C35.348,26.414,35.418,26.629,35.418,26.918z
|
|
21
|
+
M32.016,29.428c-0.466,0.357-0.965,0.682-1.468,0.973c-3.761,2.261-8.631,3.441-12.856,3.441c-6.807,0-12.895-2.512-17.514-6.709
|
|
22
|
+
c-0.396-0.324-0.073-0.789,0.393-0.539C5.549,29.5,11.709,31.26,18.084,31.26c4.013,0,8.342-0.754,12.463-2.371
|
|
23
|
+
c0.285-0.104,0.608-0.252,0.895-0.356C32.087,28.242,32.661,28.965,32.016,29.428z"/>
|
|
24
|
+
</g>
|
|
25
|
+
</svg>
|