@chrt-inc/typescript-sdk 1.353.0 → 1.355.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/billing/resources/lineItemGroups/client/Client.d.ts +17 -0
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.js +69 -0
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/LineItemGroupsQuoteV1Request.d.ts +17 -0
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/LineItemGroupsQuoteV1Request.js +5 -0
- package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/taskGroups/client/Client.js +1 -1
- package/dist/cjs/api/types/Quote.d.ts +12 -0
- package/dist/cjs/api/types/Quote.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/billing/resources/lineItemGroups/client/Client.d.mts +17 -0
- package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.mjs +69 -0
- package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/LineItemGroupsQuoteV1Request.d.mts +17 -0
- package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/LineItemGroupsQuoteV1Request.mjs +4 -0
- package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/taskGroups/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/taskGroups/client/Client.mjs +1 -1
- package/dist/esm/api/types/Quote.d.mts +12 -0
- package/dist/esm/api/types/Quote.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 +75 -1
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.355.0",
|
|
71
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.355.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) });
|
|
@@ -71,6 +71,23 @@ export declare class LineItemGroups {
|
|
|
71
71
|
*/
|
|
72
72
|
listForCourierOrgV1(request?: Chrt.billing.LineItemGroupsListForCourierOrgV1Request, requestOptions?: LineItemGroups.RequestOptions): core.HttpResponsePromise<Chrt.LineItemGroupListRes>;
|
|
73
73
|
private __listForCourierOrgV1;
|
|
74
|
+
/**
|
|
75
|
+
* Calculates a quote (line item group preview) for a task group and payment vector without persisting any data. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators, shipper_org_operators] | () -> (Quote)
|
|
76
|
+
*
|
|
77
|
+
* @param {string} taskGroupId
|
|
78
|
+
* @param {Chrt.billing.LineItemGroupsQuoteV1Request} request
|
|
79
|
+
* @param {LineItemGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
80
|
+
*
|
|
81
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* await client.billing.lineItemGroups.quoteV1("task_group_id", {
|
|
85
|
+
* payment_vector_type: "shipper_pay_forwarder",
|
|
86
|
+
* rate_sheet_id: "rate_sheet_id"
|
|
87
|
+
* })
|
|
88
|
+
*/
|
|
89
|
+
quoteV1(taskGroupId: string, request: Chrt.billing.LineItemGroupsQuoteV1Request, requestOptions?: LineItemGroups.RequestOptions): core.HttpResponsePromise<Chrt.Quote>;
|
|
90
|
+
private __quoteV1;
|
|
74
91
|
/**
|
|
75
92
|
* Finalizes a line item group. LIG must be in ADJUSTABLE status. | org_type=[courier, forwarder], min_org_role=operator, authz_personas=[lig_owner_operators] | () -> (LineItemGroup1)
|
|
76
93
|
*
|
|
@@ -219,6 +219,75 @@ class LineItemGroups {
|
|
|
219
219
|
}
|
|
220
220
|
});
|
|
221
221
|
}
|
|
222
|
+
/**
|
|
223
|
+
* Calculates a quote (line item group preview) for a task group and payment vector without persisting any data. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators, shipper_org_operators] | () -> (Quote)
|
|
224
|
+
*
|
|
225
|
+
* @param {string} taskGroupId
|
|
226
|
+
* @param {Chrt.billing.LineItemGroupsQuoteV1Request} request
|
|
227
|
+
* @param {LineItemGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
228
|
+
*
|
|
229
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
230
|
+
*
|
|
231
|
+
* @example
|
|
232
|
+
* await client.billing.lineItemGroups.quoteV1("task_group_id", {
|
|
233
|
+
* payment_vector_type: "shipper_pay_forwarder",
|
|
234
|
+
* rate_sheet_id: "rate_sheet_id"
|
|
235
|
+
* })
|
|
236
|
+
*/
|
|
237
|
+
quoteV1(taskGroupId, request, requestOptions) {
|
|
238
|
+
return core.HttpResponsePromise.fromPromise(this.__quoteV1(taskGroupId, request, requestOptions));
|
|
239
|
+
}
|
|
240
|
+
__quoteV1(taskGroupId, request, requestOptions) {
|
|
241
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
242
|
+
var _a, _b, _c, _d;
|
|
243
|
+
const { payment_vector_type: paymentVectorType, rate_sheet_id: rateSheetId } = request;
|
|
244
|
+
const _queryParams = {};
|
|
245
|
+
_queryParams["payment_vector_type"] = paymentVectorType;
|
|
246
|
+
if (rateSheetId !== undefined) {
|
|
247
|
+
_queryParams["rate_sheet_id"] = rateSheetId;
|
|
248
|
+
}
|
|
249
|
+
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);
|
|
250
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
251
|
+
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, `billing/line_item_groups/quote/v1/${encodeURIComponent(taskGroupId)}`),
|
|
252
|
+
method: "GET",
|
|
253
|
+
headers: _headers,
|
|
254
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
255
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
256
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
257
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
258
|
+
});
|
|
259
|
+
if (_response.ok) {
|
|
260
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
261
|
+
}
|
|
262
|
+
if (_response.error.reason === "status-code") {
|
|
263
|
+
switch (_response.error.statusCode) {
|
|
264
|
+
case 422:
|
|
265
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
266
|
+
default:
|
|
267
|
+
throw new errors.ChrtError({
|
|
268
|
+
statusCode: _response.error.statusCode,
|
|
269
|
+
body: _response.error.body,
|
|
270
|
+
rawResponse: _response.rawResponse,
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
switch (_response.error.reason) {
|
|
275
|
+
case "non-json":
|
|
276
|
+
throw new errors.ChrtError({
|
|
277
|
+
statusCode: _response.error.statusCode,
|
|
278
|
+
body: _response.error.rawBody,
|
|
279
|
+
rawResponse: _response.rawResponse,
|
|
280
|
+
});
|
|
281
|
+
case "timeout":
|
|
282
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing/line_item_groups/quote/v1/{task_group_id}.");
|
|
283
|
+
case "unknown":
|
|
284
|
+
throw new errors.ChrtError({
|
|
285
|
+
message: _response.error.errorMessage,
|
|
286
|
+
rawResponse: _response.rawResponse,
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
}
|
|
222
291
|
/**
|
|
223
292
|
* Finalizes a line item group. LIG must be in ADJUSTABLE status. | org_type=[courier, forwarder], min_org_role=operator, authz_personas=[lig_owner_operators] | () -> (LineItemGroup1)
|
|
224
293
|
*
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* payment_vector_type: "shipper_pay_forwarder",
|
|
9
|
+
* rate_sheet_id: "rate_sheet_id"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface LineItemGroupsQuoteV1Request {
|
|
13
|
+
/** The payment vector type to calculate a quote for. */
|
|
14
|
+
payment_vector_type: Chrt.PaymentVectorTypeEnum1;
|
|
15
|
+
/** Optional rate sheet ID to use. Must match the payment_vector_type. If not provided, rate sheet is resolved using standard priority. */
|
|
16
|
+
rate_sheet_id?: string | null;
|
|
17
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { type LineItemGroupsListForCourierOrgV1Request } from "./LineItemGroupsListForCourierOrgV1Request.js";
|
|
2
|
+
export { type LineItemGroupsQuoteV1Request } from "./LineItemGroupsQuoteV1Request.js";
|
|
2
3
|
export { type LineItemGroupsAssociateWithStatementV1Request } from "./LineItemGroupsAssociateWithStatementV1Request.js";
|
|
3
4
|
export { type AdjustLineItemReq } from "./AdjustLineItemReq.js";
|
|
@@ -114,7 +114,7 @@ export declare class TaskGroups {
|
|
|
114
114
|
updateCourierOrgV1(taskGroupId: string, request: Chrt.UpdateCourierOrgReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
115
115
|
private __updateCourierOrgV1;
|
|
116
116
|
/**
|
|
117
|
-
* Assigns a rate sheet to a task group. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
117
|
+
* Assigns a rate sheet to a task group. Can also hot-swap an existing rate sheet for a new one. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
118
118
|
*
|
|
119
119
|
* @param {string} rateSheetId
|
|
120
120
|
* @param {string} taskGroupId
|
|
@@ -384,7 +384,7 @@ class TaskGroups {
|
|
|
384
384
|
});
|
|
385
385
|
}
|
|
386
386
|
/**
|
|
387
|
-
* Assigns a rate sheet to a task group. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
387
|
+
* Assigns a rate sheet to a task group. Can also hot-swap an existing rate sheet for a new one. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
388
388
|
*
|
|
389
389
|
* @param {string} rateSheetId
|
|
390
390
|
* @param {string} taskGroupId
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Quote for a single payment vector.
|
|
7
|
+
*/
|
|
8
|
+
export interface Quote {
|
|
9
|
+
task_group_id: string;
|
|
10
|
+
rate_sheet_id: string;
|
|
11
|
+
line_items: Chrt.LineItem1[];
|
|
12
|
+
}
|
|
@@ -80,6 +80,7 @@ export * from "./Polygon.js";
|
|
|
80
80
|
export * from "./Position2D.js";
|
|
81
81
|
export * from "./Position3D.js";
|
|
82
82
|
export * from "./PriceNameEnum.js";
|
|
83
|
+
export * from "./Quote.js";
|
|
83
84
|
export * from "./RateSheet1.js";
|
|
84
85
|
export * from "./RateSheetListResponse.js";
|
|
85
86
|
export * from "./RateSheetSortByEnum.js";
|
|
@@ -96,6 +96,7 @@ __exportStar(require("./Polygon.js"), exports);
|
|
|
96
96
|
__exportStar(require("./Position2D.js"), exports);
|
|
97
97
|
__exportStar(require("./Position3D.js"), exports);
|
|
98
98
|
__exportStar(require("./PriceNameEnum.js"), exports);
|
|
99
|
+
__exportStar(require("./Quote.js"), exports);
|
|
99
100
|
__exportStar(require("./RateSheet1.js"), exports);
|
|
100
101
|
__exportStar(require("./RateSheetListResponse.js"), exports);
|
|
101
102
|
__exportStar(require("./RateSheetSortByEnum.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.355.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.355.0",
|
|
35
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.355.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) });
|
|
@@ -71,6 +71,23 @@ export declare class LineItemGroups {
|
|
|
71
71
|
*/
|
|
72
72
|
listForCourierOrgV1(request?: Chrt.billing.LineItemGroupsListForCourierOrgV1Request, requestOptions?: LineItemGroups.RequestOptions): core.HttpResponsePromise<Chrt.LineItemGroupListRes>;
|
|
73
73
|
private __listForCourierOrgV1;
|
|
74
|
+
/**
|
|
75
|
+
* Calculates a quote (line item group preview) for a task group and payment vector without persisting any data. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators, shipper_org_operators] | () -> (Quote)
|
|
76
|
+
*
|
|
77
|
+
* @param {string} taskGroupId
|
|
78
|
+
* @param {Chrt.billing.LineItemGroupsQuoteV1Request} request
|
|
79
|
+
* @param {LineItemGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
80
|
+
*
|
|
81
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* await client.billing.lineItemGroups.quoteV1("task_group_id", {
|
|
85
|
+
* payment_vector_type: "shipper_pay_forwarder",
|
|
86
|
+
* rate_sheet_id: "rate_sheet_id"
|
|
87
|
+
* })
|
|
88
|
+
*/
|
|
89
|
+
quoteV1(taskGroupId: string, request: Chrt.billing.LineItemGroupsQuoteV1Request, requestOptions?: LineItemGroups.RequestOptions): core.HttpResponsePromise<Chrt.Quote>;
|
|
90
|
+
private __quoteV1;
|
|
74
91
|
/**
|
|
75
92
|
* Finalizes a line item group. LIG must be in ADJUSTABLE status. | org_type=[courier, forwarder], min_org_role=operator, authz_personas=[lig_owner_operators] | () -> (LineItemGroup1)
|
|
76
93
|
*
|
|
@@ -183,6 +183,75 @@ export class LineItemGroups {
|
|
|
183
183
|
}
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Calculates a quote (line item group preview) for a task group and payment vector without persisting any data. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators, shipper_org_operators] | () -> (Quote)
|
|
188
|
+
*
|
|
189
|
+
* @param {string} taskGroupId
|
|
190
|
+
* @param {Chrt.billing.LineItemGroupsQuoteV1Request} request
|
|
191
|
+
* @param {LineItemGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
192
|
+
*
|
|
193
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* await client.billing.lineItemGroups.quoteV1("task_group_id", {
|
|
197
|
+
* payment_vector_type: "shipper_pay_forwarder",
|
|
198
|
+
* rate_sheet_id: "rate_sheet_id"
|
|
199
|
+
* })
|
|
200
|
+
*/
|
|
201
|
+
quoteV1(taskGroupId, request, requestOptions) {
|
|
202
|
+
return core.HttpResponsePromise.fromPromise(this.__quoteV1(taskGroupId, request, requestOptions));
|
|
203
|
+
}
|
|
204
|
+
__quoteV1(taskGroupId, request, requestOptions) {
|
|
205
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
var _a, _b, _c, _d;
|
|
207
|
+
const { payment_vector_type: paymentVectorType, rate_sheet_id: rateSheetId } = request;
|
|
208
|
+
const _queryParams = {};
|
|
209
|
+
_queryParams["payment_vector_type"] = paymentVectorType;
|
|
210
|
+
if (rateSheetId !== undefined) {
|
|
211
|
+
_queryParams["rate_sheet_id"] = rateSheetId;
|
|
212
|
+
}
|
|
213
|
+
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);
|
|
214
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
215
|
+
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, `billing/line_item_groups/quote/v1/${encodeURIComponent(taskGroupId)}`),
|
|
216
|
+
method: "GET",
|
|
217
|
+
headers: _headers,
|
|
218
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
219
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
220
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
221
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
222
|
+
});
|
|
223
|
+
if (_response.ok) {
|
|
224
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
225
|
+
}
|
|
226
|
+
if (_response.error.reason === "status-code") {
|
|
227
|
+
switch (_response.error.statusCode) {
|
|
228
|
+
case 422:
|
|
229
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
230
|
+
default:
|
|
231
|
+
throw new errors.ChrtError({
|
|
232
|
+
statusCode: _response.error.statusCode,
|
|
233
|
+
body: _response.error.body,
|
|
234
|
+
rawResponse: _response.rawResponse,
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
switch (_response.error.reason) {
|
|
239
|
+
case "non-json":
|
|
240
|
+
throw new errors.ChrtError({
|
|
241
|
+
statusCode: _response.error.statusCode,
|
|
242
|
+
body: _response.error.rawBody,
|
|
243
|
+
rawResponse: _response.rawResponse,
|
|
244
|
+
});
|
|
245
|
+
case "timeout":
|
|
246
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing/line_item_groups/quote/v1/{task_group_id}.");
|
|
247
|
+
case "unknown":
|
|
248
|
+
throw new errors.ChrtError({
|
|
249
|
+
message: _response.error.errorMessage,
|
|
250
|
+
rawResponse: _response.rawResponse,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
}
|
|
186
255
|
/**
|
|
187
256
|
* Finalizes a line item group. LIG must be in ADJUSTABLE status. | org_type=[courier, forwarder], min_org_role=operator, authz_personas=[lig_owner_operators] | () -> (LineItemGroup1)
|
|
188
257
|
*
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
* payment_vector_type: "shipper_pay_forwarder",
|
|
9
|
+
* rate_sheet_id: "rate_sheet_id"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface LineItemGroupsQuoteV1Request {
|
|
13
|
+
/** The payment vector type to calculate a quote for. */
|
|
14
|
+
payment_vector_type: Chrt.PaymentVectorTypeEnum1;
|
|
15
|
+
/** Optional rate sheet ID to use. Must match the payment_vector_type. If not provided, rate sheet is resolved using standard priority. */
|
|
16
|
+
rate_sheet_id?: string | null;
|
|
17
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { type LineItemGroupsListForCourierOrgV1Request } from "./LineItemGroupsListForCourierOrgV1Request.mjs";
|
|
2
|
+
export { type LineItemGroupsQuoteV1Request } from "./LineItemGroupsQuoteV1Request.mjs";
|
|
2
3
|
export { type LineItemGroupsAssociateWithStatementV1Request } from "./LineItemGroupsAssociateWithStatementV1Request.mjs";
|
|
3
4
|
export { type AdjustLineItemReq } from "./AdjustLineItemReq.mjs";
|
|
@@ -114,7 +114,7 @@ export declare class TaskGroups {
|
|
|
114
114
|
updateCourierOrgV1(taskGroupId: string, request: Chrt.UpdateCourierOrgReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
115
115
|
private __updateCourierOrgV1;
|
|
116
116
|
/**
|
|
117
|
-
* Assigns a rate sheet to a task group. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
117
|
+
* Assigns a rate sheet to a task group. Can also hot-swap an existing rate sheet for a new one. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
118
118
|
*
|
|
119
119
|
* @param {string} rateSheetId
|
|
120
120
|
* @param {string} taskGroupId
|
|
@@ -348,7 +348,7 @@ export class TaskGroups {
|
|
|
348
348
|
});
|
|
349
349
|
}
|
|
350
350
|
/**
|
|
351
|
-
* Assigns a rate sheet to a task group. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
351
|
+
* Assigns a rate sheet to a task group. Can also hot-swap an existing rate sheet for a new one. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
352
352
|
*
|
|
353
353
|
* @param {string} rateSheetId
|
|
354
354
|
* @param {string} taskGroupId
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Quote for a single payment vector.
|
|
7
|
+
*/
|
|
8
|
+
export interface Quote {
|
|
9
|
+
task_group_id: string;
|
|
10
|
+
rate_sheet_id: string;
|
|
11
|
+
line_items: Chrt.LineItem1[];
|
|
12
|
+
}
|
|
@@ -80,6 +80,7 @@ export * from "./Polygon.mjs";
|
|
|
80
80
|
export * from "./Position2D.mjs";
|
|
81
81
|
export * from "./Position3D.mjs";
|
|
82
82
|
export * from "./PriceNameEnum.mjs";
|
|
83
|
+
export * from "./Quote.mjs";
|
|
83
84
|
export * from "./RateSheet1.mjs";
|
|
84
85
|
export * from "./RateSheetListResponse.mjs";
|
|
85
86
|
export * from "./RateSheetSortByEnum.mjs";
|
|
@@ -80,6 +80,7 @@ export * from "./Polygon.mjs";
|
|
|
80
80
|
export * from "./Position2D.mjs";
|
|
81
81
|
export * from "./Position3D.mjs";
|
|
82
82
|
export * from "./PriceNameEnum.mjs";
|
|
83
|
+
export * from "./Quote.mjs";
|
|
83
84
|
export * from "./RateSheet1.mjs";
|
|
84
85
|
export * from "./RateSheetListResponse.mjs";
|
|
85
86
|
export * from "./RateSheetSortByEnum.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.355.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.355.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -3479,7 +3479,7 @@ await client.taskGroups.updateCourierOrgV1("task_group_id", {
|
|
|
3479
3479
|
<dl>
|
|
3480
3480
|
<dd>
|
|
3481
3481
|
|
|
3482
|
-
Assigns a rate sheet to a task group. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
3482
|
+
Assigns a rate sheet to a task group. Can also hot-swap an existing rate sheet for a new one. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
3483
3483
|
|
|
3484
3484
|
</dd>
|
|
3485
3485
|
</dl>
|
|
@@ -5779,6 +5779,80 @@ await client.billing.lineItemGroups.listForCourierOrgV1({
|
|
|
5779
5779
|
</dl>
|
|
5780
5780
|
</details>
|
|
5781
5781
|
|
|
5782
|
+
<details><summary><code>client.billing.lineItemGroups.<a href="/src/api/resources/billing/resources/lineItemGroups/client/Client.ts">quoteV1</a>(taskGroupId, { ...params }) -> Chrt.Quote</code></summary>
|
|
5783
|
+
<dl>
|
|
5784
|
+
<dd>
|
|
5785
|
+
|
|
5786
|
+
#### 📝 Description
|
|
5787
|
+
|
|
5788
|
+
<dl>
|
|
5789
|
+
<dd>
|
|
5790
|
+
|
|
5791
|
+
<dl>
|
|
5792
|
+
<dd>
|
|
5793
|
+
|
|
5794
|
+
Calculates a quote (line item group preview) for a task group and payment vector without persisting any data. | authz_personas=[courier_driver, courier_org_operators, forwarder_org_operators, shipper_org_operators] | () -> (Quote)
|
|
5795
|
+
|
|
5796
|
+
</dd>
|
|
5797
|
+
</dl>
|
|
5798
|
+
</dd>
|
|
5799
|
+
</dl>
|
|
5800
|
+
|
|
5801
|
+
#### 🔌 Usage
|
|
5802
|
+
|
|
5803
|
+
<dl>
|
|
5804
|
+
<dd>
|
|
5805
|
+
|
|
5806
|
+
<dl>
|
|
5807
|
+
<dd>
|
|
5808
|
+
|
|
5809
|
+
```typescript
|
|
5810
|
+
await client.billing.lineItemGroups.quoteV1("task_group_id", {
|
|
5811
|
+
payment_vector_type: "shipper_pay_forwarder",
|
|
5812
|
+
rate_sheet_id: "rate_sheet_id",
|
|
5813
|
+
});
|
|
5814
|
+
```
|
|
5815
|
+
|
|
5816
|
+
</dd>
|
|
5817
|
+
</dl>
|
|
5818
|
+
</dd>
|
|
5819
|
+
</dl>
|
|
5820
|
+
|
|
5821
|
+
#### ⚙️ Parameters
|
|
5822
|
+
|
|
5823
|
+
<dl>
|
|
5824
|
+
<dd>
|
|
5825
|
+
|
|
5826
|
+
<dl>
|
|
5827
|
+
<dd>
|
|
5828
|
+
|
|
5829
|
+
**taskGroupId:** `string`
|
|
5830
|
+
|
|
5831
|
+
</dd>
|
|
5832
|
+
</dl>
|
|
5833
|
+
|
|
5834
|
+
<dl>
|
|
5835
|
+
<dd>
|
|
5836
|
+
|
|
5837
|
+
**request:** `Chrt.billing.LineItemGroupsQuoteV1Request`
|
|
5838
|
+
|
|
5839
|
+
</dd>
|
|
5840
|
+
</dl>
|
|
5841
|
+
|
|
5842
|
+
<dl>
|
|
5843
|
+
<dd>
|
|
5844
|
+
|
|
5845
|
+
**requestOptions:** `LineItemGroups.RequestOptions`
|
|
5846
|
+
|
|
5847
|
+
</dd>
|
|
5848
|
+
</dl>
|
|
5849
|
+
</dd>
|
|
5850
|
+
</dl>
|
|
5851
|
+
|
|
5852
|
+
</dd>
|
|
5853
|
+
</dl>
|
|
5854
|
+
</details>
|
|
5855
|
+
|
|
5782
5856
|
<details><summary><code>client.billing.lineItemGroups.<a href="/src/api/resources/billing/resources/lineItemGroups/client/Client.ts">finalizeV1</a>(lineItemGroupId) -> Chrt.LineItemGroup1</code></summary>
|
|
5783
5857
|
<dl>
|
|
5784
5858
|
<dd>
|