@shipengine/connect-carrier-api 4.1.4 → 4.1.6

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.
@@ -94,6 +94,7 @@ export interface CarrierAppDefinition {
94
94
  * @param request Data needed by the provider to import tracking events
95
95
  */
96
96
  ImportTrackingEvents?: (request: ImportTrackingEventsRequest) => AsyncGenerator<ImportedTrackingEvent>;
97
+ ScheduledFunction?: (request: Record<string, any>) => Promise<{}[] | null> | {}[] | null;
97
98
  /** @description A method that gets additional context to log from the request when logging */
98
99
  getAdditionalContext?: (req: Request) => Record<string, string>;
99
100
  /** @description A method that redacts external HTTP requests and responses to prevent logging sensitive information */
@@ -4,6 +4,8 @@ import { RateCard } from './rate-card';
4
4
  export interface NativeRatingConfiguration {
5
5
  /** @description Default rate card to use for rating */
6
6
  DefaultRateCardId?: string;
7
+ /** @description Can users manage their own rates */
8
+ SupportsUserManagedRates?: boolean;
7
9
  /** Path to rating logic and rate card data for this carrier */
8
10
  Path?: string;
9
11
  /** Array of rate cards for the carrier */
@@ -7,6 +7,7 @@ const file_exists_1 = require("./custom-validators/file-exists");
7
7
  const rate_card_1 = require("./rate-card");
8
8
  exports.NativeRatingConfigurationSchema = joi_1.default.object({
9
9
  DefaultRateCardId: joi_1.default.string().optional(),
10
+ SupportsUserManagedRates: joi_1.default.boolean().optional(),
10
11
  Path: joi_1.default.string().optional().custom(file_exists_1.fileExists, 'implementation path exists'),
11
12
  RateCards: joi_1.default.array().optional().items(rate_card_1.RateCardSchema).unique('Id'),
12
13
  });
@@ -1 +1 @@
1
- {"version":3,"file":"native-rating-configuration.js","sourceRoot":"","sources":["../../../src/app/metadata/native-rating-configuration.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,iEAA6D;AAC7D,2CAAuD;AAY1C,QAAA,+BAA+B,GAAG,aAAG,CAAC,MAAM,CAAC;IACxD,iBAAiB,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1C,IAAI,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,wBAAU,EAAE,4BAA4B,CAAC;IAC9E,SAAS,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,0BAAc,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC;CACrE,CAAC,CAAC"}
1
+ {"version":3,"file":"native-rating-configuration.js","sourceRoot":"","sources":["../../../src/app/metadata/native-rating-configuration.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,iEAA6D;AAC7D,2CAAuD;AAc1C,QAAA,+BAA+B,GAAG,aAAG,CAAC,MAAM,CAAC;IACxD,iBAAiB,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1C,wBAAwB,EAAE,aAAG,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAClD,IAAI,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,wBAAU,EAAE,4BAA4B,CAAC;IAC9E,SAAS,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,0BAAc,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC;CACrE,CAAC,CAAC"}
@@ -3,5 +3,7 @@ export declare enum InsuranceProviders {
3
3
  None = "None",
4
4
  ShipStation = "ShipStation",
5
5
  Carrier = "Carrier",
6
- External = "External"
6
+ External = "External",
7
+ XCover = "XCover",
8
+ ParcelGuard = "ParcelGuard"
7
9
  }
@@ -8,5 +8,7 @@ var InsuranceProviders;
8
8
  InsuranceProviders["ShipStation"] = "ShipStation";
9
9
  InsuranceProviders["Carrier"] = "Carrier";
10
10
  InsuranceProviders["External"] = "External";
11
+ InsuranceProviders["XCover"] = "XCover";
12
+ InsuranceProviders["ParcelGuard"] = "ParcelGuard";
11
13
  })(InsuranceProviders = exports.InsuranceProviders || (exports.InsuranceProviders = {}));
12
14
  //# sourceMappingURL=insurance-providers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"insurance-providers.js","sourceRoot":"","sources":["../../src/models/insurance-providers.ts"],"names":[],"mappings":";;;AAAA,0CAA0C;AAC1C,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,mCAAa,CAAA;IACb,iDAA2B,CAAA;IAC3B,yCAAmB,CAAA;IACnB,2CAAqB,CAAA;AACvB,CAAC,EALW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAK7B"}
1
+ {"version":3,"file":"insurance-providers.js","sourceRoot":"","sources":["../../src/models/insurance-providers.ts"],"names":[],"mappings":";;;AAAA,0CAA0C;AAC1C,IAAY,kBAOX;AAPD,WAAY,kBAAkB;IAC5B,mCAAa,CAAA;IACb,iDAA2B,CAAA;IAC3B,yCAAmB,CAAA;IACnB,2CAAqB,CAAA;IACrB,uCAAiB,CAAA;IACjB,iDAA2B,CAAA;AAC7B,CAAC,EAPW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAO7B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/connect-carrier-api",
3
- "version": "4.1.4",
3
+ "version": "4.1.6",
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",
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.18.1"
6
+ "version": "1.18.5"
7
7
  },
8
8
  "paths": {
9
9
  "/Register": {
@@ -1893,6 +1893,99 @@
1893
1893
  "additionalProperties": false,
1894
1894
  "description": "This model represents the amount of the dangerous goods."
1895
1895
  },
1896
+ "DangerousGoods": {
1897
+ "type": "object",
1898
+ "properties": {
1899
+ "id_number": {
1900
+ "type": "string",
1901
+ "description": "UN number to identify the dangerous goods.",
1902
+ "nullable": true
1903
+ },
1904
+ "shipping_name": {
1905
+ "type": "string",
1906
+ "description": "Trade description of the dangerous goods.",
1907
+ "nullable": true
1908
+ },
1909
+ "technical_name": {
1910
+ "type": "string",
1911
+ "description": "Recognized Technical or chemical name of dangerous goods.",
1912
+ "nullable": true
1913
+ },
1914
+ "product_class": {
1915
+ "type": "string",
1916
+ "description": "Dangerous goods product class based on regulation.",
1917
+ "nullable": true
1918
+ },
1919
+ "product_class_subsidiary": {
1920
+ "type": "string",
1921
+ "description": "A secondary of product class for substances presenting more than one particular hazard",
1922
+ "nullable": true
1923
+ },
1924
+ "packaging_group": {
1925
+ "$ref": "#/components/schemas/PackagingGroupEnum"
1926
+ },
1927
+ "dangerous_amount": {
1928
+ "$ref": "#/components/schemas/DangerousAmountDetails"
1929
+ },
1930
+ "quantity": {
1931
+ "type": "number",
1932
+ "description": "Quantity of dangerous goods.",
1933
+ "format": "double",
1934
+ "nullable": true
1935
+ },
1936
+ "packaging_instruction": {
1937
+ "type": "string",
1938
+ "description": "The specific standardized packaging instructions from the relevant regulatory agency that have been applied to the parcel/container.",
1939
+ "nullable": true
1940
+ },
1941
+ "packaging_instruction_section": {
1942
+ "$ref": "#/components/schemas/PackageInstructionSectionEnum"
1943
+ },
1944
+ "packaging_type": {
1945
+ "type": "string",
1946
+ "description": "The type of exterior packaging used to contain the dangerous good.",
1947
+ "nullable": true
1948
+ },
1949
+ "transport_mean": {
1950
+ "$ref": "#/components/schemas/TransportMeanEnum"
1951
+ },
1952
+ "transport_category": {
1953
+ "type": "string",
1954
+ "description": "Transport category assign to dangerous goods for the transport purpose.",
1955
+ "nullable": true
1956
+ },
1957
+ "regulation_authority": {
1958
+ "type": "string",
1959
+ "description": "Name of the regulatory authority.",
1960
+ "nullable": true
1961
+ },
1962
+ "regulation_level": {
1963
+ "$ref": "#/components/schemas/RegulationLevelEnum"
1964
+ },
1965
+ "radioactive": {
1966
+ "type": "boolean",
1967
+ "description": "Indication if the substance is radioactive.",
1968
+ "nullable": true
1969
+ },
1970
+ "reportable_quantity": {
1971
+ "type": "boolean",
1972
+ "description": "Indication if the substance needs to be reported to regulatory authority based on the quantity.",
1973
+ "nullable": true
1974
+ },
1975
+ "tunnel_code": {
1976
+ "type": "string",
1977
+ "description": "Defines which types of tunnels the shipment is allowed to go through",
1978
+ "nullable": true
1979
+ },
1980
+ "additional_description": {
1981
+ "type": "string",
1982
+ "description": "Provider additonal description regarding the dangerous goods. This is used as a placed holder to provider additional context and varies by carrier",
1983
+ "nullable": true
1984
+ }
1985
+ },
1986
+ "additionalProperties": false,
1987
+ "description": "Dangerous Goods information passed to the carrier"
1988
+ },
1896
1989
  "DimensionDetails": {
1897
1990
  "type": "object",
1898
1991
  "properties": {
@@ -2519,7 +2612,9 @@
2519
2612
  "None",
2520
2613
  "ShipStation",
2521
2614
  "Carrier",
2522
- "External"
2615
+ "External",
2616
+ "XCover",
2617
+ "ParcelGuard"
2523
2618
  ],
2524
2619
  "type": "string"
2525
2620
  },
@@ -2831,98 +2926,22 @@
2831
2926
  "additionalProperties": false,
2832
2927
  "description": "This model represents an individual package that is part of a shipment."
2833
2928
  },
2834
- "DangerousGoods": {
2835
- "type": "object",
2836
- "properties": {
2837
- "id_number": {
2838
- "type": "string",
2839
- "description": "UN number to identify the dangerous goods.",
2840
- "nullable": true
2841
- },
2842
- "shipping_name": {
2843
- "type": "string",
2844
- "description": "Trade description of the dangerous goods.",
2845
- "nullable": true
2846
- },
2847
- "technical_name": {
2848
- "type": "string",
2849
- "description": "Recognized Technical or chemical name of dangerous goods.",
2850
- "nullable": true
2851
- },
2852
- "product_class": {
2853
- "type": "string",
2854
- "description": "Dangerous goods product class based on regulation.",
2855
- "nullable": true
2856
- },
2857
- "product_class_subsidiary": {
2858
- "type": "string",
2859
- "description": "A secondary of product class for substances presenting more than one particular hazard.",
2860
- "nullable": true
2861
- },
2862
- "packaging_group": {
2863
- "$ref": "#/components/schemas/PackagingGroupTypes"
2864
- },
2865
- "dangerous_amount": {
2866
- "$ref": "#/components/schemas/DangerousAmountDetails"
2867
- },
2868
- "quantity": {
2869
- "type": "number",
2870
- "description": "Quantity of dangerous goods.",
2871
- "format": "double",
2872
- "nullable": true
2873
- },
2874
- "packaging_instruction": {
2875
- "type": "string",
2876
- "description": "The specific standardized packaging instructions from the relevant regulatory agency that have been applied to the parcel/container.",
2877
- "nullable": true
2878
- },
2879
- "packaging_instruction_section": {
2880
- "$ref": "#/components/schemas/PackageInstructionSectionTypes"
2881
- },
2882
- "packaging_type": {
2883
- "type": "string",
2884
- "description": "The type of exterior packaging used to contain the dangerous good.",
2885
- "nullable": true
2886
- },
2887
- "transport_mean": {
2888
- "$ref": "#/components/schemas/TransportMeanTypes"
2889
- },
2890
- "transport_category": {
2891
- "type": "string",
2892
- "description": "Transport category assign to dangerous goods for the transport purpose.",
2893
- "nullable": true
2894
- },
2895
- "regulation_authority": {
2896
- "type": "string",
2897
- "description": "Name of the regulatory authority.",
2898
- "nullable": true
2899
- },
2900
- "regulation_level": {
2901
- "$ref": "#/components/schemas/RegulationLevelTypes"
2902
- },
2903
- "radioactive": {
2904
- "type": "boolean",
2905
- "description": "Indication if the substance is radioactive.",
2906
- "nullable": true
2907
- },
2908
- "reportable_quantity": {
2909
- "type": "boolean",
2910
- "description": "Indication if the substance needs to be reported to regulatory authority based on the quantity.",
2911
- "nullable": true
2912
- },
2913
- "tunnel_code": {
2914
- "type": "string",
2915
- "description": "Defines which types of tunnels the shipment is allowed to go through.",
2916
- "nullable": true
2917
- },
2918
- "additional_description": {
2919
- "type": "string",
2920
- "description": "Provider additonal description regarding the dangerous goods. This is used as a placed holder to provider additional context and varies by carrier.",
2921
- "nullable": true
2922
- }
2923
- },
2924
- "additionalProperties": false,
2925
- "description": "This model represents an dangerous good information that is part of a package."
2929
+ "PackageInstructionSectionEnum": {
2930
+ "enum": [
2931
+ "section_1",
2932
+ "section_2",
2933
+ "section_1A",
2934
+ "section_1B"
2935
+ ],
2936
+ "type": "string"
2937
+ },
2938
+ "PackagingGroupEnum": {
2939
+ "enum": [
2940
+ "i",
2941
+ "ii",
2942
+ "iii"
2943
+ ],
2944
+ "type": "string"
2926
2945
  },
2927
2946
  "PickupConfirmation": {
2928
2947
  "type": "object",
@@ -3234,6 +3253,15 @@
3234
3253
  "additionalProperties": false,
3235
3254
  "description": "This model represents the successful response for a registration request."
3236
3255
  },
3256
+ "RegulationLevelEnum": {
3257
+ "enum": [
3258
+ "lightly_regulated",
3259
+ "fully_regulated",
3260
+ "limited_quantities",
3261
+ "excepted_quantity"
3262
+ ],
3263
+ "type": "string"
3264
+ },
3237
3265
  "RelayPoint": {
3238
3266
  "required": [
3239
3267
  "opening_times",
@@ -3790,7 +3818,11 @@
3790
3818
  "pccc",
3791
3819
  "oss",
3792
3820
  "passport",
3793
- "abn"
3821
+ "abn",
3822
+ "nif",
3823
+ "inn",
3824
+ "cpf",
3825
+ "cnpj"
3794
3826
  ],
3795
3827
  "type": "string",
3796
3828
  "description": "Specifies the supported tax identification types."
@@ -4115,6 +4147,15 @@
4115
4147
  "additionalProperties": false,
4116
4148
  "description": "This model represents the successful response from a tracking request."
4117
4149
  },
4150
+ "TransportMeanEnum": {
4151
+ "enum": [
4152
+ "ground",
4153
+ "water",
4154
+ "cargo_aircraft_only",
4155
+ "passenger_aircraft"
4156
+ ],
4157
+ "type": "string"
4158
+ },
4118
4159
  "UpdateMethods": {
4119
4160
  "enum": [
4120
4161
  "append",
@@ -156,6 +156,9 @@ export interface CarrierAppDefinition {
156
156
  ImportTrackingEvents?: (
157
157
  request: ImportTrackingEventsRequest,
158
158
  ) => AsyncGenerator<ImportedTrackingEvent>;
159
+
160
+ ScheduledFunction?: (request: Record<string, any>) => Promise<{}[] | null> | {}[] | null;
161
+
159
162
  /** @description A method that gets additional context to log from the request when logging */
160
163
  getAdditionalContext?: (req: Request) => Record<string, string>;
161
164
  /** @description A method that redacts external HTTP requests and responses to prevent logging sensitive information */
@@ -6,6 +6,8 @@ import { RateCard, RateCardSchema } from './rate-card';
6
6
  export interface NativeRatingConfiguration {
7
7
  /** @description Default rate card to use for rating */
8
8
  DefaultRateCardId?: string;
9
+ /** @description Can users manage their own rates */
10
+ SupportsUserManagedRates?: boolean;
9
11
  /** Path to rating logic and rate card data for this carrier */
10
12
  Path?: string;
11
13
  /** Array of rate cards for the carrier */
@@ -14,6 +16,7 @@ export interface NativeRatingConfiguration {
14
16
 
15
17
  export const NativeRatingConfigurationSchema = Joi.object({
16
18
  DefaultRateCardId: Joi.string().optional(),
19
+ SupportsUserManagedRates: Joi.boolean().optional(),
17
20
  Path: Joi.string().optional().custom(fileExists, 'implementation path exists'),
18
21
  RateCards: Joi.array().optional().items(RateCardSchema).unique('Id'),
19
22
  });
@@ -4,4 +4,6 @@ export enum InsuranceProviders {
4
4
  ShipStation = 'ShipStation',
5
5
  Carrier = 'Carrier',
6
6
  External = 'External',
7
+ XCover = 'XCover',
8
+ ParcelGuard = 'ParcelGuard',
7
9
  }