n8n-nodes-aem 1.0.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.
Files changed (85) hide show
  1. package/LICENSE +46 -0
  2. package/README.md +335 -0
  3. package/dist/credentials/AemApi.credentials.d.ts +9 -0
  4. package/dist/credentials/AemApi.credentials.js +176 -0
  5. package/dist/credentials/AemApi.credentials.js.map +1 -0
  6. package/dist/nodes/Aem/Aem.node.d.ts +5 -0
  7. package/dist/nodes/Aem/Aem.node.js +212 -0
  8. package/dist/nodes/Aem/Aem.node.js.map +1 -0
  9. package/dist/nodes/Aem/AemTrigger.node.d.ts +13 -0
  10. package/dist/nodes/Aem/AemTrigger.node.js +375 -0
  11. package/dist/nodes/Aem/AemTrigger.node.js.map +1 -0
  12. package/dist/nodes/Aem/actions/asset/asset.description.d.ts +3 -0
  13. package/dist/nodes/Aem/actions/asset/asset.description.js +371 -0
  14. package/dist/nodes/Aem/actions/asset/asset.description.js.map +1 -0
  15. package/dist/nodes/Aem/actions/asset/asset.execute.d.ts +2 -0
  16. package/dist/nodes/Aem/actions/asset/asset.execute.js +193 -0
  17. package/dist/nodes/Aem/actions/asset/asset.execute.js.map +1 -0
  18. package/dist/nodes/Aem/actions/comment/comment.description.d.ts +3 -0
  19. package/dist/nodes/Aem/actions/comment/comment.description.js +113 -0
  20. package/dist/nodes/Aem/actions/comment/comment.description.js.map +1 -0
  21. package/dist/nodes/Aem/actions/comment/comment.execute.d.ts +2 -0
  22. package/dist/nodes/Aem/actions/comment/comment.execute.js +104 -0
  23. package/dist/nodes/Aem/actions/comment/comment.execute.js.map +1 -0
  24. package/dist/nodes/Aem/actions/contentFragment/contentFragment.description.d.ts +3 -0
  25. package/dist/nodes/Aem/actions/contentFragment/contentFragment.description.js +355 -0
  26. package/dist/nodes/Aem/actions/contentFragment/contentFragment.description.js.map +1 -0
  27. package/dist/nodes/Aem/actions/contentFragment/contentFragment.execute.d.ts +2 -0
  28. package/dist/nodes/Aem/actions/contentFragment/contentFragment.execute.js +182 -0
  29. package/dist/nodes/Aem/actions/contentFragment/contentFragment.execute.js.map +1 -0
  30. package/dist/nodes/Aem/actions/contentFragmentModel/contentFragmentModel.description.d.ts +3 -0
  31. package/dist/nodes/Aem/actions/contentFragmentModel/contentFragmentModel.description.js +107 -0
  32. package/dist/nodes/Aem/actions/contentFragmentModel/contentFragmentModel.description.js.map +1 -0
  33. package/dist/nodes/Aem/actions/contentFragmentModel/contentFragmentModel.execute.d.ts +2 -0
  34. package/dist/nodes/Aem/actions/contentFragmentModel/contentFragmentModel.execute.js +87 -0
  35. package/dist/nodes/Aem/actions/contentFragmentModel/contentFragmentModel.execute.js.map +1 -0
  36. package/dist/nodes/Aem/actions/folder/folder.description.d.ts +3 -0
  37. package/dist/nodes/Aem/actions/folder/folder.description.js +326 -0
  38. package/dist/nodes/Aem/actions/folder/folder.description.js.map +1 -0
  39. package/dist/nodes/Aem/actions/folder/folder.execute.d.ts +2 -0
  40. package/dist/nodes/Aem/actions/folder/folder.execute.js +155 -0
  41. package/dist/nodes/Aem/actions/folder/folder.execute.js.map +1 -0
  42. package/dist/nodes/Aem/actions/graphql/graphql.description.d.ts +3 -0
  43. package/dist/nodes/Aem/actions/graphql/graphql.description.js +167 -0
  44. package/dist/nodes/Aem/actions/graphql/graphql.description.js.map +1 -0
  45. package/dist/nodes/Aem/actions/graphql/graphql.execute.d.ts +2 -0
  46. package/dist/nodes/Aem/actions/graphql/graphql.execute.js +90 -0
  47. package/dist/nodes/Aem/actions/graphql/graphql.execute.js.map +1 -0
  48. package/dist/nodes/Aem/actions/page/page.description.d.ts +3 -0
  49. package/dist/nodes/Aem/actions/page/page.description.js +259 -0
  50. package/dist/nodes/Aem/actions/page/page.description.js.map +1 -0
  51. package/dist/nodes/Aem/actions/page/page.execute.d.ts +2 -0
  52. package/dist/nodes/Aem/actions/page/page.execute.js +184 -0
  53. package/dist/nodes/Aem/actions/page/page.execute.js.map +1 -0
  54. package/dist/nodes/Aem/actions/replication/replication.description.d.ts +3 -0
  55. package/dist/nodes/Aem/actions/replication/replication.description.js +159 -0
  56. package/dist/nodes/Aem/actions/replication/replication.description.js.map +1 -0
  57. package/dist/nodes/Aem/actions/replication/replication.execute.d.ts +2 -0
  58. package/dist/nodes/Aem/actions/replication/replication.execute.js +134 -0
  59. package/dist/nodes/Aem/actions/replication/replication.execute.js.map +1 -0
  60. package/dist/nodes/Aem/actions/tag/tag.description.d.ts +3 -0
  61. package/dist/nodes/Aem/actions/tag/tag.description.js +163 -0
  62. package/dist/nodes/Aem/actions/tag/tag.description.js.map +1 -0
  63. package/dist/nodes/Aem/actions/tag/tag.execute.d.ts +2 -0
  64. package/dist/nodes/Aem/actions/tag/tag.execute.js +138 -0
  65. package/dist/nodes/Aem/actions/tag/tag.execute.js.map +1 -0
  66. package/dist/nodes/Aem/actions/user/user.description.d.ts +3 -0
  67. package/dist/nodes/Aem/actions/user/user.description.js +348 -0
  68. package/dist/nodes/Aem/actions/user/user.description.js.map +1 -0
  69. package/dist/nodes/Aem/actions/user/user.execute.d.ts +2 -0
  70. package/dist/nodes/Aem/actions/user/user.execute.js +310 -0
  71. package/dist/nodes/Aem/actions/user/user.execute.js.map +1 -0
  72. package/dist/nodes/Aem/actions/workflow/workflow.description.d.ts +3 -0
  73. package/dist/nodes/Aem/actions/workflow/workflow.description.js +204 -0
  74. package/dist/nodes/Aem/actions/workflow/workflow.description.js.map +1 -0
  75. package/dist/nodes/Aem/actions/workflow/workflow.execute.d.ts +2 -0
  76. package/dist/nodes/Aem/actions/workflow/workflow.execute.js +153 -0
  77. package/dist/nodes/Aem/actions/workflow/workflow.execute.js.map +1 -0
  78. package/dist/nodes/Aem/aem.svg +11 -0
  79. package/dist/nodes/Aem/transport/GenericFunctions.d.ts +55 -0
  80. package/dist/nodes/Aem/transport/GenericFunctions.js +369 -0
  81. package/dist/nodes/Aem/transport/GenericFunctions.js.map +1 -0
  82. package/dist/nodes/Aem/types/AemTypes.d.ts +229 -0
  83. package/dist/nodes/Aem/types/AemTypes.js +9 -0
  84. package/dist/nodes/Aem/types/AemTypes.js.map +1 -0
  85. package/package.json +73 -0
