@chrt-inc/typescript-sdk 1.293.0 → 1.299.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/orders/client/requests/OrdersExpandedReq.d.ts +2 -0
- package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +14 -48
- package/dist/cjs/api/resources/taskGroups/client/Client.js +18 -185
- package/dist/cjs/api/resources/taskGroups/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/taskGroups/resources/expanded/client/Client.d.ts +76 -0
- package/dist/cjs/api/resources/taskGroups/resources/{full → expanded}/client/Client.js +108 -26
- package/dist/cjs/api/resources/taskGroups/resources/expanded/client/requests/TaskGroupExpandedForShipperReq.d.ts +20 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/taskGroups/resources/expandedList/client/Client.d.ts +90 -0
- package/dist/cjs/api/resources/taskGroups/resources/expandedList/client/Client.js +326 -0
- package/dist/cjs/api/resources/taskGroups/resources/expandedList/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/taskGroups/resources/expandedList/client/index.js +17 -0
- package/dist/cjs/api/resources/taskGroups/resources/expandedList/client/requests/ExpandedListForCourierAdministratorV1Request.d.ts +40 -0
- package/dist/cjs/api/resources/taskGroups/resources/expandedList/client/requests/ExpandedListForCourierDriverV1Request.d.ts +40 -0
- package/dist/cjs/api/resources/taskGroups/resources/expandedList/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/taskGroups/resources/index.d.ts +4 -3
- package/dist/cjs/api/resources/taskGroups/resources/index.js +5 -4
- package/dist/cjs/api/types/SortOrderEnum.d.ts +11 -0
- package/dist/cjs/api/types/SortOrderEnum.js +10 -0
- package/dist/cjs/api/types/TaskExpanded.d.ts +1 -1
- package/dist/cjs/api/types/TaskGroup1.d.ts +1 -0
- package/dist/cjs/api/types/TaskGroupExpanded.d.ts +2 -6
- package/dist/cjs/api/types/TaskGroupExpandedForCourierAdministrator.d.ts +18 -0
- package/dist/cjs/api/types/TaskGroupExpandedForCourierAdministratorReq.d.ts +19 -0
- package/dist/cjs/api/types/TaskGroupExpandedForCourierDriver.d.ts +18 -0
- package/dist/cjs/api/types/TaskGroupExpandedForCourierDriverReq.d.ts +19 -0
- package/dist/cjs/api/types/TaskGroupExpandedForShipper.d.ts +18 -0
- package/dist/cjs/api/types/TaskGroupExpandedSortFieldEnum.d.ts +12 -0
- package/dist/cjs/api/types/TaskGroupExpandedSortFieldEnum.js +11 -0
- package/dist/cjs/api/types/TaskGroupsExpandedForCourierAdministratorRes.d.ts +11 -0
- package/dist/cjs/api/types/TaskGroupsExpandedForCourierAdministratorRes.js +5 -0
- package/dist/cjs/api/types/TaskGroupsExpandedForCourierDriverRes.d.ts +11 -0
- package/dist/cjs/api/types/TaskGroupsExpandedForCourierDriverRes.js +5 -0
- package/dist/cjs/api/types/index.d.ts +10 -8
- package/dist/cjs/api/types/index.js +10 -8
- 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/orders/client/requests/OrdersExpandedReq.d.mts +2 -0
- package/dist/esm/api/resources/taskGroups/client/Client.d.mts +14 -48
- package/dist/esm/api/resources/taskGroups/client/Client.mjs +18 -185
- package/dist/esm/api/resources/taskGroups/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/taskGroups/resources/expanded/client/Client.d.mts +76 -0
- package/dist/esm/api/resources/taskGroups/resources/{full → expanded}/client/Client.mjs +106 -24
- package/dist/esm/api/resources/taskGroups/resources/expanded/client/requests/TaskGroupExpandedForShipperReq.d.mts +20 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/taskGroups/resources/expandedList/client/Client.d.mts +90 -0
- package/dist/esm/api/resources/taskGroups/resources/expandedList/client/Client.mjs +289 -0
- package/dist/esm/api/resources/taskGroups/resources/expandedList/client/index.d.mts +2 -0
- package/dist/esm/api/resources/taskGroups/resources/expandedList/client/index.mjs +1 -0
- package/dist/esm/api/resources/taskGroups/resources/expandedList/client/requests/ExpandedListForCourierAdministratorV1Request.d.mts +40 -0
- package/dist/esm/api/resources/taskGroups/resources/expandedList/client/requests/ExpandedListForCourierDriverV1Request.d.mts +40 -0
- package/dist/esm/api/resources/taskGroups/resources/expandedList/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/taskGroups/resources/index.d.mts +4 -3
- package/dist/esm/api/resources/taskGroups/resources/index.mjs +4 -3
- package/dist/esm/api/types/SortOrderEnum.d.mts +11 -0
- package/dist/esm/api/types/SortOrderEnum.mjs +7 -0
- package/dist/esm/api/types/TaskExpanded.d.mts +1 -1
- package/dist/esm/api/types/TaskGroup1.d.mts +1 -0
- package/dist/esm/api/types/TaskGroupExpanded.d.mts +2 -6
- package/dist/esm/api/types/TaskGroupExpandedForCourierAdministrator.d.mts +18 -0
- package/dist/esm/api/types/TaskGroupExpandedForCourierAdministratorReq.d.mts +19 -0
- package/dist/esm/api/types/TaskGroupExpandedForCourierDriver.d.mts +18 -0
- package/dist/esm/api/types/TaskGroupExpandedForCourierDriverReq.d.mts +19 -0
- package/dist/esm/api/types/TaskGroupExpandedForShipper.d.mts +18 -0
- package/dist/esm/api/types/TaskGroupExpandedSortFieldEnum.d.mts +12 -0
- package/dist/esm/api/types/TaskGroupExpandedSortFieldEnum.mjs +8 -0
- package/dist/esm/api/types/TaskGroupsExpandedForCourierAdministratorRes.d.mts +11 -0
- package/dist/esm/api/types/TaskGroupsExpandedForCourierAdministratorRes.mjs +4 -0
- package/dist/esm/api/types/TaskGroupsExpandedForCourierDriverRes.d.mts +11 -0
- package/dist/esm/api/types/TaskGroupsExpandedForCourierDriverRes.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +10 -8
- package/dist/esm/api/types/index.mjs +10 -8
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +206 -201
- package/dist/cjs/api/resources/taskGroups/client/requests/TaskGroupsExpandedReq.d.ts +0 -24
- package/dist/cjs/api/resources/taskGroups/resources/full/client/Client.d.ts +0 -57
- package/dist/cjs/api/resources/taskGroups/resources/full/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/taskGroups/resources/togglePause/client/Client.d.ts +0 -51
- package/dist/cjs/api/resources/taskGroups/resources/togglePause/client/Client.js +0 -134
- package/dist/cjs/api/resources/taskGroups/resources/togglePause/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/types/MultipleTaskGroupsDetailsResponse.d.ts +0 -7
- package/dist/cjs/api/types/MultipleTaskGroupsWithTasks.d.ts +0 -7
- package/dist/cjs/api/types/TaskGroupDetailsResponse.d.ts +0 -8
- package/dist/cjs/api/types/TaskGroupWithDetails.d.ts +0 -8
- package/dist/cjs/api/types/TaskGroupWithTasks.d.ts +0 -8
- package/dist/cjs/api/types/TaskGroupsExpandedRes.d.ts +0 -10
- package/dist/cjs/api/types/TaskWithDetails.d.ts +0 -9
- package/dist/esm/api/resources/taskGroups/client/requests/TaskGroupsExpandedReq.d.mts +0 -24
- package/dist/esm/api/resources/taskGroups/resources/full/client/Client.d.mts +0 -57
- package/dist/esm/api/resources/taskGroups/resources/full/client/index.d.mts +0 -1
- package/dist/esm/api/resources/taskGroups/resources/togglePause/client/Client.d.mts +0 -51
- package/dist/esm/api/resources/taskGroups/resources/togglePause/client/Client.mjs +0 -97
- package/dist/esm/api/resources/taskGroups/resources/togglePause/client/requests/index.d.mts +0 -1
- package/dist/esm/api/types/MultipleTaskGroupsDetailsResponse.d.mts +0 -7
- package/dist/esm/api/types/MultipleTaskGroupsWithTasks.d.mts +0 -7
- package/dist/esm/api/types/TaskGroupDetailsResponse.d.mts +0 -8
- package/dist/esm/api/types/TaskGroupWithDetails.d.mts +0 -8
- package/dist/esm/api/types/TaskGroupWithTasks.d.mts +0 -8
- package/dist/esm/api/types/TaskGroupsExpandedRes.d.mts +0 -10
- package/dist/esm/api/types/TaskWithDetails.d.mts +0 -9
- /package/dist/cjs/api/resources/taskGroups/{resources/togglePause/client → client}/requests/SetTaskGroupPauseReq.d.ts +0 -0
- /package/dist/cjs/api/resources/taskGroups/{resources/togglePause/client → client}/requests/SetTaskGroupPauseReq.js +0 -0
- /package/dist/cjs/api/resources/taskGroups/resources/{togglePause → expanded}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/taskGroups/resources/{togglePause → expanded}/client/index.js +0 -0
- /package/dist/cjs/api/resources/taskGroups/{client/requests/TaskGroupsExpandedReq.js → resources/expanded/client/requests/TaskGroupExpandedForShipperReq.js} +0 -0
- /package/dist/cjs/api/resources/taskGroups/resources/{full/client → expanded/client/requests}/index.js +0 -0
- /package/dist/cjs/api/resources/taskGroups/resources/{full → expanded}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/taskGroups/resources/{full → expanded}/index.js +0 -0
- /package/dist/cjs/api/{types/MultipleTaskGroupsDetailsResponse.js → resources/taskGroups/resources/expandedList/client/requests/ExpandedListForCourierAdministratorV1Request.js} +0 -0
- /package/dist/cjs/api/{types/MultipleTaskGroupsWithTasks.js → resources/taskGroups/resources/expandedList/client/requests/ExpandedListForCourierDriverV1Request.js} +0 -0
- /package/dist/cjs/api/resources/taskGroups/resources/{togglePause → expandedList}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/taskGroups/resources/{togglePause → expandedList}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/taskGroups/resources/{togglePause → expandedList}/index.js +0 -0
- /package/dist/cjs/api/types/{TaskGroupDetailsResponse.js → TaskGroupExpandedForCourierAdministrator.js} +0 -0
- /package/dist/cjs/api/types/{TaskGroupWithDetails.js → TaskGroupExpandedForCourierAdministratorReq.js} +0 -0
- /package/dist/cjs/api/types/{TaskGroupWithTasks.js → TaskGroupExpandedForCourierDriver.js} +0 -0
- /package/dist/cjs/api/types/{TaskGroupsExpandedRes.js → TaskGroupExpandedForCourierDriverReq.js} +0 -0
- /package/dist/cjs/api/types/{TaskWithDetails.js → TaskGroupExpandedForShipper.js} +0 -0
- /package/dist/esm/api/resources/taskGroups/{resources/togglePause/client → client}/requests/SetTaskGroupPauseReq.d.mts +0 -0
- /package/dist/esm/api/resources/taskGroups/{resources/togglePause/client → client}/requests/SetTaskGroupPauseReq.mjs +0 -0
- /package/dist/esm/api/resources/taskGroups/resources/{togglePause → expanded}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/taskGroups/resources/{togglePause → expanded}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/taskGroups/{client/requests/TaskGroupsExpandedReq.mjs → resources/expanded/client/requests/TaskGroupExpandedForShipperReq.mjs} +0 -0
- /package/dist/esm/api/resources/taskGroups/resources/{full/client → expanded/client/requests}/index.mjs +0 -0
- /package/dist/esm/api/resources/taskGroups/resources/{full → expanded}/index.d.mts +0 -0
- /package/dist/esm/api/resources/taskGroups/resources/{full → expanded}/index.mjs +0 -0
- /package/dist/esm/api/{types/MultipleTaskGroupsDetailsResponse.mjs → resources/taskGroups/resources/expandedList/client/requests/ExpandedListForCourierAdministratorV1Request.mjs} +0 -0
- /package/dist/esm/api/{types/MultipleTaskGroupsWithTasks.mjs → resources/taskGroups/resources/expandedList/client/requests/ExpandedListForCourierDriverV1Request.mjs} +0 -0
- /package/dist/esm/api/resources/taskGroups/resources/{togglePause → expandedList}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/taskGroups/resources/{togglePause → expandedList}/index.d.mts +0 -0
- /package/dist/esm/api/resources/taskGroups/resources/{togglePause → expandedList}/index.mjs +0 -0
- /package/dist/esm/api/types/{TaskGroupDetailsResponse.mjs → TaskGroupExpandedForCourierAdministrator.mjs} +0 -0
- /package/dist/esm/api/types/{TaskGroupWithDetails.mjs → TaskGroupExpandedForCourierAdministratorReq.mjs} +0 -0
- /package/dist/esm/api/types/{TaskGroupWithTasks.mjs → TaskGroupExpandedForCourierDriver.mjs} +0 -0
- /package/dist/esm/api/types/{TaskGroupsExpandedRes.mjs → TaskGroupExpandedForCourierDriverReq.mjs} +0 -0
- /package/dist/esm/api/types/{TaskWithDetails.mjs → TaskGroupExpandedForShipper.mjs} +0 -0
|
@@ -1,57 +0,0 @@
|
|
|
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 Full {
|
|
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 Full {
|
|
31
|
-
protected readonly _options: Full.Options;
|
|
32
|
-
constructor(_options?: Full.Options);
|
|
33
|
-
/**
|
|
34
|
-
* Lists all task groups for the authenticated courier organization with complete tasks, milestones, and cargo details.
|
|
35
|
-
*
|
|
36
|
-
* @param {Full.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* await client.taskGroups.full.listByCourierOrgIdV1()
|
|
40
|
-
*/
|
|
41
|
-
listByCourierOrgIdV1(requestOptions?: Full.RequestOptions): core.HttpResponsePromise<Chrt.MultipleTaskGroupsDetailsResponse>;
|
|
42
|
-
private __listByCourierOrgIdV1;
|
|
43
|
-
/**
|
|
44
|
-
* Retrieves a specific task group with complete tasks, milestones, and cargo information.
|
|
45
|
-
*
|
|
46
|
-
* @param {string} id
|
|
47
|
-
* @param {Full.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
|
-
*
|
|
49
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* await client.taskGroups.full.getByTaskGroupIdV1("id")
|
|
53
|
-
*/
|
|
54
|
-
getByTaskGroupIdV1(id: string, requestOptions?: Full.RequestOptions): core.HttpResponsePromise<Chrt.TaskGroupWithDetails>;
|
|
55
|
-
private __getByTaskGroupIdV1;
|
|
56
|
-
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
57
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,51 +0,0 @@
|
|
|
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 TogglePause {
|
|
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 TogglePause {
|
|
31
|
-
protected readonly _options: TogglePause.Options;
|
|
32
|
-
constructor(_options?: TogglePause.Options);
|
|
33
|
-
/**
|
|
34
|
-
* Toggles the pause status of an in-progress task group.
|
|
35
|
-
*
|
|
36
|
-
* @param {string} id
|
|
37
|
-
* @param {Chrt.taskGroups.SetTaskGroupPauseReq} request
|
|
38
|
-
* @param {TogglePause.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
|
-
*
|
|
40
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* await client.taskGroups.togglePause.byIdV1("id", {
|
|
44
|
-
* task_group_id: "task_group_id",
|
|
45
|
-
* paused: true
|
|
46
|
-
* })
|
|
47
|
-
*/
|
|
48
|
-
byIdV1(id: string, request: Chrt.taskGroups.SetTaskGroupPauseReq, requestOptions?: TogglePause.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
49
|
-
private __byIdV1;
|
|
50
|
-
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
51
|
-
}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.TogglePause = void 0;
|
|
49
|
-
const environments = __importStar(require("../../../../../../environments.js"));
|
|
50
|
-
const core = __importStar(require("../../../../../../core/index.js"));
|
|
51
|
-
const Chrt = __importStar(require("../../../../../index.js"));
|
|
52
|
-
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
|
-
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
|
-
class TogglePause {
|
|
55
|
-
constructor(_options = {}) {
|
|
56
|
-
this._options = _options;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Toggles the pause status of an in-progress task group.
|
|
60
|
-
*
|
|
61
|
-
* @param {string} id
|
|
62
|
-
* @param {Chrt.taskGroups.SetTaskGroupPauseReq} request
|
|
63
|
-
* @param {TogglePause.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
|
-
*
|
|
65
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* await client.taskGroups.togglePause.byIdV1("id", {
|
|
69
|
-
* task_group_id: "task_group_id",
|
|
70
|
-
* paused: true
|
|
71
|
-
* })
|
|
72
|
-
*/
|
|
73
|
-
byIdV1(id, request, requestOptions) {
|
|
74
|
-
return core.HttpResponsePromise.fromPromise(this.__byIdV1(id, request, requestOptions));
|
|
75
|
-
}
|
|
76
|
-
__byIdV1(id, request, requestOptions) {
|
|
77
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
-
var _a, _b, _c, _d;
|
|
79
|
-
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);
|
|
80
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
81
|
-
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, `oort/task_groups/toggle_pause/v1/${encodeURIComponent(id)}`),
|
|
82
|
-
method: "PUT",
|
|
83
|
-
headers: _headers,
|
|
84
|
-
contentType: "application/json",
|
|
85
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
86
|
-
requestType: "json",
|
|
87
|
-
body: request,
|
|
88
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
89
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
90
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
91
|
-
});
|
|
92
|
-
if (_response.ok) {
|
|
93
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
94
|
-
}
|
|
95
|
-
if (_response.error.reason === "status-code") {
|
|
96
|
-
switch (_response.error.statusCode) {
|
|
97
|
-
case 422:
|
|
98
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
99
|
-
default:
|
|
100
|
-
throw new errors.ChrtError({
|
|
101
|
-
statusCode: _response.error.statusCode,
|
|
102
|
-
body: _response.error.body,
|
|
103
|
-
rawResponse: _response.rawResponse,
|
|
104
|
-
});
|
|
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 PUT /oort/task_groups/toggle_pause/v1/{id}.");
|
|
116
|
-
case "unknown":
|
|
117
|
-
throw new errors.ChrtError({
|
|
118
|
-
message: _response.error.errorMessage,
|
|
119
|
-
rawResponse: _response.rawResponse,
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
_getAuthorizationHeader() {
|
|
125
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
-
const bearer = yield core.Supplier.get(this._options.token);
|
|
127
|
-
if (bearer != null) {
|
|
128
|
-
return `Bearer ${bearer}`;
|
|
129
|
-
}
|
|
130
|
-
return undefined;
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
exports.TogglePause = TogglePause;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { type SetTaskGroupPauseReq } from "./SetTaskGroupPauseReq.js";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Chrt from "../index.js";
|
|
5
|
-
/**
|
|
6
|
-
* Response containing list of task groups with expanded data
|
|
7
|
-
*/
|
|
8
|
-
export interface TaskGroupsExpandedRes {
|
|
9
|
-
task_groups_expanded: Chrt.TaskGroupExpanded[];
|
|
10
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Chrt from "../../../../index.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* task_group_statuses: ["not_started"]
|
|
9
|
-
* }
|
|
10
|
-
*/
|
|
11
|
-
export interface TaskGroupsExpandedReq {
|
|
12
|
-
task_group_statuses: Chrt.TaskGroupStatusEnum1[];
|
|
13
|
-
driver_id?: string | null;
|
|
14
|
-
expand_tasks?: boolean;
|
|
15
|
-
expand_cargos?: boolean;
|
|
16
|
-
expand_milestones?: boolean;
|
|
17
|
-
expand_shipper_contact_info?: boolean;
|
|
18
|
-
expand_order_org_company_name?: boolean;
|
|
19
|
-
expand_order_org_handle?: boolean;
|
|
20
|
-
expand_task_group_mileage?: boolean;
|
|
21
|
-
expand_courier_pay_driver_line_item_groups?: boolean;
|
|
22
|
-
expand_courier_pay_driver_rate_sheet?: boolean;
|
|
23
|
-
expand_courier_pay_driver_payout?: boolean;
|
|
24
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
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 Full {
|
|
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 Full {
|
|
31
|
-
protected readonly _options: Full.Options;
|
|
32
|
-
constructor(_options?: Full.Options);
|
|
33
|
-
/**
|
|
34
|
-
* Lists all task groups for the authenticated courier organization with complete tasks, milestones, and cargo details.
|
|
35
|
-
*
|
|
36
|
-
* @param {Full.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* await client.taskGroups.full.listByCourierOrgIdV1()
|
|
40
|
-
*/
|
|
41
|
-
listByCourierOrgIdV1(requestOptions?: Full.RequestOptions): core.HttpResponsePromise<Chrt.MultipleTaskGroupsDetailsResponse>;
|
|
42
|
-
private __listByCourierOrgIdV1;
|
|
43
|
-
/**
|
|
44
|
-
* Retrieves a specific task group with complete tasks, milestones, and cargo information.
|
|
45
|
-
*
|
|
46
|
-
* @param {string} id
|
|
47
|
-
* @param {Full.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
|
-
*
|
|
49
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* await client.taskGroups.full.getByTaskGroupIdV1("id")
|
|
53
|
-
*/
|
|
54
|
-
getByTaskGroupIdV1(id: string, requestOptions?: Full.RequestOptions): core.HttpResponsePromise<Chrt.TaskGroupWithDetails>;
|
|
55
|
-
private __getByTaskGroupIdV1;
|
|
56
|
-
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
57
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,51 +0,0 @@
|
|
|
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 TogglePause {
|
|
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 TogglePause {
|
|
31
|
-
protected readonly _options: TogglePause.Options;
|
|
32
|
-
constructor(_options?: TogglePause.Options);
|
|
33
|
-
/**
|
|
34
|
-
* Toggles the pause status of an in-progress task group.
|
|
35
|
-
*
|
|
36
|
-
* @param {string} id
|
|
37
|
-
* @param {Chrt.taskGroups.SetTaskGroupPauseReq} request
|
|
38
|
-
* @param {TogglePause.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
|
-
*
|
|
40
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* await client.taskGroups.togglePause.byIdV1("id", {
|
|
44
|
-
* task_group_id: "task_group_id",
|
|
45
|
-
* paused: true
|
|
46
|
-
* })
|
|
47
|
-
*/
|
|
48
|
-
byIdV1(id: string, request: Chrt.taskGroups.SetTaskGroupPauseReq, requestOptions?: TogglePause.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
49
|
-
private __byIdV1;
|
|
50
|
-
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
51
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
import * as environments from "../../../../../../environments.mjs";
|
|
14
|
-
import * as core from "../../../../../../core/index.mjs";
|
|
15
|
-
import * as Chrt from "../../../../../index.mjs";
|
|
16
|
-
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
17
|
-
import * as errors from "../../../../../../errors/index.mjs";
|
|
18
|
-
export class TogglePause {
|
|
19
|
-
constructor(_options = {}) {
|
|
20
|
-
this._options = _options;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Toggles the pause status of an in-progress task group.
|
|
24
|
-
*
|
|
25
|
-
* @param {string} id
|
|
26
|
-
* @param {Chrt.taskGroups.SetTaskGroupPauseReq} request
|
|
27
|
-
* @param {TogglePause.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
-
*
|
|
29
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* await client.taskGroups.togglePause.byIdV1("id", {
|
|
33
|
-
* task_group_id: "task_group_id",
|
|
34
|
-
* paused: true
|
|
35
|
-
* })
|
|
36
|
-
*/
|
|
37
|
-
byIdV1(id, request, requestOptions) {
|
|
38
|
-
return core.HttpResponsePromise.fromPromise(this.__byIdV1(id, request, requestOptions));
|
|
39
|
-
}
|
|
40
|
-
__byIdV1(id, request, requestOptions) {
|
|
41
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
var _a, _b, _c, _d;
|
|
43
|
-
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);
|
|
44
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
45
|
-
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, `oort/task_groups/toggle_pause/v1/${encodeURIComponent(id)}`),
|
|
46
|
-
method: "PUT",
|
|
47
|
-
headers: _headers,
|
|
48
|
-
contentType: "application/json",
|
|
49
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
50
|
-
requestType: "json",
|
|
51
|
-
body: request,
|
|
52
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
53
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
54
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
55
|
-
});
|
|
56
|
-
if (_response.ok) {
|
|
57
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
58
|
-
}
|
|
59
|
-
if (_response.error.reason === "status-code") {
|
|
60
|
-
switch (_response.error.statusCode) {
|
|
61
|
-
case 422:
|
|
62
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
63
|
-
default:
|
|
64
|
-
throw new errors.ChrtError({
|
|
65
|
-
statusCode: _response.error.statusCode,
|
|
66
|
-
body: _response.error.body,
|
|
67
|
-
rawResponse: _response.rawResponse,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
switch (_response.error.reason) {
|
|
72
|
-
case "non-json":
|
|
73
|
-
throw new errors.ChrtError({
|
|
74
|
-
statusCode: _response.error.statusCode,
|
|
75
|
-
body: _response.error.rawBody,
|
|
76
|
-
rawResponse: _response.rawResponse,
|
|
77
|
-
});
|
|
78
|
-
case "timeout":
|
|
79
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /oort/task_groups/toggle_pause/v1/{id}.");
|
|
80
|
-
case "unknown":
|
|
81
|
-
throw new errors.ChrtError({
|
|
82
|
-
message: _response.error.errorMessage,
|
|
83
|
-
rawResponse: _response.rawResponse,
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
_getAuthorizationHeader() {
|
|
89
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
-
const bearer = yield core.Supplier.get(this._options.token);
|
|
91
|
-
if (bearer != null) {
|
|
92
|
-
return `Bearer ${bearer}`;
|
|
93
|
-
}
|
|
94
|
-
return undefined;
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { type SetTaskGroupPauseReq } from "./SetTaskGroupPauseReq.mjs";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Chrt from "../index.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* Response containing list of task groups with expanded data
|
|
7
|
-
*/
|
|
8
|
-
export interface TaskGroupsExpandedRes {
|
|
9
|
-
task_groups_expanded: Chrt.TaskGroupExpanded[];
|
|
10
|
-
}
|
|
File without changes
|
|
File without changes
|
/package/dist/cjs/api/resources/taskGroups/resources/{togglePause → expanded}/client/index.d.ts
RENAMED
|
File without changes
|
/package/dist/cjs/api/resources/taskGroups/resources/{togglePause → expanded}/client/index.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|