n8n-nodes-amazon-selling-partner-dnangelx 0.0.3 → 0.0.5

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.
Files changed (104) hide show
  1. package/dist/credentials/AmazonSpApi.credentials.d.ts +9 -0
  2. package/dist/credentials/AmazonSpApi.credentials.js +212 -0
  3. package/dist/credentials/AmazonSpApi.credentials.js.map +1 -0
  4. package/dist/nodes/AmazonSellingPartner/AmazonSellingPartner.node.d.ts +1 -1
  5. package/dist/nodes/AmazonSellingPartner/AmazonSellingPartner.node.js +142 -33
  6. package/dist/nodes/AmazonSellingPartner/AmazonSellingPartner.node.js.map +1 -1
  7. package/dist/nodes/AmazonSellingPartner/AmazonSellingPartner.node.json +1 -1
  8. package/dist/nodes/AmazonSellingPartner/amazonSpApi.svg +25 -0
  9. package/dist/nodes/AmazonSellingPartner/core/AuditLogger.d.ts +67 -0
  10. package/dist/nodes/AmazonSellingPartner/core/AuditLogger.js +296 -0
  11. package/dist/nodes/AmazonSellingPartner/core/AuditLogger.js.map +1 -0
  12. package/dist/nodes/AmazonSellingPartner/core/ErrorHandler.d.ts +6 -0
  13. package/dist/nodes/AmazonSellingPartner/core/ErrorHandler.js +82 -0
  14. package/dist/nodes/AmazonSellingPartner/core/ErrorHandler.js.map +1 -0
  15. package/dist/nodes/AmazonSellingPartner/core/MetricsCollector.d.ts +48 -0
  16. package/dist/nodes/AmazonSellingPartner/core/MetricsCollector.js +181 -0
  17. package/dist/nodes/AmazonSellingPartner/core/MetricsCollector.js.map +1 -0
  18. package/dist/nodes/AmazonSellingPartner/core/RateLimiter.d.ts +43 -0
  19. package/dist/nodes/AmazonSellingPartner/core/RateLimiter.js +260 -0
  20. package/dist/nodes/AmazonSellingPartner/core/RateLimiter.js.map +1 -0
  21. package/dist/nodes/AmazonSellingPartner/core/SecurityValidator.d.ts +35 -0
  22. package/dist/nodes/AmazonSellingPartner/core/SecurityValidator.js +383 -0
  23. package/dist/nodes/AmazonSellingPartner/core/SecurityValidator.js.map +1 -0
  24. package/dist/nodes/AmazonSellingPartner/core/rateLimitConfig.d.ts +14 -0
  25. package/dist/nodes/AmazonSellingPartner/core/rateLimitConfig.js +93 -0
  26. package/dist/nodes/AmazonSellingPartner/core/rateLimitConfig.js.map +1 -0
  27. package/dist/nodes/AmazonSellingPartner/descriptions/Analytics.description.d.ts +3 -0
  28. package/dist/nodes/AmazonSellingPartner/descriptions/Analytics.description.js +27 -0
  29. package/dist/nodes/AmazonSellingPartner/descriptions/Analytics.description.js.map +1 -0
  30. package/dist/nodes/AmazonSellingPartner/descriptions/DataKiosk.description.d.ts +3 -0
  31. package/dist/nodes/AmazonSellingPartner/descriptions/DataKiosk.description.js +196 -0
  32. package/dist/nodes/AmazonSellingPartner/descriptions/DataKiosk.description.js.map +1 -0
  33. package/dist/nodes/AmazonSellingPartner/descriptions/Finance.description.d.ts +3 -0
  34. package/dist/nodes/AmazonSellingPartner/descriptions/Finance.description.js +341 -0
  35. package/dist/nodes/AmazonSellingPartner/descriptions/Finance.description.js.map +1 -0
  36. package/dist/nodes/AmazonSellingPartner/descriptions/Invoices.description.d.ts +3 -0
  37. package/dist/nodes/AmazonSellingPartner/descriptions/Invoices.description.js +312 -0
  38. package/dist/nodes/AmazonSellingPartner/descriptions/Invoices.description.js.map +1 -0
  39. package/dist/nodes/AmazonSellingPartner/descriptions/Listings.description.d.ts +3 -0
  40. package/dist/nodes/AmazonSellingPartner/descriptions/Listings.description.js +292 -0
  41. package/dist/nodes/AmazonSellingPartner/descriptions/Listings.description.js.map +1 -0
  42. package/dist/nodes/AmazonSellingPartner/descriptions/Orders.description.d.ts +3 -0
  43. package/dist/nodes/AmazonSellingPartner/descriptions/Orders.description.js +202 -0
  44. package/dist/nodes/AmazonSellingPartner/descriptions/Orders.description.js.map +1 -0
  45. package/dist/nodes/AmazonSellingPartner/descriptions/Reports.description.d.ts +3 -0
  46. package/dist/nodes/AmazonSellingPartner/descriptions/Reports.description.js +289 -0
  47. package/dist/nodes/AmazonSellingPartner/descriptions/Reports.description.js.map +1 -0
  48. package/dist/nodes/AmazonSellingPartner/descriptions/Shipments.description.d.ts +3 -0
  49. package/dist/nodes/AmazonSellingPartner/descriptions/Shipments.description.js +181 -0
  50. package/dist/nodes/AmazonSellingPartner/descriptions/Shipments.description.js.map +1 -0
  51. package/dist/nodes/AmazonSellingPartner/helpers/LwaClient.d.ts +10 -0
  52. package/dist/nodes/AmazonSellingPartner/helpers/LwaClient.js +79 -0
  53. package/dist/nodes/AmazonSellingPartner/helpers/LwaClient.js.map +1 -0
  54. package/dist/nodes/AmazonSellingPartner/helpers/RdtClient.d.ts +11 -0
  55. package/dist/nodes/AmazonSellingPartner/helpers/RdtClient.js +66 -0
  56. package/dist/nodes/AmazonSellingPartner/helpers/RdtClient.js.map +1 -0
  57. package/dist/nodes/AmazonSellingPartner/helpers/ReportDownloader.d.ts +16 -0
  58. package/dist/nodes/AmazonSellingPartner/helpers/ReportDownloader.js +65 -0
  59. package/dist/nodes/AmazonSellingPartner/helpers/ReportDownloader.js.map +1 -0
  60. package/dist/nodes/AmazonSellingPartner/helpers/SigV4Signer.d.ts +4 -0
  61. package/dist/nodes/AmazonSellingPartner/helpers/SigV4Signer.js +76 -0
  62. package/dist/nodes/AmazonSellingPartner/helpers/SigV4Signer.js.map +1 -0
  63. package/dist/nodes/AmazonSellingPartner/helpers/SpApiRequest.d.ts +23 -0
  64. package/dist/nodes/AmazonSellingPartner/helpers/SpApiRequest.js +208 -0
  65. package/dist/nodes/AmazonSellingPartner/helpers/SpApiRequest.js.map +1 -0
  66. package/dist/nodes/AmazonSellingPartner/helpers/downloadPresigned.d.ts +4 -0
  67. package/dist/nodes/AmazonSellingPartner/helpers/downloadPresigned.js +16 -0
  68. package/dist/nodes/AmazonSellingPartner/helpers/downloadPresigned.js.map +1 -0
  69. package/dist/nodes/AmazonSellingPartner/helpers/graphql.d.ts +1 -0
  70. package/dist/nodes/AmazonSellingPartner/helpers/graphql.js +13 -0
  71. package/dist/nodes/AmazonSellingPartner/helpers/graphql.js.map +1 -0
  72. package/dist/nodes/AmazonSellingPartner/operations/Analytics.operations.d.ts +2 -0
  73. package/dist/nodes/AmazonSellingPartner/operations/Analytics.operations.js +66 -0
  74. package/dist/nodes/AmazonSellingPartner/operations/Analytics.operations.js.map +1 -0
  75. package/dist/nodes/AmazonSellingPartner/operations/DataKiosk.operations.d.ts +2 -0
  76. package/dist/nodes/AmazonSellingPartner/operations/DataKiosk.operations.js +249 -0
  77. package/dist/nodes/AmazonSellingPartner/operations/DataKiosk.operations.js.map +1 -0
  78. package/dist/nodes/AmazonSellingPartner/operations/Finance.operations.d.ts +2 -0
  79. package/dist/nodes/AmazonSellingPartner/operations/Finance.operations.js +444 -0
  80. package/dist/nodes/AmazonSellingPartner/operations/Finance.operations.js.map +1 -0
  81. package/dist/nodes/AmazonSellingPartner/operations/Invoices.operations.d.ts +4 -0
  82. package/dist/nodes/AmazonSellingPartner/operations/Invoices.operations.js +224 -0
  83. package/dist/nodes/AmazonSellingPartner/operations/Invoices.operations.js.map +1 -0
  84. package/dist/nodes/AmazonSellingPartner/operations/Listings.operations.d.ts +2 -0
  85. package/dist/nodes/AmazonSellingPartner/operations/Listings.operations.js +426 -0
  86. package/dist/nodes/AmazonSellingPartner/operations/Listings.operations.js.map +1 -0
  87. package/dist/nodes/AmazonSellingPartner/operations/Orders.operations.d.ts +2 -0
  88. package/dist/nodes/AmazonSellingPartner/operations/Orders.operations.js +169 -0
  89. package/dist/nodes/AmazonSellingPartner/operations/Orders.operations.js.map +1 -0
  90. package/dist/nodes/AmazonSellingPartner/operations/Reports.operations.d.ts +2 -0
  91. package/dist/nodes/AmazonSellingPartner/operations/Reports.operations.js +434 -0
  92. package/dist/nodes/AmazonSellingPartner/operations/Reports.operations.js.map +1 -0
  93. package/dist/nodes/AmazonSellingPartner/operations/Shipments.operations.d.ts +2 -0
  94. package/dist/nodes/AmazonSellingPartner/operations/Shipments.operations.js +78 -0
  95. package/dist/nodes/AmazonSellingPartner/operations/Shipments.operations.js.map +1 -0
  96. package/dist/nodes/AmazonSellingPartner/operations/analytics/constants.d.ts +126 -0
  97. package/dist/nodes/AmazonSellingPartner/operations/analytics/constants.js +213 -0
  98. package/dist/nodes/AmazonSellingPartner/operations/analytics/constants.js.map +1 -0
  99. package/dist/package.json +10 -2
  100. package/dist/tsconfig.tsbuildinfo +1 -1
  101. package/package.json +10 -2
  102. package/dist/credentials/AmazonSellingPartnerApi.credentials.d.ts +0 -16
  103. package/dist/credentials/AmazonSellingPartnerApi.credentials.js +0 -145
  104. package/dist/credentials/AmazonSellingPartnerApi.credentials.js.map +0 -1
