@shipengine/connect-carrier-api 2.1.19 → 2.1.23

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 (232) hide show
  1. package/lib/app/carrier-app-definition.d.ts +12 -2
  2. package/lib/app/carrier-app.js +79 -53
  3. package/lib/app/carrier-app.js.map +1 -1
  4. package/lib/app/constants.d.ts +14 -0
  5. package/lib/app/constants.js +19 -0
  6. package/lib/app/constants.js.map +1 -0
  7. package/lib/app/internal/{carrier-app-specificaion.d.ts → carrier-app-specification.d.ts} +4 -1
  8. package/lib/app/internal/{carrier-app-specificaion.js → carrier-app-specification.js} +1 -1
  9. package/lib/app/internal/carrier-app-specification.js.map +1 -0
  10. package/lib/app/internal/{carrier-specificaion.d.ts → carrier-specification.d.ts} +0 -0
  11. package/lib/app/internal/{carrier-specificaion.js → carrier-specification.js} +1 -1
  12. package/lib/app/internal/carrier-specification.js.map +1 -0
  13. package/lib/app/internal/metadata.d.ts +4 -2
  14. package/lib/app/internal/metadata.js +6 -2
  15. package/lib/app/internal/metadata.js.map +1 -1
  16. package/lib/app/internal/route.d.ts +1 -0
  17. package/lib/app/metadata/auth-identifier.d.ts +10 -0
  18. package/lib/app/metadata/auth-identifier.js +18 -0
  19. package/lib/app/metadata/auth-identifier.js.map +1 -0
  20. package/lib/app/metadata/auth-specification.d.ts +19 -0
  21. package/lib/app/metadata/auth-specification.js +20 -0
  22. package/lib/app/metadata/auth-specification.js.map +1 -0
  23. package/lib/app/metadata/carrier-app-metadata.d.ts +3 -1
  24. package/lib/app/metadata/carrier-app-metadata.js +3 -2
  25. package/lib/app/metadata/carrier-app-metadata.js.map +1 -1
  26. package/lib/app/metadata/index.d.ts +4 -1
  27. package/lib/app/metadata/index.js +4 -1
  28. package/lib/app/metadata/index.js.map +1 -1
  29. package/lib/app/metadata/monoauth.d.ts +102 -0
  30. package/lib/app/metadata/monoauth.js +82 -0
  31. package/lib/app/metadata/monoauth.js.map +1 -0
  32. package/lib/models/billing/billing-categories.d.ts +2 -0
  33. package/lib/models/billing/billing-categories.js +4 -1
  34. package/lib/models/billing/billing-categories.js.map +1 -1
  35. package/lib/models/billing/billing-line-item.d.ts +2 -0
  36. package/lib/models/billing/billing-line-item.js +12 -1
  37. package/lib/models/billing/billing-line-item.js.map +1 -1
  38. package/lib/models/currency.d.ts +2 -0
  39. package/lib/models/currency.js +7 -1
  40. package/lib/models/currency.js.map +1 -1
  41. package/lib/models/documents/document-type.d.ts +2 -0
  42. package/lib/models/documents/document-type.js +4 -1
  43. package/lib/models/documents/document-type.js.map +1 -1
  44. package/lib/models/documents/document.d.ts +2 -0
  45. package/lib/models/documents/document.js +10 -1
  46. package/lib/models/documents/document.js.map +1 -1
  47. package/lib/models/identifier.d.ts +2 -0
  48. package/lib/models/identifier.js +7 -1
  49. package/lib/models/identifier.js.map +1 -1
  50. package/lib/models/inbound-content-types.d.ts +7 -0
  51. package/lib/models/inbound-content-types.js +13 -0
  52. package/lib/models/inbound-content-types.js.map +1 -0
  53. package/lib/models/index.d.ts +1 -0
  54. package/lib/models/index.js +1 -0
  55. package/lib/models/index.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 +5 -0
  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/index.d.ts +1 -0
  96. package/lib/models/tracking/index.js +1 -0
  97. package/lib/models/tracking/index.js.map +1 -1
  98. package/lib/models/tracking/lat-long.d.ts +2 -0
  99. package/lib/models/tracking/lat-long.js +7 -1
  100. package/lib/models/tracking/lat-long.js.map +1 -1
  101. package/lib/models/tracking/service.d.ts +2 -0
  102. package/lib/models/tracking/service.js +7 -1
  103. package/lib/models/tracking/service.js.map +1 -1
  104. package/lib/models/tracking/standardized-status-codes.d.ts +2 -0
  105. package/lib/models/tracking/standardized-status-codes.js +4 -1
  106. package/lib/models/tracking/standardized-status-codes.js.map +1 -1
  107. package/lib/models/tracking/track-event.d.ts +2 -0
  108. package/lib/models/tracking/track-event.js +18 -1
  109. package/lib/models/tracking/track-event.js.map +1 -1
  110. package/lib/models/tracking/tracking-info.d.ts +2 -0
  111. package/lib/models/tracking/tracking-info.js +27 -1
  112. package/lib/models/tracking/tracking-info.js.map +1 -1
  113. package/lib/models/tracking/update-method.d.ts +9 -0
  114. package/lib/models/tracking/update-method.js +15 -0
  115. package/lib/models/tracking/update-method.js.map +1 -0
  116. package/lib/models/units/dimensions.d.ts +2 -0
  117. package/lib/models/units/dimensions.js +8 -1
  118. package/lib/models/units/dimensions.js.map +1 -1
  119. package/lib/requests/index.d.ts +2 -0
  120. package/lib/requests/index.js +2 -0
  121. package/lib/requests/index.js.map +1 -1
  122. package/lib/requests/normalize-tracking-data-request.d.ts +8 -0
  123. package/lib/requests/normalize-tracking-data-request.js +3 -0
  124. package/lib/requests/normalize-tracking-data-request.js.map +1 -0
  125. package/lib/requests/validate-inbound-data-request.d.ts +8 -0
  126. package/lib/requests/validate-inbound-data-request.js +3 -0
  127. package/lib/requests/validate-inbound-data-request.js.map +1 -0
  128. package/lib/responses/base-response.d.ts +2 -0
  129. package/lib/responses/base-response.js +6 -1
  130. package/lib/responses/base-response.js.map +1 -1
  131. package/lib/responses/cancel-notification-response.d.ts +2 -0
  132. package/lib/responses/cancel-notification-response.js +7 -1
  133. package/lib/responses/cancel-notification-response.js.map +1 -1
  134. package/lib/responses/cancel-pickup-response.d.ts +2 -0
  135. package/lib/responses/cancel-pickup-response.js +9 -1
  136. package/lib/responses/cancel-pickup-response.js.map +1 -1
  137. package/lib/responses/create-label-response.d.ts +2 -0
  138. package/lib/responses/create-label-response.js +19 -1
  139. package/lib/responses/create-label-response.js.map +1 -1
  140. package/lib/responses/create-manifest-response.d.ts +2 -0
  141. package/lib/responses/create-manifest-response.js +8 -1
  142. package/lib/responses/create-manifest-response.js.map +1 -1
  143. package/lib/responses/create-notification-response.d.ts +2 -0
  144. package/lib/responses/create-notification-response.js +6 -1
  145. package/lib/responses/create-notification-response.js.map +1 -1
  146. package/lib/responses/get-rates-response.d.ts +2 -0
  147. package/lib/responses/get-rates-response.js +7 -1
  148. package/lib/responses/get-rates-response.js.map +1 -1
  149. package/lib/responses/index.d.ts +2 -0
  150. package/lib/responses/index.js +2 -0
  151. package/lib/responses/index.js.map +1 -1
  152. package/lib/responses/normalize-tracking-data-response.d.ts +14 -0
  153. package/lib/responses/normalize-tracking-data-response.js +16 -0
  154. package/lib/responses/normalize-tracking-data-response.js.map +1 -0
  155. package/lib/responses/register-response.d.ts +2 -0
  156. package/lib/responses/register-response.js +8 -1
  157. package/lib/responses/register-response.js.map +1 -1
  158. package/lib/responses/schedule-pickup-response.d.ts +2 -0
  159. package/lib/responses/schedule-pickup-response.js +11 -1
  160. package/lib/responses/schedule-pickup-response.js.map +1 -1
  161. package/lib/responses/tracking-response.d.ts +1 -0
  162. package/lib/responses/tracking-response.js +5 -1
  163. package/lib/responses/tracking-response.js.map +1 -1
  164. package/lib/responses/validate-inbound-data-response.d.ts +9 -0
  165. package/lib/responses/validate-inbound-data-response.js +15 -0
  166. package/lib/responses/validate-inbound-data-response.js.map +1 -0
  167. package/lib/responses/void-labels-response.d.ts +2 -0
  168. package/lib/responses/void-labels-response.js +7 -1
  169. package/lib/responses/void-labels-response.js.map +1 -1
  170. package/package.json +2 -2
  171. package/spec.json +31 -1
  172. package/src/app/carrier-app-definition.ts +18 -0
  173. package/src/app/carrier-app.ts +108 -56
  174. package/src/app/constants.ts +14 -0
  175. package/src/app/internal/{carrier-app-specificaion.ts → carrier-app-specification.ts} +4 -1
  176. package/src/app/internal/{carrier-specificaion.ts → carrier-specification.ts} +0 -0
  177. package/src/app/internal/metadata.ts +8 -2
  178. package/src/app/internal/route.ts +1 -0
  179. package/src/app/metadata/auth-identifier.ts +17 -0
  180. package/src/app/metadata/auth-specification.ts +39 -0
  181. package/src/app/metadata/carrier-app-metadata.ts +9 -1
  182. package/src/app/metadata/index.ts +4 -1
  183. package/src/app/metadata/monoauth.ts +171 -0
  184. package/src/models/billing/billing-categories.ts +6 -0
  185. package/src/models/billing/billing-line-item.ts +14 -2
  186. package/src/models/currency.ts +7 -0
  187. package/src/models/documents/document-type.ts +6 -0
  188. package/src/models/documents/document.ts +11 -2
  189. package/src/models/identifier.ts +7 -0
  190. package/src/models/inbound-content-types.ts +10 -0
  191. package/src/models/index.ts +1 -0
  192. package/src/models/labels/document-formats.ts +5 -0
  193. package/src/models/labels/form-download.ts +6 -1
  194. package/src/models/labels/label-download.ts +6 -1
  195. package/src/models/labels/label-package.ts +9 -2
  196. package/src/models/labels/void-response.ts +11 -0
  197. package/src/models/manifests/manifest.ts +9 -1
  198. package/src/models/pickup/pickup-confirmation.ts +11 -2
  199. package/src/models/pickup/pickup-window.ts +8 -0
  200. package/src/models/pickup/shipment-identifier.ts +7 -1
  201. package/src/models/rates/rate.ts +20 -2
  202. package/src/models/registration/credentials.ts +7 -0
  203. package/src/models/resource-download.ts +7 -0
  204. package/src/models/time-window.ts +8 -0
  205. package/src/models/tracking/index.ts +1 -0
  206. package/src/models/tracking/lat-long.ts +7 -0
  207. package/src/models/tracking/service.ts +6 -0
  208. package/src/models/tracking/standardized-status-codes.ts +6 -0
  209. package/src/models/tracking/track-event.ts +16 -0
  210. package/src/models/tracking/tracking-info.ts +29 -4
  211. package/src/models/tracking/update-method.ts +13 -0
  212. package/src/models/units/dimensions.ts +7 -0
  213. package/src/requests/index.ts +2 -0
  214. package/src/requests/normalize-tracking-data-request.ts +9 -0
  215. package/src/requests/validate-inbound-data-request.ts +9 -0
  216. package/src/responses/base-response.ts +6 -0
  217. package/src/responses/cancel-notification-response.ts +7 -1
  218. package/src/responses/cancel-pickup-response.ts +9 -1
  219. package/src/responses/create-label-response.ts +25 -1
  220. package/src/responses/create-manifest-response.ts +8 -2
  221. package/src/responses/create-notification-response.ts +6 -1
  222. package/src/responses/get-rates-response.ts +7 -2
  223. package/src/responses/index.ts +2 -0
  224. package/src/responses/normalize-tracking-data-response.ts +24 -0
  225. package/src/responses/register-response.ts +6 -1
  226. package/src/responses/schedule-pickup-response.ts +18 -2
  227. package/src/responses/tracking-response.ts +6 -2
  228. package/src/responses/validate-inbound-data-response.ts +16 -0
  229. package/src/responses/void-labels-response.ts +7 -2
  230. package/tsconfig.tsbuildinfo +1 -1
  231. package/lib/app/internal/carrier-app-specificaion.js.map +0 -1
  232. package/lib/app/internal/carrier-specificaion.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { RegisterRequest, CreateLabelRequest, VoidLabelsRequest, CreateManifestRequest, SchedulePickupRequest, CancelPickupRequest, GetRatesRequest, TrackingRequest, CancelNotificationRequest, CreateNotificationRequest } from '../requests';
