n8n-nodes-commercetools 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -4
- package/dist/nodes/Commercetools/generated/properties.js +1278 -411
- package/dist/nodes/Commercetools/generated/properties.js.map +1 -1
- package/dist/nodes/Commercetools/generated/subscription.properties.d.ts +1 -1
- package/dist/nodes/Commercetools/generated/subscription.properties.js +287 -287
- package/dist/nodes/Commercetools/generated/subscription.properties.js.map +1 -1
- package/dist/nodes/Commercetools/lambda/awsHandler.js +108 -0
- package/dist/nodes/Commercetools/lambda/gcpHandler.js +94 -0
- package/dist/package.json +17 -11
- package/package.json +17 -11
- package/dist/credentials/CommerceToolsOAuth2Api.credentials.d.ts +0 -9
- package/dist/credentials/CommerceToolsOAuth2Api.credentials.js +0 -230
- package/dist/credentials/CommerceToolsOAuth2Api.credentials.js.map +0 -1
- package/dist/nodes/Commercetools/Commercetools.node.d.ts +0 -5
- package/dist/nodes/Commercetools/Commercetools.node.js +0 -412
- package/dist/nodes/Commercetools/Commercetools.node.js.map +0 -1
- package/dist/nodes/Commercetools/Commercetools.node.json +0 -18
- package/dist/nodes/Commercetools/CommercetoolsTrigger.node.d.ts +0 -22
- package/dist/nodes/Commercetools/CommercetoolsTrigger.node.js +0 -69
- package/dist/nodes/Commercetools/CommercetoolsTrigger.node.js.map +0 -1
- package/dist/nodes/Commercetools/CommercetoolsTrigger.node.json +0 -21
- package/dist/nodes/Commercetools/generated/ctp-event-registry.json +0 -1513
- package/dist/nodes/Commercetools/generated/operations.json +0 -40468
- package/dist/nodes/Commercetools/utils/awsInfra.utils.d.ts +0 -19
- package/dist/nodes/Commercetools/utils/awsInfra.utils.js +0 -375
- package/dist/nodes/Commercetools/utils/awsInfra.utils.js.map +0 -1
- package/dist/nodes/Commercetools/utils/gcpInfra.utils.d.ts +0 -20
- package/dist/nodes/Commercetools/utils/gcpInfra.utils.js +0 -330
- package/dist/nodes/Commercetools/utils/gcpInfra.utils.js.map +0 -1
- package/dist/nodes/Commercetools/utils/subscription.utils.d.ts +0 -15
- package/dist/nodes/Commercetools/utils/subscription.utils.js +0 -109
- package/dist/nodes/Commercetools/utils/subscription.utils.js.map +0 -1
- package/dist/nodes/Commercetools/utils/webhookMethods.utils.d.ts +0 -8
- package/dist/nodes/Commercetools/utils/webhookMethods.utils.js +0 -235
- package/dist/nodes/Commercetools/utils/webhookMethods.utils.js.map +0 -1
- package/dist/scripts/parseCollection.d.ts +0 -34
- package/dist/scripts/parseCollection.js +0 -275
- package/dist/scripts/parseCollection.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
package/README.md
CHANGED
|
@@ -372,7 +372,13 @@ npm run lint:fix
|
|
|
372
372
|
```
|
|
373
373
|
scripts/generate.ts (entry point: npm run generate)
|
|
374
374
|
│
|
|
375
|
-
├── parseCollection.ts
|
|
375
|
+
├── parseCollection.ts (thin orchestrator)
|
|
376
|
+
│ ├── collection/postmanTypes.ts PostmanItem, PostmanCollection interfaces
|
|
377
|
+
│ ├── collection/types.ts BodyField, ParsedOperation interfaces
|
|
378
|
+
│ ├── collection/helpers.ts slugify, formatLabel, isLocalizedObject
|
|
379
|
+
│ ├── collection/fieldExtractors.ts extractFields, extractActionBodyFields
|
|
380
|
+
│ ├── collection/findFolder.ts findFolder (module-level cache — PERF-5)
|
|
381
|
+
│ └── collection/walkItems.ts walkItems (top-level exported function)
|
|
376
382
|
│ Downloads Postman collection.json → ParsedOperation[]
|
|
377
383
|
│ Detects per operation:
|
|
378
384
|
│ isSearch POST .../search
|
|
@@ -384,7 +390,13 @@ scripts/generate.ts (entry point: npm run generate)
|
|
|
384
390
|
│ bodyFields extracted from Postman body.raw JSON
|
|
385
391
|
│ actionBodyFields fields from inside actions[0]
|
|
386
392
|
│
|
|
387
|
-
├── generateProperties.ts
|
|
393
|
+
├── generateProperties.ts (thin orchestrator — PERF-4: Map index built once)
|
|
394
|
+
│ ├── properties/helpers.ts Constants + shared property builders
|
|
395
|
+
│ ├── properties/resourceAndOperation.ts Resource + Operation dropdowns
|
|
396
|
+
│ ├── properties/idFields.ts ID / Key / Container / path param fields
|
|
397
|
+
│ ├── properties/versionAndActions.ts Actions (JSON) + Actions (UI) fixedCollection
|
|
398
|
+
│ ├── properties/bodyFields.ts Create / Misc-POST / Search body fields
|
|
399
|
+
│ └── properties/imageAndQuery.ts Image upload fields + query-param Filters
|
|
388
400
|
│ ParsedOperation[] → INodeProperties[]
|
|
389
401
|
│ Emits in order:
|
|
390
402
|
│ 1. Resource dropdown
|
|
@@ -408,7 +420,11 @@ scripts/generate.ts (entry point: npm run generate)
|
|
|
408
420
|
│ Extracts: *MessagePayload type literals,
|
|
409
421
|
│ MessageSubscriptionResourceTypeId values,
|
|
410
422
|
│ ChangeSubscriptionResourceTypeId values
|
|
411
|
-
│
|
|
423
|
+
│ Filters to allowedResources: [product, customer, cart, order, business-unit,
|
|
424
|
+
│ category, channel, associate-role, inventory-entry, review, shopping-list,
|
|
425
|
+
│ type, payment, quote, quote-request, staged-quote, approval-rule,
|
|
426
|
+
│ approval-flow, standalone-price, store, product-tailoring,
|
|
427
|
+
│ customer-group, product-selection]
|
|
412
428
|
│ → nodes/Commercetools/generated/ctp-event-registry.json
|
|
413
429
|
│
|
|
414
430
|
└── generateSubscriptionProperties.ts
|
|
@@ -421,6 +437,33 @@ scripts/generate.ts (entry point: npm run generate)
|
|
|
421
437
|
|
|
422
438
|
Generated files are committed to the repository. The built node works without running `generate` unless the Postman collection or SDK has changed.
|
|
423
439
|
|
|
440
|
+
### Node source layout
|
|
441
|
+
|
|
442
|
+
```
|
|
443
|
+
nodes/Commercetools/
|
|
444
|
+
├── Commercetools.node.ts Thin action-node orchestrator (~175 lines)
|
|
445
|
+
├── CommercetoolsTrigger.node.ts Webhook trigger — receives and routes events
|
|
446
|
+
├── generated/ Auto-generated (do not edit manually)
|
|
447
|
+
│ ├── properties.ts
|
|
448
|
+
│ ├── operations.json
|
|
449
|
+
│ ├── ctp-event-registry.json
|
|
450
|
+
│ └── subscription.properties.ts
|
|
451
|
+
├── lambda/
|
|
452
|
+
│ ├── awsHandler.js Lambda: SQS → n8n webhook forwarder
|
|
453
|
+
│ └── gcpHandler.js Cloud Function: Pub/Sub → n8n webhook forwarder
|
|
454
|
+
└── utils/
|
|
455
|
+
├── urlBuilder.utils.ts URL construction + path-param substitution
|
|
456
|
+
├── bodyBuilder.utils.ts Request body assembly for all operation types
|
|
457
|
+
├── imageUpload.utils.ts SSRF-guarded image download + CT binary POST
|
|
458
|
+
├── subscription.utils.ts Subscription CRUD + body building + event routing
|
|
459
|
+
├── webhookMethods.utils.ts Webhook lifecycle: checkExists / create / delete
|
|
460
|
+
├── cloudVerification.utils.ts AWS + GCP infrastructure existence checks
|
|
461
|
+
├── awsInfra.utils.ts AWS SQS / Lambda / IAM provisioning
|
|
462
|
+
├── awsDelete.utils.ts AWS infrastructure teardown
|
|
463
|
+
├── gcpInfra.utils.ts GCP Pub/Sub / Cloud Functions provisioning
|
|
464
|
+
└── gcpDelete.utils.ts GCP infrastructure teardown
|
|
465
|
+
```
|
|
466
|
+
|
|
424
467
|
---
|
|
425
468
|
|
|
426
469
|
## Auto-Update Pipeline
|
|
@@ -450,6 +493,12 @@ New API endpoints and fields appear in the node automatically without manual dev
|
|
|
450
493
|
| Business Unit Search: `Search Not Ready` | Business Unit Search must be activated on your project — call `PUT /{projectKey}/business-units/search/indexing-status` with `{ "activated": true }` then wait for indexing to complete |
|
|
451
494
|
| GCP: private key / PEM errors | Use the **Service Account JSON** field; paste the entire `.json` key file, not individual fields |
|
|
452
495
|
| GCP: deploy timeout on first activation | GCP API enablement takes time on cold projects — retry after a minute |
|
|
496
|
+
| GCP: `gcpRegion` missing error on activation | Open the credential and select a GCP Region — the field is required for Cloud Functions deployment |
|
|
497
|
+
| AWS: wrong queue ARN in GovCloud / China regions | ARN is now fetched from `GetQueueAttributes` (not constructed manually) — update to v1.0.14 to fix |
|
|
498
|
+
| AWS: `credentials are invalid` or `permissions denied` | Verify the IAM user has SQS, Lambda, IAM, STS, and CloudWatch Logs permissions |
|
|
499
|
+
| Trigger: malformed webhook payload crashes execution | Update to v1.0.14 — invalid JSON payloads are now silently dropped instead of crashing the context |
|
|
500
|
+
| Subscription: `subscriptionId is empty` error | The subscription ID was not persisted in static data — deactivate and reactivate the workflow |
|
|
501
|
+
| Update operation: zero value (`0`) silently dropped | Update to v1.0.14 — `quantity: 0` and `centAmount: 0` are now sent correctly |
|
|
453
502
|
| Node not visible in n8n | Run `npm install` then `npm run dev` |
|
|
454
503
|
| Trigger: `"A message with the name 'PaymentMethodCreated' is unknown for the TypeId 'payment'"` | CT Subscriptions API does not support `payment-method` as a resourceTypeId. Use CT API Extensions or a schedule-based polling trigger instead. |
|
|
455
504
|
|
|
@@ -459,11 +508,11 @@ New API endpoints and fields appear in the node automatically without manual dev
|
|
|
459
508
|
|
|
460
509
|
| Version | Changes |
|
|
461
510
|
| ------- | ----------------------------------------------------------------------------------------------------------------------------|
|
|
511
|
+
| v1.0.14 | Two-pass refactor: modular `scripts/` and `nodes/` structure; 60+ bug fixes across AWS/GCP provisioning, subscription management, body building, SSRF guard, and error handling; all files under 300 lines |
|
|
462
512
|
| v1.0.13 | Added Standalone Prices, Stores, Product Tailoring, Customer Groups, Product Selections, Cart Discounts, and Discount Codes |
|
|
463
513
|
| v1.0.12 | Added Approval Rules, Approval Flows, and Associate Endpoints |
|
|
464
514
|
| v1.0.11 | Added Quotes, Quote Requests, Staged Quotes, Messages, and API Extensions |
|
|
465
515
|
| v1.0.10 | Added Claude AI agents and skills for automated development assistance |
|
|
466
|
-
|
|
467
516
|
|
|
468
517
|
|
|
469
518
|
|