@chrt-inc/typescript-sdk 1.1014.0 → 1.1015.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.
@@ -61,8 +61,8 @@ class ChrtClient {
61
61
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
62
62
  "X-Fern-Language": "JavaScript",
63
63
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
64
- "X-Fern-SDK-Version": "1.1014.0",
65
- "User-Agent": "@chrt-inc/typescript-sdk/1.1014.0",
64
+ "X-Fern-SDK-Version": "1.1015.0",
65
+ "User-Agent": "@chrt-inc/typescript-sdk/1.1015.0",
66
66
  "X-Fern-Runtime": core.RUNTIME.type,
67
67
  "X-Fern-Runtime-Version": core.RUNTIME.version,
68
68
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -118,6 +118,19 @@ export declare class Tasks {
118
118
  */
119
119
  skipV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
120
120
  private __skipV1;
121
+ /**
122
+ * Returns a task to STAGED to correct an accidental completion, skip, or attempt. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
123
+ *
124
+ * @param {string} taskId
125
+ * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
126
+ *
127
+ * @throws {@link Chrt.UnprocessableEntityError}
128
+ *
129
+ * @example
130
+ * await client.shipping.tasks.stageV1("task_id")
131
+ */
132
+ stageV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
133
+ private __stageV1;
121
134
  /**
122
135
  * Ends an active wait-time session for a task. | authz_personas=[driver_for_executor, executor_org_operators] | () -> (bool)
123
136
  *
@@ -436,6 +436,65 @@ class Tasks {
436
436
  }
437
437
  });
438
438
  }
439
+ /**
440
+ * Returns a task to STAGED to correct an accidental completion, skip, or attempt. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
441
+ *
442
+ * @param {string} taskId
443
+ * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
444
+ *
445
+ * @throws {@link Chrt.UnprocessableEntityError}
446
+ *
447
+ * @example
448
+ * await client.shipping.tasks.stageV1("task_id")
449
+ */
450
+ stageV1(taskId, requestOptions) {
451
+ return core.HttpResponsePromise.fromPromise(this.__stageV1(taskId, requestOptions));
452
+ }
453
+ __stageV1(taskId, requestOptions) {
454
+ return __awaiter(this, void 0, void 0, function* () {
455
+ var _a, _b, _c, _d;
456
+ 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);
457
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
458
+ 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, `shipping/tasks/stage/v1/${encodeURIComponent(taskId)}`),
459
+ method: "PUT",
460
+ headers: _headers,
461
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
462
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
463
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
464
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
465
+ });
466
+ if (_response.ok) {
467
+ return { data: _response.body, rawResponse: _response.rawResponse };
468
+ }
469
+ if (_response.error.reason === "status-code") {
470
+ switch (_response.error.statusCode) {
471
+ case 422:
472
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
473
+ default:
474
+ throw new errors.ChrtError({
475
+ statusCode: _response.error.statusCode,
476
+ body: _response.error.body,
477
+ rawResponse: _response.rawResponse,
478
+ });
479
+ }
480
+ }
481
+ switch (_response.error.reason) {
482
+ case "non-json":
483
+ throw new errors.ChrtError({
484
+ statusCode: _response.error.statusCode,
485
+ body: _response.error.rawBody,
486
+ rawResponse: _response.rawResponse,
487
+ });
488
+ case "timeout":
489
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /shipping/tasks/stage/v1/{task_id}.");
490
+ case "unknown":
491
+ throw new errors.ChrtError({
492
+ message: _response.error.errorMessage,
493
+ rawResponse: _response.rawResponse,
494
+ });
495
+ }
496
+ });
497
+ }
439
498
  /**
440
499
  * Ends an active wait-time session for a task. | authz_personas=[driver_for_executor, executor_org_operators] | () -> (bool)
441
500
  *
@@ -7,6 +7,7 @@ import * as Chrt from "../index.js";
7
7
  */
