@chrt-inc/typescript-sdk 1.662.1 → 1.676.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
package/dist/cjs/Client.js
CHANGED
|
@@ -56,8 +56,8 @@ class ChrtClient {
|
|
|
56
56
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
57
57
|
"X-Fern-Language": "JavaScript",
|
|
58
58
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
59
|
-
"X-Fern-SDK-Version": "1.
|
|
60
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
59
|
+
"X-Fern-SDK-Version": "1.676.0",
|
|
60
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.676.0",
|
|
61
61
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
62
62
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
63
63
|
}, _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.
|
|
@@ -56,7 +56,7 @@ class Flights {
|
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* Returns flight info from an adjacent FLIGHT task group for TENDER_TO_AIRLINE or RECOVER_FROM_AIRLINE tasks. | authz_personas=[
|
|
59
|
+
* 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)
|
|
60
60
|
*
|
|
61
61
|
* @param {string} taskId
|
|
62
62
|
* @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.
|
|
@@ -61,7 +61,7 @@ class TaskArtifacts {
|
|
|
61
61
|
return ((_a = this._s3Object) !== null && _a !== void 0 ? _a : (this._s3Object = new Client_js_1.S3Object(this._options)));
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
* Adds a new task artifact to a task. | authz_personas=[
|
|
64
|
+
* Adds a new task artifact to a task. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators] | (AddTaskArtifactReq) -> (PydanticObjectId)
|
|
65
65
|
*
|
|
66
66
|
* @param {string} taskId
|
|
67
67
|
* @param {Chrt.shipping.AddTaskArtifactReq} request
|
|
@@ -130,7 +130,7 @@ class TaskArtifacts {
|
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
133
|
-
* Marks a task artifact as COMPLETED. | authz_personas=[
|
|
133
|
+
* Marks a task artifact as COMPLETED. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators] | () -> (bool)
|
|
134
134
|
*
|
|
135
135
|
* @param {string} taskArtifactId
|
|
136
136
|
* @param {TaskArtifacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -189,7 +189,7 @@ class TaskArtifacts {
|
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
191
|
/**
|
|
192
|
-
* Marks a task artifact as SKIPPED. | authz_personas=[
|
|
192
|
+
* Marks a task artifact as SKIPPED. | authz_personas=[driver_for_executor, executor_org_operators, coordinator_org_operators] | () -> (bool)
|
|
193
193
|
*
|
|
194
194
|
* @param {string} taskArtifactId
|
|
195
195
|
* @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/cjs/api/resources/shipping/resources/taskArtifacts/resources/s3Object/client/Client.js
CHANGED
|
@@ -56,7 +56,7 @@ class S3Object {
|
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* Retrieves the metadata for a task artifact S3 object, including blurhash for placeholder loading. | authz_personas=[
|
|
59
|
+
* 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)
|
|
60
60
|
*
|
|
61
61
|
* @param {string} taskArtifactS3ObjectMetadataId
|
|
62
62
|
* @param {S3Object.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -115,7 +115,7 @@ class S3Object {
|
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
/**
|
|
118
|
-
* Streams a task artifact S3 object file from storage. | authz_personas=[
|
|
118
|
+
* Streams a task artifact S3 object file from storage. | authz_personas=[driver_for_executor, executor_org_operators, shipper_org_operators, coordinator_org_operators] | () -> (binary)
|
|
119
119
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
120
120
|
*/
|
|
121
121
|
getV1(taskArtifactS3ObjectMetadataId, requestOptions) {
|
|
@@ -168,7 +168,7 @@ class S3Object {
|
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
/**
|
|
171
|
-
* Uploads a file (image, PDF, etc.) to a task artifact. Automatic blurhash generation for images. | authz_personas=[
|
|
171
|
+
* 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)
|
|
172
172
|
*
|
|
173
173
|
* @param {string} taskArtifactId
|
|
174
174
|
* @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
|
|
@@ -504,7 +504,7 @@ class TaskGroups {
|
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
506
|
/**
|
|
507
|
-
* Adds a message to a task group's message log. | authz_personas=[
|
|
507
|
+
* 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)
|
|
508
508
|
*
|
|
509
509
|
* @param {string} taskGroupId
|
|
510
510
|
* @param {Chrt.shipping.AddMessageReq} request
|
package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.d.ts
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/cjs/api/resources/shipping/resources/taskGroups/resources/s3Object/client/Client.js
CHANGED
|
@@ -168,7 +168,7 @@ class S3Object {
|
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
/**
|
|
171
|
-
* Uploads a file (image, PDF, etc.) to a task group. Automatic blurhash generation for images. | authz_personas=[
|
|
171
|
+
* 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)
|
|
172
172
|
*
|
|
173
173
|
* @param {string} taskGroupId
|
|
174
174
|
* @param {Chrt.shipping.taskGroups.BodyPostTaskGroupsS3ObjectAddV1ShippingTaskGroupsS3ObjectAddV1TaskGroupIdPost} request
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as environments from "../../../../../../environments.js";
|
|
5
5
|
import * as core from "../../../../../../core/index.js";
|
|
6
6
|
import * as Chrt from "../../../../../index.js";
|
|
7
|
+
import { ExecutorOrgNotes } from "../resources/executorOrgNotes/client/Client.js";
|
|
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
|
*
|
|
@@ -51,10 +51,15 @@ const core = __importStar(require("../../../../../../core/index.js"));
|
|
|
51
51
|
const Chrt = __importStar(require("../../../../../index.js"));
|
|
52
52
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
|
+
const Client_js_1 = require("../resources/executorOrgNotes/client/Client.js");
|
|
54
55
|
class Tasks {
|
|
55
56
|
constructor(_options = {}) {
|
|
56
57
|
this._options = _options;
|
|
57
58
|
}
|
|
59
|
+
get executorOrgNotes() {
|
|
60
|
+
var _a;
|
|
61
|
+
return ((_a = this._executorOrgNotes) !== null && _a !== void 0 ? _a : (this._executorOrgNotes = new Client_js_1.ExecutorOrgNotes(this._options)));
|
|
62
|
+
}
|
|
58
63
|
/**
|
|
59
64
|
* Adds a new task to a task group at a specific index. | authz_personas=[lig_owner_operators] | (AddTaskToGroupReq) -> (PydanticObjectId)
|
|
60
65
|
*
|
|
@@ -188,7 +193,7 @@ class Tasks {
|
|
|
188
193
|
});
|
|
189
194
|
}
|
|
190
195
|
/**
|
|
191
|
-
* Marks a task as COMPLETED. | authz_personas=[
|
|
196
|
+
* Marks a task as COMPLETED. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
|
|
192
197
|
*
|
|
193
198
|
* @param {string} taskId
|
|
194
199
|
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -247,7 +252,7 @@ class Tasks {
|
|
|
247
252
|
});
|
|
248
253
|
}
|
|
249
254
|
/**
|
|
250
|
-
* Marks a task as SKIPPED. | authz_personas=[
|
|
255
|
+
* Marks a task as SKIPPED. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
|
|
251
256
|
*
|
|
252
257
|
* @param {string} taskId
|
|
253
258
|
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -305,6 +310,65 @@ class Tasks {
|
|
|
305
310
|
}
|
|
306
311
|
});
|
|
307
312
|
}
|
|
313
|
+
/**
|
|
314
|
+
* Marks a task as ATTEMPT. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
|
|
315
|
+
*
|
|
316
|
+
* @param {string} taskId
|
|
317
|
+
* @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
318
|
+
*
|
|
319
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
320
|
+
*
|
|
321
|
+
* @example
|
|
322
|
+
* await client.shipping.tasks.attemptV1("task_id")
|
|
323
|
+
*/
|
|
324
|
+
attemptV1(taskId, requestOptions) {
|
|
325
|
+
return core.HttpResponsePromise.fromPromise(this.__attemptV1(taskId, requestOptions));
|
|
326
|
+
}
|
|
327
|
+
__attemptV1(taskId, requestOptions) {
|
|
328
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
329
|
+
var _a, _b, _c, _d;
|
|
330
|
+
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);
|
|
331
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
332
|
+
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)}`),
|
|
333
|
+
method: "PUT",
|
|
334
|
+
headers: _headers,
|
|
335
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
336
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
337
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
338
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
339
|
+
});
|
|
340
|
+
if (_response.ok) {
|
|
341
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
342
|
+
}
|
|
343
|
+
if (_response.error.reason === "status-code") {
|
|
344
|
+
switch (_response.error.statusCode) {
|
|
345
|
+
case 422:
|
|
346
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
347
|
+
default:
|
|
348
|
+
throw new errors.ChrtError({
|
|
349
|
+
statusCode: _response.error.statusCode,
|
|
350
|
+
body: _response.error.body,
|
|
351
|
+
rawResponse: _response.rawResponse,
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
switch (_response.error.reason) {
|
|
356
|
+
case "non-json":
|
|
357
|
+
throw new errors.ChrtError({
|
|
358
|
+
statusCode: _response.error.statusCode,
|
|
359
|
+
body: _response.error.rawBody,
|
|
360
|
+
rawResponse: _response.rawResponse,
|
|
361
|
+
});
|
|
362
|
+
case "timeout":
|
|
363
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /shipping/tasks/attempt/v1/{task_id}.");
|
|
364
|
+
case "unknown":
|
|
365
|
+
throw new errors.ChrtError({
|
|
366
|
+
message: _response.error.errorMessage,
|
|
367
|
+
rawResponse: _response.rawResponse,
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
}
|
|
308
372
|
/**
|
|
309
373
|
* Deletes a task. Task must be in STAGED status. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
310
374
|
*
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../../../environments.js";
|
|
5
|
+
import * as core from "../../../../../../../../core/index.js";
|
|
6
|
+
import * as Chrt from "../../../../../../../index.js";
|
|
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
|
+
}
|
package/dist/cjs/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/Client.js
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.ExecutorOrgNotes = void 0;
|
|
49
|
+
const environments = __importStar(require("../../../../../../../../environments.js"));
|
|
50
|
+
const core = __importStar(require("../../../../../../../../core/index.js"));
|
|
51
|
+
const Chrt = __importStar(require("../../../../../../../index.js"));
|
|
52
|
+
const headers_js_1 = require("../../../../../../../../core/headers.js");
|
|
53
|
+
const errors = __importStar(require("../../../../../../../../errors/index.js"));
|
|
54
|
+
class ExecutorOrgNotes {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
|
+
this._options = _options;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Adds an executor-side note to a task. | authz_personas=[driver_for_executor, executor_org_operators] | (AddExecutorOrgNoteReq) -> (bool)
|
|
60
|
+
*
|
|
61
|
+
* @param {string} taskId
|
|
62
|
+
* @param {Chrt.shipping.tasks.AddExecutorOrgNoteReq} request
|
|
63
|
+
* @param {ExecutorOrgNotes.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.shipping.tasks.executorOrgNotes.addV1("task_id", {
|
|
69
|
+
* note: "note"
|
|
70
|
+
* })
|
|
71
|
+
*/
|
|
72
|
+
addV1(taskId, request, requestOptions) {
|
|
73
|
+
return core.HttpResponsePromise.fromPromise(this.__addV1(taskId, request, requestOptions));
|
|
74
|
+
}
|
|
75
|
+
__addV1(taskId, request, requestOptions) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
var _a, _b, _c, _d;
|
|
78
|
+
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);
|
|
79
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
80
|
+
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/executor_org_notes/add/v1/${encodeURIComponent(taskId)}`),
|
|
81
|
+
method: "POST",
|
|
82
|
+
headers: _headers,
|
|
83
|
+
contentType: "application/json",
|
|
84
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
85
|
+
requestType: "json",
|
|
86
|
+
body: request,
|
|
87
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
88
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
89
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
90
|
+
});
|
|
91
|
+
if (_response.ok) {
|
|
92
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
93
|
+
}
|
|
94
|
+
if (_response.error.reason === "status-code") {
|
|
95
|
+
switch (_response.error.statusCode) {
|
|
96
|
+
case 422:
|
|
97
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
98
|
+
default:
|
|
99
|
+
throw new errors.ChrtError({
|
|
100
|
+
statusCode: _response.error.statusCode,
|
|
101
|
+
body: _response.error.body,
|
|
102
|
+
rawResponse: _response.rawResponse,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
switch (_response.error.reason) {
|
|
107
|
+
case "non-json":
|
|
108
|
+
throw new errors.ChrtError({
|
|
109
|
+
statusCode: _response.error.statusCode,
|
|
110
|
+
body: _response.error.rawBody,
|
|
111
|
+
rawResponse: _response.rawResponse,
|
|
112
|
+
});
|
|
113
|
+
case "timeout":
|
|
114
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/tasks/executor_org_notes/add/v1/{task_id}.");
|
|
115
|
+
case "unknown":
|
|
116
|
+
throw new errors.ChrtError({
|
|
117
|
+
message: _response.error.errorMessage,
|
|
118
|
+
rawResponse: _response.rawResponse,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
_getAuthorizationHeader() {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
126
|
+
if (bearer != null) {
|
|
127
|
+
return `Bearer ${bearer}`;
|
|
128
|
+
}
|
|
129
|
+
return undefined;
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
exports.ExecutorOrgNotes = ExecutorOrgNotes;
|
package/dist/cjs/api/resources/shipping/resources/tasks/resources/executorOrgNotes/client/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type AddExecutorOrgNoteReq } from "./AddExecutorOrgNoteReq.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|