@chrt-inc/typescript-sdk 1.285.0 → 1.293.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/milestones/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/milestones/resources/images/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/milestones/resources/images/client/Client.js +2 -1
- package/dist/cjs/api/resources/milestones/resources/images/client/requests/BodyPostMilestonesUploadImageV1OortMilestonesImagesUploadV1MilestoneIdPost.d.ts +2 -1
- package/dist/cjs/api/resources/orders/client/Client.d.ts +18 -3
- package/dist/cjs/api/resources/orders/client/Client.js +70 -6
- package/dist/cjs/api/resources/orders/client/requests/OrdersExpandedReq.d.ts +17 -0
- package/dist/cjs/api/resources/orders/client/requests/OrdersExpandedReq.js +5 -0
- package/dist/cjs/api/resources/orders/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/orders/resources/full/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/orders/resources/full/client/Client.js +1 -1
- package/dist/cjs/api/resources/orgs/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/payments/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/root/client/Client.d.ts +12 -12
- package/dist/cjs/api/resources/root/client/Client.js +24 -24
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.d.ts +8 -2
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +8 -2
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesDeleteV1Request.d.ts +4 -1
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesGetV1Request.d.ts +4 -1
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.js +4 -2
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsPublicV1Request.d.ts +2 -1
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsV1Request.d.ts +2 -1
- package/dist/cjs/api/types/CreateConnectAccountRes.d.ts +6 -0
- package/dist/cjs/api/types/CreateConnectAccountRes.js +5 -0
- package/dist/cjs/api/types/GeometryCollection.d.ts +1 -1
- package/dist/cjs/api/types/LineString.d.ts +1 -1
- package/dist/cjs/api/types/LocationFeature.d.ts +1 -1
- package/dist/cjs/api/types/MultiLineString.d.ts +1 -1
- package/dist/cjs/api/types/MultiPoint.d.ts +1 -1
- package/dist/cjs/api/types/MultiPolygon.d.ts +1 -1
- package/dist/cjs/api/types/OrderExpanded.d.ts +11 -0
- package/dist/cjs/api/types/OrderExpanded.js +5 -0
- package/dist/cjs/api/types/OrdersExpandedRes.d.ts +10 -0
- package/dist/cjs/api/types/OrdersExpandedRes.js +5 -0
- package/dist/cjs/api/types/Point.d.ts +1 -1
- package/dist/cjs/api/types/Polygon.d.ts +1 -1
- package/dist/cjs/api/types/TrackingCargoByDeviceDataPointMetadata1.d.ts +1 -0
- package/dist/cjs/api/types/TrackingCargoByDriverDataPointMetadata1.d.ts +1 -0
- package/dist/cjs/api/types/TrackingSessionByDeviceDataPointMetadata1.d.ts +1 -0
- package/dist/cjs/api/types/TrackingTaskGroupByDriverDataPointMetadata1.d.ts +1 -0
- package/dist/cjs/api/types/TrackingWebhookResponse.d.ts +7 -0
- package/dist/cjs/api/types/TrackingWebhookResponse.js +5 -0
- package/dist/cjs/api/types/index.d.ts +6 -2
- package/dist/cjs/api/types/index.js +6 -2
- 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/milestones/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/milestones/resources/images/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/milestones/resources/images/client/Client.mjs +2 -1
- package/dist/esm/api/resources/milestones/resources/images/client/requests/BodyPostMilestonesUploadImageV1OortMilestonesImagesUploadV1MilestoneIdPost.d.mts +2 -1
- package/dist/esm/api/resources/orders/client/Client.d.mts +18 -3
- package/dist/esm/api/resources/orders/client/Client.mjs +70 -6
- package/dist/esm/api/resources/orders/client/requests/OrdersExpandedReq.d.mts +17 -0
- package/dist/esm/api/resources/orders/client/requests/OrdersExpandedReq.mjs +4 -0
- package/dist/esm/api/resources/orders/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/orders/resources/full/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/orders/resources/full/client/Client.mjs +1 -1
- package/dist/esm/api/resources/orgs/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/payments/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/root/client/Client.d.mts +12 -12
- package/dist/esm/api/resources/root/client/Client.mjs +24 -24
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +8 -2
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +8 -2
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesDeleteV1Request.d.mts +4 -1
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesGetV1Request.d.mts +4 -1
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.mjs +4 -2
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsPublicV1Request.d.mts +2 -1
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsV1Request.d.mts +2 -1
- package/dist/esm/api/types/CreateConnectAccountRes.d.mts +6 -0
- package/dist/esm/api/types/CreateConnectAccountRes.mjs +4 -0
- package/dist/esm/api/types/GeometryCollection.d.mts +1 -1
- package/dist/esm/api/types/LineString.d.mts +1 -1
- package/dist/esm/api/types/LocationFeature.d.mts +1 -1
- package/dist/esm/api/types/MultiLineString.d.mts +1 -1
- package/dist/esm/api/types/MultiPoint.d.mts +1 -1
- package/dist/esm/api/types/MultiPolygon.d.mts +1 -1
- package/dist/esm/api/types/OrderExpanded.d.mts +11 -0
- package/dist/esm/api/types/OrderExpanded.mjs +4 -0
- package/dist/esm/api/types/OrdersExpandedRes.d.mts +10 -0
- package/dist/esm/api/types/OrdersExpandedRes.mjs +4 -0
- package/dist/esm/api/types/Point.d.mts +1 -1
- package/dist/esm/api/types/Polygon.d.mts +1 -1
- package/dist/esm/api/types/TrackingCargoByDeviceDataPointMetadata1.d.mts +1 -0
- package/dist/esm/api/types/TrackingCargoByDriverDataPointMetadata1.d.mts +1 -0
- package/dist/esm/api/types/TrackingSessionByDeviceDataPointMetadata1.d.mts +1 -0
- package/dist/esm/api/types/TrackingTaskGroupByDriverDataPointMetadata1.d.mts +1 -0
- package/dist/esm/api/types/TrackingWebhookResponse.d.mts +7 -0
- package/dist/esm/api/types/TrackingWebhookResponse.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +6 -2
- package/dist/esm/api/types/index.mjs +6 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +90 -16
package/dist/cjs/Client.js
CHANGED
|
@@ -68,8 +68,8 @@ class ChrtClient {
|
|
|
68
68
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
69
69
|
"X-Fern-Language": "JavaScript",
|
|
70
70
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
71
|
-
"X-Fern-SDK-Version": "1.
|
|
72
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
71
|
+
"X-Fern-SDK-Version": "1.293.0",
|
|
72
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.293.0",
|
|
73
73
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
74
74
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
75
75
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -65,7 +65,7 @@ export declare class Milestones {
|
|
|
65
65
|
* type: "image"
|
|
66
66
|
* })
|
|
67
67
|
*/
|
|
68
|
-
addToTaskV1(request: Chrt.MilestoneAddToTaskReq, requestOptions?: Milestones.RequestOptions): core.HttpResponsePromise<
|
|
68
|
+
addToTaskV1(request: Chrt.MilestoneAddToTaskReq, requestOptions?: Milestones.RequestOptions): core.HttpResponsePromise<string>;
|
|
69
69
|
private __addToTaskV1;
|
|
70
70
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
71
71
|
}
|
|
@@ -42,7 +42,8 @@ export declare class Images {
|
|
|
42
42
|
* @example
|
|
43
43
|
* import { createReadStream } from "fs";
|
|
44
44
|
* await client.milestones.images.uploadByMilestoneIdV1("milestone_id", {
|
|
45
|
-
* image: fs.createReadStream("/path/to/your/file")
|
|
45
|
+
* image: fs.createReadStream("/path/to/your/file"),
|
|
46
|
+
* comments: "comments"
|
|
46
47
|
* })
|
|
47
48
|
*/
|
|
48
49
|
uploadByMilestoneIdV1(milestoneId: string, request: Chrt.milestones.BodyPostMilestonesUploadImageV1OortMilestonesImagesUploadV1MilestoneIdPost, requestOptions?: Images.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
@@ -67,7 +67,8 @@ class Images {
|
|
|
67
67
|
* @example
|
|
68
68
|
* import { createReadStream } from "fs";
|
|
69
69
|
* await client.milestones.images.uploadByMilestoneIdV1("milestone_id", {
|
|
70
|
-
* image: fs.createReadStream("/path/to/your/file")
|
|
70
|
+
* image: fs.createReadStream("/path/to/your/file"),
|
|
71
|
+
* comments: "comments"
|
|
71
72
|
* })
|
|
72
73
|
*/
|
|
73
74
|
uploadByMilestoneIdV1(milestoneId, request, requestOptions) {
|
|
@@ -5,7 +5,8 @@ import * as core from "../../../../../../../core/index.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
-
* image: fs.createReadStream("/path/to/your/file")
|
|
8
|
+
* image: fs.createReadStream("/path/to/your/file"),
|
|
9
|
+
* comments: "comments"
|
|
9
10
|
* }
|
|
10
11
|
*/
|
|
11
12
|
export interface BodyPostMilestonesUploadImageV1OortMilestonesImagesUploadV1MilestoneIdPost {
|
|
@@ -68,7 +68,7 @@ export declare class Orders {
|
|
|
68
68
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
|
-
* await client.orders.
|
|
71
|
+
* await client.orders.createV1({
|
|
72
72
|
* order_client_create: {
|
|
73
73
|
* schema_version: 1
|
|
74
74
|
* },
|
|
@@ -88,8 +88,23 @@ export declare class Orders {
|
|
|
88
88
|
* transport_type: "ground_only"
|
|
89
89
|
* })
|
|
90
90
|
*/
|
|
91
|
-
|
|
92
|
-
private
|
|
91
|
+
createV1(request: Chrt.CreateOrderReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.CreateOrderRes>;
|
|
92
|
+
private __createV1;
|
|
93
|
+
/**
|
|
94
|
+
* Fetches an order with optional expanded data for task groups, tasks, milestones, and cargos.
|
|
95
|
+
*
|
|
96
|
+
* @param {Chrt.OrdersExpandedReq} request
|
|
97
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
98
|
+
*
|
|
99
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* await client.orders.postExpandedV1({
|
|
103
|
+
* order_id_or_short_id: "order_id_or_short_id"
|
|
104
|
+
* })
|
|
105
|
+
*/
|
|
106
|
+
postExpandedV1(request: Chrt.OrdersExpandedReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.OrdersExpandedRes>;
|
|
107
|
+
private __postExpandedV1;
|
|
93
108
|
/**
|
|
94
109
|
* Lists all orders for the authenticated shipper organization.
|
|
95
110
|
*
|
|
@@ -187,7 +187,7 @@ class Orders {
|
|
|
187
187
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
188
188
|
*
|
|
189
189
|
* @example
|
|
190
|
-
* await client.orders.
|
|
190
|
+
* await client.orders.createV1({
|
|
191
191
|
* order_client_create: {
|
|
192
192
|
* schema_version: 1
|
|
193
193
|
* },
|
|
@@ -207,15 +207,15 @@ class Orders {
|
|
|
207
207
|
* transport_type: "ground_only"
|
|
208
208
|
* })
|
|
209
209
|
*/
|
|
210
|
-
|
|
211
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
210
|
+
createV1(request, requestOptions) {
|
|
211
|
+
return core.HttpResponsePromise.fromPromise(this.__createV1(request, requestOptions));
|
|
212
212
|
}
|
|
213
|
-
|
|
213
|
+
__createV1(request, requestOptions) {
|
|
214
214
|
return __awaiter(this, void 0, void 0, function* () {
|
|
215
215
|
var _a, _b, _c, _d;
|
|
216
216
|
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);
|
|
217
217
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
218
|
-
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, "oort/orders/create"),
|
|
218
|
+
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, "oort/orders/create/v1"),
|
|
219
219
|
method: "POST",
|
|
220
220
|
headers: _headers,
|
|
221
221
|
contentType: "application/json",
|
|
@@ -249,7 +249,71 @@ class Orders {
|
|
|
249
249
|
rawResponse: _response.rawResponse,
|
|
250
250
|
});
|
|
251
251
|
case "timeout":
|
|
252
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/orders/create.");
|
|
252
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/orders/create/v1.");
|
|
253
|
+
case "unknown":
|
|
254
|
+
throw new errors.ChrtError({
|
|
255
|
+
message: _response.error.errorMessage,
|
|
256
|
+
rawResponse: _response.rawResponse,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Fetches an order with optional expanded data for task groups, tasks, milestones, and cargos.
|
|
263
|
+
*
|
|
264
|
+
* @param {Chrt.OrdersExpandedReq} request
|
|
265
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
266
|
+
*
|
|
267
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
268
|
+
*
|
|
269
|
+
* @example
|
|
270
|
+
* await client.orders.postExpandedV1({
|
|
271
|
+
* order_id_or_short_id: "order_id_or_short_id"
|
|
272
|
+
* })
|
|
273
|
+
*/
|
|
274
|
+
postExpandedV1(request, requestOptions) {
|
|
275
|
+
return core.HttpResponsePromise.fromPromise(this.__postExpandedV1(request, requestOptions));
|
|
276
|
+
}
|
|
277
|
+
__postExpandedV1(request, requestOptions) {
|
|
278
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
279
|
+
var _a, _b, _c, _d;
|
|
280
|
+
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);
|
|
281
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
282
|
+
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, "oort/orders/expanded/v1"),
|
|
283
|
+
method: "POST",
|
|
284
|
+
headers: _headers,
|
|
285
|
+
contentType: "application/json",
|
|
286
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
287
|
+
requestType: "json",
|
|
288
|
+
body: request,
|
|
289
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
290
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
291
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
292
|
+
});
|
|
293
|
+
if (_response.ok) {
|
|
294
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
295
|
+
}
|
|
296
|
+
if (_response.error.reason === "status-code") {
|
|
297
|
+
switch (_response.error.statusCode) {
|
|
298
|
+
case 422:
|
|
299
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
300
|
+
default:
|
|
301
|
+
throw new errors.ChrtError({
|
|
302
|
+
statusCode: _response.error.statusCode,
|
|
303
|
+
body: _response.error.body,
|
|
304
|
+
rawResponse: _response.rawResponse,
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
switch (_response.error.reason) {
|
|
309
|
+
case "non-json":
|
|
310
|
+
throw new errors.ChrtError({
|
|
311
|
+
statusCode: _response.error.statusCode,
|
|
312
|
+
body: _response.error.rawBody,
|
|
313
|
+
rawResponse: _response.rawResponse,
|
|
314
|
+
});
|
|
315
|
+
case "timeout":
|
|
316
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/orders/expanded/v1.");
|
|
253
317
|
case "unknown":
|
|
254
318
|
throw new errors.ChrtError({
|
|
255
319
|
message: _response.error.errorMessage,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* order_id_or_short_id: "order_id_or_short_id"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface OrdersExpandedReq {
|
|
11
|
+
order_id_or_short_id: string;
|
|
12
|
+
expand_task_groups?: boolean;
|
|
13
|
+
expand_tasks?: boolean;
|
|
14
|
+
expand_milestones?: boolean;
|
|
15
|
+
expand_cargos?: boolean;
|
|
16
|
+
expand_shipper_contact_infos?: boolean;
|
|
17
|
+
}
|
|
@@ -31,7 +31,7 @@ export declare class Full {
|
|
|
31
31
|
protected readonly _options: Full.Options;
|
|
32
32
|
constructor(_options?: Full.Options);
|
|
33
33
|
/**
|
|
34
|
-
* Retrieves an order with all related task groups, tasks, milestones, and cargo information.
|
|
34
|
+
* (DEPRECATED) Retrieves an order with all related task groups, tasks, milestones, and cargo information.
|
|
35
35
|
*
|
|
36
36
|
* @param {string} orderIdOrShortId
|
|
37
37
|
* @param {Full.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -56,7 +56,7 @@ class Full {
|
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* Retrieves an order with all related task groups, tasks, milestones, and cargo information.
|
|
59
|
+
* (DEPRECATED) Retrieves an order with all related task groups, tasks, milestones, and cargo information.
|
|
60
60
|
*
|
|
61
61
|
* @param {string} orderIdOrShortId
|
|
62
62
|
* @param {Full.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -110,7 +110,7 @@ export declare class Orgs {
|
|
|
110
110
|
* company_name: "company_name"
|
|
111
111
|
* })
|
|
112
112
|
*/
|
|
113
|
-
createPublicDataV1(request: Chrt.CreateOrgPublicDataReq, requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<
|
|
113
|
+
createPublicDataV1(request: Chrt.CreateOrgPublicDataReq, requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<string>;
|
|
114
114
|
private __createPublicDataV1;
|
|
115
115
|
/**
|
|
116
116
|
* Updates the organization handle or company name for the authenticated organization.
|
|
@@ -63,7 +63,7 @@ export declare class Payments {
|
|
|
63
63
|
* @example
|
|
64
64
|
* await client.payments.createConnectAccountV1()
|
|
65
65
|
*/
|
|
66
|
-
createConnectAccountV1(requestOptions?: Payments.RequestOptions): core.HttpResponsePromise<
|
|
66
|
+
createConnectAccountV1(requestOptions?: Payments.RequestOptions): core.HttpResponsePromise<Chrt.CreateConnectAccountRes>;
|
|
67
67
|
private __createConnectAccountV1;
|
|
68
68
|
/**
|
|
69
69
|
* Creates an onboarding link for a Stripe Connect account. Used to complete or update account setup.
|
|
@@ -35,30 +35,30 @@ export declare class Root {
|
|
|
35
35
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
|
-
* await client.root.
|
|
38
|
+
* await client.root.pingAuthd()
|
|
39
39
|
*/
|
|
40
|
-
|
|
41
|
-
private
|
|
40
|
+
pingAuthd(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<Record<string, string>>;
|
|
41
|
+
private __pingAuthd;
|
|
42
42
|
/**
|
|
43
43
|
* Test endpoint for optionally authenticated requests that works with or without authentication.
|
|
44
44
|
*
|
|
45
45
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
46
46
|
*
|
|
47
47
|
* @example
|
|
48
|
-
* await client.root.
|
|
48
|
+
* await client.root.pingOptionallyAuthd()
|
|
49
49
|
*/
|
|
50
|
-
|
|
51
|
-
private
|
|
50
|
+
pingOptionallyAuthd(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
51
|
+
private __pingOptionallyAuthd;
|
|
52
52
|
/**
|
|
53
53
|
* Returns a greeting message to verify the API is accessible.
|
|
54
54
|
*
|
|
55
55
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
56
|
*
|
|
57
57
|
* @example
|
|
58
|
-
* await client.root.
|
|
58
|
+
* await client.root.pingUnauthd()
|
|
59
59
|
*/
|
|
60
|
-
|
|
61
|
-
private
|
|
60
|
+
pingUnauthd(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
61
|
+
private __pingUnauthd;
|
|
62
62
|
/**
|
|
63
63
|
* Returns a health status message used for monitoring system availability and uptime.
|
|
64
64
|
*
|
|
@@ -75,9 +75,9 @@ export declare class Root {
|
|
|
75
75
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
76
|
*
|
|
77
77
|
* @example
|
|
78
|
-
* await client.root.
|
|
78
|
+
* await client.root.failure()
|
|
79
79
|
*/
|
|
80
|
-
|
|
81
|
-
private
|
|
80
|
+
failure(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
81
|
+
private __failure;
|
|
82
82
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
83
83
|
}
|
|
@@ -60,17 +60,17 @@ class Root {
|
|
|
60
60
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
61
|
*
|
|
62
62
|
* @example
|
|
63
|
-
* await client.root.
|
|
63
|
+
* await client.root.pingAuthd()
|
|
64
64
|
*/
|
|
65
|
-
|
|
66
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
65
|
+
pingAuthd(requestOptions) {
|
|
66
|
+
return core.HttpResponsePromise.fromPromise(this.__pingAuthd(requestOptions));
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
__pingAuthd(requestOptions) {
|
|
69
69
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
70
|
var _a, _b, _c, _d;
|
|
71
71
|
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);
|
|
72
72
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
73
|
-
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, "authd
|
|
73
|
+
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, "authd"),
|
|
74
74
|
method: "GET",
|
|
75
75
|
headers: _headers,
|
|
76
76
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -96,7 +96,7 @@ class Root {
|
|
|
96
96
|
rawResponse: _response.rawResponse,
|
|
97
97
|
});
|
|
98
98
|
case "timeout":
|
|
99
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /authd
|
|
99
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /authd.");
|
|
100
100
|
case "unknown":
|
|
101
101
|
throw new errors.ChrtError({
|
|
102
102
|
message: _response.error.errorMessage,
|
|
@@ -111,17 +111,17 @@ class Root {
|
|
|
111
111
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
112
112
|
*
|
|
113
113
|
* @example
|
|
114
|
-
* await client.root.
|
|
114
|
+
* await client.root.pingOptionallyAuthd()
|
|
115
115
|
*/
|
|
116
|
-
|
|
117
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
116
|
+
pingOptionallyAuthd(requestOptions) {
|
|
117
|
+
return core.HttpResponsePromise.fromPromise(this.__pingOptionallyAuthd(requestOptions));
|
|
118
118
|
}
|
|
119
|
-
|
|
119
|
+
__pingOptionallyAuthd(requestOptions) {
|
|
120
120
|
return __awaiter(this, void 0, void 0, function* () {
|
|
121
121
|
var _a, _b, _c, _d;
|
|
122
122
|
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);
|
|
123
123
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
124
|
-
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, "optionally_authd
|
|
124
|
+
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, "optionally_authd"),
|
|
125
125
|
method: "GET",
|
|
126
126
|
headers: _headers,
|
|
127
127
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -147,7 +147,7 @@ class Root {
|
|
|
147
147
|
rawResponse: _response.rawResponse,
|
|
148
148
|
});
|
|
149
149
|
case "timeout":
|
|
150
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /optionally_authd
|
|
150
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /optionally_authd.");
|
|
151
151
|
case "unknown":
|
|
152
152
|
throw new errors.ChrtError({
|
|
153
153
|
message: _response.error.errorMessage,
|
|
@@ -162,17 +162,17 @@ class Root {
|
|
|
162
162
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
163
163
|
*
|
|
164
164
|
* @example
|
|
165
|
-
* await client.root.
|
|
165
|
+
* await client.root.pingUnauthd()
|
|
166
166
|
*/
|
|
167
|
-
|
|
168
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
167
|
+
pingUnauthd(requestOptions) {
|
|
168
|
+
return core.HttpResponsePromise.fromPromise(this.__pingUnauthd(requestOptions));
|
|
169
169
|
}
|
|
170
|
-
|
|
170
|
+
__pingUnauthd(requestOptions) {
|
|
171
171
|
return __awaiter(this, void 0, void 0, function* () {
|
|
172
172
|
var _a, _b, _c, _d;
|
|
173
173
|
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);
|
|
174
174
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
175
|
-
url:
|
|
175
|
+
url: (_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,
|
|
176
176
|
method: "GET",
|
|
177
177
|
headers: _headers,
|
|
178
178
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -198,7 +198,7 @@ class Root {
|
|
|
198
198
|
rawResponse: _response.rawResponse,
|
|
199
199
|
});
|
|
200
200
|
case "timeout":
|
|
201
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET
|
|
201
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /.");
|
|
202
202
|
case "unknown":
|
|
203
203
|
throw new errors.ChrtError({
|
|
204
204
|
message: _response.error.errorMessage,
|
|
@@ -264,17 +264,17 @@ class Root {
|
|
|
264
264
|
* @param {Root.RequestOptions} requestOptions - Request-specific configuration.
|
|
265
265
|
*
|
|
266
266
|
* @example
|
|
267
|
-
* await client.root.
|
|
267
|
+
* await client.root.failure()
|
|
268
268
|
*/
|
|
269
|
-
|
|
270
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
269
|
+
failure(requestOptions) {
|
|
270
|
+
return core.HttpResponsePromise.fromPromise(this.__failure(requestOptions));
|
|
271
271
|
}
|
|
272
|
-
|
|
272
|
+
__failure(requestOptions) {
|
|
273
273
|
return __awaiter(this, void 0, void 0, function* () {
|
|
274
274
|
var _a, _b, _c, _d;
|
|
275
275
|
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);
|
|
276
276
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
277
|
-
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, "failure
|
|
277
|
+
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, "failure"),
|
|
278
278
|
method: "GET",
|
|
279
279
|
headers: _headers,
|
|
280
280
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -300,7 +300,7 @@ class Root {
|
|
|
300
300
|
rawResponse: _response.rawResponse,
|
|
301
301
|
});
|
|
302
302
|
case "timeout":
|
|
303
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /failure
|
|
303
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /failure.");
|
|
304
304
|
case "unknown":
|
|
305
305
|
throw new errors.ChrtError({
|
|
306
306
|
message: _response.error.errorMessage,
|
|
@@ -67,7 +67,10 @@ export declare class Devices {
|
|
|
67
67
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
68
68
|
*
|
|
69
69
|
* @example
|
|
70
|
-
* await client.tracking.devices.deleteV1(
|
|
70
|
+
* await client.tracking.devices.deleteV1({
|
|
71
|
+
* device_id: "device_id",
|
|
72
|
+
* device_mac_address: "device_mac_address"
|
|
73
|
+
* })
|
|
71
74
|
*/
|
|
72
75
|
deleteV1(request?: Chrt.tracking.DevicesDeleteV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
73
76
|
private __deleteV1;
|
|
@@ -80,7 +83,10 @@ export declare class Devices {
|
|
|
80
83
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
81
84
|
*
|
|
82
85
|
* @example
|
|
83
|
-
* await client.tracking.devices.getV1(
|
|
86
|
+
* await client.tracking.devices.getV1({
|
|
87
|
+
* device_mac_address: "device_mac_address",
|
|
88
|
+
* device_id: "device_id"
|
|
89
|
+
* })
|
|
84
90
|
*/
|
|
85
91
|
getV1(request?: Chrt.tracking.DevicesGetV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<Chrt.Device1>;
|
|
86
92
|
private __getV1;
|
|
@@ -190,7 +190,10 @@ class Devices {
|
|
|
190
190
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
191
191
|
*
|
|
192
192
|
* @example
|
|
193
|
-
* await client.tracking.devices.deleteV1(
|
|
193
|
+
* await client.tracking.devices.deleteV1({
|
|
194
|
+
* device_id: "device_id",
|
|
195
|
+
* device_mac_address: "device_mac_address"
|
|
196
|
+
* })
|
|
194
197
|
*/
|
|
195
198
|
deleteV1(request = {}, requestOptions) {
|
|
196
199
|
return core.HttpResponsePromise.fromPromise(this.__deleteV1(request, requestOptions));
|
|
@@ -257,7 +260,10 @@ class Devices {
|
|
|
257
260
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
258
261
|
*
|
|
259
262
|
* @example
|
|
260
|
-
* await client.tracking.devices.getV1(
|
|
263
|
+
* await client.tracking.devices.getV1({
|
|
264
|
+
* device_mac_address: "device_mac_address",
|
|
265
|
+
* device_id: "device_id"
|
|
266
|
+
* })
|
|
261
267
|
*/
|
|
262
268
|
getV1(request = {}, requestOptions) {
|
|
263
269
|
return core.HttpResponsePromise.fromPromise(this.__getV1(request, requestOptions));
|
|
@@ -80,7 +80,8 @@ export declare class SessionByDevice {
|
|
|
80
80
|
*
|
|
81
81
|
* @example
|
|
82
82
|
* await client.tracking.sessionByDevice.dataPointsV1({
|
|
83
|
-
* session_id: "session_id"
|
|
83
|
+
* session_id: "session_id",
|
|
84
|
+
* limit: 1
|
|
84
85
|
* })
|
|
85
86
|
*/
|
|
86
87
|
dataPointsV1(request: Chrt.tracking.SessionByDeviceDataPointsV1Request, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<Chrt.TrackingSessionByDeviceDataPoint1[]>;
|
|
@@ -231,7 +232,8 @@ export declare class SessionByDevice {
|
|
|
231
232
|
*
|
|
232
233
|
* @example
|
|
233
234
|
* await client.tracking.sessionByDevice.dataPointsPublicV1({
|
|
234
|
-
* session_id: "session_id"
|
|
235
|
+
* session_id: "session_id",
|
|
236
|
+
* limit: 1
|
|
235
237
|
* })
|
|
236
238
|
*/
|
|
237
239
|
dataPointsPublicV1(request: Chrt.tracking.SessionByDeviceDataPointsPublicV1Request, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<Chrt.TrackingSessionByDeviceDataPoint1[]>;
|
|
@@ -247,7 +247,8 @@ class SessionByDevice {
|
|
|
247
247
|
*
|
|
248
248
|
* @example
|
|
249
249
|
* await client.tracking.sessionByDevice.dataPointsV1({
|
|
250
|
-
* session_id: "session_id"
|
|
250
|
+
* session_id: "session_id",
|
|
251
|
+
* limit: 1
|
|
251
252
|
* })
|
|
252
253
|
*/
|
|
253
254
|
dataPointsV1(request, requestOptions) {
|
|
@@ -900,7 +901,8 @@ class SessionByDevice {
|
|
|
900
901
|
*
|
|
901
902
|
* @example
|
|
902
903
|
* await client.tracking.sessionByDevice.dataPointsPublicV1({
|
|
903
|
-
* session_id: "session_id"
|
|
904
|
+
* session_id: "session_id",
|
|
905
|
+
* limit: 1
|
|
904
906
|
* })
|
|
905
907
|
*/
|
|
906
908
|
dataPointsPublicV1(request, requestOptions) {
|
|
@@ -10,7 +10,7 @@ import * as Chrt from "../index.js";
|
|
|
10
10
|
* To ensure geometry is always present, validate it at runtime or make it required.
|
|
11
11
|
*/
|
|
12
12
|
export interface LocationFeature {
|
|
13
|
-
bbox?: unknown[];
|
|
13
|
+
bbox?: unknown[] | null;
|
|
14
14
|
type: "Feature";
|
|
15
15
|
geometry: Chrt.Geometry;
|
|
16
16
|
properties?: Chrt.LocationProperties | null;
|