8
8
  export interface CargoOnFlightBookingItineraryLeg1 {
9
9
  aircraft_body_type?: Chrt.CargoOnFlightBookingAircraftBodyTypeEnum1;
10
+ aircraft_code?: string | null;
10
11
  carrier_iata: string;
11
12
  destination_iata: string;
12
13
  flight_number: string;
@@ -3,10 +3,13 @@
3
3
  */
4
4
  import * as Chrt from "../index.js";
5
5
  export interface CargoOnFlightBookingSearchResult1 {
6
+ airline_conditions?: string | null;
7
+ airline_contacts?: string[];
6
8
  awb_prefixes?: string[];
7
9
  awb_required: boolean;
8
10
  bookable: boolean;
9
11
  carrier_iata: string;
12
+ handling_info_link?: string | null;
10
13
  integration_result_id: string;
11
14
  latest_acceptance_utc?: string | null;
12
15
  legs?: Chrt.CargoOnFlightBookingItineraryLeg1[];
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.1014.0";
1
+ export declare const SDK_VERSION = "1.1015.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.1014.0";
4
+ exports.SDK_VERSION = "1.1015.0";
@@ -25,8 +25,8 @@ export class ChrtClient {
25
25
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
26
26
  "X-Fern-Language": "JavaScript",
27
27
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
28
- "X-Fern-SDK-Version": "1.1014.0",
29
- "User-Agent": "@chrt-inc/typescript-sdk/1.1014.0",
28
+ "X-Fern-SDK-Version": "1.1015.0",
29
+ "User-Agent": "@chrt-inc/typescript-sdk/1.1015.0",
30
30
  "X-Fern-Runtime": core.RUNTIME.type,
31
31
  "X-Fern-Runtime-Version": core.RUNTIME.version,
32
32
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -118,6 +118,19 @@ export declare class Tasks {
118
118
  */
119
119
  skipV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
120
120
  private __skipV1;
121
+ /**
122
+ * Returns a task to STAGED to correct an accidental completion, skip, or attempt. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
123
+ *
124
+ * @param {string} taskId
125
+ * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
126
+ *
127
+ * @throws {@link Chrt.UnprocessableEntityError}
128
+ *
129
+ * @example
130
+ * await client.shipping.tasks.stageV1("task_id")
131
+ */
132
+ stageV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
133
+ private __stageV1;
121
134
  /**
122
135
  * Ends an active wait-time session for a task. | authz_personas=[driver_for_executor, executor_org_operators] | () -> (bool)
123
136
  *
@@ -400,6 +400,65 @@ export class Tasks {
400
400
  }
401
401
  });
402
402
  }
403
+ /**
404
+ * Returns a task to STAGED to correct an accidental completion, skip, or attempt. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
405
+ *
406
+ * @param {string} taskId
407
+ * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
408
+ *
409
+ * @throws {@link Chrt.UnprocessableEntityError}
410
+ *
411
+ * @example
412
+ * await client.shipping.tasks.stageV1("task_id")
413
+ */
414
+ stageV1(taskId, requestOptions) {
415
+ return core.HttpResponsePromise.fromPromise(this.__stageV1(taskId, requestOptions));
416
+ }
417
+ __stageV1(taskId, requestOptions) {
418
+ return __awaiter(this, void 0, void 0, function* () {
419
+ var _a, _b, _c, _d;
420
+ 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);
421
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
422
+ 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, `shipping/tasks/stage/v1/${encodeURIComponent(taskId)}`),
423
+ method: "PUT",
424
+ headers: _headers,
425
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
426
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
427
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
428
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
429
+ });
430
+ if (_response.ok) {
431
+ return { data: _response.body, rawResponse: _response.rawResponse };
432
+ }
433
+ if (_response.error.reason === "status-code") {
434
+ switch (_response.error.statusCode) {
435
+ case 422:
436
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
437
+ default:
438
+ throw new errors.ChrtError({
439
+ statusCode: _response.error.statusCode,
440
+ body: _response.error.body,
441
+ rawResponse: _response.rawResponse,
442
+ });
443
+ }
444
+ }
445
+ switch (_response.error.reason) {
446
+ case "non-json":
447
+ throw new errors.ChrtError({
448
+ statusCode: _response.error.statusCode,
449
+ body: _response.error.rawBody,
450
+ rawResponse: _response.rawResponse,
451
+ });
452
+ case "timeout":
453
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /shipping/tasks/stage/v1/{task_id}.");
454
+ case "unknown":
455
+ throw new errors.ChrtError({
456
+ message: _response.error.errorMessage,
457
+ rawResponse: _response.rawResponse,
458
+ });
459
+ }
460
+ });
461
+ }
403
462
  /**
404
463
  * Ends an active wait-time session for a task. | authz_personas=[driver_for_executor, executor_org_operators] | () -> (bool)
405
464
  *
@@ -7,6 +7,7 @@ import * as Chrt from "../index.mjs";
7
7
  */
