@shipengine/connect-carrier-api 2.1.21 → 2.2.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 (211) hide show
  1. package/lib/app/carrier-app-definition.d.ts +1 -1
  2. package/lib/app/carrier-app.d.ts +1 -0
  3. package/lib/app/carrier-app.js +91 -63
  4. package/lib/app/carrier-app.js.map +1 -1
  5. package/lib/app/constants.d.ts +14 -0
  6. package/lib/app/constants.js +19 -0
  7. package/lib/app/constants.js.map +1 -0
  8. package/lib/app/internal/{carrier-app-specificaion.d.ts → carrier-app-specification.d.ts} +4 -1
  9. package/lib/app/internal/{carrier-app-specificaion.js → carrier-app-specification.js} +1 -1
  10. package/lib/app/internal/carrier-app-specification.js.map +1 -0
  11. package/lib/app/internal/{carrier-specificaion.d.ts → carrier-specification.d.ts} +0 -0
  12. package/lib/app/internal/{carrier-specificaion.js → carrier-specification.js} +1 -1
  13. package/lib/app/internal/carrier-specification.js.map +1 -0
  14. package/lib/app/internal/metadata.d.ts +4 -2
  15. package/lib/app/internal/metadata.js +6 -2
  16. package/lib/app/internal/metadata.js.map +1 -1
  17. package/lib/app/internal/route.d.ts +1 -0
  18. package/lib/app/metadata/auth-identifier.d.ts +10 -0
  19. package/lib/app/metadata/auth-identifier.js +18 -0
  20. package/lib/app/metadata/auth-identifier.js.map +1 -0
  21. package/lib/app/metadata/auth-specification.d.ts +19 -0
  22. package/lib/app/metadata/auth-specification.js +20 -0
  23. package/lib/app/metadata/auth-specification.js.map +1 -0
  24. package/lib/app/metadata/carrier-app-metadata.d.ts +3 -1
  25. package/lib/app/metadata/carrier-app-metadata.js +3 -2
  26. package/lib/app/metadata/carrier-app-metadata.js.map +1 -1
  27. package/lib/app/metadata/index.d.ts +4 -1
  28. package/lib/app/metadata/index.js +4 -1
  29. package/lib/app/metadata/index.js.map +1 -1
  30. package/lib/app/metadata/monoauth.d.ts +102 -0
  31. package/lib/app/metadata/monoauth.js +82 -0
  32. package/lib/app/metadata/monoauth.js.map +1 -0
  33. package/lib/models/addresses/address-base.d.ts +2 -0
  34. package/lib/models/addresses/address-base.js.map +1 -1
  35. package/lib/models/billing/billing-categories.d.ts +2 -0
  36. package/lib/models/billing/billing-categories.js +4 -1
  37. package/lib/models/billing/billing-categories.js.map +1 -1
  38. package/lib/models/billing/billing-line-item.d.ts +2 -0
  39. package/lib/models/billing/billing-line-item.js +12 -1
  40. package/lib/models/billing/billing-line-item.js.map +1 -1
  41. package/lib/models/currency.d.ts +2 -0
  42. package/lib/models/currency.js +7 -1
  43. package/lib/models/currency.js.map +1 -1
  44. package/lib/models/documents/document-type.d.ts +2 -0
  45. package/lib/models/documents/document-type.js +4 -1
  46. package/lib/models/documents/document-type.js.map +1 -1
  47. package/lib/models/documents/document.d.ts +2 -0
  48. package/lib/models/documents/document.js +10 -1
  49. package/lib/models/documents/document.js.map +1 -1
  50. package/lib/models/identifier.d.ts +2 -0
  51. package/lib/models/identifier.js +7 -1
  52. package/lib/models/identifier.js.map +1 -1
  53. package/lib/models/inbound-content-types.d.ts +2 -0
  54. package/lib/models/inbound-content-types.js +4 -1
  55. package/lib/models/inbound-content-types.js.map +1 -1
  56. package/lib/models/labels/document-formats.d.ts +2 -0
  57. package/lib/models/labels/document-formats.js +4 -1
  58. package/lib/models/labels/document-formats.js.map +1 -1
  59. package/lib/models/labels/form-download.d.ts +2 -0
  60. package/lib/models/labels/form-download.js +6 -1
  61. package/lib/models/labels/form-download.js.map +1 -1
  62. package/lib/models/labels/label-download.d.ts +2 -0
  63. package/lib/models/labels/label-download.js +6 -1
  64. package/lib/models/labels/label-download.js.map +1 -1
  65. package/lib/models/labels/label-package.d.ts +2 -0
  66. package/lib/models/labels/label-package.js +10 -1
  67. package/lib/models/labels/label-package.js.map +1 -1
  68. package/lib/models/labels/void-response.d.ts +3 -1
  69. package/lib/models/labels/void-response.js +10 -1
  70. package/lib/models/labels/void-response.js.map +1 -1
  71. package/lib/models/manifests/manifest.d.ts +2 -0
  72. package/lib/models/manifests/manifest.js +10 -1
  73. package/lib/models/manifests/manifest.js.map +1 -1
  74. package/lib/models/pickup/pickup-confirmation.d.ts +2 -0
  75. package/lib/models/pickup/pickup-confirmation.js +10 -1
  76. package/lib/models/pickup/pickup-confirmation.js.map +1 -1
  77. package/lib/models/pickup/pickup-window.d.ts +2 -0
  78. package/lib/models/pickup/pickup-window.js +9 -1
  79. package/lib/models/pickup/pickup-window.js.map +1 -1
  80. package/lib/models/pickup/shipment-identifier.d.ts +2 -0
  81. package/lib/models/pickup/shipment-identifier.js +8 -1
  82. package/lib/models/pickup/shipment-identifier.js.map +1 -1
  83. package/lib/models/rates/rate.d.ts +2 -0
  84. package/lib/models/rates/rate.js +18 -1
  85. package/lib/models/rates/rate.js.map +1 -1
  86. package/lib/models/registration/credentials.d.ts +2 -0
  87. package/lib/models/registration/credentials.js +7 -1
  88. package/lib/models/registration/credentials.js.map +1 -1
  89. package/lib/models/resource-download.d.ts +2 -0
  90. package/lib/models/resource-download.js +7 -1
  91. package/lib/models/resource-download.js.map +1 -1
  92. package/lib/models/time-window.d.ts +2 -0
  93. package/lib/models/time-window.js +8 -1
  94. package/lib/models/time-window.js.map +1 -1
  95. package/lib/models/tracking/lat-long.d.ts +2 -0
  96. package/lib/models/tracking/lat-long.js +7 -1
  97. package/lib/models/tracking/lat-long.js.map +1 -1
  98. package/lib/models/tracking/service.d.ts +2 -0
  99. package/lib/models/tracking/service.js +7 -1
  100. package/lib/models/tracking/service.js.map +1 -1
  101. package/lib/models/tracking/standardized-status-codes.d.ts +2 -0
  102. package/lib/models/tracking/standardized-status-codes.js +4 -1
  103. package/lib/models/tracking/standardized-status-codes.js.map +1 -1
  104. package/lib/models/tracking/track-event.d.ts +2 -0
  105. package/lib/models/tracking/track-event.js +18 -1
  106. package/lib/models/tracking/track-event.js.map +1 -1
  107. package/lib/models/tracking/tracking-info.d.ts +2 -0
  108. package/lib/models/tracking/tracking-info.js +27 -1
  109. package/lib/models/tracking/tracking-info.js.map +1 -1
  110. package/lib/models/tracking/update-method.d.ts +2 -0
  111. package/lib/models/tracking/update-method.js +4 -1
  112. package/lib/models/tracking/update-method.js.map +1 -1
  113. package/lib/models/units/dimensions.d.ts +2 -0
  114. package/lib/models/units/dimensions.js +8 -1
  115. package/lib/models/units/dimensions.js.map +1 -1
  116. package/lib/responses/base-response.d.ts +2 -0
  117. package/lib/responses/base-response.js +6 -1
  118. package/lib/responses/base-response.js.map +1 -1
  119. package/lib/responses/cancel-notification-response.d.ts +2 -0
  120. package/lib/responses/cancel-notification-response.js +7 -1
  121. package/lib/responses/cancel-notification-response.js.map +1 -1
  122. package/lib/responses/cancel-pickup-response.d.ts +2 -0
  123. package/lib/responses/cancel-pickup-response.js +9 -1
  124. package/lib/responses/cancel-pickup-response.js.map +1 -1
  125. package/lib/responses/create-label-response.d.ts +2 -0
  126. package/lib/responses/create-label-response.js +19 -1
  127. package/lib/responses/create-label-response.js.map +1 -1
  128. package/lib/responses/create-manifest-response.d.ts +2 -0
  129. package/lib/responses/create-manifest-response.js +8 -1
  130. package/lib/responses/create-manifest-response.js.map +1 -1
  131. package/lib/responses/create-notification-response.d.ts +2 -0
  132. package/lib/responses/create-notification-response.js +6 -1
  133. package/lib/responses/create-notification-response.js.map +1 -1
  134. package/lib/responses/get-rates-response.d.ts +2 -0
  135. package/lib/responses/get-rates-response.js +7 -1
  136. package/lib/responses/get-rates-response.js.map +1 -1
  137. package/lib/responses/normalize-tracking-data-response.d.ts +3 -1
  138. package/lib/responses/normalize-tracking-data-response.js +13 -0
  139. package/lib/responses/normalize-tracking-data-response.js.map +1 -1
  140. package/lib/responses/register-response.d.ts +2 -0
  141. package/lib/responses/register-response.js +8 -1
  142. package/lib/responses/register-response.js.map +1 -1
  143. package/lib/responses/schedule-pickup-response.d.ts +2 -0
  144. package/lib/responses/schedule-pickup-response.js +11 -1
  145. package/lib/responses/schedule-pickup-response.js.map +1 -1
  146. package/lib/responses/tracking-response.d.ts +1 -0
  147. package/lib/responses/tracking-response.js +5 -1
  148. package/lib/responses/tracking-response.js.map +1 -1
  149. package/lib/responses/validate-inbound-data-response.d.ts +3 -1
  150. package/lib/responses/validate-inbound-data-response.js +12 -0
  151. package/lib/responses/validate-inbound-data-response.js.map +1 -1
  152. package/lib/responses/void-labels-response.d.ts +2 -0
  153. package/lib/responses/void-labels-response.js +7 -1
  154. package/lib/responses/void-labels-response.js.map +1 -1
  155. package/package.json +1 -1
  156. package/src/app/carrier-app-definition.ts +1 -1
  157. package/src/app/carrier-app.ts +126 -66
  158. package/src/app/constants.ts +14 -0
  159. package/src/app/internal/{carrier-app-specificaion.ts → carrier-app-specification.ts} +4 -1
  160. package/src/app/internal/{carrier-specificaion.ts → carrier-specification.ts} +0 -0
  161. package/src/app/internal/metadata.ts +8 -2
  162. package/src/app/internal/route.ts +1 -0
  163. package/src/app/metadata/auth-identifier.ts +17 -0
  164. package/src/app/metadata/auth-specification.ts +39 -0
  165. package/src/app/metadata/carrier-app-metadata.ts +9 -1
  166. package/src/app/metadata/index.ts +4 -1
  167. package/src/app/metadata/monoauth.ts +171 -0
  168. package/src/models/addresses/address-base.ts +2 -0
  169. package/src/models/billing/billing-categories.ts +6 -0
  170. package/src/models/billing/billing-line-item.ts +14 -2
  171. package/src/models/currency.ts +7 -0
  172. package/src/models/documents/document-type.ts +6 -0
  173. package/src/models/documents/document.ts +11 -2
  174. package/src/models/identifier.ts +7 -0
  175. package/src/models/inbound-content-types.ts +5 -0
  176. package/src/models/labels/document-formats.ts +5 -0
  177. package/src/models/labels/form-download.ts +6 -1
  178. package/src/models/labels/label-download.ts +6 -1
  179. package/src/models/labels/label-package.ts +9 -2
  180. package/src/models/labels/void-response.ts +9 -2
  181. package/src/models/manifests/manifest.ts +9 -1
  182. package/src/models/pickup/pickup-confirmation.ts +11 -2
  183. package/src/models/pickup/pickup-window.ts +8 -0
  184. package/src/models/pickup/shipment-identifier.ts +7 -1
  185. package/src/models/rates/rate.ts +20 -2
  186. package/src/models/registration/credentials.ts +7 -0
  187. package/src/models/resource-download.ts +7 -0
  188. package/src/models/time-window.ts +8 -0
  189. package/src/models/tracking/lat-long.ts +7 -0
  190. package/src/models/tracking/service.ts +6 -0
  191. package/src/models/tracking/standardized-status-codes.ts +6 -0
  192. package/src/models/tracking/track-event.ts +16 -0
  193. package/src/models/tracking/tracking-info.ts +29 -4
  194. package/src/models/tracking/update-method.ts +6 -0
  195. package/src/models/units/dimensions.ts +7 -0
  196. package/src/responses/base-response.ts +6 -0
  197. package/src/responses/cancel-notification-response.ts +7 -1
  198. package/src/responses/cancel-pickup-response.ts +9 -1
  199. package/src/responses/create-label-response.ts +25 -1
  200. package/src/responses/create-manifest-response.ts +8 -2
  201. package/src/responses/create-notification-response.ts +6 -1
  202. package/src/responses/get-rates-response.ts +7 -2
  203. package/src/responses/normalize-tracking-data-response.ts +16 -5
  204. package/src/responses/register-response.ts +6 -1
  205. package/src/responses/schedule-pickup-response.ts +18 -2
  206. package/src/responses/tracking-response.ts +6 -2
  207. package/src/responses/validate-inbound-data-response.ts +12 -4
  208. package/src/responses/void-labels-response.ts +7 -2
  209. package/tsconfig.tsbuildinfo +1 -1
  210. package/lib/app/internal/carrier-app-specificaion.js.map +0 -1
  211. package/lib/app/internal/carrier-specificaion.js.map +0 -1
@@ -0,0 +1,102 @@
1
+ import Joi from 'joi';
2
+ export declare class Parameter {
3
+ /** @description The name of the parameter */
4
+ name: string;
5
+ /** @description The value associated with the parameter */
6
+ value: string;
7
+ }
8
+ export declare const MethodSchema: Joi.StringSchema;
9
+ export declare const ParameterSchema: Joi.ObjectSchema<any>;
10
+ export declare class DateTimeConfiguration {
11
+ /** @description JSONPath to the JSON element containing the date-time */
12
+ path: string;
13
+ /** @description DateTime format string compliant with
14
+ * https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings */
15
+ date_time_format: string;
16
+ }
17
+ export declare const DateTimeConfigurationSchema: Joi.ObjectSchema<any>;
18
+ export declare type MapOfStrings = {
19
+ [key: string]: string;
20
+ };
21
+ /** @description Optional configuration to take full control of parsing and extracting fields
22
+ * from the integration's JSON response body.
23
+ * Note for JSONPath: strings not starting with $ are interpreted as string literals
24
+ */
25
+ export declare class ResponseTransformationConfiguration {
26
+ /** @description JSONPath to the JSON element for access_token. */
27
+ access_token: string;
28
+ /** @description JSONPath to the JSON element for token_type */
29
+ token_type: string;
30
+ /** @description JSONPath to the JSON element for refresh_token */
31
+ refresh_token?: string;
32
+ /** @description JSONPath to the JSON element for expires_in. Mutually exclusive with expires_at */
33
+ expires_in?: string;
34
+ /** @description Configuration for parsing a date-time, when the integration is lacking expires_in.
35
+ * Mutually exclusive with expires_in.
36
+ */
37
+ expires_at?: DateTimeConfiguration;
38
+ /** @description Optional collection of properties to include in the connection_context sent back with the auth flow result.
39
+ * Property value may be JSONPath or a string literal.
40
+ * E.g.
41
+ * "connection_context": {
42
+ * "account_number": "$.data.account_number"
43
+ * }
44
+ */
45
+ connection_context?: MapOfStrings;
46
+ }
47
+ export declare const MapOfStringsSchema: Joi.ObjectSchema<any>;
48
+ export declare const ResponseTransformationConfigurationSchema: Joi.ObjectSchema<any>;
49
+ export declare class AccessToken {
50
+ /** @description OAuth1 only. The url to obtain the temporary Access (aka Request) Token to start a flow **/
51
+ url_template: string;
52
+ }
53
+ export declare const AccessTokenSchema: Joi.ObjectSchema<any>;
54
+ export declare class RequestTokenConfiguration {
55
+ /** @description The url to obtain the access token using the authorization code on the backend @example "http://{auth_state:store_name}.store.com/admin/oauth/request", "http://store.com/oauth/request" */
56
+ url_template: string;
57
+ /** @description A list of query parameters that will be attached to the url */
58
+ query_parameters?: Parameter[];
59
+ /** @description Method to use when making the server-server code for token request @example "GET", "POST" */
60
+ method?: string;
61
+ /** @description List of parameters that are sent to the integration when exchanging the code for the token. These are built using ContentType */
62
+ body?: Parameter[];
63
+ /** @description List of headers that are sent to the integration when requesting a token */
64
+ headers?: Parameter[];
65
+ /** @description Response payload parsing */
66
+ response?: ResponseTransformationConfiguration;
67
+ }
68
+ export declare const RequestTokenConfigurationSchema: Joi.ObjectSchema<any>;
69
+ export declare class RefreshTokenConfiguration {
70
+ /** @description The url to refresh the access token using the authorization code on the backend @example "http://{auth_state:store_name}.store.com/admin/oauth/refresh", "http://store.com/oauth/refresh" */
71
+ url_template: string;
72
+ /** @description A list of query parameters that will be attached to the url */
73
+ query_parameters?: Parameter[];
74
+ /** @description Method to use when making the server-server code for token request @example "GET", "POST" */
75
+ method?: string;
76
+ /** @description List of parameters that are sent to the integration during the server-server refresh token request. These are built using the content type specified in the headers array. */
77
+ body?: Parameter[];
78
+ /** @description List of headers that are sent to the integration when refreshing a token */
79
+ headers?: Parameter[];
80
+ /** @description Response payload parsing */
81
+ response?: ResponseTransformationConfiguration;
82
+ }
83
+ export declare const RefreshTokenConfigurationSchema: Joi.ObjectSchema<any>;
84
+ export declare class NonceConfiguration {
85
+ name: string;
86
+ }
87
+ export declare const NonceConfigurationSchema: Joi.ObjectSchema<any>;
88
+ export declare class AuthorizationConfiguration {
89
+ /** @description The url to obtain the access token using the authorization code on the backend @example "http://{auth_state:store_name}.store.com/admin/oauth/authorize", "http://store.com/oauth/authorize" */
90
+ url_template: string;
91
+ /** @description A list of query parameters that will be attached to the url */
92
+ query_parameters?: Parameter[];
93
+ /** @description Method to use when making the server-server code for token request @example "GET", "POST" */
94
+ method?: string;
95
+ /** @description List of parameters that are sent to the integration during the server-server authorization request. These are built using the content type specified in the headers array. */
96
+ body?: Parameter[];
97
+ /** @description List of headers that are sent to the integration when authorizing a token */
98
+ headers?: Parameter[];
99
+ /** @description A nonce query parameter included on the accept request, then returned and validated on the redirect request */
100
+ nonce?: NonceConfiguration;
101
+ }
102
+ export declare const AuthorizationConfigurationSchema: Joi.ObjectSchema<any>;
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthorizationConfigurationSchema = exports.AuthorizationConfiguration = exports.NonceConfigurationSchema = exports.NonceConfiguration = exports.RefreshTokenConfigurationSchema = exports.RefreshTokenConfiguration = exports.RequestTokenConfigurationSchema = exports.RequestTokenConfiguration = exports.AccessTokenSchema = exports.AccessToken = exports.ResponseTransformationConfigurationSchema = exports.MapOfStringsSchema = exports.ResponseTransformationConfiguration = exports.DateTimeConfigurationSchema = exports.DateTimeConfiguration = exports.ParameterSchema = exports.MethodSchema = exports.Parameter = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const joi_1 = tslib_1.__importDefault(require("joi"));
6
+ class Parameter {
7
+ }
8
+ exports.Parameter = Parameter;
9
+ exports.MethodSchema = joi_1.default.string().valid('GET', 'POST', 'DELETE', 'PUT', 'get', 'post', 'delete', 'put');
10
+ exports.ParameterSchema = joi_1.default.object({
11
+ name: joi_1.default.string().required(),
12
+ value: joi_1.default.string().required(),
13
+ });
14
+ class DateTimeConfiguration {
15
+ }
16
+ exports.DateTimeConfiguration = DateTimeConfiguration;
17
+ exports.DateTimeConfigurationSchema = joi_1.default.object({
18
+ path: joi_1.default.string().required(),
19
+ date_time_format: joi_1.default.string().required(),
20
+ });
21
+ /** @description Optional configuration to take full control of parsing and extracting fields
22
+ * from the integration's JSON response body.
23
+ * Note for JSONPath: strings not starting with $ are interpreted as string literals
24
+ */
25
+ class ResponseTransformationConfiguration {
26
+ }
27
+ exports.ResponseTransformationConfiguration = ResponseTransformationConfiguration;
28
+ exports.MapOfStringsSchema = joi_1.default.object().pattern(joi_1.default.string(), joi_1.default.string());
29
+ exports.ResponseTransformationConfigurationSchema = joi_1.default.object({
30
+ access_token: joi_1.default.string().required(),
31
+ token_type: joi_1.default.string().required(),
32
+ refresh_token: joi_1.default.string().optional(),
33
+ expires_in: joi_1.default.string().optional(),
34
+ expires_at: exports.DateTimeConfigurationSchema.optional(),
35
+ connection_context: exports.MapOfStringsSchema.optional(),
36
+ });
37
+ class AccessToken {
38
+ }
39
+ exports.AccessToken = AccessToken;
40
+ exports.AccessTokenSchema = joi_1.default.object({
41
+ url_template: joi_1.default.string().required(),
42
+ });
43
+ class RequestTokenConfiguration {
44
+ }
45
+ exports.RequestTokenConfiguration = RequestTokenConfiguration;
46
+ exports.RequestTokenConfigurationSchema = joi_1.default.object({
47
+ url_template: joi_1.default.string().required(),
48
+ query_parameters: joi_1.default.array().optional().items(exports.ParameterSchema),
49
+ method: exports.MethodSchema.optional(),
50
+ body: joi_1.default.array().optional().items(exports.ParameterSchema),
51
+ headers: joi_1.default.array().optional().items(exports.ParameterSchema),
52
+ response: exports.ResponseTransformationConfigurationSchema.optional(),
53
+ });
54
+ class RefreshTokenConfiguration {
55
+ }
56
+ exports.RefreshTokenConfiguration = RefreshTokenConfiguration;
57
+ exports.RefreshTokenConfigurationSchema = joi_1.default.object({
58
+ url_template: joi_1.default.string().required(),
59
+ query_parameters: joi_1.default.array().optional().items(exports.ParameterSchema),
60
+ method: exports.MethodSchema.optional(),
61
+ body: joi_1.default.array().optional().items(exports.ParameterSchema),
62
+ headers: joi_1.default.array().optional().items(exports.ParameterSchema),
63
+ response: exports.ResponseTransformationConfigurationSchema.optional(),
64
+ });
65
+ class NonceConfiguration {
66
+ }
67
+ exports.NonceConfiguration = NonceConfiguration;
68
+ exports.NonceConfigurationSchema = joi_1.default.object({
69
+ name: joi_1.default.string().required(),
70
+ });
71
+ class AuthorizationConfiguration {
72
+ }
73
+ exports.AuthorizationConfiguration = AuthorizationConfiguration;
74
+ exports.AuthorizationConfigurationSchema = joi_1.default.object({
75
+ url_template: joi_1.default.string().required(),
76
+ query_parameters: joi_1.default.array().optional().items(exports.ParameterSchema),
77
+ method: exports.MethodSchema.optional(),
78
+ body: joi_1.default.array().optional().items(exports.ParameterSchema),
79
+ headers: joi_1.default.array().optional().items(exports.ParameterSchema),
80
+ nonce: exports.NonceConfigurationSchema.optional(),
81
+ });
82
+ //# sourceMappingURL=monoauth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monoauth.js","sourceRoot":"","sources":["../../../src/app/metadata/monoauth.ts"],"names":[],"mappings":"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"}
@@ -30,4 +30,6 @@ export declare class AddressBase {
30
30
  address_metadata?: {
31
31
  [key: string]: string;
32
32
  };
33
+ /** @description Instructions to help the carrier navigate to the address. */
34
+ instructions?: string;
33
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"address-base.js","sourceRoot":"","sources":["../../../src/models/addresses/address-base.ts"],"names":[],"mappings":";;;AAEA,MAAa,WAAW;CA8BvB;AA9BD,kCA8BC"}
1
+ {"version":3,"file":"address-base.js","sourceRoot":"","sources":["../../../src/models/addresses/address-base.ts"],"names":[],"mappings":";;;AAEA,MAAa,WAAW;CAgCvB;AAhCD,kCAgCC"}
@@ -1,3 +1,4 @@
1
+ import Joi from 'joi';
1
2
  /** @description Category for a billing line item */
