@chrt-inc/typescript-sdk 1.309.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.
- package/dist/cjs/Client.d.ts +3 -3
- package/dist/cjs/Client.js +5 -5
- package/dist/cjs/api/index.d.ts +1 -1
- package/dist/cjs/api/index.js +1 -1
- package/dist/cjs/api/resources/connections/client/Client.d.ts +13 -0
- package/dist/cjs/api/resources/connections/client/Client.js +63 -0
- package/dist/cjs/api/resources/connections/index.d.ts +1 -0
- package/dist/cjs/api/resources/connections/index.js +1 -0
- package/dist/cjs/api/resources/connections/types/ConnectionsGetByHandleV1Response.d.ts +5 -0
- package/dist/cjs/api/resources/connections/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/connections/types/index.js +17 -0
- package/dist/cjs/api/resources/index.d.ts +3 -2
- package/dist/cjs/api/resources/index.js +4 -3
- package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/Client.d.ts +7 -4
- package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/Client.js +8 -3
- package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/Client.d.ts +17 -7
- package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/Client.js +62 -11
- package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/Client.d.ts +63 -0
- package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/Client.js +195 -0
- package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/requests/ForwarderOrgInfoForConnectionsClientCreate1.d.ts +24 -0
- package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/requests/ForwarderOrgInfoForConnectionsClientUpdate1.d.ts +20 -0
- package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/requests/ForwarderOrgInfoForConnectionsClientUpdate1.js +5 -0
- package/dist/cjs/api/resources/orgInfoForConnections/resources/forwarder/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/index.js +3 -1
- package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/Client.d.ts +7 -7
- package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/Client.js +11 -11
- package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/client/index.js +17 -0
- package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientCreate1.js +5 -0
- package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientUpdate1.js +5 -0
- package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/index.d.ts +1 -0
- package/dist/cjs/api/resources/orgInfoForConnections/resources/shipper/index.js +17 -0
- package/dist/cjs/api/types/ForwarderCourierConnection1.d.ts +13 -0
- package/dist/cjs/api/types/ForwarderCourierConnection1.js +5 -0
- package/dist/cjs/api/types/ShipperCourierConnection1.d.ts +13 -0
- package/dist/cjs/api/types/ShipperCourierConnection1.js +5 -0
- package/dist/cjs/api/types/ShipperForwarderConnection1.d.ts +13 -0
- package/dist/cjs/api/types/ShipperForwarderConnection1.js +5 -0
- package/dist/cjs/api/types/index.d.ts +3 -0
- package/dist/cjs/api/types/index.js +3 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -3
- package/dist/esm/Client.mjs +5 -5
- package/dist/esm/api/index.d.mts +1 -1
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/resources/connections/client/Client.d.mts +13 -0
- package/dist/esm/api/resources/connections/client/Client.mjs +63 -0
- package/dist/esm/api/resources/connections/index.d.mts +1 -0
- package/dist/esm/api/resources/connections/index.mjs +1 -0
- package/dist/esm/api/resources/connections/types/ConnectionsGetByHandleV1Response.d.mts +5 -0
- package/dist/esm/api/resources/connections/types/index.d.mts +1 -0
- package/dist/esm/api/resources/connections/types/index.mjs +1 -0
- package/dist/esm/api/resources/index.d.mts +3 -2
- package/dist/esm/api/resources/index.mjs +3 -2
- package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/Client.d.mts +7 -4
- package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/Client.mjs +6 -1
- package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/Client.d.mts +17 -7
- package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/Client.mjs +62 -11
- package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/Client.d.mts +63 -0
- package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/Client.mjs +158 -0
- package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/requests/ForwarderOrgInfoForConnectionsClientCreate1.d.mts +24 -0
- package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/requests/ForwarderOrgInfoForConnectionsClientUpdate1.d.mts +20 -0
- package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/requests/ForwarderOrgInfoForConnectionsClientUpdate1.mjs +4 -0
- package/dist/esm/api/resources/orgInfoForConnections/resources/forwarder/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/index.mjs +2 -0
- package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/Client.d.mts +7 -7
- package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/Client.mjs +11 -11
- package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/client/index.d.mts +2 -0
- package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/client/index.mjs +1 -0
- package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientCreate1.mjs +4 -0
- package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientUpdate1.mjs +4 -0
- package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/index.d.mts +1 -0
- package/dist/esm/api/resources/orgInfoForConnections/resources/shipper/index.mjs +1 -0
- package/dist/esm/api/types/ForwarderCourierConnection1.d.mts +13 -0
- package/dist/esm/api/types/ForwarderCourierConnection1.mjs +4 -0
- package/dist/esm/api/types/ShipperCourierConnection1.d.mts +13 -0
- package/dist/esm/api/types/ShipperCourierConnection1.mjs +4 -0
- package/dist/esm/api/types/ShipperForwarderConnection1.d.mts +13 -0
- package/dist/esm/api/types/ShipperForwarderConnection1.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +3 -0
- package/dist/esm/api/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +267 -18
- /package/dist/cjs/api/resources/{orgConnectionInfos/resources/courier/client/requests/CourierOrgInfoForConnectionsClientCreate1.js → connections/types/ConnectionsGetByHandleV1Response.js} +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/index.js +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/index.js +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/requests/CourierOrgInfoForConnectionsClientCreate1.d.ts +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos/resources/courier/client/requests/CourierOrgInfoForConnectionsClientUpdate1.js → orgInfoForConnections/resources/courier/client/requests/CourierOrgInfoForConnectionsClientCreate1.js} +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/requests/CourierOrgInfoForConnectionsClientUpdate1.d.ts +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientCreate1.js → orgInfoForConnections/resources/courier/client/requests/CourierOrgInfoForConnectionsClientUpdate1.js} +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/requests/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/index.js +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientUpdate1.js → orgInfoForConnections/resources/forwarder/client/requests/ForwarderOrgInfoForConnectionsClientCreate1.js} +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/index.js +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientCreate1.d.ts +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientUpdate1.d.ts +0 -0
- /package/dist/cjs/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/requests/index.d.ts +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos/resources/courier/client/requests/CourierOrgInfoForConnectionsClientCreate1.mjs → connections/types/ConnectionsGetByHandleV1Response.mjs} +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/index.mjs +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/requests/CourierOrgInfoForConnectionsClientCreate1.d.mts +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos/resources/courier/client/requests/CourierOrgInfoForConnectionsClientUpdate1.mjs → orgInfoForConnections/resources/courier/client/requests/CourierOrgInfoForConnectionsClientCreate1.mjs} +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/requests/CourierOrgInfoForConnectionsClientUpdate1.d.mts +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientCreate1.mjs → orgInfoForConnections/resources/courier/client/requests/CourierOrgInfoForConnectionsClientUpdate1.mjs} +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/requests/index.d.mts +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/index.d.mts +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/courier/index.mjs +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientUpdate1.mjs → orgInfoForConnections/resources/forwarder/client/requests/ForwarderOrgInfoForConnectionsClientCreate1.mjs} +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos/resources/shipper → orgInfoForConnections/resources/forwarder}/index.mjs +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientCreate1.d.mts +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/requests/ShipperOrgInfoForConnectionsClientUpdate1.d.mts +0 -0
- /package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/resources/shipper/client/requests/index.d.mts +0 -0
package/dist/esm/Client.mjs
CHANGED
|
@@ -28,15 +28,15 @@ import { Root } from "./api/resources/root/client/Client.mjs";
|
|
|
28
28
|
import { Users } from "./api/resources/users/client/Client.mjs";
|
|
29
29
|
import { Utils } from "./api/resources/utils/client/Client.mjs";
|
|
30
30
|
import { Notifications } from "./api/resources/notifications/client/Client.mjs";
|
|
31
|
-
import {
|
|
31
|
+
import { OrgInfoForConnections } from "./api/resources/orgInfoForConnections/client/Client.mjs";
|
|
32
32
|
import { Tracking } from "./api/resources/tracking/client/Client.mjs";
|
|
33
33
|
export class ChrtClient {
|
|
34
34
|
constructor(_options = {}) {
|
|
35
35
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
36
36
|
"X-Fern-Language": "JavaScript",
|
|
37
37
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
38
|
-
"X-Fern-SDK-Version": "1.
|
|
39
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
38
|
+
"X-Fern-SDK-Version": "1.311.0",
|
|
39
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.311.0",
|
|
40
40
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
41
41
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
42
42
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -141,9 +141,9 @@ export class ChrtClient {
|
|
|
141
141
|
var _a;
|
|
142
142
|
return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Notifications(this._options)));
|
|
143
143
|
}
|
|
144
|
-
get
|
|
144
|
+
get orgInfoForConnections() {
|
|
145
145
|
var _a;
|
|
146
|
-
return ((_a = this.
|
|
146
|
+
return ((_a = this._orgInfoForConnections) !== null && _a !== void 0 ? _a : (this._orgInfoForConnections = new OrgInfoForConnections(this._options)));
|
|
147
147
|
}
|
|
148
148
|
get tracking() {
|
|
149
149
|
var _a;
|
package/dist/esm/api/index.d.mts
CHANGED
package/dist/esm/api/index.mjs
CHANGED
|
@@ -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
|
}
|
|
@@ -12,6 +12,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
12
12
|
};
|
|
13
13
|
import * as environments from "../../../../environments.mjs";
|
|
14
14
|
import * as core from "../../../../core/index.mjs";
|
|
15
|
+
import * as Chrt from "../../../index.mjs";
|
|
15
16
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
16
17
|
import * as errors from "../../../../errors/index.mjs";
|
|
17
18
|
import { ConnectionToCourier } from "../resources/connectionToCourier/client/Client.mjs";
|
|
@@ -186,6 +187,68 @@ export class Connections {
|
|
|
186
187
|
}
|
|
187
188
|
});
|
|
188
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
* Gets connection between authenticated org and org with specified handle. | () -> (ShipperCourierConnection1 | ShipperForwarderConnection1 | ForwarderCourierConnection1 | None)
|
|
192
|
+
*
|
|
193
|
+
* @param {string} handle
|
|
194
|
+
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
195
|
+
*
|
|
196
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* await client.connections.getByHandleV1("handle")
|
|
200
|
+
*/
|
|
201
|
+
getByHandleV1(handle, requestOptions) {
|
|
202
|
+
return core.HttpResponsePromise.fromPromise(this.__getByHandleV1(handle, requestOptions));
|
|
203
|
+
}
|
|
204
|
+
__getByHandleV1(handle, requestOptions) {
|
|
205
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
var _a, _b, _c, _d;
|
|
207
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
208
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
209
|
+
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`),
|
|
210
|
+
method: "GET",
|
|
211
|
+
headers: _headers,
|
|
212
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
213
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
214
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
215
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
216
|
+
});
|
|
217
|
+
if (_response.ok) {
|
|
218
|
+
return {
|
|
219
|
+
data: _response.body,
|
|
220
|
+
rawResponse: _response.rawResponse,
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
if (_response.error.reason === "status-code") {
|
|
224
|
+
switch (_response.error.statusCode) {
|
|
225
|
+
case 422:
|
|
226
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
227
|
+
default:
|
|
228
|
+
throw new errors.ChrtError({
|
|
229
|
+
statusCode: _response.error.statusCode,
|
|
230
|
+
body: _response.error.body,
|
|
231
|
+
rawResponse: _response.rawResponse,
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
switch (_response.error.reason) {
|
|
236
|
+
case "non-json":
|
|
237
|
+
throw new errors.ChrtError({
|
|
238
|
+
statusCode: _response.error.statusCode,
|
|
239
|
+
body: _response.error.rawBody,
|
|
240
|
+
rawResponse: _response.rawResponse,
|
|
241
|
+
});
|
|
242
|
+
case "timeout":
|
|
243
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /connections/by_handle/{handle}/v1.");
|
|
244
|
+
case "unknown":
|
|
245
|
+
throw new errors.ChrtError({
|
|
246
|
+
message: _response.error.errorMessage,
|
|
247
|
+
rawResponse: _response.rawResponse,
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
}
|
|
189
252
|
_getAuthorizationHeader() {
|
|
190
253
|
return __awaiter(this, void 0, void 0, function* () {
|
|
191
254
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ConnectionsGetByHandleV1Response.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ConnectionsGetByHandleV1Response.mjs";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * as connections from "./connections/index.mjs";
|
|
2
|
+
export * from "./connections/types/index.mjs";
|
|
1
3
|
export * as payments from "./payments/index.mjs";
|
|
2
4
|
export * as courierPayDriverLineItemGroups from "./courierPayDriverLineItemGroups/index.mjs";
|
|
3
5
|
export * as courierPayDriverPayouts from "./courierPayDriverPayouts/index.mjs";
|
|
@@ -7,7 +9,6 @@ export * as shipperPayCourierLineItemGroups from "./shipperPayCourierLineItemGro
|
|
|
7
9
|
export * as shipperPayCourierPayments from "./shipperPayCourierPayments/index.mjs";
|
|
8
10
|
export * as shipperPayCourierRateSheets from "./shipperPayCourierRateSheets/index.mjs";
|
|
9
11
|
export * as shipperPayCourierStatements from "./shipperPayCourierStatements/index.mjs";
|
|
10
|
-
export * as connections from "./connections/index.mjs";
|
|
11
12
|
export * as orgProfiles from "./orgProfiles/index.mjs";
|
|
12
13
|
export * as dev from "./dev/index.mjs";
|
|
13
14
|
export * as taskArtifactNotifications from "./taskArtifactNotifications/index.mjs";
|
|
@@ -23,7 +24,7 @@ export * as root from "./root/index.mjs";
|
|
|
23
24
|
export * as users from "./users/index.mjs";
|
|
24
25
|
export * as utils from "./utils/index.mjs";
|
|
25
26
|
export * as notifications from "./notifications/index.mjs";
|
|
26
|
-
export * as
|
|
27
|
+
export * as orgInfoForConnections from "./orgInfoForConnections/index.mjs";
|
|
27
28
|
export * as tracking from "./tracking/index.mjs";
|
|
28
29
|
export * from "./payments/client/requests/index.mjs";
|
|
29
30
|
export * from "./courierPayDriverRateSheets/client/requests/index.mjs";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * as connections from "./connections/index.mjs";
|
|
2
|
+
export * from "./connections/types/index.mjs";
|
|
1
3
|
export * as payments from "./payments/index.mjs";
|
|
2
4
|
export * as courierPayDriverLineItemGroups from "./courierPayDriverLineItemGroups/index.mjs";
|
|
3
5
|
export * as courierPayDriverPayouts from "./courierPayDriverPayouts/index.mjs";
|
|
@@ -7,7 +9,6 @@ export * as shipperPayCourierLineItemGroups from "./shipperPayCourierLineItemGro
|
|
|
7
9
|
export * as shipperPayCourierPayments from "./shipperPayCourierPayments/index.mjs";
|
|
8
10
|
export * as shipperPayCourierRateSheets from "./shipperPayCourierRateSheets/index.mjs";
|
|
9
11
|
export * as shipperPayCourierStatements from "./shipperPayCourierStatements/index.mjs";
|
|
10
|
-
export * as connections from "./connections/index.mjs";
|
|
11
12
|
export * as orgProfiles from "./orgProfiles/index.mjs";
|
|
12
13
|
export * as dev from "./dev/index.mjs";
|
|
13
14
|
export * as taskArtifactNotifications from "./taskArtifactNotifications/index.mjs";
|
|
@@ -23,7 +24,7 @@ export * as root from "./root/index.mjs";
|
|
|
23
24
|
export * as users from "./users/index.mjs";
|
|
24
25
|
export * as utils from "./utils/index.mjs";
|
|
25
26
|
export * as notifications from "./notifications/index.mjs";
|
|
26
|
-
export * as
|
|
27
|
+
export * as orgInfoForConnections from "./orgInfoForConnections/index.mjs";
|
|
27
28
|
export * as tracking from "./tracking/index.mjs";
|
|
28
29
|
export * from "./payments/client/requests/index.mjs";
|
|
29
30
|
export * from "./courierPayDriverRateSheets/client/requests/index.mjs";
|
package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/Client.d.mts
RENAMED
|
@@ -5,7 +5,8 @@ import * as environments from "../../../../environments.mjs";
|
|
|
5
5
|
import * as core from "../../../../core/index.mjs";
|
|
6
6
|
import { Shipper } from "../resources/shipper/client/Client.mjs";
|
|
7
7
|
import { Courier } from "../resources/courier/client/Client.mjs";
|
|
8
|
-
|
|
8
|
+
import { Forwarder } from "../resources/forwarder/client/Client.mjs";
|
|
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
|
|
20
|
-
protected readonly _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
|
-
|
|
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
|
}
|
package/dist/esm/api/resources/{orgConnectionInfos → orgInfoForConnections}/client/Client.mjs
RENAMED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Shipper } from "../resources/shipper/client/Client.mjs";
|
|
5
5
|
import { Courier } from "../resources/courier/client/Client.mjs";
|
|
6
|
-
|
|
6
|
+
import { Forwarder } from "../resources/forwarder/client/Client.mjs";
|
|
7
|
+
export class OrgInfoForConnections {
|
|
7
8
|
constructor(_options = {}) {
|
|
8
9
|
this._options = _options;
|
|
9
10
|
}
|
|
@@ -15,4 +16,8 @@ export class OrgConnectionInfos {
|
|
|
15
16
|
var _a;
|
|
16
17
|
return ((_a = this._courier) !== null && _a !== void 0 ? _a : (this._courier = new Courier(this._options)));
|
|
17
18
|
}
|
|
19
|
+
get forwarder() {
|
|
20
|
+
var _a;
|
|
21
|
+
return ((_a = this._forwarder) !== null && _a !== void 0 ? _a : (this._forwarder = new Forwarder(this._options)));
|
|
22
|
+
}
|
|
18
23
|
}
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
78
|
+
* await client.orgInfoForConnections.courier.updateV1()
|
|
69
79
|
*/
|
|
70
|
-
updateV1(request?: Chrt.
|
|
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
|
}
|
|
@@ -25,7 +25,7 @@ export class Courier {
|
|
|
25
25
|
* @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
26
|
*
|
|
27
27
|
* @example
|
|
28
|
-
* await client.
|
|
28
|
+
* await client.orgInfoForConnections.courier.getV1()
|
|
29
29
|
*/
|
|
30
30
|
getV1(requestOptions) {
|
|
31
31
|
return core.HttpResponsePromise.fromPromise(this.__getV1(requestOptions));
|
|
@@ -35,7 +35,7 @@ export class Courier {
|
|
|
35
35
|
var _a, _b, _c, _d;
|
|
36
36
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
37
37
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
38
|
-
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/
|
|
38
|
+
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"),
|
|
39
39
|
method: "GET",
|
|
40
40
|
headers: _headers,
|
|
41
41
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -61,7 +61,58 @@ export class Courier {
|
|
|
61
61
|
rawResponse: _response.rawResponse,
|
|
62
62
|
});
|
|
63
63
|
case "timeout":
|
|
64
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /connections/
|
|
64
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /connections/org_info_for_connections/courier/v1.");
|
|
65
|
+
case "unknown":
|
|
66
|
+
throw new errors.ChrtError({
|
|
67
|
+
message: _response.error.errorMessage,
|
|
68
|
+
rawResponse: _response.rawResponse,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Retrieves list of connected courier organizations for forwarder or shipper organizations. Not accessible by courier organizations. | () -> (list[CourierOrgInfoForConnections1])
|
|
75
|
+
*
|
|
76
|
+
* @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* await client.orgInfoForConnections.courier.listV1()
|
|
80
|
+
*/
|
|
81
|
+
listV1(requestOptions) {
|
|
82
|
+
return core.HttpResponsePromise.fromPromise(this.__listV1(requestOptions));
|
|
83
|
+
}
|
|
84
|
+
__listV1(requestOptions) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
var _a, _b, _c, _d;
|
|
87
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
88
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
89
|
+
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"),
|
|
90
|
+
method: "GET",
|
|
91
|
+
headers: _headers,
|
|
92
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
93
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
94
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
95
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
96
|
+
});
|
|
97
|
+
if (_response.ok) {
|
|
98
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
99
|
+
}
|
|
100
|
+
if (_response.error.reason === "status-code") {
|
|
101
|
+
throw new errors.ChrtError({
|
|
102
|
+
statusCode: _response.error.statusCode,
|
|
103
|
+
body: _response.error.body,
|
|
104
|
+
rawResponse: _response.rawResponse,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
switch (_response.error.reason) {
|
|
108
|
+
case "non-json":
|
|
109
|
+
throw new errors.ChrtError({
|
|
110
|
+
statusCode: _response.error.statusCode,
|
|
111
|
+
body: _response.error.rawBody,
|
|
112
|
+
rawResponse: _response.rawResponse,
|
|
113
|
+
});
|
|
114
|
+
case "timeout":
|
|
115
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /connections/org_info_for_connections/courier/list/v1.");
|
|
65
116
|
case "unknown":
|
|
66
117
|
throw new errors.ChrtError({
|
|
67
118
|
message: _response.error.errorMessage,
|
|
@@ -73,13 +124,13 @@ export class Courier {
|
|
|
73
124
|
/**
|
|
74
125
|
* Creates courier organization connection information. Fails if already exists. | (CourierOrgInfoForConnectionsClientCreate1) -> (PydanticObjectId)
|
|
75
126
|
*
|
|
76
|
-
* @param {Chrt.
|
|
127
|
+
* @param {Chrt.orgInfoForConnections.CourierOrgInfoForConnectionsClientCreate1} request
|
|
77
128
|
* @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
|
|
78
129
|
*
|
|
79
130
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
80
131
|
*
|
|
81
132
|
* @example
|
|
82
|
-
* await client.
|
|
133
|
+
* await client.orgInfoForConnections.courier.createV1({
|
|
83
134
|
* schema_version: 1,
|
|
84
135
|
* email_address_primary: "email_address_primary"
|
|
85
136
|
* })
|
|
@@ -92,7 +143,7 @@ export class Courier {
|
|
|
92
143
|
var _a, _b, _c, _d;
|
|
93
144
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
94
145
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
95
|
-
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/
|
|
146
|
+
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"),
|
|
96
147
|
method: "POST",
|
|
97
148
|
headers: _headers,
|
|
98
149
|
contentType: "application/json",
|
|
@@ -126,7 +177,7 @@ export class Courier {
|
|
|
126
177
|
rawResponse: _response.rawResponse,
|
|
127
178
|
});
|
|
128
179
|
case "timeout":
|
|
129
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /connections/
|
|
180
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /connections/org_info_for_connections/courier/create/v1.");
|
|
130
181
|
case "unknown":
|
|
131
182
|
throw new errors.ChrtError({
|
|
132
183
|
message: _response.error.errorMessage,
|
|
@@ -138,13 +189,13 @@ export class Courier {
|
|
|
138
189
|
/**
|
|
139
190
|
* Updates existing courier organization connection information. | (CourierOrgInfoForConnectionsClientUpdate1) -> (bool)
|
|
140
191
|
*
|
|
141
|
-
* @param {Chrt.
|
|
192
|
+
* @param {Chrt.orgInfoForConnections.CourierOrgInfoForConnectionsClientUpdate1} request
|
|
142
193
|
* @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
|
|
143
194
|
*
|
|
144
195
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
145
196
|
*
|
|
146
197
|
* @example
|
|
147
|
-
* await client.
|
|
198
|
+
* await client.orgInfoForConnections.courier.updateV1()
|
|
148
199
|
*/
|
|
149
200
|
updateV1(request = {}, requestOptions) {
|
|
150
201
|
return core.HttpResponsePromise.fromPromise(this.__updateV1(request, requestOptions));
|
|
@@ -154,7 +205,7 @@ export class Courier {
|
|
|
154
205
|
var _a, _b, _c, _d;
|
|
155
206
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
156
207
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
157
|
-
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/
|
|
208
|
+
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"),
|
|
158
209
|
method: "PATCH",
|
|
159
210
|
headers: _headers,
|
|
160
211
|
contentType: "application/json",
|
|
@@ -188,7 +239,7 @@ export class Courier {
|
|
|
188
239
|
rawResponse: _response.rawResponse,
|
|
189
240
|
});
|
|
190
241
|
case "timeout":
|
|
191
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /connections/
|
|
242
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /connections/org_info_for_connections/courier/update/v1.");
|
|
192
243
|
case "unknown":
|
|
193
244
|
throw new errors.ChrtError({
|
|
194
245
|
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.mjs";
|
|
5
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
6
|
+
import * as Chrt from "../../../../../index.mjs";
|
|
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
|
+
}
|