@nodrel-dev/n8n-nodes-ups 0.3.1 → 0.5.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 +46 -14
- package/dist/credentials/UpsOAuth2Api.credentials.js +7 -1
- package/dist/credentials/UpsOAuth2Api.credentials.js.map +1 -1
- package/dist/credentials/UpsShipperProfileApi.credentials.d.ts +8 -0
- package/dist/credentials/UpsShipperProfileApi.credentials.js +82 -0
- package/dist/credentials/UpsShipperProfileApi.credentials.js.map +1 -0
- package/dist/nodes/Ups/Ups.node.d.ts +6 -1
- package/dist/nodes/Ups/Ups.node.js +42 -1
- package/dist/nodes/Ups/Ups.node.js.map +1 -1
- package/dist/nodes/Ups/Ups.node.json +2 -2
- package/dist/nodes/Ups/core/buildRateRequest.d.ts +34 -0
- package/dist/nodes/Ups/core/buildRateRequest.js +33 -0
- package/dist/nodes/Ups/core/buildRateRequest.js.map +1 -0
- package/dist/nodes/Ups/core/buildShipmentRequest.d.ts +33 -0
- package/dist/nodes/Ups/core/buildShipmentRequest.js +57 -0
- package/dist/nodes/Ups/core/buildShipmentRequest.js.map +1 -0
- package/dist/nodes/Ups/core/buildShipmentResult.d.ts +18 -0
- package/dist/nodes/Ups/core/buildShipmentResult.js +34 -0
- package/dist/nodes/Ups/core/buildShipmentResult.js.map +1 -0
- package/dist/nodes/Ups/resources/address/validate.operation.js +9 -3
- package/dist/nodes/Ups/resources/address/validate.operation.js.map +1 -1
- package/dist/nodes/Ups/resources/shipping/create.operation.js +170 -211
- package/dist/nodes/Ups/resources/shipping/create.operation.js.map +1 -1
- package/dist/nodes/Ups/resources/shipping/getRates.operation.js +62 -51
- package/dist/nodes/Ups/resources/shipping/getRates.operation.js.map +1 -1
- package/dist/nodes/Ups/resources/shipping/{shared.d.ts → readParties.d.ts} +13 -13
- package/dist/nodes/Ups/resources/shipping/readParties.js +60 -0
- package/dist/nodes/Ups/resources/shipping/readParties.js.map +1 -0
- package/dist/nodes/Ups/resources/shipping/shipperProfile.d.ts +25 -0
- package/dist/nodes/Ups/resources/shipping/shipperProfile.js +40 -0
- package/dist/nodes/Ups/resources/shipping/shipperProfile.js.map +1 -0
- package/dist/nodes/Ups/resources/shipping/shippingFields.d.ts +18 -0
- package/dist/nodes/Ups/resources/shipping/{shared.js → shippingFields.js} +52 -44
- package/dist/nodes/Ups/resources/shipping/shippingFields.js.map +1 -0
- package/dist/package.json +5 -4
- package/package.json +5 -4
- package/dist/nodes/Ups/resources/shipping/shared.js.map +0 -1
|
@@ -2,62 +2,44 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRatesOperationOption = exports.getRatesOperationDescription = void 0;
|
|
4
4
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
const
|
|
5
|
+
const buildRateRequest_1 = require("../../core/buildRateRequest");
|
|
6
6
|
const flattenRates_1 = require("../../core/flattenRates");
|
|
7
|
-
const isInternational_1 = require("../../core/isInternational");
|
|
8
7
|
const mapUpsError_1 = require("../../core/mapUpsError");
|
|
9
|
-
const
|
|
8
|
+
const shippingFields_1 = require("./shippingFields");
|
|
9
|
+
const readParties_1 = require("./readParties");
|
|
10
|
+
const shipperProfile_1 = require("./shipperProfile");
|
|
10
11
|
const showOnlyForRates = {
|
|
11
12
|
operation: ['getRates'],
|
|
12
13
|
resource: ['shipping'],
|
|
13
14
|
};
|
|
15
|
+
const showOnlyForRatesIntl = { ...showOnlyForRates, international: [true] };
|
|
14
16
|
async function ratesPreSend(requestOptions) {
|
|
15
17
|
const node = this.getNode();
|
|
16
18
|
const get = (name, fallback) => this.getNodeParameter(name, fallback);
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
+
const profile = await (0, shipperProfile_1.loadShipperProfile)(this);
|
|
20
|
+
const parties = (0, readParties_1.resolveShipmentParties)(get, profile);
|
|
21
|
+
if (!parties.accountNumber) {
|
|
19
22
|
throw new n8n_workflow_1.NodeOperationError(node, 'An account number is required to request rates.', {
|
|
20
|
-
description: 'Enter your UPS account number (ShipperNumber) on the Get Rates operation.',
|
|
23
|
+
description: 'Enter your UPS account number (ShipperNumber) on the Get Rates operation, or attach a UPS Shipper Profile credential that supplies one.',
|
|
21
24
|
});
|
|
22
25
|
}
|
|
23
|
-
const shipper = (0, shared_1.readAddress)(get, 'shipper');
|
|
24
|
-
const shipTo = (0, shared_1.readAddress)(get, 'shipTo');
|
|
25
|
-
const shipFrom = (0, shared_1.readAddress)(get, 'shipFrom');
|
|
26
|
-
const hasShipFrom = shipFrom.addressLines.length > 0 || shipFrom.city.length > 0;
|
|
27
|
-
const effectiveShipFrom = hasShipFrom ? shipFrom : shipper;
|
|
28
26
|
const customsValue = get('customsValue', 0) || 0;
|
|
29
|
-
if (
|
|
27
|
+
if (parties.international && customsValue <= 0) {
|
|
30
28
|
throw new n8n_workflow_1.NodeOperationError(node, 'A customs value is required for an international shipment.', {
|
|
31
|
-
description: 'The origin and destination countries differ
|
|
29
|
+
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.',
|
|
32
30
|
});
|
|
33
31
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
UnitOfMeasurement: { Code: weightUnit, Description: weightUnit },
|
|
46
|
-
Weight: String(weight),
|
|
47
|
-
},
|
|
48
|
-
ShipmentRatingOptions: { NegotiatedRatesIndicator: '' },
|
|
49
|
-
Package: { PackagingType: { Code: '02' }, ...pkg },
|
|
50
|
-
};
|
|
51
|
-
if (customsValue > 0) {
|
|
52
|
-
shipment.InvoiceLineTotal = { CurrencyCode: currency, MonetaryValue: String(customsValue) };
|
|
53
|
-
}
|
|
54
|
-
requestOptions.body = {
|
|
55
|
-
RateRequest: {
|
|
56
|
-
Request: { TransactionReference: { CustomerContext: 'n8n-nodes-ups rate' } },
|
|
57
|
-
PickupType: { Code: '01' },
|
|
58
|
-
Shipment: shipment,
|
|
59
|
-
},
|
|
60
|
-
};
|
|
32
|
+
requestOptions.body = (0, buildRateRequest_1.buildRateRequest)({
|
|
33
|
+
accountNumber: parties.accountNumber,
|
|
34
|
+
shipper: parties.shipper.address,
|
|
35
|
+
shipTo: parties.shipTo,
|
|
36
|
+
effectiveShipFrom: parties.effectiveShipFrom,
|
|
37
|
+
package: (0, readParties_1.readPackage)(get),
|
|
38
|
+
weight: get('weight', 1) || 0,
|
|
39
|
+
weightUnit: get('weightUnit', 'LBS') || 'LBS',
|
|
40
|
+
customsValue,
|
|
41
|
+
currency: get('customsCurrency', 'USD') || 'USD',
|
|
42
|
+
});
|
|
61
43
|
return requestOptions;
|
|
62
44
|
}
|
|
63
45
|
async function ratesPostReceive(_items, response) {
|
|
@@ -72,40 +54,69 @@ exports.getRatesOperationDescription = [
|
|
|
72
54
|
displayName: 'Account Number',
|
|
73
55
|
name: 'accountNumber',
|
|
74
56
|
type: 'string',
|
|
75
|
-
required: true,
|
|
76
57
|
default: '',
|
|
77
58
|
displayOptions: { show: showOnlyForRates },
|
|
78
|
-
description: 'Your UPS account number (ShipperNumber). Required
|
|
59
|
+
description: 'Your UPS account number (ShipperNumber). Required (also requests negotiated rates) — leave blank only if a UPS Shipper Profile credential supplies it.',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
displayName: 'Tip: attach a UPS Shipper Profile credential to auto-fill the Shipper fields and Account Number. Any value you enter here overrides the profile.',
|
|
63
|
+
name: 'shipperProfileNoticeRates',
|
|
64
|
+
type: 'notice',
|
|
65
|
+
default: '',
|
|
66
|
+
displayOptions: { show: showOnlyForRates },
|
|
79
67
|
},
|
|
80
|
-
...(0,
|
|
81
|
-
|
|
68
|
+
...(0, shippingFields_1.addressFields)({
|
|
69
|
+
prefix: 'shipper',
|
|
70
|
+
label: 'Shipper',
|
|
71
|
+
show: showOnlyForRates,
|
|
72
|
+
countryDefault: '',
|
|
73
|
+
}),
|
|
74
|
+
...(0, shippingFields_1.addressFields)({
|
|
82
75
|
prefix: 'shipFrom',
|
|
83
|
-
label: 'Ship From
|
|
76
|
+
label: 'Ship From',
|
|
84
77
|
show: showOnlyForRates,
|
|
78
|
+
hint: 'Optional. Defaults to the Shipper address when left blank.',
|
|
85
79
|
}),
|
|
86
|
-
...(0,
|
|
80
|
+
...(0, shippingFields_1.addressFields)({
|
|
87
81
|
prefix: 'shipTo',
|
|
88
82
|
label: 'Ship To',
|
|
89
83
|
show: showOnlyForRates,
|
|
90
84
|
required: true,
|
|
91
85
|
includeResidential: true,
|
|
92
86
|
}),
|
|
93
|
-
...(0,
|
|
87
|
+
...(0, shippingFields_1.packageFields)(showOnlyForRates),
|
|
88
|
+
{
|
|
89
|
+
displayName: 'Is International Shipment',
|
|
90
|
+
name: 'international',
|
|
91
|
+
type: 'boolean',
|
|
92
|
+
default: false,
|
|
93
|
+
displayOptions: { show: showOnlyForRates },
|
|
94
|
+
description: 'Whether this shipment is international (the origin and destination countries differ). Turning it on reveals the required customs fields; the node still validates internationality from the addresses at run time, so a genuine cross-border lane is caught even if this is left off.',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
displayName: 'Customs details for an international shipment (the origin and destination countries differ). A customs value is required.',
|
|
98
|
+
name: 'ratesCustomsNotice',
|
|
99
|
+
type: 'notice',
|
|
100
|
+
default: '',
|
|
101
|
+
displayOptions: { show: showOnlyForRatesIntl },
|
|
102
|
+
},
|
|
94
103
|
{
|
|
95
104
|
displayName: 'Customs Value',
|
|
96
105
|
name: 'customsValue',
|
|
97
106
|
type: 'number',
|
|
98
107
|
default: 0,
|
|
99
|
-
|
|
108
|
+
typeOptions: { minValue: 0 },
|
|
109
|
+
displayOptions: { show: showOnlyForRatesIntl },
|
|
100
110
|
description: 'Declared value of goods. Required when origin and destination countries differ (international).',
|
|
101
111
|
},
|
|
102
112
|
{
|
|
103
113
|
displayName: 'Customs Currency',
|
|
104
114
|
name: 'customsCurrency',
|
|
105
|
-
type: '
|
|
115
|
+
type: 'options',
|
|
116
|
+
options: shippingFields_1.CURRENCY_OPTIONS,
|
|
106
117
|
default: 'USD',
|
|
107
|
-
displayOptions: { show:
|
|
108
|
-
description: 'Currency
|
|
118
|
+
displayOptions: { show: showOnlyForRatesIntl },
|
|
119
|
+
description: 'Currency for the customs value. Pick a common code, or use an expression to set any ISO 4217 code.',
|
|
109
120
|
},
|
|
110
121
|
];
|
|
111
122
|
exports.getRatesOperationOption = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRates.operation.js","sourceRoot":"","sources":["../../../../../nodes/Ups/resources/shipping/getRates.operation.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AACtB,
|
|
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;AAO5E,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,EA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EAAE,gBAAgB,EAAE;QAC1C,WAAW,EACV,uRAAuR;KACxR;IACD;QACC,WAAW,EACV,2HAA2H;QAC5H,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE;KAC9C;IACD;QACC,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE;QAC5B,cAAc,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE;QAC9C,WAAW,EACV,iGAAiG;KAClG;IACD;QACC,WAAW,EAAE,kBAAkB;QAC/B,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,iCAAgB;QACzB,OAAO,EAAE,KAAK;QACd,cAAc,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE;QAC9C,WAAW,EACV,oGAAoG;KACrG;CACD,CAAC;AAEW,QAAA,uBAAuB,GAAG;IACtC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,iBAAiB;IACzB,WAAW,EAAE,4EAA4E;IACzF,OAAO,EAAE;QACR,OAAO,EAAE;YACR,MAAM,EAAE,MAAe;YAEvB,GAAG,EAAE,iCAAiC;YACtC,sBAAsB,EAAE,IAAI;SAC5B;QACD,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE;QACjC,MAAM,EAAE,EAAE,WAAW,EAAE,CAAC,gBAAgB,CAAC,EAAE;KAC3C;CACD,CAAC"}
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
import type { IDisplayOptions, INodeProperties } from 'n8n-workflow';
|
|
2
1
|
import type { NormalizedAddressInput } from '../../core/toXavAddress';
|
|
2
|
+
import { type ResolvedShipper, type ShipperProfile } from './shipperProfile';
|
|
3
3
|
export type ParamGetter = (name: string, fallback: unknown) => unknown;
|
|
4
|
-
export
|
|
5
|
-
prefix: string;
|
|
6
|
-
label: string;
|
|
7
|
-
show: IDisplayOptions['show'];
|
|
8
|
-
includeName?: boolean;
|
|
9
|
-
includePhone?: boolean;
|
|
10
|
-
includeResidential?: boolean;
|
|
11
|
-
required?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare function addressFields(opts: AddressFieldOptions): INodeProperties[];
|
|
14
|
-
export declare function readAddress(get: ParamGetter, prefix: string): NormalizedAddressInput & {
|
|
4
|
+
export type ReadAddress = NormalizedAddressInput & {
|
|
15
5
|
residential?: boolean;
|
|
16
6
|
};
|
|
17
|
-
export declare function
|
|
7
|
+
export declare function readAddress(get: ParamGetter, prefix: string): ReadAddress;
|
|
18
8
|
export interface UpsPackage {
|
|
19
9
|
PackageWeight: {
|
|
20
10
|
UnitOfMeasurement: {
|
|
@@ -32,3 +22,13 @@ export interface UpsPackage {
|
|
|
32
22
|
};
|
|
33
23
|
}
|
|
34
24
|
export declare function readPackage(get: ParamGetter): UpsPackage;
|
|
25
|
+
export interface ResolvedParties {
|
|
26
|
+
shipper: ResolvedShipper;
|
|
27
|
+
shipTo: ReadAddress;
|
|
28
|
+
shipFrom: ReadAddress;
|
|
29
|
+
effectiveShipFrom: ReadAddress;
|
|
30
|
+
hasShipFrom: boolean;
|
|
31
|
+
international: boolean;
|
|
32
|
+
accountNumber: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function resolveShipmentParties(get: ParamGetter, profile: ShipperProfile | null): ResolvedParties;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readAddress = readAddress;
|
|
4
|
+
exports.readPackage = readPackage;
|
|
5
|
+
exports.resolveShipmentParties = resolveShipmentParties;
|
|
6
|
+
const isInternational_1 = require("../../core/isInternational");
|
|
7
|
+
const shipperProfile_1 = require("./shipperProfile");
|
|
8
|
+
function readAddress(get, prefix) {
|
|
9
|
+
const line1 = get(`${prefix}AddressLine1`, '');
|
|
10
|
+
const line2 = get(`${prefix}AddressLine2`, '');
|
|
11
|
+
return {
|
|
12
|
+
addressLines: [line1, line2].filter((l) => l && l.trim().length > 0),
|
|
13
|
+
city: get(`${prefix}City`, ''),
|
|
14
|
+
stateProvinceCode: get(`${prefix}StateProvinceCode`, ''),
|
|
15
|
+
postalCode: get(`${prefix}PostalCode`, ''),
|
|
16
|
+
countryCode: get(`${prefix}CountryCode`, 'US'),
|
|
17
|
+
residential: get(`${prefix}Residential`, false),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function readPackage(get) {
|
|
21
|
+
var _a, _b, _c;
|
|
22
|
+
const weight = get('weight', 1);
|
|
23
|
+
const weightUnit = get('weightUnit', 'LBS');
|
|
24
|
+
const pkg = {
|
|
25
|
+
PackageWeight: { UnitOfMeasurement: { Code: weightUnit }, Weight: String(weight) },
|
|
26
|
+
};
|
|
27
|
+
const dims = get('dimensions.dimension', {});
|
|
28
|
+
if (dims.length || dims.width || dims.height) {
|
|
29
|
+
const dimUnit = get('dimensionUnit', 'IN');
|
|
30
|
+
pkg.Dimensions = {
|
|
31
|
+
UnitOfMeasurement: { Code: dimUnit },
|
|
32
|
+
Length: String((_a = dims.length) !== null && _a !== void 0 ? _a : 0),
|
|
33
|
+
Width: String((_b = dims.width) !== null && _b !== void 0 ? _b : 0),
|
|
34
|
+
Height: String((_c = dims.height) !== null && _c !== void 0 ? _c : 0),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return pkg;
|
|
38
|
+
}
|
|
39
|
+
function resolveShipmentParties(get, profile) {
|
|
40
|
+
const shipper = (0, shipperProfile_1.readShipper)(get, profile);
|
|
41
|
+
const shipTo = readAddress(get, 'shipTo');
|
|
42
|
+
const shipFrom = readAddress(get, 'shipFrom');
|
|
43
|
+
const hasShipFrom = shipFrom.addressLines.length > 0 || shipFrom.city.length > 0;
|
|
44
|
+
const effectiveShipFrom = hasShipFrom ? shipFrom : shipper.address;
|
|
45
|
+
const international = (0, isInternational_1.isInternational)({
|
|
46
|
+
shipFrom: effectiveShipFrom,
|
|
47
|
+
shipper: shipper.address,
|
|
48
|
+
shipTo,
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
shipper,
|
|
52
|
+
shipTo,
|
|
53
|
+
shipFrom,
|
|
54
|
+
effectiveShipFrom,
|
|
55
|
+
hasShipFrom,
|
|
56
|
+
international,
|
|
57
|
+
accountNumber: shipper.accountNumber,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=readParties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readParties.js","sourceRoot":"","sources":["../../../../../nodes/Ups/resources/shipping/readParties.ts"],"names":[],"mappings":";;AAaA,kCAWC;AAYD,kCA2BC;AA2BD,wDAuBC;AAhHD,gEAA6D;AAC7D,qDAA0F;AAW1F,SAAgB,WAAW,CAAC,GAAgB,EAAE,MAAc;IAC3D,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,MAAM,cAAc,EAAE,EAAE,CAAW,CAAC;IACzD,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,MAAM,cAAc,EAAE,EAAE,CAAW,CAAC;IACzD,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,GAAG,MAAM,MAAM,EAAE,EAAE,CAAW;QACxC,iBAAiB,EAAE,GAAG,CAAC,GAAG,MAAM,mBAAmB,EAAE,EAAE,CAAW;QAClE,UAAU,EAAE,GAAG,CAAC,GAAG,MAAM,YAAY,EAAE,EAAE,CAAW;QACpD,WAAW,EAAE,GAAG,CAAC,GAAG,MAAM,a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,GAAG,WAAW,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;IAC9C,MAAM,WAAW,GAAG,QAAQ,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACjF,MAAM,iBAAiB,GAAG,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IACnE,MAAM,aAAa,GAAG,IAAA,iCAAe,EAAC;QACrC,QAAQ,EAAE,iBAAiB;QAC3B,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,MAAM;KACN,CAAC,CAAC;IACH,OAAO;QACN,OAAO;QACP,MAAM;QACN,QAAQ;QACR,iBAAiB;QACjB,WAAW;QACX,aAAa;QACb,aAAa,EAAE,OAAO,CAAC,aAAa;KACpC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { NormalizedAddressInput } from '../../core/toXavAddress';
|
|
2
|
+
import type { ParamGetter } from './readParties';
|
|
3
|
+
export interface ShipperProfile {
|
|
4
|
+
accountNumber?: string;
|
|
5
|
+
shipperName?: string;
|
|
6
|
+
addressLine1?: string;
|
|
7
|
+
addressLine2?: string;
|
|
8
|
+
city?: string;
|
|
9
|
+
stateProvinceCode?: string;
|
|
10
|
+
postalCode?: string;
|
|
11
|
+
countryCode?: string;
|
|
12
|
+
phone?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ResolvedShipper {
|
|
15
|
+
address: NormalizedAddressInput & {
|
|
16
|
+
residential?: boolean;
|
|
17
|
+
};
|
|
18
|
+
name: string;
|
|
19
|
+
phone: string;
|
|
20
|
+
accountNumber: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function loadShipperProfile(ctx: {
|
|
23
|
+
getCredentials(type: string): Promise<unknown>;
|
|
24
|
+
}): Promise<ShipperProfile | null>;
|
|
25
|
+
export declare function readShipper(get: ParamGetter, profile: ShipperProfile | null): ResolvedShipper;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadShipperProfile = loadShipperProfile;
|
|
4
|
+
exports.readShipper = readShipper;
|
|
5
|
+
function pickField(explicit, profileValue, fallback = '') {
|
|
6
|
+
const e = typeof explicit === 'string' ? explicit.trim() : '';
|
|
7
|
+
if (e.length > 0)
|
|
8
|
+
return e;
|
|
9
|
+
const p = (profileValue !== null && profileValue !== void 0 ? profileValue : '').trim();
|
|
10
|
+
if (p.length > 0)
|
|
11
|
+
return p;
|
|
12
|
+
return fallback;
|
|
13
|
+
}
|
|
14
|
+
async function loadShipperProfile(ctx) {
|
|
15
|
+
try {
|
|
16
|
+
const cred = (await ctx.getCredentials('upsShipperProfileApi'));
|
|
17
|
+
return cred !== null && cred !== void 0 ? cred : null;
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function readShipper(get, profile) {
|
|
24
|
+
const p = profile !== null && profile !== void 0 ? profile : {};
|
|
25
|
+
const line1 = pickField(get('shipperAddressLine1', ''), p.addressLine1);
|
|
26
|
+
const line2 = pickField(get('shipperAddressLine2', ''), p.addressLine2);
|
|
27
|
+
return {
|
|
28
|
+
address: {
|
|
29
|
+
addressLines: [line1, line2].filter((l) => l.length > 0),
|
|
30
|
+
city: pickField(get('shipperCity', ''), p.city),
|
|
31
|
+
stateProvinceCode: pickField(get('shipperStateProvinceCode', ''), p.stateProvinceCode),
|
|
32
|
+
postalCode: pickField(get('shipperPostalCode', ''), p.postalCode),
|
|
33
|
+
countryCode: pickField(get('shipperCountryCode', ''), p.countryCode, 'US'),
|
|
34
|
+
},
|
|
35
|
+
name: pickField(get('shipperName', ''), p.shipperName),
|
|
36
|
+
phone: pickField(get('shipperPhone', ''), p.phone),
|
|
37
|
+
accountNumber: pickField(get('accountNumber', ''), p.accountNumber),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=shipperProfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shipperProfile.js","sourceRoot":"","sources":["../../../../../nodes/Ups/resources/shipping/shipperProfile.ts"],"names":[],"mappings":";;AAsCA,gDASC;AAKD,kCAkBC;AA1CD,SAAS,SAAS,CAAC,QAAiB,EAAE,YAAgC,EAAE,QAAQ,GAAG,EAAE;IACpF,MAAM,CAAC,GAAG,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9D,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,CAAC,CAAC;IAC3B,MAAM,CAAC,GAAG,CAAC,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACtC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,CAAC,CAAC;IAC3B,OAAO,QAAQ,CAAC;AACjB,CAAC;AAIM,KAAK,UAAU,kBAAkB,CAAC,GAExC;IACA,IAAI,CAAC;QACJ,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,cAAc,CAAC,sBAAsB,CAAC,CAA+B,CAAC;QAC9F,OAAO,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,IAAI,CAAC;IACrB,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,IAAI,CAAC;IACb,CAAC;AACF,CAAC;AAKD,SAAgB,WAAW,CAAC,GAAgB,EAAE,OAA8B;IAC3E,MAAM,CAAC,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC;IACxB,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC;IACxE,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC;IACxE,OAAO;QACN,OAAO,EAAE;YACR,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;YACxD,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC;YAC/C,iBAAiB,EAAE,SAAS,CAAC,GAAG,CAAC,0BAA0B,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,iBAAiB,CAAC;YACtF,UAAU,EAAE,SAAS,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC;YAGjE,WAAW,EAAE,SAAS,CAAC,GAAG,CAAC,oBAAoB,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,IAAI,CAAC;SAC1E;QACD,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC;QACtD,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC;QAClD,aAAa,EAAE,SAAS,CAAC,GAAG,CAAC,eAAe,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,aAAa,CAAC;KACnE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IDisplayOptions, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const CURRENCY_OPTIONS: {
|
|
3
|
+
name: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}[];
|
|
6
|
+
export interface AddressFieldOptions {
|
|
7
|
+
prefix: string;
|
|
8
|
+
label: string;
|
|
9
|
+
show: IDisplayOptions['show'];
|
|
10
|
+
includeName?: boolean;
|
|
11
|
+
includePhone?: boolean;
|
|
12
|
+
includeResidential?: boolean;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
hint?: string;
|
|
15
|
+
countryDefault?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function addressFields(opts: AddressFieldOptions): INodeProperties[];
|
|
18
|
+
export declare function packageFields(show: IDisplayOptions['show']): INodeProperties[];
|
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CURRENCY_OPTIONS = void 0;
|
|
3
4
|
exports.addressFields = addressFields;
|
|
4
|
-
exports.readAddress = readAddress;
|
|
5
5
|
exports.packageFields = packageFields;
|
|
6
|
-
exports.
|
|
6
|
+
exports.CURRENCY_OPTIONS = [
|
|
7
|
+
{ name: 'US Dollar (USD)', value: 'USD' },
|
|
8
|
+
{ name: 'Canadian Dollar (CAD)', value: 'CAD' },
|
|
9
|
+
{ name: 'Euro (EUR)', value: 'EUR' },
|
|
10
|
+
{ name: 'British Pound (GBP)', value: 'GBP' },
|
|
11
|
+
{ name: 'Mexican Peso (MXN)', value: 'MXN' },
|
|
12
|
+
{ name: 'Australian Dollar (AUD)', value: 'AUD' },
|
|
13
|
+
{ name: 'Japanese Yen (JPY)', value: 'JPY' },
|
|
14
|
+
{ name: 'Swiss Franc (CHF)', value: 'CHF' },
|
|
15
|
+
{ name: 'Chinese Yuan (CNY)', value: 'CNY' },
|
|
16
|
+
{ name: 'Hong Kong Dollar (HKD)', value: 'HKD' },
|
|
17
|
+
];
|
|
7
18
|
function addressFields(opts) {
|
|
8
19
|
var _a;
|
|
9
20
|
const { prefix, label, show } = opts;
|
|
10
21
|
const fields = [];
|
|
22
|
+
const countryField = {
|
|
23
|
+
displayName: `${label} Country Code`,
|
|
24
|
+
name: `${prefix}CountryCode`,
|
|
25
|
+
type: 'string',
|
|
26
|
+
default: 'US',
|
|
27
|
+
displayOptions: { show },
|
|
28
|
+
};
|
|
29
|
+
if (opts.countryDefault !== undefined) {
|
|
30
|
+
countryField.default = opts.countryDefault;
|
|
31
|
+
if (opts.countryDefault === '')
|
|
32
|
+
countryField.placeholder = 'US';
|
|
33
|
+
}
|
|
11
34
|
if (opts.includeName) {
|
|
12
35
|
fields.push({
|
|
13
36
|
displayName: `${label} Name`,
|
|
@@ -25,6 +48,7 @@ function addressFields(opts) {
|
|
|
25
48
|
default: '',
|
|
26
49
|
required: (_a = opts.required) !== null && _a !== void 0 ? _a : false,
|
|
27
50
|
displayOptions: { show },
|
|
51
|
+
...(opts.hint ? { description: opts.hint } : {}),
|
|
28
52
|
}, {
|
|
29
53
|
displayName: `${label} Address Line 2`,
|
|
30
54
|
name: `${prefix}AddressLine2`,
|
|
@@ -42,20 +66,16 @@ function addressFields(opts) {
|
|
|
42
66
|
name: `${prefix}StateProvinceCode`,
|
|
43
67
|
type: 'string',
|
|
44
68
|
default: '',
|
|
69
|
+
placeholder: 'NY',
|
|
45
70
|
displayOptions: { show },
|
|
46
71
|
}, {
|
|
47
72
|
displayName: `${label} Postal Code`,
|
|
48
73
|
name: `${prefix}PostalCode`,
|
|
49
74
|
type: 'string',
|
|
50
75
|
default: '',
|
|
76
|
+
placeholder: '10001',
|
|
51
77
|
displayOptions: { show },
|
|
52
|
-
},
|
|
53
|
-
displayName: `${label} Country Code`,
|
|
54
|
-
name: `${prefix}CountryCode`,
|
|
55
|
-
type: 'string',
|
|
56
|
-
default: 'US',
|
|
57
|
-
displayOptions: { show },
|
|
58
|
-
});
|
|
78
|
+
}, countryField);
|
|
59
79
|
if (opts.includePhone) {
|
|
60
80
|
fields.push({
|
|
61
81
|
displayName: `${label} Phone`,
|
|
@@ -77,18 +97,6 @@ function addressFields(opts) {
|
|
|
77
97
|
}
|
|
78
98
|
return fields;
|
|
79
99
|
}
|
|
80
|
-
function readAddress(get, prefix) {
|
|
81
|
-
const line1 = get(`${prefix}AddressLine1`, '');
|
|
82
|
-
const line2 = get(`${prefix}AddressLine2`, '');
|
|
83
|
-
return {
|
|
84
|
-
addressLines: [line1, line2].filter((l) => l && l.trim().length > 0),
|
|
85
|
-
city: get(`${prefix}City`, ''),
|
|
86
|
-
stateProvinceCode: get(`${prefix}StateProvinceCode`, ''),
|
|
87
|
-
postalCode: get(`${prefix}PostalCode`, ''),
|
|
88
|
-
countryCode: get(`${prefix}CountryCode`, 'US'),
|
|
89
|
-
residential: get(`${prefix}Residential`, false),
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
100
|
function packageFields(show) {
|
|
93
101
|
return [
|
|
94
102
|
{
|
|
@@ -97,6 +105,7 @@ function packageFields(show) {
|
|
|
97
105
|
type: 'number',
|
|
98
106
|
default: 1,
|
|
99
107
|
required: true,
|
|
108
|
+
typeOptions: { minValue: 0 },
|
|
100
109
|
displayOptions: { show },
|
|
101
110
|
description: 'Package weight',
|
|
102
111
|
},
|
|
@@ -123,9 +132,27 @@ function packageFields(show) {
|
|
|
123
132
|
displayName: 'Dimension',
|
|
124
133
|
name: 'dimension',
|
|
125
134
|
values: [
|
|
126
|
-
{
|
|
127
|
-
|
|
128
|
-
|
|
135
|
+
{
|
|
136
|
+
displayName: 'Length',
|
|
137
|
+
name: 'length',
|
|
138
|
+
type: 'number',
|
|
139
|
+
default: 0,
|
|
140
|
+
typeOptions: { minValue: 0 },
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
displayName: 'Width',
|
|
144
|
+
name: 'width',
|
|
145
|
+
type: 'number',
|
|
146
|
+
default: 0,
|
|
147
|
+
typeOptions: { minValue: 0 },
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
displayName: 'Height',
|
|
151
|
+
name: 'height',
|
|
152
|
+
type: 'number',
|
|
153
|
+
default: 0,
|
|
154
|
+
typeOptions: { minValue: 0 },
|
|
155
|
+
},
|
|
129
156
|
],
|
|
130
157
|
},
|
|
131
158
|
],
|
|
@@ -143,23 +170,4 @@ function packageFields(show) {
|
|
|
143
170
|
},
|
|
144
171
|
];
|
|
145
172
|
}
|
|
146
|
-
|
|
147
|
-
var _a, _b, _c;
|
|
148
|
-
const weight = get('weight', 1);
|
|
149
|
-
const weightUnit = get('weightUnit', 'LBS');
|
|
150
|
-
const pkg = {
|
|
151
|
-
PackageWeight: { UnitOfMeasurement: { Code: weightUnit }, Weight: String(weight) },
|
|
152
|
-
};
|
|
153
|
-
const dims = get('dimensions.dimension', {});
|
|
154
|
-
if (dims.length || dims.width || dims.height) {
|
|
155
|
-
const dimUnit = get('dimensionUnit', 'IN');
|
|
156
|
-
pkg.Dimensions = {
|
|
157
|
-
UnitOfMeasurement: { Code: dimUnit },
|
|
158
|
-
Length: String((_a = dims.length) !== null && _a !== void 0 ? _a : 0),
|
|
159
|
-
Width: String((_b = dims.width) !== null && _b !== void 0 ? _b : 0),
|
|
160
|
-
Height: String((_c = dims.height) !== null && _c !== void 0 ? _c : 0),
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
return pkg;
|
|
164
|
-
}
|
|
165
|
-
//# sourceMappingURL=shared.js.map
|
|
173
|
+
//# sourceMappingURL=shippingFields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shippingFields.js","sourceRoot":"","sources":["../../../../../nodes/Ups/resources/shipping/shippingFields.ts"],"names":[],"mappings":";;;AAwCA,sCA+FC;AAGD,sCAwEC;AA1MY,QAAA,gBAAgB,GAAG;IAC/B,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,EAAE;IACzC,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,KAAK,EAAE;IAC/C,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE;IACpC,EAAE,IAAI,EAAE,qBAAqB,EAAE,KAAK,EAAE,KAAK,EAAE;IAC7C,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,KAAK,EAAE;IAC5C,EAAE,IAAI,EAAE,yBAAyB,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W,EAAE,QAAQ;4BACrB,IAAI,EAAE,QAAQ;4BACd,IAAI,EAAE,QAAQ;4BACd,OAAO,EAAE,CAAC;4BACV,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE;yBAC5B;wBACD;4BACC,WAAW,EAAE,OAAO;4BACpB,IAAI,EAAE,OAAO;4BACb,IAAI,EAAE,QAAQ;4BACd,OAAO,EAAE,CAAC;4BACV,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE;yBAC5B;wBACD;4BACC,WAAW,EAAE,QAAQ;4BACrB,IAAI,EAAE,QAAQ;4BACd,IAAI,EAAE,QAAQ;4BACd,OAAO,EAAE,CAAC;4BACV,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE;yBAC5B;qBACD;iBACD;aACD;SACD;QACD;YACC,WAAW,EAAE,gBAAgB;YAC7B,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,SAAS;YACf,OAAO,EAAE;gBACR,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,IAAI,EAAE;gBACpC,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,IAAI,EAAE;aACzC;YACD,OAAO,EAAE,IAAI;YACb,cAAc,EAAE,EAAE,IAAI,EAAE;SACxB;KACD,CAAC;AACH,CAAC"}
|
package/dist/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nodrel-dev/n8n-nodes-ups",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "n8n community node for UPS: rating, tracking, and address validation via the UPS REST API.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"homepage": "https://github.com/nodrel-dev/n8n-
|
|
6
|
+
"homepage": "https://github.com/nodrel-dev/n8n-ups-node",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"n8n-community-node-package"
|
|
9
9
|
],
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "https://github.com/nodrel-dev/n8n-
|
|
16
|
+
"url": "https://github.com/nodrel-dev/n8n-ups-node.git"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "n8n-node build",
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
"n8nNodesApiVersion": 1,
|
|
38
38
|
"strict": true,
|
|
39
39
|
"credentials": [
|
|
40
|
-
"dist/credentials/UpsOAuth2Api.credentials.js"
|
|
40
|
+
"dist/credentials/UpsOAuth2Api.credentials.js",
|
|
41
|
+
"dist/credentials/UpsShipperProfileApi.credentials.js"
|
|
41
42
|
],
|
|
42
43
|
"nodes": [
|
|
43
44
|
"dist/nodes/Ups/Ups.node.js"
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nodrel-dev/n8n-nodes-ups",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "n8n community node for UPS: rating, tracking, and address validation via the UPS REST API.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"homepage": "https://github.com/nodrel-dev/n8n-
|
|
6
|
+
"homepage": "https://github.com/nodrel-dev/n8n-ups-node",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"n8n-community-node-package"
|
|
9
9
|
],
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "https://github.com/nodrel-dev/n8n-
|
|
16
|
+
"url": "https://github.com/nodrel-dev/n8n-ups-node.git"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "n8n-node build",
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
"n8nNodesApiVersion": 1,
|
|
38
38
|
"strict": true,
|
|
39
39
|
"credentials": [
|
|
40
|
-
"dist/credentials/UpsOAuth2Api.credentials.js"
|
|
40
|
+
"dist/credentials/UpsOAuth2Api.credentials.js",
|
|
41
|
+
"dist/credentials/UpsShipperProfileApi.credentials.js"
|
|
41
42
|
],
|
|
42
43
|
"nodes": [
|
|
43
44
|
"dist/nodes/Ups/Ups.node.js"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../../nodes/Ups/resources/shipping/shared.ts"],"names":[],"mappings":";;AAqBA,sCAmFC;AAED,kCAcC;AAGD,sCAqDC;AAYD,kCA2BC;AAlMD,SAAgB,aAAa,CAAC,IAAyB;;IACtD,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IACrC,MAAM,MAAM,GAAsB,EAAE,CAAC;IAErC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;QACtB,MAAM,CAAC,IAAI,CAAC;YACX,WAAW,EAAE,GAAG,KAAK,OAAO;YAC5B,IAAI,EAAE,GAAG,MAAM,MAAM;YACrB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;YACX,cAAc,EAAE,EAAE,IAAI,EAAE;YACxB,WAAW,EAAE,GAAG,KAAK,uBAAuB;SAC5C,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,IAAI,CACV;QACC,WAAW,EAAE,GAAG,KAAK,iBAAiB;QACtC,IAAI,EAAE,GAAG,MAAM,cAAc;QAC7B,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,MAAA,IAAI,CAAC,QAAQ,mCAAI,KAAK;QAChC,cAAc,EAAE,EAAE,IAAI,EAAE;KACxB,EACD;QACC,WAAW,EAAE,GAAG,KAAK,iBAAiB;QACtC,IAAI,EAAE,GAAG,MAAM,cAAc;QAC7B,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,EAAE,IAAI,EAAE;KACxB,EACD;QACC,WAAW,EAAE,GAAG,KAAK,OA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