2
3
  export declare enum BillingCategories {
3
4
  Uncategorized = "uncategorized",
@@ -23,3 +24,4 @@ export declare enum BillingCategories {
23
24
  /** @description Amount to be paid to the driver, used for local delivery and courier services. */
24
25
  Tip = "tip"
25
26
  }
27
+ export declare const BillingCategoriesSchema: Joi.StringSchema;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BillingCategories = void 0;
3
+ exports.BillingCategoriesSchema = exports.BillingCategories = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const joi_1 = tslib_1.__importDefault(require("joi"));
4
6
  /** @description Category for a billing line item */
5
7
  var BillingCategories;
6
8
  (function (BillingCategories) {
@@ -27,4 +29,5 @@ var BillingCategories;
27
29
  /** @description Amount to be paid to the driver, used for local delivery and courier services. */
28
30
  BillingCategories["Tip"] = "tip";
29
31
  })(BillingCategories = exports.BillingCategories || (exports.BillingCategories = {}));
32
+ exports.BillingCategoriesSchema = joi_1.default.string().valid(...Object.values(BillingCategories));
30
33
  //# sourceMappingURL=billing-categories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"billing-categories.js","sourceRoot":"","sources":["../../../src/models/billing/billing-categories.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AACpD,IAAY,iBAuBX;AAvBD,WAAY,iBAAiB;IAC3B,oDAA+B,CAAA;IAC/B,0CAAqB,CAAA;IACrB,4CAAuB,CAAA;IACvB,oFAAoF;IACpF,wCAAmB,CAAA;IACnB,0CAAqB,CAAA;IACrB,+CAA0B,CAAA;IAC1B,uDAAkC,CAAA;IAClC,sCAAiB,CAAA;IACjB,gCAAW,CAAA;IACX,0CAAqB,CAAA;IACrB,0CAAqB,CAAA;IACrB,mDAA8B,CAAA;IAC9B,sCAAiB,CAAA;IACjB,wEAAwE;IACxE,iDAA4B,CAAA;IAC5B,iDAAiD;IACjD,0CAAqB,CAAA;IACrB,wCAAmB,CAAA;IACnB,oDAA+B,CAAA;IAC/B,kGAAkG;IAClG,gCAAW,CAAA;AACb,CAAC,EAvBW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAuB5B"}
1
+ {"version":3,"file":"billing-categories.js","sourceRoot":"","sources":["../../../src/models/billing/billing-categories.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AAEtB,oDAAoD;AACpD,IAAY,iBAuBX;AAvBD,WAAY,iBAAiB;IAC3B,oDAA+B,CAAA;IAC/B,0CAAqB,CAAA;IACrB,4CAAuB,CAAA;IACvB,oFAAoF;IACpF,wCAAmB,CAAA;IACnB,0CAAqB,CAAA;IACrB,+CAA0B,CAAA;IAC1B,uDAAkC,CAAA;IAClC,sCAAiB,CAAA;IACjB,gCAAW,CAAA;IACX,0CAAqB,CAAA;IACrB,0CAAqB,CAAA;IACrB,mDAA8B,CAAA;IAC9B,sCAAiB,CAAA;IACjB,wEAAwE;IACxE,iDAA4B,CAAA;IAC5B,iDAAiD;IACjD,0CAAqB,CAAA;IACrB,wCAAmB,CAAA;IACnB,oDAA+B,CAAA;IAC/B,kGAAkG;IAClG,gCAAW,CAAA;AACb,CAAC,EAvBW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAuB5B;AAEY,QAAA,uBAAuB,GAAG,aAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CACvD,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CACpC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { BillingCategories } from './billing-categories';
2
2
  import { Currency } from '../currency';
3
+ import Joi from 'joi';
3
4
  /** @description Basic structure of each charge or line item */
4
5
  export declare class BillingLineItem {
5
6
  billing_category: BillingCategories;
@@ -8,3 +9,4 @@ export declare class BillingLineItem {
8
9
  memo?: string;
9
10
  amount: Currency;
10
11
  }
12
+ export declare const BillingLineItemSchema: Joi.ObjectSchema<any>;
@@ -1,8 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BillingLineItem = void 0;
3
+ exports.BillingLineItemSchema = exports.BillingLineItem = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const billing_categories_1 = require("./billing-categories");
6
+ const currency_1 = require("../currency");
7
+ const joi_1 = tslib_1.__importDefault(require("joi"));
4
8
  /** @description Basic structure of each charge or line item */
5
9
  class BillingLineItem {
6
10
  }
7
11
  exports.BillingLineItem = BillingLineItem;
12
+ exports.BillingLineItemSchema = joi_1.default.object({
13
+ billing_category: billing_categories_1.BillingCategoriesSchema.required(),
14
+ carrier_description: joi_1.default.string().optional().empty(),
15
+ carrier_billing_code: joi_1.default.string().optional().empty(),
16
+ memo: joi_1.default.string().optional().empty(),
17
+ amount: currency_1.CurrencySchema.required(),
18
+ });
8
19
  //# sourceMappingURL=billing-line-item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"billing-line-item.js","sourceRoot":"","sources":["../../../src/models/billing/billing-line-item.ts"],"names":[],"mappings":";;;AAGA,+DAA+D;AAC/D,MAAa,eAAe;CAM3B;AAND,0CAMC"}
1
+ {"version":3,"file":"billing-line-item.js","sourceRoot":"","sources":["../../../src/models/billing/billing-line-item.ts"],"names":[],"mappings":";;;;AAAA,6DAG8B;AAC9B,0CAAuD;AACvD,sDAAsB;AAEtB,+DAA+D;AAC/D,MAAa,eAAe;CAM3B;AAND,0CAMC;AAEY,QAAA,qBAAqB,GAAG,aAAG,CAAC,MAAM,CAAC;IAC9C,gBAAgB,EAAE,4CAAuB,CAAC,QAAQ,EAAE;IACpD,mBAAmB,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;IACpD,oBAAoB,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;IACrD,IAAI,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;IACrC,MAAM,EAAE,yBAAc,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC"}
@@ -1,5 +1,7 @@
1
+ import Joi from 'joi';
1
2
  /** @description Basic structure for defining an amount of money and its currency */
2
3
  export declare class Currency {
3
4
  currency: string;
4
5
  amount: string;
5
6
  }
7
+ export declare const CurrencySchema: Joi.ObjectSchema<any>;
@@ -1,8 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Currency = void 0;
3
+ exports.CurrencySchema = exports.Currency = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const joi_1 = tslib_1.__importDefault(require("joi"));
4
6
  /** @description Basic structure for defining an amount of money and its currency */
5
7
  class Currency {
6
8
  }
7
9
  exports.Currency = Currency;
10
+ exports.CurrencySchema = joi_1.default.object({
11
+ currency: joi_1.default.string().required(),
12
+ amount: joi_1.default.string().required(),
13
+ });
8
14
  //# sourceMappingURL=currency.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"currency.js","sourceRoot":"","sources":["../../src/models/currency.ts"],"names":[],"mappings":";;;AAAA,oFAAoF;AACpF,MAAa,QAAQ;CAGpB;AAHD,4BAGC"}
1
+ {"version":3,"file":"currency.js","sourceRoot":"","sources":["../../src/models/currency.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AAEtB,oFAAoF;AACpF,MAAa,QAAQ;CAGpB;AAHD,4BAGC;AAEY,QAAA,cAAc,GAAG,aAAG,CAAC,MAAM,CAAC;IACvC,QAAQ,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,MAAM,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
+ import Joi from 'joi';
1
2
  /** @description Types of documents */
2
3
  export declare enum DocumentType {
3
4
  Label = "label",
@@ -5,3 +6,4 @@ export declare enum DocumentType {
5
6
  CommercialInvoice = "commercial_invoice",
6
7
  BillOfLading = "bill_of_lading"
7
8
  }
9
+ export declare const DocumentTypeSchema: Joi.StringSchema;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DocumentType = void 0;
3
+ exports.DocumentTypeSchema = exports.DocumentType = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const joi_1 = tslib_1.__importDefault(require("joi"));
4
6
  /** @description Types of documents */
5
7
  var DocumentType;
6
8
  (function (DocumentType) {
@@ -9,4 +11,5 @@ var DocumentType;
9
11
  DocumentType["CommercialInvoice"] = "commercial_invoice";
10
12
  DocumentType["BillOfLading"] = "bill_of_lading";
11
13
  })(DocumentType = exports.DocumentType || (exports.DocumentType = {}));
14
+ exports.DocumentTypeSchema = joi_1.default.string().valid(...Object.values(DocumentType));
12
15
  //# sourceMappingURL=document-type.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"document-type.js","sourceRoot":"","sources":["../../../src/models/documents/document-type.ts"],"names":[],"mappings":";;;AAAA,sCAAsC;AACtC,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,4CAA4B,CAAA;IAC5B,wDAAwC,CAAA;IACxC,+CAA+B,CAAA;AACjC,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB"}
1
+ {"version":3,"file":"document-type.js","sourceRoot":"","sources":["../../../src/models/documents/document-type.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AAEtB,sCAAsC;AACtC,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,4CAA4B,CAAA;IAC5B,wDAAwC,CAAA;IACxC,+CAA+B,CAAA;AACjC,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB;AAEY,QAAA,kBAAkB,GAAG,aAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAClD,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAC/B,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import { DocumentType } from './document-type';
2
2
  import { DocumentFormat } from '../labels/document-formats';
3
+ import Joi from 'joi';
3
4
  /** @description Basic structure for a document */
4
5
  export declare class Document {
5
6
  type: DocumentType[];
6
7
  data: string;
7
8
  format: DocumentFormat;
8
9
  }
10
+ export declare const DocumentSchema: Joi.ObjectSchema<any>;
@@ -1,8 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Document = void 0;
3
+ exports.DocumentSchema = exports.Document = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const document_type_1 = require("./document-type");
6
+ const document_formats_1 = require("../labels/document-formats");
7
+ const joi_1 = tslib_1.__importDefault(require("joi"));
4
8
  /** @description Basic structure for a document */
5
9
  class Document {
6
10
  }
7
11
  exports.Document = Document;
12
+ exports.DocumentSchema = joi_1.default.object({
13
+ type: joi_1.default.array().required().min(1).items(document_type_1.DocumentTypeSchema),
14
+ data: joi_1.default.string().required(),
15
+ format: document_formats_1.DocumentFormatSchema.required(),
16
+ });
8
17
  //# sourceMappingURL=document.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"document.js","sourceRoot":"","sources":["../../../src/models/documents/document.ts"],"names":[],"mappings":";;;AAGA,kDAAkD;AAClD,MAAa,QAAQ;CAIpB;AAJD,4BAIC"}
1
+ {"version":3,"file":"document.js","sourceRoot":"","sources":["../../../src/models/documents/document.ts"],"names":[],"mappings":";;;;AAAA,mDAAmE;AACnE,iEAGoC;AACpC,sDAAsB;AAEtB,kDAAkD;AAClD,MAAa,QAAQ;CAIpB;AAJD,4BAIC;AACY,QAAA,cAAc,GAAG,aAAG,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,kCAAkB,CAAC;IAC7D,IAAI,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,MAAM,EAAE,uCAAoB,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC"}
@@ -1,5 +1,7 @@
1
+ import Joi from 'joi';
1
2
  /** @description Key value pair to allow custom properties */
2
3
  export declare class Identifier {
3
4
  type: string;
4
5
  value: string;
5
6
  }
7
+ export declare const IdentifierSchema: Joi.ObjectSchema<any>;
@@ -1,8 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Identifier = void 0;
3
+ exports.IdentifierSchema = exports.Identifier = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const joi_1 = tslib_1.__importDefault(require("joi"));
4
6
  /** @description Key value pair to allow custom properties */
5
7
  class Identifier {
6
8
  }
7
9
  exports.Identifier = Identifier;
10
+ exports.IdentifierSchema = joi_1.default.object({
11
+ type: joi_1.default.string().required(),
12
+ value: joi_1.default.string().required(),
13
+ });
8
14
  //# sourceMappingURL=identifier.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"identifier.js","sourceRoot":"","sources":["../../src/models/identifier.ts"],"names":[],"mappings":";;;AAAA,6DAA6D;AAC7D,MAAa,UAAU;CAGtB;AAHD,gCAGC"}
1
+ {"version":3,"file":"identifier.js","sourceRoot":"","sources":["../../src/models/identifier.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AAEtB,6DAA6D;AAC7D,MAAa,UAAU;CAGtB;AAHD,gCAGC;AAEY,QAAA,gBAAgB,GAAG,aAAG,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,KAAK,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC"}
@@ -1,5 +1,7 @@
1
+ import Joi from 'joi';
1
2
  /** @description Types of inbound content */
2
3
  export declare enum InboundDataContentTypes {
3
4
  /** @description Tracking information */
4
5
  Tracking = "tracking"
5
6
  }
7
+ export declare const InboundDataContentTypesSchema: Joi.StringSchema;
@@ -1,10 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InboundDataContentTypes = void 0;
3
+ exports.InboundDataContentTypesSchema = exports.InboundDataContentTypes = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const joi_1 = tslib_1.__importDefault(require("joi"));
4
6
  /** @description Types of inbound content */
5
7
  var InboundDataContentTypes;
6
8
  (function (InboundDataContentTypes) {
7
9
  /** @description Tracking information */
8
10
  InboundDataContentTypes["Tracking"] = "tracking";
9
11
  })(InboundDataContentTypes = exports.InboundDataContentTypes || (exports.InboundDataContentTypes = {}));
12
+ exports.InboundDataContentTypesSchema = joi_1.default.string().valid(...Object.values(InboundDataContentTypes));
10
13
  //# sourceMappingURL=inbound-content-types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"inbound-content-types.js","sourceRoot":"","sources":["../../src/models/inbound-content-types.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,wCAAwC;IACxC,gDAAqB,CAAA;AACvB,CAAC,EAHW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAGlC"}
1
+ {"version":3,"file":"inbound-content-types.js","sourceRoot":"","sources":["../../src/models/inbound-content-types.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AAEtB,4CAA4C;AAC5C,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,wCAAwC;IACxC,gDAAqB,CAAA;AACvB,CAAC,EAHW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAGlC;AACY,QAAA,6BAA6B,GAAG,aAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAC7D,GAAG,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAC1C,CAAC"}
@@ -1,6 +1,8 @@
1
+ import Joi from 'joi';
1
2
  /** @description Label data type */
2
3
  export declare enum DocumentFormat {
3
4
  Pdf = "PDF",
4
5
  Zpl = "ZPL",
5
6
  Png = "PNG"
6
7
  }
8
+ export declare const DocumentFormatSchema: Joi.StringSchema;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DocumentFormat = void 0;
3
+ exports.DocumentFormatSchema = exports.DocumentFormat = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const joi_1 = tslib_1.__importDefault(require("joi"));
4
6
  /** @description Label data type */
5
7
  var DocumentFormat;
6
8
  (function (DocumentFormat) {
@@ -8,4 +10,5 @@ var DocumentFormat;
8
10
  DocumentFormat["Zpl"] = "ZPL";
9
11
  DocumentFormat["Png"] = "PNG";
10
12
  })(DocumentFormat = exports.DocumentFormat || (exports.DocumentFormat = {}));
13
+ exports.DocumentFormatSchema = joi_1.default.string().valid(...Object.values(DocumentFormat));
11
14
  //# sourceMappingURL=document-formats.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"document-formats.js","sourceRoot":"","sources":["../../../src/models/labels/document-formats.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,6BAAW,CAAA;IACX,6BAAW,CAAA;IACX,6BAAW,CAAA;AACb,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB"}
1
+ {"version":3,"file":"document-formats.js","sourceRoot":"","sources":["../../../src/models/labels/document-formats.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AAEtB,mCAAmC;AACnC,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,6BAAW,CAAA;IACX,6BAAW,CAAA;IACX,6BAAW,CAAA;AACb,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;AACY,QAAA,oBAAoB,GAAG,aAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CACpD,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CACjC,CAAC"}
@@ -1,4 +1,6 @@
1
+ import Joi from 'joi';
1
2
  import { ResourceDownload } from '../resource-download';
2
3
  export declare class FormDownload extends ResourceDownload {
3
4
  form_data?: string;
4
5
  }
6
+ export declare const FormDownloadSchema: Joi.ObjectSchema<any>;
@@ -1,8 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FormDownload = void 0;
3
+ exports.FormDownloadSchema = exports.FormDownload = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const joi_1 = tslib_1.__importDefault(require("joi"));
4
6
  const resource_download_1 = require("../resource-download");
5
7
  class FormDownload extends resource_download_1.ResourceDownload {
6
8
  }
7
9
  exports.FormDownload = FormDownload;
10
+ exports.FormDownloadSchema = resource_download_1.ResourceDownloadSchema.keys({
11
+ form_data: joi_1.default.string().optional().empty(),
12
+ });
8
13
  //# sourceMappingURL=form-download.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-download.js","sourceRoot":"","sources":["../../../src/models/labels/form-download.ts"],"names":[],"mappings":";;;AAAA,4DAAwD;AAExD,MAAa,YAAa,SAAQ,oCAAgB;CAEjD;AAFD,oCAEC"}
1
+ {"version":3,"file":"form-download.js","sourceRoot":"","sources":["../../../src/models/labels/form-download.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,4DAAgF;AAEhF,MAAa,YAAa,SAAQ,oCAAgB;CAEjD;AAFD,oCAEC;AAEY,QAAA,kBAAkB,GAAG,0CAAsB,CAAC,IAAI,CAAC;IAC5D,SAAS,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;CAC3C,CAAC,CAAC"}
@@ -1,4 +1,6 @@
1
+ import Joi from 'joi';
1
2
  import { ResourceDownload } from '../resource-download';
2
3
  export declare class LabelDownload extends ResourceDownload {
3
4
  label_data?: string;
4
5
  }
6
+ export declare const LabelDownloadSchema: Joi.ObjectSchema<any>;
@@ -1,8 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LabelDownload = void 0;
3
+ exports.LabelDownloadSchema = exports.LabelDownload = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const joi_1 = tslib_1.__importDefault(require("joi"));
4
6
  const resource_download_1 = require("../resource-download");
5
7
  class LabelDownload extends resource_download_1.ResourceDownload {
6
8
  }
7
9
  exports.LabelDownload = LabelDownload;
10
+ exports.LabelDownloadSchema = resource_download_1.ResourceDownloadSchema.keys({
11
+ label_data: joi_1.default.string().optional().empty(),
12
+ });
8
13
  //# sourceMappingURL=label-download.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"label-download.js","sourceRoot":"","sources":["../../../src/models/labels/label-download.ts"],"names":[],"mappings":";;;AAAA,4DAAwD;AAExD,MAAa,aAAc,SAAQ,oCAAgB;CAElD;AAFD,sCAEC"}
1
+ {"version":3,"file":"label-download.js","sourceRoot":"","sources":["../../../src/models/labels/label-download.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,4DAAgF;AAEhF,MAAa,aAAc,SAAQ,oCAAgB;CAElD;AAFD,sCAEC;AAEY,QAAA,mBAAmB,GAAG,0CAAsB,CAAC,IAAI,CAAC;IAC7D,UAAU,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;CAC5C,CAAC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { Identifier } from '../identifier';
2
2
  import { Document } from '../documents';
3
+ import Joi from 'joi';
3
4
  /** @description Package information provided by the carrier */
4
5
  export declare class LabelPackage {
5
6
  tracking_number?: string;
@@ -7,3 +8,4 @@ export declare class LabelPackage {
7
8
  alternative_identifiers?: Identifier[];
8
9
  documents?: Document[];
9
10
  }
11
+ export declare const LabelPackageSchema: Joi.ObjectSchema<any>;
@@ -1,8 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LabelPackage = void 0;
3
+ exports.LabelPackageSchema = exports.LabelPackage = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const identifier_1 = require("../identifier");
6
+ const documents_1 = require("../documents");
7
+ const joi_1 = tslib_1.__importDefault(require("joi"));
4
8
  /** @description Package information provided by the carrier */
5
9
  class LabelPackage {
6
10
  }
7
11
  exports.LabelPackage = LabelPackage;
12
+ exports.LabelPackageSchema = joi_1.default.object({
13
+ tracking_number: joi_1.default.string().optional().empty(),
14
+ alternative_identifiers: joi_1.default.array().optional().items(identifier_1.IdentifierSchema),
15
+ documents: joi_1.default.array().optional().items(documents_1.DocumentSchema),
16
+ });
8
17
  //# sourceMappingURL=label-package.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"label-package.js","sourceRoot":"","sources":["../../../src/models/labels/label-package.ts"],"names":[],"mappings":";;;AAGA,+DAA+D;AAC/D,MAAa,YAAY;CAKxB;AALD,oCAKC"}
1
+ {"version":3,"file":"label-package.js","sourceRoot":"","sources":["../../../src/models/labels/label-package.ts"],"names":[],"mappings":";;;;AAAA,8CAA6D;AAC7D,4CAAwD;AACxD,sDAAsB;AAEtB,+DAA+D;AAC/D,MAAa,YAAY;CAKxB;AALD,oCAKC;AAEY,QAAA,kBAAkB,GAAG,aAAG,CAAC,MAAM,CAAC;IAC3C,eAAe,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;IAChD,uBAAuB,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,6BAAgB,CAAC;IACvE,SAAS,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,0BAAc,CAAC;CACxD,CAAC,CAAC"}
@@ -1,4 +1,5 @@
1
- import { BillingLineItem } from '..';
1
+ import Joi from 'joi';
2
+ import { BillingLineItem } from '../billing';
2
3
  /** @description Basic structure for a response to void a label */
3
4
  export declare class VoidResponse {
4
5
  /** @description Id for the void response */
@@ -10,3 +11,4 @@ export declare class VoidResponse {
10
11
  /** @description Individual Billing Line items which remain after voiding the label, e.g. a cancellation fee. */
11
12
  billing_line_items?: BillingLineItem[];
12
13
  }
14
+ export declare const VoidResponseSchema: Joi.ObjectSchema<any>;
@@ -1,8 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VoidResponse = void 0;
3
+ exports.VoidResponseSchema = exports.VoidResponse = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const joi_1 = tslib_1.__importDefault(require("joi"));
6
+ const billing_1 = require("../billing");
4
7
  /** @description Basic structure for a response to void a label */
5
8
  class VoidResponse {
6
9
  }
7
10
  exports.VoidResponse = VoidResponse;
11
+ exports.VoidResponseSchema = joi_1.default.object({
12
+ void_request_id: joi_1.default.string().required(),
13
+ message: joi_1.default.string().optional().empty(),
14
+ errors: joi_1.default.array().optional().items(joi_1.default.string()),
15
+ billing_line_items: joi_1.default.array().optional().items(billing_1.BillingLineItemSchema),
16
+ });
8
17
  //# sourceMappingURL=void-response.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"void-response.js","sourceRoot":"","sources":["../../../src/models/labels/void-response.ts"],"names":[],"mappings":";;;AAEA,kEAAkE;AAClE,MAAa,YAAY;CASxB;AATD,oCASC"}
1
+ {"version":3,"file":"void-response.js","sourceRoot":"","sources":["../../../src/models/labels/void-response.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,wCAAoE;AACpE,kEAAkE;AAClE,MAAa,YAAY;CASxB;AATD,oCASC;AAEY,QAAA,kBAAkB,GAAG,aAAG,CAAC,MAAM,CAAC;IAC3C,eAAe,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,OAAO,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;IACxC,MAAM,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,aAAG,CAAC,MAAM,EAAE,CAAC;IAClD,kBAAkB,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,+BAAqB,CAAC;CACxE,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
+ import Joi from 'joi';
1
2
  import { ResourceDownload } from '../resource-download';
2
3
  /** @description Basic structure of a manifest */
3
4
  export declare class Manifest {
@@ -6,3 +7,4 @@ export declare class Manifest {
6
7
  document_href?: string;
7
8
  document_data?: string;
8
9
  }
10
+ export declare const ManifestSchema: Joi.ObjectSchema<any>;