package/LICENSE ADDED
@@ -0,0 +1,46 @@
1
+ Business Source License 1.1
2
+
3
+ License text copyright (c) 2017 MariaDB Corporation Ab.
4
+
5
+ Licensor:
6
+ Velocity BPA, LLC
7
+ https://velobpa.com
8
+
9
+ Licensed Work:
10
+ This repository and all source code, documentation, and associated artifacts
11
+ contained herein, including all n8n community nodes published by Velocity BPA.
12
+
13
+ Additional Use Grant:
14
+ You may use, modify, and run the Licensed Work free of charge for:
15
+ - Personal use
16
+ - Educational use
17
+ - Research use
18
+ - Internal business use, provided such use does not involve resale,
19
+ redistribution, or offering the Licensed Work as part of a commercial
20
+ product or service.
21
+
22
+ Commercial Use Restriction:
23
+ Commercial Use of the Licensed Work is prohibited without a valid
24
+ Commercial License issued by the Licensor.
25
+
26
+ Commercial Use includes, but is not limited to:
27
+ - Use of the Licensed Work within any Software-as-a-Service (SaaS),
28
+ Platform-as-a-Service (PaaS), or hosted application that is sold,
29
+ licensed, or monetized in any form
30
+ - Offering the Licensed Work as part of a managed services engagement
31
+ - Bundling or redistributing the Licensed Work with a paid product
32
+ - Reselling, sublicensing, or white-labeling the Licensed Work
33
+ - Embedding the Licensed Work into any commercial automation platform,
34
+ integration product, or solution offering
35
+
36
+ Change Date:
37
+ January 1, 2030
38
+
39
+ Change License:
40
+ Apache License, Version 2.0
41
+
42
+ For commercial licensing inquiries:
43
+ licensing@velobpa.com
44
+
45
+ Business Source License 1.1 full text:
46
+ https://mariadb.com/bsl11/
package/README.md ADDED
@@ -0,0 +1,335 @@
1
+ # n8n-nodes-aem
2
+
3
+ > [Velocity BPA Licensing Notice]
4
+ >
5
+ > This n8n node is licensed under the Business Source License 1.1 (BSL 1.1).
6
+ >
7
+ > Use of this node by for-profit organizations in production environments requires a commercial license from Velocity BPA.
8
+ >
9
+ > For licensing information, visit https://velobpa.com/licensing or contact licensing@velobpa.com.
10
+
11
+ A comprehensive n8n community node for Adobe Experience Manager (AEM) providing enterprise-grade content management automation. This integration enables content teams, developers, and marketers to automate asset management, content fragment operations, page publishing, GraphQL queries, and headless content delivery across both AEM 6.5 and AEM as a Cloud Service deployments.
12
+
13
+ ![n8n](https://img.shields.io/badge/n8n-community--node-orange)
14
+ ![AEM](https://img.shields.io/badge/Adobe-Experience%20Manager-red)
15
+ ![License](https://img.shields.io/badge/license-BSL--1.1-blue)
16
+
17
+ ## Features
18
+
19
+ - **11 Resource Categories** with 70+ operations for complete AEM automation
20
+ - **Dual Authentication Support** - Basic Auth (AEM 6.5) and OAuth 2.0 (Cloud Service)
21
+ - **Digital Asset Management** - Full DAM operations including renditions and metadata
22
+ - **Content Fragments** - Create, update, and manage headless content
23
+ - **GraphQL Integration** - Execute queries and manage persisted queries
24
+ - **Page Management** - Full page lifecycle with publish/unpublish workflows
25
+ - **Workflow Automation** - Start, monitor, and control AEM workflows
26
+ - **User & Group Management** - Manage users and group memberships
27
+ - **Replication Control** - Activate/deactivate content to publish instances
28
+ - **Event Triggers** - Poll-based triggers for content changes
29
+
30
+ ## Installation
31
+
32
+ ### Community Nodes (Recommended)
33
+
34
+ 1. Open your n8n instance
35
+ 2. Go to **Settings** > **Community Nodes**
36
+ 3. Select **Install**
37
+ 4. Enter `n8n-nodes-aem` and install
38
+
39
+ ### Manual Installation
40
+
41
+ ```bash
42
+ cd ~/.n8n
43
+ npm install n8n-nodes-aem
44
+ ```
45
+
46
+ ### Development Installation
47
+
48
+ ```bash
49
+ # 1. Extract the zip file
50
+ unzip n8n-nodes-aem.zip
51
+ cd n8n-nodes-aem
52
+
53
+ # 2. Install dependencies
54
+ npm install
55
+
56
+ # 3. Build the project
57
+ npm run build
58
+
59
+ # 4. Create symlink to n8n custom nodes directory
60
+ # For Linux/macOS:
61
+ mkdir -p ~/.n8n/custom
62
+ ln -s $(pwd) ~/.n8n/custom/n8n-nodes-aem
63
+
64
+ # For Windows (run as Administrator):
65
+ # mklink /D %USERPROFILE%\.n8n\custom\n8n-nodes-aem %CD%
66
+
67
+ # 5. Restart n8n
68
+ n8n start
69
+ ```
70
+
71
+ ## Credentials Setup
72
+
73
+ ### AEM 6.5 (Basic Authentication)
74
+
75
+ | Field | Description |
76
+ |-------|-------------|
77
+ | Deployment Type | Select "AEM 6.5" |
78
+ | AEM Host | Your AEM instance URL (e.g., `https://author.example.com`) |
79
+ | Username | AEM username |
80
+ | Password | AEM password |
81
+
82
+ ### AEM as a Cloud Service (OAuth 2.0)
83
+
84
+ | Field | Description |
85
+ |-------|-------------|
86
+ | Deployment Type | Select "Cloud Service" |
87
+ | AEM Host | Cloud Service URL (e.g., `https://author-p12345-e67890.adobeaemcloud.com`) |
88
+ | Client ID | Service Account Client ID |
89
+ | Client Secret | Service Account Client Secret |
90
+ | Technical Account ID | Technical Account ID from Adobe Developer Console |
91
+ | Organization ID | Adobe Organization ID |
92
+ | IMS Host | Adobe IMS host (default: `ims-na1.adobelogin.com`) |
93
+ | Meta Scopes | Required scopes for API access |
94
+
95
+ To obtain Cloud Service credentials:
96
+ 1. Navigate to Adobe Developer Console
97
+ 2. Create a project and add AEM API
98
+ 3. Generate OAuth Server-to-Server credentials
99
+ 4. Download the service credentials JSON file
100
+
101
+ ## Resources & Operations
102
+
103
+ ### Asset
104
+ - `get` - Get asset metadata by path
105
+ - `getAll` - List all assets in a folder
106
+ - `create` - Create/upload a new asset
107
+ - `update` - Update asset metadata
108
+ - `updateBinary` - Update asset binary file
109
+ - `delete` - Delete an asset
110
+ - `copy` - Copy asset to new location
111
+ - `move` - Move asset to new location
112
+ - `getRenditions` - List all renditions
113
+ - `createRendition` - Create a new rendition
114
+ - `deleteRendition` - Delete a rendition
115
+
116
+ ### Folder
117
+ - `get` - Get folder metadata
118
+ - `getAll` - List all subfolders
119
+ - `create` - Create a new folder
120
+ - `update` - Update folder properties
121
+ - `delete` - Delete a folder
122
+ - `copy` - Copy folder
123
+ - `move` - Move folder
124
+
125
+ ### Content Fragment
126
+ - `get` - Get content fragment
127
+ - `getAll` - List content fragments
128
+ - `create` - Create content fragment
129
+ - `update` - Update fragment elements
130
+ - `delete` - Delete fragment
131
+ - `getVariations` - List variations
132
+ - `createVariation` - Create variation
133
+ - `publish` - Publish fragment
134
+ - `unpublish` - Unpublish fragment
135
+
136
+ ### Content Fragment Model
137
+ - `get` - Get model definition
138
+ - `getAll` - List all models
139
+ - `getFields` - Get field definitions
140
+
141
+ ### GraphQL
142
+ - `query` - Execute GraphQL query
143
+ - `queryPersisted` - Execute persisted query
144
+ - `listPersistedQueries` - List persisted queries
145
+ - `createPersistedQuery` - Create persisted query
146
+ - `deletePersistedQuery` - Delete persisted query
147
+
148
+ ### Page
149
+ - `get` - Get page content
150
+ - `create` - Create new page
151
+ - `update` - Update page properties
152
+ - `delete` - Delete page
153
+ - `copy` - Copy page
154
+ - `move` - Move page
155
+ - `publish` - Publish page
156
+ - `unpublish` - Unpublish page
157
+ - `lock` - Lock page
158
+ - `unlock` - Unlock page
159
+
160
+ ### Comment
161
+ - `getAll` - List comments on asset
162
+ - `create` - Add comment
163
+ - `delete` - Delete comment
164
+ - `reply` - Reply to comment
165
+
166
+ ### Workflow
167
+ - `getAll` - List workflow models
168
+ - `start` - Start workflow
169
+ - `getInstances` - List running instances
170
+ - `getInstance` - Get instance details
171
+ - `terminate` - Terminate workflow
172
+ - `complete` - Complete workflow step
173
+
174
+ ### Tag
175
+ - `get` - Get tag details
176
+ - `getAll` - List tags in namespace
177
+ - `create` - Create tag
178
+ - `delete` - Delete tag
179
+ - `getTagged` - Get tagged content
180
+
181
+ ### User
182
+ - `get` - Get user details
183
+ - `getAll` - List users
184
+ - `create` - Create user
185
+ - `update` - Update user
186
+ - `delete` - Delete user
187
+ - `getGroups` - Get user's groups
188
+ - `addToGroup` - Add to group
189
+ - `removeFromGroup` - Remove from group
190
+
191
+ ### Replication
192
+ - `activate` - Publish content
193
+ - `deactivate` - Unpublish content
194
+ - `getQueue` - Get queue status
195
+ - `clearQueue` - Clear queue
196
+
197
+ ## Trigger Node
198
+
199
+ The AEM Trigger node supports polling-based triggers for:
200
+
201
+ - Asset created/modified/deleted
202
+ - Content Fragment created/modified
203
+ - Page created/modified/published/unpublished
204
+ - Workflow completed/failed
205
+
206
+ Configure watch paths and filters to monitor specific content areas.
207
+
208
+ ## Usage Examples
209
+
210
+ ### Upload an Asset
211
+
212
+ ```json
213
+ {
214
+ "resource": "asset",
215
+ "operation": "create",
216
+ "folderPath": "/content/dam/myproject",
217
+ "fileName": "hero-image.jpg",
218
+ "binaryPropertyName": "data"
219
+ }
220
+ ```
221
+
222
+ ### Execute GraphQL Query
223
+
224
+ ```json
225
+ {
226
+ "resource": "graphql",
227
+ "operation": "query",
228
+ "endpoint": "mysite",
229
+ "query": "{ articleList { items { _path title author } } }"
230
+ }
231
+ ```
232
+
233
+ ### Publish a Page
234
+
235
+ ```json
236
+ {
237
+ "resource": "page",
238
+ "operation": "publish",
239
+ "pagePath": "/content/mysite/en/about"
240
+ }
241
+ ```
242
+
243
+ ## AEM Concepts
244
+
245
+ ### Assets HTTP API
246
+ The Assets HTTP API provides RESTful access to AEM Assets using Siren hypermedia format. All asset operations use paths starting with `/content/dam`.
247
+
248
+ ### Content Fragments
249
+ Content Fragments are structured content pieces with models defining their schema. They support variations for channel-specific content and are used for headless content delivery.
250
+
251
+ ### GraphQL API
252
+ AEM's GraphQL API enables efficient content delivery for headless applications. Persisted queries improve performance by caching query definitions.
253
+
254
+ ### Replication
255
+ Replication syncs content between author and publish instances. Activation publishes content; deactivation removes it from publish.
256
+
257
+ ## Error Handling
258
+
259
+ The node handles common AEM errors:
260
+ - **401 Unauthorized**: Invalid credentials or expired token
261
+ - **403 Forbidden**: Insufficient permissions
262
+ - **404 Not Found**: Resource doesn't exist
263
+ - **409 Conflict**: Resource already exists
264
+ - **500 Server Error**: AEM internal error
265
+
266
+ Enable "Continue on Fail" to process all items even when errors occur.
267
+
268
+ ## Security Best Practices
269
+
270
+ 1. Use service accounts with minimal required permissions
271
+ 2. Store credentials securely using n8n's credential management
272
+ 3. For Cloud Service, use OAuth 2.0 instead of Developer Tokens in production
273
+ 4. Regularly rotate credentials and review access permissions
274
+ 5. Use environment variables for sensitive configuration
275
+
276
+ ## Development
277
+
278
+ ```bash
279
+ # Install dependencies
280
+ npm install
281
+
282
+ # Build the project
283
+ npm run build
284
+
285
+ # Run linting
286
+ npm run lint
287
+
288
+ # Run tests
289
+ npm test
290
+
291
+ # Run tests with coverage
292
+ npm run test:coverage
293
+ ```
294
+
295
+ ## Author
296
+
297
+ **Velocity BPA**
298
+ - Website: [velobpa.com](https://velobpa.com)
299
+ - GitHub: [Velocity-BPA](https://github.com/Velocity-BPA)
300
+
301
+ ## Licensing
302
+
303
+ This n8n community node is licensed under the **Business Source License 1.1**.
304
+
305
+ ### Free Use
306
+ Permitted for personal, educational, research, and internal business use.
307
+
308
+ ### Commercial Use
309
+ Use of this node within any SaaS, PaaS, hosted platform, managed service,
310
+ or paid automation offering requires a commercial license.
311
+
312
+ For licensing inquiries:
313
+ **licensing@velobpa.com**
314
+
315
+ See [LICENSE](LICENSE), [COMMERCIAL_LICENSE.md](COMMERCIAL_LICENSE.md), and [LICENSING_FAQ.md](LICENSING_FAQ.md) for details.
316
+
317
+ ## Contributing
318
+
319
+ 1. Fork the repository
320
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
321
+ 3. Commit your changes (`git commit -m 'Add amazing feature'`)
322
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
323
+ 5. Open a Pull Request
324
+
325
+ ## Support
326
+
327
+ - GitHub Issues: [Report bugs or request features](https://github.com/Velocity-BPA/n8n-nodes-aem/issues)
328
+ - Documentation: [AEM API Documentation](https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/developing/aem-apis.html)
329
+ - Email: support@velobpa.com
330
+
331
+ ## Acknowledgments
332
+
333
+ - [Adobe Experience Manager](https://business.adobe.com/products/experience-manager/adobe-experience-manager.html)
334
+ - [n8n](https://n8n.io/) - Workflow automation platform
335
+ - [n8n Community](https://community.n8n.io/) - Community support and resources
@@ -0,0 +1,9 @@
1
+ import type { ICredentialDataDecryptedObject, ICredentialTestRequest, ICredentialType, IHttpRequestOptions, INodeProperties } from 'n8n-workflow';
2
+ export declare class AemApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate(credentials: ICredentialDataDecryptedObject, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
8
+ test: ICredentialTestRequest;
9
+ }
@@ -0,0 +1,176 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) Velocity BPA, LLC
4
+ * Licensed under the Business Source License 1.1
5
+ * Commercial use requires a separate commercial license.
6
+ * See LICENSE file for details.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.AemApi = void 0;
10
+ class AemApi {
11
+ constructor() {
12
+ this.name = 'aemApi';
13
+ this.displayName = 'Adobe Experience Manager API';
14
+ this.documentationUrl = 'https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/assets/assets-http-api.html';
15
+ this.properties = [
16
+ {
17
+ displayName: 'Deployment Type',
18
+ name: 'deploymentType',
19
+ type: 'options',
20
+ options: [
21
+ {
22
+ name: 'AEM 6.5 (On-Premise/Managed Services)',
23
+ value: 'aem65',
24
+ },
25
+ {
26
+ name: 'AEM as a Cloud Service',
27
+ value: 'cloudService',
28
+ },
29
+ ],
30
+ default: 'aem65',
31
+ description: 'The type of AEM deployment',
32
+ },
33
+ {
34
+ displayName: 'AEM Host URL',
35
+ name: 'aemHost',
36
+ type: 'string',
37
+ default: '',
38
+ placeholder: 'https://author-p12345-e67890.adobeaemcloud.com',
39
+ required: true,
40
+ description: 'The AEM instance URL (without trailing slash)',
41
+ },
42
+ // AEM 6.5 Basic Auth fields
43
+ {
44
+ displayName: 'Username',
45
+ name: 'username',
46
+ type: 'string',
47
+ default: '',
48
+ displayOptions: {
49
+ show: {
50
+ deploymentType: ['aem65'],
51
+ },
52
+ },
53
+ description: 'The AEM username for Basic Authentication',
54
+ },
55
+ {
56
+ displayName: 'Password',
57
+ name: 'password',
58
+ type: 'string',
59
+ typeOptions: {
60
+ password: true,
61
+ },
62
+ default: '',
63
+ displayOptions: {
64
+ show: {
65
+ deploymentType: ['aem65'],
66
+ },
67
+ },
68
+ description: 'The AEM password for Basic Authentication',
69
+ },
70
+ // Cloud Service OAuth fields
71
+ {
72
+ displayName: 'Client ID',
73
+ name: 'clientId',
74
+ type: 'string',
75
+ default: '',
76
+ displayOptions: {
77
+ show: {
78
+ deploymentType: ['cloudService'],
79
+ },
80
+ },
81
+ description: 'The OAuth Client ID from Adobe Developer Console',
82
+ },
83
+ {
84
+ displayName: 'Client Secret',
85
+ name: 'clientSecret',
86
+ type: 'string',
87
+ typeOptions: {
88
+ password: true,
89
+ },
90
+ default: '',
91
+ displayOptions: {
92
+ show: {
93
+ deploymentType: ['cloudService'],
94
+ },
95
+ },
96
+ description: 'The OAuth Client Secret from Adobe Developer Console',
97
+ },
98
+ {
99
+ displayName: 'Technical Account ID',
100
+ name: 'technicalAccountId',
101
+ type: 'string',
102
+ default: '',
103
+ displayOptions: {
104
+ show: {
105
+ deploymentType: ['cloudService'],
106
+ },
107
+ },
108
+ description: 'The Technical Account ID from Adobe Developer Console',
109
+ },
110
+ {
111
+ displayName: 'Organization ID',
112
+ name: 'orgId',
113
+ type: 'string',
114
+ default: '',
115
+ displayOptions: {
116
+ show: {
117
+ deploymentType: ['cloudService'],
118
+ },
119
+ },
120
+ description: 'The Adobe Organization ID (IMS Org ID)',
121
+ },
122
+ {
123
+ displayName: 'IMS Host',
124
+ name: 'imsHost',
125
+ type: 'string',
126
+ default: 'ims-na1.adobelogin.com',
127
+ displayOptions: {
128
+ show: {
129
+ deploymentType: ['cloudService'],
130
+ },
131
+ },
132
+ description: 'The Adobe IMS host for authentication',
133
+ },
134
+ {
135
+ displayName: 'Scopes',
136
+ name: 'scopes',
137
+ type: 'string',
138
+ default: 'AdobeID,openid,read_organizations,additional_info.projectedProductContext',
139
+ displayOptions: {
140
+ show: {
141
+ deploymentType: ['cloudService'],
142
+ },
143
+ },
144
+ description: 'The OAuth scopes required for API access',
145
+ },
146
+ ];
147
+ this.test = {
148
+ request: {
149
+ baseURL: '={{$credentials.aemHost}}',
150
+ url: '/api/assets.json',
151
+ method: 'GET',
152
+ qs: {
153
+ limit: 1,
154
+ },
155
+ },
156
+ };
157
+ }
158
+ async authenticate(credentials, requestOptions) {
159
+ const deploymentType = credentials.deploymentType;
160
+ if (deploymentType === 'aem65') {
161
+ // Basic Authentication for AEM 6.5
162
+ const username = credentials.username;
163
+ const password = credentials.password;
164
+ const auth = Buffer.from(`${username}:${password}`).toString('base64');
165
+ if (!requestOptions.headers) {
166
+ requestOptions.headers = {};
167
+ }
168
+ requestOptions.headers.Authorization = `Basic ${auth}`;
169
+ }
170
+ // For Cloud Service, the access token is obtained via pre-request hook
171
+ // and added to the request in GenericFunctions.ts
172
+ return requestOptions;
173
+ }
174
+ }
175
+ exports.AemApi = AemApi;
176
+ //# sourceMappingURL=AemApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AemApi.credentials.js","sourceRoot":"","sources":["../../credentials/AemApi.credentials.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAUH,MAAa,MAAM;IAAnB;QACC,SAAI,GAAG,QAAQ,CAAC;QAChB,gBAAW,GAAG,8BAA8B,CAAC;QAC7C,qBAAgB,GAAG,8GAA8G,CAAC;QAElI,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,iBAAiB;gBAC9B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACR;wBACC,IAAI,EAAE,uCAAuC;wBAC7C,KAAK,EAAE,OAAO;qBACd;oBACD;wBACC,IAAI,EAAE,wBAAwB;wBAC9B,KAAK,EAAE,cAAc;qBACrB;iBACD;gBACD,OAAO,EAAE,O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CAAC;QAE5D,IAAI,cAAc,KAAK,OAAO,EAAE,CAAC;YAChC,mCAAmC;YACnC,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAkB,CAAC;YAChD,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAkB,CAAC;YAChD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,IAAI,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAEvE,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;gBAC7B,cAAc,CAAC,OAAO,GAAG,EAAE,CAAC;YAC7B,CAAC;YACD,cAAc,CAAC,OAAO,CAAC,aAAa,GAAG,SAAS,IAAI,EAAE,CAAC;QACxD,CAAC;QACD,uEAAuE;QACvE,kDAAkD;QAElD,OAAO,cAAc,CAAC;IACvB,CAAC;CAYD;AA3KD,wBA2KC"}
@@ -0,0 +1,5 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class Aem implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }