@nodrel-dev/n8n-nodes-ups 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/credentials/UpsOAuth2Api.credentials.js +7 -1
- package/dist/credentials/UpsOAuth2Api.credentials.js.map +1 -1
- package/dist/credentials/UpsShipperProfileApi.credentials.js +8 -2
- package/dist/credentials/UpsShipperProfileApi.credentials.js.map +1 -1
- package/dist/nodes/Ups/Ups.node.js +17 -2
- package/dist/nodes/Ups/Ups.node.js.map +1 -1
- package/dist/nodes/Ups/resources/address/validate.operation.js +1 -9
- package/dist/nodes/Ups/resources/address/validate.operation.js.map +1 -1
- package/dist/nodes/Ups/resources/shipping/create.operation.js +81 -66
- package/dist/nodes/Ups/resources/shipping/create.operation.js.map +1 -1
- package/dist/nodes/Ups/resources/shipping/getRates.operation.js +27 -9
- package/dist/nodes/Ups/resources/shipping/getRates.operation.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
# 📦 n8n-
|
|
3
|
+
# 📦 n8n-ups-node
|
|
4
4
|
|
|
5
5
|
**Use the UPS REST API directly in your n8n workflows.**
|
|
6
6
|
|
|
@@ -206,7 +206,7 @@ The node sets `usableAsTool: true`, so every operation is callable from the AI-A
|
|
|
206
206
|
|
|
207
207
|
### Get Rates and Create
|
|
208
208
|
|
|
209
|
-
Both operations share the same **Shipper**, **Ship From**, and **Ship To** address fields, so values carry over when you switch between them. Package dimensions (length/width/height) are optional and only sent to UPS when provided. Ship From
|
|
209
|
+
Both operations share the same **Shipper**, **Ship From**, and **Ship To** address fields, so values carry over when you switch between them. Package dimensions (length/width/height) are optional and only sent to UPS when provided. Ship From defaults to the Shipper address and stays hidden until you turn on **Use a Different Ship-From Address** — switch it on only to override the physical origin (e.g. a warehouse or 3PL that differs from your account address); any field you leave blank still falls back to the matching Shipper value.
|
|
210
210
|
|
|
211
211
|
### The label binary (Create)
|
|
212
212
|
|
|
@@ -17,6 +17,12 @@ class UpsOAuth2Api {
|
|
|
17
17
|
this.icon = 'file:ups.svg';
|
|
18
18
|
this.documentationUrl = 'https://github.com/nodrel-dev/n8n-ups-node?tab=readme-ov-file#credentials';
|
|
19
19
|
this.properties = [
|
|
20
|
+
{
|
|
21
|
+
displayName: "1) Create an app at the UPS Developer Portal (developer.ups.com). 2) Copy its Client ID and Client Secret into the fields below. 3) Pick your Environment (start with Sandbox). 4) Click Test — a green result means you're connected and ready to track, rate, and ship. Use the same UPS account whose number you ship with.",
|
|
22
|
+
name: 'setupNotice',
|
|
23
|
+
type: 'notice',
|
|
24
|
+
default: '',
|
|
25
|
+
},
|
|
20
26
|
{
|
|
21
27
|
displayName: 'Environment',
|
|
22
28
|
name: 'environment',
|
|
@@ -26,7 +32,7 @@ class UpsOAuth2Api {
|
|
|
26
32
|
{ name: 'Production', value: 'production' },
|
|
27
33
|
],
|
|
28
34
|
default: 'sandbox',
|
|
29
|
-
description: 'Which UPS environment to use. Sandbox is the Customer Integration Environment (CIE). Drives both the token URL and the API base URL.',
|
|
35
|
+
description: 'Which UPS environment to use. Sandbox is the Customer Integration Environment (CIE). Drives both the token URL and the API base URL. In Sandbox (CIE), address validation only returns street-level results for US addresses in New York (NY) and California (CA), and Track returns a canned DELIVERED response for any well-formed 1Z number — these limits do not apply in Production.',
|
|
30
36
|
},
|
|
31
37
|
{
|
|
32
38
|
displayName: 'Grant Type',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpsOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/UpsOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AASA,MAAM,SAAS,GAAG;IACjB,OAAO,EAAE,gDAAgD;IACzD,UAAU,EAAE,qDAAqD;CACjE,CAAC;AAGF,MAAM,QAAQ,GAAG;IAChB,OAAO,EAAE,wBA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|
5
5
|
constructor() {
|
|
6
6
|
this.name = 'upsShipperProfileApi';
|
|
7
|
-
this.displayName = 'UPS Shipper Profile API';
|
|
7
|
+
this.displayName = 'UPS Shipper Profile (Optional) API';
|
|
8
8
|
this.icon = 'file:ups.svg';
|
|
9
9
|
this.documentationUrl = 'https://github.com/nodrel-dev/n8n-ups-node?tab=readme-ov-file#shipper-profiles';
|
|
10
10
|
this.properties = [
|
|
11
|
+
{
|
|
12
|
+
displayName: 'Optional. Stores reusable shipper details (name, address, phone, account number) so they are not re-typed on every shipment — no API key required. An explicit field on the node always overrides what you set here.',
|
|
13
|
+
name: 'profileNotice',
|
|
14
|
+
type: 'notice',
|
|
15
|
+
default: '',
|
|
16
|
+
},
|
|
11
17
|
{
|
|
12
18
|
displayName: 'Account Number',
|
|
13
19
|
name: 'accountNumber',
|
|
14
20
|
type: 'string',
|
|
15
21
|
default: '',
|
|
16
|
-
description: 'UPS account number (ShipperNumber). Must match the country registered for this account, or UPS rejects the
|
|
22
|
+
description: 'UPS account number (ShipperNumber). Must match the country registered for this account, or UPS rejects the request.',
|
|
17
23
|
},
|
|
18
24
|
{
|
|
19
25
|
displayName: 'Shipper Name',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpsShipperProfileApi.credentials.js","sourceRoot":"","sources":["../../credentials/UpsShipperProfileApi.credentials.ts"],"names":[],"mappings":";;;AAmBA,MAAa,oBAAoB;IAAjC;QACC,SAAI,GAAG,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"UpsShipperProfileApi.credentials.js","sourceRoot":"","sources":["../../credentials/UpsShipperProfileApi.credentials.ts"],"names":[],"mappings":";;;AAmBA,MAAa,oBAAoB;IAAjC;QACC,SAAI,GAAG,sBAAsB,CAAC;QAM9B,gBAAW,GAAG,oCAAoC,CAAC;QAEnD,SAAI,GAAS,cAAc,CAAC;QAE5B,qBAAgB,GACf,gFAAgF,CAAC;QAElF,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAC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OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,wEAAwE;aACrF;SACD,CAAC;IACH,CAAC;CAAA;AArFD,oDAqFC"}
|
|
@@ -22,8 +22,17 @@ class Ups {
|
|
|
22
22
|
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
23
23
|
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
24
24
|
credentials: [
|
|
25
|
-
{
|
|
26
|
-
|
|
25
|
+
{
|
|
26
|
+
name: 'upsOAuth2Api',
|
|
27
|
+
required: true,
|
|
28
|
+
displayOptions: { show: { authentication: ['upsOAuth2'] } },
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'upsShipperProfileApi',
|
|
32
|
+
displayName: 'Shipper Profile (Optional)',
|
|
33
|
+
required: false,
|
|
34
|
+
testedBy: 'upsShipperProfileTest',
|
|
35
|
+
},
|
|
27
36
|
],
|
|
28
37
|
requestDefaults: {
|
|
29
38
|
baseURL: '={{ $credentials.environment === "production" ? "https://onlinetools.ups.com/api" : "https://wwwcie.ups.com/api" }}',
|
|
@@ -33,6 +42,12 @@ class Ups {
|
|
|
33
42
|
},
|
|
34
43
|
},
|
|
35
44
|
properties: [
|
|
45
|
+
{
|
|
46
|
+
displayName: 'Authentication',
|
|
47
|
+
name: 'authentication',
|
|
48
|
+
type: 'hidden',
|
|
49
|
+
default: 'upsOAuth2',
|
|
50
|
+
},
|
|
36
51
|
{
|
|
37
52
|
displayName: 'Resource',
|
|
38
53
|
name: 'resource',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ups.node.js","sourceRoot":"","sources":["../../../nodes/Ups/Ups.node.ts"],"names":[],"mappings":";;;AAAA,+CAQsB;AACtB,mDAA2D;AAC3D,iDAAyD;AACzD,mDAA2D;AAE3D,MAAa,GAAG;IAAhB;QAMC,gBAAW,GAAyB;YACnC,WAAW,EAAE,KAAK;YAClB,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,EAAE,KAAK,EAA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CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;oBACrC,IAAI,CAAC,MAAM,EAAE,CAAC;wBACb,OAAO;4BACN,MAAM,EAAE,OAAO;4BACf,OAAO,EAAE,wEAAwE;yBACjF,CAAC;oBACH,CAAC;oBAED,MAAM,OAAO,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;oBACnC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;wBAC1D,OAAO;4BACN,MAAM,EAAE,OAAO;4BACf,OAAO,EAAE,iBAAiB,OAAO,4CAA4C;yBAC7E,CAAC;oBACH,CAAC;oBAED,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;gBAClE,CAAC;aACD;SACD,CAAC;IACH,CAAC;CAAA;AAtID,kBAsIC"}
|
|
@@ -58,7 +58,6 @@ exports.validateOperationDescription = [
|
|
|
58
58
|
type: 'string',
|
|
59
59
|
default: '',
|
|
60
60
|
displayOptions: { show: showOnlyForValidate },
|
|
61
|
-
description: 'City (maps to PoliticalDivision2)',
|
|
62
61
|
},
|
|
63
62
|
{
|
|
64
63
|
displayName: 'State / Province Code',
|
|
@@ -67,7 +66,7 @@ exports.validateOperationDescription = [
|
|
|
67
66
|
default: '',
|
|
68
67
|
placeholder: 'NY',
|
|
69
68
|
displayOptions: { show: showOnlyForValidate },
|
|
70
|
-
description: 'Two-letter state or province code
|
|
69
|
+
description: 'Two-letter state or province code',
|
|
71
70
|
},
|
|
72
71
|
{
|
|
73
72
|
displayName: 'Postal Code',
|
|
@@ -86,13 +85,6 @@ exports.validateOperationDescription = [
|
|
|
86
85
|
displayOptions: { show: showOnlyForValidate },
|
|
87
86
|
description: 'Two-letter country code',
|
|
88
87
|
},
|
|
89
|
-
{
|
|
90
|
-
displayName: 'In the UPS Customer Integration Environment (Sandbox), street-level validation only returns results for US addresses in New York (NY) and California (CA). This limit does not apply in Production.',
|
|
91
|
-
name: 'validateSandboxNotice',
|
|
92
|
-
type: 'notice',
|
|
93
|
-
default: '',
|
|
94
|
-
displayOptions: { show: showOnlyForValidate },
|
|
95
|
-
},
|
|
96
88
|
];
|
|
97
89
|
exports.validateOperationOption = {
|
|
98
90
|
name: 'Validate',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.operation.js","sourceRoot":"","sources":["../../../../../nodes/Ups/resources/address/validate.operation.ts"],"names":[],"mappings":";;;AAOA,0DAAoF;AACpF,gEAA6D;AAC7D,wDAAqD;AAErD,MAAM,mBAAmB,GAAG;IAC3B,SAAS,EAAE,CAAC,UAAU,CAAC;IACvB,QAAQ,EAAE,CAAC,SAAS,CAAC;CACrB,CAAC;AAEF,SAAS,WAAW,CAAC,GAA4B;IAChD,MAAM,KAAK,GAAG,GAAG,CAAC,gBAAgB,CAAC,cAAc,EAAE,EAAE,CAAW,CAAC;IACjE,MAAM,KAAK,GAAG,GAAG,CAAC,gBAAgB,CAAC,cAAc,EAAE,EAAE,CAAW,CAAC;IACjE,OAAO;QACN,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;QACpE,IAAI,EAAE,GAAG,CAAC,gBAAgB,CAAC,MAAM,EAAE,EAAE,CAAW;QAChD,iBAAiB,EAAE,GAAG,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,EAAE,CAAW;QAC1E,UAAU,EAAE,GAAG,CAAC,gBAAgB,CAAC,YAAY,EAAE,EAAE,CAAW;QAC5D,WAAW,EAAE,GAAG,CAAC,gBAAgB,CAAC,aAAa,EAAE,IAAI,CAAW;KAChE,CAAC;AACH,CAAC;AAGD,KAAK,UAAU,eAAe,CAE7B,cAAmC;IAEnC,cAAc,CAAC,IAAI,GAAG;QACrB,UAAU,EAAE;YACX,gBAAgB,EAAE,IAAA,2BAAY,EAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SACjD;KACD,CAAC;IACF,OAAO,cAAc,CAAC;AACvB,CAAC;AAGD,KAAK,UAAU,mBAAmB,CAEjC,MAA4B,EAC5B,QAA8B;IAE9B,IAAI,QAAQ,CAAC,UAAU,IAAI,GAAG,EAAE,CAAC;QAChC,IAAA,yBAAW,EAAC,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;IACjE,CAAC;IACD,MAAM,MAAM,GAAG,IAAA,iCAAe,EAAC,QAAQ,CAAC,IAAc,CAAC,CAAC;IACxD,OAAO,CAAC,EAAE,IAAI,EAAE,MAA+C,EAAE,CAAC,CAAC;AACpE,CAAC;AAEY,QAAA,4BAA4B,GAAsB;IAC9D;QACC,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE;QAC7C,WAAW,EAAE,uBAAuB;KACpC;IACD;QACC,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE;QAC7C,WAAW,EAAE,kCAAkC;KAC/C;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE;
|
|
1
|
+
{"version":3,"file":"validate.operation.js","sourceRoot":"","sources":["../../../../../nodes/Ups/resources/address/validate.operation.ts"],"names":[],"mappings":";;;AAOA,0DAAoF;AACpF,gEAA6D;AAC7D,wDAAqD;AA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AO,EAAE,IAAI;QACb,cAAc,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE;QAC7C,WAAW,EAAE,yBAAyB;KACtC;CACD,CAAC;AAEW,QAAA,uBAAuB,GAAG;IACtC,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,qBAAqB;IAC7B,WAAW,EAAE,2DAA2D;IACxE,OAAO,EAAE;QACR,OAAO,EAAE;YACR,MAAM,EAAE,MAAe;YAEvB,GAAG,EAAE,yBAAyB;YAC9B,sBAAsB,EAAE,IAAI;SAC5B;QACD,IAAI,EAAE;YACL,OAAO,EAAE,CAAC,eAAe,CAAC;SAC1B;QACD,MAAM,EAAE;YACP,WAAW,EAAE,CAAC,mBAAmB,CAAC;SAClC;KACD;CACD,CAAC"}
|
|
@@ -12,6 +12,8 @@ const showOnlyForCreate = {
|
|
|
12
12
|
operation: ['create'],
|
|
13
13
|
resource: ['shipping'],
|
|
14
14
|
};
|
|
15
|
+
const showOnlyForCreateIntl = { ...showOnlyForCreate, international: [true] };
|
|
16
|
+
const showOnlyForCreateShipFrom = { ...showOnlyForCreate, useDifferentShipFrom: [true] };
|
|
15
17
|
function readCommodities(get) {
|
|
16
18
|
var _a;
|
|
17
19
|
const rows = (_a = get('commodities.line', [])) !== null && _a !== void 0 ? _a : [];
|
|
@@ -34,13 +36,12 @@ function todayYyyyMmdd() {
|
|
|
34
36
|
}
|
|
35
37
|
function readCustoms(get) {
|
|
36
38
|
const soldTo = (0, readParties_1.readAddress)(get, 'soldTo');
|
|
37
|
-
const customs = get('customs', {});
|
|
38
39
|
return {
|
|
39
|
-
reasonForExport:
|
|
40
|
-
currency:
|
|
41
|
-
termsOfShipment:
|
|
42
|
-
invoiceNumber: (
|
|
43
|
-
invoiceDate: (
|
|
40
|
+
reasonForExport: get('customsReasonForExport', 'SALE') || 'SALE',
|
|
41
|
+
currency: get('customsCurrency', 'USD') || 'USD',
|
|
42
|
+
termsOfShipment: get('customsTermsOfShipment', 'DDU') || 'DDU',
|
|
43
|
+
invoiceNumber: (get('customsInvoiceNumber', '') || '').trim() || undefined,
|
|
44
|
+
invoiceDate: (get('customsInvoiceDate', '') || '').trim() || todayYyyyMmdd(),
|
|
44
45
|
soldTo: {
|
|
45
46
|
name: get('soldToName', ''),
|
|
46
47
|
addressLines: soldTo.addressLines,
|
|
@@ -82,7 +83,9 @@ async function createPreSend(requestOptions) {
|
|
|
82
83
|
});
|
|
83
84
|
}
|
|
84
85
|
if (parties.international && readCommodities(get).length === 0) {
|
|
85
|
-
throw new n8n_workflow_1.NodeOperationError(node, 'International shipments require at least one customs commodity line.'
|
|
86
|
+
throw new n8n_workflow_1.NodeOperationError(node, 'International shipments require at least one customs commodity line.', {
|
|
87
|
+
description: 'The origin and destination countries differ. Turn on "Is International Shipment" to reveal the Customs, Sold To, and Commodities fields, then add at least one commodity line.',
|
|
88
|
+
});
|
|
86
89
|
}
|
|
87
90
|
requestOptions.body = buildShipmentBody(get, parties);
|
|
88
91
|
return requestOptions;
|
|
@@ -111,7 +114,7 @@ exports.createOperationDescription = [
|
|
|
111
114
|
type: 'string',
|
|
112
115
|
default: '',
|
|
113
116
|
displayOptions: { show: showOnlyForCreate },
|
|
114
|
-
description: '
|
|
117
|
+
description: 'Enter your UPS account number — this is the account that ships and is billed for the shipment (Type 01). This is your ShipperNumber; leave blank only if a UPS Shipper Profile credential supplies it.',
|
|
115
118
|
},
|
|
116
119
|
{
|
|
117
120
|
displayName: 'Service',
|
|
@@ -119,13 +122,13 @@ exports.createOperationDescription = [
|
|
|
119
122
|
type: 'options',
|
|
120
123
|
required: true,
|
|
121
124
|
options: [
|
|
125
|
+
{ name: 'Ground (03)', value: '03' },
|
|
122
126
|
{ name: 'Next Day Air (01)', value: '01' },
|
|
123
127
|
{ name: '2nd Day Air (02)', value: '02' },
|
|
124
|
-
{ name: '
|
|
128
|
+
{ name: '3 Day Select (12)', value: '12' },
|
|
125
129
|
{ name: 'Express (07)', value: '07' },
|
|
126
130
|
{ name: 'Expedited (08)', value: '08' },
|
|
127
131
|
{ name: 'UPS Standard (11)', value: '11' },
|
|
128
|
-
{ name: '3 Day Select (12)', value: '12' },
|
|
129
132
|
{ name: 'Next Day Air Saver (13)', value: '13' },
|
|
130
133
|
{ name: 'Next Day Air Early (14)', value: '14' },
|
|
131
134
|
{ name: 'Worldwide Economy DDU (17)', value: '17' },
|
|
@@ -152,7 +155,7 @@ exports.createOperationDescription = [
|
|
|
152
155
|
description: 'UPS service. Availability depends on the lane and account; codes shown in parentheses match UPS Service.Code.',
|
|
153
156
|
},
|
|
154
157
|
{
|
|
155
|
-
displayName: '
|
|
158
|
+
displayName: 'Tip: attach a UPS Shipper Profile credential to reuse your Shipper details and account number across shipments without re-typing. Any value you enter here overrides the profile.',
|
|
156
159
|
name: 'shipperProfileNoticeCreate',
|
|
157
160
|
type: 'notice',
|
|
158
161
|
default: '',
|
|
@@ -166,12 +169,20 @@ exports.createOperationDescription = [
|
|
|
166
169
|
includePhone: true,
|
|
167
170
|
countryDefault: '',
|
|
168
171
|
}),
|
|
172
|
+
{
|
|
173
|
+
displayName: 'Use a Different Ship-From Address',
|
|
174
|
+
name: 'useDifferentShipFrom',
|
|
175
|
+
type: 'boolean',
|
|
176
|
+
default: false,
|
|
177
|
+
displayOptions: { show: showOnlyForCreate },
|
|
178
|
+
description: 'Whether the package ships from a different address than the Shipper. Leave off to ship from the Shipper address (the default). Turn on only to override the physical origin — e.g. a warehouse or 3PL that differs from your account address.',
|
|
179
|
+
},
|
|
169
180
|
...(0, shippingFields_1.addressFields)({
|
|
170
181
|
prefix: 'shipFrom',
|
|
171
182
|
label: 'Ship From',
|
|
172
|
-
show:
|
|
183
|
+
show: showOnlyForCreateShipFrom,
|
|
173
184
|
includeName: true,
|
|
174
|
-
hint: '
|
|
185
|
+
hint: 'Origin address when it differs from the Shipper. Any field left blank falls back to the matching Shipper value.',
|
|
175
186
|
}),
|
|
176
187
|
...(0, shippingFields_1.addressFields)({
|
|
177
188
|
prefix: 'shipTo',
|
|
@@ -188,72 +199,76 @@ exports.createOperationDescription = [
|
|
|
188
199
|
name: 'labelFormat',
|
|
189
200
|
type: 'options',
|
|
190
201
|
options: [
|
|
191
|
-
{ name: '
|
|
192
|
-
{ name: '
|
|
193
|
-
{ name: '
|
|
194
|
-
{ name: '
|
|
202
|
+
{ name: 'GIF (Image — View or Attach Anywhere)', value: 'GIF' },
|
|
203
|
+
{ name: 'ZPL (Zebra Thermal Printer)', value: 'ZPL' },
|
|
204
|
+
{ name: 'EPL (Eltron Thermal Printer)', value: 'EPL' },
|
|
205
|
+
{ name: 'SPL (Star Thermal Printer)', value: 'SPL' },
|
|
195
206
|
],
|
|
196
207
|
default: 'GIF',
|
|
197
208
|
displayOptions: { show: showOnlyForCreate },
|
|
198
|
-
description: 'Label image format.
|
|
209
|
+
description: 'Label image format. GIF is a screen-friendly image; ZPL, EPL, and SPL are thermal label-printer formats. PDF labels are not available.',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
displayName: 'Is International Shipment',
|
|
213
|
+
name: 'international',
|
|
214
|
+
type: 'boolean',
|
|
215
|
+
default: false,
|
|
216
|
+
displayOptions: { show: showOnlyForCreate },
|
|
217
|
+
description: 'Whether this is a cross-border shipment (origin and destination countries differ). Turning it on reveals the Customs, Sold To, and Commodities fields; you can safely leave it off — the node still detects a genuine international lane from the addresses at run time, so a cross-border shipment will not fail silently.',
|
|
199
218
|
},
|
|
200
219
|
{
|
|
201
|
-
displayName: '
|
|
220
|
+
displayName: 'Customs details for an international shipment (the origin and destination countries differ). At least one commodity line is required; the other fields apply sensible defaults.',
|
|
202
221
|
name: 'customsNotice',
|
|
203
222
|
type: 'notice',
|
|
204
223
|
default: '',
|
|
205
|
-
displayOptions: { show:
|
|
224
|
+
displayOptions: { show: showOnlyForCreateIntl },
|
|
206
225
|
},
|
|
207
226
|
{
|
|
208
|
-
displayName: 'Customs',
|
|
209
|
-
name: '
|
|
210
|
-
type: '
|
|
211
|
-
|
|
212
|
-
default:
|
|
213
|
-
displayOptions: { show:
|
|
214
|
-
description: 'Commercial-invoice
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
default: 'DDU',
|
|
249
|
-
description: 'Incoterms. v1 bills duties to the receiver (DDU).',
|
|
250
|
-
},
|
|
251
|
-
],
|
|
227
|
+
displayName: 'Customs Currency',
|
|
228
|
+
name: 'customsCurrency',
|
|
229
|
+
type: 'options',
|
|
230
|
+
options: shippingFields_1.CURRENCY_OPTIONS,
|
|
231
|
+
default: 'USD',
|
|
232
|
+
displayOptions: { show: showOnlyForCreateIntl },
|
|
233
|
+
description: 'Commercial-invoice currency. Pick a common code, or use an expression for any ISO 4217 code.',
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
displayName: 'Invoice Date',
|
|
237
|
+
name: 'customsInvoiceDate',
|
|
238
|
+
type: 'string',
|
|
239
|
+
default: '',
|
|
240
|
+
placeholder: 'yyyyMMdd',
|
|
241
|
+
displayOptions: { show: showOnlyForCreateIntl },
|
|
242
|
+
description: 'Commercial-invoice date in yyyyMMdd format. UPS requires it for international shipments; leave blank to use today (UTC).',
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
displayName: 'Invoice Number',
|
|
246
|
+
name: 'customsInvoiceNumber',
|
|
247
|
+
type: 'string',
|
|
248
|
+
default: '',
|
|
249
|
+
displayOptions: { show: showOnlyForCreateIntl },
|
|
250
|
+
description: 'Commercial-invoice number (optional)',
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
displayName: 'Reason For Export',
|
|
254
|
+
name: 'customsReasonForExport',
|
|
255
|
+
type: 'string',
|
|
256
|
+
default: 'SALE',
|
|
257
|
+
displayOptions: { show: showOnlyForCreateIntl },
|
|
258
|
+
description: 'Commercial-invoice reason for export (e.g. SALE, GIFT, SAMPLE)',
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
displayName: 'Terms Of Shipment',
|
|
262
|
+
name: 'customsTermsOfShipment',
|
|
263
|
+
type: 'string',
|
|
264
|
+
default: 'DDU',
|
|
265
|
+
displayOptions: { show: showOnlyForCreateIntl },
|
|
266
|
+
description: 'Incoterms. v1 bills duties to the receiver (DDU).',
|
|
252
267
|
},
|
|
253
268
|
...(0, shippingFields_1.addressFields)({
|
|
254
269
|
prefix: 'soldTo',
|
|
255
270
|
label: 'Sold To',
|
|
256
|
-
show:
|
|
271
|
+
show: showOnlyForCreateIntl,
|
|
257
272
|
includeName: true,
|
|
258
273
|
hint: 'International shipments only. The party the goods are sold to (commercial invoice).',
|
|
259
274
|
}),
|
|
@@ -263,7 +278,7 @@ exports.createOperationDescription = [
|
|
|
263
278
|
type: 'fixedCollection',
|
|
264
279
|
typeOptions: { multipleValues: true },
|
|
265
280
|
default: {},
|
|
266
|
-
displayOptions: { show:
|
|
281
|
+
displayOptions: { show: showOnlyForCreateIntl },
|
|
267
282
|
description: 'Customs commodity lines (international only)',
|
|
268
283
|
options: [
|
|
269
284
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.operation.js","sourceRoot":"","sources":["../../../../../nodes/Ups/resources/shipping/create.operation.ts"],"names":[],"mappings":";;;AAAA,+CAQsB;AAGtB,0EAAuE;AACvE,wEAAqE;AAErE,wDAAqD;AACrD,qDAAkF;AAClF,+CAMuB;AACvB,qDAAsD;AAEtD,MAAM,iBAAiB,GAAG;IACzB,SAAS,E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BACzB,IAAI,EAAE,WAAW;wBACjB,IAAI,EAAE,QAAQ;wBACd,OAAO,EAAE,CAAC;wBACV,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE;qBAC5B;iBACD;aACD;SACD;KACD;CACD,CAAC;AAEW,QAAA,qBAAqB,GAAG;IACpC,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,mCAAmC;IAC3C,WAAW,EACV,uGAAuG;IACxG,OAAO,EAAE;QACR,OAAO,EAAE;YACR,MAAM,EAAE,MAAe;YACvB,GAAG,EAAE,uBAAuB;YAC5B,sBAAsB,EAAE,IAAI;SAC5B;QACD,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,aAAa,CAAC,EAAE;QAClC,MAAM,EAAE,EAAE,WAAW,EAAE,CAAC,iBAAiB,CAAC,EAAE;KAC5C;CACD,CAAC"}
|
|
@@ -12,6 +12,8 @@ const showOnlyForRates = {
|
|
|
12
12
|
operation: ['getRates'],
|
|
13
13
|
resource: ['shipping'],
|
|
14
14
|
};
|
|
15
|
+
const showOnlyForRatesIntl = { ...showOnlyForRates, international: [true] };
|
|
16
|
+
const showOnlyForRatesShipFrom = { ...showOnlyForRates, useDifferentShipFrom: [true] };
|
|
15
17
|
async function ratesPreSend(requestOptions) {
|
|
16
18
|
const node = this.getNode();
|
|
17
19
|
const get = (name, fallback) => this.getNodeParameter(name, fallback);
|
|
@@ -25,7 +27,7 @@ async function ratesPreSend(requestOptions) {
|
|
|
25
27
|
const customsValue = get('customsValue', 0) || 0;
|
|
26
28
|
if (parties.international && customsValue <= 0) {
|
|
27
29
|
throw new n8n_workflow_1.NodeOperationError(node, 'A customs value is required for an international shipment.', {
|
|
28
|
-
description: 'The origin and destination countries differ
|
|
30
|
+
description: 'The origin and destination countries differ. Turn on "Is International Shipment" to reveal the customs fields, then enter the customs value of the goods.',
|
|
29
31
|
});
|
|
30
32
|
}
|
|
31
33
|
requestOptions.body = (0, buildRateRequest_1.buildRateRequest)({
|
|
@@ -55,10 +57,10 @@ exports.getRatesOperationDescription = [
|
|
|
55
57
|
type: 'string',
|
|
56
58
|
default: '',
|
|
57
59
|
displayOptions: { show: showOnlyForRates },
|
|
58
|
-
description: '
|
|
60
|
+
description: 'Enter your UPS account number to get your negotiated rates, not just published rates. This is your ShipperNumber; leave blank only if a UPS Shipper Profile credential supplies it.',
|
|
59
61
|
},
|
|
60
62
|
{
|
|
61
|
-
displayName: '
|
|
63
|
+
displayName: 'Tip: attach a UPS Shipper Profile credential to reuse your Shipper details and account number across shipments without re-typing. Any value you enter here overrides the profile.',
|
|
62
64
|
name: 'shipperProfileNoticeRates',
|
|
63
65
|
type: 'notice',
|
|
64
66
|
default: '',
|
|
@@ -70,11 +72,19 @@ exports.getRatesOperationDescription = [
|
|
|
70
72
|
show: showOnlyForRates,
|
|
71
73
|
countryDefault: '',
|
|
72
74
|
}),
|
|
75
|
+
{
|
|
76
|
+
displayName: 'Use a Different Ship-From Address',
|
|
77
|
+
name: 'useDifferentShipFrom',
|
|
78
|
+
type: 'boolean',
|
|
79
|
+
default: false,
|
|
80
|
+
displayOptions: { show: showOnlyForRates },
|
|
81
|
+
description: 'Whether the package ships from a different address than the Shipper. Leave off to ship from the Shipper address (the default). Turn on only to override the physical origin — e.g. a warehouse or 3PL that differs from your account address.',
|
|
82
|
+
},
|
|
73
83
|
...(0, shippingFields_1.addressFields)({
|
|
74
84
|
prefix: 'shipFrom',
|
|
75
85
|
label: 'Ship From',
|
|
76
|
-
show:
|
|
77
|
-
hint: '
|
|
86
|
+
show: showOnlyForRatesShipFrom,
|
|
87
|
+
hint: 'Origin address when it differs from the Shipper. Any field left blank falls back to the matching Shipper value.',
|
|
78
88
|
}),
|
|
79
89
|
...(0, shippingFields_1.addressFields)({
|
|
80
90
|
prefix: 'shipTo',
|
|
@@ -85,11 +95,19 @@ exports.getRatesOperationDescription = [
|
|
|
85
95
|
}),
|
|
86
96
|
...(0, shippingFields_1.packageFields)(showOnlyForRates),
|
|
87
97
|
{
|
|
88
|
-
displayName: '
|
|
98
|
+
displayName: 'Is International Shipment',
|
|
99
|
+
name: 'international',
|
|
100
|
+
type: 'boolean',
|
|
101
|
+
default: false,
|
|
102
|
+
displayOptions: { show: showOnlyForRates },
|
|
103
|
+
description: 'Whether this is a cross-border shipment (origin and destination countries differ). Turning it on reveals the customs fields; you can safely leave it off — the node still detects a genuine international lane from the addresses at run time, so a cross-border shipment will not fail silently.',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
displayName: 'Customs details for an international shipment (the origin and destination countries differ). A customs value is required.',
|
|
89
107
|
name: 'ratesCustomsNotice',
|
|
90
108
|
type: 'notice',
|
|
91
109
|
default: '',
|
|
92
|
-
displayOptions: { show:
|
|
110
|
+
displayOptions: { show: showOnlyForRatesIntl },
|
|
93
111
|
},
|
|
94
112
|
{
|
|
95
113
|
displayName: 'Customs Value',
|
|
@@ -97,7 +115,7 @@ exports.getRatesOperationDescription = [
|
|
|
97
115
|
type: 'number',
|
|
98
116
|
default: 0,
|
|
99
117
|
typeOptions: { minValue: 0 },
|
|
100
|
-
displayOptions: { show:
|
|
118
|
+
displayOptions: { show: showOnlyForRatesIntl },
|
|
101
119
|
description: 'Declared value of goods. Required when origin and destination countries differ (international).',
|
|
102
120
|
},
|
|
103
121
|
{
|
|
@@ -106,7 +124,7 @@ exports.getRatesOperationDescription = [
|
|
|
106
124
|
type: 'options',
|
|
107
125
|
options: shippingFields_1.CURRENCY_OPTIONS,
|
|
108
126
|
default: 'USD',
|
|
109
|
-
displayOptions: { show:
|
|
127
|
+
displayOptions: { show: showOnlyForRatesIntl },
|
|
110
128
|
description: 'Currency for the customs value. Pick a common code, or use an expression to set any ISO 4217 code.',
|
|
111
129
|
},
|
|
112
130
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRates.operation.js","sourceRoot":"","sources":["../../../../../nodes/Ups/resources/shipping/getRates.operation.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AACtB,kEAA+D;AAC/D,0DAAuD;AACvD,wDAAqD;AACrD,qDAAkF;AAClF,+CAAsF;AACtF,qDAAsD;AAEtD,MAAM,gBAAgB,GAAG;IACxB,SAAS,EAAE,CAAC,UAAU,CAAC;IACvB,QAAQ,EAAE,CAAC,UAAU,CAAC;CACtB,CAAC;
|
|
1
|
+
{"version":3,"file":"getRates.operation.js","sourceRoot":"","sources":["../../../../../nodes/Ups/resources/shipping/getRates.operation.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AACtB,kEAA+D;AAC/D,0DAAuD;AACvD,wDAAqD;AACrD,qDAAkF;AAClF,+CAAsF;AACtF,qDAAsD;AAEtD,MAAM,gBAAgB,GAAG;IACxB,SAAS,EAAE,CAAC,UAAU,CAAC;IACvB,QAAQ,EAAE,CAAC,UAAU,CAAC;CACtB,CAAC;AAKF,MAAM,oBAAoB,GAAG,EAAE,GAAG,gBAAgB,EAAE,aAAa,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;AAK5E,MAAM,wBAAwB,GAAG,EAAE,GAAG,gBAAgB,EAAE,oBAAoB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;AAOvF,KAAK,UAAU,YAAY,CAE1B,cAAmC;IAEnC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAE5B,MAAM,GAAG,GAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAiB,CAAC,CAAC;IAK5F,MAAM,OAAO,GAAG,MAAM,IAAA,mCAAkB,EAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,OAAO,GAAG,IAAA,oCAAsB,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACrD,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;QAC5B,MAAM,IAAI,iCAAkB,CAAC,IAAI,EAAE,iDAAiD,EAAE;YACrF,WAAW,EACV,yIAAyI;SAC1I,CAA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4
|
"description": "n8n community node for UPS: rating, tracking, and address validation via the UPS REST API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/nodrel-dev/n8n-ups-node",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nodrel-dev/n8n-nodes-ups",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "n8n community node for UPS: rating, tracking, and address validation via the UPS REST API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/nodrel-dev/n8n-ups-node",
|