@shipengine/connect-carrier-api 4.0.1 → 4.1.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 (212) hide show
  1. package/lib/app/build-app-deployment.js +3 -3
  2. package/lib/app/build-app-deployment.js.map +1 -1
  3. package/lib/app/carrier-app-definition.d.ts +1 -0
  4. package/lib/app/metadata/auth-identifier.js +3 -0
  5. package/lib/app/metadata/auth-identifier.js.map +1 -1
  6. package/lib/app/metadata/auth-specification.js +12 -0
  7. package/lib/app/metadata/auth-specification.js.map +1 -1
  8. package/lib/app/metadata/monoauth.js +68 -0
  9. package/lib/app/metadata/monoauth.js.map +1 -1
  10. package/lib/app/native-rating-data-validator.js +3 -4
  11. package/lib/app/native-rating-data-validator.js.map +1 -1
  12. package/lib/models/addresses/address-base.js +30 -0
  13. package/lib/models/addresses/address-base.js.map +1 -1
  14. package/lib/models/addresses/pudo-location.js +4 -0
  15. package/lib/models/addresses/pudo-location.js.map +1 -1
  16. package/lib/models/addresses/service-point-address.js +2 -0
  17. package/lib/models/addresses/service-point-address.js.map +1 -1
  18. package/lib/models/addresses/ship-from.js +2 -0
  19. package/lib/models/addresses/ship-from.js.map +1 -1
  20. package/lib/models/addresses/ship-to.js +2 -0
  21. package/lib/models/addresses/ship-to.js.map +1 -1
  22. package/lib/models/advanced-options.js +16 -0
  23. package/lib/models/advanced-options.js.map +1 -1
  24. package/lib/models/authorization.js +4 -0
  25. package/lib/models/authorization.js.map +1 -1
  26. package/lib/models/bill-to.js +4 -0
  27. package/lib/models/bill-to.js.map +1 -1
  28. package/lib/models/billing/billing-line-item.js +12 -0
  29. package/lib/models/billing/billing-line-item.js.map +1 -1
  30. package/lib/models/collect-on-delivery.js +4 -0
  31. package/lib/models/collect-on-delivery.js.map +1 -1
  32. package/lib/models/currency.js +4 -0
  33. package/lib/models/currency.js.map +1 -1
  34. package/lib/models/customs/customs-charges.js +10 -0
  35. package/lib/models/customs/customs-charges.js.map +1 -1
  36. package/lib/models/customs/customs-item.js +22 -0
  37. package/lib/models/customs/customs-item.js.map +1 -1
  38. package/lib/models/customs/customs.js +20 -0
  39. package/lib/models/customs/customs.js.map +1 -1
  40. package/lib/models/documents/document.js +6 -0
  41. package/lib/models/documents/document.js.map +1 -1
  42. package/lib/models/errors/detailed-error.js +5 -0
  43. package/lib/models/errors/detailed-error.js.map +1 -1
  44. package/lib/models/fulfillment-plans/fulfillment-plan-details.js +6 -0
  45. package/lib/models/fulfillment-plans/fulfillment-plan-details.js.map +1 -1
  46. package/lib/models/fulfillment-plans/fulfillment-plan-items.js +8 -0
  47. package/lib/models/fulfillment-plans/fulfillment-plan-items.js.map +1 -1
  48. package/lib/models/fulfillment-plans/raw-external-source.js +2 -0
  49. package/lib/models/fulfillment-plans/raw-external-source.js.map +1 -1
  50. package/lib/models/identifier.js +2 -0
  51. package/lib/models/identifier.js.map +1 -1
  52. package/lib/models/importer-records/importer-of-record.js +22 -0
  53. package/lib/models/importer-records/importer-of-record.js.map +1 -1
  54. package/lib/models/labels/form-download.js +2 -0
  55. package/lib/models/labels/form-download.js.map +1 -1
  56. package/lib/models/labels/label-download.js +2 -0
  57. package/lib/models/labels/label-download.js.map +1 -1
  58. package/lib/models/labels/label-message.js +3 -0
  59. package/lib/models/labels/label-message.js.map +1 -1
  60. package/lib/models/labels/label-package.js +6 -0
  61. package/lib/models/labels/label-package.js.map +1 -1
  62. package/lib/models/labels/return-label-details.js +2 -0
  63. package/lib/models/labels/return-label-details.js.map +1 -1
  64. package/lib/models/labels/void-request.js +4 -0
  65. package/lib/models/labels/void-request.js.map +1 -1
  66. package/lib/models/labels/void-response.js +8 -0
  67. package/lib/models/labels/void-response.js.map +1 -1
  68. package/lib/models/manifests/label.js +4 -0
  69. package/lib/models/manifests/label.js.map +1 -1
  70. package/lib/models/manifests/manifest-request-shipment.js +1 -0
  71. package/lib/models/manifests/manifest-request-shipment.js.map +1 -1
  72. package/lib/models/manifests/manifest.js +9 -0
  73. package/lib/models/manifests/manifest.js.map +1 -1
  74. package/lib/models/package.js +14 -0
  75. package/lib/models/package.js.map +1 -1
  76. package/lib/models/pickup/cancellation-details.js +6 -0
  77. package/lib/models/pickup/cancellation-details.js.map +1 -1
  78. package/lib/models/pickup/pickup-confirmation.js +6 -0
  79. package/lib/models/pickup/pickup-confirmation.js.map +1 -1
  80. package/lib/models/pickup/pickup-contact-details.js +10 -0
  81. package/lib/models/pickup/pickup-contact-details.js.map +1 -1
  82. package/lib/models/pickup/pickup-location-details.js +6 -0
  83. package/lib/models/pickup/pickup-location-details.js.map +1 -1
  84. package/lib/models/pickup/pickup-package.js +14 -0
  85. package/lib/models/pickup/pickup-package.js.map +1 -1
  86. package/lib/models/pickup/pickup-shipment-details.js +4 -0
  87. package/lib/models/pickup/pickup-shipment-details.js.map +1 -1
  88. package/lib/models/pickup/pickup-window.js +8 -0
  89. package/lib/models/pickup/pickup-window.js.map +1 -1
  90. package/lib/models/pickup/shipment-identifier.js +4 -0
  91. package/lib/models/pickup/shipment-identifier.js.map +1 -1
  92. package/lib/models/pickup/shipped-package.js +20 -0
  93. package/lib/models/pickup/shipped-package.js.map +1 -1
  94. package/lib/models/pickup/shipped-shipment.d.ts +0 -2
  95. package/lib/models/pickup/shipped-shipment.js +12 -0
  96. package/lib/models/pickup/shipped-shipment.js.map +1 -1
  97. package/lib/models/rates/rate.js +26 -0
  98. package/lib/models/rates/rate.js.map +1 -1
  99. package/lib/models/registration/credentials.js +4 -0
  100. package/lib/models/registration/credentials.js.map +1 -1
  101. package/lib/models/relay-points/opening-times.js +7 -0
  102. package/lib/models/relay-points/opening-times.js.map +1 -1
  103. package/lib/models/relay-points/relay-point-address.js +7 -0
  104. package/lib/models/relay-points/relay-point-address.js.map +1 -1
  105. package/lib/models/relay-points/relay-point-details.js +2 -0
  106. package/lib/models/relay-points/relay-point-details.js.map +1 -1
  107. package/lib/models/relay-points/relay-point.js +4 -0
  108. package/lib/models/relay-points/relay-point.js.map +1 -1
  109. package/lib/models/resource-download.js +4 -0
  110. package/lib/models/resource-download.js.map +1 -1
  111. package/lib/models/service-points/hours-of-operation.js +4 -0
  112. package/lib/models/service-points/hours-of-operation.js.map +1 -1
  113. package/lib/models/service-points/search-radius.js +8 -0
  114. package/lib/models/service-points/search-radius.js.map +1 -1
  115. package/lib/models/service-points/service-point-response-address.js +2 -0
  116. package/lib/models/service-points/service-point-response-address.js.map +1 -1
  117. package/lib/models/service-points/service-point.js +10 -0
  118. package/lib/models/service-points/service-point.js.map +1 -1
  119. package/lib/models/service-points/weekly-hours-of-operation.js +7 -0
  120. package/lib/models/service-points/weekly-hours-of-operation.js.map +1 -1
  121. package/lib/models/taxes/tax-identifier.js +10 -0
  122. package/lib/models/taxes/tax-identifier.js.map +1 -1
  123. package/lib/models/time-window.js +14 -0
  124. package/lib/models/time-window.js.map +1 -1
  125. package/lib/models/tracking/imported-tracking-event.js +12 -0
  126. package/lib/models/tracking/imported-tracking-event.js.map +1 -1
  127. package/lib/models/tracking/lat-long.js +4 -0
  128. package/lib/models/tracking/lat-long.js.map +1 -1
  129. package/lib/models/tracking/service.js +4 -0
  130. package/lib/models/tracking/service.js.map +1 -1
  131. package/lib/models/tracking/track-event.js +24 -0
  132. package/lib/models/tracking/track-event.js.map +1 -1
  133. package/lib/models/tracking/tracking-attribute.js +2 -0
  134. package/lib/models/tracking/tracking-attribute.js.map +1 -1
  135. package/lib/models/tracking/tracking-identifier.js +2 -0
  136. package/lib/models/tracking/tracking-identifier.js.map +1 -1
  137. package/lib/models/tracking/tracking-info.js +36 -0
  138. package/lib/models/tracking/tracking-info.js.map +1 -1
  139. package/lib/models/units/dimension-details.js +8 -0
  140. package/lib/models/units/dimension-details.js.map +1 -1
  141. package/lib/models/units/dimensions.js +3 -0
  142. package/lib/models/units/dimensions.js.map +1 -1
  143. package/lib/models/units/weight-details.js +8 -0
  144. package/lib/models/units/weight-details.js.map +1 -1
  145. package/lib/requests/base-request.js +3 -0
  146. package/lib/requests/base-request.js.map +1 -1
  147. package/lib/requests/cancel-notification-request.js +4 -0
  148. package/lib/requests/cancel-notification-request.js.map +1 -1
  149. package/lib/requests/cancel-pickup-request.js +7 -0
  150. package/lib/requests/cancel-pickup-request.js.map +1 -1
  151. package/lib/requests/create-label-request.js +35 -0
  152. package/lib/requests/create-label-request.js.map +1 -1
  153. package/lib/requests/create-manifest-request.js +6 -0
  154. package/lib/requests/create-manifest-request.js.map +1 -1
  155. package/lib/requests/create-notification-request.js +6 -0
  156. package/lib/requests/create-notification-request.js.map +1 -1
  157. package/lib/requests/get-manifest-request.js +10 -0
  158. package/lib/requests/get-manifest-request.js.map +1 -1
  159. package/lib/requests/get-rates-request.js +20 -0
  160. package/lib/requests/get-rates-request.js.map +1 -1
  161. package/lib/requests/get-relay-points-request.js +4 -0
  162. package/lib/requests/get-relay-points-request.js.map +1 -1
  163. package/lib/requests/get-service-point-request.js +4 -0
  164. package/lib/requests/get-service-point-request.js.map +1 -1
  165. package/lib/requests/get-service-points-request.js +8 -0
  166. package/lib/requests/get-service-points-request.js.map +1 -1
  167. package/lib/requests/register-request.js +1 -0
  168. package/lib/requests/register-request.js.map +1 -1
  169. package/lib/requests/schedule-pickup-request.js +4 -0
  170. package/lib/requests/schedule-pickup-request.js.map +1 -1
  171. package/lib/requests/tracking-request.js +4 -0
  172. package/lib/requests/tracking-request.js.map +1 -1
  173. package/lib/requests/void-labels-request.js +2 -0
  174. package/lib/requests/void-labels-request.js.map +1 -1
  175. package/lib/responses/base-response.js +1 -0
  176. package/lib/responses/base-response.js.map +1 -1
  177. package/lib/responses/cancel-notification-response.js +4 -0
  178. package/lib/responses/cancel-notification-response.js.map +1 -1
  179. package/lib/responses/cancel-pickup-response.js +4 -0
  180. package/lib/responses/cancel-pickup-response.js.map +1 -1
  181. package/lib/responses/create-label-response.js +17 -0
  182. package/lib/responses/create-label-response.js.map +1 -1
  183. package/lib/responses/create-manifest-response.js +8 -0
  184. package/lib/responses/create-manifest-response.js.map +1 -1
  185. package/lib/responses/create-notification-response.js +3 -0
  186. package/lib/responses/create-notification-response.js.map +1 -1
  187. package/lib/responses/error-response.js +1 -0
  188. package/lib/responses/error-response.js.map +1 -1
  189. package/lib/responses/get-rates-response.js +1 -0
  190. package/lib/responses/get-rates-response.js.map +1 -1
  191. package/lib/responses/get-relay-points-response.js +1 -0
  192. package/lib/responses/get-relay-points-response.js.map +1 -1
  193. package/lib/responses/get-service-point-response.js +2 -0
  194. package/lib/responses/get-service-point-response.js.map +1 -1
  195. package/lib/responses/get-service-points-response.js +2 -0
  196. package/lib/responses/get-service-points-response.js.map +1 -1
  197. package/lib/responses/normalize-tracking-data-response.js +7 -0
  198. package/lib/responses/normalize-tracking-data-response.js.map +1 -1
  199. package/lib/responses/register-response.js +2 -0
  200. package/lib/responses/register-response.js.map +1 -1
  201. package/lib/responses/schedule-pickup-response.js +5 -0
  202. package/lib/responses/schedule-pickup-response.js.map +1 -1
  203. package/lib/responses/tracking-response.js +1 -0
  204. package/lib/responses/tracking-response.js.map +1 -1
  205. package/lib/responses/validate-inbound-data-response.js +2 -0
  206. package/lib/responses/validate-inbound-data-response.js.map +1 -1
  207. package/lib/responses/void-labels-response.js +2 -0
  208. package/lib/responses/void-labels-response.js.map +1 -1
  209. package/package.json +3 -3
  210. package/src/app/carrier-app-definition.ts +1 -0
  211. package/src/models/pickup/shipped-shipment.ts +0 -2
  212. package/tsconfig.tsbuildinfo +1 -1
