@chrt-inc/typescript-sdk 1.455.2 → 1.467.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.
Files changed (52) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/tracking/resources/timeseries/resources/sessionByDevice/client/Client.d.ts +10 -6
  3. package/dist/cjs/api/resources/tracking/resources/timeseries/resources/sessionByDevice/client/Client.js +18 -10
  4. package/dist/cjs/api/resources/tracking/resources/timeseries/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsPublicV1Request.d.ts +6 -2
  5. package/dist/cjs/api/resources/tracking/resources/timeseries/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsV1Request.d.ts +6 -2
  6. package/dist/cjs/api/resources/utils/resources/dev/client/Client.d.ts +32 -1
  7. package/dist/cjs/api/resources/utils/resources/dev/client/Client.js +133 -1
  8. package/dist/cjs/api/resources/utils/resources/dev/client/requests/OrderBuilderReq.d.ts +14 -0
  9. package/dist/cjs/api/resources/utils/resources/dev/client/requests/OrderBuilderReq.js +5 -0
  10. package/dist/cjs/api/resources/utils/resources/dev/client/requests/ReadOrderAgentReq.d.ts +12 -0
  11. package/dist/cjs/api/resources/utils/resources/dev/client/requests/ReadOrderAgentReq.js +5 -0
  12. package/dist/cjs/api/resources/utils/resources/dev/client/requests/index.d.ts +2 -0
  13. package/dist/cjs/api/types/OrderBuilderRes.d.ts +9 -0
  14. package/dist/cjs/api/types/OrderBuilderRes.js +5 -0
  15. package/dist/cjs/api/types/ReadOrderAgentRes.d.ts +8 -0
  16. package/dist/cjs/api/types/ReadOrderAgentRes.js +5 -0
  17. package/dist/cjs/api/types/SessionByDeviceDataPoint1.d.ts +1 -0
  18. package/dist/cjs/api/types/SessionByDeviceHistoryRes1.d.ts +8 -0
  19. package/dist/cjs/api/types/SessionByDeviceHistoryRes1.js +5 -0
  20. package/dist/cjs/api/types/StationaryCluster.d.ts +11 -0
  21. package/dist/cjs/api/types/StationaryCluster.js +5 -0
  22. package/dist/cjs/api/types/index.d.ts +4 -0
  23. package/dist/cjs/api/types/index.js +4 -0
  24. package/dist/cjs/version.d.ts +1 -1
  25. package/dist/cjs/version.js +1 -1
  26. package/dist/esm/Client.mjs +2 -2
  27. package/dist/esm/api/resources/tracking/resources/timeseries/resources/sessionByDevice/client/Client.d.mts +10 -6
  28. package/dist/esm/api/resources/tracking/resources/timeseries/resources/sessionByDevice/client/Client.mjs +18 -10
  29. package/dist/esm/api/resources/tracking/resources/timeseries/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsPublicV1Request.d.mts +6 -2
  30. package/dist/esm/api/resources/tracking/resources/timeseries/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsV1Request.d.mts +6 -2
  31. package/dist/esm/api/resources/utils/resources/dev/client/Client.d.mts +32 -1
  32. package/dist/esm/api/resources/utils/resources/dev/client/Client.mjs +133 -1
  33. package/dist/esm/api/resources/utils/resources/dev/client/requests/OrderBuilderReq.d.mts +14 -0
  34. package/dist/esm/api/resources/utils/resources/dev/client/requests/OrderBuilderReq.mjs +4 -0
  35. package/dist/esm/api/resources/utils/resources/dev/client/requests/ReadOrderAgentReq.d.mts +12 -0
  36. package/dist/esm/api/resources/utils/resources/dev/client/requests/ReadOrderAgentReq.mjs +4 -0
  37. package/dist/esm/api/resources/utils/resources/dev/client/requests/index.d.mts +2 -0
  38. package/dist/esm/api/types/OrderBuilderRes.d.mts +9 -0
  39. package/dist/esm/api/types/OrderBuilderRes.mjs +4 -0
  40. package/dist/esm/api/types/ReadOrderAgentRes.d.mts +8 -0
  41. package/dist/esm/api/types/ReadOrderAgentRes.mjs +4 -0
  42. package/dist/esm/api/types/SessionByDeviceDataPoint1.d.mts +1 -0
  43. package/dist/esm/api/types/SessionByDeviceHistoryRes1.d.mts +8 -0
  44. package/dist/esm/api/types/SessionByDeviceHistoryRes1.mjs +4 -0
  45. package/dist/esm/api/types/StationaryCluster.d.mts +11 -0
  46. package/dist/esm/api/types/StationaryCluster.mjs +4 -0
  47. package/dist/esm/api/types/index.d.mts +4 -0
  48. package/dist/esm/api/types/index.mjs +4 -0
  49. package/dist/esm/version.d.mts +1 -1
  50. package/dist/esm/version.mjs +1 -1
  51. package/package.json +1 -1
  52. package/reference.md +142 -7
