@chrt-inc/typescript-sdk 1.710.0 → 1.718.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskArtifact/client/requests/OrderDraftAddTaskArtifactReq.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/client/Client.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/index.js +3 -1
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/Client.d.ts +68 -0
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/Client.js +201 -0
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/index.js +17 -0
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/AddScanPayloadReq.d.ts +15 -0
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/AddScanPayloadReq.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/ScanDeleteV1Request.d.ts +15 -0
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/ScanDeleteV1Request.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/taskArtifacts/resources/scan/index.js +17 -0
- package/dist/cjs/api/types/DeviceLimitedForList1.d.ts +2 -0
- package/dist/cjs/api/types/Driver1.d.ts +2 -0
- package/dist/cjs/api/types/ScanPayloadKindEnum.d.ts +8 -0
- package/dist/cjs/api/types/ScanPayloadKindEnum.js +10 -0
- package/dist/cjs/api/types/TaskArtifact1.d.ts +2 -0
- package/dist/cjs/api/types/TaskArtifactClientCreate1.d.ts +1 -0
- package/dist/cjs/api/types/TaskArtifactTypeEnum1.d.ts +2 -1
- package/dist/cjs/api/types/TaskArtifactTypeEnum1.js +1 -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/shipping/resources/orderDrafts/resources/taskArtifact/client/requests/OrderDraftAddTaskArtifactReq.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/client/Client.mjs +5 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/index.mjs +2 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/Client.d.mts +68 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/Client.mjs +164 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/index.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/AddScanPayloadReq.d.mts +15 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/AddScanPayloadReq.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/ScanDeleteV1Request.d.mts +15 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/ScanDeleteV1Request.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/index.mjs +1 -0
- package/dist/esm/api/types/DeviceLimitedForList1.d.mts +2 -0
- package/dist/esm/api/types/Driver1.d.mts +2 -0
- package/dist/esm/api/types/ScanPayloadKindEnum.d.mts +8 -0
- package/dist/esm/api/types/ScanPayloadKindEnum.mjs +7 -0
- package/dist/esm/api/types/TaskArtifact1.d.mts +2 -0
- package/dist/esm/api/types/TaskArtifactClientCreate1.d.mts +1 -0
- package/dist/esm/api/types/TaskArtifactTypeEnum1.d.mts +2 -1
- package/dist/esm/api/types/TaskArtifactTypeEnum1.mjs +1 -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 +150 -0
package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/Client.d.mts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
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 Scan {
|
|
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 Scan {
|
|
31
|
+
protected readonly _options: Scan.Options;
|
|
32
|
+
constructor(_options?: Scan.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Appends a barcode/QR scan payload to a SCAN-type task artifact's expected or observed array (deduplicated). | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | (AddScanPayloadReq) -> (bool)
|
|
35
|
+
*
|
|
36
|
+
* @param {string} taskArtifactId
|
|
37
|
+
* @param {Chrt.shipping.taskArtifacts.AddScanPayloadReq} request
|
|
38
|
+
* @param {Scan.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
|
+
*
|
|
40
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* await client.shipping.taskArtifacts.scan.addV1("task_artifact_id", {
|
|
44
|
+
* kind: "expected",
|
|
45
|
+
* payload: "payload"
|
|
46
|
+
* })
|
|
47
|
+
*/
|
|
48
|
+
addV1(taskArtifactId: string, request: Chrt.shipping.taskArtifacts.AddScanPayloadReq, requestOptions?: Scan.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
49
|
+
private __addV1;
|
|
50
|
+
/**
|
|
51
|
+
* Removes a barcode/QR scan payload (by value) from a SCAN-type task artifact's expected or observed array. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (bool)
|
|
52
|
+
*
|
|
53
|
+
* @param {string} taskArtifactId
|
|
54
|
+
* @param {Chrt.shipping.taskArtifacts.ScanDeleteV1Request} request
|
|
55
|
+
* @param {Scan.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
|
+
*
|
|
57
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* await client.shipping.taskArtifacts.scan.deleteV1("task_artifact_id", {
|
|
61
|
+
* kind: "expected",
|
|
62
|
+
* payload: "payload"
|
|
63
|
+
* })
|
|
64
|
+
*/
|
|
65
|
+
deleteV1(taskArtifactId: string, request: Chrt.shipping.taskArtifacts.ScanDeleteV1Request, requestOptions?: Scan.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
66
|
+
private __deleteV1;
|
|
67
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
68
|
+
}
|
package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/Client.mjs
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
import * as environments from "../../../../../../../../environments.mjs";
|
|
14
|
+
import * as core from "../../../../../../../../core/index.mjs";
|
|
15
|
+
import * as Chrt from "../../../../../../../index.mjs";
|
|
16
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../core/headers.mjs";
|
|
17
|
+
import * as errors from "../../../../../../../../errors/index.mjs";
|
|
18
|
+
export class Scan {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
|
+
this._options = _options;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Appends a barcode/QR scan payload to a SCAN-type task artifact's expected or observed array (deduplicated). | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | (AddScanPayloadReq) -> (bool)
|
|
24
|
+
*
|
|
25
|
+
* @param {string} taskArtifactId
|
|
26
|
+
* @param {Chrt.shipping.taskArtifacts.AddScanPayloadReq} request
|
|
27
|
+
* @param {Scan.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
+
*
|
|
29
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* await client.shipping.taskArtifacts.scan.addV1("task_artifact_id", {
|
|
33
|
+
* kind: "expected",
|
|
34
|
+
* payload: "payload"
|
|
35
|
+
* })
|
|
36
|
+
*/
|
|
37
|
+
addV1(taskArtifactId, request, requestOptions) {
|
|
38
|
+
return core.HttpResponsePromise.fromPromise(this.__addV1(taskArtifactId, request, requestOptions));
|
|
39
|
+
}
|
|
40
|
+
__addV1(taskArtifactId, request, requestOptions) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
var _a, _b, _c, _d;
|
|
43
|
+
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);
|
|
44
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
45
|
+
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/task_artifacts/scan/add/v1/${encodeURIComponent(taskArtifactId)}`),
|
|
46
|
+
method: "POST",
|
|
47
|
+
headers: _headers,
|
|
48
|
+
contentType: "application/json",
|
|
49
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
50
|
+
requestType: "json",
|
|
51
|
+
body: request,
|
|
52
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
53
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
54
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
55
|
+
});
|
|
56
|
+
if (_response.ok) {
|
|
57
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
58
|
+
}
|
|
59
|
+
if (_response.error.reason === "status-code") {
|
|
60
|
+
switch (_response.error.statusCode) {
|
|
61
|
+
case 422:
|
|
62
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
63
|
+
default:
|
|
64
|
+
throw new errors.ChrtError({
|
|
65
|
+
statusCode: _response.error.statusCode,
|
|
66
|
+
body: _response.error.body,
|
|
67
|
+
rawResponse: _response.rawResponse,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
switch (_response.error.reason) {
|
|
72
|
+
case "non-json":
|
|
73
|
+
throw new errors.ChrtError({
|
|
74
|
+
statusCode: _response.error.statusCode,
|
|
75
|
+
body: _response.error.rawBody,
|
|
76
|
+
rawResponse: _response.rawResponse,
|
|
77
|
+
});
|
|
78
|
+
case "timeout":
|
|
79
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/task_artifacts/scan/add/v1/{task_artifact_id}.");
|
|
80
|
+
case "unknown":
|
|
81
|
+
throw new errors.ChrtError({
|
|
82
|
+
message: _response.error.errorMessage,
|
|
83
|
+
rawResponse: _response.rawResponse,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Removes a barcode/QR scan payload (by value) from a SCAN-type task artifact's expected or observed array. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (bool)
|
|
90
|
+
*
|
|
91
|
+
* @param {string} taskArtifactId
|
|
92
|
+
* @param {Chrt.shipping.taskArtifacts.ScanDeleteV1Request} request
|
|
93
|
+
* @param {Scan.RequestOptions} requestOptions - Request-specific configuration.
|
|
94
|
+
*
|
|
95
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* await client.shipping.taskArtifacts.scan.deleteV1("task_artifact_id", {
|
|
99
|
+
* kind: "expected",
|
|
100
|
+
* payload: "payload"
|
|
101
|
+
* })
|
|
102
|
+
*/
|
|
103
|
+
deleteV1(taskArtifactId, request, requestOptions) {
|
|
104
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteV1(taskArtifactId, request, requestOptions));
|
|
105
|
+
}
|
|
106
|
+
__deleteV1(taskArtifactId, request, requestOptions) {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
var _a, _b, _c, _d;
|
|
109
|
+
const { kind, payload } = request;
|
|
110
|
+
const _queryParams = {};
|
|
111
|
+
_queryParams["kind"] = kind;
|
|
112
|
+
_queryParams["payload"] = payload;
|
|
113
|
+
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);
|
|
114
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
115
|
+
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/task_artifacts/scan/delete/v1/${encodeURIComponent(taskArtifactId)}`),
|
|
116
|
+
method: "DELETE",
|
|
117
|
+
headers: _headers,
|
|
118
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
119
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
120
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
121
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
122
|
+
});
|
|
123
|
+
if (_response.ok) {
|
|
124
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
125
|
+
}
|
|
126
|
+
if (_response.error.reason === "status-code") {
|
|
127
|
+
switch (_response.error.statusCode) {
|
|
128
|
+
case 422:
|
|
129
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
130
|
+
default:
|
|
131
|
+
throw new errors.ChrtError({
|
|
132
|
+
statusCode: _response.error.statusCode,
|
|
133
|
+
body: _response.error.body,
|
|
134
|
+
rawResponse: _response.rawResponse,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
switch (_response.error.reason) {
|
|
139
|
+
case "non-json":
|
|
140
|
+
throw new errors.ChrtError({
|
|
141
|
+
statusCode: _response.error.statusCode,
|
|
142
|
+
body: _response.error.rawBody,
|
|
143
|
+
rawResponse: _response.rawResponse,
|
|
144
|
+
});
|
|
145
|
+
case "timeout":
|
|
146
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /shipping/task_artifacts/scan/delete/v1/{task_artifact_id}.");
|
|
147
|
+
case "unknown":
|
|
148
|
+
throw new errors.ChrtError({
|
|
149
|
+
message: _response.error.errorMessage,
|
|
150
|
+
rawResponse: _response.rawResponse,
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
_getAuthorizationHeader() {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
158
|
+
if (bearer != null) {
|
|
159
|
+
return `Bearer ${bearer}`;
|
|
160
|
+
}
|
|
161
|
+
return undefined;
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
package/dist/esm/api/resources/shipping/resources/taskArtifacts/resources/scan/client/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* kind: "expected",
|
|
9
|
+
* payload: "payload"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface AddScanPayloadReq {
|
|
13
|
+
kind: Chrt.ScanPayloadKindEnum;
|
|
14
|
+
payload: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* kind: "expected",
|
|
9
|
+
* payload: "payload"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface ScanDeleteV1Request {
|
|
13
|
+
kind: Chrt.ScanPayloadKindEnum;
|
|
14
|
+
payload: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -24,6 +24,8 @@ export interface DeviceLimitedForList1 {
|
|
|
24
24
|
first_seen_at_timestamp?: string | null;
|
|
25
25
|
last_seen_at_location?: Chrt.LocationFeature | null;
|
|
26
26
|
last_seen_at_timestamp?: string | null;
|
|
27
|
+
last_seen_at_location_city?: string | null;
|
|
28
|
+
last_seen_at_location_large_city?: string | null;
|
|
27
29
|
last_seen_battery_level?: string | null;
|
|
28
30
|
archived?: boolean;
|
|
29
31
|
paused?: boolean;
|
|
@@ -24,4 +24,6 @@ export interface Driver1 {
|
|
|
24
24
|
active_task_group_ids?: string[];
|
|
25
25
|
last_seen_at_location?: Chrt.LocationFeature | null;
|
|
26
26
|
last_seen_at_timestamp?: string | null;
|
|
27
|
+
last_seen_at_location_city?: string | null;
|
|
28
|
+
last_seen_at_location_large_city?: string | null;
|
|
27
29
|
}
|
|
@@ -5,6 +5,7 @@ import * as Chrt from "../index.mjs";
|
|
|
5
5
|
export interface TaskArtifact1 {
|
|
6
6
|
schema_version: number;
|
|
7
7
|
type: Chrt.TaskArtifactTypeEnum1;
|
|
8
|
+
expected_scan_payloads?: string[];
|
|
8
9
|
_id: string;
|
|
9
10
|
order_id: string;
|
|
10
11
|
order_short_id: string;
|
|
@@ -26,6 +27,7 @@ export interface TaskArtifact1 {
|
|
|
26
27
|
completed_by_org_id?: string | null;
|
|
27
28
|
/** Must be a string starting with `user_` */
|
|
28
29
|
completed_by_user_id?: string | null;
|
|
30
|
+
observed_scan_payloads?: string[];
|
|
29
31
|
status?: Chrt.TaskArtifactStatusEnum1;
|
|
30
32
|
draft_started_at_timestamp: string;
|
|
31
33
|
staged_at_timestamp?: string | null;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type TaskArtifactTypeEnum1 = "image" | "signature" | "other";
|
|
4
|
+
export type TaskArtifactTypeEnum1 = "image" | "signature" | "scan" | "other";
|
|
5
5
|
export declare const TaskArtifactTypeEnum1: {
|
|
6
6
|
readonly Image: "image";
|
|
7
7
|
readonly Signature: "signature";
|
|
8
|
+
readonly Scan: "scan";
|
|
8
9
|
readonly Other: "other";
|
|
9
10
|
};
|
|
@@ -274,6 +274,7 @@ export * from "./ProviderOrgProfile1.mjs";
|
|
|
274
274
|
export * from "./ProviderProviderConnection1.mjs";
|
|
275
275
|
export * from "./RateSheetMapping1.mjs";
|
|
276
276
|
export * from "./RateSheetMappingListRes.mjs";
|
|
277
|
+
export * from "./ScanPayloadKindEnum.mjs";
|
|
277
278
|
export * from "./ScheduleCalendarSpec.mjs";
|
|
278
279
|
export * from "./ScheduleIntervalSpec.mjs";
|
|
279
280
|
export * from "./ScheduleRange.mjs";
|
|
@@ -274,6 +274,7 @@ export * from "./ProviderOrgProfile1.mjs";
|
|
|
274
274
|
export * from "./ProviderProviderConnection1.mjs";
|
|
275
275
|
export * from "./RateSheetMapping1.mjs";
|
|
276
276
|
export * from "./RateSheetMappingListRes.mjs";
|
|
277
|
+
export * from "./ScanPayloadKindEnum.mjs";
|
|
277
278
|
export * from "./ScheduleCalendarSpec.mjs";
|
|
278
279
|
export * from "./ScheduleIntervalSpec.mjs";
|
|
279
280
|
export * from "./ScheduleRange.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.718.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.718.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -24017,6 +24017,156 @@ await client.shipping.taskArtifacts.s3Object.writeAiImageDescriptionV1("task_art
|
|
|
24017
24017
|
</dl>
|
|
24018
24018
|
</details>
|
|
24019
24019
|
|
|
24020
|
+
## Shipping TaskArtifacts Scan
|
|
24021
|
+
|
|
24022
|
+
<details><summary><code>client.shipping.taskArtifacts.scan.<a href="/src/api/resources/shipping/resources/taskArtifacts/resources/scan/client/Client.ts">addV1</a>(taskArtifactId, { ...params }) -> boolean</code></summary>
|
|
24023
|
+
<dl>
|
|
24024
|
+
<dd>
|
|
24025
|
+
|
|
24026
|
+
#### 📝 Description
|
|
24027
|
+
|
|
24028
|
+
<dl>
|
|
24029
|
+
<dd>
|
|
24030
|
+
|
|
24031
|
+
<dl>
|
|
24032
|
+
<dd>
|
|
24033
|
+
|
|
24034
|
+
Appends a barcode/QR scan payload to a SCAN-type task artifact's expected or observed array (deduplicated). | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | (AddScanPayloadReq) -> (bool)
|
|
24035
|
+
|
|
24036
|
+
</dd>
|
|
24037
|
+
</dl>
|
|
24038
|
+
</dd>
|
|
24039
|
+
</dl>
|
|
24040
|
+
|
|
24041
|
+
#### 🔌 Usage
|
|
24042
|
+
|
|
24043
|
+
<dl>
|
|
24044
|
+
<dd>
|
|
24045
|
+
|
|
24046
|
+
<dl>
|
|
24047
|
+
<dd>
|
|
24048
|
+
|
|
24049
|
+
```typescript
|
|
24050
|
+
await client.shipping.taskArtifacts.scan.addV1("task_artifact_id", {
|
|
24051
|
+
kind: "expected",
|
|
24052
|
+
payload: "payload",
|
|
24053
|
+
});
|
|
24054
|
+
```
|
|
24055
|
+
|
|
24056
|
+
</dd>
|
|
24057
|
+
</dl>
|
|
24058
|
+
</dd>
|
|
24059
|
+
</dl>
|
|
24060
|
+
|
|
24061
|
+
#### ⚙️ Parameters
|
|
24062
|
+
|
|
24063
|
+
<dl>
|
|
24064
|
+
<dd>
|
|
24065
|
+
|
|
24066
|
+
<dl>
|
|
24067
|
+
<dd>
|
|
24068
|
+
|
|
24069
|
+
**taskArtifactId:** `string`
|
|
24070
|
+
|
|
24071
|
+
</dd>
|
|
24072
|
+
</dl>
|
|
24073
|
+
|
|
24074
|
+
<dl>
|
|
24075
|
+
<dd>
|
|
24076
|
+
|
|
24077
|
+
**request:** `Chrt.shipping.taskArtifacts.AddScanPayloadReq`
|
|
24078
|
+
|
|
24079
|
+
</dd>
|
|
24080
|
+
</dl>
|
|
24081
|
+
|
|
24082
|
+
<dl>
|
|
24083
|
+
<dd>
|
|
24084
|
+
|
|
24085
|
+
**requestOptions:** `Scan.RequestOptions`
|
|
24086
|
+
|
|
24087
|
+
</dd>
|
|
24088
|
+
</dl>
|
|
24089
|
+
</dd>
|
|
24090
|
+
</dl>
|
|
24091
|
+
|
|
24092
|
+
</dd>
|
|
24093
|
+
</dl>
|
|
24094
|
+
</details>
|
|
24095
|
+
|
|
24096
|
+
<details><summary><code>client.shipping.taskArtifacts.scan.<a href="/src/api/resources/shipping/resources/taskArtifacts/resources/scan/client/Client.ts">deleteV1</a>(taskArtifactId, { ...params }) -> boolean</code></summary>
|
|
24097
|
+
<dl>
|
|
24098
|
+
<dd>
|
|
24099
|
+
|
|
24100
|
+
#### 📝 Description
|
|
24101
|
+
|
|
24102
|
+
<dl>
|
|
24103
|
+
<dd>
|
|
24104
|
+
|
|
24105
|
+
<dl>
|
|
24106
|
+
<dd>
|
|
24107
|
+
|
|
24108
|
+
Removes a barcode/QR scan payload (by value) from a SCAN-type task artifact's expected or observed array. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (bool)
|
|
24109
|
+
|
|
24110
|
+
</dd>
|
|
24111
|
+
</dl>
|
|
24112
|
+
</dd>
|
|
24113
|
+
</dl>
|
|
24114
|
+
|
|
24115
|
+
#### 🔌 Usage
|
|
24116
|
+
|
|
24117
|
+
<dl>
|
|
24118
|
+
<dd>
|
|
24119
|
+
|
|
24120
|
+
<dl>
|
|
24121
|
+
<dd>
|
|
24122
|
+
|
|
24123
|
+
```typescript
|
|
24124
|
+
await client.shipping.taskArtifacts.scan.deleteV1("task_artifact_id", {
|
|
24125
|
+
kind: "expected",
|
|
24126
|
+
payload: "payload",
|
|
24127
|
+
});
|
|
24128
|
+
```
|
|
24129
|
+
|
|
24130
|
+
</dd>
|
|
24131
|
+
</dl>
|
|
24132
|
+
</dd>
|
|
24133
|
+
</dl>
|
|
24134
|
+
|
|
24135
|
+
#### ⚙️ Parameters
|
|
24136
|
+
|
|
24137
|
+
<dl>
|
|
24138
|
+
<dd>
|
|
24139
|
+
|
|
24140
|
+
<dl>
|
|
24141
|
+
<dd>
|
|
24142
|
+
|
|
24143
|
+
**taskArtifactId:** `string`
|
|
24144
|
+
|
|
24145
|
+
</dd>
|
|
24146
|
+
</dl>
|
|
24147
|
+
|
|
24148
|
+
<dl>
|
|
24149
|
+
<dd>
|
|
24150
|
+
|
|
24151
|
+
**request:** `Chrt.shipping.taskArtifacts.ScanDeleteV1Request`
|
|
24152
|
+
|
|
24153
|
+
</dd>
|
|
24154
|
+
</dl>
|
|
24155
|
+
|
|
24156
|
+
<dl>
|
|
24157
|
+
<dd>
|
|
24158
|
+
|
|
24159
|
+
**requestOptions:** `Scan.RequestOptions`
|
|
24160
|
+
|
|
24161
|
+
</dd>
|
|
24162
|
+
</dl>
|
|
24163
|
+
</dd>
|
|
24164
|
+
</dl>
|
|
24165
|
+
|
|
24166
|
+
</dd>
|
|
24167
|
+
</dl>
|
|
24168
|
+
</details>
|
|
24169
|
+
|
|
24020
24170
|
## Shipping TaskGroups TaskGroupId
|
|
24021
24171
|
|
|
24022
24172
|
<details><summary><code>client.shipping.taskGroups.taskGroupId.<a href="/src/api/resources/shipping/resources/taskGroups/resources/taskGroupId/client/Client.ts">forExecutorOperatorsV1</a>(orderRef) -> string[]</code></summary>
|