2
- import { RegisterResponse, CreateLabelResponse, VoidLabelsResponse, CreateManifestResponse, SchedulePickupResponse, CancelPickupResponse, GetRatesResponse, TrackingResponse, CancelNotificationResponse, CreateNotificationResponse } from '../responses';
1
+ import { RegisterRequest, CreateLabelRequest, VoidLabelsRequest, CreateManifestRequest, SchedulePickupRequest, CancelPickupRequest, GetRatesRequest, TrackingRequest, CancelNotificationRequest, CreateNotificationRequest, ValidateInboundDataRequest, NormalizeTrackingDataRequest } from '../requests';
2
+ import { RegisterResponse, CreateLabelResponse, VoidLabelsResponse, CreateManifestResponse, SchedulePickupResponse, CancelPickupResponse, GetRatesResponse, TrackingResponse, CancelNotificationResponse, CreateNotificationResponse, ValidateInboundDataResponse, NormalizeTrackingDataResponse } from '../responses';
3
3
  import { CarrierAppMetadata } from './metadata/carrier-app-metadata';
4
4
  /**
5
5
  * @description This defines a connect carrier app
@@ -56,4 +56,14 @@ export interface CarrierAppDefinition {
56
56
  * @param request Data needed by the provider to inform them of the cancellation
57
57
  */