8
8
  export interface CargoOnFlightBookingItineraryLeg1 {
9
9
  aircraft_body_type?: Chrt.CargoOnFlightBookingAircraftBodyTypeEnum1;
10
+ aircraft_code?: string | null;
10
11
  carrier_iata: string;
11
12
  destination_iata: string;
12
13
  flight_number: string;
@@ -3,10 +3,13 @@
3
3
  */
4
4
  import * as Chrt from "../index.mjs";
5
5
  export interface CargoOnFlightBookingSearchResult1 {
6
+ airline_conditions?: string | null;
7
+ airline_contacts?: string[];
6
8
  awb_prefixes?: string[];
7
9
  awb_required: boolean;
8
10
  bookable: boolean;
9
11
  carrier_iata: string;
12
+ handling_info_link?: string | null;
10
13
  integration_result_id: string;
11
14
  latest_acceptance_utc?: string | null;
12
15
  legs?: Chrt.CargoOnFlightBookingItineraryLeg1[];
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.1014.0";
1
+ export declare const SDK_VERSION = "1.1015.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.1014.0";
1
+ export const SDK_VERSION = "1.1015.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "1.1014.0",
3
+ "version": "1.1015.0",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -21268,6 +21268,69 @@ await client.shipping.tasks.skipV1("task_id");
21268
21268
  </dl>
21269
21269
  </details>
21270
21270
 
21271
+ <details><summary><code>client.shipping.tasks.<a href="/src/api/resources/shipping/resources/tasks/client/Client.ts">stageV1</a>(taskId) -> boolean</code></summary>
21272
+ <dl>
21273
+ <dd>
21274
+
21275
+ #### 📝 Description
21276
+
21277
+ <dl>
21278
+ <dd>
21279
+
21280
+ <dl>
21281
+ <dd>
21282
+
21283
+ Returns a task to STAGED to correct an accidental completion, skip, or attempt. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
21284
+
21285
+ </dd>
21286
+ </dl>
21287
+ </dd>
21288
+ </dl>
21289
+
21290
+ #### 🔌 Usage
21291
+
21292
+ <dl>
21293
+ <dd>
21294
+
21295
+ <dl>
21296
+ <dd>
21297
+
21298
+ ```typescript
21299
+ await client.shipping.tasks.stageV1("task_id");
21300
+ ```
21301
+
21302
+ </dd>
21303
+ </dl>
21304
+ </dd>
21305
+ </dl>
21306
+
21307
+ #### ⚙️ Parameters
21308
+
21309
+ <dl>
21310
+ <dd>
21311
+
21312
+ <dl>
21313
+ <dd>
21314
+
21315
+ **taskId:** `string`
21316
+
21317
+ </dd>
21318
+ </dl>
21319
+
21320
+ <dl>
21321
+ <dd>
21322
+
21323
+ **requestOptions:** `Tasks.RequestOptions`
21324
+
21325
+ </dd>
21326
+ </dl>
21327
+ </dd>
21328
+ </dl>
21329
+
21330
+ </dd>
21331
+ </dl>
21332
+ </details>
21333
+
21271
21334
  <details><summary><code>client.shipping.tasks.<a href="/src/api/resources/shipping/resources/tasks/client/Client.ts">waitTimeEndV1</a>(taskId) -> boolean</code></summary>
21272
21335
  <dl>
21273
21336
  <dd>