@chrt-inc/typescript-sdk 1.308.0 → 1.311.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/dist/cjs/Client.d.ts +3 -3
  2. package/dist/cjs/Client.js +5 -5
  3. package/dist/cjs/api/index.d.ts +1 -1
  4. package/dist/cjs/api/index.js +1 -1
  5. package/dist/cjs/api/resources/connections/client/Client.d.ts +13 -0
  6. package/dist/cjs/api/resources/connections/client/Client.js +63 -0
  7. package/dist/cjs/api/resources/connections/index.d.ts +1 -0
  8. package/dist/cjs/api/resources/connections/index.js +1 -0
  9. package/dist/cjs/api/resources/connections/types/ConnectionsGetByHandleV1Response.d.ts +5 -0
  10. package/dist/cjs/api/resources/connections/types/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/connections/types/index.js +17 -0
  12. package/dist/cjs/api/resources/index.d.ts +3 -2
  13. package/dist/cjs/api/resources/index.js +4 -3
  14. package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/Client.d.ts +7 -4
  15. package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/Client.js +8 -3
  16. package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/Client.d.ts +17 -7
  17. package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/Client.js +62 -11
  18. package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/Client.d.ts +63 -0
  19. package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/Client.js +195 -0
  20. package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/requests/ForwarderOrgInfoForConnectionsClientCreate1.d.ts +24 -0
  21. package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/requests/ForwarderOrgInfoForConnectionsClientUpdate1.d.ts +20 -0
  22. package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/requests/ForwarderOrgInfoForConnectionsClientUpdate1.js +5 -0
  23. package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/requests/index.d.ts +2 -0
  24. package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/index.d.ts +2 -0
  25. package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/index.js +3 -1
  26. package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/Client.d.ts +7 -7
  27. package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/Client.js +11 -11
  28. package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/client/index.d.ts +2 -0
  29. package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/client/index.js +17 -0
  30. package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientCreate1.js +5 -0
  31. package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientUpdate1.js +5 -0
  32. package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/client/requests/index.js +2 -0
  33. package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/index.d.ts +1 -0
  34. package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/index.js +17 -0
  35. package/dist/cjs/api/resources/shipperPayCourierRateSheets/client/requests/ShipperPayCourierRateSheetClientCreate1.d.ts +3 -3
  36. package/dist/cjs/api/types/Cargo1.d.ts +1 -1
  37. package/dist/cjs/api/types/ForwarderCourierConnection1.d.ts +13 -0
  38. package/dist/cjs/api/types/ForwarderCourierConnection1.js +5 -0
  39. package/dist/cjs/api/types/Order1.d.ts +1 -1
  40. package/dist/cjs/api/types/ShipperCourierConnection1.d.ts +13 -0
  41. package/dist/cjs/api/types/ShipperCourierConnection1.js +5 -0
  42. package/dist/cjs/api/types/ShipperForwarderConnection1.d.ts +13 -0
  43. package/dist/cjs/api/types/ShipperForwarderConnection1.js +5 -0
  44. package/dist/cjs/api/types/ShipperPayCourierRateSheet1.d.ts +3 -3
  45. package/dist/cjs/api/types/Task1.d.ts +7 -7
  46. package/dist/cjs/api/types/TaskClientCreate1.d.ts +1 -1
  47. package/dist/cjs/api/types/TaskClientUpdate1.d.ts +2 -2
  48. package/dist/cjs/api/types/index.d.ts +3 -0
  49. package/dist/cjs/api/types/index.js +3 -0
  50. package/dist/cjs/version.d.ts +1 -1
  51. package/dist/cjs/version.js +1 -1
  52. package/dist/esm/Client.d.mts +3 -3
  53. package/dist/esm/Client.mjs +5 -5
  54. package/dist/esm/api/index.d.mts +1 -1
  55. package/dist/esm/api/index.mjs +1 -1
  56. package/dist/esm/api/resources/connections/client/Client.d.mts +13 -0
  57. package/dist/esm/api/resources/connections/client/Client.mjs +63 -0
  58. package/dist/esm/api/resources/connections/index.d.mts +1 -0
  59. package/dist/esm/api/resources/connections/index.mjs +1 -0
  60. package/dist/esm/api/resources/connections/types/ConnectionsGetByHandleV1Response.d.mts +5 -0
  61. package/dist/esm/api/resources/connections/types/index.d.mts +1 -0
  62. package/dist/esm/api/resources/connections/types/index.mjs +1 -0
  63. package/dist/esm/api/resources/index.d.mts +3 -2
  64. package/dist/esm/api/resources/index.mjs +3 -2
  65. package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/Client.d.mts +7 -4
  66. package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/Client.mjs +6 -1
  67. package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/Client.d.mts +17 -7
  68. package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/Client.mjs +62 -11
  69. package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/Client.d.mts +63 -0
  70. package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/Client.mjs +158 -0
  71. package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/requests/ForwarderOrgInfoForConnectionsClientCreate1.d.mts +24 -0
  72. package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/requests/ForwarderOrgInfoForConnectionsClientUpdate1.d.mts +20 -0
  73. package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/requests/ForwarderOrgInfoForConnectionsClientUpdate1.mjs +4 -0
  74. package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/requests/index.d.mts +2 -0
  75. package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/index.d.mts +2 -0
  76. package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/index.mjs +2 -0
  77. package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/Client.d.mts +7 -7
  78. package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/Client.mjs +11 -11
  79. package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/client/index.d.mts +2 -0
  80. package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/client/index.mjs +1 -0
  81. package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientCreate1.mjs +4 -0
  82. package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientUpdate1.mjs +4 -0
  83. package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/client/requests/index.mjs +1 -0
  84. package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/index.d.mts +1 -0
  85. package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/index.mjs +1 -0
  86. package/dist/esm/api/resources/shipperPayCourierRateSheets/client/requests/ShipperPayCourierRateSheetClientCreate1.d.mts +3 -3
  87. package/dist/esm/api/types/Cargo1.d.mts +1 -1
  88. package/dist/esm/api/types/ForwarderCourierConnection1.d.mts +13 -0
  89. package/dist/esm/api/types/ForwarderCourierConnection1.mjs +4 -0
  90. package/dist/esm/api/types/Order1.d.mts +1 -1
  91. package/dist/esm/api/types/ShipperCourierConnection1.d.mts +13 -0
  92. package/dist/esm/api/types/ShipperCourierConnection1.mjs +4 -0
  93. package/dist/esm/api/types/ShipperForwarderConnection1.d.mts +13 -0
  94. package/dist/esm/api/types/ShipperForwarderConnection1.mjs +4 -0
  95. package/dist/esm/api/types/ShipperPayCourierRateSheet1.d.mts +3 -3
  96. package/dist/esm/api/types/Task1.d.mts +7 -7
  97. package/dist/esm/api/types/TaskClientCreate1.d.mts +1 -1
  98. package/dist/esm/api/types/TaskClientUpdate1.d.mts +2 -2
  99. package/dist/esm/api/types/index.d.mts +3 -0
  100. package/dist/esm/api/types/index.mjs +3 -0
  101. package/dist/esm/version.d.mts +1 -1
  102. package/dist/esm/version.mjs +1 -1
  103. package/package.json +1 -1
  104. package/reference.md +267 -18
  105. /package/dist/cjs/api/resources/{orgConnectionInfos/resources/courier/client/requests/CourierOrgInfoForConnectionsClientCreate1.js → connections/types/ConnectionsGetByHandleV1Response.js} +0 -0
  106. /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/index.d.ts +0 -0
  107. /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/index.js +0 -0
  108. /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/index.d.ts +0 -0
  109. /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/index.js +0 -0
  110. /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/index.d.ts +0 -0
  111. /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/index.js +0 -0
  112. /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/requests/CourierOrgInfoForConnectionsClientCreate1.d.ts +0 -0
  113. /package/dist/cjs/api/resources/{orgConnectionInfos/resources/courier/client/requests/CourierOrgInfoForConnectionsClientUpdate1.js → orgInfoForConnections/resources/courier/client/requests/CourierOrgInfoForConnectionsClientCreate1.js} +0 -0
  114. /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/requests/CourierOrgInfoForConnectionsClientUpdate1.d.ts +0 -0
  115. /package/dist/cjs/api/resources/{orgConnectionInfos/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientCreate1.js → orgInfoForConnections/resources/courier/client/requests/CourierOrgInfoForConnectionsClientUpdate1.js} +0 -0
  116. /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/requests/index.d.ts +0 -0
  117. /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/requests/index.js +0 -0
  118. /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/index.d.ts +0 -0
  119. /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/index.js +0 -0
  120. /package/dist/cjs/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/client/index.d.ts +0 -0
  121. /package/dist/cjs/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/client/index.js +0 -0
  122. /package/dist/cjs/api/resources/{orgConnectionInfos/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientUpdate1.js → orgInfoForConnections/resources/forwarder/client/requests/ForwarderOrgInfoForConnectionsClientCreate1.js} +0 -0
  123. /package/dist/cjs/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/client/requests/index.js +0 -0
  124. /package/dist/cjs/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/index.d.ts +0 -0
  125. /package/dist/cjs/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/index.js +0 -0
  126. /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientCreate1.d.ts +0 -0
  127. /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientUpdate1.d.ts +0 -0
  128. /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/requests/index.d.ts +0 -0
  129. /package/dist/esm/api/resources/{orgConnectionInfos/resources/courier/client/requests/CourierOrgInfoForConnectionsClientCreate1.mjs → connections/types/ConnectionsGetByHandleV1Response.mjs} +0 -0
  130. /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/index.d.mts +0 -0
  131. /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/index.mjs +0 -0
  132. /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/index.d.mts +0 -0
  133. /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/index.mjs +0 -0
  134. /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/index.d.mts +0 -0
  135. /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/index.mjs +0 -0
  136. /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/requests/CourierOrgInfoForConnectionsClientCreate1.d.mts +0 -0
  137. /package/dist/esm/api/resources/{orgConnectionInfos/resources/courier/client/requests/CourierOrgInfoForConnectionsClientUpdate1.mjs → orgInfoForConnections/resources/courier/client/requests/CourierOrgInfoForConnectionsClientCreate1.mjs} +0 -0
  138. /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/requests/CourierOrgInfoForConnectionsClientUpdate1.d.mts +0 -0
  139. /package/dist/esm/api/resources/{orgConnectionInfos/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientCreate1.mjs → orgInfoForConnections/resources/courier/client/requests/CourierOrgInfoForConnectionsClientUpdate1.mjs} +0 -0
  140. /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/requests/index.d.mts +0 -0
  141. /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/requests/index.mjs +0 -0
  142. /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/index.d.mts +0 -0
  143. /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/index.mjs +0 -0
  144. /package/dist/esm/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/client/index.d.mts +0 -0
  145. /package/dist/esm/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/client/index.mjs +0 -0
  146. /package/dist/esm/api/resources/{orgConnectionInfos/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientUpdate1.mjs → orgInfoForConnections/resources/forwarder/client/requests/ForwarderOrgInfoForConnectionsClientCreate1.mjs} +0 -0
  147. /package/dist/esm/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/client/requests/index.mjs +0 -0
  148. /package/dist/esm/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/index.d.mts +0 -0
  149. /package/dist/esm/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/index.mjs +0 -0
  150. /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientCreate1.d.mts +0 -0
  151. /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientUpdate1.d.mts +0 -0
  152. /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/requests/index.d.mts +0 -0