58
58
  CancelNotification?: (request: CancelNotificationRequest) => CancelNotificationResponse | Promise<CancelNotificationResponse>;
59
+ /**
60
+ * @description This endpoint is used to validate inbound data and determine the type of data included in the inbound message
61
+ * @param request Data received from the provider via an inbound method, such as a webhook
62
+ */
63
+ ValidateInboundData?: (request: ValidateInboundDataRequest) => ValidateInboundDataResponse | Promise<ValidateInboundDataRequest>;
64
+ /**
65
+ * @description This endpoint is used to normalize inbound tracking data and determine the type of data
66
+ * @param request Tracking data received from the provider via an inbound method, such as a webhook
67
+ */
68
+ NormalizeTrackingData?: (request: NormalizeTrackingDataRequest) => NormalizeTrackingDataResponse | Promise<NormalizeTrackingDataResponse>;
59
69
  }
@@ -2,10 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CarrierApp = void 0;
4
4
  const internal_1 = require("./internal");
5
+ const constants_1 = require("./constants");
5
6
  const path_1 = require("path");
6
7
  const fs_1 = require("fs");
7
8
  const metadata_1 = require("./internal/metadata");
8
9
  const metadata_2 = require("./metadata");
10
+ const responses_1 = require("../responses");
9
11
  const handleRequest = (implementation) => {
10
12
  if (implementation) {
11
13
  return (request) => {
@@ -13,62 +15,9 @@ const handleRequest = (implementation) => {
13
15
  };
14
16
  }
15
17
  };
16
- const registerRoutes = (routes, definition) => {
17
- routes.push({
18
- method: internal_1.Method.POST,
19
- path: '/Register',
20
- handler: handleRequest(definition.Register),
21
- });
22
- routes.push({
23
- method: internal_1.Method.POST,
24
- path: '/CreateLabel',
25
- handler: handleRequest(definition.CreateLabel),
26
- });
27
- routes.push({
28
- method: internal_1.Method.POST,
29
- path: '/VoidLabels',
30
- handler: handleRequest(definition.VoidLabels),
31
- });
32
- routes.push({
33
- method: internal_1.Method.POST,
34
- path: '/GetRates',
35
- handler: handleRequest(definition.GetRates),
36
- });
37
- routes.push({
38
- method: internal_1.Method.POST,
39
- path: '/CreateManifest',
40
- handler: handleRequest(definition.CreateManifest),
41
- });
42
- routes.push({
43
- method: internal_1.Method.POST,
44
- path: '/SchedulePickup',
45
- handler: handleRequest(definition.SchedulePickup),
46
- });
47
- routes.push({
48
- method: internal_1.Method.POST,
49
- path: '/CancelPickup',
50
- handler: handleRequest(definition.CancelPickup),
51
- });
52
- routes.push({
53
- method: internal_1.Method.POST,
54
- path: '/Track',
55
- handler: handleRequest(definition.Track),
56
- });
57
- routes.push({
58
- method: internal_1.Method.POST,
59
- path: '/CreateNotification',
60
- handler: handleRequest(definition.CreateNotification),
61
- });
62
- routes.push({
63
- method: internal_1.Method.POST,
64
- path: '/CancelNotification',
65
- handler: handleRequest(definition.CancelNotification),
66
- });
67
- };
68
18
  class CarrierApp {
69
19
  constructor(definition) {
70
20
  this.routes = [];
71
- registerRoutes(this.routes, definition);
72
21
  this.validate = () => {
73
22
  const results = metadata_2.CarrierAppMetadataSchema.validate(definition.Metadata, {
74
23
  allowUnknown: true,
@@ -78,6 +27,83 @@ class CarrierApp {
78
27
  return results.error.details.map((detail) => `${detail.message}`);
79
28
  }
80
29
  };
30
+ new Array([
31
+ internal_1.Method.POST,
32
+ constants_1.ApiEndpoints.CancelNotification,
33
+ definition.CancelNotification,
34
+ responses_1.CancelNotificationResponseSchema,
35
+ ], [
36
+ internal_1.Method.POST,
37
+ constants_1.ApiEndpoints.CancelPickup,
38
+ definition.CancelPickup,
39
+ responses_1.CancelPickupResponseSchema,
40
+ ], [
41
+ internal_1.Method.POST,
42
+ constants_1.ApiEndpoints.CreateLabel,
43
+ definition.CreateLabel,
44
+ responses_1.CreateLabelResponseSchema,
45
+ ], [
46
+ internal_1.Method.POST,
47
+ constants_1.ApiEndpoints.CreateManifest,
48
+ definition.CreateManifest,
49
+ responses_1.CreateManifestResponseSchema,
50
+ ], [
51
+ internal_1.Method.POST,
52
+ constants_1.ApiEndpoints.CreateNotification,
53
+ definition.CreateNotification,
54
+ responses_1.CreateNotificationResponseSchema,
55
+ ], [
56
+ internal_1.Method.POST,
57
+ constants_1.ApiEndpoints.GetRates,
58
+ definition.GetRates,
59
+ responses_1.GetRatesResponseSchema,
60
+ ], [
61
+ internal_1.Method.POST,
62
+ constants_1.ApiEndpoints.NormalizeTrackingData,
63
+ definition.NormalizeTrackingData,
64
+ responses_1.NormalizeTrackingDataResponseSchema,
65
+ ], [
66
+ internal_1.Method.POST,
67
+ constants_1.ApiEndpoints.Register,
68
+ definition.Register,
69
+ responses_1.RegisterResponseSchema,
70
+ ], [
71
+ internal_1.Method.POST,
72
+ constants_1.ApiEndpoints.SchedulePickup,
73
+ definition.SchedulePickup,
74
+ responses_1.SchedulePickupResponseSchema,
75
+ ], [
76
+ internal_1.Method.POST,
77
+ constants_1.ApiEndpoints.Track,
78
+ definition.Track,
79
+ responses_1.TrackingResponseSchema,
80
+ ], [
81
+ internal_1.Method.POST,
82
+ constants_1.ApiEndpoints.ValidateInboundData,
83
+ definition.ValidateInboundData,
84
+ responses_1.ValidateInboundDataResponseSchema,
85
+ ], [
86
+ internal_1.Method.POST,
87
+ constants_1.ApiEndpoints.VoidLabels,
88
+ definition.VoidLabels,
89
+ responses_1.VoidLabelsResponseSchema,
90
+ ]).forEach(([method, path, implementation, schema]) => {
91
+ if (implementation) {
92
+ this.routes.push({
93
+ method,
94
+ path,
95
+ handler: handleRequest(implementation),
96
+ validateResponse: (result) => {
97
+ var _a, _b;
98
+ const validationResults = schema.validate(result, {
99
+ abortEarly: false,
100
+ });
101
+ const errors = (_b = (_a = validationResults === null || validationResults === void 0 ? void 0 : validationResults.error) === null || _a === void 0 ? void 0 : _a.details) === null || _b === void 0 ? void 0 : _b.map((detail) => detail.message);
102
+ return errors;
103
+ },
104
+ });
105
+ }
106
+ });
81
107
  this.data = new metadata_1.Metadata(definition);
82
108
  const jsonSpecPath = path_1.resolve(__dirname, '../../spec.json');
83
109
  const yamlSpecPath = path_1.resolve(__dirname, '../../spec.yaml');
@@ -1 +1 @@
1
- {"version":3,"file":"carrier-app.js","sourceRoot":"","sources":["../../src/app/carrier-app.ts"],"names":[],"mappings":";;;AACA,yCAA6E;AAE7E,+BAA+B;AAC/B,2BAA8C;AAE9C,kDAA+C;AAE/C,yCAAsD;AAEtD,MAAM,aAAa,GAAG,CAAC,cAAyB,EAAO,EAAE;IACvD,IAAI,cAAc,EAAE;QAClB,OAAO,CAAC,OAAY,EAAE,EAAE;YACtB,OAAO,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACtC,CAAC,CAAC;KACH;AACH,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,C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G,iBAAY,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE,CAAC;SACpD;IACH,CAAC;IACD,SAAS;QACP,MAAM,gBAAgB,GAAG,CAAC,OAA6B,EAAiB,EAAE;YACxE,OAAO;gBACL,EAAE,EAAE,OAAO,CAAC,EAAE;gBACd,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO;gBAC5B,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO;aAC7B,CAAC;QACJ,CAAC,CAAC;QACF,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClD,CAAC;CACF;AA9HD,gCA8HC"}
@@ -0,0 +1,14 @@
1
+ export declare enum ApiEndpoints {
2
+ Register = "/Register",
3
+ CreateLabel = "/CreateLabel",
4
+ VoidLabels = "/VoidLabels",
5
+ GetRates = "/GetRates",
6
+ CreateManifest = "/CreateManifest",
7
+ SchedulePickup = "/SchedulePickup",
8
+ CancelPickup = "/CancelPickup",
9
+ Track = "/Track",
10
+ CreateNotification = "/CreateNotification",
11
+ CancelNotification = "/CancelNotification",
12
+ ValidateInboundData = "/ValidateInboundData",
13
+ NormalizeTrackingData = "/NormalizeTrackingData"
14
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApiEndpoints = void 0;
4
+ var ApiEndpoints;
5
+ (function (ApiEndpoints) {
6
+ ApiEndpoints["Register"] = "/Register";
7
+ ApiEndpoints["CreateLabel"] = "/CreateLabel";
8
+ ApiEndpoints["VoidLabels"] = "/VoidLabels";
9
+ ApiEndpoints["GetRates"] = "/GetRates";
10
+ ApiEndpoints["CreateManifest"] = "/CreateManifest";
11
+ ApiEndpoints["SchedulePickup"] = "/SchedulePickup";
12
+ ApiEndpoints["CancelPickup"] = "/CancelPickup";
13
+ ApiEndpoints["Track"] = "/Track";
14
+ ApiEndpoints["CreateNotification"] = "/CreateNotification";
15
+ ApiEndpoints["CancelNotification"] = "/CancelNotification";
16
+ ApiEndpoints["ValidateInboundData"] = "/ValidateInboundData";
17
+ ApiEndpoints["NormalizeTrackingData"] = "/NormalizeTrackingData";
18
+ })(ApiEndpoints = exports.ApiEndpoints || (exports.ApiEndpoints = {}));
19
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/app/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAaX;AAbD,WAAY,YAAY;IACtB,sCAAsB,CAAA;IACtB,4CAA4B,CAAA;IAC5B,0CAA0B,CAAA;IAC1B,sCAAsB,CAAA;IACtB,kDAAkC,CAAA;IAClC,kDAAkC,CAAA;IAClC,8CAA8B,CAAA;IAC9B,gCAAgB,CAAA;IAChB,0DAA0C,CAAA;IAC1C,0DAA0C,CAAA;IAC1C,4DAA4C,CAAA;IAC5C,gEAAgD,CAAA;AAClD,CAAC,EAbW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAavB"}
@@ -1,5 +1,6 @@
1
+ import { AuthSpecification } from '../metadata/auth-specification';
1
2
  import { ShippingProviderConnector } from '../metadata/shipping-provider-connector';
2
- import { CarrierSpecification } from './carrier-specificaion';
3
+ import { CarrierSpecification } from './carrier-specification';
3
4
  /** @description This represents a single integration which may contain multiple carrier sources */
4
5
  export interface CarrierAppSpecification {
5
6
  /** @description The id for this integration */
@@ -8,6 +9,8 @@ export interface CarrierAppSpecification {
8
9
  Name: string;
9
10
  /** @description Information about the connector */
10
11
  Connector: ShippingProviderConnector;
12
+ /** @description The specification for authorizing with this carrier */
13
+ AuthProcess?: AuthSpecification;
11
14
  /** @description A list of carrier sources associated with this integration */
12
15
  Carriers: CarrierSpecification[];
13
16
  }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=carrier-app-specificaion.js.map
3
+ //# sourceMappingURL=carrier-app-specification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carrier-app-specification.js","sourceRoot":"","sources":["../../../src/app/internal/carrier-app-specification.ts"],"names":[],"mappings":""}
@@ -59,4 +59,4 @@ class CarrierSpecification {
59
59
  }
60
60
  }
61
61
  exports.CarrierSpecification = CarrierSpecification;
62
- //# sourceMappingURL=carrier-specificaion.js.map
62
+ //# sourceMappingURL=carrier-specification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carrier-specification.js","sourceRoot":"","sources":["../../../src/app/internal/carrier-specification.ts"],"names":[],"mappings":";;;AAoBO,MAAM,kBAAkB,GAAG,CAChC,OAAkC,EACJ,EAAE;IAChC,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,SAAS,CAAC;KAClB;IACD,MAAM,GAAG,GAAqB,EAAE,CAAC;IACjC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAW,EAAE,EAAE;QAC3C,MAAM,IAAI,GAAG,GAAyB,CAAC;QACvC,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAA8B,CAAC;QACzE,GAAG,CAAC,IAAI,CAAC;YACP,IAAI;YACJ,WAAW;YACX,IAAI;SACL,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAjBW,QAAA,kBAAkB,sBAiB7B;AAEK,MAAM,oBAAoB,GAAG,CAClC,KAA8B,EACV,EAAE;IACtB,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,EAAE,CAAC;KACX;IACD,MAAM,GAAG,GAAuB,EAAE,CAAC;IACnC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,GAAQ,EAAE,EAAE;QACtC,MAAM,aAAa,GAAG,KAA+B,CAAC;QACtD,MAAM,IAAI,GAAG,GAA2B,CAAC;QACzC,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAW,CAAC;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11 +1,13 @@
1
1
  import { CarrierAppDefinition } from '../carrier-app-definition';
2
2
  import { ShippingProviderConnector } from '../metadata/shipping-provider-connector';
3
- import { CarrierAppSpecification } from './carrier-app-specificaion';
4
- import { CarrierSpecification } from './carrier-specificaion';
3
+ import { CarrierAppSpecification } from './carrier-app-specification';
4
+ import { CarrierSpecification } from './carrier-specification';
5
+ import { AuthSpecification } from '../metadata/auth-specification';
5
6
  export declare class Metadata implements CarrierAppSpecification {
6
7
  Id: string;
7
8
  Name: string;
8
9
  Connector: ShippingProviderConnector;
10
+ AuthProcess?: AuthSpecification;
9
11
  Carriers: CarrierSpecification[];
10
12
  constructor(app: CarrierAppDefinition);
11
13
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Metadata = void 0;
4
- const carrier_specificaion_1 = require("./carrier-specificaion");
4
+ const carrier_specification_1 = require("./carrier-specification");
5
5
  const fn = (name) => ({
6
6
  Name: name,
7
7
  IsSandboxed: false,
@@ -38,7 +38,11 @@ class Metadata {
38
38
  constructor(app) {
39
39
  this.Id = app.Metadata.Id;
40
40
  this.Name = app.Metadata.Name;
41
- this.Carriers = app.Metadata.Carriers.map((c) => new carrier_specificaion_1.CarrierSpecification(c));
41
+ this.AuthProcess = app.Metadata.AuthProcess;
42
+ if (this.AuthProcess) {
43
+ this.AuthProcess.Identifier.Version = '2.0';
44
+ }
45
+ this.Carriers = app.Metadata.Carriers.map((c) => new carrier_specification_1.CarrierSpecification(c));
42
46
  this.Connector = {
43
47
  DiagnosticRoutes: {
44
48
  Liveness: '/diagnostics/liveness',
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../src/app/internal/metadata.ts"],"names":[],"mappings":";;;AAKA,iEAA8D;AAE9D,MAAM,EAAE,GAAG,CAAC,IAAY,EAAyB,EAAE,CAAC,CAAC;IACnD,IAAI,EAAE,IAAI;IACV,WAAW,EAAE,KAAK;CACnB,C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G,CAAC,YAAY,EAAE;QACpB,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC;KAC9B;IAED,IAAI,GAAG,CAAC,QAAQ,EAAE;QAChB,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;KAC1B;IAED,IAAI,GAAG,CAAC,KAAK,EAAE;QACb,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;KACvB;IAED,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF,MAAa,QAAQ;IAOnB,YAAY,GAAyB;QACnC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC9B,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC;QAC5C,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,GAAG,KAAK,CAAC;SAC7C;QACD,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CACvC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,4CAAoB,CAAC,CAAC,CAAC,CACnC,CAAC;QAEF,IAAI,CAAC,SAAS,GAAG;YACf,gBAAgB,EAAE;gBAChB,QAAQ,EAAE,uBAAuB;gBACjC,SAAS,EAAE,wBAAwB;gBACnC,OAAO,EAAE,sBAAsB;aAChC;YACD,UAAU,EAAE,OAAO;YACnB,SAAS,EAAE,YAAY,CAAC,GAAG,CAAC;SAC7B,CAAC;IACJ,CAAC;CACF;AA5BD,4BA4BC"}
@@ -9,4 +9,5 @@ export interface Route {
9
9
  path: string;
10
10
  method: Method;
11
11
  handler?: (req: any) => any | Promise<any>;
12
+ validateResponse?: (response: any) => string[] | undefined;
12
13
  }
@@ -0,0 +1,10 @@
1
+ import Joi from 'joi';
2
+ export declare enum AuthenticationType {
3
+ OAuth = "oauth"
4
+ }
5
+ export declare class AuthIdentifier {
6
+ AuthenticationType: AuthenticationType;
7
+ Version?: string;
8
+ IsSandbox?: boolean;
9
+ }
10
+ export declare const AuthIdentifierSchema: Joi.ObjectSchema<any>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthIdentifierSchema = exports.AuthIdentifier = exports.AuthenticationType = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const joi_1 = tslib_1.__importDefault(require("joi"));
6
+ var AuthenticationType;
7
+ (function (AuthenticationType) {
8
+ AuthenticationType["OAuth"] = "oauth";
9
+ })(AuthenticationType = exports.AuthenticationType || (exports.AuthenticationType = {}));
10
+ class AuthIdentifier {
11
+ }
12
+ exports.AuthIdentifier = AuthIdentifier;
13
+ exports.AuthIdentifierSchema = joi_1.default.object({
14
+ AuthenticationType: joi_1.default.string().required().valid('oauth'),
15
+ Version: joi_1.default.string().optional(),
16
+ IsSandbox: joi_1.default.bool().optional(),
17
+ });
18
+ //# sourceMappingURL=auth-identifier.js.map
@@ -0,0 +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"}
@@ -0,0 +1,19 @@
1
+ import { AuthIdentifier } from './auth-identifier';
2
+ import { AccessToken, AuthorizationConfiguration, Parameter, RefreshTokenConfiguration, RequestTokenConfiguration } from './monoauth';
3
+ import Joi from 'joi';
4
+ /** @description Used to specify information about an integrations authentication */
5
+ export declare class AuthSpecification {
6
+ /** @description Identify the type of Auth being used by the integration */
7
+ Identifier: AuthIdentifier;
8
+ /** @description Added to allow oauth 1.0 to work. */
9
+ access_token?: AccessToken;
10
+ /** @description Authorization: the beginning of an OAuth2.0 flow that ensures the user is logged in and approves access to the Resource. */
11
+ authorization?: AuthorizationConfiguration;
12
+ /** @description Request Token: server-server code for token exchange */
13
+ request_token?: RequestTokenConfiguration;
14
+ /** @description Refresh Token: server-server refresh token exchange for access token **NOTE: sometimes a new RT is also created** */
15
+ refresh_token?: RefreshTokenConfiguration;
16
+ /** @description Advanced configurations used for oauth 1.0 */
17
+ advanced_configuration?: Parameter[];
18
+ }
19
+ export declare const AuthSpecificationSchema: Joi.ObjectSchema<any>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthSpecificationSchema = exports.AuthSpecification = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const auth_identifier_1 = require("./auth-identifier");
6
+ const monoauth_1 = require("./monoauth");
7
+ const joi_1 = tslib_1.__importDefault(require("joi"));
8
+ /** @description Used to specify information about an integrations authentication */
9
+ class AuthSpecification {
10
+ }
11
+ exports.AuthSpecification = AuthSpecification;
12
+ exports.AuthSpecificationSchema = joi_1.default.object({
13
+ Identifier: auth_identifier_1.AuthIdentifierSchema,
14
+ access_token: monoauth_1.AccessTokenSchema.optional(),
15
+ authorization: monoauth_1.AuthorizationConfigurationSchema.optional(),
16
+ request_token: monoauth_1.RequestTokenConfigurationSchema.optional(),
17
+ refresh_token: monoauth_1.RefreshTokenConfigurationSchema.optional(),
18
+ advanced_configuration: joi_1.default.array().optional().items(monoauth_1.ParameterSchema),
19
+ });
20
+ //# sourceMappingURL=auth-specification.js.map
@@ -0,0 +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,10 +1,12 @@
1
1
  import Joi from 'joi';
2
- import { Carrier } from './carrier';
2
+ import { AuthSpecification, Carrier } from '.';
3
3
  export interface CarrierAppMetadata {
4
4
  /** @description Id of the carrier app */
5
5
  Id: string;
6
6
  /** @description Name of the carrier */
7
7
  Name: string;
8
+ /** @description The specification for authorizing with this order source */
9
+ AuthProcess?: AuthSpecification;
8
10
  /** @description List of carriers for the app */
9
11
  Carriers: Carrier[];
10
12
  }
@@ -3,17 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CarrierAppMetadataSchema = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const joi_1 = tslib_1.__importDefault(require("joi"));
6
- const carrier_1 = require("./carrier");
6
+ const _1 = require(".");
7
7
  exports.CarrierAppMetadataSchema = joi_1.default.object({
8
8
  Id: joi_1.default.string()
9
9
  .uuid({ version: ['uuidv4'] })
10
10
  .required(),
11
11
  Name: joi_1.default.string().required(),
12
+ AuthProcess: _1.AuthSpecificationSchema.optional(),
12
13
  Carriers: joi_1.default.array()
13
14
  .unique('Id')
14
15
  .required()
15
16
  .min(1)
16
17
  .message('There must be at least 1 Carrier defined')
17
- .items(carrier_1.CarrierSchema),
18
+ .items(_1.CarrierSchema),
18
19
  });
19
20
  //# sourceMappingURL=carrier-app-metadata.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"carrier-app-metadata.js","sourceRoot":"","sources":["../../../src/app/metadata/carrier-app-metadata.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,uCAAmD;AAWtC,QAAA,wBAAwB,GAAG,aAAG,CAAC,MAAM,CAAC;IACjD,EAAE,EAAE,aAAG,CAAC,MAAM,EAAE;SACb,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;SAC7B,QAAQ,EAAE;IACb,IAAI,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,QAAQ,EAAE,aAAG,CAAC,KAAK,EAAE;SAClB,MAAM,CAAC,IAAI,CAAC;SACZ,QAAQ,EAAE;SACV,GAAG,CAAC,CAAC,CAAC;SACN,OAAO,CAAC,0CAA0C,CAAC;SACnD,KAAK,CAAC,uBAAa,CAAC;CACxB,CAAC,CAAC"}
1
+ {"version":3,"file":"carrier-app-metadata.js","sourceRoot":"","sources":["../../../src/app/metadata/carrier-app-metadata.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,wBAKW;AAaE,QAAA,wBAAwB,GAAG,aAAG,CAAC,MAAM,CAAC;IACjD,EAAE,EAAE,aAAG,CAAC,MAAM,EAAE;SACb,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;SAC7B,QAAQ,EAAE;IACb,IAAI,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,WAAW,EAAE,0BAAuB,CAAC,QAAQ,EAAE;IAC/C,QAAQ,EAAE,aAAG,CAAC,KAAK,EAAE;SAClB,MAAM,CAAC,IAAI,CAAC;SACZ,QAAQ,EAAE;SACV,GAAG,CAAC,CAAC,CAAC;SACN,OAAO,CAAC,0CAA0C,CAAC;SACnD,KAAK,CAAC,gBAAa,CAAC;CACxB,CAAC,CAAC"}
@@ -1,7 +1,9 @@
1
1
  export * from './account-modals';
2
+ export * from './auth-identifier';
3
+ export * from './auth-specification';
4
+ export * from './carrier';
2
5
  export * from './carrier-app-metadata';
3
6
  export * from './carrier-attributes';
4
- export * from './carrier';
5
7
  export * from './confirmation-type';
6
8
  export * from './country-association';
7
9
  export * from './diagnostic-routes';
@@ -9,6 +11,7 @@ export * from './enums';
9
11
  export * from './function';
10
12
  export * from './label-formats';
11
13
  export * from './label-sizes';
14
+ export * from './monoauth';
12
15
  export * from './package-type';
13
16
  export * from './service-class';
14
17
  export * from './service-grade';
@@ -2,9 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./account-modals"), exports);
5
+ tslib_1.__exportStar(require("./auth-identifier"), exports);
6
+ tslib_1.__exportStar(require("./auth-specification"), exports);
7
+ tslib_1.__exportStar(require("./carrier"), exports);
5
8
  tslib_1.__exportStar(require("./carrier-app-metadata"), exports);
6
9
  tslib_1.__exportStar(require("./carrier-attributes"), exports);
7
- tslib_1.__exportStar(require("./carrier"), exports);
8
10
  tslib_1.__exportStar(require("./confirmation-type"), exports);
9
11
  tslib_1.__exportStar(require("./country-association"), exports);
10
12
  tslib_1.__exportStar(require("./diagnostic-routes"), exports);
@@ -12,6 +14,7 @@ tslib_1.__exportStar(require("./enums"), exports);
12
14
  tslib_1.__exportStar(require("./function"), exports);
13
15
  tslib_1.__exportStar(require("./label-formats"), exports);
14
16
  tslib_1.__exportStar(require("./label-sizes"), exports);
17
+ tslib_1.__exportStar(require("./monoauth"), exports);
15
18
  tslib_1.__exportStar(require("./package-type"), exports);
16
19
  tslib_1.__exportStar(require("./service-class"), exports);
17
20
  tslib_1.__exportStar(require("./service-grade"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app/metadata/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,iEAAuC;AACvC,+DAAqC;AACrC,oDAA0B;AAC1B,8DAAoC;AACpC,gEAAsC;AACtC,8DAAoC;AACpC,kDAAwB;AACxB,qDAA2B;AAC3B,0DAAgC;AAChC,wDAA8B;AAC9B,yDAA+B;AAC/B,0DAAgC;AAChC,0DAAgC;AAChC,wEAA8C;AAC9C,gEAAsC;AACtC,4DAAkC;AAClC,wEAA8C;AAC9C,6DAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app/metadata/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,4DAAkC;AAClC,+DAAqC;AACrC,oDAA0B;AAC1B,iEAAuC;AACvC,+DAAqC;AACrC,8DAAoC;AACpC,gEAAsC;AACtC,8DAAoC;AACpC,kDAAwB;AACxB,qDAA2B;AAC3B,0DAAgC;AAChC,wDAA8B;AAC9B,qDAA2B;AAC3B,yDAA+B;AAC/B,0DAAgC;AAChC,0DAAgC;AAChC,wEAA8C;AAC9C,gEAAsC;AACtC,4DAAkC;AAClC,wEAA8C;AAC9C,6DAAmC"}
@@ -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>;