@shipengine/connect-carrier-api 4.5.6 → 4.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/lib/app/carrier-app-definition.d.ts +7 -2
- package/lib/app/constants.d.ts +2 -1
- package/lib/app/constants.js +1 -0
- package/lib/app/constants.js.map +1 -1
- package/lib/app/create-endpoint-mapping.js +1 -0
- package/lib/app/create-endpoint-mapping.js.map +1 -1
- package/lib/requests/index.d.ts +1 -0
- package/lib/requests/index.js +1 -0
- package/lib/requests/index.js.map +1 -1
- package/lib/requests/update-settings-request.d.ts +5 -0
- package/lib/requests/update-settings-request.js +10 -0
- package/lib/requests/update-settings-request.js.map +1 -0
- package/lib/responses/index.d.ts +2 -0
- package/lib/responses/index.js +2 -0
- package/lib/responses/index.js.map +1 -1
- package/lib/responses/update-settings-response-schema.d.ts +2 -0
- package/lib/responses/update-settings-response-schema.js +10 -0
- package/lib/responses/update-settings-response-schema.js.map +1 -0
- package/lib/responses/update-settings-response.d.ts +4 -0
- package/lib/responses/update-settings-response.js +9 -0
- package/lib/responses/update-settings-response.js.map +1 -0
- package/package.json +2 -2
- package/spec.json +65 -2
- package/src/app/carrier-app-definition.ts +9 -0
- package/src/app/constants.ts +1 -0
- package/src/app/create-endpoint-mapping.ts +1 -0
- package/src/requests/index.ts +1 -0
- package/src/requests/update-settings-request.ts +6 -0
- package/src/responses/index.ts +2 -0
- package/src/responses/update-settings-response-schema.ts +6 -0
- package/src/responses/update-settings-response.ts +4 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ImportedTrackingEvent } from '../models';
|
|
2
2
|
import type { Request } from 'express';
|
|
3
|
-
import { RegisterRequest, CreateLabelRequest, VoidLabelsRequest, CreateManifestRequest, GetManifestRequest, SchedulePickupRequest, CancelPickupRequest, GetRatesRequest, TrackingRequest, CancelNotificationRequest, CreateNotificationRequest, ValidateInboundDataRequest, NormalizeTrackingDataRequest, GetRelayPointsRequest, GetServicePointsRequest, GetServicePointRequest, ImportTrackingEventsRequest } from '../requests';
|
|
4
|
-
import { RegisterResponse, CreateLabelResponse, VoidLabelsResponse, CreateManifestResponse, SchedulePickupResponse, CancelPickupResponse, GetRatesResponse, TrackingResponse, CancelNotificationResponse, CreateNotificationResponse, ValidateInboundDataResponse, NormalizeTrackingDataResponse, GetRelayPointsResponse, GetServicePointsResponse, GetServicePointResponse } from '../responses';
|
|
3
|
+
import { RegisterRequest, CreateLabelRequest, VoidLabelsRequest, CreateManifestRequest, GetManifestRequest, SchedulePickupRequest, CancelPickupRequest, GetRatesRequest, TrackingRequest, CancelNotificationRequest, CreateNotificationRequest, ValidateInboundDataRequest, NormalizeTrackingDataRequest, GetRelayPointsRequest, GetServicePointsRequest, GetServicePointRequest, ImportTrackingEventsRequest, UpdateSettingsRequest } from '../requests';
|
|
4
|
+
import { RegisterResponse, CreateLabelResponse, VoidLabelsResponse, CreateManifestResponse, SchedulePickupResponse, CancelPickupResponse, GetRatesResponse, TrackingResponse, CancelNotificationResponse, CreateNotificationResponse, ValidateInboundDataResponse, NormalizeTrackingDataResponse, GetRelayPointsResponse, GetServicePointsResponse, GetServicePointResponse, UpdateSettingsResponse } from '../responses';
|
|
5
5
|
import { CarrierAppMetadata } from './metadata/carrier-app-metadata';
|
|
6
6
|
import { RequestResponseInfo, Handler } from '@shipengine/connect-runtime';
|
|
7
7
|
/**
|
|
@@ -101,6 +101,11 @@ export interface CarrierAppDefinition {
|
|
|
101
101
|
redactExternalRequest?: (req: RequestResponseInfo) => Promise<RequestResponseInfo> | RequestResponseInfo;
|
|
102
102
|
/** @description A method that gets additional information to return with the diagnostic version route */
|
|
103
103
|
getAdditionalVersionInfo?: () => Promise<Record<string, string>> | Record<string, string>;
|
|
104
|
+
/**
|
|
105
|
+
* @description This endpoint is used to update carrier settings
|
|
106
|
+
* @param request Data needed by the provider to update carrier settings
|
|
107
|
+
*/
|
|
108
|
+
UpdateSettings?: (request: UpdateSettingsRequest) => UpdateSettingsResponse | Promise<UpdateSettingsResponse>;
|
|
104
109
|
/**
|
|
105
110
|
* @description A collection of additional routes that can be used to extend the functionality of the app.
|
|
106
111
|
* Extension methods are not automatically called by the ShipEngine platform, and require working with Auctane developers to implement.
|
package/lib/app/constants.d.ts
CHANGED
|
@@ -15,5 +15,6 @@ export declare enum ApiEndpoints {
|
|
|
15
15
|
GetRelayPoints = "/GetRelayPoints",
|
|
16
16
|
GetServicePoints = "/GetServicePoints",
|
|
17
17
|
GetServicePoint = "/GetServicePoint",
|
|
18
|
-
ImportTrackingEvents = "/ImportTrackingEvents"
|
|
18
|
+
ImportTrackingEvents = "/ImportTrackingEvents",
|
|
19
|
+
UpdateSettings = "/UpdateSettings"
|
|
19
20
|
}
|
package/lib/app/constants.js
CHANGED
|
@@ -20,5 +20,6 @@ var ApiEndpoints;
|
|
|
20
20
|
ApiEndpoints["GetServicePoints"] = "/GetServicePoints";
|
|
21
21
|
ApiEndpoints["GetServicePoint"] = "/GetServicePoint";
|
|
22
22
|
ApiEndpoints["ImportTrackingEvents"] = "/ImportTrackingEvents";
|
|
23
|
+
ApiEndpoints["UpdateSettings"] = "/UpdateSettings";
|
|
23
24
|
})(ApiEndpoints || (exports.ApiEndpoints = ApiEndpoints = {}));
|
|
24
25
|
//# sourceMappingURL=constants.js.map
|
package/lib/app/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/app/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/app/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAmBX;AAnBD,WAAY,YAAY;IACtB,sCAAsB,CAAA;IACtB,4CAA4B,CAAA;IAC5B,0CAA0B,CAAA;IAC1B,sCAAsB,CAAA;IACtB,kDAAkC,CAAA;IAClC,4CAA4B,CAAA;IAC5B,kDAAkC,CAAA;IAClC,8CAA8B,CAAA;IAC9B,gCAAgB,CAAA;IAChB,0DAA0C,CAAA;IAC1C,0DAA0C,CAAA;IAC1C,4DAA4C,CAAA;IAC5C,gEAAgD,CAAA;IAChD,kDAAkC,CAAA;IAClC,sDAAsC,CAAA;IACtC,oDAAoC,CAAA;IACpC,8DAA8C,CAAA;IAC9C,kDAAkC,CAAA;AACpC,CAAC,EAnBW,YAAY,4BAAZ,YAAY,QAmBvB"}
|
|
@@ -23,6 +23,7 @@ const createEndpointMapping = (definition) => [
|
|
|
23
23
|
[connect_runtime_1.Method.POST, constants_1.ApiEndpoints.GetServicePoints, definition.GetServicePoints],
|
|
24
24
|
[connect_runtime_1.Method.POST, constants_1.ApiEndpoints.GetServicePoint, definition.GetServicePoint],
|
|
25
25
|
[connect_runtime_1.Method.POST, constants_1.ApiEndpoints.ImportTrackingEvents, definition.ImportTrackingEvents],
|
|
26
|
+
[connect_runtime_1.Method.POST, constants_1.ApiEndpoints.UpdateSettings, definition.UpdateSettings],
|
|
26
27
|
...(0, connect_runtime_1.mapExtensions)(definition.Extensions),
|
|
27
28
|
];
|
|
28
29
|
exports.createEndpointMapping = createEndpointMapping;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-endpoint-mapping.js","sourceRoot":"","sources":["../../src/app/create-endpoint-mapping.ts"],"names":[],"mappings":";;;AAAA,iEAA6E;AAC7E,2CAA2C;AAGpC,MAAM,qBAAqB,GAAG,CACnC,UAAgC,EACS,EAAE,CAAC;IAC5C,iFAAiF;IACjF,yFAAyF;IACzF,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,kBAAkB,EAAE,UAAU,CAAC,kBAAkB,CAAC;IAC7E,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,YAAY,EAAE,UAAU,CAAC,YAAY,CAAC;IACjE,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,WAAW,EAAE,UAAU,CAAC,WAAW,CAAC;IAC/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C,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC;IACnD,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,mBAAmB,EAAE,UAAU,CAAC,mBAAmB,CAAC;IAC/E,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC;IAC7D,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,cAAc,EAAE,UAAU,CAAC,cAAc,CAAC;IACrE,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,gBAAgB,EAAE,UAAU,CAAC,gBAAgB,CAAC;IACzE,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,eAAe,EAAE,UAAU,CAAC,eAAe,CAAC;IACvE,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,oBAAoB,EAAE,UAAU,CAAC,oBAAoB,CAAC;IACjF,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,cAAc,EAAE,UAAU,CAAC,cAAc,CAAC;IACrE,GAAG,IAAA,+BAAa,EAAC,UAAU,CAAC,UAAU,CAAC;CACxC,CAAC;AAxBW,QAAA,qBAAqB,yBAwBhC"}
|
package/lib/requests/index.d.ts
CHANGED
package/lib/requests/index.js
CHANGED
|
@@ -18,4 +18,5 @@ tslib_1.__exportStar(require("./schedule-pickup-request"), exports);
|
|
|
18
18
|
tslib_1.__exportStar(require("./tracking-request"), exports);
|
|
19
19
|
tslib_1.__exportStar(require("./validate-inbound-data-request"), exports);
|
|
20
20
|
tslib_1.__exportStar(require("./void-labels-request"), exports);
|
|
21
|
+
tslib_1.__exportStar(require("./update-settings-request"), exports);
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/requests/index.ts"],"names":[],"mappings":";;;AAAA,wEAA8C;AAC9C,kEAAwC;AACxC,iEAAuC;AACvC,oEAA0C;AAC1C,wEAA8C;AAC9C,iEAAuC;AACvC,8DAAoC;AACpC,qEAA2C;AAC3C,sEAA4C;AAC5C,uEAA6C;AAC7C,2EAAiD;AACjD,4EAAkD;AAClD,6DAAmC;AACnC,oEAA0C;AAC1C,6DAAmC;AACnC,0EAAgD;AAChD,gEAAsC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/requests/index.ts"],"names":[],"mappings":";;;AAAA,wEAA8C;AAC9C,kEAAwC;AACxC,iEAAuC;AACvC,oEAA0C;AAC1C,wEAA8C;AAC9C,iEAAuC;AACvC,8DAAoC;AACpC,qEAA2C;AAC3C,sEAA4C;AAC5C,uEAA6C;AAC7C,2EAAiD;AACjD,4EAAkD;AAClD,6DAAmC;AACnC,oEAA0C;AAC1C,6DAAmC;AACnC,0EAAgD;AAChD,gEAAsC;AACtC,oEAA0C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateSettingsRequest = void 0;
|
|
4
|
+
const base_request_1 = require("./base-request");
|
|
5
|
+
/** @description Basic structure for a request to update carrier settings*/
|
|
6
|
+
class UpdateSettingsRequest extends base_request_1.BaseRequest {
|
|
7
|
+
update_settings;
|
|
8
|
+
}
|
|
9
|
+
exports.UpdateSettingsRequest = UpdateSettingsRequest;
|
|
10
|
+
//# sourceMappingURL=update-settings-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-settings-request.js","sourceRoot":"","sources":["../../src/requests/update-settings-request.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAE7C,2EAA2E;AAC3E,MAAa,qBAAsB,SAAQ,0BAAW;IACpD,eAAe,CAAU;CAC1B;AAFD,sDAEC"}
|
package/lib/responses/index.d.ts
CHANGED
|
@@ -29,3 +29,5 @@ export * from './validate-inbound-data-response-schema';
|
|
|
29
29
|
export * from './validate-inbound-data-response';
|
|
30
30
|
export * from './void-labels-response-schema';
|
|
31
31
|
export * from './void-labels-response';
|
|
32
|
+
export * from './update-settings-response-schema';
|
|
33
|
+
export * from './update-settings-response';
|
package/lib/responses/index.js
CHANGED
|
@@ -32,4 +32,6 @@ tslib_1.__exportStar(require("./validate-inbound-data-response-schema"), exports
|
|
|
32
32
|
tslib_1.__exportStar(require("./validate-inbound-data-response"), exports);
|
|
33
33
|
tslib_1.__exportStar(require("./void-labels-response-schema"), exports);
|
|
34
34
|
tslib_1.__exportStar(require("./void-labels-response"), exports);
|
|
35
|
+
tslib_1.__exportStar(require("./update-settings-response-schema"), exports);
|
|
36
|
+
tslib_1.__exportStar(require("./update-settings-response"), exports);
|
|
35
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":";;;AAAA,gFAAsD;AACtD,yEAA+C;AAC/C,0EAAgD;AAChD,mEAAyC;AACzC,yEAA+C;AAC/C,kEAAwC;AACxC,4EAAkD;AAClD,qEAA2C;AAC3C,gFAAsD;AACtD,yEAA+C;AAC/C,2DAAiC;AACjC,sEAA4C;AAC5C,+DAAqC;AACrC,6EAAmD;AACnD,sEAA4C;AAC5C,8EAAoD;AACpD,uEAA6C;AAC7C,+EAAqD;AACrD,wEAA8C;AAC9C,oFAA0D;AAC1D,6EAAmD;AACnD,qEAA2C;AAC3C,8DAAoC;AACpC,4EAAkD;AAClD,qEAA2C;AAC3C,qEAA2C;AAC3C,8DAAoC;AACpC,kFAAwD;AACxD,2EAAiD;AACjD,wEAA8C;AAC9C,iEAAuC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":";;;AAAA,gFAAsD;AACtD,yEAA+C;AAC/C,0EAAgD;AAChD,mEAAyC;AACzC,yEAA+C;AAC/C,kEAAwC;AACxC,4EAAkD;AAClD,qEAA2C;AAC3C,gFAAsD;AACtD,yEAA+C;AAC/C,2DAAiC;AACjC,sEAA4C;AAC5C,+DAAqC;AACrC,6EAAmD;AACnD,sEAA4C;AAC5C,8EAAoD;AACpD,uEAA6C;AAC7C,+EAAqD;AACrD,wEAA8C;AAC9C,oFAA0D;AAC1D,6EAAmD;AACnD,qEAA2C;AAC3C,8DAAoC;AACpC,4EAAkD;AAClD,qEAA2C;AAC3C,qEAA2C;AAC3C,8DAAoC;AACpC,kFAAwD;AACxD,2EAAiD;AACjD,wEAA8C;AAC9C,iEAAuC;AACvC,4EAAkD;AAClD,qEAA2C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateSettingsResponseSchema = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const base_response_schema_1 = require("./base-response-schema");
|
|
6
|
+
const joi_1 = tslib_1.__importDefault(require("joi"));
|
|
7
|
+
exports.UpdateSettingsResponseSchema = base_response_schema_1.BaseResponseSchema.keys({
|
|
8
|
+
metadata: joi_1.default.object().pattern(/.*/, [joi_1.default.any()]).required(),
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=update-settings-response-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-settings-response-schema.js","sourceRoot":"","sources":["../../src/responses/update-settings-response-schema.ts"],"names":[],"mappings":";;;;AAAA,iEAA4D;AAC5D,sDAAsB;AAET,QAAA,4BAA4B,GAAG,yCAAkB,CAAC,IAAI,CAAC;IAClE,QAAQ,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,aAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC7D,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateSettingsResponse = void 0;
|
|
4
|
+
/** @description Basic structure for a response to update carrier settings */
|
|
5
|
+
class UpdateSettingsResponse {
|
|
6
|
+
metadata;
|
|
7
|
+
}
|
|
8
|
+
exports.UpdateSettingsResponse = UpdateSettingsResponse;
|
|
9
|
+
//# sourceMappingURL=update-settings-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-settings-response.js","sourceRoot":"","sources":["../../src/responses/update-settings-response.ts"],"names":[],"mappings":";;;AAAA,6EAA6E;AAC7E,MAAa,sBAAsB;IACjC,QAAQ,CAAU;CACnB;AAFD,wDAEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/connect-carrier-api",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "This is the typescript/javascript definitions for carrier api",
|
|
5
5
|
"homepage": "https://connect.shipengine.com",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"tslib": "^2.6.2"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@shipengine/connect-runtime": "^4.
|
|
47
|
+
"@shipengine/connect-runtime": "^4.6.0",
|
|
48
48
|
"express": "^4.18.2",
|
|
49
49
|
"winston": "^3.8.2"
|
|
50
50
|
}
|
package/spec.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Shipping API",
|
|
5
5
|
"description": "This API specification describes the canonical ShipEngine Shipping API connector module.",
|
|
6
|
-
"version": "1.19.
|
|
6
|
+
"version": "1.19.8"
|
|
7
7
|
},
|
|
8
8
|
"paths": {
|
|
9
9
|
"/Register": {
|
|
@@ -605,6 +605,37 @@
|
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
607
|
},
|
|
608
|
+
"/UpdateSettings": {
|
|
609
|
+
"post": {
|
|
610
|
+
"tags": [
|
|
611
|
+
"Account Setup"
|
|
612
|
+
],
|
|
613
|
+
"description": "This method is used to update carrier settings.",
|
|
614
|
+
"operationId": "Update Settings",
|
|
615
|
+
"requestBody": {
|
|
616
|
+
"description": "An object containing the settings information that you wish to be updated for a given carrier.",
|
|
617
|
+
"content": {
|
|
618
|
+
"application/json": {
|
|
619
|
+
"schema": {
|
|
620
|
+
"$ref": "#/components/schemas/UpdateSettingsRequest"
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
"responses": {
|
|
626
|
+
"200": {
|
|
627
|
+
"description": "The Update Settings method updates carrier settings that were set up during the registration of a given carrier",
|
|
628
|
+
"content": {
|
|
629
|
+
"application/json": {
|
|
630
|
+
"schema": {
|
|
631
|
+
"$ref": "#/components/schemas/UpdateSettingsResponse"
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
},
|
|
608
639
|
"/ValidateShipment": {
|
|
609
640
|
"post": {
|
|
610
641
|
"tags": [
|
|
@@ -3800,7 +3831,7 @@
|
|
|
3800
3831
|
"$ref": "#/components/schemas/TaxIdentifier"
|
|
3801
3832
|
},
|
|
3802
3833
|
"description": "Tax IDs associated with the consignee.",
|
|
3803
|
-
"nullable": true
|
|
3834
|
+
"nullable": true
|
|
3804
3835
|
},
|
|
3805
3836
|
"what3words": {
|
|
3806
3837
|
"type": "string",
|
|
@@ -4300,6 +4331,38 @@
|
|
|
4300
4331
|
],
|
|
4301
4332
|
"type": "string"
|
|
4302
4333
|
},
|
|
4334
|
+
"UpdateSettingsRequest": {
|
|
4335
|
+
"required": [
|
|
4336
|
+
"update_settings",
|
|
4337
|
+
"transaction_id"
|
|
4338
|
+
],
|
|
4339
|
+
"type": "object",
|
|
4340
|
+
"allOf": [
|
|
4341
|
+
{
|
|
4342
|
+
"$ref": "#/components/schemas/BaseRequest"
|
|
4343
|
+
}
|
|
4344
|
+
],
|
|
4345
|
+
"properties": {
|
|
4346
|
+
"update_settings": {
|
|
4347
|
+
"type": "object",
|
|
4348
|
+
"additionalProperties": { },
|
|
4349
|
+
"description": "This is a schemaless object used to contain any required fields for updating carrier settings.",
|
|
4350
|
+
"nullable": true
|
|
4351
|
+
}
|
|
4352
|
+
},
|
|
4353
|
+
"additionalProperties": false,
|
|
4354
|
+
"description": "This model represents the body of a request used to update carrier settings within ShipEngine."
|
|
4355
|
+
},
|
|
4356
|
+
"UpdateSettingsResponse": {
|
|
4357
|
+
"type": "object",
|
|
4358
|
+
"allOf": [
|
|
4359
|
+
{
|
|
4360
|
+
"$ref": "#/components/schemas/BaseResponse"
|
|
4361
|
+
}
|
|
4362
|
+
],
|
|
4363
|
+
"additionalProperties": false,
|
|
4364
|
+
"description": "This model represents the successful response for updating carrier settings request."
|
|
4365
|
+
},
|
|
4303
4366
|
"ValidateInboundDataRequest": {
|
|
4304
4367
|
"required": [
|
|
4305
4368
|
"transaction_id"
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
GetServicePointsRequest,
|
|
19
19
|
GetServicePointRequest,
|
|
20
20
|
ImportTrackingEventsRequest,
|
|
21
|
+
UpdateSettingsRequest,
|
|
21
22
|
} from '../requests';
|
|
22
23
|
|
|
23
24
|
import {
|
|
@@ -36,6 +37,7 @@ import {
|
|
|
36
37
|
GetRelayPointsResponse,
|
|
37
38
|
GetServicePointsResponse,
|
|
38
39
|
GetServicePointResponse,
|
|
40
|
+
UpdateSettingsResponse,
|
|
39
41
|
} from '../responses';
|
|
40
42
|
|
|
41
43
|
import { CarrierAppMetadata } from './metadata/carrier-app-metadata';
|
|
@@ -167,6 +169,13 @@ export interface CarrierAppDefinition {
|
|
|
167
169
|
) => Promise<RequestResponseInfo> | RequestResponseInfo;
|
|
168
170
|
/** @description A method that gets additional information to return with the diagnostic version route */
|
|
169
171
|
getAdditionalVersionInfo?: () => Promise<Record<string, string>> | Record<string, string>;
|
|
172
|
+
/**
|
|
173
|
+
* @description This endpoint is used to update carrier settings
|
|
174
|
+
* @param request Data needed by the provider to update carrier settings
|
|
175
|
+
*/
|
|
176
|
+
UpdateSettings?: (
|
|
177
|
+
request: UpdateSettingsRequest,
|
|
178
|
+
) => UpdateSettingsResponse | Promise<UpdateSettingsResponse>;
|
|
170
179
|
/**
|
|
171
180
|
* @description A collection of additional routes that can be used to extend the functionality of the app.
|
|
172
181
|
* Extension methods are not automatically called by the ShipEngine platform, and require working with Auctane developers to implement.
|
package/src/app/constants.ts
CHANGED
|
@@ -24,5 +24,6 @@ export const createEndpointMapping = (
|
|
|
24
24
|
[Method.POST, ApiEndpoints.GetServicePoints, definition.GetServicePoints],
|
|
25
25
|
[Method.POST, ApiEndpoints.GetServicePoint, definition.GetServicePoint],
|
|
26
26
|
[Method.POST, ApiEndpoints.ImportTrackingEvents, definition.ImportTrackingEvents],
|
|
27
|
+
[Method.POST, ApiEndpoints.UpdateSettings, definition.UpdateSettings],
|
|
27
28
|
...mapExtensions(definition.Extensions),
|
|
28
29
|
];
|
package/src/requests/index.ts
CHANGED
package/src/responses/index.ts
CHANGED
|
@@ -29,3 +29,5 @@ export * from './validate-inbound-data-response-schema';
|
|
|
29
29
|
export * from './validate-inbound-data-response';
|
|
30
30
|
export * from './void-labels-response-schema';
|
|
31
31
|
export * from './void-labels-response';
|
|
32
|
+
export * from './update-settings-response-schema';
|
|
33
|
+
export * from './update-settings-response';
|