@@ -28,7 +28,7 @@ import { Root } from "./api/resources/root/client/Client.js";
28
28
  import { Users } from "./api/resources/users/client/Client.js";
29
29
  import { Utils } from "./api/resources/utils/client/Client.js";
30
30
  import { Notifications } from "./api/resources/notifications/client/Client.js";
31
- import { OrgConnectionInfos } from "./api/resources/orgConnectionInfos/client/Client.js";
31
+ import { OrgInfoForConnections } from "./api/resources/orgInfoForConnections/client/Client.js";
32
32
  import { Tracking } from "./api/resources/tracking/client/Client.js";
33
33
  export declare namespace ChrtClient {
34
34
  interface Options {
@@ -80,7 +80,7 @@ export declare class ChrtClient {
80
80
  protected _users: Users | undefined;
81
81
  protected _utils: Utils | undefined;
82
82
  protected _notifications: Notifications | undefined;
83
- protected _orgConnectionInfos: OrgConnectionInfos | undefined;
83
+ protected _orgInfoForConnections: OrgInfoForConnections | undefined;
84
84
  protected _tracking: Tracking | undefined;
85
85
  constructor(_options?: ChrtClient.Options);
86
86
  get payments(): Payments;
@@ -108,6 +108,6 @@ export declare class ChrtClient {
108
108
  get users(): Users;
109
109
  get utils(): Utils;
110
110
  get notifications(): Notifications;
111
- get orgConnectionInfos(): OrgConnectionInfos;
111
+ get orgInfoForConnections(): OrgInfoForConnections;
112
112
  get tracking(): Tracking;
113
113
  }
@@ -64,15 +64,15 @@ const Client_js_22 = require("./api/resources/root/client/Client.js");
64
64
  const Client_js_23 = require("./api/resources/users/client/Client.js");
65
65
  const Client_js_24 = require("./api/resources/utils/client/Client.js");
66
66
  const Client_js_25 = require("./api/resources/notifications/client/Client.js");
67
- const Client_js_26 = require("./api/resources/orgConnectionInfos/client/Client.js");
67
+ const Client_js_26 = require("./api/resources/orgInfoForConnections/client/Client.js");
68
68
  const Client_js_27 = require("./api/resources/tracking/client/Client.js");
69
69
  class ChrtClient {
70
70
  constructor(_options = {}) {
71
71
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
72
72
  "X-Fern-Language": "JavaScript",
73
73
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
74
- "X-Fern-SDK-Version": "1.308.0",
75
- "User-Agent": "@chrt-inc/typescript-sdk/1.308.0",
74
+ "X-Fern-SDK-Version": "1.311.0",
75
+ "User-Agent": "@chrt-inc/typescript-sdk/1.311.0",
76
76
  "X-Fern-Runtime": core.RUNTIME.type,
77
77
  "X-Fern-Runtime-Version": core.RUNTIME.version,
78
78
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -177,9 +177,9 @@ class ChrtClient {
177
177
  var _a;
178
178
  return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Client_js_25.Notifications(this._options)));
179
179
  }
180
- get orgConnectionInfos() {
180
+ get orgInfoForConnections() {
181
181
  var _a;
182
- return ((_a = this._orgConnectionInfos) !== null && _a !== void 0 ? _a : (this._orgConnectionInfos = new Client_js_26.OrgConnectionInfos(this._options)));
182
+ return ((_a = this._orgInfoForConnections) !== null && _a !== void 0 ? _a : (this._orgInfoForConnections = new Client_js_26.OrgInfoForConnections(this._options)));
183
183
  }
184
184
  get tracking() {
185
185
  var _a;
@@ -1,3 +1,3 @@
1
+ export * from "./resources/index.js";
1
2
  export * from "./types/index.js";
2
3
  export * from "./errors/index.js";
3
- export * from "./resources/index.js";
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./resources/index.js"), exports);
17
18
  __exportStar(require("./types/index.js"), exports);
18
19
  __exportStar(require("./errors/index.js"), exports);
19
- __exportStar(require("./resources/index.js"), exports);
@@ -69,5 +69,18 @@ export declare class Connections {
69
69
  */
70
70
  listForwardersV1(requestOptions?: Connections.RequestOptions): core.HttpResponsePromise<Chrt.ForwarderConnectionRes[]>;
71
71
  private __listForwardersV1;
72
+ /**
73
+ * Gets connection between authenticated org and org with specified handle. | () -> (ShipperCourierConnection1 | ShipperForwarderConnection1 | ForwarderCourierConnection1 | None)
74
+ *
75
+ * @param {string} handle
76
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
77
+ *
78
+ * @throws {@link Chrt.UnprocessableEntityError}
79
+ *
80
+ * @example
81
+ * await client.connections.getByHandleV1("handle")
82
+ */
83
+ getByHandleV1(handle: string, requestOptions?: Connections.RequestOptions): core.HttpResponsePromise<(Chrt.ConnectionsGetByHandleV1Response | null) | undefined>;
84
+ private __getByHandleV1;
72
85
  protected _getAuthorizationHeader(): Promise<string | undefined>;
73
86
  }
@@ -48,6 +48,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
48
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"));
51
52
  const headers_js_1 = require("../../../../core/headers.js");
52
53
  const errors = __importStar(require("../../../../errors/index.js"));
53
54
  const Client_js_1 = require("../resources/connectionToCourier/client/Client.js");
@@ -222,6 +223,68 @@ class Connections {
222
223
  }
223
224
  });
224
225
  }
226
+ /**
227
+ * Gets connection between authenticated org and org with specified handle. | () -> (ShipperCourierConnection1 | ShipperForwarderConnection1 | ForwarderCourierConnection1 | None)
228
+ *
229
+ * @param {string} handle
230
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
231
+ *
232
+ * @throws {@link Chrt.UnprocessableEntityError}
233
+ *
234
+ * @example
235
+ * await client.connections.getByHandleV1("handle")
236
+ */
237
+ getByHandleV1(handle, requestOptions) {
238
+ return core.HttpResponsePromise.fromPromise(this.__getByHandleV1(handle, requestOptions));
239
+ }
240
+ __getByHandleV1(handle, requestOptions) {
241
+ return __awaiter(this, void 0, void 0, function* () {
242
+ var _a, _b, _c, _d;
243
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
244
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
245
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `connections/by_handle/${encodeURIComponent(handle)}/v1`),
246
+ method: "GET",
247
+ headers: _headers,
248
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
249
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
250
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
251
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
252
+ });
253
+ if (_response.ok) {
254
+ return {
255
+ data: _response.body,
256
+ rawResponse: _response.rawResponse,
257
+ };
258
+ }
259
+ if (_response.error.reason === "status-code") {
260
+ switch (_response.error.statusCode) {
261
+ case 422:
262
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
263
+ default:
264
+ throw new errors.ChrtError({
265
+ statusCode: _response.error.statusCode,
266
+ body: _response.error.body,
267
+ rawResponse: _response.rawResponse,
268
+ });
269
+ }
270
+ }
271
+ switch (_response.error.reason) {
272
+ case "non-json":
273
+ throw new errors.ChrtError({
274
+ statusCode: _response.error.statusCode,
275
+ body: _response.error.rawBody,
276
+ rawResponse: _response.rawResponse,
277
+ });
278
+ case "timeout":
279
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /connections/by_handle/{handle}/v1.");
280
+ case "unknown":
281
+ throw new errors.ChrtError({
282
+ message: _response.error.errorMessage,
283
+ rawResponse: _response.rawResponse,
284
+ });
285
+ }
286
+ });
287
+ }
225
288
  _getAuthorizationHeader() {
226
289
  return __awaiter(this, void 0, void 0, function* () {
227
290
  const bearer = yield core.Supplier.get(this._options.token);
@@ -1,2 +1,3 @@
1
+ export * from "./types/index.js";
1
2
  export * from "./client/index.js";
2
3
  export * from "./resources/index.js";
@@ -14,5 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types/index.js"), exports);
17
18
  __exportStar(require("./client/index.js"), exports);
18
19
  __exportStar(require("./resources/index.js"), exports);
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../../../index.js";
5
+ export type ConnectionsGetByHandleV1Response = Chrt.ShipperCourierConnection1 | Chrt.ShipperForwarderConnection1 | Chrt.ForwarderCourierConnection1;
@@ -0,0 +1 @@
1
+ export * from "./ConnectionsGetByHandleV1Response.js";
@@ -0,0 +1,17 @@
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("./ConnectionsGetByHandleV1Response.js"), exports);
@@ -1,3 +1,5 @@
1
+ export * as connections from "./connections/index.js";
2
+ export * from "./connections/types/index.js";
1
3
  export * as payments from "./payments/index.js";
2
4
  export * as courierPayDriverLineItemGroups from "./courierPayDriverLineItemGroups/index.js";
3
5
  export * as courierPayDriverPayouts from "./courierPayDriverPayouts/index.js";
@@ -7,7 +9,6 @@ export * as shipperPayCourierLineItemGroups from "./shipperPayCourierLineItemGro
7
9
  export * as shipperPayCourierPayments from "./shipperPayCourierPayments/index.js";
8
10
  export * as shipperPayCourierRateSheets from "./shipperPayCourierRateSheets/index.js";
9
11
  export * as shipperPayCourierStatements from "./shipperPayCourierStatements/index.js";
10
- export * as connections from "./connections/index.js";
11
12
  export * as orgProfiles from "./orgProfiles/index.js";
12
13
  export * as dev from "./dev/index.js";
13
14
  export * as taskArtifactNotifications from "./taskArtifactNotifications/index.js";
@@ -23,7 +24,7 @@ export * as root from "./root/index.js";
23
24
  export * as users from "./users/index.js";
24
25
  export * as utils from "./utils/index.js";
25
26
  export * as notifications from "./notifications/index.js";
26
- export * as orgConnectionInfos from "./orgConnectionInfos/index.js";
27
+ export * as orgInfoForConnections from "./orgInfoForConnections/index.js";
27
28
  export * as tracking from "./tracking/index.js";
28
29
  export * from "./payments/client/requests/index.js";
29
30
  export * from "./courierPayDriverRateSheets/client/requests/index.js";
@@ -36,7 +36,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.tracking = exports.orgConnectionInfos = exports.notifications = exports.utils = exports.users = exports.root = exports.orgs = exports.shipperContactInfo = exports.taskGroups = exports.orderDrafts = exports.orders = exports.offChrtShipperOrg = exports.taskArtifacts = exports.drivers = exports.taskArtifactNotifications = exports.dev = exports.orgProfiles = exports.connections = exports.shipperPayCourierStatements = exports.shipperPayCourierRateSheets = exports.shipperPayCourierPayments = exports.shipperPayCourierLineItemGroups = exports.courierPayDriverStatements = exports.courierPayDriverRateSheets = exports.courierPayDriverPayouts = exports.courierPayDriverLineItemGroups = exports.payments = void 0;
39
+ exports.tracking = exports.orgInfoForConnections = exports.notifications = exports.utils = exports.users = exports.root = exports.orgs = exports.shipperContactInfo = exports.taskGroups = exports.orderDrafts = exports.orders = exports.offChrtShipperOrg = exports.taskArtifacts = exports.drivers = exports.taskArtifactNotifications = exports.dev = exports.orgProfiles = exports.shipperPayCourierStatements = exports.shipperPayCourierRateSheets = exports.shipperPayCourierPayments = exports.shipperPayCourierLineItemGroups = exports.courierPayDriverStatements = exports.courierPayDriverRateSheets = exports.courierPayDriverPayouts = exports.courierPayDriverLineItemGroups = exports.payments = exports.connections = void 0;
40
+ exports.connections = __importStar(require("./connections/index.js"));
41
+ __exportStar(require("./connections/types/index.js"), exports);
40
42
  exports.payments = __importStar(require("./payments/index.js"));
41
43
  exports.courierPayDriverLineItemGroups = __importStar(require("./courierPayDriverLineItemGroups/index.js"));
42
44
  exports.courierPayDriverPayouts = __importStar(require("./courierPayDriverPayouts/index.js"));
@@ -46,7 +48,6 @@ exports.shipperPayCourierLineItemGroups = __importStar(require("./shipperPayCour
46
48
  exports.shipperPayCourierPayments = __importStar(require("./shipperPayCourierPayments/index.js"));
47
49
  exports.shipperPayCourierRateSheets = __importStar(require("./shipperPayCourierRateSheets/index.js"));
48
50
  exports.shipperPayCourierStatements = __importStar(require("./shipperPayCourierStatements/index.js"));
49
- exports.connections = __importStar(require("./connections/index.js"));
50
51
  exports.orgProfiles = __importStar(require("./orgProfiles/index.js"));
51
52
  exports.dev = __importStar(require("./dev/index.js"));
52
53
  exports.taskArtifactNotifications = __importStar(require("./taskArtifactNotifications/index.js"));
@@ -62,7 +63,7 @@ exports.root = __importStar(require("./root/index.js"));
62
63
  exports.users = __importStar(require("./users/index.js"));
63
64
  exports.utils = __importStar(require("./utils/index.js"));
64
65
  exports.notifications = __importStar(require("./notifications/index.js"));
65
- exports.orgConnectionInfos = __importStar(require("./orgConnectionInfos/index.js"));
66
+ exports.orgInfoForConnections = __importStar(require("./orgInfoForConnections/index.js"));
66
67
  exports.tracking = __importStar(require("./tracking/index.js"));
67
68
  __exportStar(require("./payments/client/requests/index.js"), exports);
68
69
  __exportStar(require("./courierPayDriverRateSheets/client/requests/index.js"), exports);
@@ -5,7 +5,8 @@ import * as environments from "../../../../environments.js";
5
5
  import * as core from "../../../../core/index.js";
6
6
  import { Shipper } from "../resources/shipper/client/Client.js";
7
7
  import { Courier } from "../resources/courier/client/Client.js";
8
- export declare namespace OrgConnectionInfos {
8
+ import { Forwarder } from "../resources/forwarder/client/Client.js";
9
+ export declare namespace OrgInfoForConnections {
9
10
  interface Options {
10
11
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
11
12
  /** Specify a custom URL to connect the client to. */
@@ -16,11 +17,13 @@ export declare namespace OrgConnectionInfos {
16
17
  fetcher?: core.FetchFunction;
17
18
  }
18
19
  }
19
- export declare class OrgConnectionInfos {
20
- protected readonly _options: OrgConnectionInfos.Options;
20
+ export declare class OrgInfoForConnections {
21
+ protected readonly _options: OrgInfoForConnections.Options;
21
22
  protected _shipper: Shipper | undefined;
22
23
  protected _courier: Courier | undefined;
23
- constructor(_options?: OrgConnectionInfos.Options);
24
+ protected _forwarder: Forwarder | undefined;
25
+ constructor(_options?: OrgInfoForConnections.Options);
24
26
  get shipper(): Shipper;
25
27
  get courier(): Courier;
28
+ get forwarder(): Forwarder;
26
29
  }
@@ -3,10 +3,11 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.OrgConnectionInfos = void 0;
6
+ exports.OrgInfoForConnections = void 0;
7
7
  const Client_js_1 = require("../resources/shipper/client/Client.js");
8
8
  const Client_js_2 = require("../resources/courier/client/Client.js");
9
- class OrgConnectionInfos {
9
+ const Client_js_3 = require("../resources/forwarder/client/Client.js");
10
+ class OrgInfoForConnections {
10
11
  constructor(_options = {}) {
11
12
  this._options = _options;
12
13
  }
@@ -18,5 +19,9 @@ class OrgConnectionInfos {
18
19
  var _a;
19
20
  return ((_a = this._courier) !== null && _a !== void 0 ? _a : (this._courier = new Client_js_2.Courier(this._options)));
20
21
  }
22
+ get forwarder() {
23
+ var _a;
24
+ return ((_a = this._forwarder) !== null && _a !== void 0 ? _a : (this._forwarder = new Client_js_3.Forwarder(this._options)));
25
+ }
21
26
  }
22
- exports.OrgConnectionInfos = OrgConnectionInfos;
27
+ exports.OrgInfoForConnections = OrgInfoForConnections;
@@ -36,38 +36,48 @@ export declare class Courier {
36
36
  * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
37
37
  *
38
38
  * @example
39
- * await client.orgConnectionInfos.courier.getV1()
39
+ * await client.orgInfoForConnections.courier.getV1()
40
40
  */
41
41
  getV1(requestOptions?: Courier.RequestOptions): core.HttpResponsePromise<Chrt.CourierOrgInfoForConnections1>;
42
42
  private __getV1;
43
+ /**
44
+ * Retrieves list of connected courier organizations for forwarder or shipper organizations. Not accessible by courier organizations. | () -> (list[CourierOrgInfoForConnections1])
45
+ *
46
+ * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
47
+ *
48
+ * @example
49
+ * await client.orgInfoForConnections.courier.listV1()
50
+ */
51
+ listV1(requestOptions?: Courier.RequestOptions): core.HttpResponsePromise<Chrt.CourierOrgInfoForConnections1[]>;
52
+ private __listV1;
43
53
  /**
44
54
  * Creates courier organization connection information. Fails if already exists. | (CourierOrgInfoForConnectionsClientCreate1) -> (PydanticObjectId)
45
55
  *
46
- * @param {Chrt.orgConnectionInfos.CourierOrgInfoForConnectionsClientCreate1} request
56
+ * @param {Chrt.orgInfoForConnections.CourierOrgInfoForConnectionsClientCreate1} request
47
57
  * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
48
58
  *
49
59
  * @throws {@link Chrt.UnprocessableEntityError}
50
60
  *
51
61
  * @example
52
- * await client.orgConnectionInfos.courier.createV1({
62
+ * await client.orgInfoForConnections.courier.createV1({
53
63
  * schema_version: 1,
54
64
  * email_address_primary: "email_address_primary"
55
65
  * })
56
66
  */
57
- createV1(request: Chrt.orgConnectionInfos.CourierOrgInfoForConnectionsClientCreate1, requestOptions?: Courier.RequestOptions): core.HttpResponsePromise<string>;
67
+ createV1(request: Chrt.orgInfoForConnections.CourierOrgInfoForConnectionsClientCreate1, requestOptions?: Courier.RequestOptions): core.HttpResponsePromise<string>;
58
68
  private __createV1;
59
69
  /**
60
70
  * Updates existing courier organization connection information. | (CourierOrgInfoForConnectionsClientUpdate1) -> (bool)
61
71
  *
62
- * @param {Chrt.orgConnectionInfos.CourierOrgInfoForConnectionsClientUpdate1} request
72
+ * @param {Chrt.orgInfoForConnections.CourierOrgInfoForConnectionsClientUpdate1} request
63
73
  * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
64
74
  *
65
75
  * @throws {@link Chrt.UnprocessableEntityError}
66
76
  *
67
77
  * @example
68
- * await client.orgConnectionInfos.courier.updateV1()
78
+ * await client.orgInfoForConnections.courier.updateV1()
69
79
  */
70
- updateV1(request?: Chrt.orgConnectionInfos.CourierOrgInfoForConnectionsClientUpdate1, requestOptions?: Courier.RequestOptions): core.HttpResponsePromise<boolean>;
80
+ updateV1(request?: Chrt.orgInfoForConnections.CourierOrgInfoForConnectionsClientUpdate1, requestOptions?: Courier.RequestOptions): core.HttpResponsePromise<boolean>;
71
81
  private __updateV1;
72
82
  protected _getAuthorizationHeader(): Promise<string | undefined>;
73
83
  }
@@ -61,7 +61,7 @@ class Courier {
61
61
  * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
62
62
  *
63
63
  * @example
64
- * await client.orgConnectionInfos.courier.getV1()
64
+ * await client.orgInfoForConnections.courier.getV1()
65
65
  */
66
66
  getV1(requestOptions) {
67
67
  return core.HttpResponsePromise.fromPromise(this.__getV1(requestOptions));
@@ -71,7 +71,7 @@ class Courier {
71
71
  var _a, _b, _c, _d;
72
72
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
73
73
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
74
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "connections/org_connection_infos/courier/v1"),
74
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "connections/org_info_for_connections/courier/v1"),
75
75
  method: "GET",
76
76
  headers: _headers,
77
77
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -97,7 +97,58 @@ class Courier {
97
97
  rawResponse: _response.rawResponse,
98
98
  });
99
99
  case "timeout":
100
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /connections/org_connection_infos/courier/v1.");
100
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /connections/org_info_for_connections/courier/v1.");
101
+ case "unknown":
102
+ throw new errors.ChrtError({
103
+ message: _response.error.errorMessage,
104
+ rawResponse: _response.rawResponse,
105
+ });
106
+ }
107
+ });
108
+ }
109
+ /**
110
+ * Retrieves list of connected courier organizations for forwarder or shipper organizations. Not accessible by courier organizations. | () -> (list[CourierOrgInfoForConnections1])
111
+ *
112
+ * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
113
+ *
114
+ * @example
115
+ * await client.orgInfoForConnections.courier.listV1()
116
+ */
117
+ listV1(requestOptions) {
118
+ return core.HttpResponsePromise.fromPromise(this.__listV1(requestOptions));
119
+ }
120
+ __listV1(requestOptions) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ var _a, _b, _c, _d;
123
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
124
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
125
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "connections/org_info_for_connections/courier/list/v1"),
126
+ method: "GET",
127
+ headers: _headers,
128
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
129
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
130
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
131
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
132
+ });
133
+ if (_response.ok) {
134
+ return { data: _response.body, rawResponse: _response.rawResponse };
135
+ }
136
+ if (_response.error.reason === "status-code") {
137
+ throw new errors.ChrtError({
138
+ statusCode: _response.error.statusCode,
139
+ body: _response.error.body,
140
+ rawResponse: _response.rawResponse,
141
+ });
142
+ }
143
+ switch (_response.error.reason) {
144
+ case "non-json":
145
+ throw new errors.ChrtError({
146
+ statusCode: _response.error.statusCode,
147
+ body: _response.error.rawBody,
148
+ rawResponse: _response.rawResponse,
149
+ });
150
+ case "timeout":
151
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /connections/org_info_for_connections/courier/list/v1.");
101
152
  case "unknown":
102
153
  throw new errors.ChrtError({
103
154
  message: _response.error.errorMessage,
@@ -109,13 +160,13 @@ class Courier {
109
160
  /**
110
161
  * Creates courier organization connection information. Fails if already exists. | (CourierOrgInfoForConnectionsClientCreate1) -> (PydanticObjectId)
111
162
  *
112
- * @param {Chrt.orgConnectionInfos.CourierOrgInfoForConnectionsClientCreate1} request
163
+ * @param {Chrt.orgInfoForConnections.CourierOrgInfoForConnectionsClientCreate1} request
113
164
  * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
114
165
  *
115
166
  * @throws {@link Chrt.UnprocessableEntityError}
116
167
  *
117
168
  * @example
118
- * await client.orgConnectionInfos.courier.createV1({
169
+ * await client.orgInfoForConnections.courier.createV1({
119
170
  * schema_version: 1,
120
171
  * email_address_primary: "email_address_primary"
121
172
  * })
@@ -128,7 +179,7 @@ class Courier {
128
179
  var _a, _b, _c, _d;
129
180
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
130
181
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
131
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "connections/org_connection_infos/courier/create/v1"),
182
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "connections/org_info_for_connections/courier/create/v1"),
132
183
  method: "POST",
133
184
  headers: _headers,
134
185
  contentType: "application/json",
@@ -162,7 +213,7 @@ class Courier {
162
213
  rawResponse: _response.rawResponse,
163
214
  });
164
215
  case "timeout":
165
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /connections/org_connection_infos/courier/create/v1.");
216
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /connections/org_info_for_connections/courier/create/v1.");
166
217
  case "unknown":
167
218
  throw new errors.ChrtError({
168
219
  message: _response.error.errorMessage,
@@ -174,13 +225,13 @@ class Courier {
174
225
  /**
175
226
  * Updates existing courier organization connection information. | (CourierOrgInfoForConnectionsClientUpdate1) -> (bool)
176
227
  *
177
- * @param {Chrt.orgConnectionInfos.CourierOrgInfoForConnectionsClientUpdate1} request
228
+ * @param {Chrt.orgInfoForConnections.CourierOrgInfoForConnectionsClientUpdate1} request
178
229
  * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
179
230
  *
180
231
  * @throws {@link Chrt.UnprocessableEntityError}
181
232
  *
182
233
  * @example
183
- * await client.orgConnectionInfos.courier.updateV1()
234
+ * await client.orgInfoForConnections.courier.updateV1()
184
235
  */
185
236
  updateV1(request = {}, requestOptions) {
186
237
  return core.HttpResponsePromise.fromPromise(this.__updateV1(request, requestOptions));
@@ -190,7 +241,7 @@ class Courier {
190
241
  var _a, _b, _c, _d;
191
242
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
192
243
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
193
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "connections/org_connection_infos/courier/update/v1"),
244
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "connections/org_info_for_connections/courier/update/v1"),
194
245
  method: "PATCH",
195
246
  headers: _headers,
196
247
  contentType: "application/json",
@@ -224,7 +275,7 @@ class Courier {
224
275
  rawResponse: _response.rawResponse,
225
276
  });
226
277
  case "timeout":
227
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /connections/org_connection_infos/courier/update/v1.");
278
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /connections/org_info_for_connections/courier/update/v1.");
228
279
  case "unknown":
229
280
  throw new errors.ChrtError({
230
281
  message: _response.error.errorMessage,
@@ -0,0 +1,63 @@
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 Forwarder {
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 | null | undefined> | null | 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 query string parameters to include in the request. */
25
+ queryParams?: Record<string, unknown>;
26
+ /** Additional headers to include in the request. */
27
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
28
+ }
29
+ }
30
+ export declare class Forwarder {
31
+ protected readonly _options: Forwarder.Options;
32
+ constructor(_options?: Forwarder.Options);
33
+ /**
34
+ * Creates forwarder organization connection information. Fails if already exists. | (ForwarderOrgInfoForConnectionsClientCreate1) -> (PydanticObjectId)
35
+ *
36
+ * @param {Chrt.orgInfoForConnections.ForwarderOrgInfoForConnectionsClientCreate1} request
37
+ * @param {Forwarder.RequestOptions} requestOptions - Request-specific configuration.
38
+ *
39
+ * @throws {@link Chrt.UnprocessableEntityError}
40
+ *
41
+ * @example
42
+ * await client.orgInfoForConnections.forwarder.createV1({
43
+ * schema_version: 1,
44
+ * email_address_primary: "email_address_primary"
45
+ * })
46
+ */
47
+ createV1(request: Chrt.orgInfoForConnections.ForwarderOrgInfoForConnectionsClientCreate1, requestOptions?: Forwarder.RequestOptions): core.HttpResponsePromise<string>;
48
+ private __createV1;
49
+ /**
50
+ * Updates existing forwarder organization connection information. | (ForwarderOrgInfoForConnectionsClientUpdate1) -> (bool)
51
+ *
52
+ * @param {Chrt.orgInfoForConnections.ForwarderOrgInfoForConnectionsClientUpdate1} request
53
+ * @param {Forwarder.RequestOptions} requestOptions - Request-specific configuration.
54
+ *
55
+ * @throws {@link Chrt.UnprocessableEntityError}
56
+ *
57
+ * @example
58
+ * await client.orgInfoForConnections.forwarder.updateV1()
59
+ */
60
+ updateV1(request?: Chrt.orgInfoForConnections.ForwarderOrgInfoForConnectionsClientUpdate1, requestOptions?: Forwarder.RequestOptions): core.HttpResponsePromise<boolean>;
61
+ private __updateV1;
62
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
63
+ }