@chrt-inc/typescript-sdk 1.689.0 → 1.692.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/complianceDocuments/client/Client.d.ts +14 -0
- package/dist/cjs/api/resources/orgs/resources/complianceDocuments/client/Client.js +63 -0
- package/dist/cjs/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientCreate1.d.ts +1 -0
- package/dist/cjs/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientUpdate1.d.ts +11 -0
- package/dist/cjs/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientUpdate1.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/complianceDocuments/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/Client.d.ts +14 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/Client.js +63 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientCreate1.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientUpdate1.d.ts +11 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientUpdate1.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/client/Client.d.ts +66 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/client/Client.js +299 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/client/requests/WaitTimeOverrideReq.d.ts +12 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/client/requests/WaitTimeOverrideReq.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/Driver1.d.ts +1 -0
- package/dist/cjs/api/types/DriverComplianceDocument1.d.ts +1 -0
- package/dist/cjs/api/types/DriverComplianceDocumentTypeEnum1.d.ts +16 -1
- package/dist/cjs/api/types/DriverComplianceDocumentTypeEnum1.js +15 -0
- package/dist/cjs/api/types/OrgComplianceDocument1.d.ts +1 -0
- package/dist/cjs/api/types/OrgComplianceDocumentTypeEnum1.d.ts +11 -1
- package/dist/cjs/api/types/OrgComplianceDocumentTypeEnum1.js +10 -0
- package/dist/cjs/api/types/Task1.d.ts +7 -0
- package/dist/cjs/api/types/TaskClientCreate1.d.ts +1 -0
- package/dist/cjs/api/types/TaskGroup1.d.ts +1 -0
- package/dist/cjs/api/types/TaskWaitTimeGeofenceRes.d.ts +9 -0
- package/dist/cjs/api/types/TaskWaitTimeGeofenceRes.js +5 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/Client.d.mts +14 -0
- package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/Client.mjs +63 -0
- package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientCreate1.d.mts +1 -0
- package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientUpdate1.d.mts +11 -0
- package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/requests/OrgComplianceDocumentClientUpdate1.mjs +4 -0
- package/dist/esm/api/resources/orgs/resources/complianceDocuments/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/Client.d.mts +14 -0
- package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/Client.mjs +63 -0
- package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientCreate1.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientUpdate1.d.mts +11 -0
- package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/DriverComplianceDocumentClientUpdate1.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/drivers/resources/complianceDocuments/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/tasks/client/Client.d.mts +66 -0
- package/dist/esm/api/resources/shipping/resources/tasks/client/Client.mjs +299 -0
- package/dist/esm/api/resources/shipping/resources/tasks/client/requests/WaitTimeOverrideReq.d.mts +12 -0
- package/dist/esm/api/resources/shipping/resources/tasks/client/requests/WaitTimeOverrideReq.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/tasks/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/Driver1.d.mts +1 -0
- package/dist/esm/api/types/DriverComplianceDocument1.d.mts +1 -0
- package/dist/esm/api/types/DriverComplianceDocumentTypeEnum1.d.mts +16 -1
- package/dist/esm/api/types/DriverComplianceDocumentTypeEnum1.mjs +15 -0
- package/dist/esm/api/types/OrgComplianceDocument1.d.mts +1 -0
- package/dist/esm/api/types/OrgComplianceDocumentTypeEnum1.d.mts +11 -1
- package/dist/esm/api/types/OrgComplianceDocumentTypeEnum1.mjs +10 -0
- package/dist/esm/api/types/Task1.d.mts +7 -0
- package/dist/esm/api/types/TaskClientCreate1.d.mts +1 -0
- package/dist/esm/api/types/TaskGroup1.d.mts +1 -0
- package/dist/esm/api/types/TaskWaitTimeGeofenceRes.d.mts +9 -0
- package/dist/esm/api/types/TaskWaitTimeGeofenceRes.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 +465 -0
|
@@ -19,6 +19,7 @@ export interface Driver1 {
|
|
|
19
19
|
status?: Chrt.DriverStatusEnum;
|
|
20
20
|
available_according_to_driver?: boolean;
|
|
21
21
|
available_according_to_operators?: boolean;
|
|
22
|
+
waiting?: boolean;
|
|
22
23
|
auto_assign_enabled?: boolean;
|
|
23
24
|
active_task_group_ids?: string[];
|
|
24
25
|
last_seen_at_location?: Chrt.LocationFeature | null;
|
|
@@ -9,6 +9,7 @@ export interface DriverComplianceDocument1 {
|
|
|
9
9
|
org_id: string;
|
|
10
10
|
driver_id: string;
|
|
11
11
|
document_type: Chrt.DriverComplianceDocumentTypeEnum1;
|
|
12
|
+
description?: string | null;
|
|
12
13
|
driver_compliance_document_s3_object_metadata_ids?: string[];
|
|
13
14
|
valid_from?: string | null;
|
|
14
15
|
valid_until?: string | null;
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type DriverComplianceDocumentTypeEnum1 = "drivers_license" | "commercial_drivers_license";
|
|
4
|
+
export type DriverComplianceDocumentTypeEnum1 = "drivers_license" | "commercial_drivers_license" | "tsa_sta" | "iata_dangerous_goods" | "dot_hazmat" | "cdl_hazmat_endorsement" | "osha_bloodborne_pathogens" | "medical_specimen" | "clinical_lab_specimen" | "pathology" | "blood_products" | "pharmaceutical" | "cold_chain" | "vehicle_registration" | "vehicle_inspection" | "background_check" | "mvr_check";
|
|
5
5
|
export declare const DriverComplianceDocumentTypeEnum1: {
|
|
6
6
|
readonly DriversLicense: "drivers_license";
|
|
7
7
|
readonly CommercialDriversLicense: "commercial_drivers_license";
|
|
8
|
+
readonly TsaSta: "tsa_sta";
|
|
9
|
+
readonly IataDangerousGoods: "iata_dangerous_goods";
|
|
10
|
+
readonly DotHazmat: "dot_hazmat";
|
|
11
|
+
readonly CdlHazmatEndorsement: "cdl_hazmat_endorsement";
|
|
12
|
+
readonly OshaBloodbornePathogens: "osha_bloodborne_pathogens";
|
|
13
|
+
readonly MedicalSpecimen: "medical_specimen";
|
|
14
|
+
readonly ClinicalLabSpecimen: "clinical_lab_specimen";
|
|
15
|
+
readonly Pathology: "pathology";
|
|
16
|
+
readonly BloodProducts: "blood_products";
|
|
17
|
+
readonly Pharmaceutical: "pharmaceutical";
|
|
18
|
+
readonly ColdChain: "cold_chain";
|
|
19
|
+
readonly VehicleRegistration: "vehicle_registration";
|
|
20
|
+
readonly VehicleInspection: "vehicle_inspection";
|
|
21
|
+
readonly BackgroundCheck: "background_check";
|
|
22
|
+
readonly MvrCheck: "mvr_check";
|
|
8
23
|
};
|
|
@@ -7,4 +7,19 @@ exports.DriverComplianceDocumentTypeEnum1 = void 0;
|
|
|
7
7
|
exports.DriverComplianceDocumentTypeEnum1 = {
|
|
8
8
|
DriversLicense: "drivers_license",
|
|
9
9
|
CommercialDriversLicense: "commercial_drivers_license",
|
|
10
|
+
TsaSta: "tsa_sta",
|
|
11
|
+
IataDangerousGoods: "iata_dangerous_goods",
|
|
12
|
+
DotHazmat: "dot_hazmat",
|
|
13
|
+
CdlHazmatEndorsement: "cdl_hazmat_endorsement",
|
|
14
|
+
OshaBloodbornePathogens: "osha_bloodborne_pathogens",
|
|
15
|
+
MedicalSpecimen: "medical_specimen",
|
|
16
|
+
ClinicalLabSpecimen: "clinical_lab_specimen",
|
|
17
|
+
Pathology: "pathology",
|
|
18
|
+
BloodProducts: "blood_products",
|
|
19
|
+
Pharmaceutical: "pharmaceutical",
|
|
20
|
+
ColdChain: "cold_chain",
|
|
21
|
+
VehicleRegistration: "vehicle_registration",
|
|
22
|
+
VehicleInspection: "vehicle_inspection",
|
|
23
|
+
BackgroundCheck: "background_check",
|
|
24
|
+
MvrCheck: "mvr_check",
|
|
10
25
|
};
|
|
@@ -9,6 +9,7 @@ export interface OrgComplianceDocument1 {
|
|
|
9
9
|
/** Must be a string starting with `org_` */
|
|
10
10
|
org_id: string;
|
|
11
11
|
document_type: Chrt.OrgComplianceDocumentTypeEnum1;
|
|
12
|
+
description?: string | null;
|
|
12
13
|
org_compliance_document_s3_object_metadata_ids?: string[];
|
|
13
14
|
valid_from?: string | null;
|
|
14
15
|
valid_until?: string | null;
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type OrgComplianceDocumentTypeEnum1 = "security_threat_assessment" | "insurance";
|
|
4
|
+
export type OrgComplianceDocumentTypeEnum1 = "security_threat_assessment" | "insurance" | "indirect_air_carrier" | "customs_broker" | "gdp" | "authorized_economic_operator" | "hipaa" | "chain_of_custody" | "auto_liability_insurance" | "cargo_insurance" | "general_liability_insurance" | "workers_comp_insurance";
|
|
5
5
|
export declare const OrgComplianceDocumentTypeEnum1: {
|
|
6
6
|
readonly SecurityThreatAssessment: "security_threat_assessment";
|
|
7
7
|
readonly Insurance: "insurance";
|
|
8
|
+
readonly IndirectAirCarrier: "indirect_air_carrier";
|
|
9
|
+
readonly CustomsBroker: "customs_broker";
|
|
10
|
+
readonly Gdp: "gdp";
|
|
11
|
+
readonly AuthorizedEconomicOperator: "authorized_economic_operator";
|
|
12
|
+
readonly Hipaa: "hipaa";
|
|
13
|
+
readonly ChainOfCustody: "chain_of_custody";
|
|
14
|
+
readonly AutoLiabilityInsurance: "auto_liability_insurance";
|
|
15
|
+
readonly CargoInsurance: "cargo_insurance";
|
|
16
|
+
readonly GeneralLiabilityInsurance: "general_liability_insurance";
|
|
17
|
+
readonly WorkersCompInsurance: "workers_comp_insurance";
|
|
8
18
|
};
|
|
@@ -7,4 +7,14 @@ exports.OrgComplianceDocumentTypeEnum1 = void 0;
|
|
|
7
7
|
exports.OrgComplianceDocumentTypeEnum1 = {
|
|
8
8
|
SecurityThreatAssessment: "security_threat_assessment",
|
|
9
9
|
Insurance: "insurance",
|
|
10
|
+
IndirectAirCarrier: "indirect_air_carrier",
|
|
11
|
+
CustomsBroker: "customs_broker",
|
|
12
|
+
Gdp: "gdp",
|
|
13
|
+
AuthorizedEconomicOperator: "authorized_economic_operator",
|
|
14
|
+
Hipaa: "hipaa",
|
|
15
|
+
ChainOfCustody: "chain_of_custody",
|
|
16
|
+
AutoLiabilityInsurance: "auto_liability_insurance",
|
|
17
|
+
CargoInsurance: "cargo_insurance",
|
|
18
|
+
GeneralLiabilityInsurance: "general_liability_insurance",
|
|
19
|
+
WorkersCompInsurance: "workers_comp_insurance",
|
|
10
20
|
};
|
|
@@ -5,6 +5,7 @@ import * as Chrt from "../index.js";
|
|
|
5
5
|
export interface Task1 {
|
|
6
6
|
schema_version: number;
|
|
7
7
|
location?: Chrt.LocationFeature | null;
|
|
8
|
+
geofence_distance_miles?: number;
|
|
8
9
|
action?: Task1.Action | null;
|
|
9
10
|
datetime_windows?: Chrt.DateTimeWindow1[];
|
|
10
11
|
order_placer_comments?: string | null;
|
|
@@ -34,6 +35,12 @@ export interface Task1 {
|
|
|
34
35
|
skipped_at_timestamp?: string | null;
|
|
35
36
|
attempted_at_timestamp?: string | null;
|
|
36
37
|
exception_at_timestamp?: string | null;
|
|
38
|
+
wait_time_start_timestamp?: string | null;
|
|
39
|
+
wait_time_end_timestamp?: string | null;
|
|
40
|
+
wait_time_started_in_geofence?: boolean | null;
|
|
41
|
+
wait_time_validated?: boolean | null;
|
|
42
|
+
/** Must be a string starting with `user_` */
|
|
43
|
+
wait_time_validated_by_user_id?: string | null;
|
|
37
44
|
order_cancelled?: boolean;
|
|
38
45
|
}
|
|
39
46
|
export declare namespace Task1 {
|
|
@@ -5,6 +5,7 @@ import * as Chrt from "../index.js";
|
|
|
5
5
|
export interface TaskClientCreate1 {
|
|
6
6
|
schema_version: number;
|
|
7
7
|
location?: Chrt.LocationFeature | null;
|
|
8
|
+
geofence_distance_miles?: number;
|
|
8
9
|
action?: TaskClientCreate1.Action | null;
|
|
9
10
|
datetime_windows?: Chrt.DateTimeWindow1[];
|
|
10
11
|
order_placer_comments?: string | null;
|
|
@@ -39,6 +39,7 @@ export interface TaskGroup1 {
|
|
|
39
39
|
vehicle_type?: Chrt.VehicleTypeEnum | null;
|
|
40
40
|
mileage_estimated?: number | null;
|
|
41
41
|
mileage_observed?: number | null;
|
|
42
|
+
wait_time_total_minutes?: number | null;
|
|
42
43
|
mileage_asserted?: boolean;
|
|
43
44
|
flight_number?: string | null;
|
|
44
45
|
fa_flight_ids?: string[];
|
|
@@ -332,6 +332,7 @@ export * from "./TaskGroupTypeaheadFieldEnum.js";
|
|
|
332
332
|
export * from "./TaskGroupTypeaheadResult.js";
|
|
333
333
|
export * from "./TaskManifest1.js";
|
|
334
334
|
export * from "./TaskStatusEnum1.js";
|
|
335
|
+
export * from "./TaskWaitTimeGeofenceRes.js";
|
|
335
336
|
export * from "./TemplateRes.js";
|
|
336
337
|
export * from "./TimeBucket.js";
|
|
337
338
|
export * from "./TimeGranularity.js";
|
|
@@ -348,6 +348,7 @@ __exportStar(require("./TaskGroupTypeaheadFieldEnum.js"), exports);
|
|
|
348
348
|
__exportStar(require("./TaskGroupTypeaheadResult.js"), exports);
|
|
349
349
|
__exportStar(require("./TaskManifest1.js"), exports);
|
|
350
350
|
__exportStar(require("./TaskStatusEnum1.js"), exports);
|
|
351
|
+
__exportStar(require("./TaskWaitTimeGeofenceRes.js"), exports);
|
|
351
352
|
__exportStar(require("./TemplateRes.js"), exports);
|
|
352
353
|
__exportStar(require("./TimeBucket.js"), exports);
|
|
353
354
|
__exportStar(require("./TimeGranularity.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.692.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -20,8 +20,8 @@ export class ChrtClient {
|
|
|
20
20
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
21
21
|
"X-Fern-Language": "JavaScript",
|
|
22
22
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
23
|
-
"X-Fern-SDK-Version": "1.
|
|
24
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
23
|
+
"X-Fern-SDK-Version": "1.692.0",
|
|
24
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.692.0",
|
|
25
25
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
26
26
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
27
27
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -72,5 +72,19 @@ export declare class ComplianceDocuments {
|
|
|
72
72
|
*/
|
|
73
73
|
createV1(request: Chrt.orgs.OrgComplianceDocumentClientCreate1, requestOptions?: ComplianceDocuments.RequestOptions): core.HttpResponsePromise<Chrt.OrgComplianceDocument1>;
|
|
74
74
|
private __createV1;
|
|
75
|
+
/**
|
|
76
|
+
* Updates an organization compliance document for the caller's provider organization. | authz: allowed_org_types=[provider], min_org_role=administrator | (OrgComplianceDocumentClientUpdate1) -> (OrgComplianceDocument1)
|
|
77
|
+
*
|
|
78
|
+
* @param {string} orgComplianceDocumentId
|
|
79
|
+
* @param {Chrt.orgs.OrgComplianceDocumentClientUpdate1} request
|
|
80
|
+
* @param {ComplianceDocuments.RequestOptions} requestOptions - Request-specific configuration.
|
|
81
|
+
*
|
|
82
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* await client.orgs.complianceDocuments.updateV1("org_compliance_document_id")
|
|
86
|
+
*/
|
|
87
|
+
updateV1(orgComplianceDocumentId: string, request?: Chrt.orgs.OrgComplianceDocumentClientUpdate1, requestOptions?: ComplianceDocuments.RequestOptions): core.HttpResponsePromise<Chrt.OrgComplianceDocument1>;
|
|
88
|
+
private __updateV1;
|
|
75
89
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
76
90
|
}
|
|
@@ -199,6 +199,69 @@ export class ComplianceDocuments {
|
|
|
199
199
|
}
|
|
200
200
|
});
|
|
201
201
|
}
|
|
202
|
+
/**
|
|
203
|
+
* Updates an organization compliance document for the caller's provider organization. | authz: allowed_org_types=[provider], min_org_role=administrator | (OrgComplianceDocumentClientUpdate1) -> (OrgComplianceDocument1)
|
|
204
|
+
*
|
|
205
|
+
* @param {string} orgComplianceDocumentId
|
|
206
|
+
* @param {Chrt.orgs.OrgComplianceDocumentClientUpdate1} request
|
|
207
|
+
* @param {ComplianceDocuments.RequestOptions} requestOptions - Request-specific configuration.
|
|
208
|
+
*
|
|
209
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* await client.orgs.complianceDocuments.updateV1("org_compliance_document_id")
|
|
213
|
+
*/
|
|
214
|
+
updateV1(orgComplianceDocumentId, request = {}, requestOptions) {
|
|
215
|
+
return core.HttpResponsePromise.fromPromise(this.__updateV1(orgComplianceDocumentId, request, requestOptions));
|
|
216
|
+
}
|
|
217
|
+
__updateV1(orgComplianceDocumentId_1) {
|
|
218
|
+
return __awaiter(this, arguments, void 0, function* (orgComplianceDocumentId, request = {}, requestOptions) {
|
|
219
|
+
var _a, _b, _c, _d;
|
|
220
|
+
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);
|
|
221
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
222
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `orgs/compliance_documents/update/v1/${encodeURIComponent(orgComplianceDocumentId)}`),
|
|
223
|
+
method: "PATCH",
|
|
224
|
+
headers: _headers,
|
|
225
|
+
contentType: "application/json",
|
|
226
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
227
|
+
requestType: "json",
|
|
228
|
+
body: request,
|
|
229
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
230
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
231
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
232
|
+
});
|
|
233
|
+
if (_response.ok) {
|
|
234
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
235
|
+
}
|
|
236
|
+
if (_response.error.reason === "status-code") {
|
|
237
|
+
switch (_response.error.statusCode) {
|
|
238
|
+
case 422:
|
|
239
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
240
|
+
default:
|
|
241
|
+
throw new errors.ChrtError({
|
|
242
|
+
statusCode: _response.error.statusCode,
|
|
243
|
+
body: _response.error.body,
|
|
244
|
+
rawResponse: _response.rawResponse,
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
switch (_response.error.reason) {
|
|
249
|
+
case "non-json":
|
|
250
|
+
throw new errors.ChrtError({
|
|
251
|
+
statusCode: _response.error.statusCode,
|
|
252
|
+
body: _response.error.rawBody,
|
|
253
|
+
rawResponse: _response.rawResponse,
|
|
254
|
+
});
|
|
255
|
+
case "timeout":
|
|
256
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /orgs/compliance_documents/update/v1/{org_compliance_document_id}.");
|
|
257
|
+
case "unknown":
|
|
258
|
+
throw new errors.ChrtError({
|
|
259
|
+
message: _response.error.errorMessage,
|
|
260
|
+
rawResponse: _response.rawResponse,
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
}
|
|
202
265
|
_getAuthorizationHeader() {
|
|
203
266
|
return __awaiter(this, void 0, void 0, function* () {
|
|
204
267
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -12,6 +12,7 @@ import * as Chrt from "../../../../../../index.mjs";
|
|
|
12
12
|
export interface OrgComplianceDocumentClientCreate1 {
|
|
13
13
|
schema_version: number;
|
|
14
14
|
document_type: Chrt.OrgComplianceDocumentTypeEnum1;
|
|
15
|
+
description?: string | null;
|
|
15
16
|
valid_from?: string | null;
|
|
16
17
|
valid_until?: string | null;
|
|
17
18
|
}
|
|
@@ -76,5 +76,19 @@ export declare class ComplianceDocuments {
|
|
|
76
76
|
*/
|
|
77
77
|
createV1(driverId: string, request: Chrt.shipping.drivers.DriverComplianceDocumentClientCreate1, requestOptions?: ComplianceDocuments.RequestOptions): core.HttpResponsePromise<Chrt.DriverComplianceDocument1>;
|
|
78
78
|
private __createV1;
|
|
79
|
+
/**
|
|
80
|
+
* Updates a driver compliance document in the caller's provider organization. | authz: allowed_org_types=[provider], min_org_role=administrator | (DriverComplianceDocumentClientUpdate1) -> (DriverComplianceDocument1)
|
|
81
|
+
*
|
|
82
|
+
* @param {string} driverComplianceDocumentId
|
|
83
|
+
* @param {Chrt.shipping.drivers.DriverComplianceDocumentClientUpdate1} request
|
|
84
|
+
* @param {ComplianceDocuments.RequestOptions} requestOptions - Request-specific configuration.
|
|
85
|
+
*
|
|
86
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* await client.shipping.drivers.complianceDocuments.updateV1("driver_compliance_document_id")
|
|
90
|
+
*/
|
|
91
|
+
updateV1(driverComplianceDocumentId: string, request?: Chrt.shipping.drivers.DriverComplianceDocumentClientUpdate1, requestOptions?: ComplianceDocuments.RequestOptions): core.HttpResponsePromise<Chrt.DriverComplianceDocument1>;
|
|
92
|
+
private __updateV1;
|
|
79
93
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
80
94
|
}
|
|
@@ -208,6 +208,69 @@ export class ComplianceDocuments {
|
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* Updates a driver compliance document in the caller's provider organization. | authz: allowed_org_types=[provider], min_org_role=administrator | (DriverComplianceDocumentClientUpdate1) -> (DriverComplianceDocument1)
|
|
213
|
+
*
|
|
214
|
+
* @param {string} driverComplianceDocumentId
|
|
215
|
+
* @param {Chrt.shipping.drivers.DriverComplianceDocumentClientUpdate1} request
|
|
216
|
+
* @param {ComplianceDocuments.RequestOptions} requestOptions - Request-specific configuration.
|
|
217
|
+
*
|
|
218
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* await client.shipping.drivers.complianceDocuments.updateV1("driver_compliance_document_id")
|
|
222
|
+
*/
|
|
223
|
+
updateV1(driverComplianceDocumentId, request = {}, requestOptions) {
|
|
224
|
+
return core.HttpResponsePromise.fromPromise(this.__updateV1(driverComplianceDocumentId, request, requestOptions));
|
|
225
|
+
}
|
|
226
|
+
__updateV1(driverComplianceDocumentId_1) {
|
|
227
|
+
return __awaiter(this, arguments, void 0, function* (driverComplianceDocumentId, request = {}, requestOptions) {
|
|
228
|
+
var _a, _b, _c, _d;
|
|
229
|
+
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);
|
|
230
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
231
|
+
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/drivers/compliance_documents/update/v1/${encodeURIComponent(driverComplianceDocumentId)}`),
|
|
232
|
+
method: "PATCH",
|
|
233
|
+
headers: _headers,
|
|
234
|
+
contentType: "application/json",
|
|
235
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
236
|
+
requestType: "json",
|
|
237
|
+
body: request,
|
|
238
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
239
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
240
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
241
|
+
});
|
|
242
|
+
if (_response.ok) {
|
|
243
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
244
|
+
}
|
|
245
|
+
if (_response.error.reason === "status-code") {
|
|
246
|
+
switch (_response.error.statusCode) {
|
|
247
|
+
case 422:
|
|
248
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
249
|
+
default:
|
|
250
|
+
throw new errors.ChrtError({
|
|
251
|
+
statusCode: _response.error.statusCode,
|
|
252
|
+
body: _response.error.body,
|
|
253
|
+
rawResponse: _response.rawResponse,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
switch (_response.error.reason) {
|
|
258
|
+
case "non-json":
|
|
259
|
+
throw new errors.ChrtError({
|
|
260
|
+
statusCode: _response.error.statusCode,
|
|
261
|
+
body: _response.error.rawBody,
|
|
262
|
+
rawResponse: _response.rawResponse,
|
|
263
|
+
});
|
|
264
|
+
case "timeout":
|
|
265
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/drivers/compliance_documents/update/v1/{driver_compliance_document_id}.");
|
|
266
|
+
case "unknown":
|
|
267
|
+
throw new errors.ChrtError({
|
|
268
|
+
message: _response.error.errorMessage,
|
|
269
|
+
rawResponse: _response.rawResponse,
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
}
|
|
211
274
|
_getAuthorizationHeader() {
|
|
212
275
|
return __awaiter(this, void 0, void 0, function* () {
|
|
213
276
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -12,6 +12,7 @@ import * as Chrt from "../../../../../../../../index.mjs";
|
|
|
12
12
|
export interface DriverComplianceDocumentClientCreate1 {
|
|
13
13
|
schema_version: number;
|
|
14
14
|
document_type: Chrt.DriverComplianceDocumentTypeEnum1;
|
|
15
|
+
description?: string | null;
|
|
15
16
|
valid_from?: string | null;
|
|
16
17
|
valid_until?: string | null;
|
|
17
18
|
}
|
|
@@ -33,6 +33,72 @@ export declare class Tasks {
|
|
|
33
33
|
protected _executorOrgNotes: ExecutorOrgNotes | undefined;
|
|
34
34
|
constructor(_options?: Tasks.Options);
|
|
35
35
|
get executorOrgNotes(): ExecutorOrgNotes;
|
|
36
|
+
/**
|
|
37
|
+
* Checks whether the assigned driver's available location is inside the task wait-time geofence. | authz_personas=[driver_for_executor, executor_org_operators] | () -> (TaskWaitTimeGeofenceRes)
|
|
38
|
+
*
|
|
39
|
+
* @param {string} taskId
|
|
40
|
+
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
|
+
*
|
|
42
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* await client.shipping.tasks.waitTimeGeofenceV1("task_id")
|
|
46
|
+
*/
|
|
47
|
+
waitTimeGeofenceV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<Chrt.TaskWaitTimeGeofenceRes>;
|
|
48
|
+
private __waitTimeGeofenceV1;
|
|
49
|
+
/**
|
|
50
|
+
* Starts wait time for a task and records whether the assigned driver's available location is inside the geofence. | authz_personas=[driver_for_executor, executor_org_operators] | () -> (bool)
|
|
51
|
+
*
|
|
52
|
+
* @param {string} taskId
|
|
53
|
+
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
|
+
*
|
|
55
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* await client.shipping.tasks.waitTimeStartV1("task_id")
|
|
59
|
+
*/
|
|
60
|
+
waitTimeStartV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
61
|
+
private __waitTimeStartV1;
|
|
62
|
+
/**
|
|
63
|
+
* Ends an active wait-time session for a task. | authz_personas=[driver_for_executor, executor_org_operators] | () -> (bool)
|
|
64
|
+
*
|
|
65
|
+
* @param {string} taskId
|
|
66
|
+
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* await client.shipping.tasks.waitTimeEndV1("task_id")
|
|
72
|
+
*/
|
|
73
|
+
waitTimeEndV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
74
|
+
private __waitTimeEndV1;
|
|
75
|
+
/**
|
|
76
|
+
* Validates wait time for a task. | authz_personas=[executor_org_operators] | () -> (bool)
|
|
77
|
+
*
|
|
78
|
+
* @param {string} taskId
|
|
79
|
+
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
80
|
+
*
|
|
81
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* await client.shipping.tasks.waitTimeValidateV1("task_id")
|
|
85
|
+
*/
|
|
86
|
+
waitTimeValidateV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
87
|
+
private __waitTimeValidateV1;
|
|
88
|
+
/**
|
|
89
|
+
* Overrides wait-time timestamps or geofence distance for a task. | authz_personas=[executor_org_operators] | (WaitTimeOverrideReq) -> (bool)
|
|
90
|
+
*
|
|
91
|
+
* @param {string} taskId
|
|
92
|
+
* @param {Chrt.shipping.WaitTimeOverrideReq} request
|
|
93
|
+
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
94
|
+
*
|
|
95
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* await client.shipping.tasks.waitTimeOverrideV1("task_id")
|
|
99
|
+
*/
|
|
100
|
+
waitTimeOverrideV1(taskId: string, request?: Chrt.shipping.WaitTimeOverrideReq, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
101
|
+
private __waitTimeOverrideV1;
|
|
36
102
|
/**
|
|
37
103
|
* Adds a new task to a task group at a specific index. | authz_personas=[lig_owner_operators] | (AddTaskToGroupReq) -> (PydanticObjectId)
|
|
38
104
|
*
|