@chrt-inc/typescript-sdk 1.352.0 → 1.353.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/orgs/client/Client.d.ts +10 -0
- package/dist/cjs/api/resources/orgs/client/Client.js +51 -0
- package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +14 -0
- package/dist/cjs/api/resources/taskGroups/client/Client.js +60 -0
- package/dist/cjs/api/types/OrgPrivateData1.d.ts +20 -0
- package/dist/cjs/api/types/OrgPrivateData1.js +5 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- 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/orgs/client/Client.d.mts +10 -0
- package/dist/esm/api/resources/orgs/client/Client.mjs +51 -0
- package/dist/esm/api/resources/taskGroups/client/Client.d.mts +14 -0
- package/dist/esm/api/resources/taskGroups/client/Client.mjs +60 -0
- package/dist/esm/api/types/OrgPrivateData1.d.mts +20 -0
- package/dist/esm/api/types/OrgPrivateData1.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +126 -0
package/dist/cjs/Client.js
CHANGED
|
@@ -67,8 +67,8 @@ class ChrtClient {
|
|
|
67
67
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
68
68
|
"X-Fern-Language": "JavaScript",
|
|
69
69
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
70
|
-
"X-Fern-SDK-Version": "1.
|
|
71
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
70
|
+
"X-Fern-SDK-Version": "1.353.0",
|
|
71
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.353.0",
|
|
72
72
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
73
73
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
74
74
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -50,6 +50,16 @@ export declare class Orgs {
|
|
|
50
50
|
*/
|
|
51
51
|
listMembersV1(requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.OrgMemberDetails[]>;
|
|
52
52
|
private __listMembersV1;
|
|
53
|
+
/**
|
|
54
|
+
* Retrieves private organization data for the caller's organization. | authz: min_org_role=operator | () -> (OrgPrivateData1)
|
|
55
|
+
*
|
|
56
|
+
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* await client.orgs.getOrgPrivateDataV1()
|
|
60
|
+
*/
|
|
61
|
+
getOrgPrivateDataV1(requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.OrgPrivateData1>;
|
|
62
|
+
private __getOrgPrivateDataV1;
|
|
53
63
|
/**
|
|
54
64
|
* Retrieves public organization data for the caller's organization. | () -> (OrgPublicData1)
|
|
55
65
|
*
|
|
@@ -157,6 +157,57 @@ class Orgs {
|
|
|
157
157
|
}
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* Retrieves private organization data for the caller's organization. | authz: min_org_role=operator | () -> (OrgPrivateData1)
|
|
162
|
+
*
|
|
163
|
+
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* await client.orgs.getOrgPrivateDataV1()
|
|
167
|
+
*/
|
|
168
|
+
getOrgPrivateDataV1(requestOptions) {
|
|
169
|
+
return core.HttpResponsePromise.fromPromise(this.__getOrgPrivateDataV1(requestOptions));
|
|
170
|
+
}
|
|
171
|
+
__getOrgPrivateDataV1(requestOptions) {
|
|
172
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
+
var _a, _b, _c, _d;
|
|
174
|
+
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);
|
|
175
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
176
|
+
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, "orgs/org_private_data/v1"),
|
|
177
|
+
method: "GET",
|
|
178
|
+
headers: _headers,
|
|
179
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
180
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
181
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
182
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
183
|
+
});
|
|
184
|
+
if (_response.ok) {
|
|
185
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
186
|
+
}
|
|
187
|
+
if (_response.error.reason === "status-code") {
|
|
188
|
+
throw new errors.ChrtError({
|
|
189
|
+
statusCode: _response.error.statusCode,
|
|
190
|
+
body: _response.error.body,
|
|
191
|
+
rawResponse: _response.rawResponse,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
switch (_response.error.reason) {
|
|
195
|
+
case "non-json":
|
|
196
|
+
throw new errors.ChrtError({
|
|
197
|
+
statusCode: _response.error.statusCode,
|
|
198
|
+
body: _response.error.rawBody,
|
|
199
|
+
rawResponse: _response.rawResponse,
|
|
200
|
+
});
|
|
201
|
+
case "timeout":
|
|
202
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /orgs/org_private_data/v1.");
|
|
203
|
+
case "unknown":
|
|
204
|
+
throw new errors.ChrtError({
|
|
205
|
+
message: _response.error.errorMessage,
|
|
206
|
+
rawResponse: _response.rawResponse,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
160
211
|
/**
|
|
161
212
|
* Retrieves public organization data for the caller's organization. | () -> (OrgPublicData1)
|
|
162
213
|
*
|
|
@@ -113,6 +113,20 @@ export declare class TaskGroups {
|
|
|
113
113
|
*/
|
|
114
114
|
updateCourierOrgV1(taskGroupId: string, request: Chrt.UpdateCourierOrgReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
115
115
|
private __updateCourierOrgV1;
|
|
116
|
+
/**
|
|
117
|
+
* Assigns a rate sheet to a task group. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
118
|
+
*
|
|
119
|
+
* @param {string} rateSheetId
|
|
120
|
+
* @param {string} taskGroupId
|
|
121
|
+
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
122
|
+
*
|
|
123
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* await client.taskGroups.assignRateSheetV1("rate_sheet_id", "task_group_id")
|
|
127
|
+
*/
|
|
128
|
+
assignRateSheetV1(rateSheetId: string, taskGroupId: string, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
129
|
+
private __assignRateSheetV1;
|
|
116
130
|
/**
|
|
117
131
|
* Sets the flight number and/or fa_flight_ids on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
|
|
118
132
|
*
|
|
@@ -383,6 +383,66 @@ class TaskGroups {
|
|
|
383
383
|
}
|
|
384
384
|
});
|
|
385
385
|
}
|
|
386
|
+
/**
|
|
387
|
+
* Assigns a rate sheet to a task group. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
388
|
+
*
|
|
389
|
+
* @param {string} rateSheetId
|
|
390
|
+
* @param {string} taskGroupId
|
|
391
|
+
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
392
|
+
*
|
|
393
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
394
|
+
*
|
|
395
|
+
* @example
|
|
396
|
+
* await client.taskGroups.assignRateSheetV1("rate_sheet_id", "task_group_id")
|
|
397
|
+
*/
|
|
398
|
+
assignRateSheetV1(rateSheetId, taskGroupId, requestOptions) {
|
|
399
|
+
return core.HttpResponsePromise.fromPromise(this.__assignRateSheetV1(rateSheetId, taskGroupId, requestOptions));
|
|
400
|
+
}
|
|
401
|
+
__assignRateSheetV1(rateSheetId, taskGroupId, requestOptions) {
|
|
402
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
403
|
+
var _a, _b, _c, _d;
|
|
404
|
+
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);
|
|
405
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
406
|
+
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/assign_rate_sheet/v1/${encodeURIComponent(rateSheetId)}/${encodeURIComponent(taskGroupId)}`),
|
|
407
|
+
method: "PATCH",
|
|
408
|
+
headers: _headers,
|
|
409
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
410
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
411
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
412
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
413
|
+
});
|
|
414
|
+
if (_response.ok) {
|
|
415
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
416
|
+
}
|
|
417
|
+
if (_response.error.reason === "status-code") {
|
|
418
|
+
switch (_response.error.statusCode) {
|
|
419
|
+
case 422:
|
|
420
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
421
|
+
default:
|
|
422
|
+
throw new errors.ChrtError({
|
|
423
|
+
statusCode: _response.error.statusCode,
|
|
424
|
+
body: _response.error.body,
|
|
425
|
+
rawResponse: _response.rawResponse,
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
switch (_response.error.reason) {
|
|
430
|
+
case "non-json":
|
|
431
|
+
throw new errors.ChrtError({
|
|
432
|
+
statusCode: _response.error.statusCode,
|
|
433
|
+
body: _response.error.rawBody,
|
|
434
|
+
rawResponse: _response.rawResponse,
|
|
435
|
+
});
|
|
436
|
+
case "timeout":
|
|
437
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/task_groups/assign_rate_sheet/v1/{rate_sheet_id}/{task_group_id}.");
|
|
438
|
+
case "unknown":
|
|
439
|
+
throw new errors.ChrtError({
|
|
440
|
+
message: _response.error.errorMessage,
|
|
441
|
+
rawResponse: _response.rawResponse,
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
}
|
|
386
446
|
/**
|
|
387
447
|
* Sets the flight number and/or fa_flight_ids on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
|
|
388
448
|
*
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.js";
|
|
5
|
+
export interface OrgPrivateData1 {
|
|
6
|
+
schema_version: number;
|
|
7
|
+
org_type: Chrt.OrgTypeEnum;
|
|
8
|
+
/** Must be a string starting with `org_` */
|
|
9
|
+
org_id: string;
|
|
10
|
+
stripe_connect_account_id?: string | null;
|
|
11
|
+
default_rate_sheet__routed__shipper_pay_courier?: string | null;
|
|
12
|
+
default_rate_sheet__on_demand__shipper_pay_courier?: string | null;
|
|
13
|
+
default_rate_sheet__routed__courier_pay_driver?: string | null;
|
|
14
|
+
default_rate_sheet__on_demand__courier_pay_driver?: string | null;
|
|
15
|
+
default_rate_sheet__routed__shipper_pay_forwarder?: string | null;
|
|
16
|
+
default_rate_sheet__on_demand__shipper_pay_forwarder?: string | null;
|
|
17
|
+
default_rate_sheet__routed__forwarder_pay_courier?: string | null;
|
|
18
|
+
default_rate_sheet__on_demand__forwarder_pay_courier?: string | null;
|
|
19
|
+
_id: string;
|
|
20
|
+
}
|
|
@@ -67,6 +67,7 @@ export * from "./OrdersExpandedListRes.js";
|
|
|
67
67
|
export * from "./OrdersNewDraftRes.js";
|
|
68
68
|
export * from "./OrgMemberDetails.js";
|
|
69
69
|
export * from "./OrgMembersAndDrivers.js";
|
|
70
|
+
export * from "./OrgPrivateData1.js";
|
|
70
71
|
export * from "./OrgProfileRes1.js";
|
|
71
72
|
export * from "./OrgPublicData1.js";
|
|
72
73
|
export * from "./OrgRoleEnum.js";
|
|
@@ -83,6 +83,7 @@ __exportStar(require("./OrdersExpandedListRes.js"), exports);
|
|
|
83
83
|
__exportStar(require("./OrdersNewDraftRes.js"), exports);
|
|
84
84
|
__exportStar(require("./OrgMemberDetails.js"), exports);
|
|
85
85
|
__exportStar(require("./OrgMembersAndDrivers.js"), exports);
|
|
86
|
+
__exportStar(require("./OrgPrivateData1.js"), exports);
|
|
86
87
|
__exportStar(require("./OrgProfileRes1.js"), exports);
|
|
87
88
|
__exportStar(require("./OrgPublicData1.js"), exports);
|
|
88
89
|
__exportStar(require("./OrgRoleEnum.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.353.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -31,8 +31,8 @@ export class ChrtClient {
|
|
|
31
31
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
32
32
|
"X-Fern-Language": "JavaScript",
|
|
33
33
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
34
|
-
"X-Fern-SDK-Version": "1.
|
|
35
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
34
|
+
"X-Fern-SDK-Version": "1.353.0",
|
|
35
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.353.0",
|
|
36
36
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
37
37
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
38
38
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -50,6 +50,16 @@ export declare class Orgs {
|
|
|
50
50
|
*/
|
|
51
51
|
listMembersV1(requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.OrgMemberDetails[]>;
|
|
52
52
|
private __listMembersV1;
|
|
53
|
+
/**
|
|
54
|
+
* Retrieves private organization data for the caller's organization. | authz: min_org_role=operator | () -> (OrgPrivateData1)
|
|
55
|
+
*
|
|
56
|
+
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* await client.orgs.getOrgPrivateDataV1()
|
|
60
|
+
*/
|
|
61
|
+
getOrgPrivateDataV1(requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.OrgPrivateData1>;
|
|
62
|
+
private __getOrgPrivateDataV1;
|
|
53
63
|
/**
|
|
54
64
|
* Retrieves public organization data for the caller's organization. | () -> (OrgPublicData1)
|
|
55
65
|
*
|
|
@@ -121,6 +121,57 @@ export class Orgs {
|
|
|
121
121
|
}
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* Retrieves private organization data for the caller's organization. | authz: min_org_role=operator | () -> (OrgPrivateData1)
|
|
126
|
+
*
|
|
127
|
+
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* await client.orgs.getOrgPrivateDataV1()
|
|
131
|
+
*/
|
|
132
|
+
getOrgPrivateDataV1(requestOptions) {
|
|
133
|
+
return core.HttpResponsePromise.fromPromise(this.__getOrgPrivateDataV1(requestOptions));
|
|
134
|
+
}
|
|
135
|
+
__getOrgPrivateDataV1(requestOptions) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
var _a, _b, _c, _d;
|
|
138
|
+
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);
|
|
139
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
140
|
+
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, "orgs/org_private_data/v1"),
|
|
141
|
+
method: "GET",
|
|
142
|
+
headers: _headers,
|
|
143
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
144
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
145
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
146
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
147
|
+
});
|
|
148
|
+
if (_response.ok) {
|
|
149
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
150
|
+
}
|
|
151
|
+
if (_response.error.reason === "status-code") {
|
|
152
|
+
throw new errors.ChrtError({
|
|
153
|
+
statusCode: _response.error.statusCode,
|
|
154
|
+
body: _response.error.body,
|
|
155
|
+
rawResponse: _response.rawResponse,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
switch (_response.error.reason) {
|
|
159
|
+
case "non-json":
|
|
160
|
+
throw new errors.ChrtError({
|
|
161
|
+
statusCode: _response.error.statusCode,
|
|
162
|
+
body: _response.error.rawBody,
|
|
163
|
+
rawResponse: _response.rawResponse,
|
|
164
|
+
});
|
|
165
|
+
case "timeout":
|
|
166
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /orgs/org_private_data/v1.");
|
|
167
|
+
case "unknown":
|
|
168
|
+
throw new errors.ChrtError({
|
|
169
|
+
message: _response.error.errorMessage,
|
|
170
|
+
rawResponse: _response.rawResponse,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
124
175
|
/**
|
|
125
176
|
* Retrieves public organization data for the caller's organization. | () -> (OrgPublicData1)
|
|
126
177
|
*
|
|
@@ -113,6 +113,20 @@ export declare class TaskGroups {
|
|
|
113
113
|
*/
|
|
114
114
|
updateCourierOrgV1(taskGroupId: string, request: Chrt.UpdateCourierOrgReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
115
115
|
private __updateCourierOrgV1;
|
|
116
|
+
/**
|
|
117
|
+
* Assigns a rate sheet to a task group. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
118
|
+
*
|
|
119
|
+
* @param {string} rateSheetId
|
|
120
|
+
* @param {string} taskGroupId
|
|
121
|
+
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
122
|
+
*
|
|
123
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* await client.taskGroups.assignRateSheetV1("rate_sheet_id", "task_group_id")
|
|
127
|
+
*/
|
|
128
|
+
assignRateSheetV1(rateSheetId: string, taskGroupId: string, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
129
|
+
private __assignRateSheetV1;
|
|
116
130
|
/**
|
|
117
131
|
* Sets the flight number and/or fa_flight_ids on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
|
|
118
132
|
*
|
|
@@ -347,6 +347,66 @@ export class TaskGroups {
|
|
|
347
347
|
}
|
|
348
348
|
});
|
|
349
349
|
}
|
|
350
|
+
/**
|
|
351
|
+
* Assigns a rate sheet to a task group. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
352
|
+
*
|
|
353
|
+
* @param {string} rateSheetId
|
|
354
|
+
* @param {string} taskGroupId
|
|
355
|
+
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
356
|
+
*
|
|
357
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
358
|
+
*
|
|
359
|
+
* @example
|
|
360
|
+
* await client.taskGroups.assignRateSheetV1("rate_sheet_id", "task_group_id")
|
|
361
|
+
*/
|
|
362
|
+
assignRateSheetV1(rateSheetId, taskGroupId, requestOptions) {
|
|
363
|
+
return core.HttpResponsePromise.fromPromise(this.__assignRateSheetV1(rateSheetId, taskGroupId, requestOptions));
|
|
364
|
+
}
|
|
365
|
+
__assignRateSheetV1(rateSheetId, taskGroupId, requestOptions) {
|
|
366
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
367
|
+
var _a, _b, _c, _d;
|
|
368
|
+
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);
|
|
369
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
370
|
+
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/assign_rate_sheet/v1/${encodeURIComponent(rateSheetId)}/${encodeURIComponent(taskGroupId)}`),
|
|
371
|
+
method: "PATCH",
|
|
372
|
+
headers: _headers,
|
|
373
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
374
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
375
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
376
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
377
|
+
});
|
|
378
|
+
if (_response.ok) {
|
|
379
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
380
|
+
}
|
|
381
|
+
if (_response.error.reason === "status-code") {
|
|
382
|
+
switch (_response.error.statusCode) {
|
|
383
|
+
case 422:
|
|
384
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
385
|
+
default:
|
|
386
|
+
throw new errors.ChrtError({
|
|
387
|
+
statusCode: _response.error.statusCode,
|
|
388
|
+
body: _response.error.body,
|
|
389
|
+
rawResponse: _response.rawResponse,
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
switch (_response.error.reason) {
|
|
394
|
+
case "non-json":
|
|
395
|
+
throw new errors.ChrtError({
|
|
396
|
+
statusCode: _response.error.statusCode,
|
|
397
|
+
body: _response.error.rawBody,
|
|
398
|
+
rawResponse: _response.rawResponse,
|
|
399
|
+
});
|
|
400
|
+
case "timeout":
|
|
401
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/task_groups/assign_rate_sheet/v1/{rate_sheet_id}/{task_group_id}.");
|
|
402
|
+
case "unknown":
|
|
403
|
+
throw new errors.ChrtError({
|
|
404
|
+
message: _response.error.errorMessage,
|
|
405
|
+
rawResponse: _response.rawResponse,
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
}
|
|
350
410
|
/**
|
|
351
411
|
* Sets the flight number and/or fa_flight_ids on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
|
|
352
412
|
*
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.mjs";
|
|
5
|
+
export interface OrgPrivateData1 {
|
|
6
|
+
schema_version: number;
|
|
7
|
+
org_type: Chrt.OrgTypeEnum;
|
|
8
|
+
/** Must be a string starting with `org_` */
|
|
9
|
+
org_id: string;
|
|
10
|
+
stripe_connect_account_id?: string | null;
|
|
11
|
+
default_rate_sheet__routed__shipper_pay_courier?: string | null;
|
|
12
|
+
default_rate_sheet__on_demand__shipper_pay_courier?: string | null;
|
|
13
|
+
default_rate_sheet__routed__courier_pay_driver?: string | null;
|
|
14
|
+
default_rate_sheet__on_demand__courier_pay_driver?: string | null;
|
|
15
|
+
default_rate_sheet__routed__shipper_pay_forwarder?: string | null;
|
|
16
|
+
default_rate_sheet__on_demand__shipper_pay_forwarder?: string | null;
|
|
17
|
+
default_rate_sheet__routed__forwarder_pay_courier?: string | null;
|
|
18
|
+
default_rate_sheet__on_demand__forwarder_pay_courier?: string | null;
|
|
19
|
+
_id: string;
|
|
20
|
+
}
|
|
@@ -67,6 +67,7 @@ export * from "./OrdersExpandedListRes.mjs";
|
|
|
67
67
|
export * from "./OrdersNewDraftRes.mjs";
|
|
68
68
|
export * from "./OrgMemberDetails.mjs";
|
|
69
69
|
export * from "./OrgMembersAndDrivers.mjs";
|
|
70
|
+
export * from "./OrgPrivateData1.mjs";
|
|
70
71
|
export * from "./OrgProfileRes1.mjs";
|
|
71
72
|
export * from "./OrgPublicData1.mjs";
|
|
72
73
|
export * from "./OrgRoleEnum.mjs";
|
|
@@ -67,6 +67,7 @@ export * from "./OrdersExpandedListRes.mjs";
|
|
|
67
67
|
export * from "./OrdersNewDraftRes.mjs";
|
|
68
68
|
export * from "./OrgMemberDetails.mjs";
|
|
69
69
|
export * from "./OrgMembersAndDrivers.mjs";
|
|
70
|
+
export * from "./OrgPrivateData1.mjs";
|
|
70
71
|
export * from "./OrgProfileRes1.mjs";
|
|
71
72
|
export * from "./OrgPublicData1.mjs";
|
|
72
73
|
export * from "./OrgRoleEnum.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.353.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.353.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -3467,6 +3467,77 @@ await client.taskGroups.updateCourierOrgV1("task_group_id", {
|
|
|
3467
3467
|
</dl>
|
|
3468
3468
|
</details>
|
|
3469
3469
|
|
|
3470
|
+
<details><summary><code>client.taskGroups.<a href="/src/api/resources/taskGroups/client/Client.ts">assignRateSheetV1</a>(rateSheetId, taskGroupId) -> boolean</code></summary>
|
|
3471
|
+
<dl>
|
|
3472
|
+
<dd>
|
|
3473
|
+
|
|
3474
|
+
#### 📝 Description
|
|
3475
|
+
|
|
3476
|
+
<dl>
|
|
3477
|
+
<dd>
|
|
3478
|
+
|
|
3479
|
+
<dl>
|
|
3480
|
+
<dd>
|
|
3481
|
+
|
|
3482
|
+
Assigns a rate sheet to a task group. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
3483
|
+
|
|
3484
|
+
</dd>
|
|
3485
|
+
</dl>
|
|
3486
|
+
</dd>
|
|
3487
|
+
</dl>
|
|
3488
|
+
|
|
3489
|
+
#### 🔌 Usage
|
|
3490
|
+
|
|
3491
|
+
<dl>
|
|
3492
|
+
<dd>
|
|
3493
|
+
|
|
3494
|
+
<dl>
|
|
3495
|
+
<dd>
|
|
3496
|
+
|
|
3497
|
+
```typescript
|
|
3498
|
+
await client.taskGroups.assignRateSheetV1("rate_sheet_id", "task_group_id");
|
|
3499
|
+
```
|
|
3500
|
+
|
|
3501
|
+
</dd>
|
|
3502
|
+
</dl>
|
|
3503
|
+
</dd>
|
|
3504
|
+
</dl>
|
|
3505
|
+
|
|
3506
|
+
#### ⚙️ Parameters
|
|
3507
|
+
|
|
3508
|
+
<dl>
|
|
3509
|
+
<dd>
|
|
3510
|
+
|
|
3511
|
+
<dl>
|
|
3512
|
+
<dd>
|
|
3513
|
+
|
|
3514
|
+
**rateSheetId:** `string`
|
|
3515
|
+
|
|
3516
|
+
</dd>
|
|
3517
|
+
</dl>
|
|
3518
|
+
|
|
3519
|
+
<dl>
|
|
3520
|
+
<dd>
|
|
3521
|
+
|
|
3522
|
+
**taskGroupId:** `string`
|
|
3523
|
+
|
|
3524
|
+
</dd>
|
|
3525
|
+
</dl>
|
|
3526
|
+
|
|
3527
|
+
<dl>
|
|
3528
|
+
<dd>
|
|
3529
|
+
|
|
3530
|
+
**requestOptions:** `TaskGroups.RequestOptions`
|
|
3531
|
+
|
|
3532
|
+
</dd>
|
|
3533
|
+
</dl>
|
|
3534
|
+
</dd>
|
|
3535
|
+
</dl>
|
|
3536
|
+
|
|
3537
|
+
</dd>
|
|
3538
|
+
</dl>
|
|
3539
|
+
</details>
|
|
3540
|
+
|
|
3470
3541
|
<details><summary><code>client.taskGroups.<a href="/src/api/resources/taskGroups/client/Client.ts">setFlightInfoV1</a>(taskGroupId, { ...params }) -> boolean</code></summary>
|
|
3471
3542
|
<dl>
|
|
3472
3543
|
<dd>
|
|
@@ -4690,6 +4761,61 @@ await client.orgs.listMembersV1();
|
|
|
4690
4761
|
</dl>
|
|
4691
4762
|
</details>
|
|
4692
4763
|
|
|
4764
|
+
<details><summary><code>client.orgs.<a href="/src/api/resources/orgs/client/Client.ts">getOrgPrivateDataV1</a>() -> Chrt.OrgPrivateData1</code></summary>
|
|
4765
|
+
<dl>
|
|
4766
|
+
<dd>
|
|
4767
|
+
|
|
4768
|
+
#### 📝 Description
|
|
4769
|
+
|
|
4770
|
+
<dl>
|
|
4771
|
+
<dd>
|
|
4772
|
+
|
|
4773
|
+
<dl>
|
|
4774
|
+
<dd>
|
|
4775
|
+
|
|
4776
|
+
Retrieves private organization data for the caller's organization. | authz: min_org_role=operator | () -> (OrgPrivateData1)
|
|
4777
|
+
|
|
4778
|
+
</dd>
|
|
4779
|
+
</dl>
|
|
4780
|
+
</dd>
|
|
4781
|
+
</dl>
|
|
4782
|
+
|
|
4783
|
+
#### 🔌 Usage
|
|
4784
|
+
|
|
4785
|
+
<dl>
|
|
4786
|
+
<dd>
|
|
4787
|
+
|
|
4788
|
+
<dl>
|
|
4789
|
+
<dd>
|
|
4790
|
+
|
|
4791
|
+
```typescript
|
|
4792
|
+
await client.orgs.getOrgPrivateDataV1();
|
|
4793
|
+
```
|
|
4794
|
+
|
|
4795
|
+
</dd>
|
|
4796
|
+
</dl>
|
|
4797
|
+
</dd>
|
|
4798
|
+
</dl>
|
|
4799
|
+
|
|
4800
|
+
#### ⚙️ Parameters
|
|
4801
|
+
|
|
4802
|
+
<dl>
|
|
4803
|
+
<dd>
|
|
4804
|
+
|
|
4805
|
+
<dl>
|
|
4806
|
+
<dd>
|
|
4807
|
+
|
|
4808
|
+
**requestOptions:** `Orgs.RequestOptions`
|
|
4809
|
+
|
|
4810
|
+
</dd>
|
|
4811
|
+
</dl>
|
|
4812
|
+
</dd>
|
|
4813
|
+
</dl>
|
|
4814
|
+
|
|
4815
|
+
</dd>
|
|
4816
|
+
</dl>
|
|
4817
|
+
</details>
|
|
4818
|
+
|
|
4693
4819
|
<details><summary><code>client.orgs.<a href="/src/api/resources/orgs/client/Client.ts">getOrgPublicDataV1</a>() -> Chrt.OrgPublicData1</code></summary>
|
|
4694
4820
|
<dl>
|
|
4695
4821
|
<dd>
|