@shipengine/connect-carrier-api 4.5.5 → 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.
Files changed (36) hide show
  1. package/lib/app/carrier-app-definition.d.ts +7 -2
  2. package/lib/app/constants.d.ts +2 -1
  3. package/lib/app/constants.js +1 -0
  4. package/lib/app/constants.js.map +1 -1
  5. package/lib/app/create-endpoint-mapping.js +1 -0
  6. package/lib/app/create-endpoint-mapping.js.map +1 -1
  7. package/lib/models/addresses/ship-to.d.ts +2 -0
  8. package/lib/models/addresses/ship-to.js +2 -0
  9. package/lib/models/addresses/ship-to.js.map +1 -1
  10. package/lib/requests/index.d.ts +1 -0
  11. package/lib/requests/index.js +1 -0
  12. package/lib/requests/index.js.map +1 -1
  13. package/lib/requests/update-settings-request.d.ts +5 -0
  14. package/lib/requests/update-settings-request.js +10 -0
  15. package/lib/requests/update-settings-request.js.map +1 -0
  16. package/lib/responses/index.d.ts +2 -0
  17. package/lib/responses/index.js +2 -0
  18. package/lib/responses/index.js.map +1 -1
  19. package/lib/responses/update-settings-response-schema.d.ts +2 -0
  20. package/lib/responses/update-settings-response-schema.js +10 -0
  21. package/lib/responses/update-settings-response-schema.js.map +1 -0
  22. package/lib/responses/update-settings-response.d.ts +4 -0
  23. package/lib/responses/update-settings-response.js +9 -0
  24. package/lib/responses/update-settings-response.js.map +1 -0
  25. package/package.json +2 -2
  26. package/spec.json +69 -1
  27. package/src/app/carrier-app-definition.ts +9 -0
  28. package/src/app/constants.ts +1 -0
  29. package/src/app/create-endpoint-mapping.ts +1 -0
  30. package/src/models/addresses/ship-to.ts +2 -0
  31. package/src/requests/index.ts +1 -0
  32. package/src/requests/update-settings-request.ts +6 -0
  33. package/src/responses/index.ts +2 -0
  34. package/src/responses/update-settings-response-schema.ts +6 -0
  35. package/src/responses/update-settings-response.ts +4 -0
  36. 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.
@@ -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
  }
@@ -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
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/app/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAkBX;AAlBD,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;AAChD,CAAC,EAlBW,YAAY,4BAAZ,YAAY,QAkBvB"}
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,C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AAY,CAAC,qBAAqB,EAAE,UAAU,CAAC,qBAAqB,CAAC;IACnF,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC;IACzD,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,cAAc,EAAE,UAAU,CAAC,cAAc,CAAC;IACrE,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,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"}
@@ -4,4 +4,6 @@ import { TaxIdentifier } from '../taxes/tax-identifier';
4
4
  export declare class ShipTo extends AddressBase {
5
5
  /** @description Tax IDs associated with the consignee */
6
6
  tax_identifiers?: TaxIdentifier[];
7
+ /** @description what3words field to help identify the location */
8
+ what3words?: string;
7
9
  }
@@ -6,6 +6,8 @@ const address_base_1 = require("./address-base");
6
6
  class ShipTo extends address_base_1.AddressBase {
7
7
  /** @description Tax IDs associated with the consignee */
8
8
  tax_identifiers;
9
+ /** @description what3words field to help identify the location */
10
+ what3words;
9
11
  }
10
12
  exports.ShipTo = ShipTo;
11
13
  //# sourceMappingURL=ship-to.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ship-to.js","sourceRoot":"","sources":["../../../src/models/addresses/ship-to.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAG7C,oEAAoE;AACpE,MAAa,MAAO,SAAQ,0BAAW;IACrC,yDAAyD;IACzD,eAAe,CAAmB;CACnC;AAHD,wBAGC"}
