@chrt-inc/typescript-sdk 0.0.170-g → 0.0.170-h

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 (125) hide show
  1. package/README.md +7 -7
  2. package/dist/cjs/Client.d.ts +9 -9
  3. package/dist/cjs/Client.js +11 -11
  4. package/dist/cjs/api/resources/connections/client/Client.d.ts +51 -0
  5. package/dist/cjs/api/resources/{oortConnections → connections}/client/Client.js +22 -80
  6. package/dist/cjs/api/resources/connections/index.d.ts +2 -0
  7. package/dist/cjs/api/resources/connections/index.js +18 -0
  8. package/dist/cjs/api/resources/connections/resources/connectionToCourier/client/Client.d.ts +47 -0
  9. package/dist/cjs/api/resources/connections/resources/connectionToCourier/client/Client.js +130 -0
  10. package/dist/cjs/api/resources/connections/resources/index.d.ts +2 -0
  11. package/dist/cjs/api/resources/connections/resources/index.js +41 -0
  12. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/Client.d.ts +134 -0
  13. package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/Client.js +112 -103
  14. package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/requests/AddLineItemsReq.d.ts +2 -0
  15. package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups/client/requests/CreateCourierPayDriverLineItemGroupRequest.d.ts → courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateRequest.d.ts} +1 -1
  16. package/dist/{esm/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCalculateCourierPayDriverLineItemGroupRequest.d.mts → cjs/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewRequest.d.ts} +1 -1
  17. package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/requests/RemoveLineItemsReq.d.ts +2 -0
  18. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/index.d.ts +4 -0
  19. package/dist/cjs/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/Client.d.ts +24 -24
  20. package/dist/cjs/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/Client.js +37 -37
  21. package/dist/cjs/api/resources/courierPayDriverPayouts/client/requests/index.js +2 -0
  22. package/dist/cjs/api/resources/dev/client/Client.d.ts +3 -3
  23. package/dist/cjs/api/resources/dev/client/Client.js +4 -4
  24. package/dist/cjs/api/resources/index.d.ts +5 -6
  25. package/dist/cjs/api/resources/index.js +6 -7
  26. package/dist/cjs/api/resources/oortCourierPayDriverRateSheets/client/Client.d.ts +38 -38
  27. package/dist/cjs/api/resources/oortCourierPayDriverRateSheets/client/Client.js +65 -65
  28. package/dist/cjs/version.d.ts +1 -1
  29. package/dist/cjs/version.js +1 -1
  30. package/dist/esm/Client.d.mts +9 -9
  31. package/dist/esm/Client.mjs +11 -11
  32. package/dist/esm/api/resources/connections/client/Client.d.mts +51 -0
  33. package/dist/esm/api/resources/{oortConnections → connections}/client/Client.mjs +20 -78
  34. package/dist/esm/api/resources/connections/index.d.mts +2 -0
  35. package/dist/esm/api/resources/connections/index.mjs +2 -0
  36. package/dist/esm/api/resources/connections/resources/connectionToCourier/client/Client.d.mts +47 -0
  37. package/dist/esm/api/resources/connections/resources/connectionToCourier/client/Client.mjs +93 -0
  38. package/dist/esm/api/resources/connections/resources/connectionToCourier/client/requests/index.mjs +1 -0
  39. package/dist/esm/api/resources/connections/resources/index.d.mts +2 -0
  40. package/dist/esm/api/resources/connections/resources/index.mjs +2 -0
  41. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/Client.d.mts +134 -0
  42. package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/Client.mjs +110 -101
  43. package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/requests/AddLineItemsReq.d.mts +2 -0
  44. package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups/client/requests/CreateCourierPayDriverLineItemGroupRequest.d.mts → courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateRequest.d.mts} +1 -1
  45. package/dist/{cjs/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCalculateCourierPayDriverLineItemGroupRequest.d.ts → esm/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewRequest.d.mts} +1 -1
  46. package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/requests/RemoveLineItemsReq.d.mts +2 -0
  47. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/index.d.mts +4 -0
  48. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/index.mjs +1 -0
  49. package/dist/esm/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/Client.d.mts +24 -24
  50. package/dist/esm/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/Client.mjs +35 -35
  51. package/dist/esm/api/resources/courierPayDriverPayouts/client/requests/index.mjs +1 -0
  52. package/dist/esm/api/resources/dev/client/Client.d.mts +3 -3
  53. package/dist/esm/api/resources/dev/client/Client.mjs +4 -4
  54. package/dist/esm/api/resources/index.d.mts +5 -6
  55. package/dist/esm/api/resources/index.mjs +5 -6
  56. package/dist/esm/api/resources/oortCourierPayDriverRateSheets/client/Client.d.mts +38 -38
  57. package/dist/esm/api/resources/oortCourierPayDriverRateSheets/client/Client.mjs +65 -65
  58. package/dist/esm/version.d.mts +1 -1
  59. package/dist/esm/version.mjs +1 -1
  60. package/package.json +1 -1
  61. package/reference.md +196 -196
  62. package/dist/cjs/api/resources/oortConnections/client/Client.d.ts +0 -63
  63. package/dist/cjs/api/resources/oortCourierPayDriverLineItemGroups/client/Client.d.ts +0 -136
  64. package/dist/cjs/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCourierPayDriverLineItemGroupByIdRequest.d.ts +0 -12
  65. package/dist/cjs/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCourierPayDriverLineItemGroupByIdRequest.js +0 -5
  66. package/dist/cjs/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCourierPayDriverLineItemGroupByTaskGroupIdRequest.d.ts +0 -12
  67. package/dist/cjs/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCourierPayDriverLineItemGroupByTaskGroupIdRequest.js +0 -5
  68. package/dist/cjs/api/resources/oortCourierPayDriverLineItemGroups/client/requests/index.d.ts +0 -6
  69. package/dist/esm/api/resources/oortConnections/client/Client.d.mts +0 -63
  70. package/dist/esm/api/resources/oortCourierPayDriverLineItemGroups/client/Client.d.mts +0 -136
  71. package/dist/esm/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCourierPayDriverLineItemGroupByIdRequest.d.mts +0 -12
  72. package/dist/esm/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCourierPayDriverLineItemGroupByIdRequest.mjs +0 -4
  73. package/dist/esm/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCourierPayDriverLineItemGroupByTaskGroupIdRequest.d.mts +0 -12
  74. package/dist/esm/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCourierPayDriverLineItemGroupByTaskGroupIdRequest.mjs +0 -4
  75. package/dist/esm/api/resources/oortCourierPayDriverLineItemGroups/client/requests/index.d.mts +0 -6
  76. /package/dist/{esm/api/resources/oortConnections/client/requests/index.mjs → cjs/api/resources/connections/client/index.d.ts} +0 -0
  77. /package/dist/cjs/api/resources/{oortConnections/client/requests → connections/client}/index.js +0 -0
  78. /package/dist/cjs/api/resources/{oortConnections → connections/resources/connectionToCourier}/client/index.d.ts +0 -0
  79. /package/dist/cjs/api/resources/{oortConnections → connections/resources/connectionToCourier}/client/index.js +0 -0
  80. /package/dist/cjs/api/resources/{oortConnections → connections/resources/connectionToCourier}/client/requests/CreateConnectionReq.d.ts +0 -0
  81. /package/dist/cjs/api/resources/{oortConnections → connections/resources/connectionToCourier}/client/requests/CreateConnectionReq.js +0 -0
  82. /package/dist/cjs/api/resources/{oortConnections → connections/resources/connectionToCourier}/client/requests/index.d.ts +0 -0
  83. /package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → connections/resources/connectionToCourier}/client/requests/index.js +0 -0
  84. /package/dist/cjs/api/resources/{oortConnections → connections/resources/connectionToCourier}/index.d.ts +0 -0
  85. /package/dist/cjs/api/resources/{oortConnections → connections/resources/connectionToCourier}/index.js +0 -0
  86. /package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/index.d.ts +0 -0
  87. /package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/index.js +0 -0
  88. /package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/requests/AddLineItemsReq.js +0 -0
  89. /package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups/client/requests/CreateCourierPayDriverLineItemGroupRequest.js → courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateRequest.js} +0 -0
  90. /package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups/client/requests/GetCalculateCourierPayDriverLineItemGroupRequest.js → courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewRequest.js} +0 -0
  91. /package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/requests/RemoveLineItemsReq.js +0 -0
  92. /package/dist/cjs/api/resources/{oortCourierPayDriverPayouts → courierPayDriverLineItemGroup}/client/requests/index.js +0 -0
  93. /package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/index.d.ts +0 -0
  94. /package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/index.js +0 -0
  95. /package/dist/cjs/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/index.d.ts +0 -0
  96. /package/dist/cjs/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/index.js +0 -0
  97. /package/dist/cjs/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/requests/CourierPayDriverPayoutClientCreate1.d.ts +0 -0
  98. /package/dist/cjs/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/requests/CourierPayDriverPayoutClientCreate1.js +0 -0
  99. /package/dist/cjs/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/requests/index.d.ts +0 -0
  100. /package/dist/cjs/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/index.d.ts +0 -0
  101. /package/dist/cjs/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/index.js +0 -0
  102. /package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups/client/requests/index.mjs → connections/client/index.d.mts} +0 -0
  103. /package/dist/esm/api/resources/{oortCourierPayDriverPayouts/client/requests → connections/client}/index.mjs +0 -0
  104. /package/dist/esm/api/resources/{oortConnections → connections/resources/connectionToCourier}/client/index.d.mts +0 -0
  105. /package/dist/esm/api/resources/{oortConnections → connections/resources/connectionToCourier}/client/index.mjs +0 -0
  106. /package/dist/esm/api/resources/{oortConnections → connections/resources/connectionToCourier}/client/requests/CreateConnectionReq.d.mts +0 -0
  107. /package/dist/esm/api/resources/{oortConnections → connections/resources/connectionToCourier}/client/requests/CreateConnectionReq.mjs +0 -0
  108. /package/dist/esm/api/resources/{oortConnections → connections/resources/connectionToCourier}/client/requests/index.d.mts +0 -0
  109. /package/dist/esm/api/resources/{oortConnections → connections/resources/connectionToCourier}/index.d.mts +0 -0
  110. /package/dist/esm/api/resources/{oortConnections → connections/resources/connectionToCourier}/index.mjs +0 -0
  111. /package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/index.d.mts +0 -0
  112. /package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/index.mjs +0 -0
  113. /package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/requests/AddLineItemsReq.mjs +0 -0
  114. /package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups/client/requests/CreateCourierPayDriverLineItemGroupRequest.mjs → courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateRequest.mjs} +0 -0
  115. /package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups/client/requests/GetCalculateCourierPayDriverLineItemGroupRequest.mjs → courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewRequest.mjs} +0 -0
  116. /package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/requests/RemoveLineItemsReq.mjs +0 -0
  117. /package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/index.d.mts +0 -0
  118. /package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/index.mjs +0 -0
  119. /package/dist/esm/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/index.d.mts +0 -0
  120. /package/dist/esm/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/index.mjs +0 -0
  121. /package/dist/esm/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/requests/CourierPayDriverPayoutClientCreate1.d.mts +0 -0
  122. /package/dist/esm/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/requests/CourierPayDriverPayoutClientCreate1.mjs +0 -0
  123. /package/dist/esm/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/requests/index.d.mts +0 -0
  124. /package/dist/esm/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/index.d.mts +0 -0
  125. /package/dist/esm/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/index.mjs +0 -0