@@ -10,8 +10,8 @@ const buildAppDeployment = (definition) => {
10
10
  id: definition.Metadata.Id,
11
11
  getSupportedCountries: () => {
12
12
  const countries = [];
13
- const rootCountries = definition.Metadata.Carriers.flatMap((c) => { var _a; return (_a = c.DefaultSupportedCountries) === null || _a === void 0 ? void 0 : _a.flatMap((sc) => sc.FromCountry); });
14
- const serviceCountries = definition.Metadata.Carriers.flatMap((c) => { var _a; return (_a = c.ShippingServices) === null || _a === void 0 ? void 0 : _a.flatMap((s) => s.SupportedCountries).flatMap((sc) => sc === null || sc === void 0 ? void 0 : sc.FromCountry); });
13
+ const rootCountries = definition.Metadata.Carriers.flatMap((c) => c.DefaultSupportedCountries?.flatMap((sc) => sc.FromCountry));
14
+ const serviceCountries = definition.Metadata.Carriers.flatMap((c) => c.ShippingServices?.flatMap((s) => s.SupportedCountries).flatMap((sc) => sc?.FromCountry));
15
15
  countries.push(...rootCountries);
16
16
  countries.push(...serviceCountries);
17
17
  return [...new Set(countries)].filter((c) => c !== undefined);
@@ -32,7 +32,7 @@ const buildAppDeployment = (definition) => {
32
32
  .filter(native_rating_data_validator_1.isDataValidationError)
33
33
  .flat();
34
34
  if (validationErrors.length > 0) {
35
- return validationErrors.map((error) => { var _a; return `${error.message} \n Duplicate Keys: ${(_a = error.duplicateKeys) === null || _a === void 0 ? void 0 : _a.join(', ')}`; });
35
+ return validationErrors.map((error) => `${error.message} \n Duplicate Keys: ${error.duplicateKeys?.join(', ')}`);
36
36
  }
37
37
  },
38
38
  };
@@ -1 +1 @@
1
- {"version":3,"file":"build-app-deployment.js","sourceRoot":"","sources":["../../src/app/build-app-deployment.ts"],"names":[],"mappings":";;;AAAA,2BAAgC;AAEhC,yCAAsD;AACtD,iFAA2F;AAG3F,8DAA8D;AACvD,MAAM,kBAAkB,GAAG,CAAC,UAAgC,EAAiB,EAAE;IACpF,OAAO;QACL,EAAE,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC1B,qBAAqB,EAAE,GAAG,EAAE;YAC1B,MAAM,SAAS,GAA2B,EAAE,CAAC;YAC7C,MAAM,aAAa,GAAG,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,WAC/D,OAAA,MAAA,CAAC,CAAC,yBAAyB,0CAAE,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,CAAA,EAAA,CAC7D,CAAC;YACF,MAAM,gBAAgB,GAAG,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,C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 import type { Request } from 'express';
2
3
  import { RegisterRequest, CreateLabelRequest, VoidLabelsRequest, CreateManifestRequest, GetManifestRequest, SchedulePickupRequest, CancelPickupRequest, GetRatesRequest, TrackingRequest, CancelNotificationRequest, CreateNotificationRequest, ValidateInboundDataRequest, NormalizeTrackingDataRequest, GetRelayPointsRequest, GetServicePointsRequest, GetServicePointRequest, ImportTrackingEventsRequest } from '../requests';
3
4
  import { RegisterResponse, CreateLabelResponse, VoidLabelsResponse, CreateManifestResponse, SchedulePickupResponse, CancelPickupResponse, GetRatesResponse, TrackingResponse, CancelNotificationResponse, CreateNotificationResponse, ValidateInboundDataResponse, NormalizeTrackingDataResponse, GetRelayPointsResponse, GetServicePointsResponse, GetServicePointResponse } from '../responses';
4
5
  import { CarrierAppMetadata } from './metadata/carrier-app-metadata';
@@ -8,6 +8,9 @@ var AuthenticationType;
8
8
  AuthenticationType["OAuth"] = "oauth";
9
9
  })(AuthenticationType = exports.AuthenticationType || (exports.AuthenticationType = {}));