1
+ {"version":3,"file":"ship-to.js","sourceRoot":"","sources":["../../../src/models/addresses/ship-to.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAG7C,oEAAoE;AACpE,MAAa,MAAO,SAAQ,0BAAW;IACrC,yDAAyD;IACzD,eAAe,CAAmB;IAClC,kEAAkE;IAClE,UAAU,CAAU;CACrB;AALD,wBAKC"}
@@ -15,3 +15,4 @@ export * from './schedule-pickup-request';
15
15
  export * from './tracking-request';
16
16
  export * from './validate-inbound-data-request';
17
17
  export * from './void-labels-request';
18
+ export * from './update-settings-request';
@@ -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,5 @@
1
+ import { BaseRequest } from './base-request';
2
+ /** @description Basic structure for a request to update carrier settings*/
3
+ export declare class UpdateSettingsRequest extends BaseRequest {
4
+ update_settings: object;
5
+ }
@@ -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"}
@@ -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';
@@ -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,2 @@
1
+ import Joi from 'joi';
2
+ export declare const UpdateSettingsResponseSchema: Joi.ObjectSchema<any>;
@@ -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,4 @@
1
+ /** @description Basic structure for a response to update carrier settings */
2
+ export declare class UpdateSettingsResponse {
3
+ metadata: object;
4
+ }
@@ -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.5.5",
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.5.1",
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.5"
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": [
@@ -3801,6 +3832,11 @@
3801
3832
  },
3802
3833
  "description": "Tax IDs associated with the consignee.",
3803
3834
  "nullable": true
3835
+ },
3836
+ "what3words": {
3837
+ "type": "string",
3838
+ "description": "What3words field to help identify the location.",
3839
+ "nullable": true
3804
3840
  }
3805
3841
  },
3806
3842
  "additionalProperties": false
@@ -4295,6 +4331,38 @@
4295
4331
  ],
4296
4332
  "type": "string"
4297
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
+ },
4298
4366
  "ValidateInboundDataRequest": {
4299
4367
  "required": [
4300
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.
@@ -16,4 +16,5 @@ export enum ApiEndpoints {
16
16
  GetServicePoints = '/GetServicePoints',
17
17
  GetServicePoint = '/GetServicePoint',
18
18
  ImportTrackingEvents = '/ImportTrackingEvents',
19
+ UpdateSettings = '/UpdateSettings',
19
20
  }
@@ -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
  ];
@@ -5,4 +5,6 @@ import { TaxIdentifier } from '../taxes/tax-identifier';
5
5
  export class ShipTo extends AddressBase {
6
6
  /** @description Tax IDs associated with the consignee */
7
7
  tax_identifiers?: TaxIdentifier[];
8
+ /** @description what3words field to help identify the location */
9
+ what3words?: string;
8
10
  }
@@ -15,3 +15,4 @@ export * from './schedule-pickup-request';
15
15
  export * from './tracking-request';
16
16
  export * from './validate-inbound-data-request';
17
17
  export * from './void-labels-request';
18
+ export * from './update-settings-request';
@@ -0,0 +1,6 @@
1
+ import { BaseRequest } from './base-request';
2
+
3
+ /** @description Basic structure for a request to update carrier settings*/
4
+ export class UpdateSettingsRequest extends BaseRequest {
5
+ update_settings!: object;
6
+ }
@@ -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';
@@ -0,0 +1,6 @@
1
+ import { BaseResponseSchema } from './base-response-schema';
2
+ import Joi from 'joi';
3
+
4
+ export const UpdateSettingsResponseSchema = BaseResponseSchema.keys({
5
+ metadata: Joi.object().pattern(/.*/, [Joi.any()]).required(),
6
+ });
@@ -0,0 +1,4 @@
1
+ /** @description Basic structure for a response to update carrier settings */
2
+ export class UpdateSettingsResponse {
3
+ metadata!: object;
4
+ }