package/README.md CHANGED
@@ -23,7 +23,7 @@ Instantiate and use the client with the following:
23
23
  import { ChrtClient } from "@chrt-inc/typescript-sdk";
24
24
 
25
25
  const client = new ChrtClient({ token: "YOUR_TOKEN" });
26
- await client.dev.postTemplate({
26
+ await client.dev.createTemplate({
27
27
  message: "message",
28
28
  number: 1,
29
29
  timestamp: "2024-01-15T09:30:00Z",
@@ -52,7 +52,7 @@ will be thrown.
52
52
  import { ChrtError } from "@chrt-inc/typescript-sdk";
53
53
 
54
54
  try {
55
- await client.dev.postTemplate(...);
55
+ await client.dev.createTemplate(...);
56
56
  } catch (err) {
57
57
  if (err instanceof ChrtError) {
58
58
  console.log(err.statusCode);
@@ -70,7 +70,7 @@ try {
70
70
  If you would like to send additional headers as part of the request, use the `headers` request option.
71
71
 
72
72
  ```typescript
73
- const response = await client.dev.postTemplate(..., {
73
+ const response = await client.dev.createTemplate(..., {
74
74
  headers: {
75
75
  'X-Custom-Header': 'custom value'
76
76
  }
@@ -92,7 +92,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
92
92
  Use the `maxRetries` request option to configure this behavior.
93
93
 
94
94
  ```typescript
95
- const response = await client.dev.postTemplate(..., {
95
+ const response = await client.dev.createTemplate(..., {
96
96
  maxRetries: 0 // override maxRetries at the request level
97
97
  });
98
98
  ```
@@ -102,7 +102,7 @@ const response = await client.dev.postTemplate(..., {
102
102
  The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
103
103
 
104
104
  ```typescript
105
- const response = await client.dev.postTemplate(..., {
105
+ const response = await client.dev.createTemplate(..., {
106
106
  timeoutInSeconds: 30 // override timeout to 30s
107
107
  });
108
108
  ```
@@ -113,7 +113,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa
113
113
 
114
114
  ```typescript
115
115
  const controller = new AbortController();
116
- const response = await client.dev.postTemplate(..., {
116
+ const response = await client.dev.createTemplate(..., {
117
117
  abortSignal: controller.signal
118
118
  });
119
119
  controller.abort(); // aborts the request
@@ -125,7 +125,7 @@ The SDK provides access to raw response data, including headers, through the `.w
125
125
  The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
126
126
 
127
127
  ```typescript
128
- const { data, rawResponse } = await client.dev.postTemplate(...).withRawResponse();
128
+ const { data, rawResponse } = await client.dev.createTemplate(...).withRawResponse();
129
129
 
130
130
  console.log(data);
131
131
  console.log(rawResponse.headers['X-My-Header']);
@@ -5,9 +5,9 @@ import * as environments from "./environments.js";
5
5
  import * as core from "./core/index.js";
6
6
  import { Root } from "./api/resources/root/client/Client.js";
7
7
  import { Dev } from "./api/resources/dev/client/Client.js";
8
- import { OortConnections } from "./api/resources/oortConnections/client/Client.js";
9
- import { OortCourierPayDriverLineItemGroups } from "./api/resources/oortCourierPayDriverLineItemGroups/client/Client.js";
10
- import { OortCourierPayDriverPayouts } from "./api/resources/oortCourierPayDriverPayouts/client/Client.js";
8
+ import { Connections } from "./api/resources/connections/client/Client.js";
9
+ import { CourierPayDriverLineItemGroup } from "./api/resources/courierPayDriverLineItemGroup/client/Client.js";
10
+ import { CourierPayDriverPayouts } from "./api/resources/courierPayDriverPayouts/client/Client.js";
11
11
  import { OortCourierPayDriverRateSheets } from "./api/resources/oortCourierPayDriverRateSheets/client/Client.js";
12
12
  import { OortDrivers } from "./api/resources/oortDrivers/client/Client.js";
13
13
  import { OortMilestoneNotificationPreferences } from "./api/resources/oortMilestoneNotificationPreferences/client/Client.js";
@@ -47,9 +47,9 @@ export declare class ChrtClient {
47
47
  protected readonly _options: ChrtClient.Options;
48
48
  protected _root: Root | undefined;
49
49
  protected _dev: Dev | undefined;
50
- protected _oortConnections: OortConnections | undefined;
51
- protected _oortCourierPayDriverLineItemGroups: OortCourierPayDriverLineItemGroups | undefined;
52
- protected _oortCourierPayDriverPayouts: OortCourierPayDriverPayouts | undefined;
50
+ protected _connections: Connections | undefined;
51
+ protected _courierPayDriverLineItemGroup: CourierPayDriverLineItemGroup | undefined;
52
+ protected _courierPayDriverPayouts: CourierPayDriverPayouts | undefined;
53
53
  protected _oortCourierPayDriverRateSheets: OortCourierPayDriverRateSheets | undefined;
54
54
  protected _oortDrivers: OortDrivers | undefined;
55
55
  protected _oortMilestoneNotificationPreferences: OortMilestoneNotificationPreferences | undefined;
@@ -67,9 +67,9 @@ export declare class ChrtClient {
67
67
  constructor(_options?: ChrtClient.Options);
68
68
  get root(): Root;
69
69
  get dev(): Dev;
70
- get oortConnections(): OortConnections;
71
- get oortCourierPayDriverLineItemGroups(): OortCourierPayDriverLineItemGroups;
72
- get oortCourierPayDriverPayouts(): OortCourierPayDriverPayouts;
70
+ get connections(): Connections;
71
+ get courierPayDriverLineItemGroup(): CourierPayDriverLineItemGroup;
72
+ get courierPayDriverPayouts(): CourierPayDriverPayouts;
73
73
  get oortCourierPayDriverRateSheets(): OortCourierPayDriverRateSheets;
74
74
  get oortDrivers(): OortDrivers;
75
75
  get oortMilestoneNotificationPreferences(): OortMilestoneNotificationPreferences;
@@ -41,9 +41,9 @@ const core = __importStar(require("./core/index.js"));
41
41
  const headers_js_1 = require("./core/headers.js");
42
42
  const Client_js_1 = require("./api/resources/root/client/Client.js");
43
43
  const Client_js_2 = require("./api/resources/dev/client/Client.js");
44
- const Client_js_3 = require("./api/resources/oortConnections/client/Client.js");
45
- const Client_js_4 = require("./api/resources/oortCourierPayDriverLineItemGroups/client/Client.js");
46
- const Client_js_5 = require("./api/resources/oortCourierPayDriverPayouts/client/Client.js");
44
+ const Client_js_3 = require("./api/resources/connections/client/Client.js");
45
+ const Client_js_4 = require("./api/resources/courierPayDriverLineItemGroup/client/Client.js");
46
+ const Client_js_5 = require("./api/resources/courierPayDriverPayouts/client/Client.js");
47
47
  const Client_js_6 = require("./api/resources/oortCourierPayDriverRateSheets/client/Client.js");
48
48
  const Client_js_7 = require("./api/resources/oortDrivers/client/Client.js");
49
49
  const Client_js_8 = require("./api/resources/oortMilestoneNotificationPreferences/client/Client.js");
@@ -63,8 +63,8 @@ class ChrtClient {
63
63
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
64
64
  "X-Fern-Language": "JavaScript",
65
65
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
66
- "X-Fern-SDK-Version": "0.0.170-g",
67
- "User-Agent": "@chrt-inc/typescript-sdk/0.0.170-g",
66
+ "X-Fern-SDK-Version": "0.0.170-h",
67
+ "User-Agent": "@chrt-inc/typescript-sdk/0.0.170-h",
68
68
  "X-Fern-Runtime": core.RUNTIME.type,
69
69
  "X-Fern-Runtime-Version": core.RUNTIME.version,
70
70
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -77,17 +77,17 @@ class ChrtClient {
77
77
  var _a;
78
78
  return ((_a = this._dev) !== null && _a !== void 0 ? _a : (this._dev = new Client_js_2.Dev(this._options)));
79
79
  }
80
- get oortConnections() {
80
+ get connections() {
81
81
  var _a;
82
- return ((_a = this._oortConnections) !== null && _a !== void 0 ? _a : (this._oortConnections = new Client_js_3.OortConnections(this._options)));
82
+ return ((_a = this._connections) !== null && _a !== void 0 ? _a : (this._connections = new Client_js_3.Connections(this._options)));
83
83
  }
84
- get oortCourierPayDriverLineItemGroups() {
84
+ get courierPayDriverLineItemGroup() {
85
85
  var _a;
86
- return ((_a = this._oortCourierPayDriverLineItemGroups) !== null && _a !== void 0 ? _a : (this._oortCourierPayDriverLineItemGroups = new Client_js_4.OortCourierPayDriverLineItemGroups(this._options)));
86
+ return ((_a = this._courierPayDriverLineItemGroup) !== null && _a !== void 0 ? _a : (this._courierPayDriverLineItemGroup = new Client_js_4.CourierPayDriverLineItemGroup(this._options)));
87
87
  }
88
- get oortCourierPayDriverPayouts() {
88
+ get courierPayDriverPayouts() {
89
89
  var _a;
90
- return ((_a = this._oortCourierPayDriverPayouts) !== null && _a !== void 0 ? _a : (this._oortCourierPayDriverPayouts = new Client_js_5.OortCourierPayDriverPayouts(this._options)));
90
+ return ((_a = this._courierPayDriverPayouts) !== null && _a !== void 0 ? _a : (this._courierPayDriverPayouts = new Client_js_5.CourierPayDriverPayouts(this._options)));
91
91
  }
92
92
  get oortCourierPayDriverRateSheets() {
93
93
  var _a;
@@ -0,0 +1,51 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments.js";
5
+ import * as core from "../../../../core/index.js";
6
+ import * as Chrt from "../../../index.js";
7
+ import { ConnectionToCourier } from "../resources/connectionToCourier/client/Client.js";
8
+ export declare namespace Connections {
9
+ interface Options {
10
+ environment?: core.Supplier<environments.ChrtEnvironment | string>;
11
+ /** Specify a custom URL to connect the client to. */
12
+ baseUrl?: core.Supplier<string>;
13
+ token?: core.Supplier<core.BearerToken | undefined>;
14
+ /** Additional headers to include in requests. */
15
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
16
+ fetcher?: core.FetchFunction;
17
+ }
18
+ interface RequestOptions {
19
+ /** The maximum time to wait for a response in seconds. */
20
+ timeoutInSeconds?: number;
21
+ /** The number of times to retry the request. Defaults to 2. */
22
+ maxRetries?: number;
23
+ /** A hook to abort the request. */
24
+ abortSignal?: AbortSignal;
25
+ /** Additional headers to include in the request. */
26
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
27
+ }
28
+ }
29
+ export declare class Connections {
30
+ protected readonly _options: Connections.Options;
31
+ protected _connectionToCourier: ConnectionToCourier | undefined;
32
+ constructor(_options?: Connections.Options);
33
+ get connectionToCourier(): ConnectionToCourier;
34
+ /**
35
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
36
+ *
37
+ * @example
38
+ * await client.connections.listCouriers()
39
+ */
40
+ listCouriers(requestOptions?: Connections.RequestOptions): core.HttpResponsePromise<Chrt.CourierOrgConnectionInfo1[]>;
41
+ private __listCouriers;
42
+ /**
43
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
44
+ *
45
+ * @example
46
+ * await client.connections.listShippers()
47
+ */
48
+ listShippers(requestOptions?: Connections.RequestOptions): core.HttpResponsePromise<Chrt.ShipperOrgConnectionInfo1[]>;
49
+ private __listShippers;
50
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
51
+ }
@@ -45,30 +45,34 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
45
45
  });
46
46
  };
47
47
  Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.OortConnections = void 0;
48
+ exports.Connections = void 0;
49
49
  const environments = __importStar(require("../../../../environments.js"));
50
50
  const core = __importStar(require("../../../../core/index.js"));
51
- const Chrt = __importStar(require("../../../index.js"));
52
51
  const headers_js_1 = require("../../../../core/headers.js");
53
52
  const errors = __importStar(require("../../../../errors/index.js"));
54
- class OortConnections {
53
+ const Client_js_1 = require("../resources/connectionToCourier/client/Client.js");
54
+ class Connections {
55
55
  constructor(_options = {}) {
56
56
  this._options = _options;
57
57
  }
58
+ get connectionToCourier() {
59
+ var _a;
60
+ return ((_a = this._connectionToCourier) !== null && _a !== void 0 ? _a : (this._connectionToCourier = new Client_js_1.ConnectionToCourier(this._options)));
61
+ }
58
62
  /**
59
- * @param {OortConnections.RequestOptions} requestOptions - Request-specific configuration.
63
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
60
64
  *
61
65
  * @example
62
- * await client.oortConnections.getConnectionsInfoForCouriers()
66
+ * await client.connections.listCouriers()
63
67
  */
64
- getConnectionsInfoForCouriers(requestOptions) {
65
- return core.HttpResponsePromise.fromPromise(this.__getConnectionsInfoForCouriers(requestOptions));
68
+ listCouriers(requestOptions) {
69
+ return core.HttpResponsePromise.fromPromise(this.__listCouriers(requestOptions));
66
70
  }
67
- __getConnectionsInfoForCouriers(requestOptions) {
71
+ __listCouriers(requestOptions) {
68
72
  return __awaiter(this, void 0, void 0, function* () {
69
73
  var _a, _b, _c, _d;
70
74
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
71
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/connections/connections_info_for_couriers"),
75
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/connections/couriers/list"),
72
76
  method: "GET",
73
77
  headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
74
78
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -93,7 +97,7 @@ class OortConnections {
93
97
  rawResponse: _response.rawResponse,
94
98
  });
95
99
  case "timeout":
96
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/connections/connections_info_for_couriers.");
100
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/connections/couriers/list.");
97
101
  case "unknown":
98
102
  throw new errors.ChrtError({
99
103
  message: _response.error.errorMessage,
@@ -103,19 +107,19 @@ class OortConnections {
103
107
  });
104
108
  }
105
109
  /**
106
- * @param {OortConnections.RequestOptions} requestOptions - Request-specific configuration.
110
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
107
111
  *
108
112
  * @example
109
- * await client.oortConnections.getConnectionsInfoForShippers()
113
+ * await client.connections.listShippers()
110
114
  */
111
- getConnectionsInfoForShippers(requestOptions) {
112
- return core.HttpResponsePromise.fromPromise(this.__getConnectionsInfoForShippers(requestOptions));
115
+ listShippers(requestOptions) {
116
+ return core.HttpResponsePromise.fromPromise(this.__listShippers(requestOptions));
113
117
  }
114
- __getConnectionsInfoForShippers(requestOptions) {
118
+ __listShippers(requestOptions) {
115
119
  return __awaiter(this, void 0, void 0, function* () {
116
120
  var _a, _b, _c, _d;
117
121
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
118
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/connections/connections_info_for_shippers"),
122
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/connections/shippers/list"),
119
123
  method: "GET",
120
124
  headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
121
125
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -140,69 +144,7 @@ class OortConnections {
140
144
  rawResponse: _response.rawResponse,
141
145
  });
142
146
  case "timeout":
143
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/connections/connections_info_for_shippers.");
144
- case "unknown":
145
- throw new errors.ChrtError({
146
- message: _response.error.errorMessage,
147
- rawResponse: _response.rawResponse,
148
- });
149
- }
150
- });
151
- }
152
- /**
153
- * Body: Courier Handle, Shipper Org Id from JWT
154
- *
155
- * @param {Chrt.CreateConnectionReq} request
156
- * @param {OortConnections.RequestOptions} requestOptions - Request-specific configuration.
157
- *
158
- * @throws {@link Chrt.UnprocessableEntityError}
159
- *
160
- * @example
161
- * await client.oortConnections.createConnectionToCourier({
162
- * handle: "handle"
163
- * })
164
- */
165
- createConnectionToCourier(request, requestOptions) {
166
- return core.HttpResponsePromise.fromPromise(this.__createConnectionToCourier(request, requestOptions));
167
- }
168
- __createConnectionToCourier(request, requestOptions) {
169
- return __awaiter(this, void 0, void 0, function* () {
170
- var _a, _b, _c, _d;
171
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
172
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/connections/create_connection_to_courier"),
173
- method: "POST",
174
- headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
175
- contentType: "application/json",
176
- requestType: "json",
177
- body: request,
178
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
179
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
180
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
181
- });
182
- if (_response.ok) {
183
- return { data: _response.body, rawResponse: _response.rawResponse };
184
- }
185
- if (_response.error.reason === "status-code") {
186
- switch (_response.error.statusCode) {
187
- case 422:
188
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
189
- default:
190
- throw new errors.ChrtError({
191
- statusCode: _response.error.statusCode,
192
- body: _response.error.body,
193
- rawResponse: _response.rawResponse,
194
- });
195
- }
196
- }
197
- switch (_response.error.reason) {
198
- case "non-json":
199
- throw new errors.ChrtError({
200
- statusCode: _response.error.statusCode,
201
- body: _response.error.rawBody,
202
- rawResponse: _response.rawResponse,
203
- });
204
- case "timeout":
205
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/connections/create_connection_to_courier.");
147
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/connections/shippers/list.");
206
148
  case "unknown":
207
149
  throw new errors.ChrtError({
208
150
  message: _response.error.errorMessage,
@@ -221,4 +163,4 @@ class OortConnections {
221
163
  });
222
164
  }
223
165
  }
224
- exports.OortConnections = OortConnections;
166
+ exports.Connections = Connections;
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.js";
2
+ export * from "./resources/index.js";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
18
+ __exportStar(require("./resources/index.js"), exports);
@@ -0,0 +1,47 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../environments.js";
5
+ import * as core from "../../../../../../core/index.js";
6
+ import * as Chrt from "../../../../../index.js";
7
+ export declare namespace ConnectionToCourier {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.ChrtEnvironment | string>;
10
+ /** Specify a custom URL to connect the client to. */
11
+ baseUrl?: core.Supplier<string>;
12
+ token?: core.Supplier<core.BearerToken | undefined>;
13
+ /** Additional headers to include in requests. */
14
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
15
+ fetcher?: core.FetchFunction;
16
+ }
17
+ interface RequestOptions {
18
+ /** The maximum time to wait for a response in seconds. */
19
+ timeoutInSeconds?: number;
20
+ /** The number of times to retry the request. Defaults to 2. */
21
+ maxRetries?: number;
22
+ /** A hook to abort the request. */
23
+ abortSignal?: AbortSignal;
24
+ /** Additional headers to include in the request. */
25
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
26
+ }
27
+ }
28
+ export declare class ConnectionToCourier {
29
+ protected readonly _options: ConnectionToCourier.Options;
30
+ constructor(_options?: ConnectionToCourier.Options);
31
+ /**
32
+ * Body: Courier Handle, Shipper Org Id from JWT
33
+ *
34
+ * @param {Chrt.connections.CreateConnectionReq} request
35
+ * @param {ConnectionToCourier.RequestOptions} requestOptions - Request-specific configuration.
36
+ *
37
+ * @throws {@link Chrt.UnprocessableEntityError}
38
+ *
39
+ * @example
40
+ * await client.connections.connectionToCourier.create({
41
+ * handle: "handle"
42
+ * })
43
+ */
44
+ create(request: Chrt.connections.CreateConnectionReq, requestOptions?: ConnectionToCourier.RequestOptions): core.HttpResponsePromise<string>;
45
+ private __create;
46
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
47
+ }
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.ConnectionToCourier = void 0;
49
+ const environments = __importStar(require("../../../../../../environments.js"));
50
+ const core = __importStar(require("../../../../../../core/index.js"));
51
+ const Chrt = __importStar(require("../../../../../index.js"));
52
+ const headers_js_1 = require("../../../../../../core/headers.js");
53
+ const errors = __importStar(require("../../../../../../errors/index.js"));
54
+ class ConnectionToCourier {
55
+ constructor(_options = {}) {
56
+ this._options = _options;
57
+ }
58
+ /**
59
+ * Body: Courier Handle, Shipper Org Id from JWT
60
+ *
61
+ * @param {Chrt.connections.CreateConnectionReq} request
62
+ * @param {ConnectionToCourier.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link Chrt.UnprocessableEntityError}
65
+ *
66
+ * @example
67
+ * await client.connections.connectionToCourier.create({
68
+ * handle: "handle"
69
+ * })
70
+ */
71
+ create(request, requestOptions) {
72
+ return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
73
+ }
74
+ __create(request, requestOptions) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ var _a, _b, _c, _d;
77
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
78
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/connections/connection_to_courier/create"),
79
+ method: "POST",
80
+ headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
+ contentType: "application/json",
82
+ requestType: "json",
83
+ body: request,
84
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
85
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
86
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
87
+ });
88
+ if (_response.ok) {
89
+ return { data: _response.body, rawResponse: _response.rawResponse };
90
+ }
91
+ if (_response.error.reason === "status-code") {
92
+ switch (_response.error.statusCode) {
93
+ case 422:
94
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
95
+ default:
96
+ throw new errors.ChrtError({
97
+ statusCode: _response.error.statusCode,
98
+ body: _response.error.body,
99
+ rawResponse: _response.rawResponse,
100
+ });
101
+ }
102
+ }
103
+ switch (_response.error.reason) {
104
+ case "non-json":
105
+ throw new errors.ChrtError({
106
+ statusCode: _response.error.statusCode,
107
+ body: _response.error.rawBody,
108
+ rawResponse: _response.rawResponse,
109
+ });
110
+ case "timeout":
111
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/connections/connection_to_courier/create.");
112
+ case "unknown":
113
+ throw new errors.ChrtError({
114
+ message: _response.error.errorMessage,
115
+ rawResponse: _response.rawResponse,
116
+ });
117
+ }
118
+ });
119
+ }
120
+ _getAuthorizationHeader() {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ const bearer = yield core.Supplier.get(this._options.token);
123
+ if (bearer != null) {
124
+ return `Bearer ${bearer}`;
125
+ }
126
+ return undefined;
127
+ });
128
+ }
129
+ }
130
+ exports.ConnectionToCourier = ConnectionToCourier;
@@ -0,0 +1,2 @@
1
+ export * as connectionToCourier from "./connectionToCourier/index.js";
2
+ export * from "./connectionToCourier/client/requests/index.js";
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.connectionToCourier = void 0;
40
+ exports.connectionToCourier = __importStar(require("./connectionToCourier/index.js"));
41
+ __exportStar(require("./connectionToCourier/client/requests/index.js"), exports);