@chrt-inc/typescript-sdk 1.885.0 → 1.888.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/resources/accounts/client/Client.d.ts +21 -3
- package/dist/cjs/api/resources/orgs/resources/accounts/client/Client.js +80 -4
- package/dist/cjs/api/resources/orgs/resources/accounts/client/requests/AccountClientCreate1.d.ts +2 -0
- package/dist/cjs/api/resources/orgs/resources/accounts/client/requests/AccountClientUpdate1.d.ts +3 -0
- package/dist/cjs/api/resources/orgs/resources/accounts/client/requests/AccountsListV1Request.d.ts +6 -0
- package/dist/cjs/api/resources/orgs/resources/accounts/client/requests/AccountsTypeaheadV1Request.d.ts +16 -0
- package/dist/cjs/api/resources/orgs/resources/accounts/client/requests/AccountsTypeaheadV1Request.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/accounts/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/orgs/resources/contacts/client/Client.d.ts +30 -0
- package/dist/cjs/api/resources/orgs/resources/contacts/client/Client.js +125 -0
- package/dist/cjs/api/resources/orgs/resources/contacts/client/requests/ContactAccountAddReq.d.ts +12 -0
- package/dist/cjs/api/resources/orgs/resources/contacts/client/requests/ContactAccountAddReq.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/contacts/client/requests/ContactClientCreate1.d.ts +1 -1
- package/dist/cjs/api/resources/orgs/resources/contacts/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/cargos/client/Client.d.ts +53 -0
- package/dist/cjs/api/resources/shipping/resources/cargos/client/Client.js +200 -0
- package/dist/cjs/api/resources/shipping/resources/cargos/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/cargos/client/index.js +15 -0
- package/dist/cjs/api/resources/shipping/resources/cargos/client/requests/CargoAddToOrderReq.d.ts +18 -0
- package/dist/cjs/api/resources/shipping/resources/cargos/client/requests/CargoAddToOrderReq.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/cargos/client/requests/CargoAssociateWithTaskReq.d.ts +16 -0
- package/dist/cjs/api/resources/shipping/resources/cargos/client/requests/CargoAssociateWithTaskReq.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/cargos/client/requests/CargoUnassociateWithTaskReq.d.ts +16 -0
- package/dist/cjs/api/resources/shipping/resources/cargos/client/requests/CargoUnassociateWithTaskReq.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/cargos/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/shipping/resources/cargos/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/shipping/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/index.js +1 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.js +18 -2
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForCoordinatorOperatorsV1Request.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForProviderOperatorsV1Request.d.ts +2 -0
- package/dist/cjs/api/types/Account1.d.ts +2 -0
- package/dist/cjs/api/types/AccountTypeaheadFieldEnum.d.ts +4 -0
- package/dist/cjs/api/types/AccountTypeaheadFieldEnum.js +5 -0
- package/dist/cjs/api/types/AccountTypeaheadResult.d.ts +8 -0
- package/dist/cjs/api/types/AccountTypeaheadResult.js +5 -0
- package/dist/cjs/api/types/AccountTypeaheadValue.d.ts +7 -0
- package/dist/cjs/api/types/AccountTypeaheadValue.js +5 -0
- package/dist/cjs/api/types/Contact1.d.ts +1 -1
- package/dist/cjs/api/types/NotificationEventsForAdHocEnum.d.ts +1 -1
- package/dist/cjs/api/types/index.d.ts +3 -0
- package/dist/cjs/api/types/index.js +3 -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/resources/accounts/client/Client.d.mts +21 -3
- package/dist/esm/api/resources/orgs/resources/accounts/client/Client.mjs +80 -4
- package/dist/esm/api/resources/orgs/resources/accounts/client/requests/AccountClientCreate1.d.mts +2 -0
- package/dist/esm/api/resources/orgs/resources/accounts/client/requests/AccountClientUpdate1.d.mts +3 -0
- package/dist/esm/api/resources/orgs/resources/accounts/client/requests/AccountsListV1Request.d.mts +6 -0
- package/dist/esm/api/resources/orgs/resources/accounts/client/requests/AccountsTypeaheadV1Request.d.mts +16 -0
- package/dist/esm/api/resources/orgs/resources/accounts/client/requests/AccountsTypeaheadV1Request.mjs +4 -0
- package/dist/esm/api/resources/orgs/resources/accounts/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/orgs/resources/contacts/client/Client.d.mts +30 -0
- package/dist/esm/api/resources/orgs/resources/contacts/client/Client.mjs +125 -0
- package/dist/esm/api/resources/orgs/resources/contacts/client/requests/ContactAccountAddReq.d.mts +12 -0
- package/dist/esm/api/resources/orgs/resources/contacts/client/requests/ContactAccountAddReq.mjs +4 -0
- package/dist/esm/api/resources/orgs/resources/contacts/client/requests/ContactClientCreate1.d.mts +1 -1
- package/dist/esm/api/resources/orgs/resources/contacts/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/cargos/client/Client.d.mts +53 -0
- package/dist/esm/api/resources/shipping/resources/cargos/client/Client.mjs +200 -0
- package/dist/esm/api/resources/shipping/resources/cargos/client/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/cargos/client/index.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/cargos/client/requests/CargoAddToOrderReq.d.mts +18 -0
- package/dist/esm/api/resources/shipping/resources/cargos/client/requests/CargoAddToOrderReq.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/cargos/client/requests/CargoAssociateWithTaskReq.d.mts +16 -0
- package/dist/esm/api/resources/shipping/resources/cargos/client/requests/CargoAssociateWithTaskReq.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/cargos/client/requests/CargoUnassociateWithTaskReq.d.mts +16 -0
- package/dist/esm/api/resources/shipping/resources/cargos/client/requests/CargoUnassociateWithTaskReq.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/cargos/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/shipping/resources/cargos/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.mjs +18 -2
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForCoordinatorOperatorsV1Request.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForProviderOperatorsV1Request.d.mts +2 -0
- package/dist/esm/api/types/Account1.d.mts +2 -0
- package/dist/esm/api/types/AccountTypeaheadFieldEnum.d.mts +4 -0
- package/dist/esm/api/types/AccountTypeaheadFieldEnum.mjs +4 -0
- package/dist/esm/api/types/AccountTypeaheadResult.d.mts +8 -0
- package/dist/esm/api/types/AccountTypeaheadResult.mjs +4 -0
- package/dist/esm/api/types/AccountTypeaheadValue.d.mts +7 -0
- package/dist/esm/api/types/AccountTypeaheadValue.mjs +4 -0
- package/dist/esm/api/types/Contact1.d.mts +1 -1
- package/dist/esm/api/types/NotificationEventsForAdHocEnum.d.mts +1 -1
- package/dist/esm/api/types/index.d.mts +3 -0
- package/dist/esm/api/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +418 -3
|
@@ -55,6 +55,206 @@ class Cargos {
|
|
|
55
55
|
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Adds cargo to a non-DRAFT order. Cargo added to a terminal order starts terminal; otherwise it starts STAGED. | authz_personas=[coordinator_org_operators] | (CargoAddToOrderReq) -> (PydanticObjectId)
|
|
60
|
+
*
|
|
61
|
+
* @param {Chrt.shipping.CargoAddToOrderReq} request
|
|
62
|
+
* @param {Cargos.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.shipping.cargos.addV1({
|
|
68
|
+
* cargo: {
|
|
69
|
+
* cargo_type: "spare_parts",
|
|
70
|
+
* schema_version: 1
|
|
71
|
+
* },
|
|
72
|
+
* order_id: "order_id"
|
|
73
|
+
* })
|
|
74
|
+
*/
|
|
75
|
+
addV1(request, requestOptions) {
|
|
76
|
+
return core.HttpResponsePromise.fromPromise(this.__addV1(request, requestOptions));
|
|
77
|
+
}
|
|
78
|
+
__addV1(request, requestOptions) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
var _a, _b, _c, _d;
|
|
81
|
+
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);
|
|
82
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
83
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "shipping/cargos/add/v1"),
|
|
84
|
+
method: "POST",
|
|
85
|
+
headers: _headers,
|
|
86
|
+
contentType: "application/json",
|
|
87
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
88
|
+
requestType: "json",
|
|
89
|
+
body: request,
|
|
90
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
91
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
92
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
93
|
+
});
|
|
94
|
+
if (_response.ok) {
|
|
95
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
96
|
+
}
|
|
97
|
+
if (_response.error.reason === "status-code") {
|
|
98
|
+
switch (_response.error.statusCode) {
|
|
99
|
+
case 422:
|
|
100
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
101
|
+
default:
|
|
102
|
+
throw new errors.ChrtError({
|
|
103
|
+
statusCode: _response.error.statusCode,
|
|
104
|
+
body: _response.error.body,
|
|
105
|
+
rawResponse: _response.rawResponse,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
switch (_response.error.reason) {
|
|
110
|
+
case "non-json":
|
|
111
|
+
throw new errors.ChrtError({
|
|
112
|
+
statusCode: _response.error.statusCode,
|
|
113
|
+
body: _response.error.rawBody,
|
|
114
|
+
rawResponse: _response.rawResponse,
|
|
115
|
+
});
|
|
116
|
+
case "timeout":
|
|
117
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/cargos/add/v1.");
|
|
118
|
+
case "unknown":
|
|
119
|
+
throw new errors.ChrtError({
|
|
120
|
+
message: _response.error.errorMessage,
|
|
121
|
+
rawResponse: _response.rawResponse,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Associates cargo with a task on a non-DRAFT order, then derives cargo status from all associated tasks in the order's task sequence. | authz_personas=[coordinator_org_operators] | (CargoAssociateWithTaskReq) -> (bool)
|
|
128
|
+
*
|
|
129
|
+
* @param {Chrt.shipping.CargoAssociateWithTaskReq} request
|
|
130
|
+
* @param {Cargos.RequestOptions} requestOptions - Request-specific configuration.
|
|
131
|
+
*
|
|
132
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* await client.shipping.cargos.associateWithTaskV1({
|
|
136
|
+
* cargo_id: "cargo_id",
|
|
137
|
+
* order_id: "order_id",
|
|
138
|
+
* task_id: "task_id"
|
|
139
|
+
* })
|
|
140
|
+
*/
|
|
141
|
+
associateWithTaskV1(request, requestOptions) {
|
|
142
|
+
return core.HttpResponsePromise.fromPromise(this.__associateWithTaskV1(request, requestOptions));
|
|
143
|
+
}
|
|
144
|
+
__associateWithTaskV1(request, requestOptions) {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
var _a, _b, _c, _d;
|
|
147
|
+
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);
|
|
148
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
149
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "shipping/cargos/associate_with_task/v1"),
|
|
150
|
+
method: "POST",
|
|
151
|
+
headers: _headers,
|
|
152
|
+
contentType: "application/json",
|
|
153
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
154
|
+
requestType: "json",
|
|
155
|
+
body: request,
|
|
156
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
157
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
158
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
159
|
+
});
|
|
160
|
+
if (_response.ok) {
|
|
161
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
162
|
+
}
|
|
163
|
+
if (_response.error.reason === "status-code") {
|
|
164
|
+
switch (_response.error.statusCode) {
|
|
165
|
+
case 422:
|
|
166
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
167
|
+
default:
|
|
168
|
+
throw new errors.ChrtError({
|
|
169
|
+
statusCode: _response.error.statusCode,
|
|
170
|
+
body: _response.error.body,
|
|
171
|
+
rawResponse: _response.rawResponse,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
switch (_response.error.reason) {
|
|
176
|
+
case "non-json":
|
|
177
|
+
throw new errors.ChrtError({
|
|
178
|
+
statusCode: _response.error.statusCode,
|
|
179
|
+
body: _response.error.rawBody,
|
|
180
|
+
rawResponse: _response.rawResponse,
|
|
181
|
+
});
|
|
182
|
+
case "timeout":
|
|
183
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/cargos/associate_with_task/v1.");
|
|
184
|
+
case "unknown":
|
|
185
|
+
throw new errors.ChrtError({
|
|
186
|
+
message: _response.error.errorMessage,
|
|
187
|
+
rawResponse: _response.rawResponse,
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Removes a cargo association from a task on a non-DRAFT order, then derives cargo status from the remaining associated tasks in the order's task sequence. | authz_personas=[coordinator_org_operators] | (CargoUnassociateWithTaskReq) -> (bool)
|
|
194
|
+
*
|
|
195
|
+
* @param {Chrt.shipping.CargoUnassociateWithTaskReq} request
|
|
196
|
+
* @param {Cargos.RequestOptions} requestOptions - Request-specific configuration.
|
|
197
|
+
*
|
|
198
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* await client.shipping.cargos.unassociateWithTaskV1({
|
|
202
|
+
* cargo_id: "cargo_id",
|
|
203
|
+
* order_id: "order_id",
|
|
204
|
+
* task_id: "task_id"
|
|
205
|
+
* })
|
|
206
|
+
*/
|
|
207
|
+
unassociateWithTaskV1(request, requestOptions) {
|
|
208
|
+
return core.HttpResponsePromise.fromPromise(this.__unassociateWithTaskV1(request, requestOptions));
|
|
209
|
+
}
|
|
210
|
+
__unassociateWithTaskV1(request, requestOptions) {
|
|
211
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
+
var _a, _b, _c, _d;
|
|
213
|
+
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);
|
|
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, "shipping/cargos/unassociate_with_task/v1"),
|
|
216
|
+
method: "POST",
|
|
217
|
+
headers: _headers,
|
|
218
|
+
contentType: "application/json",
|
|
219
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
220
|
+
requestType: "json",
|
|
221
|
+
body: request,
|
|
222
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
223
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
224
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
225
|
+
});
|
|
226
|
+
if (_response.ok) {
|
|
227
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
228
|
+
}
|
|
229
|
+
if (_response.error.reason === "status-code") {
|
|
230
|
+
switch (_response.error.statusCode) {
|
|
231
|
+
case 422:
|
|
232
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
233
|
+
default:
|
|
234
|
+
throw new errors.ChrtError({
|
|
235
|
+
statusCode: _response.error.statusCode,
|
|
236
|
+
body: _response.error.body,
|
|
237
|
+
rawResponse: _response.rawResponse,
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
switch (_response.error.reason) {
|
|
242
|
+
case "non-json":
|
|
243
|
+
throw new errors.ChrtError({
|
|
244
|
+
statusCode: _response.error.statusCode,
|
|
245
|
+
body: _response.error.rawBody,
|
|
246
|
+
rawResponse: _response.rawResponse,
|
|
247
|
+
});
|
|
248
|
+
case "timeout":
|
|
249
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/cargos/unassociate_with_task/v1.");
|
|
250
|
+
case "unknown":
|
|
251
|
+
throw new errors.ChrtError({
|
|
252
|
+
message: _response.error.errorMessage,
|
|
253
|
+
rawResponse: _response.rawResponse,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
}
|
|
58
258
|
/**
|
|
59
259
|
* Updates cargo details and synchronizes its parent order's AWB list. Cargo must be in STAGED, IN_TRANSIT, DELIVERED, SKIPPED, or EXCEPTION status. | authz_personas=[lig_owner_operators] | (CargoClientUpdate1) -> (PydanticObjectId)
|
|
60
260
|
*
|
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
package/dist/cjs/api/resources/shipping/resources/cargos/client/requests/CargoAddToOrderReq.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
* cargo: {
|
|
9
|
+
* cargo_type: "spare_parts",
|
|
10
|
+
* schema_version: 1
|
|
11
|
+
* },
|
|
12
|
+
* order_id: "order_id"
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export interface CargoAddToOrderReq {
|
|
16
|
+
cargo: Chrt.CargoClientCreate1;
|
|
17
|
+
order_id: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* cargo_id: "cargo_id",
|
|
8
|
+
* order_id: "order_id",
|
|
9
|
+
* task_id: "task_id"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface CargoAssociateWithTaskReq {
|
|
13
|
+
cargo_id: string;
|
|
14
|
+
order_id: string;
|
|
15
|
+
task_id: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* cargo_id: "cargo_id",
|
|
8
|
+
* order_id: "order_id",
|
|
9
|
+
* task_id: "task_id"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface CargoUnassociateWithTaskReq {
|
|
13
|
+
cargo_id: string;
|
|
14
|
+
order_id: string;
|
|
15
|
+
task_id: string;
|
|
16
|
+
}
|
|
@@ -10,6 +10,7 @@ export * as ordersAndOrderGroups from "./ordersAndOrderGroups/index.js";
|
|
|
10
10
|
export * as taskArtifacts from "./taskArtifacts/index.js";
|
|
11
11
|
export * as taskGroups from "./taskGroups/index.js";
|
|
12
12
|
export * as tasks from "./tasks/index.js";
|
|
13
|
+
export * from "./cargos/client/requests/index.js";
|
|
13
14
|
export * from "./drivers/client/requests/index.js";
|
|
14
15
|
export * from "./orderGroups/client/requests/index.js";
|
|
15
16
|
export * from "./orderSchedules/client/requests/index.js";
|
|
@@ -49,6 +49,7 @@ exports.ordersAndOrderGroups = __importStar(require("./ordersAndOrderGroups/inde
|
|
|
49
49
|
exports.taskArtifacts = __importStar(require("./taskArtifacts/index.js"));
|
|
50
50
|
exports.taskGroups = __importStar(require("./taskGroups/index.js"));
|
|
51
51
|
exports.tasks = __importStar(require("./tasks/index.js"));
|
|
52
|
+
__exportStar(require("./cargos/client/requests/index.js"), exports);
|
|
52
53
|
__exportStar(require("./drivers/client/requests/index.js"), exports);
|
|
53
54
|
__exportStar(require("./orderGroups/client/requests/index.js"), exports);
|
|
54
55
|
__exportStar(require("./orderSchedules/client/requests/index.js"), exports);
|
package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.js
CHANGED
|
@@ -349,7 +349,7 @@ class Expanded {
|
|
|
349
349
|
__listForCoordinatorOperatorsV1(request, requestOptions) {
|
|
350
350
|
return __awaiter(this, void 0, void 0, function* () {
|
|
351
351
|
var _a, _b, _c, _d, _e, _f;
|
|
352
|
-
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_order_classification_by_task_group_type: filterOrderClassificationByTaskGroupType, filter_awb_number: filterAwbNumber, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_cancelled_at_timestamp_lte: filterCancelledAtTimestampLte, filter_cancelled_at_timestamp_gte: filterCancelledAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, filter_executor_org_id: filterExecutorOrgId, filter_shipper_org_id: filterShipperOrgId, filter_off_chrt_shipper_org_data_id: filterOffChrtShipperOrgDataId, filter_coordinator_department_id: filterCoordinatorDepartmentId, filter_coordinator_assigned_user_ids: filterCoordinatorAssignedUserIds, filter_coordinator_label: filterCoordinatorLabel, body: _body, } = request;
|
|
352
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_order_classification_by_task_group_type: filterOrderClassificationByTaskGroupType, filter_awb_number: filterAwbNumber, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_cancelled_at_timestamp_lte: filterCancelledAtTimestampLte, filter_cancelled_at_timestamp_gte: filterCancelledAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, filter_executor_org_id: filterExecutorOrgId, filter_shipper_org_id: filterShipperOrgId, filter_off_chrt_shipper_org_data_id: filterOffChrtShipperOrgDataId, filter_coordinator_shipper_account_ids: filterCoordinatorShipperAccountIds, filter_coordinator_department_id: filterCoordinatorDepartmentId, filter_coordinator_assigned_user_ids: filterCoordinatorAssignedUserIds, filter_coordinator_label: filterCoordinatorLabel, body: _body, } = request;
|
|
353
353
|
const _queryParams = {};
|
|
354
354
|
if (sortBy !== undefined) {
|
|
355
355
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -432,6 +432,14 @@ class Expanded {
|
|
|
432
432
|
if (filterOffChrtShipperOrgDataId !== undefined) {
|
|
433
433
|
_queryParams["filter_off_chrt_shipper_org_data_id"] = filterOffChrtShipperOrgDataId;
|
|
434
434
|
}
|
|
435
|
+
if (filterCoordinatorShipperAccountIds !== undefined) {
|
|
436
|
+
if (Array.isArray(filterCoordinatorShipperAccountIds)) {
|
|
437
|
+
_queryParams["filter_coordinator_shipper_account_ids"] = filterCoordinatorShipperAccountIds.map((item) => item);
|
|
438
|
+
}
|
|
439
|
+
else {
|
|
440
|
+
_queryParams["filter_coordinator_shipper_account_ids"] = filterCoordinatorShipperAccountIds;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
435
443
|
if (filterCoordinatorDepartmentId !== undefined) {
|
|
436
444
|
_queryParams["filter_coordinator_department_id"] = filterCoordinatorDepartmentId;
|
|
437
445
|
}
|
|
@@ -709,7 +717,7 @@ class Expanded {
|
|
|
709
717
|
__listForProviderOperatorsV1(request, requestOptions) {
|
|
710
718
|
return __awaiter(this, void 0, void 0, function* () {
|
|
711
719
|
var _a, _b, _c, _d, _e, _f;
|
|
712
|
-
const { provider_role: providerRole, sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_order_classification_by_task_group_type: filterOrderClassificationByTaskGroupType, filter_awb_number: filterAwbNumber, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_cancelled_at_timestamp_lte: filterCancelledAtTimestampLte, filter_cancelled_at_timestamp_gte: filterCancelledAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, filter_executor_org_id: filterExecutorOrgId, filter_coordinator_org_id: filterCoordinatorOrgId, filter_shipper_org_id: filterShipperOrgId, filter_off_chrt_shipper_org_data_id: filterOffChrtShipperOrgDataId, filter_coordinator_department_id: filterCoordinatorDepartmentId, filter_coordinator_assigned_user_ids: filterCoordinatorAssignedUserIds, filter_coordinator_label: filterCoordinatorLabel, body: _body, } = request;
|
|
720
|
+
const { provider_role: providerRole, sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_order_classification_by_task_group_type: filterOrderClassificationByTaskGroupType, filter_awb_number: filterAwbNumber, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_cancelled_at_timestamp_lte: filterCancelledAtTimestampLte, filter_cancelled_at_timestamp_gte: filterCancelledAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, filter_executor_org_id: filterExecutorOrgId, filter_coordinator_org_id: filterCoordinatorOrgId, filter_shipper_org_id: filterShipperOrgId, filter_off_chrt_shipper_org_data_id: filterOffChrtShipperOrgDataId, filter_coordinator_shipper_account_ids: filterCoordinatorShipperAccountIds, filter_coordinator_department_id: filterCoordinatorDepartmentId, filter_coordinator_assigned_user_ids: filterCoordinatorAssignedUserIds, filter_coordinator_label: filterCoordinatorLabel, body: _body, } = request;
|
|
713
721
|
const _queryParams = {};
|
|
714
722
|
if (providerRole !== undefined) {
|
|
715
723
|
_queryParams["provider_role"] = providerRole;
|
|
@@ -798,6 +806,14 @@ class Expanded {
|
|
|
798
806
|
if (filterOffChrtShipperOrgDataId !== undefined) {
|
|
799
807
|
_queryParams["filter_off_chrt_shipper_org_data_id"] = filterOffChrtShipperOrgDataId;
|
|
800
808
|
}
|
|
809
|
+
if (filterCoordinatorShipperAccountIds !== undefined) {
|
|
810
|
+
if (Array.isArray(filterCoordinatorShipperAccountIds)) {
|
|
811
|
+
_queryParams["filter_coordinator_shipper_account_ids"] = filterCoordinatorShipperAccountIds.map((item) => item);
|
|
812
|
+
}
|
|
813
|
+
else {
|
|
814
|
+
_queryParams["filter_coordinator_shipper_account_ids"] = filterCoordinatorShipperAccountIds;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
801
817
|
if (filterCoordinatorDepartmentId !== undefined) {
|
|
802
818
|
_queryParams["filter_coordinator_department_id"] = filterCoordinatorDepartmentId;
|
|
803
819
|
}
|
|
@@ -59,6 +59,8 @@ export interface ExpandedListForCoordinatorOperatorsV1Request {
|
|
|
59
59
|
filter_executor_org_id?: string | null;
|
|
60
60
|
filter_shipper_org_id?: string | null;
|
|
61
61
|
filter_off_chrt_shipper_org_data_id?: string | null;
|
|
62
|
+
/** Filter by coordinator shipper account IDs */
|
|
63
|
+
filter_coordinator_shipper_account_ids?: (string | null) | (string | null)[];
|
|
62
64
|
filter_coordinator_department_id?: string | null;
|
|
63
65
|
filter_coordinator_assigned_user_ids?: (string | null) | (string | null)[];
|
|
64
66
|
filter_coordinator_label?: string | null;
|
|
@@ -63,6 +63,8 @@ export interface ExpandedListForProviderOperatorsV1Request {
|
|
|
63
63
|
filter_coordinator_org_id?: string | null;
|
|
64
64
|
filter_shipper_org_id?: string | null;
|
|
65
65
|
filter_off_chrt_shipper_org_data_id?: string | null;
|
|
66
|
+
/** Filter by coordinator shipper account IDs */
|
|
67
|
+
filter_coordinator_shipper_account_ids?: (string | null) | (string | null)[];
|
|
66
68
|
filter_coordinator_department_id?: string | null;
|
|
67
69
|
filter_coordinator_assigned_user_ids?: (string | null) | (string | null)[];
|
|
68
70
|
filter_coordinator_label?: string | null;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Chrt from "../index.js";
|
|
4
5
|
export interface Account1 {
|
|
5
6
|
_id: string;
|
|
6
7
|
/** Must be a string starting with `org_` */
|
|
7
8
|
created_by_org_id: string;
|
|
8
9
|
/** Must be a string starting with `user_` */
|
|
9
10
|
created_by_user_id: string;
|
|
11
|
+
location?: Chrt.LocationFeature | null;
|
|
10
12
|
name: string;
|
|
11
13
|
off_chrt_org_data_id?: string | null;
|
|
12
14
|
/** Must be a string starting with `org_` */
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Limited notification events for ad-hoc per-subject notifications.
|
|
6
6
|
*
|
|
7
|
-
* Set per order or per tracking session for any
|
|
7
|
+
* Set per order or per tracking session for any contact.
|
|
8
8
|
* Limited scope since it can go outside the org, e.g. share order completion but probably not billing events
|
|
9
9
|
*/
|
|
10
10
|
export type NotificationEventsForAdHocEnum = "shipping.order.staged" | "shipping.order.completed" | "tracking.session.destination_geofence_entered";
|
|
@@ -2,6 +2,9 @@ export * from "./AiImageDescription.js";
|
|
|
2
2
|
export * from "./Account1.js";
|
|
3
3
|
export * from "./AccountListRes.js";
|
|
4
4
|
export * from "./AccountSortByEnum.js";
|
|
5
|
+
export * from "./AccountTypeaheadFieldEnum.js";
|
|
6
|
+
export * from "./AccountTypeaheadResult.js";
|
|
7
|
+
export * from "./AccountTypeaheadValue.js";
|
|
5
8
|
export * from "./AlertCallback.js";
|
|
6
9
|
export * from "./AlertEvent.js";
|
|
7
10
|
export * from "./AlertMessage.js";
|
|
@@ -18,6 +18,9 @@ __exportStar(require("./AiImageDescription.js"), exports);
|
|
|
18
18
|
__exportStar(require("./Account1.js"), exports);
|
|
19
19
|
__exportStar(require("./AccountListRes.js"), exports);
|
|
20
20
|
__exportStar(require("./AccountSortByEnum.js"), exports);
|
|
21
|
+
__exportStar(require("./AccountTypeaheadFieldEnum.js"), exports);
|
|
22
|
+
__exportStar(require("./AccountTypeaheadResult.js"), exports);
|
|
23
|
+
__exportStar(require("./AccountTypeaheadValue.js"), exports);
|
|
21
24
|
__exportStar(require("./AlertCallback.js"), exports);
|
|
22
25
|
__exportStar(require("./AlertEvent.js"), exports);
|
|
23
26
|
__exportStar(require("./AlertMessage.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.888.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -21,8 +21,8 @@ export class ChrtClient {
|
|
|
21
21
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
22
22
|
"X-Fern-Language": "JavaScript",
|
|
23
23
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
24
|
-
"X-Fern-SDK-Version": "1.
|
|
25
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
24
|
+
"X-Fern-SDK-Version": "1.888.0",
|
|
25
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.888.0",
|
|
26
26
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
27
27
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
28
28
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -31,7 +31,7 @@ export declare class Accounts {
|
|
|
31
31
|
protected readonly _options: Accounts.Options;
|
|
32
32
|
constructor(_options?: Accounts.Options);
|
|
33
33
|
/**
|
|
34
|
-
* Creates a coordinator-private account
|
|
34
|
+
* Creates a coordinator-private account with a name unique to its associated shipper. Optional location may be set at creation. | authz: allowed_org_types=[provider], min_org_role=operator | (AccountClientCreate1) -> (PydanticObjectId)
|
|
35
35
|
*
|
|
36
36
|
* @param {Chrt.orgs.AccountClientCreate1} request
|
|
37
37
|
* @param {Accounts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -47,7 +47,7 @@ export declare class Accounts {
|
|
|
47
47
|
createV1(request: Chrt.orgs.AccountClientCreate1, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<string>;
|
|
48
48
|
private __createV1;
|
|
49
49
|
/**
|
|
50
|
-
* Lists coordinator-created shipper accounts with association filters, sorting, and pagination. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (AccountListRes)
|
|
50
|
+
* Lists coordinator-created shipper accounts with association filters, name search, sorting, and pagination. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (AccountListRes)
|
|
51
51
|
*
|
|
52
52
|
* @param {Chrt.orgs.AccountsListV1Request} request
|
|
53
53
|
* @param {Accounts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -56,6 +56,8 @@ export declare class Accounts {
|
|
|
56
56
|
*
|
|
57
57
|
* @example
|
|
58
58
|
* await client.orgs.accounts.listV1({
|
|
59
|
+
* search: "search",
|
|
60
|
+
* filter_account_id: "filter_account_id",
|
|
59
61
|
* filter_org_id: "filter_org_id",
|
|
60
62
|
* filter_off_chrt_org_data_id: "filter_off_chrt_org_data_id",
|
|
61
63
|
* sort_by: "name",
|
|
@@ -67,7 +69,23 @@ export declare class Accounts {
|
|
|
67
69
|
listV1(request?: Chrt.orgs.AccountsListV1Request, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<Chrt.AccountListRes>;
|
|
68
70
|
private __listV1;
|
|
69
71
|
/**
|
|
70
|
-
*
|
|
72
|
+
* Returns distinct coordinator-created shipper account names matching the query, with matching account IDs. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (list[AccountTypeaheadResult])
|
|
73
|
+
*
|
|
74
|
+
* @param {Chrt.orgs.AccountsTypeaheadV1Request} request
|
|
75
|
+
* @param {Accounts.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
|
+
*
|
|
77
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* await client.orgs.accounts.typeaheadV1({
|
|
81
|
+
* query: "query",
|
|
82
|
+
* limit: 1
|
|
83
|
+
* })
|
|
84
|
+
*/
|
|
85
|
+
typeaheadV1(request: Chrt.orgs.AccountsTypeaheadV1Request, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<Chrt.AccountTypeaheadResult[]>;
|
|
86
|
+
private __typeaheadV1;
|
|
87
|
+
/**
|
|
88
|
+
* Updates a coordinator-created shipper account name and optional location while preserving per-shipper name uniqueness. | authz: allowed_org_types=[provider], min_org_role=operator | (AccountClientUpdate1) -> (bool)
|
|
71
89
|
*
|
|
72
90
|
* @param {string} accountId
|
|
73
91
|
* @param {Chrt.orgs.AccountClientUpdate1} request
|