10
10
  class AuthIdentifier {
11
+ AuthenticationType;
12
+ Version;
13
+ IsSandbox;
11
14
  }
12
15
  exports.AuthIdentifier = AuthIdentifier;
13
16
  exports.AuthIdentifierSchema = joi_1.default.object({
@@ -1 +1 @@
1
- {"version":3,"file":"auth-identifier.js","sourceRoot":"","sources":["../../../src/app/metadata/auth-identifier.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AAEtB,IAAY,kBAEX;AAFD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;AACjB,CAAC,EAFW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAE7B;AAED,MAAa,cAAc;CAI1B;AAJD,wCAIC;AAEY,QAAA,oBAAoB,GAAG,aAAG,CAAC,MAAM,CAAC;IAC7C,kBAAkB,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;IAC1D,OAAO,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,aAAG,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC"}
1
+ {"version":3,"file":"auth-identifier.js","sourceRoot":"","sources":["../../../src/app/metadata/auth-identifier.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AAEtB,IAAY,kBAEX;AAFD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;AACjB,CAAC,EAFW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAE7B;AAED,MAAa,cAAc;IACzB,kBAAkB,CAAsB;IACxC,OAAO,CAAU;IACjB,SAAS,CAAW;CACrB;AAJD,wCAIC;AAEY,QAAA,oBAAoB,GAAG,aAAG,CAAC,MAAM,CAAC;IAC7C,kBAAkB,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;IAC1D,OAAO,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,aAAG,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC"}
@@ -7,6 +7,18 @@ const monoauth_1 = require("./monoauth");
7
7
  const joi_1 = tslib_1.__importDefault(require("joi"));
8
8
  /** @description Used to specify information about an integrations authentication */
9
9
  class AuthSpecification {
10
+ /** @description Identify the type of Auth being used by the integration */
11
+ Identifier;
12
+ /** @description Added to allow oauth 1.0 to work. */
13
+ access_token;
14
+ /** @description Authorization: the beginning of an OAuth2.0 flow that ensures the user is logged in and approves access to the Resource. */
15
+ authorization;
16
+ /** @description Request Token: server-server code for token exchange */
17
+ request_token;
18
+ /** @description Refresh Token: server-server refresh token exchange for access token **NOTE: sometimes a new RT is also created** */
19
+ refresh_token;
20
+ /** @description Advanced configurations used for oauth 1.0 */
21
+ advanced_configuration;
10
22
  }
11
23
  exports.AuthSpecification = AuthSpecification;
12
24
  exports.AuthSpecificationSchema = joi_1.default.object({
@@ -1 +1 @@
1
- {"version":3,"file":"auth-specification.js","sourceRoot":"","sources":["../../../src/app/metadata/auth-specification.ts"],"names":[],"mappings":";;;;AAAA,uDAAyE;AACzE,yCAWoB;AACpB,sDAAsB;AAEtB,oFAAoF;AACpF,MAAa,iBAAiB;CAa7B;AAbD,8CAaC;AAEY,QAAA,uBAAuB,GAAG,aAAG,CAAC,MAAM,CAAC;IAChD,UAAU,EAAE,sCAAoB;IAChC,YAAY,EAAE,4BAAiB,CAAC,QAAQ,EAAE;IAC1C,aAAa,EAAE,2CAAgC,CAAC,QAAQ,EAAE;IAC1D,aAAa,EAAE,0CAA+B,CAAC,QAAQ,EAAE;IACzD,aAAa,EAAE,0CAA+B,CAAC,QAAQ,EAAE;IACzD,sBAAsB,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,0BAAe,CAAC;CACtE,CAAC,CAAC"}
1
+ {"version":3,"file":"auth-specification.js","sourceRoot":"","sources":["../../../src/app/metadata/auth-specification.ts"],"names":[],"mappings":";;;;AAAA,uDAAyE;AACzE,yCAWoB;AACpB,sDAAsB;AAEtB,oFAAoF;AACpF,MAAa,iBAAiB;IAC5B,2EAA2E;IAC3E,UAAU,CAAkB;IAC5B,qDAAqD;IACrD,YAAY,CAAe;IAC3B,4IAA4I;IAC5I,aAAa,CAA8B;IAC3C,wEAAwE;IACxE,aAAa,CAA6B;IAC1C,qIAAqI;IACrI,aAAa,CAA6B;IAC1C,8DAA8D;IAC9D,sBAAsB,CAAe;CACtC;AAbD,8CAaC;AAEY,QAAA,uBAAuB,GAAG,aAAG,CAAC,MAAM,CAAC;IAChD,UAAU,EAAE,sCAAoB;IAChC,YAAY,EAAE,4BAAiB,CAAC,QAAQ,EAAE;IAC1C,aAAa,EAAE,2CAAgC,CAAC,QAAQ,EAAE;IAC1D,aAAa,EAAE,0CAA+B,CAAC,QAAQ,EAAE;IACzD,aAAa,EAAE,0CAA+B,CAAC,QAAQ,EAAE;IACzD,sBAAsB,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,0BAAe,CAAC;CACtE,CAAC,CAAC"}
@@ -4,6 +4,10 @@ exports.AuthorizationConfigurationSchema = exports.AuthorizationConfiguration =
4
4
  const tslib_1 = require("tslib");
5
5
  const joi_1 = tslib_1.__importDefault(require("joi"));
6
6
  class Parameter {
7
+ /** @description The name of the parameter */
8
+ name;
9
+ /** @description The value associated with the parameter */
10
+ value;
7
11
  }
8
12
  exports.Parameter = Parameter;
9
13
  exports.MethodSchema = joi_1.default.string().valid('GET', 'POST', 'DELETE', 'PUT', 'get', 'post', 'delete', 'put');
@@ -12,6 +16,11 @@ exports.ParameterSchema = joi_1.default.object({
12
16
  value: joi_1.default.string().required(),
13
17
  });
14
18
  class DateTimeConfiguration {
19
+ /** @description JSONPath to the JSON element containing the date-time */
20
+ path;
21
+ /** @description DateTime format string compliant with
22
+ * https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings */
23
+ date_time_format;
15
24
  }
16
25
  exports.DateTimeConfiguration = DateTimeConfiguration;
17
26
  exports.DateTimeConfigurationSchema = joi_1.default.object({
@@ -23,6 +32,26 @@ exports.DateTimeConfigurationSchema = joi_1.default.object({
23
32
  * Note for JSONPath: strings not starting with $ are interpreted as string literals
24
33
  */
25
34
  class ResponseTransformationConfiguration {
35
+ /** @description JSONPath to the JSON element for access_token. */
36
+ access_token;
37
+ /** @description JSONPath to the JSON element for token_type */
38
+ token_type;
39
+ /** @description JSONPath to the JSON element for refresh_token */
40
+ refresh_token;
41
+ /** @description JSONPath to the JSON element for expires_in. Mutually exclusive with expires_at */
42
+ expires_in;
43
+ /** @description Configuration for parsing a date-time, when the integration is lacking expires_in.
44
+ * Mutually exclusive with expires_in.
45
+ */
46
+ expires_at;
47
+ /** @description Optional collection of properties to include in the connection_context sent back with the auth flow result.
48
+ * Property value may be JSONPath or a string literal.
49
+ * E.g.
50
+ * "connection_context": {
51
+ * "account_number": "$.data.account_number"
52
+ * }
53
+ */
54
+ connection_context;
26
55
  }
27
56
  exports.ResponseTransformationConfiguration = ResponseTransformationConfiguration;
28
57
  exports.MapOfStringsSchema = joi_1.default.object().pattern(joi_1.default.string(), joi_1.default.string());
@@ -35,12 +64,26 @@ exports.ResponseTransformationConfigurationSchema = joi_1.default.object({
35
64
  connection_context: exports.MapOfStringsSchema.optional(),
36
65
  });
37
66
  class AccessToken {
67
+ /** @description OAuth1 only. The url to obtain the temporary Access (aka Request) Token to start a flow **/
68
+ url_template;
38
69
  }
39
70
  exports.AccessToken = AccessToken;
40
71
  exports.AccessTokenSchema = joi_1.default.object({
41
72
  url_template: joi_1.default.string().required(),
42
73
  });
43
74
  class RequestTokenConfiguration {
75
+ /** @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" */
76
+ url_template;
77
+ /** @description A list of query parameters that will be attached to the url */
78
+ query_parameters;
79
+ /** @description Method to use when making the server-server code for token request @example "GET", "POST" */
80
+ method;
81
+ /** @description List of parameters that are sent to the integration when exchanging the code for the token. These are built using ContentType */
82
+ body;
83
+ /** @description List of headers that are sent to the integration when requesting a token */
84
+ headers;
85
+ /** @description Response payload parsing */
86
+ response;
44
87
  }
45
88
  exports.RequestTokenConfiguration = RequestTokenConfiguration;
46
89
  exports.RequestTokenConfigurationSchema = joi_1.default.object({
@@ -52,6 +95,18 @@ exports.RequestTokenConfigurationSchema = joi_1.default.object({
52
95
  response: exports.ResponseTransformationConfigurationSchema.optional(),
53
96
  });
54
97
  class RefreshTokenConfiguration {
98
+ /** @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" */
99
+ url_template;
100
+ /** @description A list of query parameters that will be attached to the url */
101
+ query_parameters;
102
+ /** @description Method to use when making the server-server code for token request @example "GET", "POST" */
103
+ method;
104
+ /** @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. */
105
+ body;
106
+ /** @description List of headers that are sent to the integration when refreshing a token */
107
+ headers;
108
+ /** @description Response payload parsing */
109
+ response;
55
110
  }
56
111
  exports.RefreshTokenConfiguration = RefreshTokenConfiguration;
57
112
  exports.RefreshTokenConfigurationSchema = joi_1.default.object({
@@ -63,12 +118,25 @@ exports.RefreshTokenConfigurationSchema = joi_1.default.object({
63
118
  response: exports.ResponseTransformationConfigurationSchema.optional(),
64
119
  });
65
120
  class NonceConfiguration {
121
+ name;
66
122
  }
67
123
  exports.NonceConfiguration = NonceConfiguration;
68
124
  exports.NonceConfigurationSchema = joi_1.default.object({
69
125
  name: joi_1.default.string().required(),
70
126
  });
71
127
  class AuthorizationConfiguration {
128
+ /** @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" */
129
+ url_template;
130
+ /** @description A list of query parameters that will be attached to the url */
131
+ query_parameters;
132
+ /** @description Method to use when making the server-server code for token request @example "GET", "POST" */
133
+ method;
134
+ /** @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. */
135
+ body;
136
+ /** @description List of headers that are sent to the integration when authorizing a token */
137
+ headers;
138
+ /** @description A nonce query parameter included on the accept request, then returned and validated on the redirect request */
139
+ nonce;
72
140
  }
73
141
  exports.AuthorizationConfiguration = AuthorizationConfiguration;
74
142
  exports.AuthorizationConfigurationSchema = joi_1.default.object({
@@ -1 +1 @@
1
- {"version":3,"file":"monoauth.js","sourceRoot":"","sources":["../../../src/app/metadata/monoauth.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AAEtB,MAAa,SAAS;CAKrB;AALD,8BAKC;AAEY,QAAA,YAAY,GAAG,aAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAC5C,KAAK,EACL,MAAM,EACN,QAAQ,EACR,KAAK,EACL,KAAK,EACL,MAAM,EACN,QAAQ,EACR,KAAK,CACN,CAAC;AAEW,QAAA,eAAe,GAAG,aA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ileSync)(dataFilePath);
24
24
  const json = JSON.parse(dataBuffer.toString());
25
- const data = (json === null || json === void 0 ? void 0 : json[dataType]) || [];
25
+ const data = json?.[dataType] || [];
26
26
  const duplicates = getDuplicateKeys(data);
27
27
  if (duplicates) {
28
28
  return {
@@ -35,13 +35,12 @@ const validate = (dataFilePath, dataType) => {
35
35
  const isDataValidationError = (errors) => errors !== undefined;
36
36
  exports.isDataValidationError = isDataValidationError;
37
37
  const validateRatingData = (carrier) => {
38
- var _a, _b, _c, _d;
39
38
  let errors = [];
40
- let basePath = (_b = (_a = carrier.NativeRating) === null || _a === void 0 ? void 0 : _a.Path) !== null && _b !== void 0 ? _b : '';
39
+ let basePath = carrier.NativeRating?.Path ?? '';
41
40
  let error = validate((0, path_1.resolve)(basePath, 'zones.json'), 'zones');
42
41
  if (error)
43
42
  errors.push(error);
44
- (_d = (_c = carrier.NativeRating) === null || _c === void 0 ? void 0 : _c.RateCards) === null || _d === void 0 ? void 0 : _d.forEach((rateCard) => {
43
+ carrier.NativeRating?.RateCards?.forEach((rateCard) => {
45
44
  error = validate((0, path_1.resolve)(basePath, rateCard.Id, 'rates.json'), 'rates');
46
45
  if (error)
47
46
  errors.push(error);
@@ -1 +1 @@
1
- {"version":3,"file":"native-rating-data-validator.js","sourceRoot":"","sources":["../../src/app/native-rating-data-validator.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,2BAA8C;AAQ9C,MAAM,gBAAgB,GAAG,CAAC,SAA4B,EAAwB,EAAE;IAC9E,IAAI,IAAI,GAAa,EAAE,CAAC;IACxB,IAAI,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACvC,SAAS,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;QAC9B,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;YACpB,IAAI,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE;gBAClC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC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,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QACpD,KAAK,GAAG,QAAQ,CAAC,IAAA,cAAO,EAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC;QACxE,IAAI,KAAK;YAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9B,KAAK,GAAG,QAAQ,CAAC,IAAA,cAAO,EAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,EAAE,gBAAgB,CAAC,EAAE,WAAW,CAAC,CAAC;QAChF,IAAI,KAAK;YAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AAChD,CAAC,CAAC;AAfW,QAAA,kBAAkB,sBAe7B"}
@@ -2,6 +2,36 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AddressBase = void 0;
4
4
  class AddressBase {
5
+ /** @description The full name of the contact contact associated with the address */
6
+ name;
7
+ /** @description The first name of the contact associated with the address */
8
+ first_name;
9
+ /** @description The last name of the contact associated with the address */
10
+ last_name;
11
+ /** @description The email of the contact associated with the address */
12
+ email;
13
+ /** @description The phone number of the contact associated with the address (No Newline Characters) */
14
+ phone_number;
15
+ /** @description The name of the company associated with this address (No Newline Characters) max length 100 characters */
16
+ company_name;
17
+ /** @description The address lines of the address (No Newline Characters) max length 100 characters */
18
+ address_lines;
19
+ /** @description City or locality (No Newline Characters) */
20
+ city_locality;
21
+ /** @description State or province (No Newline Characters) */
22
+ state_province;
23
+ /** @description Zip or postal code (No Newline Characters) */
24
+ postal_code;
25
+ /** @description ISO 3166-1 two-letter country code max length 2 characters */
26
+ country_code;
27
+ /** @description Whether the address is residential or commercial */
28
+ address_residential_indicator;
29
+ /** @description Whether the country of the shipment address is a member of the EU */
30
+ is_eu;
31
+ /** @description Additional metadata provided for specific requests */
32
+ address_metadata;
33
+ /** @description Instructions to help the carrier navigate to the address */
34
+ instructions;
5
35
  }
6
36
  exports.AddressBase = AddressBase;
7
37
  //# sourceMappingURL=address-base.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"address-base.js","sourceRoot":"","sources":["../../../src/models/addresses/address-base.ts"],"names":[],"mappings":";;;AAEA,MAAa,WAAW;CA+BvB;AA/BD,kCA+BC"}
1
+ {"version":3,"file":"address-base.js","sourceRoot":"","sources":["../../../src/models/addresses/address-base.ts"],"names":[],"mappings":";;;AAEA,MAAa,WAAW;IACtB,oFAAoF;IACpF,IAAI,CAAU;IACd,6EAA6E;IAC7E,UAAU,CAAU;IACpB,4EAA4E;IAC5E,SAAS,CAAU;IACnB,wEAAwE;IACxE,KAAK,CAAU;IACf,uGAAuG;IACvG,YAAY,CAAU;IACtB,0HAA0H;IAC1H,YAAY,CAAU;IACtB,sGAAsG;IACtG,aAAa,CAAY;IACzB,4DAA4D;IAC5D,aAAa,CAAU;IACvB,6DAA6D;IAC7D,cAAc,CAAU;IACxB,8DAA8D;IAC9D,WAAW,CAAU;IACrB,+EAA+E;IAC/E,YAAY,CAAU;IACtB,oEAAoE;IACpE,6BAA6B,CAA+B;IAC5D,qFAAqF;IACrF,KAAK,CAAW;IAChB,sEAAsE;IACtE,gBAAgB,CAA6B;IAC7C,4EAA4E;IAC5E,YAAY,CAAU;CACvB;AA/BD,kCA+BC"}
@@ -4,6 +4,10 @@ exports.PudoLocation = void 0;
4
4
  const address_base_1 = require("./address-base");
5
5
  /** @description Pickup/Dropoff location used by carriers */
6
6
  class PudoLocation extends address_base_1.AddressBase {
7
+ /** @description Standardized carrier code the location id belongs to */
8
+ carrier_code;
9
+ /** @description Location id needed to look up the location */
10
+ location_id;
7
11
  }
8
12
  exports.PudoLocation = PudoLocation;
9
13
  //# sourceMappingURL=pudo-location.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pudo-location.js","sourceRoot":"","sources":["../../../src/models/addresses/pudo-location.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAE7C,4DAA4D;AAC5D,MAAa,YAAa,SAAQ,0BAAW;CAK5C;AALD,oCAKC"}
1
+ {"version":3,"file":"pudo-location.js","sourceRoot":"","sources":["../../../src/models/addresses/pudo-location.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAE7C,4DAA4D;AAC5D,MAAa,YAAa,SAAQ,0BAAW;IAC3C,wEAAwE;IACxE,YAAY,CAAU;IACtB,8DAA8D;IAC9D,WAAW,CAAU;CACtB;AALD,oCAKC"}
@@ -4,6 +4,8 @@ exports.ServicePointAddress = void 0;
4
4
  const address_base_1 = require("./address-base");
5
5
  /** @description The basic address type related to service points */
6
6
  class ServicePointAddress extends address_base_1.AddressBase {
7
+ /** @description Geographical location */
8
+ geo;
7
9
  }
8
10
  exports.ServicePointAddress = ServicePointAddress;
9
11
  //# sourceMappingURL=service-point-address.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"service-point-address.js","sourceRoot":"","sources":["../../../src/models/addresses/service-point-address.ts"],"names":[],"mappings":";;;AACA,iDAA6C;AAE7C,oEAAoE;AACpE,MAAa,mBAAoB,SAAQ,0BAAW;CAGnD;AAHD,kDAGC"}
1
+ {"version":3,"file":"service-point-address.js","sourceRoot":"","sources":["../../../src/models/addresses/service-point-address.ts"],"names":[],"mappings":";;;AACA,iDAA6C;AAE7C,oEAAoE;AACpE,MAAa,mBAAoB,SAAQ,0BAAW;IAClD,yCAAyC;IACzC,GAAG,CAAW;CACf;AAHD,kDAGC"}
@@ -4,6 +4,8 @@ exports.ShipFrom = void 0;
4
4
  const address_base_1 = require("./address-base");
5
5
  /** @description The address for where the shipment will be shipped from */
6
6
  class ShipFrom extends address_base_1.AddressBase {
7
+ /** @description Tax IDs associated with the exporter */
8
+ tax_identifiers;
7
9
  }
8
10
  exports.ShipFrom = ShipFrom;
9
11
  //# sourceMappingURL=ship-from.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ship-from.js","sourceRoot":"","sources":["../../../src/models/addresses/ship-from.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAG7C,2EAA2E;AAC3E,MAAa,QAAS,SAAQ,0BAAW;CAGxC;AAHD,4BAGC"}
1
+ {"version":3,"file":"ship-from.js","sourceRoot":"","sources":["../../../src/models/addresses/ship-from.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAG7C,2EAA2E;AAC3E,MAAa,QAAS,SAAQ,0BAAW;IACvC,wDAAwD;IACxD,eAAe,CAAmB;CACnC;AAHD,4BAGC"}
@@ -4,6 +4,8 @@ exports.ShipTo = void 0;
4
4
  const address_base_1 = require("./address-base");
5
5
  /** @description The address that a shipment will be delivered to */
6
6
  class ShipTo extends address_base_1.AddressBase {
7
+ /** @description Tax IDs associated with the consignee */
8
+ tax_identifiers;
7
9
  }
8
10
  exports.ShipTo = ShipTo;
9
11
  //# 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;CAGtC;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;CACnC;AAHD,wBAGC"}
@@ -3,6 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AdvancedOptions = void 0;
4
4
  /** @description Basic structure for shipping options */
5
5
  class AdvancedOptions {
6
+ /** @description Whether the shipment contains alcohol */
7
+ contains_alcohol;
8
+ /** @description Whether the shipment does not require postage */
9
+ no_postage;
10
+ /** @description Whether the shipment can be processed by machine */
11
+ nonmachineable;
12
+ /** @description Whether the shipment duties should be billed to the sender */
13
+ bill_duties_to_sender;
14
+ /** @description Whether Saturday delivery is permissible */
15
+ saturday_delivery;
16
+ /** @description Amount to be paid to the driver, used for local delivery and courier services */
17
+ tip;
18
+ /** @description Describes whether Additional Handling is requested for the shipment */
19
+ additional_handling;
20
+ /** @description Describes details for Collect on Delivery (COD) if requested for the shipment */
21
+ collect_on_delivery;
6
22
  }
7
23
  exports.AdvancedOptions = AdvancedOptions;
8
24
  //# sourceMappingURL=advanced-options.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"advanced-options.js","sourceRoot":"","sources":["../../src/models/advanced-options.ts"],"names":[],"mappings":";;;AAGA,wDAAwD;AACxD,MAAa,eAAe;CAmB3B;AAnBD,0CAmBC"}
1
+ {"version":3,"file":"advanced-options.js","sourceRoot":"","sources":["../../src/models/advanced-options.ts"],"names":[],"mappings":";;;AAGA,wDAAwD;AACxD,MAAa,eAAe;IAC1B,yDAAyD;IACzD,gBAAgB,CAAW;IAC3B,iEAAiE;IACjE,UAAU,CAAW;IACrB,oEAAoE;IACpE,cAAc,CAAW;IACzB,8EAA8E;IAC9E,qBAAqB,CAAW;IAChC,6DAA6D;IAC7D,iBAAiB,CAAW;IAC5B,iGAAiG;IACjG,GAAG,CAAY;IACf,wFAAwF;IACxF,mBAAmB,CAAW;IAC9B,iGAAiG;IACjG,mBAAmB,CAAqB;CAGzC;AAnBD,0CAmBC"}
@@ -2,6 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Authorization = void 0;
4
4
  class Authorization {
5
+ /** @description The access token used to authorize the request */
6
+ access_token;
7
+ /** @description Optional - any additional information required to authorize the request */
8
+ connection_context;
5
9
  }
6
10
  exports.Authorization = Authorization;
7
11
  //# sourceMappingURL=authorization.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"authorization.js","sourceRoot":"","sources":["../../src/models/authorization.ts"],"names":[],"mappings":";;;AAAA,MAAa,aAAa;CAKzB;AALD,sCAKC"}
1
+ {"version":3,"file":"authorization.js","sourceRoot":"","sources":["../../src/models/authorization.ts"],"names":[],"mappings":";;;AAAA,MAAa,aAAa;IACxB,kEAAkE;IAClE,YAAY,CAAU;IACtB,2FAA2F;IAC3F,kBAAkB,CAAO;CAC1B;AALD,sCAKC"}
@@ -9,6 +9,10 @@ const addresses_1 = require("./addresses");
9
9
  another account. Additionally, this allows for a contact to be specified, if necessary.
10
10
  */
11
11
  class BillTo extends addresses_1.AddressBase {
12
+ /** @description The bill_to_party mentions the type of billing option*/
13
+ bill_to_party;
14
+ /** @description Specified if there is an account number associated with the Bill To Party, and the Bill To Party is not the account holder. */
15
+ account_number;
12
16
  }
13
17
  exports.BillTo = BillTo;
14
18
  //# sourceMappingURL=bill-to.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bill-to.js","sourceRoot":"","sources":["../../src/models/bill-to.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAG1C;;;;;GAKG;AACH,MAAa,MAAO,SAAQ,uBAAW;CAKtC;AALD,wBAKC"}
1
+ {"version":3,"file":"bill-to.js","sourceRoot":"","sources":["../../src/models/bill-to.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAG1C;;;;;GAKG;AACH,MAAa,MAAO,SAAQ,uBAAW;IACrC,wEAAwE;IACxE,aAAa,CAAe;IAC5B,+IAA+I;IAC/I,cAAc,CAAU;CACzB;AALD,wBAKC"}
@@ -3,6 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BillingLineItem = void 0;
4
4
  /** @description Basic structure of each charge or line item */
5
5
  class BillingLineItem {
6
+ /** A generalized category for what type of billing line item this is */
7
+ billing_category;
8
+ /** @description If the carrier provides a description from their API about the billing charge (not specific to the user). Maximum length of 100 characters. */
9
+ carrier_description;
10
+ /** @description If the carrier provides a billing code for */
11
+ carrier_billing_code;
12
+ /** @description This will often be empty; however, if there was additionally specific information about the charge it should go here, could also be a reference number. Maximum length of 250 characters. */
13
+ memo;
14
+ /** @description Total amount of the line item displayed and charged to the buyer */
15
+ amount;
16
+ /** @description Total amount of the line item billed by the provider. This should only be populated if it differs from 'amount' **/
17
+ provider_billed_amount;
6
18
  }
7
19
  exports.BillingLineItem = BillingLineItem;
8
20
  //# 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;CAa3B;AAbD,0CAaC"}
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;IAC1B,wEAAwE;IACxE,gBAAgB,CAAqB;IACrC,+JAA+J;IAC/J,mBAAmB,CAAU;IAC7B,8DAA8D;IAC9D,oBAAoB,CAAU;IAC9B,6MAA6M;IAC7M,IAAI,CAAU;IACd,oFAAoF;IACpF,MAAM,CAAY;IAClB,oIAAoI;IACpI,sBAAsB,CAAY;CACnC;AAbD,0CAaC"}
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CollectOnDelivery = void 0;
4
4
  /** @description This model represents the option to defer payment for a shipment, otherwise known as Collect on Delivery (COD) */
5
5
  class CollectOnDelivery {
6
+ /** @description The payment amount for Collect on Delivery (COD) */
7
+ payment_amount;
8
+ /** @description The payment method permitted for Collect on Delivery (COD) */
9
+ payment_type;
6
10
  }
7
11
  exports.CollectOnDelivery = CollectOnDelivery;
8
12
  //# sourceMappingURL=collect-on-delivery.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collect-on-delivery.js","sourceRoot":"","sources":["../../src/models/collect-on-delivery.ts"],"names":[],"mappings":";;;AAGA,kIAAkI;AAClI,MAAa,iBAAiB;CAK7B;AALD,8CAKC"}
1
+ {"version":3,"file":"collect-on-delivery.js","sourceRoot":"","sources":["../../src/models/collect-on-delivery.ts"],"names":[],"mappings":";;;AAGA,kIAAkI;AAClI,MAAa,iBAAiB;IAC5B,oEAAoE;IACpE,cAAc,CAAY;IAC1B,8EAA8E;IAC9E,YAAY,CAAkB;CAC/B;AALD,8CAKC"}
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Currency = void 0;
4
4
  /** @description Basic structure for defining an amount of money and its currency */
5
5
  class Currency {
6
+ /** @description The ISO 4217 Currency Code (USD, EUR, etc) https://www.iso.org/iso-4217-currency-codes.html */
7
+ currency;
8
+ /** @description The amount */
9
+ amount;
6
10
  }
7
11
  exports.Currency = Currency;
8
12
  //# 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;CAKpB;AALD,4BAKC"}
1
+ {"version":3,"file":"currency.js","sourceRoot":"","sources":["../../src/models/currency.ts"],"names":[],"mappings":";;;AAAA,oFAAoF;AACpF,MAAa,QAAQ;IACnB,+GAA+G;IAC/G,QAAQ,CAAU;IAClB,8BAA8B;IAC9B,MAAM,CAAU;CACjB;AALD,4BAKC"}
@@ -3,6 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CustomsCharges = void 0;
4
4
  /** @description This model represents the charges related with customs. */
5
5
  class CustomsCharges {
6
+ /** @description Freight charge for international shipments. */
7
+ freight_charge;
8
+ /** @description Other charge for international shipments. */
9
+ other_charge;
10
+ /** @description : Description for other charge for international shipments.*/
11
+ other_charge_description;
12
+ /** @description Insurance charge for international shipments. */
13
+ insurance_charge;
14
+ /** @description Discount for international shipments. */
15
+ discount;
6
16
  }
7
17
  exports.CustomsCharges = CustomsCharges;
8
18
  //# sourceMappingURL=customs-charges.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"customs-charges.js","sourceRoot":"","sources":["../../../src/models/customs/customs-charges.ts"],"names":[],"mappings":";;;AAEA,2EAA2E;AAC3E,MAAa,cAAc;CAW1B;AAXD,wCAWC"}
1
+ {"version":3,"file":"customs-charges.js","sourceRoot":"","sources":["../../../src/models/customs/customs-charges.ts"],"names":[],"mappings":";;;AAEA,2EAA2E;AAC3E,MAAa,cAAc;IACzB,+DAA+D;IAC/D,cAAc,CAAY;IAC1B,6DAA6D;IAC7D,YAAY,CAAY;IACxB,8EAA8E;IAC9E,wBAAwB,CAAU;IAClC,iEAAiE;IACjE,gBAAgB,CAAY;IAC5B,yDAAyD;IACzD,QAAQ,CAAY;CACrB;AAXD,wCAWC"}
@@ -3,6 +3,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CustomsItem = void 0;
4
4
  /** @description This model represents the customs declaration for a single item */
5
5
  class CustomsItem {
6
+ /** @description A user specified free form string describing this customs item. If the field is absent the user has not specified a description */
7
+ description;
8
+ /** @description The user specified count of items in this declaration. This value should be 1 or greater */
9
+ quantity;
10
+ /** @description The user specified declared customs value of this customs item. Generally, this value needs to be greater than 0 to be accepted through customs */
11
+ value;
12
+ /** @description The user specified declared country of origin of this customs item */
13
+ country_of_origin;
14
+ /** @description The user specified Harmonized Tariff Code. See https://hts.usitc.gov/ for more information */
15
+ harmonized_tariff_code;
16
+ /** @description The user specified SKU of this customs item. This field is completely free form. */
17
+ sku;
18
+ /** @description The user specified SKU description of this customs item. This field is completely free form. */
19
+ sku_description;
20
+ /** @description Detailed information about the weight of this item */
21
+ item_weight;
22
+ /** @description A link to the item being shipped on the seller's website, used by customs officials to visually compare the item in the package to the available photo on the website. */
23
+ product_url;
24
+ /** @description The VAT rate applicable to the item being shipped, expressed as a decimal value between 0 and 1. */
25
+ vat_rate;
26
+ /** @description The Manufacturer Identification Code (MID). It is ussed as an alternative to the full name and address of a manufacturer, shipper or exporter and is always required for U.S. formal customs entries. */
27
+ mid_code;
6
28
  }
7
29
  exports.CustomsItem = CustomsItem;
8
30
  //# sourceMappingURL=customs-item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"customs-item.js","sourceRoot":"","sources":["../../../src/models/customs/customs-item.ts"],"names":[],"mappings":";;;AAGA,mFAAmF;AACnF,MAAa,WAAW;CAuBvB;AAvBD,kCAuBC"}
1
+ {"version":3,"file":"customs-item.js","sourceRoot":"","sources":["../../../src/models/customs/customs-item.ts"],"names":[],"mappings":";;;AAGA,mFAAmF;AACnF,MAAa,WAAW;IACtB,mJAAmJ;IACnJ,WAAW,CAAU;IACrB,4GAA4G;IAC5G,QAAQ,CAAU;IAClB,mKAAmK;IACnK,KAAK,CAAY;IACjB,sFAAsF;IACtF,iBAAiB,CAAU;IAC3B,8GAA8G;IAC9G,sBAAsB,CAAU;IAChC,oGAAoG;IACpG,GAAG,CAAU;IACb,gHAAgH;IAChH,eAAe,CAAU;IACzB,sEAAsE;IACtE,WAAW,CAAiB;IAC5B,0LAA0L;IAC1L,WAAW,CAAU;IACrB,oHAAoH;IACpH,QAAQ,CAAU;IAClB,yNAAyN;IACzN,QAAQ,CAAU;CACnB;AAvBD,kCAuBC"}
@@ -3,6 +3,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Customs = void 0;
4
4
  /** @description Basic structure for a customs declaration */
5
5
  class Customs {
6
+ /** @description Indicates the type of contents associated with this shipment */
7
+ contents;
8
+ /** @description Indicates what the seller would like done in case of an issue with delivery */
9
+ non_delivery;
10
+ /** @description A list of customs items to declare */
11
+ customs_items;
12
+ /** @description Indicates how much the buyer paid for shipping, if any. This amount may be different than the shipping cost billed to the shipper. */
13
+ buyer_shipping_amount_paid;
14
+ /** @description The amount of duties paid by the shipper, if any. This is generally only necessary for DDP (bill_duties_to_sender) shipments. */
15
+ duties_paid;
16
+ /** @description Declaration statement to be placed on the commercial invoice */
17
+ declaration;
18
+ /** @description Incoterms specify who is responsible for paying for and managing the shipment*/
19
+ terms_of_trade_code;
20
+ /** @description The owner or purchaser of the products being imported into a destination country.*/
21
+ importer_of_record;
22
+ /** @description The charges related with customs.*/
23
+ invoice_additional_details;
24
+ /**@description: text explanation for the content */
25
+ contents_explanation;
6
26
  }
7
27
  exports.Customs = Customs;
8
28
  //# sourceMappingURL=customs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"customs.js","sourceRoot":"","sources":["../../../src/models/customs/customs.ts"],"names":[],"mappings":";;;AAQA,6DAA6D;AAC7D,MAAa,OAAO;CAqBnB;AArBD,0BAqBC"}
1
+ {"version":3,"file":"customs.js","sourceRoot":"","sources":["../../../src/models/customs/customs.ts"],"names":[],"mappings":";;;AAQA,6DAA6D;AAC7D,MAAa,OAAO;IAClB,gFAAgF;IAChF,QAAQ,CAAuB;IAC/B,+FAA+F;IAC/F,YAAY,CAAsB;IAClC,sDAAsD;IACtD,aAAa,CAAiB;IAC9B,sJAAsJ;IACtJ,0BAA0B,CAAY;IACtC,iJAAiJ;IACjJ,WAAW,CAAY;IACvB,gFAAgF;IAChF,WAAW,CAAU;IACrB,iGAAiG;IACjG,mBAAmB,CAAoB;IACvC,oGAAoG;IACpG,kBAAkB,CAAoB;IACtC,oDAAoD;IACpD,0BAA0B,CAAkB;IAC5C,sDAAsD;IACtD,oBAAoB,CAAU;CAC/B;AArBD,0BAqBC"}
@@ -3,6 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Document = void 0;
4
4
  /** @description Basic structure for a document */
5
5
  class Document {
6
+ /** @description The document type(s) being returned. In most cases this is just a single document type; however, some carriers return multiple document types in the same PDF or ZPL */
7
+ type;
8
+ /** @description Base64 encoded data for the document */
9
+ data;
10
+ /** @description The format the document is in (Pdf, Zpl, etc) */
11
+ format;
6
12
  }
7
13
  exports.Document = Document;
8
14
  //# 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;CAOpB;AAPD,4BAOC"}
1
+ {"version":3,"file":"document.js","sourceRoot":"","sources":["../../../src/models/documents/document.ts"],"names":[],"mappings":";;;AAGA,kDAAkD;AAClD,MAAa,QAAQ;IACnB,wLAAwL;IACxL,IAAI,CAAkB;IACtB,wDAAwD;IACxD,IAAI,CAAU;IACd,iEAAiE;IACjE,MAAM,CAAkB;CACzB;AAPD,4BAOC"}