@@ -0,0 +1,9 @@
1
+ import type { Icon, IAuthenticateGeneric, 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
+ }
@@ -0,0 +1,212 @@
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: 'A21TJRUUN4KGV',
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: 'LWA-only authentication is the default and recommended approach. AWS credentials are optional and only needed if you explicitly enable AWS SigV4 signing in Advanced Options.',
157
+ },
158
+ {
159
+ displayName: 'LWA Client ID',
160
+ name: 'lwaClientId',
161
+ type: 'string',
162
+ default: '',
163
+ required: true,
164
+ description: 'Login with Amazon (LWA) Client ID from your SP-API application',
165
+ },
166
+ {
167
+ displayName: 'LWA Client Secret',
168
+ name: 'lwaClientSecret',
169
+ type: 'string',
170
+ typeOptions: {
171
+ password: true,
172
+ },
173
+ default: '',
174
+ required: true,
175
+ description: 'Login with Amazon (LWA) Client Secret from your SP-API application',
176
+ },
177
+ {
178
+ displayName: 'LWA Refresh Token',
179
+ name: 'lwaRefreshToken',
180
+ type: 'string',
181
+ typeOptions: {
182
+ password: true,
183
+ },
184
+ default: '',
185
+ required: true,
186
+ description: 'Login with Amazon (LWA) Refresh Token obtained during authorization',
187
+ },
188
+ {
189
+ displayName: 'Advanced Options',
190
+ name: 'advancedOptions',
191
+ type: 'collection',
192
+ placeholder: 'Add Advanced Option',
193
+ default: {},
194
+ options: [
195
+ {
196
+ displayName: 'SP-API Endpoint Override',
197
+ name: 'spApiEndpoint',
198
+ type: 'string',
199
+ default: '',
200
+ description: 'Override the default SP-API endpoint URL',
201
+ },
202
+ ],
203
+ },
204
+ ];
205
+ this.authenticate = {
206
+ type: 'generic',
207
+ properties: {},
208
+ };
209
+ }
210
+ }
211
+ exports.AmazonSpApi = AmazonSpApi;
212
+ //# sourceMappingURL=AmazonSpApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AmazonSpApi.credentials.js","sourceRoot":"","sources":["../../credentials/AmazonSpApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,WAAW;IAAxB;QACC,SAA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yB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE,EAAE;SACd,CAAC;IAKH,CAAC;CAAA;AAjND,kCAiNC"}
@@ -1,4 +1,4 @@
1
- import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
2
  export declare class AmazonSellingPartner implements INodeType {
3
3
  description: INodeTypeDescription;
4
4
  execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
@@ -2,73 +2,182 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AmazonSellingPartner = void 0;
4
4
  const n8n_workflow_1 = require("n8n-workflow");
5
+ const Orders_description_1 = require("./descriptions/Orders.description");
6
+ const Orders_operations_1 = require("./operations/Orders.operations");
7
+ const Invoices_description_1 = require("./descriptions/Invoices.description");
8
+ const Invoices_operations_1 = require("./operations/Invoices.operations");
9
+ const Shipments_description_1 = require("./descriptions/Shipments.description");
10
+ const Shipments_operations_1 = require("./operations/Shipments.operations");
11
+ const Listings_description_1 = require("./descriptions/Listings.description");
12
+ const Listings_operations_1 = require("./operations/Listings.operations");
13
+ const Finance_description_1 = require("./descriptions/Finance.description");
14
+ const Finance_operations_1 = require("./operations/Finance.operations");
15
+ const Analytics_description_1 = require("./descriptions/Analytics.description");
16
+ const Analytics_operations_1 = require("./operations/Analytics.operations");
17
+ const DataKiosk_description_1 = require("./descriptions/DataKiosk.description");
18
+ const DataKiosk_operations_1 = require("./operations/DataKiosk.operations");
19
+ const Reports_description_1 = require("./descriptions/Reports.description");
20
+ const Reports_operations_1 = require("./operations/Reports.operations");
5
21
  class AmazonSellingPartner {
6
22
  constructor() {
7
23
  this.description = {
8
24
  displayName: 'Amazon Selling Partner',
9
25
  name: 'amazonSellingPartner',
10
- icon: { light: 'file:../../icons/amazon-sp.svg', dark: 'file:../../icons/amazon-sp.dark.svg' },
26
+ icon: 'file:amazonSpApi.svg',
11
27
  group: ['input'],
12
28
  version: 1,
13
- subtitle: '={{$parameter["operation"]}}',
14
- description: 'Base node for Amazon Selling Partner API',
29
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
30
+ description: 'Interact with Amazon Selling Partner API',
15
31
  defaults: {
16
32
  name: 'Amazon Selling Partner',
17
33
  },
18
- usableAsTool: true,
19
34
  inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
20
35
  outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
21
36
  credentials: [
22
37
  {
23
- name: 'amazonSellingPartnerApi',
38
+ name: 'amazonSpApi',
24
39
  required: true,
25
40
  },
26
41
  ],
42
+ requestDefaults: {
43
+ baseURL: '={{$credentials.spApiEndpoint || $self["getSpApiEndpoint"]($credentials.awsRegion, $credentials.environment)}}',
44
+ headers: {
45
+ 'Accept': 'application/json',
46
+ 'Content-Type': 'application/json',
47
+ 'User-Agent': 'n8n-amazon-sp-api/1.0.0',
48
+ },
49
+ },
27
50
  properties: [
28
51
  {
29
- displayName: 'Operation',
30
- name: 'operation',
52
+ displayName: 'Resource',
53
+ name: 'resource',
31
54
  type: 'options',
32
55
  noDataExpression: true,
33
56
  options: [
34
57
  {
35
- name: 'Pass Through',
36
- value: 'passThrough',
37
- description: 'Return input items unchanged',
58
+ name: 'Order',
59
+ value: 'orders',
60
+ description: 'Manage and retrieve order information',
61
+ },
62
+ {
63
+ name: 'Invoice',
64
+ value: 'invoices',
65
+ description: 'Download GST and VAT invoice reports',
66
+ },
67
+ {
68
+ name: 'Shipment',
69
+ value: 'shipments',
70
+ description: 'Confirm or update shipment information',
71
+ },
72
+ {
73
+ name: 'Listing',
74
+ value: 'listings',
75
+ description: 'List and manage product listings (ASINs/SKUs)',
76
+ },
77
+ {
78
+ name: 'Finance',
79
+ value: 'finance',
80
+ description: 'Retrieve financial events, wallet transactions, and payment data',
81
+ },
82
+ {
83
+ name: 'Data Kiosk',
84
+ value: 'dataKiosk',
85
+ description: 'Submit GraphQL queries and download results via Data Kiosk',
86
+ },
87
+ {
88
+ name: 'Report',
89
+ value: 'reports',
90
+ description: 'Generate and download SP-API business and returns reports',
38
91
  },
39
92
  ],
40
- default: 'passThrough',
93
+ default: 'orders',
41
94
  },
95
+ ...Orders_description_1.ordersOperations,
96
+ ...Orders_description_1.ordersFields,
97
+ ...Invoices_description_1.invoicesOperations,
98
+ ...Invoices_description_1.invoicesFields,
99
+ ...Shipments_description_1.shipmentsOperations,
100
+ ...Shipments_description_1.shipmentsFields,
101
+ ...Listings_description_1.listingsOperations,
102
+ ...Listings_description_1.listingsFields,
103
+ ...Finance_description_1.financeOperations,
104
+ ...Finance_description_1.financeFields,
105
+ ...Analytics_description_1.analyticsOperations,
106
+ ...Analytics_description_1.analyticsFields,
107
+ ...DataKiosk_description_1.dataKioskOperations,
108
+ ...DataKiosk_description_1.dataKioskFields,
109
+ ...Reports_description_1.reportsOperations,
110
+ ...Reports_description_1.reportsFields,
42
111
  ],
43
112
  };
44
113
  }
45
114
  async execute() {
46
115
  const items = this.getInputData();
47
- const outputItems = [];
48
- for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
49
- try {
50
- await this.getCredentials('amazonSellingPartnerOAuth2Api');
51
- outputItems.push({
52
- json: { ...items[itemIndex].json },
53
- pairedItem: itemIndex,
54
- });
55
- }
56
- catch (error) {
57
- if (this.continueOnFail()) {
58
- outputItems.push({
59
- json: items[itemIndex].json,
60
- error,
61
- pairedItem: itemIndex,
62
- });
63
- }
64
- else {
65
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, {
66
- itemIndex,
67
- });
116
+ const returnData = [];
117
+ const resource = this.getNodeParameter('resource', 0);
118
+ const operation = this.getNodeParameter('operation', 0);
119
+ try {
120
+ for (let i = 0; i < items.length; i++) {
121
+ switch (resource) {
122
+ case 'orders': {
123
+ const orderResults = await Orders_operations_1.executeOrdersOperation.call(this, operation, i);
124
+ returnData.push(...orderResults);
125
+ break;
126
+ }
127
+ case 'invoices':
128
+ let invoiceResults = [];
129
+ switch (operation) {
130
+ case 'getGstReport':
131
+ invoiceResults = await Invoices_operations_1.getGstReport.call(this, i);
132
+ break;
133
+ case 'getVatInvoiceReport':
134
+ invoiceResults = await Invoices_operations_1.getVatInvoiceReport.call(this, i);
135
+ break;
136
+ case 'getVatInvoicePdfLinks':
137
+ invoiceResults = await Invoices_operations_1.getVatInvoicePdfLinks.call(this, i);
138
+ break;
139
+ default:
140
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown invoices operation: ${operation}`);
141
+ }
142
+ returnData.push(...invoiceResults);
143
+ break;
144
+ case 'shipments':
145
+ const shipmentResults = await Shipments_operations_1.executeShipmentsOperation.call(this, operation, i);
146
+ returnData.push(...shipmentResults);
147
+ break;
148
+ case 'listings':
149
+ const listingResults = await Listings_operations_1.executeListingsOperation.call(this, operation, i);
150
+ returnData.push(...listingResults);
151
+ break;
152
+ case 'finance':
153
+ const financeResults = await Finance_operations_1.executeFinanceOperation.call(this, operation, i);
154
+ returnData.push(...financeResults);
155
+ break;
156
+ case 'analytics':
157
+ const analyticsResults = await Analytics_operations_1.executeAnalyticsOperation.call(this, operation, i);
158
+ returnData.push(...analyticsResults);
159
+ break;
160
+ case 'dataKiosk':
161
+ const dataKioskResults = await DataKiosk_operations_1.executeDataKioskOperation.call(this, operation, i);
162
+ returnData.push(...dataKioskResults);
163
+ break;
164
+ case 'reports':
165
+ const reportsResults = await Reports_operations_1.executeReportsOperation.call(this, operation, i);
166
+ returnData.push(...reportsResults);
167
+ break;
168
+ default:
169
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown resource: ${resource}`);
68
170
  }
69
171
  }
172
+ return [this.helpers.returnJsonArray(returnData)];
173
+ }
174
+ catch (error) {
175
+ if (error instanceof n8n_workflow_1.NodeOperationError) {
176
+ throw error;
177
+ }
178
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
179
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Amazon SP-API error: ${errorMessage}`);
70
180
  }
71
- return [outputItems];
72
181
  }
73
182
  }
74
183
  exports.AmazonSellingPartner = AmazonSellingPartner;
@@ -1 +1 @@
1
- {"version":3,"file":"AmazonSellingPartner.node.js","sourceRoot":"","sources":["../../../nodes/AmazonSellingPartner/AmazonSellingPartner.node.ts"],"names":[],"mappings":";;;AAMA,+CAAuE;AAEvE,MAAa,oBAAoB;IAAjC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,sBAAsB;YAC5B,IAAI,EAAE,EAAE,KAAK,EAAE,gCAAgC,EAAE,IAAI,EAAE,qCAAqC,EAAE;YAC9F,KAAK,EAAE,CAAC,OAAO,CAAC;YAChB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8BAA8B;YACxC,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE;gBACT,IAAI,EAAE,wBAAwB;aAC9B;YACD,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,yBAAyB;oBAC/B,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,WAAW;oBACxB,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,cAAc;4BACpB,KAAK,EAAE,aAAa;4BACpB,WAAW,EAAE,8BAA8B;yBAC3C;qBACD;oBACD,OAAO,EAAE,aAAa;iBACtB;aACD;SACD,CAAC;IA8BH,CAAC;IA5BA,KAAK,CAAC,OAAO;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAClC,MAAM,WAAW,GAAyB,EAAE,CAAC;QAE7C,KAAK,IAAI,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC;YAC/D,IAAI,CAAC;gBACJ,MAAM,IAAI,CAAC,cAAc,CAAC,+BAA+B,CAAC,CAAC;gBAC3D,WAAW,CAAC,IAAI,CAAC;oBAChB,IAAI,EAAE,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE;oBAClC,UAAU,EAAE,SAAS;iBACrB,CAAC,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC3B,WAAW,CAAC,IAAI,CAAC;wBAChB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI;wBAC3B,KAAK;wBACL,UAAU,EAAE,SAAS;qBACrB,CAAC,CAAC;gBACJ,CAAC;qBAAM,CAAC;oBACP,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAc,EAAE;wBAC5D,SAAS;qBACT,CAAC,CAAC;gBACJ,CAAC;YACF,CAAC;QACF,CAAC;QAED,OAAO,CAAC,WAAW,CAAC,CAAC;IACtB,CAAC;CACD;AAnED,oDAmEC"}
1
+ {"version":3,"file":"AmazonSellingPartner.node.js","sourceRoot":"","sources":["../../../nodes/AmazonSellingPartner/AmazonSellingPartner.node.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AAEtB,0EAAmF;AACnF,sEAAwE;AACxE,8EAAyF;AACzF,0EAA4G;AAC5G,gFAA4F;AAC5F,4EAA8E;AAC9E,8EAAyF;AACzF,0EAA4E;AAC5E,4EAAsF;AACtF,wEAA0E;AAC1E,gFAA4F;AAC5F,4EAA8E;AAC9E,gFAA4F;AAC5F,4EAA8E;AAC9E,4EAAsF;AACtF,wEAA0E;AAE1E,MAAa,oBAAoB;IAAjC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,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AAI,CAAC,GAAG,gBAAgB,CAAC,CAAC;wBACrC,MAAM;oBACP,KAAK,WAAW;wBACf,MAAM,gBAAgB,GAAG,MAAM,gDAAyB,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;wBAClF,UAAU,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC,CAAC;wBACrC,MAAM;oBACP,KAAK,SAAS;wBACb,MAAM,cAAc,GAAG,MAAM,4CAAuB,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;wBAC9E,UAAU,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,CAAC;wBACnC,MAAM;oBACP;wBACC,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,qBAAqB,QAAQ,EAAE,CAAC,CAAC;gBAChF,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;AArKD,oDAqKC"}
@@ -1,5 +1,5 @@
1
1
  {
2
- "node": "n8n-nodes-amazon-selling-partner",
2
+ "node": "n8n-nodes-amazon-selling-partner-dnangelx",
3
3
  "nodeVersion": "1.0",
4
4
  "codexVersion": "1.0",
5
5
  "categories": ["Ecommerce"],
@@ -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>
@@ -0,0 +1,67 @@
1
+ import { EventEmitter } from 'events';
2
+ export interface AuditEvent {
3
+ id: string;
4
+ timestamp: Date;
5
+ userId?: string;
6
+ nodeId: string;
7
+ action: string;
8
+ resource: string;
9
+ details: Record<string, any>;
10
+ severity: 'low' | 'medium' | 'high' | 'critical';
11
+ source: 'user' | 'system' | 'api';
12
+ outcome: 'success' | 'failure' | 'warning';
13
+ ipAddress?: string;
14
+ userAgent?: string;
15
+ }
16
+ export interface SecurityEvent extends AuditEvent {
17
+ threatLevel: 'low' | 'medium' | 'high' | 'critical';
18
+ attackVector?: string;
19
+ mitigationAction?: string;
20
+ }
21
+ export interface AlertRule {
22
+ id: string;
23
+ name: string;
24
+ condition: (event: AuditEvent) => boolean;
25
+ severity: 'low' | 'medium' | 'high' | 'critical';
26
+ enabled: boolean;
27
+ cooldownMs: number;
28
+ lastTriggered?: Date;
29
+ }
30
+ export declare class AuditLogger extends EventEmitter {
31
+ private events;
32
+ private securityEvents;
33
+ private alertRules;
34
+ private readonly maxEventsHistory;
35
+ private readonly maxSecurityEventsHistory;
36
+ constructor();
37
+ logEvent(event: Omit<AuditEvent, 'id' | 'timestamp'>): void;
38
+ logSecurityEvent(event: Omit<SecurityEvent, 'id' | 'timestamp'>): void;
39
+ logApiAccess(nodeId: string, endpoint: string, success: boolean, details?: Record<string, any>): void;
40
+ logCredentialUsage(nodeId: string, credentialType: string, success: boolean, details?: Record<string, any>): void;
41
+ logAuthentication(nodeId: string, method: string, success: boolean, details?: Record<string, any>): void;
42
+ logRateLimit(nodeId: string, endpoint: string, details?: Record<string, any>): void;
43
+ logError(nodeId: string, error: Error, context?: Record<string, any>): void;
44
+ logSuspiciousActivity(nodeId: string, activity: string, details?: Record<string, any>): void;
45
+ getEvents(filter?: {
46
+ severity?: string[];
47
+ action?: string[];
48
+ resource?: string[];
49
+ outcome?: string[];
50
+ timeRange?: {
51
+ start: Date;
52
+ end: Date;
53
+ };
54
+ limit?: number;
55
+ }): AuditEvent[];
56
+ getSecurityEvents(limit?: number): SecurityEvent[];
57
+ addAlertRule(rule: AlertRule): void;
58
+ removeAlertRule(ruleId: string): void;
59
+ getStatistics(timeWindowMs?: number): Record<string, any>;
60
+ exportEvents(format?: 'json' | 'csv', filter?: Parameters<typeof this.getEvents>[0]): string;
61
+ private generateEventId;
62
+ private initializeDefaultAlertRules;
63
+ private checkAlertRules;
64
+ private triggerAlert;
65
+ private triggerSecurityAlert;
66
+ }
67
+ export declare const auditLogger: AuditLogger;