@chrt-inc/typescript-sdk 1.585.0 → 1.595.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/shipping/resources/orderDrafts/resources/expanded/client/Client.d.ts +18 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/client/Client.js +74 -2
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/client/requests/ExpandedListV1Request.d.ts +3 -0
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/client/requests/ExpandedTypeaheadV1Request.d.ts +16 -0
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/client/requests/ExpandedTypeaheadV1Request.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.js +1 -1
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedTypeaheadV1Request.d.ts +1 -1
- package/dist/cjs/api/resources/tracking/resources/sharingSettings/client/Client.d.ts +0 -2
- package/dist/cjs/api/resources/tracking/resources/sharingSettings/client/Client.js +0 -2
- package/dist/cjs/api/resources/tracking/resources/sharingSettings/client/requests/CargoByDriverSharingSettingsUpdateReq.d.ts +0 -2
- package/dist/cjs/api/resources/tracking/resources/sharingSettings/client/requests/TaskGroupByDriverSharingSettingsUpdateReq.d.ts +0 -2
- package/dist/cjs/api/types/CargoByDriverSharingSettings1.d.ts +1 -1
- package/dist/cjs/api/types/OrderTypeaheadFieldEnum.d.ts +8 -0
- package/dist/cjs/api/types/OrderTypeaheadFieldEnum.js +10 -0
- package/dist/cjs/api/types/OrderTypeaheadResult.d.ts +8 -0
- package/dist/cjs/api/types/OrderTypeaheadResult.js +5 -0
- package/dist/cjs/api/types/TaskGroupByDriverSharingSettings1.d.ts +1 -1
- package/dist/cjs/api/types/index.d.ts +2 -0
- package/dist/cjs/api/types/index.js +2 -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/shipping/resources/orderDrafts/resources/expanded/client/Client.d.mts +18 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/client/Client.mjs +74 -2
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/client/requests/ExpandedListV1Request.d.mts +3 -0
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/client/requests/ExpandedTypeaheadV1Request.d.mts +16 -0
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/client/requests/ExpandedTypeaheadV1Request.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedTypeaheadV1Request.d.mts +1 -1
- package/dist/esm/api/resources/tracking/resources/sharingSettings/client/Client.d.mts +0 -2
- package/dist/esm/api/resources/tracking/resources/sharingSettings/client/Client.mjs +0 -2
- package/dist/esm/api/resources/tracking/resources/sharingSettings/client/requests/CargoByDriverSharingSettingsUpdateReq.d.mts +0 -2
- package/dist/esm/api/resources/tracking/resources/sharingSettings/client/requests/TaskGroupByDriverSharingSettingsUpdateReq.d.mts +0 -2
- package/dist/esm/api/types/CargoByDriverSharingSettings1.d.mts +1 -1
- package/dist/esm/api/types/OrderTypeaheadFieldEnum.d.mts +8 -0
- package/dist/esm/api/types/OrderTypeaheadFieldEnum.mjs +7 -0
- package/dist/esm/api/types/OrderTypeaheadResult.d.mts +8 -0
- package/dist/esm/api/types/OrderTypeaheadResult.mjs +4 -0
- package/dist/esm/api/types/TaskGroupByDriverSharingSettings1.d.mts +1 -1
- package/dist/esm/api/types/index.d.mts +2 -0
- package/dist/esm/api/types/index.mjs +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +70 -5
package/dist/cjs/Client.js
CHANGED
|
@@ -53,8 +53,8 @@ class ChrtClient {
|
|
|
53
53
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
54
54
|
"X-Fern-Language": "JavaScript",
|
|
55
55
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
56
|
-
"X-Fern-SDK-Version": "1.
|
|
57
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
56
|
+
"X-Fern-SDK-Version": "1.595.0",
|
|
57
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.595.0",
|
|
58
58
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
59
59
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
60
60
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/client/Client.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export declare class Expanded {
|
|
|
45
45
|
retrieveV1(orderRef: string, request: Chrt.OrderAndTaskGroupExpandedReq, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.OrderDraftExpanded>;
|
|
46
46
|
private __retrieveV1;
|
|
47
47
|
/**
|
|
48
|
-
* Lists expanded draft orders for the organization with filtering, sorting, and
|
|
48
|
+
* Lists expanded draft orders for the organization with filtering, sorting, pagination, and optional search. | (OrderAndTaskGroupExpandedReq) -> (OrderDraftExpandedListRes)
|
|
49
49
|
*
|
|
50
50
|
* @param {Chrt.shipping.orderDrafts.ExpandedListV1Request} request
|
|
51
51
|
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -58,6 +58,7 @@ export declare class Expanded {
|
|
|
58
58
|
* sort_order: "asc",
|
|
59
59
|
* page: 1,
|
|
60
60
|
* page_size: 1,
|
|
61
|
+
* search: "search",
|
|
61
62
|
* filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
62
63
|
* filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
63
64
|
* body: {}
|
|
@@ -65,5 +66,21 @@ export declare class Expanded {
|
|
|
65
66
|
*/
|
|
66
67
|
listV1(request: Chrt.shipping.orderDrafts.ExpandedListV1Request, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.OrderDraftExpandedListRes>;
|
|
67
68
|
private __listV1;
|
|
69
|
+
/**
|
|
70
|
+
* Returns distinct short_id and off_chrt_reference_id values matching the query via case-insensitive regex. Searches draft orders created by the caller's org. | authz: min_org_role=operator | () -> (list[OrderTypeaheadResult])
|
|
71
|
+
*
|
|
72
|
+
* @param {Chrt.shipping.orderDrafts.ExpandedTypeaheadV1Request} request
|
|
73
|
+
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* await client.shipping.orderDrafts.expanded.typeaheadV1({
|
|
79
|
+
* query: "query",
|
|
80
|
+
* limit: 1
|
|
81
|
+
* })
|
|
82
|
+
*/
|
|
83
|
+
typeaheadV1(request: Chrt.shipping.orderDrafts.ExpandedTypeaheadV1Request, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.OrderTypeaheadResult[]>;
|
|
84
|
+
private __typeaheadV1;
|
|
68
85
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
69
86
|
}
|
package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/client/Client.js
CHANGED
|
@@ -119,7 +119,7 @@ class Expanded {
|
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
|
-
* Lists expanded draft orders for the organization with filtering, sorting, and
|
|
122
|
+
* Lists expanded draft orders for the organization with filtering, sorting, pagination, and optional search. | (OrderAndTaskGroupExpandedReq) -> (OrderDraftExpandedListRes)
|
|
123
123
|
*
|
|
124
124
|
* @param {Chrt.shipping.orderDrafts.ExpandedListV1Request} request
|
|
125
125
|
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -132,6 +132,7 @@ class Expanded {
|
|
|
132
132
|
* sort_order: "asc",
|
|
133
133
|
* page: 1,
|
|
134
134
|
* page_size: 1,
|
|
135
|
+
* search: "search",
|
|
135
136
|
* filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
136
137
|
* filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
137
138
|
* body: {}
|
|
@@ -143,7 +144,7 @@ class Expanded {
|
|
|
143
144
|
__listV1(request, requestOptions) {
|
|
144
145
|
return __awaiter(this, void 0, void 0, function* () {
|
|
145
146
|
var _a, _b, _c, _d, _e, _f;
|
|
146
|
-
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, body: _body, } = request;
|
|
147
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, body: _body, } = request;
|
|
147
148
|
const _queryParams = {};
|
|
148
149
|
if (sortBy !== undefined) {
|
|
149
150
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -157,6 +158,9 @@ class Expanded {
|
|
|
157
158
|
if (pageSize !== undefined) {
|
|
158
159
|
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
159
160
|
}
|
|
161
|
+
if (search !== undefined) {
|
|
162
|
+
_queryParams["search"] = search;
|
|
163
|
+
}
|
|
160
164
|
if (filterDraftStartedAtTimestampLte !== undefined) {
|
|
161
165
|
_queryParams["filter_draft_started_at_timestamp_lte"] = filterDraftStartedAtTimestampLte;
|
|
162
166
|
}
|
|
@@ -208,6 +212,74 @@ class Expanded {
|
|
|
208
212
|
}
|
|
209
213
|
});
|
|
210
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Returns distinct short_id and off_chrt_reference_id values matching the query via case-insensitive regex. Searches draft orders created by the caller's org. | authz: min_org_role=operator | () -> (list[OrderTypeaheadResult])
|
|
217
|
+
*
|
|
218
|
+
* @param {Chrt.shipping.orderDrafts.ExpandedTypeaheadV1Request} request
|
|
219
|
+
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
220
|
+
*
|
|
221
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* await client.shipping.orderDrafts.expanded.typeaheadV1({
|
|
225
|
+
* query: "query",
|
|
226
|
+
* limit: 1
|
|
227
|
+
* })
|
|
228
|
+
*/
|
|
229
|
+
typeaheadV1(request, requestOptions) {
|
|
230
|
+
return core.HttpResponsePromise.fromPromise(this.__typeaheadV1(request, requestOptions));
|
|
231
|
+
}
|
|
232
|
+
__typeaheadV1(request, requestOptions) {
|
|
233
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
234
|
+
var _a, _b, _c, _d, _e;
|
|
235
|
+
const { query, limit } = request;
|
|
236
|
+
const _queryParams = {};
|
|
237
|
+
_queryParams["query"] = query;
|
|
238
|
+
if (limit !== undefined) {
|
|
239
|
+
_queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
|
|
240
|
+
}
|
|
241
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
242
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
243
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "shipping/order_drafts/expanded/typeahead/v1"),
|
|
244
|
+
method: "GET",
|
|
245
|
+
headers: _headers,
|
|
246
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
247
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
248
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
249
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
250
|
+
});
|
|
251
|
+
if (_response.ok) {
|
|
252
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
253
|
+
}
|
|
254
|
+
if (_response.error.reason === "status-code") {
|
|
255
|
+
switch (_response.error.statusCode) {
|
|
256
|
+
case 422:
|
|
257
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
258
|
+
default:
|
|
259
|
+
throw new errors.ChrtError({
|
|
260
|
+
statusCode: _response.error.statusCode,
|
|
261
|
+
body: _response.error.body,
|
|
262
|
+
rawResponse: _response.rawResponse,
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
switch (_response.error.reason) {
|
|
267
|
+
case "non-json":
|
|
268
|
+
throw new errors.ChrtError({
|
|
269
|
+
statusCode: _response.error.statusCode,
|
|
270
|
+
body: _response.error.rawBody,
|
|
271
|
+
rawResponse: _response.rawResponse,
|
|
272
|
+
});
|
|
273
|
+
case "timeout":
|
|
274
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/order_drafts/expanded/typeahead/v1.");
|
|
275
|
+
case "unknown":
|
|
276
|
+
throw new errors.ChrtError({
|
|
277
|
+
message: _response.error.errorMessage,
|
|
278
|
+
rawResponse: _response.rawResponse,
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
}
|
|
211
283
|
_getAuthorizationHeader() {
|
|
212
284
|
return __awaiter(this, void 0, void 0, function* () {
|
|
213
285
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -9,6 +9,7 @@ import * as Chrt from "../../../../../../../../index.js";
|
|
|
9
9
|
* sort_order: "asc",
|
|
10
10
|
* page: 1,
|
|
11
11
|
* page_size: 1,
|
|
12
|
+
* search: "search",
|
|
12
13
|
* filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
13
14
|
* filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
14
15
|
* body: {}
|
|
@@ -20,6 +21,8 @@ export interface ExpandedListV1Request {
|
|
|
20
21
|
sort_order?: Chrt.SortOrderEnum | null;
|
|
21
22
|
page?: number | null;
|
|
22
23
|
page_size?: number | null;
|
|
24
|
+
/** Full-text search query (searches order short_id and off_chrt_reference_id) */
|
|
25
|
+
search?: string | null;
|
|
23
26
|
filter_draft_started_at_timestamp_lte?: string | null;
|
|
24
27
|
filter_draft_started_at_timestamp_gte?: string | null;
|
|
25
28
|
body: Chrt.OrderAndTaskGroupExpandedReq;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* query: "query",
|
|
8
|
+
* limit: 1
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface ExpandedTypeaheadV1Request {
|
|
12
|
+
/** Typeahead search query */
|
|
13
|
+
query: string;
|
|
14
|
+
/** Max results per field */
|
|
15
|
+
limit?: number | null;
|
|
16
|
+
}
|
package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.ts
CHANGED
|
@@ -125,7 +125,7 @@ export declare class Expanded {
|
|
|
125
125
|
listForShipperOperatorsV1(request: Chrt.shipping.orders.ExpandedListForShipperOperatorsV1Request, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.OrdersExpandedListRes>;
|
|
126
126
|
private __listForShipperOperatorsV1;
|
|
127
127
|
/**
|
|
128
|
-
* Returns distinct
|
|
128
|
+
* Returns distinct short_id and off_chrt_reference_id values matching the query via case-insensitive regex. Searches non-draft orders visible to the caller's org. | authz: allowed_org_types=[forwarder, shipper], min_org_role=operator | () -> (list[OrderTypeaheadResult])
|
|
129
129
|
*
|
|
130
130
|
* @param {Chrt.shipping.orders.ExpandedTypeaheadV1Request} request
|
|
131
131
|
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -138,7 +138,7 @@ export declare class Expanded {
|
|
|
138
138
|
* limit: 1
|
|
139
139
|
* })
|
|
140
140
|
*/
|
|
141
|
-
typeaheadV1(request: Chrt.shipping.orders.ExpandedTypeaheadV1Request, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<
|
|
141
|
+
typeaheadV1(request: Chrt.shipping.orders.ExpandedTypeaheadV1Request, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.OrderTypeaheadResult[]>;
|
|
142
142
|
private __typeaheadV1;
|
|
143
143
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
144
144
|
}
|
package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.js
CHANGED
|
@@ -474,7 +474,7 @@ class Expanded {
|
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
/**
|
|
477
|
-
* Returns distinct
|
|
477
|
+
* Returns distinct short_id and off_chrt_reference_id values matching the query via case-insensitive regex. Searches non-draft orders visible to the caller's org. | authz: allowed_org_types=[forwarder, shipper], min_org_role=operator | () -> (list[OrderTypeaheadResult])
|
|
478
478
|
*
|
|
479
479
|
* @param {Chrt.shipping.orders.ExpandedTypeaheadV1Request} request
|
|
480
480
|
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -41,7 +41,6 @@ export declare class SharingSettings {
|
|
|
41
41
|
* @example
|
|
42
42
|
* await client.tracking.sharingSettings.taskGroupByDriverSharingSettingsV1({
|
|
43
43
|
* task_group_id: "task_group_id",
|
|
44
|
-
* driver_id: "driver_id",
|
|
45
44
|
* "public": true
|
|
46
45
|
* })
|
|
47
46
|
*/
|
|
@@ -59,7 +58,6 @@ export declare class SharingSettings {
|
|
|
59
58
|
* await client.tracking.sharingSettings.cargoByDriverSettingsV1({
|
|
60
59
|
* task_group_id: "task_group_id",
|
|
61
60
|
* cargo_id: "cargo_id",
|
|
62
|
-
* driver_id: "driver_id",
|
|
63
61
|
* "public": true
|
|
64
62
|
* })
|
|
65
63
|
*/
|
|
@@ -66,7 +66,6 @@ class SharingSettings {
|
|
|
66
66
|
* @example
|
|
67
67
|
* await client.tracking.sharingSettings.taskGroupByDriverSharingSettingsV1({
|
|
68
68
|
* task_group_id: "task_group_id",
|
|
69
|
-
* driver_id: "driver_id",
|
|
70
69
|
* "public": true
|
|
71
70
|
* })
|
|
72
71
|
*/
|
|
@@ -136,7 +135,6 @@ class SharingSettings {
|
|
|
136
135
|
* await client.tracking.sharingSettings.cargoByDriverSettingsV1({
|
|
137
136
|
* task_group_id: "task_group_id",
|
|
138
137
|
* cargo_id: "cargo_id",
|
|
139
|
-
* driver_id: "driver_id",
|
|
140
138
|
* "public": true
|
|
141
139
|
* })
|
|
142
140
|
*/
|
|
@@ -6,13 +6,11 @@
|
|
|
6
6
|
* {
|
|
7
7
|
* task_group_id: "task_group_id",
|
|
8
8
|
* cargo_id: "cargo_id",
|
|
9
|
-
* driver_id: "driver_id",
|
|
10
9
|
* "public": true
|
|
11
10
|
* }
|
|
12
11
|
*/
|
|
13
12
|
export interface CargoByDriverSharingSettingsUpdateReq {
|
|
14
13
|
task_group_id: string;
|
|
15
14
|
cargo_id: string;
|
|
16
|
-
driver_id: string;
|
|
17
15
|
public: boolean;
|
|
18
16
|
}
|
|
@@ -5,7 +5,7 @@ export interface CargoByDriverSharingSettings1 {
|
|
|
5
5
|
schema_version: number;
|
|
6
6
|
task_group_id: string;
|
|
7
7
|
cargo_id: string;
|
|
8
|
-
driver_id
|
|
8
|
+
driver_id?: string | null;
|
|
9
9
|
public?: boolean;
|
|
10
10
|
/** Must be a string starting with `user_` */
|
|
11
11
|
last_changed_by_user_id?: string | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export type OrderTypeaheadFieldEnum = "off_chrt_reference_id" | "short_id";
|
|
5
|
+
export declare const OrderTypeaheadFieldEnum: {
|
|
6
|
+
readonly OffChrtReferenceId: "off_chrt_reference_id";
|
|
7
|
+
readonly ShortId: "short_id";
|
|
8
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.OrderTypeaheadFieldEnum = void 0;
|
|
7
|
+
exports.OrderTypeaheadFieldEnum = {
|
|
8
|
+
OffChrtReferenceId: "off_chrt_reference_id",
|
|
9
|
+
ShortId: "short_id",
|
|
10
|
+
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export interface TaskGroupByDriverSharingSettings1 {
|
|
5
5
|
schema_version: number;
|
|
6
6
|
task_group_id: string;
|
|
7
|
-
driver_id
|
|
7
|
+
driver_id?: string | null;
|
|
8
8
|
public?: boolean;
|
|
9
9
|
/** Must be a string starting with `user_` */
|
|
10
10
|
last_changed_by_user_id?: string | null;
|
|
@@ -149,6 +149,8 @@ export * from "./OrderDraftValidationResult.js";
|
|
|
149
149
|
export * from "./OrderExpanded.js";
|
|
150
150
|
export * from "./OrderSortByEnum.js";
|
|
151
151
|
export * from "./OrderStatusEnum1.js";
|
|
152
|
+
export * from "./OrderTypeaheadFieldEnum.js";
|
|
153
|
+
export * from "./OrderTypeaheadResult.js";
|
|
152
154
|
export * from "./OrdersDraftUpdateRes.js";
|
|
153
155
|
export * from "./OrdersExpandedListRes.js";
|
|
154
156
|
export * from "./OrdersNewDraftRes.js";
|
|
@@ -165,6 +165,8 @@ __exportStar(require("./OrderDraftValidationResult.js"), exports);
|
|
|
165
165
|
__exportStar(require("./OrderExpanded.js"), exports);
|
|
166
166
|
__exportStar(require("./OrderSortByEnum.js"), exports);
|
|
167
167
|
__exportStar(require("./OrderStatusEnum1.js"), exports);
|
|
168
|
+
__exportStar(require("./OrderTypeaheadFieldEnum.js"), exports);
|
|
169
|
+
__exportStar(require("./OrderTypeaheadResult.js"), exports);
|
|
168
170
|
__exportStar(require("./OrdersDraftUpdateRes.js"), exports);
|
|
169
171
|
__exportStar(require("./OrdersExpandedListRes.js"), exports);
|
|
170
172
|
__exportStar(require("./OrdersNewDraftRes.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.595.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -17,8 +17,8 @@ export class ChrtClient {
|
|
|
17
17
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
18
18
|
"X-Fern-Language": "JavaScript",
|
|
19
19
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
20
|
-
"X-Fern-SDK-Version": "1.
|
|
21
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
20
|
+
"X-Fern-SDK-Version": "1.595.0",
|
|
21
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.595.0",
|
|
22
22
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
23
23
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
24
24
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/client/Client.d.mts
CHANGED
|
@@ -45,7 +45,7 @@ export declare class Expanded {
|
|
|
45
45
|
retrieveV1(orderRef: string, request: Chrt.OrderAndTaskGroupExpandedReq, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.OrderDraftExpanded>;
|
|
46
46
|
private __retrieveV1;
|
|
47
47
|
/**
|
|
48
|
-
* Lists expanded draft orders for the organization with filtering, sorting, and
|
|
48
|
+
* Lists expanded draft orders for the organization with filtering, sorting, pagination, and optional search. | (OrderAndTaskGroupExpandedReq) -> (OrderDraftExpandedListRes)
|
|
49
49
|
*
|
|
50
50
|
* @param {Chrt.shipping.orderDrafts.ExpandedListV1Request} request
|
|
51
51
|
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -58,6 +58,7 @@ export declare class Expanded {
|
|
|
58
58
|
* sort_order: "asc",
|
|
59
59
|
* page: 1,
|
|
60
60
|
* page_size: 1,
|
|
61
|
+
* search: "search",
|
|
61
62
|
* filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
62
63
|
* filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
63
64
|
* body: {}
|
|
@@ -65,5 +66,21 @@ export declare class Expanded {
|
|
|
65
66
|
*/
|
|
66
67
|
listV1(request: Chrt.shipping.orderDrafts.ExpandedListV1Request, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.OrderDraftExpandedListRes>;
|
|
67
68
|
private __listV1;
|
|
69
|
+
/**
|
|
70
|
+
* Returns distinct short_id and off_chrt_reference_id values matching the query via case-insensitive regex. Searches draft orders created by the caller's org. | authz: min_org_role=operator | () -> (list[OrderTypeaheadResult])
|
|
71
|
+
*
|
|
72
|
+
* @param {Chrt.shipping.orderDrafts.ExpandedTypeaheadV1Request} request
|
|
73
|
+
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* await client.shipping.orderDrafts.expanded.typeaheadV1({
|
|
79
|
+
* query: "query",
|
|
80
|
+
* limit: 1
|
|
81
|
+
* })
|
|
82
|
+
*/
|
|
83
|
+
typeaheadV1(request: Chrt.shipping.orderDrafts.ExpandedTypeaheadV1Request, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.OrderTypeaheadResult[]>;
|
|
84
|
+
private __typeaheadV1;
|
|
68
85
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
69
86
|
}
|
package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/client/Client.mjs
CHANGED
|
@@ -83,7 +83,7 @@ export class Expanded {
|
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
86
|
-
* Lists expanded draft orders for the organization with filtering, sorting, and
|
|
86
|
+
* Lists expanded draft orders for the organization with filtering, sorting, pagination, and optional search. | (OrderAndTaskGroupExpandedReq) -> (OrderDraftExpandedListRes)
|
|
87
87
|
*
|
|
88
88
|
* @param {Chrt.shipping.orderDrafts.ExpandedListV1Request} request
|
|
89
89
|
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -96,6 +96,7 @@ export class Expanded {
|
|
|
96
96
|
* sort_order: "asc",
|
|
97
97
|
* page: 1,
|
|
98
98
|
* page_size: 1,
|
|
99
|
+
* search: "search",
|
|
99
100
|
* filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
100
101
|
* filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
101
102
|
* body: {}
|
|
@@ -107,7 +108,7 @@ export class Expanded {
|
|
|
107
108
|
__listV1(request, requestOptions) {
|
|
108
109
|
return __awaiter(this, void 0, void 0, function* () {
|
|
109
110
|
var _a, _b, _c, _d, _e, _f;
|
|
110
|
-
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, body: _body, } = request;
|
|
111
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, body: _body, } = request;
|
|
111
112
|
const _queryParams = {};
|
|
112
113
|
if (sortBy !== undefined) {
|
|
113
114
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -121,6 +122,9 @@ export class Expanded {
|
|
|
121
122
|
if (pageSize !== undefined) {
|
|
122
123
|
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
123
124
|
}
|
|
125
|
+
if (search !== undefined) {
|
|
126
|
+
_queryParams["search"] = search;
|
|
127
|
+
}
|
|
124
128
|
if (filterDraftStartedAtTimestampLte !== undefined) {
|
|
125
129
|
_queryParams["filter_draft_started_at_timestamp_lte"] = filterDraftStartedAtTimestampLte;
|
|
126
130
|
}
|
|
@@ -172,6 +176,74 @@ export class Expanded {
|
|
|
172
176
|
}
|
|
173
177
|
});
|
|
174
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* Returns distinct short_id and off_chrt_reference_id values matching the query via case-insensitive regex. Searches draft orders created by the caller's org. | authz: min_org_role=operator | () -> (list[OrderTypeaheadResult])
|
|
181
|
+
*
|
|
182
|
+
* @param {Chrt.shipping.orderDrafts.ExpandedTypeaheadV1Request} request
|
|
183
|
+
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
184
|
+
*
|
|
185
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* await client.shipping.orderDrafts.expanded.typeaheadV1({
|
|
189
|
+
* query: "query",
|
|
190
|
+
* limit: 1
|
|
191
|
+
* })
|
|
192
|
+
*/
|
|
193
|
+
typeaheadV1(request, requestOptions) {
|
|
194
|
+
return core.HttpResponsePromise.fromPromise(this.__typeaheadV1(request, requestOptions));
|
|
195
|
+
}
|
|
196
|
+
__typeaheadV1(request, requestOptions) {
|
|
197
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
198
|
+
var _a, _b, _c, _d, _e;
|
|
199
|
+
const { query, limit } = request;
|
|
200
|
+
const _queryParams = {};
|
|
201
|
+
_queryParams["query"] = query;
|
|
202
|
+
if (limit !== undefined) {
|
|
203
|
+
_queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
|
|
204
|
+
}
|
|
205
|
+
let _headers = mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
206
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
207
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "shipping/order_drafts/expanded/typeahead/v1"),
|
|
208
|
+
method: "GET",
|
|
209
|
+
headers: _headers,
|
|
210
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
211
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
212
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
213
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
214
|
+
});
|
|
215
|
+
if (_response.ok) {
|
|
216
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
217
|
+
}
|
|
218
|
+
if (_response.error.reason === "status-code") {
|
|
219
|
+
switch (_response.error.statusCode) {
|
|
220
|
+
case 422:
|
|
221
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
222
|
+
default:
|
|
223
|
+
throw new errors.ChrtError({
|
|
224
|
+
statusCode: _response.error.statusCode,
|
|
225
|
+
body: _response.error.body,
|
|
226
|
+
rawResponse: _response.rawResponse,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
switch (_response.error.reason) {
|
|
231
|
+
case "non-json":
|
|
232
|
+
throw new errors.ChrtError({
|
|
233
|
+
statusCode: _response.error.statusCode,
|
|
234
|
+
body: _response.error.rawBody,
|
|
235
|
+
rawResponse: _response.rawResponse,
|
|
236
|
+
});
|
|
237
|
+
case "timeout":
|
|
238
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/order_drafts/expanded/typeahead/v1.");
|
|
239
|
+
case "unknown":
|
|
240
|
+
throw new errors.ChrtError({
|
|
241
|
+
message: _response.error.errorMessage,
|
|
242
|
+
rawResponse: _response.rawResponse,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
}
|
|
175
247
|
_getAuthorizationHeader() {
|
|
176
248
|
return __awaiter(this, void 0, void 0, function* () {
|
|
177
249
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -9,6 +9,7 @@ import * as Chrt from "../../../../../../../../index.mjs";
|
|
|
9
9
|
* sort_order: "asc",
|
|
10
10
|
* page: 1,
|
|
11
11
|
* page_size: 1,
|
|
12
|
+
* search: "search",
|
|
12
13
|
* filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
13
14
|
* filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
14
15
|
* body: {}
|
|
@@ -20,6 +21,8 @@ export interface ExpandedListV1Request {
|
|
|
20
21
|
sort_order?: Chrt.SortOrderEnum | null;
|
|
21
22
|
page?: number | null;
|
|
22
23
|
page_size?: number | null;
|
|
24
|
+
/** Full-text search query (searches order short_id and off_chrt_reference_id) */
|
|
25
|
+
search?: string | null;
|
|
23
26
|
filter_draft_started_at_timestamp_lte?: string | null;
|
|
24
27
|
filter_draft_started_at_timestamp_gte?: string | null;
|
|
25
28
|
body: Chrt.OrderAndTaskGroupExpandedReq;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* query: "query",
|
|
8
|
+
* limit: 1
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface ExpandedTypeaheadV1Request {
|
|
12
|
+
/** Typeahead search query */
|
|
13
|
+
query: string;
|
|
14
|
+
/** Max results per field */
|
|
15
|
+
limit?: number | null;
|
|
16
|
+
}
|
package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.mts
CHANGED
|
@@ -125,7 +125,7 @@ export declare class Expanded {
|
|
|
125
125
|
listForShipperOperatorsV1(request: Chrt.shipping.orders.ExpandedListForShipperOperatorsV1Request, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.OrdersExpandedListRes>;
|
|
126
126
|
private __listForShipperOperatorsV1;
|
|
127
127
|
/**
|
|
128
|
-
* Returns distinct
|
|
128
|
+
* Returns distinct short_id and off_chrt_reference_id values matching the query via case-insensitive regex. Searches non-draft orders visible to the caller's org. | authz: allowed_org_types=[forwarder, shipper], min_org_role=operator | () -> (list[OrderTypeaheadResult])
|
|
129
129
|
*
|
|
130
130
|
* @param {Chrt.shipping.orders.ExpandedTypeaheadV1Request} request
|
|
131
131
|
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -138,7 +138,7 @@ export declare class Expanded {
|
|
|
138
138
|
* limit: 1
|
|
139
139
|
* })
|
|
140
140
|
*/
|
|
141
|
-
typeaheadV1(request: Chrt.shipping.orders.ExpandedTypeaheadV1Request, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<
|
|
141
|
+
typeaheadV1(request: Chrt.shipping.orders.ExpandedTypeaheadV1Request, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.OrderTypeaheadResult[]>;
|
|
142
142
|
private __typeaheadV1;
|
|
143
143
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
144
144
|
}
|
package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.mjs
CHANGED
|
@@ -438,7 +438,7 @@ export class Expanded {
|
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
440
|
/**
|
|
441
|
-
* Returns distinct
|
|
441
|
+
* Returns distinct short_id and off_chrt_reference_id values matching the query via case-insensitive regex. Searches non-draft orders visible to the caller's org. | authz: allowed_org_types=[forwarder, shipper], min_org_role=operator | () -> (list[OrderTypeaheadResult])
|
|
442
442
|
*
|
|
443
443
|
* @param {Chrt.shipping.orders.ExpandedTypeaheadV1Request} request
|
|
444
444
|
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -41,7 +41,6 @@ export declare class SharingSettings {
|
|
|
41
41
|
* @example
|
|
42
42
|
* await client.tracking.sharingSettings.taskGroupByDriverSharingSettingsV1({
|
|
43
43
|
* task_group_id: "task_group_id",
|
|
44
|
-
* driver_id: "driver_id",
|
|
45
44
|
* "public": true
|
|
46
45
|
* })
|
|
47
46
|
*/
|
|
@@ -59,7 +58,6 @@ export declare class SharingSettings {
|
|
|
59
58
|
* await client.tracking.sharingSettings.cargoByDriverSettingsV1({
|
|
60
59
|
* task_group_id: "task_group_id",
|
|
61
60
|
* cargo_id: "cargo_id",
|
|
62
|
-
* driver_id: "driver_id",
|
|
63
61
|
* "public": true
|
|
64
62
|
* })
|
|
65
63
|
*/
|
|
@@ -30,7 +30,6 @@ export class SharingSettings {
|
|
|
30
30
|
* @example
|
|
31
31
|
* await client.tracking.sharingSettings.taskGroupByDriverSharingSettingsV1({
|
|
32
32
|
* task_group_id: "task_group_id",
|
|
33
|
-
* driver_id: "driver_id",
|
|
34
33
|
* "public": true
|
|
35
34
|
* })
|
|
36
35
|
*/
|
|
@@ -100,7 +99,6 @@ export class SharingSettings {
|
|
|
100
99
|
* await client.tracking.sharingSettings.cargoByDriverSettingsV1({
|
|
101
100
|
* task_group_id: "task_group_id",
|
|
102
101
|
* cargo_id: "cargo_id",
|
|
103
|
-
* driver_id: "driver_id",
|
|
104
102
|
* "public": true
|
|
105
103
|
* })
|
|
106
104
|
*/
|
|
@@ -6,13 +6,11 @@
|
|
|
6
6
|
* {
|
|
7
7
|
* task_group_id: "task_group_id",
|
|
8
8
|
* cargo_id: "cargo_id",
|
|
9
|
-
* driver_id: "driver_id",
|
|
10
9
|
* "public": true
|
|
11
10
|
* }
|
|
12
11
|
*/
|
|
13
12
|
export interface CargoByDriverSharingSettingsUpdateReq {
|
|
14
13
|
task_group_id: string;
|
|
15
14
|
cargo_id: string;
|
|
16
|
-
driver_id: string;
|
|
17
15
|
public: boolean;
|
|
18
16
|
}
|
|
@@ -5,7 +5,7 @@ export interface CargoByDriverSharingSettings1 {
|
|
|
5
5
|
schema_version: number;
|
|
6
6
|
task_group_id: string;
|
|
7
7
|
cargo_id: string;
|
|
8
|
-
driver_id
|
|
8
|
+
driver_id?: string | null;
|
|
9
9
|
public?: boolean;
|
|
10
10
|
/** Must be a string starting with `user_` */
|
|
11
11
|
last_changed_by_user_id?: string | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export type OrderTypeaheadFieldEnum = "off_chrt_reference_id" | "short_id";
|
|
5
|
+
export declare const OrderTypeaheadFieldEnum: {
|
|
6
|
+
readonly OffChrtReferenceId: "off_chrt_reference_id";
|
|
7
|
+
readonly ShortId: "short_id";
|
|
8
|
+
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export interface TaskGroupByDriverSharingSettings1 {
|
|
5
5
|
schema_version: number;
|
|
6
6
|
task_group_id: string;
|
|
7
|
-
driver_id
|
|
7
|
+
driver_id?: string | null;
|
|
8
8
|
public?: boolean;
|
|
9
9
|
/** Must be a string starting with `user_` */
|
|
10
10
|
last_changed_by_user_id?: string | null;
|
|
@@ -149,6 +149,8 @@ export * from "./OrderDraftValidationResult.mjs";
|
|
|
149
149
|
export * from "./OrderExpanded.mjs";
|
|
150
150
|
export * from "./OrderSortByEnum.mjs";
|
|
151
151
|
export * from "./OrderStatusEnum1.mjs";
|
|
152
|
+
export * from "./OrderTypeaheadFieldEnum.mjs";
|
|
153
|
+
export * from "./OrderTypeaheadResult.mjs";
|
|
152
154
|
export * from "./OrdersDraftUpdateRes.mjs";
|
|
153
155
|
export * from "./OrdersExpandedListRes.mjs";
|
|
154
156
|
export * from "./OrdersNewDraftRes.mjs";
|
|
@@ -149,6 +149,8 @@ export * from "./OrderDraftValidationResult.mjs";
|
|
|
149
149
|
export * from "./OrderExpanded.mjs";
|
|
150
150
|
export * from "./OrderSortByEnum.mjs";
|
|
151
151
|
export * from "./OrderStatusEnum1.mjs";
|
|
152
|
+
export * from "./OrderTypeaheadFieldEnum.mjs";
|
|
153
|
+
export * from "./OrderTypeaheadResult.mjs";
|
|
152
154
|
export * from "./OrdersDraftUpdateRes.mjs";
|
|
153
155
|
export * from "./OrdersExpandedListRes.mjs";
|
|
154
156
|
export * from "./OrdersNewDraftRes.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.595.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.595.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -11277,7 +11277,7 @@ await client.shipping.orderDrafts.expanded.retrieveV1("order_ref", {});
|
|
|
11277
11277
|
<dl>
|
|
11278
11278
|
<dd>
|
|
11279
11279
|
|
|
11280
|
-
Lists expanded draft orders for the organization with filtering, sorting, and
|
|
11280
|
+
Lists expanded draft orders for the organization with filtering, sorting, pagination, and optional search. | (OrderAndTaskGroupExpandedReq) -> (OrderDraftExpandedListRes)
|
|
11281
11281
|
|
|
11282
11282
|
</dd>
|
|
11283
11283
|
</dl>
|
|
@@ -11298,6 +11298,7 @@ await client.shipping.orderDrafts.expanded.listV1({
|
|
|
11298
11298
|
sort_order: "asc",
|
|
11299
11299
|
page: 1,
|
|
11300
11300
|
page_size: 1,
|
|
11301
|
+
search: "search",
|
|
11301
11302
|
filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
11302
11303
|
filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
11303
11304
|
body: {},
|
|
@@ -11336,6 +11337,72 @@ await client.shipping.orderDrafts.expanded.listV1({
|
|
|
11336
11337
|
</dl>
|
|
11337
11338
|
</details>
|
|
11338
11339
|
|
|
11340
|
+
<details><summary><code>client.shipping.orderDrafts.expanded.<a href="/src/api/resources/shipping/resources/orderDrafts/resources/expanded/client/Client.ts">typeaheadV1</a>({ ...params }) -> Chrt.OrderTypeaheadResult[]</code></summary>
|
|
11341
|
+
<dl>
|
|
11342
|
+
<dd>
|
|
11343
|
+
|
|
11344
|
+
#### 📝 Description
|
|
11345
|
+
|
|
11346
|
+
<dl>
|
|
11347
|
+
<dd>
|
|
11348
|
+
|
|
11349
|
+
<dl>
|
|
11350
|
+
<dd>
|
|
11351
|
+
|
|
11352
|
+
Returns distinct short_id and off_chrt_reference_id values matching the query via case-insensitive regex. Searches draft orders created by the caller's org. | authz: min_org_role=operator | () -> (list[OrderTypeaheadResult])
|
|
11353
|
+
|
|
11354
|
+
</dd>
|
|
11355
|
+
</dl>
|
|
11356
|
+
</dd>
|
|
11357
|
+
</dl>
|
|
11358
|
+
|
|
11359
|
+
#### 🔌 Usage
|
|
11360
|
+
|
|
11361
|
+
<dl>
|
|
11362
|
+
<dd>
|
|
11363
|
+
|
|
11364
|
+
<dl>
|
|
11365
|
+
<dd>
|
|
11366
|
+
|
|
11367
|
+
```typescript
|
|
11368
|
+
await client.shipping.orderDrafts.expanded.typeaheadV1({
|
|
11369
|
+
query: "query",
|
|
11370
|
+
limit: 1,
|
|
11371
|
+
});
|
|
11372
|
+
```
|
|
11373
|
+
|
|
11374
|
+
</dd>
|
|
11375
|
+
</dl>
|
|
11376
|
+
</dd>
|
|
11377
|
+
</dl>
|
|
11378
|
+
|
|
11379
|
+
#### ⚙️ Parameters
|
|
11380
|
+
|
|
11381
|
+
<dl>
|
|
11382
|
+
<dd>
|
|
11383
|
+
|
|
11384
|
+
<dl>
|
|
11385
|
+
<dd>
|
|
11386
|
+
|
|
11387
|
+
**request:** `Chrt.shipping.orderDrafts.ExpandedTypeaheadV1Request`
|
|
11388
|
+
|
|
11389
|
+
</dd>
|
|
11390
|
+
</dl>
|
|
11391
|
+
|
|
11392
|
+
<dl>
|
|
11393
|
+
<dd>
|
|
11394
|
+
|
|
11395
|
+
**requestOptions:** `Expanded.RequestOptions`
|
|
11396
|
+
|
|
11397
|
+
</dd>
|
|
11398
|
+
</dl>
|
|
11399
|
+
</dd>
|
|
11400
|
+
</dl>
|
|
11401
|
+
|
|
11402
|
+
</dd>
|
|
11403
|
+
</dl>
|
|
11404
|
+
</details>
|
|
11405
|
+
|
|
11339
11406
|
## Shipping Orders Expanded
|
|
11340
11407
|
|
|
11341
11408
|
<details><summary><code>client.shipping.orders.expanded.<a href="/src/api/resources/shipping/resources/orders/resources/expanded/client/Client.ts">forShipperOperatorsV1</a>(orderRef, { ...params }) -> Chrt.OrderExpanded</code></summary>
|
|
@@ -11646,7 +11713,7 @@ await client.shipping.orders.expanded.listForShipperOperatorsV1({
|
|
|
11646
11713
|
</dl>
|
|
11647
11714
|
</details>
|
|
11648
11715
|
|
|
11649
|
-
<details><summary><code>client.shipping.orders.expanded.<a href="/src/api/resources/shipping/resources/orders/resources/expanded/client/Client.ts">typeaheadV1</a>({ ...params }) ->
|
|
11716
|
+
<details><summary><code>client.shipping.orders.expanded.<a href="/src/api/resources/shipping/resources/orders/resources/expanded/client/Client.ts">typeaheadV1</a>({ ...params }) -> Chrt.OrderTypeaheadResult[]</code></summary>
|
|
11650
11717
|
<dl>
|
|
11651
11718
|
<dd>
|
|
11652
11719
|
|
|
@@ -11658,7 +11725,7 @@ await client.shipping.orders.expanded.listForShipperOperatorsV1({
|
|
|
11658
11725
|
<dl>
|
|
11659
11726
|
<dd>
|
|
11660
11727
|
|
|
11661
|
-
Returns distinct
|
|
11728
|
+
Returns distinct short_id and off_chrt_reference_id values matching the query via case-insensitive regex. Searches non-draft orders visible to the caller's org. | authz: allowed_org_types=[forwarder, shipper], min_org_role=operator | () -> (list[OrderTypeaheadResult])
|
|
11662
11729
|
|
|
11663
11730
|
</dd>
|
|
11664
11731
|
</dl>
|
|
@@ -14280,7 +14347,6 @@ Updates the sharing settings for a task group by driver tracking dataset. | auth
|
|
|
14280
14347
|
```typescript
|
|
14281
14348
|
await client.tracking.sharingSettings.taskGroupByDriverSharingSettingsV1({
|
|
14282
14349
|
task_group_id: "task_group_id",
|
|
14283
|
-
driver_id: "driver_id",
|
|
14284
14350
|
public: true,
|
|
14285
14351
|
});
|
|
14286
14352
|
```
|
|
@@ -14348,7 +14414,6 @@ Updates the sharing settings for a cargo by driver tracking dataset. | authz_per
|
|
|
14348
14414
|
await client.tracking.sharingSettings.cargoByDriverSettingsV1({
|
|
14349
14415
|
task_group_id: "task_group_id",
|
|
14350
14416
|
cargo_id: "cargo_id",
|
|
14351
|
-
driver_id: "driver_id",
|
|
14352
14417
|
public: true,
|
|
14353
14418
|
});
|
|
14354
14419
|
```
|