@chrt-inc/typescript-sdk 1.675.0 → 1.681.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/flights/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/flights/client/Client.js +1 -1
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/client/Client.js +3 -3
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.js +3 -3
- package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.js +1 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.js +1 -1
- package/dist/cjs/api/resources/shipping/resources/tasks/client/Client.d.ts +18 -2
- package/dist/cjs/api/resources/shipping/resources/tasks/client/Client.js +66 -2
- package/dist/cjs/api/resources/shipping/resources/tasks/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/index.js +1 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/Client.d.ts +50 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/Client.js +133 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/index.js +17 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/requests/AddExecutorOrgNoteReq.d.ts +13 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/requests/AddExecutorOrgNoteReq.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/resources/executorOrgNotes/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/resources/executorOrgNotes/index.js +17 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/tasks/resources/index.js +41 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.d.ts +8 -8
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +8 -8
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.js +1 -1
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.d.ts +6 -6
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.js +6 -6
- package/dist/cjs/api/resources/tracking/resources/sharingSettings/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/tracking/resources/sharingSettings/client/Client.js +3 -3
- package/dist/cjs/api/resources/tracking/resources/timeseries/resources/cargoByDevice/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/tracking/resources/timeseries/resources/cargoByDevice/client/Client.js +3 -3
- package/dist/cjs/api/resources/tracking/resources/timeseries/resources/cargoByDriver/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/tracking/resources/timeseries/resources/cargoByDriver/client/Client.js +2 -2
- package/dist/cjs/api/resources/tracking/resources/timeseries/resources/sessionByDevice/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/tracking/resources/timeseries/resources/sessionByDevice/client/Client.js +1 -1
- package/dist/cjs/api/resources/tracking/resources/timeseries/resources/taskGroupByDriver/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/tracking/resources/timeseries/resources/taskGroupByDriver/client/Client.js +2 -2
- package/dist/cjs/api/types/ListingListingDriverInvitedToBidWebhookPayload.d.ts +16 -0
- package/dist/cjs/api/types/ListingListingDriverInvitedToBidWebhookPayload.js +5 -0
- package/dist/cjs/api/types/ListingListingProviderInvitedToBidWebhookPayload.d.ts +16 -0
- package/dist/cjs/api/types/ListingListingProviderInvitedToBidWebhookPayload.js +5 -0
- package/dist/cjs/api/types/NotificationEventsForOrgsEnum.d.ts +5 -1
- package/dist/cjs/api/types/NotificationEventsForOrgsEnum.js +4 -0
- package/dist/cjs/api/types/NotificationEventsForUsersEnum.d.ts +4 -1
- package/dist/cjs/api/types/NotificationEventsForUsersEnum.js +3 -0
- package/dist/cjs/api/types/OperationsCaseGroupAssignedWebhookPayload.d.ts +16 -0
- package/dist/cjs/api/types/OperationsCaseGroupAssignedWebhookPayload.js +5 -0
- package/dist/cjs/api/types/OperationsCaseOperatorAssignedWebhookPayload.d.ts +14 -0
- package/dist/cjs/api/types/OperationsCaseOperatorAssignedWebhookPayload.js +5 -0
- package/dist/cjs/api/types/Task1.d.ts +2 -0
- package/dist/cjs/api/types/TaskExecutorOrgNote1.d.ts +11 -0
- package/dist/cjs/api/types/TaskExecutorOrgNote1.js +5 -0
- package/dist/cjs/api/types/TaskStatusEnum1.d.ts +2 -1
- package/dist/cjs/api/types/TaskStatusEnum1.js +1 -0
- package/dist/cjs/api/types/index.d.ts +5 -0
- package/dist/cjs/api/types/index.js +5 -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/flights/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/flights/client/Client.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/client/Client.mjs +3 -3
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.mjs +3 -3
- package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/tasks/client/Client.d.mts +18 -2
- package/dist/esm/api/resources/shipping/resources/tasks/client/Client.mjs +66 -2
- package/dist/esm/api/resources/shipping/resources/tasks/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/tasks/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/Client.d.mts +50 -0
- package/dist/esm/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/Client.mjs +96 -0
- package/dist/esm/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/index.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/requests/AddExecutorOrgNoteReq.d.mts +13 -0
- package/dist/esm/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/requests/AddExecutorOrgNoteReq.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/tasks/resources/executorOrgNotes/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/tasks/resources/executorOrgNotes/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/tasks/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/tasks/resources/index.mjs +2 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +8 -8
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +8 -8
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.mjs +1 -1
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.d.mts +6 -6
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.mjs +6 -6
- package/dist/esm/api/resources/tracking/resources/sharingSettings/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/tracking/resources/sharingSettings/client/Client.mjs +3 -3
- package/dist/esm/api/resources/tracking/resources/timeseries/resources/cargoByDevice/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/tracking/resources/timeseries/resources/cargoByDevice/client/Client.mjs +3 -3
- package/dist/esm/api/resources/tracking/resources/timeseries/resources/cargoByDriver/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/tracking/resources/timeseries/resources/cargoByDriver/client/Client.mjs +2 -2
- package/dist/esm/api/resources/tracking/resources/timeseries/resources/sessionByDevice/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tracking/resources/timeseries/resources/sessionByDevice/client/Client.mjs +1 -1
- package/dist/esm/api/resources/tracking/resources/timeseries/resources/taskGroupByDriver/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/tracking/resources/timeseries/resources/taskGroupByDriver/client/Client.mjs +2 -2
- package/dist/esm/api/types/ListingListingDriverInvitedToBidWebhookPayload.d.mts +16 -0
- package/dist/esm/api/types/ListingListingDriverInvitedToBidWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/ListingListingProviderInvitedToBidWebhookPayload.d.mts +16 -0
- package/dist/esm/api/types/ListingListingProviderInvitedToBidWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/NotificationEventsForOrgsEnum.d.mts +5 -1
- package/dist/esm/api/types/NotificationEventsForOrgsEnum.mjs +4 -0
- package/dist/esm/api/types/NotificationEventsForUsersEnum.d.mts +4 -1
- package/dist/esm/api/types/NotificationEventsForUsersEnum.mjs +3 -0
- package/dist/esm/api/types/OperationsCaseGroupAssignedWebhookPayload.d.mts +16 -0
- package/dist/esm/api/types/OperationsCaseGroupAssignedWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/OperationsCaseOperatorAssignedWebhookPayload.d.mts +14 -0
- package/dist/esm/api/types/OperationsCaseOperatorAssignedWebhookPayload.mjs +4 -0
- package/dist/esm/api/types/Task1.d.mts +2 -0
- package/dist/esm/api/types/TaskExecutorOrgNote1.d.mts +11 -0
- package/dist/esm/api/types/TaskExecutorOrgNote1.mjs +4 -0
- package/dist/esm/api/types/TaskStatusEnum1.d.mts +2 -1
- package/dist/esm/api/types/TaskStatusEnum1.mjs +1 -0
- package/dist/esm/api/types/index.d.mts +5 -0
- package/dist/esm/api/types/index.mjs +5 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +175 -37
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Order events: via `order.created_by_user_id`
|
|
9
9
|
* - TaskGroup events: via `task_group.driver_id`
|
|
10
10
|
*/
|
|
11
|
-
export type NotificationEventsForUsersEnum = "shipping.order.staged" | "shipping.order.completed" | "shipping.order.cancelled" | "shipping.task_group.driver_assigned" | "shipping.task_group.message" | "shipping.task_group.tasks_ordering_updated" | "shipping.task_group.flight_info_updated";
|
|
11
|
+
export type NotificationEventsForUsersEnum = "shipping.order.staged" | "shipping.order.completed" | "shipping.order.cancelled" | "shipping.task_group.driver_assigned" | "shipping.task_group.message" | "shipping.task_group.tasks_ordering_updated" | "shipping.task_group.flight_info_updated" | "listing.listing.driver_invited_to_bid" | "operations.case.operator_assigned" | "operations.case.group_assigned";
|
|
12
12
|
export declare const NotificationEventsForUsersEnum: {
|
|
13
13
|
readonly ShippingOrderStaged: "shipping.order.staged";
|
|
14
14
|
readonly ShippingOrderCompleted: "shipping.order.completed";
|
|
@@ -17,4 +17,7 @@ export declare const NotificationEventsForUsersEnum: {
|
|
|
17
17
|
readonly ShippingTaskGroupMessage: "shipping.task_group.message";
|
|
18
18
|
readonly ShippingTaskGroupTasksOrderingUpdated: "shipping.task_group.tasks_ordering_updated";
|
|
19
19
|
readonly ShippingTaskGroupFlightInfoUpdated: "shipping.task_group.flight_info_updated";
|
|
20
|
+
readonly ListingListingDriverInvitedToBid: "listing.listing.driver_invited_to_bid";
|
|
21
|
+
readonly OperationsCaseOperatorAssigned: "operations.case.operator_assigned";
|
|
22
|
+
readonly OperationsCaseGroupAssigned: "operations.case.group_assigned";
|
|
20
23
|
};
|
|
@@ -12,4 +12,7 @@ exports.NotificationEventsForUsersEnum = {
|
|
|
12
12
|
ShippingTaskGroupMessage: "shipping.task_group.message",
|
|
13
13
|
ShippingTaskGroupTasksOrderingUpdated: "shipping.task_group.tasks_ordering_updated",
|
|
14
14
|
ShippingTaskGroupFlightInfoUpdated: "shipping.task_group.flight_info_updated",
|
|
15
|
+
ListingListingDriverInvitedToBid: "listing.listing.driver_invited_to_bid",
|
|
16
|
+
OperationsCaseOperatorAssigned: "operations.case.operator_assigned",
|
|
17
|
+
OperationsCaseGroupAssigned: "operations.case.group_assigned",
|
|
15
18
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface OperationsCaseGroupAssignedWebhookPayload {
|
|
5
|
+
event_type?: "operations.case.group_assigned";
|
|
6
|
+
/** UTC timestamp when the event occurred */
|
|
7
|
+
event_timestamp: string;
|
|
8
|
+
/** The case that was assigned to a group */
|
|
9
|
+
case_id: string;
|
|
10
|
+
/** The order associated with the case */
|
|
11
|
+
order_id: string;
|
|
12
|
+
/** The department the case was assigned to */
|
|
13
|
+
department_id: string;
|
|
14
|
+
/** Operators in the assigned department */
|
|
15
|
+
operator_user_ids: string[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface OperationsCaseOperatorAssignedWebhookPayload {
|
|
5
|
+
event_type?: "operations.case.operator_assigned";
|
|
6
|
+
/** UTC timestamp when the event occurred */
|
|
7
|
+
event_timestamp: string;
|
|
8
|
+
/** The case that was assigned */
|
|
9
|
+
case_id: string;
|
|
10
|
+
/** The order associated with the case */
|
|
11
|
+
order_id: string;
|
|
12
|
+
/** Operators assigned to the case */
|
|
13
|
+
operator_user_ids: string[];
|
|
14
|
+
}
|
|
@@ -26,11 +26,13 @@ export interface Task1 {
|
|
|
26
26
|
completed_by_user_id?: string | null;
|
|
27
27
|
cargo_ids?: string[];
|
|
28
28
|
task_artifact_ids?: string[];
|
|
29
|
+
executor_org_notes?: Chrt.TaskExecutorOrgNote1[];
|
|
29
30
|
status?: Chrt.TaskStatusEnum1;
|
|
30
31
|
draft_started_at_timestamp: string;
|
|
31
32
|
staged_at_timestamp?: string | null;
|
|
32
33
|
completed_at_timestamp?: string | null;
|
|
33
34
|
skipped_at_timestamp?: string | null;
|
|
35
|
+
attempted_at_timestamp?: string | null;
|
|
34
36
|
exception_at_timestamp?: string | null;
|
|
35
37
|
order_cancelled?: boolean;
|
|
36
38
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface TaskExecutorOrgNote1 {
|
|
5
|
+
note: string;
|
|
6
|
+
/** Must be a string starting with `user_` */
|
|
7
|
+
user_id: string;
|
|
8
|
+
/** Must be a string starting with `org_` */
|
|
9
|
+
org_id: string;
|
|
10
|
+
timestamp: string;
|
|
11
|
+
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type TaskStatusEnum1 = "draft" | "staged" | "completed" | "skipped" | "exception";
|
|
4
|
+
export type TaskStatusEnum1 = "draft" | "staged" | "completed" | "skipped" | "attempt" | "exception";
|
|
5
5
|
export declare const TaskStatusEnum1: {
|
|
6
6
|
readonly Draft: "draft";
|
|
7
7
|
readonly Staged: "staged";
|
|
8
8
|
readonly Completed: "completed";
|
|
9
9
|
readonly Skipped: "skipped";
|
|
10
|
+
readonly Attempt: "attempt";
|
|
10
11
|
readonly Exception: "exception";
|
|
11
12
|
};
|
|
@@ -155,6 +155,8 @@ export * from "./ListingForBidder1.js";
|
|
|
155
155
|
export * from "./ListingForBidderListRes.js";
|
|
156
156
|
export * from "./ListingLimitedForBidder1.js";
|
|
157
157
|
export * from "./ListingListRes.js";
|
|
158
|
+
export * from "./ListingListingDriverInvitedToBidWebhookPayload.js";
|
|
159
|
+
export * from "./ListingListingProviderInvitedToBidWebhookPayload.js";
|
|
158
160
|
export * from "./ListingSortByEnum.js";
|
|
159
161
|
export * from "./ListingStatusEnum.js";
|
|
160
162
|
export * from "./ListingTaskForBidder1.js";
|
|
@@ -184,6 +186,8 @@ export * from "./OffChrtShipperOrgListRes.js";
|
|
|
184
186
|
export * from "./OnboardCourierRateSheet1.js";
|
|
185
187
|
export * from "./OnboardCourierRateSheetListRes.js";
|
|
186
188
|
export * from "./OnboardCourierTaskActionEnum1.js";
|
|
189
|
+
export * from "./OperationsCaseGroupAssignedWebhookPayload.js";
|
|
190
|
+
export * from "./OperationsCaseOperatorAssignedWebhookPayload.js";
|
|
187
191
|
export * from "./Order1.js";
|
|
188
192
|
export * from "./OrderAndTaskGroupExpandedReq.js";
|
|
189
193
|
export * from "./OrderBuilderReq.js";
|
|
@@ -296,6 +300,7 @@ export * from "./TaskArtifactStatusEnum1.js";
|
|
|
296
300
|
export * from "./TaskArtifactTypeEnum1.js";
|
|
297
301
|
export * from "./TaskClientCreate1.js";
|
|
298
302
|
export * from "./TaskClientUpdate1.js";
|
|
303
|
+
export * from "./TaskExecutorOrgNote1.js";
|
|
299
304
|
export * from "./TaskExpanded.js";
|
|
300
305
|
export * from "./TaskGroup1.js";
|
|
301
306
|
export * from "./TaskGroupByDriverDataPoint1.js";
|
|
@@ -171,6 +171,8 @@ __exportStar(require("./ListingForBidder1.js"), exports);
|
|
|
171
171
|
__exportStar(require("./ListingForBidderListRes.js"), exports);
|
|
172
172
|
__exportStar(require("./ListingLimitedForBidder1.js"), exports);
|
|
173
173
|
__exportStar(require("./ListingListRes.js"), exports);
|
|
174
|
+
__exportStar(require("./ListingListingDriverInvitedToBidWebhookPayload.js"), exports);
|
|
175
|
+
__exportStar(require("./ListingListingProviderInvitedToBidWebhookPayload.js"), exports);
|
|
174
176
|
__exportStar(require("./ListingSortByEnum.js"), exports);
|
|
175
177
|
__exportStar(require("./ListingStatusEnum.js"), exports);
|
|
176
178
|
__exportStar(require("./ListingTaskForBidder1.js"), exports);
|
|
@@ -200,6 +202,8 @@ __exportStar(require("./OffChrtShipperOrgListRes.js"), exports);
|
|
|
200
202
|
__exportStar(require("./OnboardCourierRateSheet1.js"), exports);
|
|
201
203
|
__exportStar(require("./OnboardCourierRateSheetListRes.js"), exports);
|
|
202
204
|
__exportStar(require("./OnboardCourierTaskActionEnum1.js"), exports);
|
|
205
|
+
__exportStar(require("./OperationsCaseGroupAssignedWebhookPayload.js"), exports);
|
|
206
|
+
__exportStar(require("./OperationsCaseOperatorAssignedWebhookPayload.js"), exports);
|
|
203
207
|
__exportStar(require("./Order1.js"), exports);
|
|
204
208
|
__exportStar(require("./OrderAndTaskGroupExpandedReq.js"), exports);
|
|
205
209
|
__exportStar(require("./OrderBuilderReq.js"), exports);
|
|
@@ -312,6 +316,7 @@ __exportStar(require("./TaskArtifactStatusEnum1.js"), exports);
|
|
|
312
316
|
__exportStar(require("./TaskArtifactTypeEnum1.js"), exports);
|
|
313
317
|
__exportStar(require("./TaskClientCreate1.js"), exports);
|
|
314
318
|
__exportStar(require("./TaskClientUpdate1.js"), exports);
|
|
319
|
+
__exportStar(require("./TaskExecutorOrgNote1.js"), exports);
|
|
315
320
|
__exportStar(require("./TaskExpanded.js"), exports);
|
|
316
321
|
__exportStar(require("./TaskGroup1.js"), exports);
|
|
317
322
|
__exportStar(require("./TaskGroupByDriverDataPoint1.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.681.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.681.0",
|
|
24
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.681.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) });
|
|
@@ -31,7 +31,7 @@ export declare class Flights {
|
|
|
31
31
|
protected readonly _options: Flights.Options;
|
|
32
32
|
constructor(_options?: Flights.Options);
|
|
33
33
|
/**
|
|
34
|
-
* Returns flight info from an adjacent FLIGHT task group for TENDER_TO_AIRLINE or RECOVER_FROM_AIRLINE tasks. | authz_personas=[
|
|
34
|
+
* Returns flight info from an adjacent FLIGHT task group for TENDER_TO_AIRLINE or RECOVER_FROM_AIRLINE tasks. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (FlightInfoForTaskRes)
|
|
35
35
|
*
|
|
36
36
|
* @param {string} taskId
|
|
37
37
|
* @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -20,7 +20,7 @@ export class Flights {
|
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Returns flight info from an adjacent FLIGHT task group for TENDER_TO_AIRLINE or RECOVER_FROM_AIRLINE tasks. | authz_personas=[
|
|
23
|
+
* Returns flight info from an adjacent FLIGHT task group for TENDER_TO_AIRLINE or RECOVER_FROM_AIRLINE tasks. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (FlightInfoForTaskRes)
|
|
24
24
|
*
|
|
25
25
|
* @param {string} taskId
|
|
26
26
|
* @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -34,7 +34,7 @@ export declare class TaskArtifacts {
|
|
|
34
34
|
constructor(_options?: TaskArtifacts.Options);
|
|
35
35
|
get s3Object(): S3Object;
|
|
36
36
|
/**
|
|
37
|
-
* Adds a new task artifact to a task. | authz_personas=[
|
|
37
|
+
* Adds a new task artifact to a task. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators] | (AddTaskArtifactReq) -> (PydanticObjectId)
|
|
38
38
|
*
|
|
39
39
|
* @param {string} taskId
|
|
40
40
|
* @param {Chrt.shipping.AddTaskArtifactReq} request
|
|
@@ -54,7 +54,7 @@ export declare class TaskArtifacts {
|
|
|
54
54
|
addToTaskV1(taskId: string, request: Chrt.shipping.AddTaskArtifactReq, requestOptions?: TaskArtifacts.RequestOptions): core.HttpResponsePromise<string>;
|
|
55
55
|
private __addToTaskV1;
|
|
56
56
|
/**
|
|
57
|
-
* Marks a task artifact as COMPLETED. | authz_personas=[
|
|
57
|
+
* Marks a task artifact as COMPLETED. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators] | () -> (bool)
|
|
58
58
|
*
|
|
59
59
|
* @param {string} taskArtifactId
|
|
60
60
|
* @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -67,7 +67,7 @@ export declare class TaskArtifacts {
|
|
|
67
67
|
completeV1(taskArtifactId: string, requestOptions?: TaskArtifacts.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
68
68
|
private __completeV1;
|
|
69
69
|
/**
|
|
70
|
-
* Marks a task artifact as SKIPPED. | authz_personas=[
|
|
70
|
+
* Marks a task artifact as SKIPPED. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators] | () -> (bool)
|
|
71
71
|
*
|
|
72
72
|
* @param {string} taskArtifactId
|
|
73
73
|
* @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -25,7 +25,7 @@ export class TaskArtifacts {
|
|
|
25
25
|
return ((_a = this._s3Object) !== null && _a !== void 0 ? _a : (this._s3Object = new S3Object(this._options)));
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
* Adds a new task artifact to a task. | authz_personas=[
|
|
28
|
+
* Adds a new task artifact to a task. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators] | (AddTaskArtifactReq) -> (PydanticObjectId)
|
|
29
29
|
*
|
|
30
30
|
* @param {string} taskId
|
|
31
31
|
* @param {Chrt.shipping.AddTaskArtifactReq} request
|
|
@@ -94,7 +94,7 @@ export class TaskArtifacts {
|
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
|
-
* Marks a task artifact as COMPLETED. | authz_personas=[
|
|
97
|
+
* Marks a task artifact as COMPLETED. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators] | () -> (bool)
|
|
98
98
|
*
|
|
99
99
|
* @param {string} taskArtifactId
|
|
100
100
|
* @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -153,7 +153,7 @@ export class TaskArtifacts {
|
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
/**
|
|
156
|
-
* Marks a task artifact as SKIPPED. | authz_personas=[
|
|
156
|
+
* Marks a task artifact as SKIPPED. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators] | () -> (bool)
|
|
157
157
|
*
|
|
158
158
|
* @param {string} taskArtifactId
|
|
159
159
|
* @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -31,7 +31,7 @@ export declare class S3Object {
|
|
|
31
31
|
protected readonly _options: S3Object.Options;
|
|
32
32
|
constructor(_options?: S3Object.Options);
|
|
33
33
|
/**
|
|
34
|
-
* Retrieves the metadata for a task artifact S3 object, including blurhash for placeholder loading. | authz_personas=[
|
|
34
|
+
* Retrieves the metadata for a task artifact S3 object, including blurhash for placeholder loading. | authz_personas=[driver_for_executor, executor_org_operators, shipper_org_operators, coordinator_org_operators] | () -> (TaskArtifactS3ObjectMetadata1)
|
|
35
35
|
*
|
|
36
36
|
* @param {string} taskArtifactS3ObjectMetadataId
|
|
37
37
|
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -44,13 +44,13 @@ export declare class S3Object {
|
|
|
44
44
|
getS3ObjectMetadataV1(taskArtifactS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<Chrt.TaskArtifactS3ObjectMetadata1>;
|
|
45
45
|
private __getS3ObjectMetadataV1;
|
|
46
46
|
/**
|
|
47
|
-
* Streams a task artifact S3 object file from storage. | authz_personas=[
|
|
47
|
+
* Streams a task artifact S3 object file from storage. | authz_personas=[driver_for_executor, executor_org_operators, shipper_org_operators, coordinator_org_operators] | () -> (binary)
|
|
48
48
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
49
49
|
*/
|
|
50
50
|
getV1(taskArtifactS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
51
51
|
private __getV1;
|
|
52
52
|
/**
|
|
53
|
-
* Uploads a file (image, PDF, etc.) to a task artifact. Automatic blurhash generation for images. | authz_personas=[
|
|
53
|
+
* Uploads a file (image, PDF, etc.) to a task artifact. Automatic blurhash generation for images. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | (UploadFile) -> (bool)
|
|
54
54
|
*
|
|
55
55
|
* @param {string} taskArtifactId
|
|
56
56
|
* @param {Chrt.shipping.taskArtifacts.BodyPostTaskArtifactsS3ObjectAddV1ShippingTaskArtifactsS3ObjectAddV1TaskArtifactIdPost} request
|
package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.mjs
CHANGED
|
@@ -20,7 +20,7 @@ export class S3Object {
|
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Retrieves the metadata for a task artifact S3 object, including blurhash for placeholder loading. | authz_personas=[
|
|
23
|
+
* Retrieves the metadata for a task artifact S3 object, including blurhash for placeholder loading. | authz_personas=[driver_for_executor, executor_org_operators, shipper_org_operators, coordinator_org_operators] | () -> (TaskArtifactS3ObjectMetadata1)
|
|
24
24
|
*
|
|
25
25
|
* @param {string} taskArtifactS3ObjectMetadataId
|
|
26
26
|
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -79,7 +79,7 @@ export class S3Object {
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
|
-
* Streams a task artifact S3 object file from storage. | authz_personas=[
|
|
82
|
+
* Streams a task artifact S3 object file from storage. | authz_personas=[driver_for_executor, executor_org_operators, shipper_org_operators, coordinator_org_operators] | () -> (binary)
|
|
83
83
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
84
84
|
*/
|
|
85
85
|
getV1(taskArtifactS3ObjectMetadataId, requestOptions) {
|
|
@@ -132,7 +132,7 @@ export class S3Object {
|
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
/**
|
|
135
|
-
* Uploads a file (image, PDF, etc.) to a task artifact. Automatic blurhash generation for images. | authz_personas=[
|
|
135
|
+
* Uploads a file (image, PDF, etc.) to a task artifact. Automatic blurhash generation for images. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | (UploadFile) -> (bool)
|
|
136
136
|
*
|
|
137
137
|
* @param {string} taskArtifactId
|
|
138
138
|
* @param {Chrt.shipping.taskArtifacts.BodyPostTaskArtifactsS3ObjectAddV1ShippingTaskArtifactsS3ObjectAddV1TaskArtifactIdPost} request
|
|
@@ -139,7 +139,7 @@ export declare class TaskGroups {
|
|
|
139
139
|
setFlightInfoV1(taskGroupId: string, request: Chrt.SetFlightInfoReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
140
140
|
private __setFlightInfoV1;
|
|
141
141
|
/**
|
|
142
|
-
* Adds a message to a task group's message log. | authz_personas=[
|
|
142
|
+
* Adds a message to a task group's message log. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators, shipper_org_operators] | (AddMessageReq) -> (bool)
|
|
143
143
|
*
|
|
144
144
|
* @param {string} taskGroupId
|
|
145
145
|
* @param {Chrt.shipping.AddMessageReq} request
|
|
@@ -468,7 +468,7 @@ export class TaskGroups {
|
|
|
468
468
|
});
|
|
469
469
|
}
|
|
470
470
|
/**
|
|
471
|
-
* Adds a message to a task group's message log. | authz_personas=[
|
|
471
|
+
* Adds a message to a task group's message log. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators, shipper_org_operators] | (AddMessageReq) -> (bool)
|
|
472
472
|
*
|
|
473
473
|
* @param {string} taskGroupId
|
|
474
474
|
* @param {Chrt.shipping.AddMessageReq} request
|
package/dist/esm/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.d.mts
CHANGED
|
@@ -50,7 +50,7 @@ export declare class S3Object {
|
|
|
50
50
|
getV1(taskGroupS3ObjectMetadataId: string, requestOptions?: S3Object.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
51
51
|
private __getV1;
|
|
52
52
|
/**
|
|
53
|
-
* Uploads a file (image, PDF, etc.) to a task group. Automatic blurhash generation for images. | authz_personas=[
|
|
53
|
+
* Uploads a file (image, PDF, etc.) to a task group. Automatic blurhash generation for images. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators, shipper_org_operators] | (UploadFile) -> (bool)
|
|
54
54
|
*
|
|
55
55
|
* @param {string} taskGroupId
|
|
56
56
|
* @param {Chrt.shipping.taskGroups.BodyPostTaskGroupsS3ObjectAddV1ShippingTaskGroupsS3ObjectAddV1TaskGroupIdPost} request
|
package/dist/esm/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.mjs
CHANGED
|
@@ -132,7 +132,7 @@ export class S3Object {
|
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
/**
|
|
135
|
-
* Uploads a file (image, PDF, etc.) to a task group. Automatic blurhash generation for images. | authz_personas=[
|
|
135
|
+
* Uploads a file (image, PDF, etc.) to a task group. Automatic blurhash generation for images. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators, shipper_org_operators] | (UploadFile) -> (bool)
|
|
136
136
|
*
|
|
137
137
|
* @param {string} taskGroupId
|
|
138
138
|
* @param {Chrt.shipping.taskGroups.BodyPostTaskGroupsS3ObjectAddV1ShippingTaskGroupsS3ObjectAddV1TaskGroupIdPost} request
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as environments from "../../../../../../environments.mjs";
|
|
5
5
|
import * as core from "../../../../../../core/index.mjs";
|
|
6
6
|
import * as Chrt from "../../../../../index.mjs";
|
|
7
|
+
import { ExecutorOrgNotes } from "../resources/executorOrgNotes/client/Client.mjs";
|
|
7
8
|
export declare namespace Tasks {
|
|
8
9
|
interface Options {
|
|
9
10
|
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
@@ -29,7 +30,9 @@ export declare namespace Tasks {
|
|
|
29
30
|
}
|
|
30
31
|
export declare class Tasks {
|
|
31
32
|
protected readonly _options: Tasks.Options;
|
|
33
|
+
protected _executorOrgNotes: ExecutorOrgNotes | undefined;
|
|
32
34
|
constructor(_options?: Tasks.Options);
|
|
35
|
+
get executorOrgNotes(): ExecutorOrgNotes;
|
|
33
36
|
/**
|
|
34
37
|
* Adds a new task to a task group at a specific index. | authz_personas=[lig_owner_operators] | (AddTaskToGroupReq) -> (PydanticObjectId)
|
|
35
38
|
*
|
|
@@ -65,7 +68,7 @@ export declare class Tasks {
|
|
|
65
68
|
updateV1(taskId: string, request: Chrt.TaskClientUpdate1, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<string>;
|
|
66
69
|
private __updateV1;
|
|
67
70
|
/**
|
|
68
|
-
* Marks a task as COMPLETED. | authz_personas=[
|
|
71
|
+
* Marks a task as COMPLETED. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
|
|
69
72
|
*
|
|
70
73
|
* @param {string} taskId
|
|
71
74
|
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -78,7 +81,7 @@ export declare class Tasks {
|
|
|
78
81
|
completeV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
79
82
|
private __completeV1;
|
|
80
83
|
/**
|
|
81
|
-
* Marks a task as SKIPPED. | authz_personas=[
|
|
84
|
+
* Marks a task as SKIPPED. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
|
|
82
85
|
*
|
|
83
86
|
* @param {string} taskId
|
|
84
87
|
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -90,6 +93,19 @@ export declare class Tasks {
|
|
|
90
93
|
*/
|
|
91
94
|
skipV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
92
95
|
private __skipV1;
|
|
96
|
+
/**
|
|
97
|
+
* Marks a task as ATTEMPT. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
|
|
98
|
+
*
|
|
99
|
+
* @param {string} taskId
|
|
100
|
+
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
101
|
+
*
|
|
102
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* await client.shipping.tasks.attemptV1("task_id")
|
|
106
|
+
*/
|
|
107
|
+
attemptV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
108
|
+
private __attemptV1;
|
|
93
109
|
/**
|
|
94
110
|
* Deletes a task. Task must be in STAGED status. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
95
111
|
*
|
|
@@ -15,10 +15,15 @@ import * as core from "../../../../../../core/index.mjs";
|
|
|
15
15
|
import * as Chrt from "../../../../../index.mjs";
|
|
16
16
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
17
17
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
18
|
+
import { ExecutorOrgNotes } from "../resources/executorOrgNotes/client/Client.mjs";
|
|
18
19
|
export class Tasks {
|
|
19
20
|
constructor(_options = {}) {
|
|
20
21
|
this._options = _options;
|
|
21
22
|
}
|
|
23
|
+
get executorOrgNotes() {
|
|
24
|
+
var _a;
|
|
25
|
+
return ((_a = this._executorOrgNotes) !== null && _a !== void 0 ? _a : (this._executorOrgNotes = new ExecutorOrgNotes(this._options)));
|
|
26
|
+
}
|
|
22
27
|
/**
|
|
23
28
|
* Adds a new task to a task group at a specific index. | authz_personas=[lig_owner_operators] | (AddTaskToGroupReq) -> (PydanticObjectId)
|
|
24
29
|
*
|
|
@@ -152,7 +157,7 @@ export class Tasks {
|
|
|
152
157
|
});
|
|
153
158
|
}
|
|
154
159
|
/**
|
|
155
|
-
* Marks a task as COMPLETED. | authz_personas=[
|
|
160
|
+
* Marks a task as COMPLETED. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
|
|
156
161
|
*
|
|
157
162
|
* @param {string} taskId
|
|
158
163
|
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -211,7 +216,7 @@ export class Tasks {
|
|
|
211
216
|
});
|
|
212
217
|
}
|
|
213
218
|
/**
|
|
214
|
-
* Marks a task as SKIPPED. | authz_personas=[
|
|
219
|
+
* Marks a task as SKIPPED. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
|
|
215
220
|
*
|
|
216
221
|
* @param {string} taskId
|
|
217
222
|
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -269,6 +274,65 @@ export class Tasks {
|
|
|
269
274
|
}
|
|
270
275
|
});
|
|
271
276
|
}
|
|
277
|
+
/**
|
|
278
|
+
* Marks a task as ATTEMPT. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
|
|
279
|
+
*
|
|
280
|
+
* @param {string} taskId
|
|
281
|
+
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
282
|
+
*
|
|
283
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
284
|
+
*
|
|
285
|
+
* @example
|
|
286
|
+
* await client.shipping.tasks.attemptV1("task_id")
|
|
287
|
+
*/
|
|
288
|
+
attemptV1(taskId, requestOptions) {
|
|
289
|
+
return core.HttpResponsePromise.fromPromise(this.__attemptV1(taskId, requestOptions));
|
|
290
|
+
}
|
|
291
|
+
__attemptV1(taskId, requestOptions) {
|
|
292
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
293
|
+
var _a, _b, _c, _d;
|
|
294
|
+
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);
|
|
295
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
296
|
+
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/tasks/attempt/v1/${encodeURIComponent(taskId)}`),
|
|
297
|
+
method: "PUT",
|
|
298
|
+
headers: _headers,
|
|
299
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
300
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
301
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
302
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
303
|
+
});
|
|
304
|
+
if (_response.ok) {
|
|
305
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
306
|
+
}
|
|
307
|
+
if (_response.error.reason === "status-code") {
|
|
308
|
+
switch (_response.error.statusCode) {
|
|
309
|
+
case 422:
|
|
310
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
311
|
+
default:
|
|
312
|
+
throw new errors.ChrtError({
|
|
313
|
+
statusCode: _response.error.statusCode,
|
|
314
|
+
body: _response.error.body,
|
|
315
|
+
rawResponse: _response.rawResponse,
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
switch (_response.error.reason) {
|
|
320
|
+
case "non-json":
|
|
321
|
+
throw new errors.ChrtError({
|
|
322
|
+
statusCode: _response.error.statusCode,
|
|
323
|
+
body: _response.error.rawBody,
|
|
324
|
+
rawResponse: _response.rawResponse,
|
|
325
|
+
});
|
|
326
|
+
case "timeout":
|
|
327
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /shipping/tasks/attempt/v1/{task_id}.");
|
|
328
|
+
case "unknown":
|
|
329
|
+
throw new errors.ChrtError({
|
|
330
|
+
message: _response.error.errorMessage,
|
|
331
|
+
rawResponse: _response.rawResponse,
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
}
|
|
272
336
|
/**
|
|
273
337
|
* Deletes a task. Task must be in STAGED status. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
274
338
|
*
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../../../environments.mjs";
|
|
5
|
+
import * as core from "../../../../../../../../core/index.mjs";
|
|
6
|
+
import * as Chrt from "../../../../../../../index.mjs";
|
|
7
|
+
export declare namespace ExecutorOrgNotes {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
|
+
fetcher?: core.FetchFunction;
|
|
16
|
+
}
|
|
17
|
+
interface RequestOptions {
|
|
18
|
+
/** The maximum time to wait for a response in seconds. */
|
|
19
|
+
timeoutInSeconds?: number;
|
|
20
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
21
|
+
maxRetries?: number;
|
|
22
|
+
/** A hook to abort the request. */
|
|
23
|
+
abortSignal?: AbortSignal;
|
|
24
|
+
/** Additional query string parameters to include in the request. */
|
|
25
|
+
queryParams?: Record<string, unknown>;
|
|
26
|
+
/** Additional headers to include in the request. */
|
|
27
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export declare class ExecutorOrgNotes {
|
|
31
|
+
protected readonly _options: ExecutorOrgNotes.Options;
|
|
32
|
+
constructor(_options?: ExecutorOrgNotes.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Adds an executor-side note to a task. | authz_personas=[driver_for_executor, executor_org_operators] | (AddExecutorOrgNoteReq) -> (bool)
|
|
35
|
+
*
|
|
36
|
+
* @param {string} taskId
|
|
37
|
+
* @param {Chrt.shipping.tasks.AddExecutorOrgNoteReq} request
|
|
38
|
+
* @param {ExecutorOrgNotes.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
|
+
*
|
|
40
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* await client.shipping.tasks.executorOrgNotes.addV1("task_id", {
|
|
44
|
+
* note: "note"
|
|
45
|
+
* })
|
|
46
|
+
*/
|
|
47
|
+
addV1(taskId: string, request: Chrt.shipping.tasks.AddExecutorOrgNoteReq, requestOptions?: ExecutorOrgNotes.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
48
|
+
private __addV1;
|
|
49
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
50
|
+
}
|