@@ -52,8 +52,8 @@ class ChrtClient {
52
52
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
53
53
  "X-Fern-Language": "JavaScript",
54
54
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
55
- "X-Fern-SDK-Version": "1.455.2",
56
- "User-Agent": "@chrt-inc/typescript-sdk/1.455.2",
55
+ "X-Fern-SDK-Version": "1.467.0",
56
+ "User-Agent": "@chrt-inc/typescript-sdk/1.467.0",
57
57
  "X-Fern-Runtime": core.RUNTIME.type,
58
58
  "X-Fern-Runtime-Version": core.RUNTIME.version,
59
59
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -46,7 +46,7 @@ export declare class SessionByDevice {
46
46
  lastSeenV1(request: Chrt.tracking.timeseries.SessionByDeviceLastSeenV1Request, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<(Chrt.SessionByDeviceDataPoint1 | null) | undefined>;
47
47
  private __lastSeenV1;
48
48
  /**
49
- * Returns up to the specified number of data points for a session, intelligently sampled across the time range. Excludes outliers. | () -> (list[SessionByDeviceDataPoint1])
49
+ * Returns time-bucketed data points and stationary clusters for a session within the given time range. start_timestamp and end_timestamp are required. | authz: min_org_role=operator | () -> SessionByDeviceHistoryRes1
50
50
  *
51
51
  * @param {Chrt.tracking.timeseries.SessionByDeviceDataPointsV1Request} request
52
52
  * @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
@@ -56,10 +56,12 @@ export declare class SessionByDevice {
56
56
  * @example
57
57
  * await client.tracking.timeseries.sessionByDevice.dataPointsV1({
58
58
  * session_id: "session_id",
59
- * limit: 1
59
+ * start_timestamp: "2024-01-15T09:30:00Z",
60
+ * end_timestamp: "2024-01-15T09:30:00Z",
61
+ * bucket_seconds: 1
60
62
  * })
61
63
  */
62
- dataPointsV1(request: Chrt.tracking.timeseries.SessionByDeviceDataPointsV1Request, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<Chrt.SessionByDeviceDataPoint1[]>;
64
+ dataPointsV1(request: Chrt.tracking.timeseries.SessionByDeviceDataPointsV1Request, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<Chrt.SessionByDeviceHistoryRes1>;
63
65
  private __dataPointsV1;
64
66
  /**
65
67
  * Marks data points as outliers or non-outliers. Uses atomic delete and reinsert strategy for time-series collection updates. | (SessionByDeviceMarkOutliersRequest1) -> (SessionByDeviceMarkOutliersResponse1)
@@ -93,7 +95,7 @@ export declare class SessionByDevice {
93
95
  lastSeenPublicV1(request: Chrt.tracking.timeseries.SessionByDeviceLastSeenPublicV1Request, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<(Chrt.SessionByDeviceDataPoint1 | null) | undefined>;
94
96
  private __lastSeenPublicV1;
95
97
  /**
96
- * Returns up to the specified number of data points for a public session, intelligently sampled across the time range. Excludes outliers. No authentication required if session has public visibility enabled. | () -> (list[SessionByDeviceDataPoint1])
98
+ * Returns time-bucketed data points and stationary clusters for a public session within the given time range. start_timestamp and end_timestamp are required. No authentication required if session has public visibility enabled. | () -> SessionByDeviceHistoryRes1
97
99
  *
98
100
  * @param {Chrt.tracking.timeseries.SessionByDeviceDataPointsPublicV1Request} request
99
101
  * @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
@@ -103,10 +105,12 @@ export declare class SessionByDevice {
103
105
  * @example
104
106
  * await client.tracking.timeseries.sessionByDevice.dataPointsPublicV1({
105
107
  * session_id: "session_id",
106
- * limit: 1
108
+ * start_timestamp: "2024-01-15T09:30:00Z",
109
+ * end_timestamp: "2024-01-15T09:30:00Z",
110
+ * bucket_seconds: 1
107
111
  * })
108
112
  */
109
- dataPointsPublicV1(request: Chrt.tracking.timeseries.SessionByDeviceDataPointsPublicV1Request, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<Chrt.SessionByDeviceDataPoint1[]>;
113
+ dataPointsPublicV1(request: Chrt.tracking.timeseries.SessionByDeviceDataPointsPublicV1Request, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<Chrt.SessionByDeviceHistoryRes1>;
110
114
  private __dataPointsPublicV1;
111
115
  protected _getAuthorizationHeader(): Promise<string | undefined>;
112
116
  }
@@ -123,7 +123,7 @@ class SessionByDevice {
123
123
  });
124
124
  }
125
125
  /**
126
- * Returns up to the specified number of data points for a session, intelligently sampled across the time range. Excludes outliers. | () -> (list[SessionByDeviceDataPoint1])
126
+ * Returns time-bucketed data points and stationary clusters for a session within the given time range. start_timestamp and end_timestamp are required. | authz: min_org_role=operator | () -> SessionByDeviceHistoryRes1
127
127
  *
128
128
  * @param {Chrt.tracking.timeseries.SessionByDeviceDataPointsV1Request} request
129
129
  * @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
@@ -133,7 +133,9 @@ class SessionByDevice {
133
133
  * @example
134
134
  * await client.tracking.timeseries.sessionByDevice.dataPointsV1({
135
135
  * session_id: "session_id",
136
- * limit: 1
136
+ * start_timestamp: "2024-01-15T09:30:00Z",
137
+ * end_timestamp: "2024-01-15T09:30:00Z",
138
+ * bucket_seconds: 1
137
139
  * })
138
140
  */
139
141
  dataPointsV1(request, requestOptions) {
@@ -142,11 +144,13 @@ class SessionByDevice {
142
144
  __dataPointsV1(request, requestOptions) {
143
145
  return __awaiter(this, void 0, void 0, function* () {
144
146
  var _a, _b, _c, _d, _e;
145
- const { session_id: sessionId, limit } = request;
147
+ const { session_id: sessionId, start_timestamp: startTimestamp, end_timestamp: endTimestamp, bucket_seconds: bucketSeconds, } = request;
146
148
  const _queryParams = {};
147
149
  _queryParams["session_id"] = sessionId;
148
- if (limit !== undefined) {
149
- _queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
150
+ _queryParams["start_timestamp"] = startTimestamp;
151
+ _queryParams["end_timestamp"] = endTimestamp;
152
+ if (bucketSeconds !== undefined) {
153
+ _queryParams["bucket_seconds"] = (_a = bucketSeconds === null || bucketSeconds === void 0 ? void 0 : bucketSeconds.toString()) !== null && _a !== void 0 ? _a : null;
150
154
  }
151
155
  let _headers = (0, headers_js_1.mergeHeaders)((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
152
156
  const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
@@ -326,7 +330,7 @@ class SessionByDevice {
326
330
  });
327
331
  }
328
332
  /**
329
- * Returns up to the specified number of data points for a public session, intelligently sampled across the time range. Excludes outliers. No authentication required if session has public visibility enabled. | () -> (list[SessionByDeviceDataPoint1])
333
+ * Returns time-bucketed data points and stationary clusters for a public session within the given time range. start_timestamp and end_timestamp are required. No authentication required if session has public visibility enabled. | () -> SessionByDeviceHistoryRes1
330
334
  *
331
335
  * @param {Chrt.tracking.timeseries.SessionByDeviceDataPointsPublicV1Request} request
332
336
  * @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
@@ -336,7 +340,9 @@ class SessionByDevice {
336
340
  * @example
337
341
  * await client.tracking.timeseries.sessionByDevice.dataPointsPublicV1({
338
342
  * session_id: "session_id",
339
- * limit: 1
343
+ * start_timestamp: "2024-01-15T09:30:00Z",
344
+ * end_timestamp: "2024-01-15T09:30:00Z",
345
+ * bucket_seconds: 1
340
346
  * })
341
347
  */
342
348
  dataPointsPublicV1(request, requestOptions) {
@@ -345,11 +351,13 @@ class SessionByDevice {
345
351
  __dataPointsPublicV1(request, requestOptions) {
346
352
  return __awaiter(this, void 0, void 0, function* () {
347
353
  var _a, _b, _c, _d, _e;
348
- const { session_id: sessionId, limit } = request;
354
+ const { session_id: sessionId, start_timestamp: startTimestamp, end_timestamp: endTimestamp, bucket_seconds: bucketSeconds, } = request;
349
355
  const _queryParams = {};
350
356
  _queryParams["session_id"] = sessionId;
351
- if (limit !== undefined) {
352
- _queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
357
+ _queryParams["start_timestamp"] = startTimestamp;
358
+ _queryParams["end_timestamp"] = endTimestamp;
359
+ if (bucketSeconds !== undefined) {
360
+ _queryParams["bucket_seconds"] = (_a = bucketSeconds === null || bucketSeconds === void 0 ? void 0 : bucketSeconds.toString()) !== null && _a !== void 0 ? _a : null;
353
361
  }
354
362
  let _headers = (0, headers_js_1.mergeHeaders)((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
355
363
  const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
@@ -5,10 +5,14 @@
5
5
  * @example
6
6
  * {
7
7
  * session_id: "session_id",
8
- * limit: 1
8
+ * start_timestamp: "2024-01-15T09:30:00Z",
9
+ * end_timestamp: "2024-01-15T09:30:00Z",
10
+ * bucket_seconds: 1
9
11
  * }
10
12
  */
11
13
  export interface SessionByDeviceDataPointsPublicV1Request {
12
14
  session_id: string;
13
- limit?: number | null;
15
+ start_timestamp: string;
16
+ end_timestamp: string;
17
+ bucket_seconds?: number | null;
14
18
  }
@@ -5,10 +5,14 @@
5
5
  * @example
6
6
  * {
7
7
  * session_id: "session_id",
8
- * limit: 1
8
+ * start_timestamp: "2024-01-15T09:30:00Z",
9
+ * end_timestamp: "2024-01-15T09:30:00Z",
10
+ * bucket_seconds: 1
9
11
  * }
10
12
  */
11
13
  export interface SessionByDeviceDataPointsV1Request {
12
14
  session_id: string;
13
- limit?: number | null;
15
+ start_timestamp: string;
16
+ end_timestamp: string;
17
+ bucket_seconds?: number | null;
14
18
  }
@@ -43,6 +43,37 @@ export declare class Dev {
43
43
  */
44
44
  postAgentV1(request?: Chrt.utils.AgentReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.AgentRes>;
45
45
  private __postAgentV1;
46
+ /**
47
+ * Fetches expanded order data and returns an AI-generated natural-language summary. | (ReadOrderAgentReq) -> (ReadOrderAgentRes)
48
+ *
49
+ * @param {Chrt.utils.ReadOrderAgentReq} request
50
+ * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
51
+ *
52
+ * @throws {@link Chrt.UnprocessableEntityError}
53
+ *
54
+ * @example
55
+ * await client.utils.dev.postAgentOrderV1({
56
+ * order_id: "order_id"
57
+ * })
58
+ */
59
+ postAgentOrderV1(request: Chrt.utils.ReadOrderAgentReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.ReadOrderAgentRes>;
60
+ private __postAgentOrderV1;
61
+ /**
62
+ * Populates an existing order draft with cargo, task groups, and tasks parsed from natural language. The frontend must create the draft first via /shipping/order_drafts/new/v1. | (OrderBuilderReq) -> (OrderBuilderRes)
63
+ *
64
+ * @param {Chrt.utils.OrderBuilderReq} request
65
+ * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
66
+ *
67
+ * @throws {@link Chrt.UnprocessableEntityError}
68
+ *
69
+ * @example
70
+ * await client.utils.dev.postAgentOrderBuilderV1({
71
+ * order_short_id: "order_short_id",
72
+ * text: "text"
73
+ * })
74
+ */
75
+ postAgentOrderBuilderV1(request: Chrt.utils.OrderBuilderReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.OrderBuilderRes>;
76
+ private __postAgentOrderBuilderV1;
46
77
  /**
47
78
  * (DEPRECATED) Extracts and returns the user ID from the authenticated request's JWT token. | () -> (str)
48
79
  *
@@ -118,7 +149,7 @@ export declare class Dev {
118
149
  * @example
119
150
  * await client.utils.dev.getGitInfoV1()
120
151
  */
121
- getGitInfoV1(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Record<string, string>>;
152
+ getGitInfoV1(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Record<string, (string | null) | undefined>>;
122
153
  private __getGitInfoV1;
123
154
  protected _getAuthorizationHeader(): Promise<string | undefined>;
124
155
  }
@@ -117,6 +117,135 @@ class Dev {
117
117
  }
118
118
  });
119
119
  }
120
+ /**
121
+ * Fetches expanded order data and returns an AI-generated natural-language summary. | (ReadOrderAgentReq) -> (ReadOrderAgentRes)
122
+ *
123
+ * @param {Chrt.utils.ReadOrderAgentReq} request
124
+ * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
125
+ *
126
+ * @throws {@link Chrt.UnprocessableEntityError}
127
+ *
128
+ * @example
129
+ * await client.utils.dev.postAgentOrderV1({
130
+ * order_id: "order_id"
131
+ * })
132
+ */
133
+ postAgentOrderV1(request, requestOptions) {
134
+ return core.HttpResponsePromise.fromPromise(this.__postAgentOrderV1(request, requestOptions));
135
+ }
136
+ __postAgentOrderV1(request, requestOptions) {
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ var _a, _b, _c, _d;
139
+ 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);
140
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
141
+ 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, "dev/agent/order/v1"),
142
+ method: "POST",
143
+ headers: _headers,
144
+ contentType: "application/json",
145
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
146
+ requestType: "json",
147
+ body: request,
148
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
149
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
150
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
151
+ });
152
+ if (_response.ok) {
153
+ return { data: _response.body, rawResponse: _response.rawResponse };
154
+ }
155
+ if (_response.error.reason === "status-code") {
156
+ switch (_response.error.statusCode) {
157
+ case 422:
158
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
159
+ default:
160
+ throw new errors.ChrtError({
161
+ statusCode: _response.error.statusCode,
162
+ body: _response.error.body,
163
+ rawResponse: _response.rawResponse,
164
+ });
165
+ }
166
+ }
167
+ switch (_response.error.reason) {
168
+ case "non-json":
169
+ throw new errors.ChrtError({
170
+ statusCode: _response.error.statusCode,
171
+ body: _response.error.rawBody,
172
+ rawResponse: _response.rawResponse,
173
+ });
174
+ case "timeout":
175
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /dev/agent/order/v1.");
176
+ case "unknown":
177
+ throw new errors.ChrtError({
178
+ message: _response.error.errorMessage,
179
+ rawResponse: _response.rawResponse,
180
+ });
181
+ }
182
+ });
183
+ }
184
+ /**
185
+ * Populates an existing order draft with cargo, task groups, and tasks parsed from natural language. The frontend must create the draft first via /shipping/order_drafts/new/v1. | (OrderBuilderReq) -> (OrderBuilderRes)
186
+ *
187
+ * @param {Chrt.utils.OrderBuilderReq} request
188
+ * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
189
+ *
190
+ * @throws {@link Chrt.UnprocessableEntityError}
191
+ *
192
+ * @example
193
+ * await client.utils.dev.postAgentOrderBuilderV1({
194
+ * order_short_id: "order_short_id",
195
+ * text: "text"
196
+ * })
197
+ */
198
+ postAgentOrderBuilderV1(request, requestOptions) {
199
+ return core.HttpResponsePromise.fromPromise(this.__postAgentOrderBuilderV1(request, requestOptions));
200
+ }
201
+ __postAgentOrderBuilderV1(request, requestOptions) {
202
+ return __awaiter(this, void 0, void 0, function* () {
203
+ var _a, _b, _c, _d;
204
+ 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);
205
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
206
+ 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, "dev/agent/order-builder/v1"),
207
+ method: "POST",
208
+ headers: _headers,
209
+ contentType: "application/json",
210
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
211
+ requestType: "json",
212
+ body: request,
213
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
214
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
215
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
216
+ });
217
+ if (_response.ok) {
218
+ return { data: _response.body, rawResponse: _response.rawResponse };
219
+ }
220
+ if (_response.error.reason === "status-code") {
221
+ switch (_response.error.statusCode) {
222
+ case 422:
223
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
224
+ default:
225
+ throw new errors.ChrtError({
226
+ statusCode: _response.error.statusCode,
227
+ body: _response.error.body,
228
+ rawResponse: _response.rawResponse,
229
+ });
230
+ }
231
+ }
232
+ switch (_response.error.reason) {
233
+ case "non-json":
234
+ throw new errors.ChrtError({
235
+ statusCode: _response.error.statusCode,
236
+ body: _response.error.rawBody,
237
+ rawResponse: _response.rawResponse,
238
+ });
239
+ case "timeout":
240
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /dev/agent/order-builder/v1.");
241
+ case "unknown":
242
+ throw new errors.ChrtError({
243
+ message: _response.error.errorMessage,
244
+ rawResponse: _response.rawResponse,
245
+ });
246
+ }
247
+ });
248
+ }
120
249
  /**
121
250
  * (DEPRECATED) Extracts and returns the user ID from the authenticated request's JWT token. | () -> (str)
122
251
  *
@@ -463,7 +592,10 @@ class Dev {
463
592
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
464
593
  });
465
594
  if (_response.ok) {
466
- return { data: _response.body, rawResponse: _response.rawResponse };
595
+ return {
596
+ data: _response.body,
597
+ rawResponse: _response.rawResponse,
598
+ };
467
599
  }
468
600
  if (_response.error.reason === "status-code") {
469
601
  throw new errors.ChrtError({
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * order_short_id: "order_short_id",
8
+ * text: "text"
9
+ * }
10
+ */
11
+ export interface OrderBuilderReq {
12
+ order_short_id: string;
13
+ text: string;
14
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * order_id: "order_id"
8
+ * }
9
+ */
10
+ export interface ReadOrderAgentReq {
11
+ order_id: string;
12
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,4 @@
1
1
  export { type AgentReq } from "./AgentReq.js";
2
+ export { type ReadOrderAgentReq } from "./ReadOrderAgentReq.js";
3
+ export { type OrderBuilderReq } from "./OrderBuilderReq.js";
2
4
  export { type TemplateReq } from "./TemplateReq.js";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface OrderBuilderRes {
5
+ order_id: string;
6
+ order_short_id: string;
7
+ summary: string;
8
+ validation_passed?: boolean;
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ReadOrderAgentRes {
5
+ order_id: string;
6
+ status: string;
7
+ summary: string;
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,6 +5,7 @@ import * as Chrt from "../index.js";
5
5
  export interface SessionByDeviceDataPoint1 {
6
6
  schema_version: number;
7
7
  timestamp: string;
8
+ received_at_timestamp?: string | null;
8
9
  metadata: Chrt.SessionByDeviceDataPointMetadata1;
9
10
  location: Chrt.LocationFeature;
10
11
  temperature?: number | null;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export interface SessionByDeviceHistoryRes1 {
6
+ data_points: Chrt.SessionByDeviceDataPoint1[];
7
+ stationary_clusters: Chrt.StationaryCluster[];
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export interface StationaryCluster {
6
+ start_timestamp: string;
7
+ end_timestamp: string;
8
+ centroid_location: Chrt.LocationFeature;
9
+ radius_miles: number;
10
+ point_count: number;
11
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -76,6 +76,7 @@ export * from "./OffChrtShipperOrg1.js";
76
76
  export * from "./OnboardCourierTaskActionEnum1.js";
77
77
  export * from "./Order1.js";
78
78
  export * from "./OrderAndTaskGroupExpandedReq.js";
79
+ export * from "./OrderBuilderRes.js";
79
80
  export * from "./OrderDraftExpanded.js";
80
81
  export * from "./OrderDraftExpandedListRes.js";
81
82
  export * from "./OrderDraftSortByEnum.js";
@@ -106,10 +107,12 @@ export * from "./Quote.js";
106
107
  export * from "./RateSheet1.js";
107
108
  export * from "./RateSheetListResponse.js";
108
109
  export * from "./RateSheetSortByEnum.js";
110
+ export * from "./ReadOrderAgentRes.js";
109
111
  export * from "./ServiceTypeEnum1.js";
110
112
  export * from "./Session1.js";
111
113
  export * from "./SessionByDeviceDataPoint1.js";
112
114
  export * from "./SessionByDeviceDataPointMetadata1.js";
115
+ export * from "./SessionByDeviceHistoryRes1.js";
113
116
  export * from "./SessionByDeviceMarkOutliersResponse1.js";
114
117
  export * from "./SessionListRes.js";
115
118
  export * from "./SessionSearchRes.js";
@@ -142,6 +145,7 @@ export * from "./StatementExpandedRes.js";
142
145
  export * from "./StatementSortByEnum.js";
143
146
  export * from "./StatementStatusEnum1.js";
144
147
  export * from "./StatementsListRes.js";
148
+ export * from "./StationaryCluster.js";
145
149
  export * from "./StripeConnectAccountOnboardingLinkRes.js";
146
150
  export * from "./StripeConnectInvoiceStatusEnum.js";
147
151
  export * from "./Task1.js";
@@ -92,6 +92,7 @@ __exportStar(require("./OffChrtShipperOrg1.js"), exports);
92
92
  __exportStar(require("./OnboardCourierTaskActionEnum1.js"), exports);
93
93
  __exportStar(require("./Order1.js"), exports);
94
94
  __exportStar(require("./OrderAndTaskGroupExpandedReq.js"), exports);
95
+ __exportStar(require("./OrderBuilderRes.js"), exports);
95
96
  __exportStar(require("./OrderDraftExpanded.js"), exports);
96
97
  __exportStar(require("./OrderDraftExpandedListRes.js"), exports);
97
98
  __exportStar(require("./OrderDraftSortByEnum.js"), exports);
@@ -122,10 +123,12 @@ __exportStar(require("./Quote.js"), exports);
122
123
  __exportStar(require("./RateSheet1.js"), exports);
123
124
  __exportStar(require("./RateSheetListResponse.js"), exports);
124
125
  __exportStar(require("./RateSheetSortByEnum.js"), exports);
126
+ __exportStar(require("./ReadOrderAgentRes.js"), exports);
125
127
  __exportStar(require("./ServiceTypeEnum1.js"), exports);
126
128
  __exportStar(require("./Session1.js"), exports);
127
129
  __exportStar(require("./SessionByDeviceDataPoint1.js"), exports);
128
130
  __exportStar(require("./SessionByDeviceDataPointMetadata1.js"), exports);
131
+ __exportStar(require("./SessionByDeviceHistoryRes1.js"), exports);
129
132
  __exportStar(require("./SessionByDeviceMarkOutliersResponse1.js"), exports);
130
133
  __exportStar(require("./SessionListRes.js"), exports);
131
134
  __exportStar(require("./SessionSearchRes.js"), exports);
@@ -158,6 +161,7 @@ __exportStar(require("./StatementExpandedRes.js"), exports);
158
161
  __exportStar(require("./StatementSortByEnum.js"), exports);
159
162
  __exportStar(require("./StatementStatusEnum1.js"), exports);
160
163
  __exportStar(require("./StatementsListRes.js"), exports);
164
+ __exportStar(require("./StationaryCluster.js"), exports);
161
165
  __exportStar(require("./StripeConnectAccountOnboardingLinkRes.js"), exports);
162
166
  __exportStar(require("./StripeConnectInvoiceStatusEnum.js"), exports);
163
167
  __exportStar(require("./Task1.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.455.2";
1
+ export declare const SDK_VERSION = "1.467.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.455.2";
4
+ exports.SDK_VERSION = "1.467.0";
@@ -16,8 +16,8 @@ export class ChrtClient {
16
16
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
17
17
  "X-Fern-Language": "JavaScript",
18
18
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
19
- "X-Fern-SDK-Version": "1.455.2",
20
- "User-Agent": "@chrt-inc/typescript-sdk/1.455.2",
19
+ "X-Fern-SDK-Version": "1.467.0",
20
+ "User-Agent": "@chrt-inc/typescript-sdk/1.467.0",
21
21
  "X-Fern-Runtime": core.RUNTIME.type,
22
22
  "X-Fern-Runtime-Version": core.RUNTIME.version,
23
23
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -46,7 +46,7 @@ export declare class SessionByDevice {
46
46
  lastSeenV1(request: Chrt.tracking.timeseries.SessionByDeviceLastSeenV1Request, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<(Chrt.SessionByDeviceDataPoint1 | null) | undefined>;
47
47
  private __lastSeenV1;
48
48
  /**
49
- * Returns up to the specified number of data points for a session, intelligently sampled across the time range. Excludes outliers. | () -> (list[SessionByDeviceDataPoint1])
49
+ * Returns time-bucketed data points and stationary clusters for a session within the given time range. start_timestamp and end_timestamp are required. | authz: min_org_role=operator | () -> SessionByDeviceHistoryRes1
50
50
  *
51
51
  * @param {Chrt.tracking.timeseries.SessionByDeviceDataPointsV1Request} request
52
52
  * @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
@@ -56,10 +56,12 @@ export declare class SessionByDevice {
56
56
  * @example
57
57
  * await client.tracking.timeseries.sessionByDevice.dataPointsV1({
58
58
  * session_id: "session_id",
59
- * limit: 1
59
+ * start_timestamp: "2024-01-15T09:30:00Z",
60
+ * end_timestamp: "2024-01-15T09:30:00Z",
61
+ * bucket_seconds: 1
60
62
  * })
61
63
  */
62
- dataPointsV1(request: Chrt.tracking.timeseries.SessionByDeviceDataPointsV1Request, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<Chrt.SessionByDeviceDataPoint1[]>;
64
+ dataPointsV1(request: Chrt.tracking.timeseries.SessionByDeviceDataPointsV1Request, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<Chrt.SessionByDeviceHistoryRes1>;
63
65
  private __dataPointsV1;
64
66
  /**
65
67
  * Marks data points as outliers or non-outliers. Uses atomic delete and reinsert strategy for time-series collection updates. | (SessionByDeviceMarkOutliersRequest1) -> (SessionByDeviceMarkOutliersResponse1)
@@ -93,7 +95,7 @@ export declare class SessionByDevice {
93
95
  lastSeenPublicV1(request: Chrt.tracking.timeseries.SessionByDeviceLastSeenPublicV1Request, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<(Chrt.SessionByDeviceDataPoint1 | null) | undefined>;
94
96
  private __lastSeenPublicV1;
95
97
  /**
96
- * Returns up to the specified number of data points for a public session, intelligently sampled across the time range. Excludes outliers. No authentication required if session has public visibility enabled. | () -> (list[SessionByDeviceDataPoint1])
98
+ * Returns time-bucketed data points and stationary clusters for a public session within the given time range. start_timestamp and end_timestamp are required. No authentication required if session has public visibility enabled. | () -> SessionByDeviceHistoryRes1
97
99
  *
98
100
  * @param {Chrt.tracking.timeseries.SessionByDeviceDataPointsPublicV1Request} request
99
101
  * @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
@@ -103,10 +105,12 @@ export declare class SessionByDevice {
103
105
  * @example
104
106
  * await client.tracking.timeseries.sessionByDevice.dataPointsPublicV1({
105
107
  * session_id: "session_id",
106
- * limit: 1
108
+ * start_timestamp: "2024-01-15T09:30:00Z",
109
+ * end_timestamp: "2024-01-15T09:30:00Z",
110
+ * bucket_seconds: 1
107
111
  * })
108
112
  */
109
- dataPointsPublicV1(request: Chrt.tracking.timeseries.SessionByDeviceDataPointsPublicV1Request, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<Chrt.SessionByDeviceDataPoint1[]>;
113
+ dataPointsPublicV1(request: Chrt.tracking.timeseries.SessionByDeviceDataPointsPublicV1Request, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<Chrt.SessionByDeviceHistoryRes1>;
110
114
  private __dataPointsPublicV1;
111
115
  protected _getAuthorizationHeader(): Promise<string | undefined>;
112
116
  }