@chrt-inc/typescript-sdk 1.754.0 → 1.756.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.js +2 -2
- package/dist/cjs/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.d.ts +0 -13
- package/dist/cjs/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.js +0 -59
- package/dist/cjs/api/types/CargoAiTrackAndTraceUpdate1.d.ts +0 -4
- package/dist/cjs/api/types/CargoAiTrackAndTraceUpdateSourceEnum.d.ts +1 -5
- package/dist/cjs/api/types/CargoAiTrackAndTraceUpdateSourceEnum.js +0 -5
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.d.mts +0 -13
- package/dist/esm/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.mjs +0 -59
- package/dist/esm/api/types/CargoAiTrackAndTraceUpdate1.d.mts +0 -4
- package/dist/esm/api/types/CargoAiTrackAndTraceUpdateSourceEnum.d.mts +1 -5
- package/dist/esm/api/types/CargoAiTrackAndTraceUpdateSourceEnum.mjs +1 -4
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +0 -63
package/dist/cjs/Client.js
CHANGED
|
@@ -56,8 +56,8 @@ class ChrtClient {
|
|
|
56
56
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
57
57
|
"X-Fern-Language": "JavaScript",
|
|
58
58
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
59
|
-
"X-Fern-SDK-Version": "1.
|
|
60
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
59
|
+
"X-Fern-SDK-Version": "1.756.0",
|
|
60
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.756.0",
|
|
61
61
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
62
62
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
63
63
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
package/dist/cjs/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.d.ts
CHANGED
|
@@ -84,18 +84,5 @@ export declare class CargoaiTrackAndTrace {
|
|
|
84
84
|
*/
|
|
85
85
|
subscribeV1(request: Chrt.integrations.CargoAiTrackAndTraceSubscribeReq, requestOptions?: CargoaiTrackAndTrace.RequestOptions): core.HttpResponsePromise<Chrt.CargoAiTrackAndTraceSubscription1>;
|
|
86
86
|
private __subscribeV1;
|
|
87
|
-
/**
|
|
88
|
-
* Polls CargoAi for the current tracking snapshot of an AWB and stores it as a new update (source=poll). No subscription required — any order participant can poll on demand. | authz: order participant | () -> (CargoAiTrackAndTraceUpdate1)
|
|
89
|
-
*
|
|
90
|
-
* @param {string} awb
|
|
91
|
-
* @param {CargoaiTrackAndTrace.RequestOptions} requestOptions - Request-specific configuration.
|
|
92
|
-
*
|
|
93
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
94
|
-
*
|
|
95
|
-
* @example
|
|
96
|
-
* await client.integrations.cargoaiTrackAndTrace.refreshV1("awb")
|
|
97
|
-
*/
|
|
98
|
-
refreshV1(awb: string, requestOptions?: CargoaiTrackAndTrace.RequestOptions): core.HttpResponsePromise<Chrt.CargoAiTrackAndTraceUpdate1>;
|
|
99
|
-
private __refreshV1;
|
|
100
87
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
101
88
|
}
|
|
@@ -305,65 +305,6 @@ class CargoaiTrackAndTrace {
|
|
|
305
305
|
}
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
|
-
/**
|
|
309
|
-
* Polls CargoAi for the current tracking snapshot of an AWB and stores it as a new update (source=poll). No subscription required — any order participant can poll on demand. | authz: order participant | () -> (CargoAiTrackAndTraceUpdate1)
|
|
310
|
-
*
|
|
311
|
-
* @param {string} awb
|
|
312
|
-
* @param {CargoaiTrackAndTrace.RequestOptions} requestOptions - Request-specific configuration.
|
|
313
|
-
*
|
|
314
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
315
|
-
*
|
|
316
|
-
* @example
|
|
317
|
-
* await client.integrations.cargoaiTrackAndTrace.refreshV1("awb")
|
|
318
|
-
*/
|
|
319
|
-
refreshV1(awb, requestOptions) {
|
|
320
|
-
return core.HttpResponsePromise.fromPromise(this.__refreshV1(awb, requestOptions));
|
|
321
|
-
}
|
|
322
|
-
__refreshV1(awb, requestOptions) {
|
|
323
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
324
|
-
var _a, _b, _c, _d;
|
|
325
|
-
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);
|
|
326
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
327
|
-
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, `integrations/cargoai_track_and_trace/refresh/v1/${encodeURIComponent(awb)}`),
|
|
328
|
-
method: "POST",
|
|
329
|
-
headers: _headers,
|
|
330
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
331
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
332
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
333
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
334
|
-
});
|
|
335
|
-
if (_response.ok) {
|
|
336
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
337
|
-
}
|
|
338
|
-
if (_response.error.reason === "status-code") {
|
|
339
|
-
switch (_response.error.statusCode) {
|
|
340
|
-
case 422:
|
|
341
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
342
|
-
default:
|
|
343
|
-
throw new errors.ChrtError({
|
|
344
|
-
statusCode: _response.error.statusCode,
|
|
345
|
-
body: _response.error.body,
|
|
346
|
-
rawResponse: _response.rawResponse,
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
switch (_response.error.reason) {
|
|
351
|
-
case "non-json":
|
|
352
|
-
throw new errors.ChrtError({
|
|
353
|
-
statusCode: _response.error.statusCode,
|
|
354
|
-
body: _response.error.rawBody,
|
|
355
|
-
rawResponse: _response.rawResponse,
|
|
356
|
-
});
|
|
357
|
-
case "timeout":
|
|
358
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /integrations/cargoai_track_and_trace/refresh/v1/{awb}.");
|
|
359
|
-
case "unknown":
|
|
360
|
-
throw new errors.ChrtError({
|
|
361
|
-
message: _response.error.errorMessage,
|
|
362
|
-
rawResponse: _response.rawResponse,
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
308
|
_getAuthorizationHeader() {
|
|
368
309
|
return __awaiter(this, void 0, void 0, function* () {
|
|
369
310
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -20,8 +20,4 @@ export interface CargoAiTrackAndTraceUpdate1 {
|
|
|
20
20
|
_id: string;
|
|
21
21
|
receivedAt: string;
|
|
22
22
|
source: Chrt.CargoAiTrackAndTraceUpdateSourceEnum;
|
|
23
|
-
/** Must be a string starting with `user_` */
|
|
24
|
-
polledByUserId?: string | null;
|
|
25
|
-
/** Must be a string starting with `org_` */
|
|
26
|
-
polledByOrgId?: string | null;
|
|
27
23
|
}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type CargoAiTrackAndTraceUpdateSourceEnum = "webhook"
|
|
5
|
-
export declare const CargoAiTrackAndTraceUpdateSourceEnum: {
|
|
6
|
-
readonly Webhook: "webhook";
|
|
7
|
-
readonly Poll: "poll";
|
|
8
|
-
};
|
|
4
|
+
export type CargoAiTrackAndTraceUpdateSourceEnum = "webhook";
|
|
@@ -3,8 +3,3 @@
|
|
|
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.CargoAiTrackAndTraceUpdateSourceEnum = void 0;
|
|
7
|
-
exports.CargoAiTrackAndTraceUpdateSourceEnum = {
|
|
8
|
-
Webhook: "webhook",
|
|
9
|
-
Poll: "poll",
|
|
10
|
-
};
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.756.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -20,8 +20,8 @@ export class ChrtClient {
|
|
|
20
20
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
21
21
|
"X-Fern-Language": "JavaScript",
|
|
22
22
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
23
|
-
"X-Fern-SDK-Version": "1.
|
|
24
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
23
|
+
"X-Fern-SDK-Version": "1.756.0",
|
|
24
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.756.0",
|
|
25
25
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
26
26
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
27
27
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
package/dist/esm/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.d.mts
CHANGED
|
@@ -84,18 +84,5 @@ export declare class CargoaiTrackAndTrace {
|
|
|
84
84
|
*/
|
|
85
85
|
subscribeV1(request: Chrt.integrations.CargoAiTrackAndTraceSubscribeReq, requestOptions?: CargoaiTrackAndTrace.RequestOptions): core.HttpResponsePromise<Chrt.CargoAiTrackAndTraceSubscription1>;
|
|
86
86
|
private __subscribeV1;
|
|
87
|
-
/**
|
|
88
|
-
* Polls CargoAi for the current tracking snapshot of an AWB and stores it as a new update (source=poll). No subscription required — any order participant can poll on demand. | authz: order participant | () -> (CargoAiTrackAndTraceUpdate1)
|
|
89
|
-
*
|
|
90
|
-
* @param {string} awb
|
|
91
|
-
* @param {CargoaiTrackAndTrace.RequestOptions} requestOptions - Request-specific configuration.
|
|
92
|
-
*
|
|
93
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
94
|
-
*
|
|
95
|
-
* @example
|
|
96
|
-
* await client.integrations.cargoaiTrackAndTrace.refreshV1("awb")
|
|
97
|
-
*/
|
|
98
|
-
refreshV1(awb: string, requestOptions?: CargoaiTrackAndTrace.RequestOptions): core.HttpResponsePromise<Chrt.CargoAiTrackAndTraceUpdate1>;
|
|
99
|
-
private __refreshV1;
|
|
100
87
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
101
88
|
}
|
package/dist/esm/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.mjs
CHANGED
|
@@ -269,65 +269,6 @@ export class CargoaiTrackAndTrace {
|
|
|
269
269
|
}
|
|
270
270
|
});
|
|
271
271
|
}
|
|
272
|
-
/**
|
|
273
|
-
* Polls CargoAi for the current tracking snapshot of an AWB and stores it as a new update (source=poll). No subscription required — any order participant can poll on demand. | authz: order participant | () -> (CargoAiTrackAndTraceUpdate1)
|
|
274
|
-
*
|
|
275
|
-
* @param {string} awb
|
|
276
|
-
* @param {CargoaiTrackAndTrace.RequestOptions} requestOptions - Request-specific configuration.
|
|
277
|
-
*
|
|
278
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
279
|
-
*
|
|
280
|
-
* @example
|
|
281
|
-
* await client.integrations.cargoaiTrackAndTrace.refreshV1("awb")
|
|
282
|
-
*/
|
|
283
|
-
refreshV1(awb, requestOptions) {
|
|
284
|
-
return core.HttpResponsePromise.fromPromise(this.__refreshV1(awb, requestOptions));
|
|
285
|
-
}
|
|
286
|
-
__refreshV1(awb, requestOptions) {
|
|
287
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
288
|
-
var _a, _b, _c, _d;
|
|
289
|
-
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);
|
|
290
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
291
|
-
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, `integrations/cargoai_track_and_trace/refresh/v1/${encodeURIComponent(awb)}`),
|
|
292
|
-
method: "POST",
|
|
293
|
-
headers: _headers,
|
|
294
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
295
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
296
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
297
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
298
|
-
});
|
|
299
|
-
if (_response.ok) {
|
|
300
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
301
|
-
}
|
|
302
|
-
if (_response.error.reason === "status-code") {
|
|
303
|
-
switch (_response.error.statusCode) {
|
|
304
|
-
case 422:
|
|
305
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
306
|
-
default:
|
|
307
|
-
throw new errors.ChrtError({
|
|
308
|
-
statusCode: _response.error.statusCode,
|
|
309
|
-
body: _response.error.body,
|
|
310
|
-
rawResponse: _response.rawResponse,
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
switch (_response.error.reason) {
|
|
315
|
-
case "non-json":
|
|
316
|
-
throw new errors.ChrtError({
|
|
317
|
-
statusCode: _response.error.statusCode,
|
|
318
|
-
body: _response.error.rawBody,
|
|
319
|
-
rawResponse: _response.rawResponse,
|
|
320
|
-
});
|
|
321
|
-
case "timeout":
|
|
322
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /integrations/cargoai_track_and_trace/refresh/v1/{awb}.");
|
|
323
|
-
case "unknown":
|
|
324
|
-
throw new errors.ChrtError({
|
|
325
|
-
message: _response.error.errorMessage,
|
|
326
|
-
rawResponse: _response.rawResponse,
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
272
|
_getAuthorizationHeader() {
|
|
332
273
|
return __awaiter(this, void 0, void 0, function* () {
|
|
333
274
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -20,8 +20,4 @@ export interface CargoAiTrackAndTraceUpdate1 {
|
|
|
20
20
|
_id: string;
|
|
21
21
|
receivedAt: string;
|
|
22
22
|
source: Chrt.CargoAiTrackAndTraceUpdateSourceEnum;
|
|
23
|
-
/** Must be a string starting with `user_` */
|
|
24
|
-
polledByUserId?: string | null;
|
|
25
|
-
/** Must be a string starting with `org_` */
|
|
26
|
-
polledByOrgId?: string | null;
|
|
27
23
|
}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type CargoAiTrackAndTraceUpdateSourceEnum = "webhook"
|
|
5
|
-
export declare const CargoAiTrackAndTraceUpdateSourceEnum: {
|
|
6
|
-
readonly Webhook: "webhook";
|
|
7
|
-
readonly Poll: "poll";
|
|
8
|
-
};
|
|
4
|
+
export type CargoAiTrackAndTraceUpdateSourceEnum = "webhook";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.756.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.756.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -6804,69 +6804,6 @@ await client.integrations.cargoaiTrackAndTrace.subscribeV1({
|
|
|
6804
6804
|
</dl>
|
|
6805
6805
|
</details>
|
|
6806
6806
|
|
|
6807
|
-
<details><summary><code>client.integrations.cargoaiTrackAndTrace.<a href="/src/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.ts">refreshV1</a>(awb) -> Chrt.CargoAiTrackAndTraceUpdate1</code></summary>
|
|
6808
|
-
<dl>
|
|
6809
|
-
<dd>
|
|
6810
|
-
|
|
6811
|
-
#### 📝 Description
|
|
6812
|
-
|
|
6813
|
-
<dl>
|
|
6814
|
-
<dd>
|
|
6815
|
-
|
|
6816
|
-
<dl>
|
|
6817
|
-
<dd>
|
|
6818
|
-
|
|
6819
|
-
Polls CargoAi for the current tracking snapshot of an AWB and stores it as a new update (source=poll). No subscription required — any order participant can poll on demand. | authz: order participant | () -> (CargoAiTrackAndTraceUpdate1)
|
|
6820
|
-
|
|
6821
|
-
</dd>
|
|
6822
|
-
</dl>
|
|
6823
|
-
</dd>
|
|
6824
|
-
</dl>
|
|
6825
|
-
|
|
6826
|
-
#### 🔌 Usage
|
|
6827
|
-
|
|
6828
|
-
<dl>
|
|
6829
|
-
<dd>
|
|
6830
|
-
|
|
6831
|
-
<dl>
|
|
6832
|
-
<dd>
|
|
6833
|
-
|
|
6834
|
-
```typescript
|
|
6835
|
-
await client.integrations.cargoaiTrackAndTrace.refreshV1("awb");
|
|
6836
|
-
```
|
|
6837
|
-
|
|
6838
|
-
</dd>
|
|
6839
|
-
</dl>
|
|
6840
|
-
</dd>
|
|
6841
|
-
</dl>
|
|
6842
|
-
|
|
6843
|
-
#### ⚙️ Parameters
|
|
6844
|
-
|
|
6845
|
-
<dl>
|
|
6846
|
-
<dd>
|
|
6847
|
-
|
|
6848
|
-
<dl>
|
|
6849
|
-
<dd>
|
|
6850
|
-
|
|
6851
|
-
**awb:** `string`
|
|
6852
|
-
|
|
6853
|
-
</dd>
|
|
6854
|
-
</dl>
|
|
6855
|
-
|
|
6856
|
-
<dl>
|
|
6857
|
-
<dd>
|
|
6858
|
-
|
|
6859
|
-
**requestOptions:** `CargoaiTrackAndTrace.RequestOptions`
|
|
6860
|
-
|
|
6861
|
-
</dd>
|
|
6862
|
-
</dl>
|
|
6863
|
-
</dd>
|
|
6864
|
-
</dl>
|
|
6865
|
-
|
|
6866
|
-
</dd>
|
|
6867
|
-
</dl>
|
|
6868
|
-
</details>
|
|
6869
|
-
|
|
6870
6807
|
## Integrations WebcargoBookings
|
|
6871
6808
|
|
|
6872
6809
|
<details><summary><code>client.integrations.webcargoBookings.<a href="/src/api/resources/integrations/resources/webcargoBookings/client/Client.ts">syncV1</a>(taskGroupId) -> Chrt.WebcargoBookingRecord1</code></summary>
|