@chrt-inc/typescript-sdk 1.638.0 → 1.640.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 (50) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/utils/resources/dev/client/Client.d.ts +28 -0
  3. package/dist/cjs/api/resources/utils/resources/dev/client/Client.js +126 -0
  4. package/dist/cjs/api/resources/utils/resources/dev/client/requests/PingReq.d.ts +10 -0
  5. package/dist/cjs/api/resources/utils/resources/dev/client/requests/PingReq.js +5 -0
  6. package/dist/cjs/api/resources/utils/resources/dev/client/requests/ScheduledHelloPocReq.d.ts +15 -0
  7. package/dist/cjs/api/resources/utils/resources/dev/client/requests/ScheduledHelloPocReq.js +5 -0
  8. package/dist/cjs/api/resources/utils/resources/dev/client/requests/index.d.ts +2 -0
  9. package/dist/cjs/api/types/PingRes.d.ts +9 -0
  10. package/dist/cjs/api/types/PingRes.js +5 -0
  11. package/dist/cjs/api/types/ScheduleCalendarSpec.d.ts +14 -0
  12. package/dist/cjs/api/types/ScheduleCalendarSpec.js +5 -0
  13. package/dist/cjs/api/types/ScheduleIntervalSpec.d.ts +7 -0
  14. package/dist/cjs/api/types/ScheduleIntervalSpec.js +5 -0
  15. package/dist/cjs/api/types/ScheduleRange.d.ts +8 -0
  16. package/dist/cjs/api/types/ScheduleRange.js +5 -0
  17. package/dist/cjs/api/types/ScheduleSpec.d.ts +14 -0
  18. package/dist/cjs/api/types/ScheduleSpec.js +5 -0
  19. package/dist/cjs/api/types/ScheduledHelloPocRes.d.ts +16 -0
  20. package/dist/cjs/api/types/ScheduledHelloPocRes.js +5 -0
  21. package/dist/cjs/api/types/index.d.ts +6 -0
  22. package/dist/cjs/api/types/index.js +6 -0
  23. package/dist/cjs/version.d.ts +1 -1
  24. package/dist/cjs/version.js +1 -1
  25. package/dist/esm/Client.mjs +2 -2
  26. package/dist/esm/api/resources/utils/resources/dev/client/Client.d.mts +28 -0
  27. package/dist/esm/api/resources/utils/resources/dev/client/Client.mjs +126 -0
  28. package/dist/esm/api/resources/utils/resources/dev/client/requests/PingReq.d.mts +10 -0
  29. package/dist/esm/api/resources/utils/resources/dev/client/requests/PingReq.mjs +4 -0
  30. package/dist/esm/api/resources/utils/resources/dev/client/requests/ScheduledHelloPocReq.d.mts +15 -0
  31. package/dist/esm/api/resources/utils/resources/dev/client/requests/ScheduledHelloPocReq.mjs +4 -0
  32. package/dist/esm/api/resources/utils/resources/dev/client/requests/index.d.mts +2 -0
  33. package/dist/esm/api/types/PingRes.d.mts +9 -0
  34. package/dist/esm/api/types/PingRes.mjs +4 -0
  35. package/dist/esm/api/types/ScheduleCalendarSpec.d.mts +14 -0
  36. package/dist/esm/api/types/ScheduleCalendarSpec.mjs +4 -0
  37. package/dist/esm/api/types/ScheduleIntervalSpec.d.mts +7 -0
  38. package/dist/esm/api/types/ScheduleIntervalSpec.mjs +4 -0
  39. package/dist/esm/api/types/ScheduleRange.d.mts +8 -0
  40. package/dist/esm/api/types/ScheduleRange.mjs +4 -0
  41. package/dist/esm/api/types/ScheduleSpec.d.mts +14 -0
  42. package/dist/esm/api/types/ScheduleSpec.mjs +4 -0
  43. package/dist/esm/api/types/ScheduledHelloPocRes.d.mts +16 -0
  44. package/dist/esm/api/types/ScheduledHelloPocRes.mjs +4 -0
  45. package/dist/esm/api/types/index.d.mts +6 -0
  46. package/dist/esm/api/types/index.mjs +6 -0
  47. package/dist/esm/version.d.mts +1 -1
  48. package/dist/esm/version.mjs +1 -1
  49. package/package.json +1 -1
  50. package/reference.md +128 -0
@@ -56,8 +56,8 @@ class ChrtClient {
56
56
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
57
57
  "X-Fern-Language": "JavaScript",
58
58
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
59
- "X-Fern-SDK-Version": "1.638.0",
60
- "User-Agent": "@chrt-inc/typescript-sdk/1.638.0",
59
+ "X-Fern-SDK-Version": "1.640.0",
60
+ "User-Agent": "@chrt-inc/typescript-sdk/1.640.0",
61
61
  "X-Fern-Runtime": core.RUNTIME.type,
62
62
  "X-Fern-Runtime-Version": core.RUNTIME.version,
63
63
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -30,6 +30,21 @@ export declare namespace Dev {
30
30
  export declare class Dev {
31
31
  protected readonly _options: Dev.Options;
32
32
  constructor(_options?: Dev.Options);
33
+ /**
34
+ * Creates or updates a Temporal Schedule that runs the scheduled hello workflow for a driver. | authz: min_org_role=administrator | (ScheduledHelloPocReq) -> (ScheduledHelloPocRes)
35
+ *
36
+ * @param {Chrt.utils.ScheduledHelloPocReq} request
37
+ * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
38
+ *
39
+ * @throws {@link Chrt.UnprocessableEntityError}
40
+ *
41
+ * @example
42
+ * await client.utils.dev.postAgentScheduledHelloPocV1({
43
+ * driver_name: "driver_name"
44
+ * })
45
+ */
46
+ postAgentScheduledHelloPocV1(request: Chrt.utils.ScheduledHelloPocReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.ScheduledHelloPocRes>;
47
+ private __postAgentScheduledHelloPocV1;
33
48
  /**
34
49
  * Runs a customer service agent that responds with logistics fun facts (real order data not yet available). | (AgentReq) -> (AgentRes)
35
50
  *
@@ -43,6 +58,19 @@ export declare class Dev {
43
58
  */
44
59
  postAgentV1(request?: Chrt.utils.AgentReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.AgentRes>;
45
60
  private __postAgentV1;
61
+ /**
62
+ * Runs a lightweight Temporal workflow and activity round trip for developer diagnostics. | (PingReq) -> (PingRes)
63
+ *
64
+ * @param {Chrt.utils.PingReq} request
65
+ * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
66
+ *
67
+ * @throws {@link Chrt.UnprocessableEntityError}
68
+ *
69
+ * @example
70
+ * await client.utils.dev.postAgentPingV1()
71
+ */
72
+ postAgentPingV1(request?: Chrt.utils.PingReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.PingRes>;
73
+ private __postAgentPingV1;
46
74
  /**
47
75
  * Fetches expanded order data and returns an AI-generated natural-language summary. | (ReadOrderAgentReq) -> (ReadOrderAgentRes)
48
76
  *
@@ -55,6 +55,70 @@ class Dev {
55
55
  constructor(_options = {}) {
56
56
  this._options = _options;
57
57
  }
58
+ /**
59
+ * Creates or updates a Temporal Schedule that runs the scheduled hello workflow for a driver. | authz: min_org_role=administrator | (ScheduledHelloPocReq) -> (ScheduledHelloPocRes)
60
+ *
61
+ * @param {Chrt.utils.ScheduledHelloPocReq} request
62
+ * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link Chrt.UnprocessableEntityError}
65
+ *
66
+ * @example
67
+ * await client.utils.dev.postAgentScheduledHelloPocV1({
68
+ * driver_name: "driver_name"
69
+ * })
70
+ */
71
+ postAgentScheduledHelloPocV1(request, requestOptions) {
72
+ return core.HttpResponsePromise.fromPromise(this.__postAgentScheduledHelloPocV1(request, requestOptions));
73
+ }
74
+ __postAgentScheduledHelloPocV1(request, requestOptions) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ var _a, _b, _c, _d;
77
+ 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);
78
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
79
+ 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/scheduled-hello-poc/v1"),
80
+ method: "POST",
81
+ headers: _headers,
82
+ contentType: "application/json",
83
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
84
+ requestType: "json",
85
+ body: request,
86
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
87
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
88
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
89
+ });
90
+ if (_response.ok) {
91
+ return { data: _response.body, rawResponse: _response.rawResponse };
92
+ }
93
+ if (_response.error.reason === "status-code") {
94
+ switch (_response.error.statusCode) {
95
+ case 422:
96
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
97
+ default:
98
+ throw new errors.ChrtError({
99
+ statusCode: _response.error.statusCode,
100
+ body: _response.error.body,
101
+ rawResponse: _response.rawResponse,
102
+ });
103
+ }
104
+ }
105
+ switch (_response.error.reason) {
106
+ case "non-json":
107
+ throw new errors.ChrtError({
108
+ statusCode: _response.error.statusCode,
109
+ body: _response.error.rawBody,
110
+ rawResponse: _response.rawResponse,
111
+ });
112
+ case "timeout":
113
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /dev/agent/scheduled-hello-poc/v1.");
114
+ case "unknown":
115
+ throw new errors.ChrtError({
116
+ message: _response.error.errorMessage,
117
+ rawResponse: _response.rawResponse,
118
+ });
119
+ }
120
+ });
121
+ }
58
122
  /**
59
123
  * Runs a customer service agent that responds with logistics fun facts (real order data not yet available). | (AgentReq) -> (AgentRes)
60
124
  *
@@ -117,6 +181,68 @@ class Dev {
117
181
  }
118
182
  });
119
183
  }
184
+ /**
185
+ * Runs a lightweight Temporal workflow and activity round trip for developer diagnostics. | (PingReq) -> (PingRes)
186
+ *
187
+ * @param {Chrt.utils.PingReq} request
188
+ * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
189
+ *
190
+ * @throws {@link Chrt.UnprocessableEntityError}
191
+ *
192
+ * @example
193
+ * await client.utils.dev.postAgentPingV1()
194
+ */
195
+ postAgentPingV1(request = {}, requestOptions) {
196
+ return core.HttpResponsePromise.fromPromise(this.__postAgentPingV1(request, requestOptions));
197
+ }
198
+ __postAgentPingV1() {
199
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
200
+ var _a, _b, _c, _d;
201
+ 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);
202
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
203
+ 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/ping/v1"),
204
+ method: "POST",
205
+ headers: _headers,
206
+ contentType: "application/json",
207
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
208
+ requestType: "json",
209
+ body: request,
210
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
211
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
212
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
213
+ });
214
+ if (_response.ok) {
215
+ return { data: _response.body, rawResponse: _response.rawResponse };
216
+ }
217
+ if (_response.error.reason === "status-code") {
218
+ switch (_response.error.statusCode) {
219
+ case 422:
220
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
221
+ default:
222
+ throw new errors.ChrtError({
223
+ statusCode: _response.error.statusCode,
224
+ body: _response.error.body,
225
+ rawResponse: _response.rawResponse,
226
+ });
227
+ }
228
+ }
229
+ switch (_response.error.reason) {
230
+ case "non-json":
231
+ throw new errors.ChrtError({
232
+ statusCode: _response.error.statusCode,
233
+ body: _response.error.rawBody,
234
+ rawResponse: _response.rawResponse,
235
+ });
236
+ case "timeout":
237
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /dev/agent/ping/v1.");
238
+ case "unknown":
239
+ throw new errors.ChrtError({
240
+ message: _response.error.errorMessage,
241
+ rawResponse: _response.rawResponse,
242
+ });
243
+ }
244
+ });
245
+ }
120
246
  /**
121
247
  * Fetches expanded order data and returns an AI-generated natural-language summary. | (ReadOrderAgentReq) -> (ReadOrderAgentRes)
122
248
  *
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface PingReq {
9
+ nonce?: string | null;
10
+ }
@@ -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,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../../../../../../index.js";
5
+ /**
6
+ * @example
7
+ * {
8
+ * driver_name: "driver_name"
9
+ * }
10
+ */
11
+ export interface ScheduledHelloPocReq {
12
+ driver_name: string;
13
+ schedule_spec?: Chrt.ScheduleSpec;
14
+ catchup_window_seconds?: number;
15
+ }
@@ -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,3 +1,5 @@
1
+ export { type ScheduledHelloPocReq } from "./ScheduledHelloPocReq.js";
1
2
  export { type AgentReq } from "./AgentReq.js";
3
+ export { type PingReq } from "./PingReq.js";
2
4
  export { type ReadOrderAgentReq } from "./ReadOrderAgentReq.js";
3
5
  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 PingRes {
5
+ response: string;
6
+ nonce: string;
7
+ workflow_timestamp: string;
8
+ activity_timestamp: string;
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,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export interface ScheduleCalendarSpec {
6
+ second?: Chrt.ScheduleRange[];
7
+ minute?: Chrt.ScheduleRange[];
8
+ hour?: Chrt.ScheduleRange[];
9
+ day_of_month?: Chrt.ScheduleRange[];
10
+ month?: Chrt.ScheduleRange[];
11
+ year?: Chrt.ScheduleRange[];
12
+ day_of_week?: Chrt.ScheduleRange[];
13
+ comment?: string | null;
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,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ScheduleIntervalSpec {
5
+ every: string;
6
+ offset?: string | null;
7
+ }
@@ -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 ScheduleRange {
5
+ start: number;
6
+ end?: number;
7
+ step?: number;
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,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export interface ScheduleSpec {
6
+ calendars?: Chrt.ScheduleCalendarSpec[];
7
+ intervals?: Chrt.ScheduleIntervalSpec[];
8
+ cron_expressions?: string[];
9
+ skip?: Chrt.ScheduleCalendarSpec[];
10
+ start_at?: string | null;
11
+ end_at?: string | null;
12
+ jitter?: string | null;
13
+ time_zone_name?: string | null;
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,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export interface ScheduledHelloPocRes {
6
+ schedule_id: string;
7
+ order_id: string;
8
+ driver_name: string;
9
+ workflow_name: string;
10
+ workflow_id: string;
11
+ task_queue: string;
12
+ schedule_spec: Chrt.ScheduleSpec;
13
+ catchup_window_seconds: number;
14
+ created: boolean;
15
+ next_action_times: string[];
16
+ }
@@ -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 });
@@ -210,6 +210,7 @@ export * from "./OrgPublicData1.js";
210
210
  export * from "./OrgRoleEnum.js";
211
211
  export * from "./OrgTypeEnum.js";
212
212
  export * from "./OutlierLabellerEnum.js";
213
+ export * from "./PingRes.js";
213
214
  export * from "./PlatformEnum.js";
214
215
  export * from "./Point.js";
215
216
  export * from "./Polygon.js";
@@ -225,6 +226,11 @@ export * from "./ProviderProviderConnection1.js";
225
226
  export * from "./RateSheetMapping1.js";
226
227
  export * from "./RateSheetMappingListRes.js";
227
228
  export * from "./ReadOrderAgentRes.js";
229
+ export * from "./ScheduleCalendarSpec.js";
230
+ export * from "./ScheduleIntervalSpec.js";
231
+ export * from "./ScheduleRange.js";
232
+ export * from "./ScheduleSpec.js";
233
+ export * from "./ScheduledHelloPocRes.js";
228
234
  export * from "./Session1.js";
229
235
  export * from "./SessionByDeviceDataPoint1.js";
230
236
  export * from "./SessionByDeviceDataPointMetadata1.js";
@@ -226,6 +226,7 @@ __exportStar(require("./OrgPublicData1.js"), exports);
226
226
  __exportStar(require("./OrgRoleEnum.js"), exports);
227
227
  __exportStar(require("./OrgTypeEnum.js"), exports);
228
228
  __exportStar(require("./OutlierLabellerEnum.js"), exports);
229
+ __exportStar(require("./PingRes.js"), exports);
229
230
  __exportStar(require("./PlatformEnum.js"), exports);
230
231
  __exportStar(require("./Point.js"), exports);
231
232
  __exportStar(require("./Polygon.js"), exports);
@@ -241,6 +242,11 @@ __exportStar(require("./ProviderProviderConnection1.js"), exports);
241
242
  __exportStar(require("./RateSheetMapping1.js"), exports);
242
243
  __exportStar(require("./RateSheetMappingListRes.js"), exports);
243
244
  __exportStar(require("./ReadOrderAgentRes.js"), exports);
245
+ __exportStar(require("./ScheduleCalendarSpec.js"), exports);
246
+ __exportStar(require("./ScheduleIntervalSpec.js"), exports);
247
+ __exportStar(require("./ScheduleRange.js"), exports);
248
+ __exportStar(require("./ScheduleSpec.js"), exports);
249
+ __exportStar(require("./ScheduledHelloPocRes.js"), exports);
244
250
  __exportStar(require("./Session1.js"), exports);
245
251
  __exportStar(require("./SessionByDeviceDataPoint1.js"), exports);
246
252
  __exportStar(require("./SessionByDeviceDataPointMetadata1.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.638.0";
1
+ export declare const SDK_VERSION = "1.640.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.638.0";
4
+ exports.SDK_VERSION = "1.640.0";
@@ -20,8 +20,8 @@ export class ChrtClient {
20
20
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
21
21
  "X-Fern-Language": "JavaScript",
22
22
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
23
- "X-Fern-SDK-Version": "1.638.0",
24
- "User-Agent": "@chrt-inc/typescript-sdk/1.638.0",
23
+ "X-Fern-SDK-Version": "1.640.0",
24
+ "User-Agent": "@chrt-inc/typescript-sdk/1.640.0",
25
25
  "X-Fern-Runtime": core.RUNTIME.type,
26
26
  "X-Fern-Runtime-Version": core.RUNTIME.version,
27
27
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -30,6 +30,21 @@ export declare namespace Dev {
30
30
  export declare class Dev {
31
31
  protected readonly _options: Dev.Options;
32
32
  constructor(_options?: Dev.Options);
33
+ /**
34
+ * Creates or updates a Temporal Schedule that runs the scheduled hello workflow for a driver. | authz: min_org_role=administrator | (ScheduledHelloPocReq) -> (ScheduledHelloPocRes)
35
+ *
36
+ * @param {Chrt.utils.ScheduledHelloPocReq} request
37
+ * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
38
+ *
39
+ * @throws {@link Chrt.UnprocessableEntityError}
40
+ *
41
+ * @example
42
+ * await client.utils.dev.postAgentScheduledHelloPocV1({
43
+ * driver_name: "driver_name"
44
+ * })
45
+ */
46
+ postAgentScheduledHelloPocV1(request: Chrt.utils.ScheduledHelloPocReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.ScheduledHelloPocRes>;
47
+ private __postAgentScheduledHelloPocV1;
33
48
  /**
34
49
  * Runs a customer service agent that responds with logistics fun facts (real order data not yet available). | (AgentReq) -> (AgentRes)
35
50
  *
@@ -43,6 +58,19 @@ export declare class Dev {
43
58
  */
44
59
  postAgentV1(request?: Chrt.utils.AgentReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.AgentRes>;
45
60
  private __postAgentV1;
61
+ /**
62
+ * Runs a lightweight Temporal workflow and activity round trip for developer diagnostics. | (PingReq) -> (PingRes)
63
+ *
64
+ * @param {Chrt.utils.PingReq} request
65
+ * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
66
+ *
67
+ * @throws {@link Chrt.UnprocessableEntityError}
68
+ *
69
+ * @example
70
+ * await client.utils.dev.postAgentPingV1()
71
+ */
72
+ postAgentPingV1(request?: Chrt.utils.PingReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.PingRes>;
73
+ private __postAgentPingV1;
46
74
  /**
47
75
  * Fetches expanded order data and returns an AI-generated natural-language summary. | (ReadOrderAgentReq) -> (ReadOrderAgentRes)
48
76
  *
@@ -19,6 +19,70 @@ export class Dev {
19
19
  constructor(_options = {}) {
20
20
  this._options = _options;
21
21
  }
22
+ /**
23
+ * Creates or updates a Temporal Schedule that runs the scheduled hello workflow for a driver. | authz: min_org_role=administrator | (ScheduledHelloPocReq) -> (ScheduledHelloPocRes)
24
+ *
25
+ * @param {Chrt.utils.ScheduledHelloPocReq} request
26
+ * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
27
+ *
28
+ * @throws {@link Chrt.UnprocessableEntityError}
29
+ *
30
+ * @example
31
+ * await client.utils.dev.postAgentScheduledHelloPocV1({
32
+ * driver_name: "driver_name"
33
+ * })
34
+ */
35
+ postAgentScheduledHelloPocV1(request, requestOptions) {
36
+ return core.HttpResponsePromise.fromPromise(this.__postAgentScheduledHelloPocV1(request, requestOptions));
37
+ }
38
+ __postAgentScheduledHelloPocV1(request, requestOptions) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ var _a, _b, _c, _d;
41
+ 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);
42
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
43
+ 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/scheduled-hello-poc/v1"),
44
+ method: "POST",
45
+ headers: _headers,
46
+ contentType: "application/json",
47
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
48
+ requestType: "json",
49
+ body: request,
50
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
51
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
52
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
53
+ });
54
+ if (_response.ok) {
55
+ return { data: _response.body, rawResponse: _response.rawResponse };
56
+ }
57
+ if (_response.error.reason === "status-code") {
58
+ switch (_response.error.statusCode) {
59
+ case 422:
60
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
61
+ default:
62
+ throw new errors.ChrtError({
63
+ statusCode: _response.error.statusCode,
64
+ body: _response.error.body,
65
+ rawResponse: _response.rawResponse,
66
+ });
67
+ }
68
+ }
69
+ switch (_response.error.reason) {
70
+ case "non-json":
71
+ throw new errors.ChrtError({
72
+ statusCode: _response.error.statusCode,
73
+ body: _response.error.rawBody,
74
+ rawResponse: _response.rawResponse,
75
+ });
76
+ case "timeout":
77
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /dev/agent/scheduled-hello-poc/v1.");
78
+ case "unknown":
79
+ throw new errors.ChrtError({
80
+ message: _response.error.errorMessage,
81
+ rawResponse: _response.rawResponse,
82
+ });
83
+ }
84
+ });
85
+ }
22
86
  /**
23
87
  * Runs a customer service agent that responds with logistics fun facts (real order data not yet available). | (AgentReq) -> (AgentRes)
24
88
  *
@@ -81,6 +145,68 @@ export class Dev {
81
145
  }
82
146
  });
83
147
  }
148
+ /**
149
+ * Runs a lightweight Temporal workflow and activity round trip for developer diagnostics. | (PingReq) -> (PingRes)
150
+ *
151
+ * @param {Chrt.utils.PingReq} request
152
+ * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
153
+ *
154
+ * @throws {@link Chrt.UnprocessableEntityError}
155
+ *
156
+ * @example
157
+ * await client.utils.dev.postAgentPingV1()
158
+ */
159
+ postAgentPingV1(request = {}, requestOptions) {
160
+ return core.HttpResponsePromise.fromPromise(this.__postAgentPingV1(request, requestOptions));
161
+ }
162
+ __postAgentPingV1() {
163
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
164
+ var _a, _b, _c, _d;
165
+ 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);
166
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
167
+ 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/ping/v1"),
168
+ method: "POST",
169
+ headers: _headers,
170
+ contentType: "application/json",
171
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
172
+ requestType: "json",
173
+ body: request,
174
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
175
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
176
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
177
+ });
178
+ if (_response.ok) {
179
+ return { data: _response.body, rawResponse: _response.rawResponse };
180
+ }
181
+ if (_response.error.reason === "status-code") {
182
+ switch (_response.error.statusCode) {
183
+ case 422:
184
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
185
+ default:
186
+ throw new errors.ChrtError({
187
+ statusCode: _response.error.statusCode,
188
+ body: _response.error.body,
189
+ rawResponse: _response.rawResponse,
190
+ });
191
+ }
192
+ }
193
+ switch (_response.error.reason) {
194
+ case "non-json":
195
+ throw new errors.ChrtError({
196
+ statusCode: _response.error.statusCode,
197
+ body: _response.error.rawBody,
198
+ rawResponse: _response.rawResponse,
199
+ });
200
+ case "timeout":
201
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /dev/agent/ping/v1.");
202
+ case "unknown":
203
+ throw new errors.ChrtError({
204
+ message: _response.error.errorMessage,
205
+ rawResponse: _response.rawResponse,
206
+ });
207
+ }
208
+ });
209
+ }
84
210
  /**
85
211
  * Fetches expanded order data and returns an AI-generated natural-language summary. | (ReadOrderAgentReq) -> (ReadOrderAgentRes)
86
212
  *
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface PingReq {
9
+ nonce?: string | null;
10
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -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
+ * driver_name: "driver_name"
9
+ * }
10
+ */
11
+ export interface ScheduledHelloPocReq {
12
+ driver_name: string;
13
+ schedule_spec?: Chrt.ScheduleSpec;
14
+ catchup_window_seconds?: number;
15
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -1,3 +1,5 @@
1
+ export { type ScheduledHelloPocReq } from "./ScheduledHelloPocReq.mjs";
1
2
  export { type AgentReq } from "./AgentReq.mjs";
3
+ export { type PingReq } from "./PingReq.mjs";
2
4
  export { type ReadOrderAgentReq } from "./ReadOrderAgentReq.mjs";
3
5
  export { type TemplateReq } from "./TemplateReq.mjs";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface PingRes {
5
+ response: string;
6
+ nonce: string;
7
+ workflow_timestamp: string;
8
+ activity_timestamp: string;
9
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export interface ScheduleCalendarSpec {
6
+ second?: Chrt.ScheduleRange[];
7
+ minute?: Chrt.ScheduleRange[];
8
+ hour?: Chrt.ScheduleRange[];
9
+ day_of_month?: Chrt.ScheduleRange[];
10
+ month?: Chrt.ScheduleRange[];
11
+ year?: Chrt.ScheduleRange[];
12
+ day_of_week?: Chrt.ScheduleRange[];
13
+ comment?: string | null;
14
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ScheduleIntervalSpec {
5
+ every: string;
6
+ offset?: string | null;
7
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ScheduleRange {
5
+ start: number;
6
+ end?: number;
7
+ step?: number;
8
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export interface ScheduleSpec {
6
+ calendars?: Chrt.ScheduleCalendarSpec[];
7
+ intervals?: Chrt.ScheduleIntervalSpec[];
8
+ cron_expressions?: string[];
9
+ skip?: Chrt.ScheduleCalendarSpec[];
10
+ start_at?: string | null;
11
+ end_at?: string | null;
12
+ jitter?: string | null;
13
+ time_zone_name?: string | null;
14
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export interface ScheduledHelloPocRes {
6
+ schedule_id: string;
7
+ order_id: string;
8
+ driver_name: string;
9
+ workflow_name: string;
10
+ workflow_id: string;
11
+ task_queue: string;
12
+ schedule_spec: Chrt.ScheduleSpec;
13
+ catchup_window_seconds: number;
14
+ created: boolean;
15
+ next_action_times: string[];
16
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -210,6 +210,7 @@ export * from "./OrgPublicData1.mjs";
210
210
  export * from "./OrgRoleEnum.mjs";
211
211
  export * from "./OrgTypeEnum.mjs";
212
212
  export * from "./OutlierLabellerEnum.mjs";
213
+ export * from "./PingRes.mjs";
213
214
  export * from "./PlatformEnum.mjs";
214
215
  export * from "./Point.mjs";
215
216
  export * from "./Polygon.mjs";
@@ -225,6 +226,11 @@ export * from "./ProviderProviderConnection1.mjs";
225
226
  export * from "./RateSheetMapping1.mjs";
226
227
  export * from "./RateSheetMappingListRes.mjs";
227
228
  export * from "./ReadOrderAgentRes.mjs";
229
+ export * from "./ScheduleCalendarSpec.mjs";
230
+ export * from "./ScheduleIntervalSpec.mjs";
231
+ export * from "./ScheduleRange.mjs";
232
+ export * from "./ScheduleSpec.mjs";
233
+ export * from "./ScheduledHelloPocRes.mjs";
228
234
  export * from "./Session1.mjs";
229
235
  export * from "./SessionByDeviceDataPoint1.mjs";
230
236
  export * from "./SessionByDeviceDataPointMetadata1.mjs";
@@ -210,6 +210,7 @@ export * from "./OrgPublicData1.mjs";
210
210
  export * from "./OrgRoleEnum.mjs";
211
211
  export * from "./OrgTypeEnum.mjs";
212
212
  export * from "./OutlierLabellerEnum.mjs";
213
+ export * from "./PingRes.mjs";
213
214
  export * from "./PlatformEnum.mjs";
214
215
  export * from "./Point.mjs";
215
216
  export * from "./Polygon.mjs";
@@ -225,6 +226,11 @@ export * from "./ProviderProviderConnection1.mjs";
225
226
  export * from "./RateSheetMapping1.mjs";
226
227
  export * from "./RateSheetMappingListRes.mjs";
227
228
  export * from "./ReadOrderAgentRes.mjs";
229
+ export * from "./ScheduleCalendarSpec.mjs";
230
+ export * from "./ScheduleIntervalSpec.mjs";
231
+ export * from "./ScheduleRange.mjs";
232
+ export * from "./ScheduleSpec.mjs";
233
+ export * from "./ScheduledHelloPocRes.mjs";
228
234
  export * from "./Session1.mjs";
229
235
  export * from "./SessionByDeviceDataPoint1.mjs";
230
236
  export * from "./SessionByDeviceDataPointMetadata1.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.638.0";
1
+ export declare const SDK_VERSION = "1.640.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.638.0";
1
+ export const SDK_VERSION = "1.640.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "1.638.0",
3
+ "version": "1.640.0",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -23683,6 +23683,71 @@ await client.users.directoryEntries.deleteV1("directory_entry_id");
23683
23683
 
23684
23684
  ## Utils Dev
23685
23685
 
23686
+ <details><summary><code>client.utils.dev.<a href="/src/api/resources/utils/resources/dev/client/Client.ts">postAgentScheduledHelloPocV1</a>({ ...params }) -> Chrt.ScheduledHelloPocRes</code></summary>
23687
+ <dl>
23688
+ <dd>
23689
+
23690
+ #### 📝 Description
23691
+
23692
+ <dl>
23693
+ <dd>
23694
+
23695
+ <dl>
23696
+ <dd>
23697
+
23698
+ Creates or updates a Temporal Schedule that runs the scheduled hello workflow for a driver. | authz: min_org_role=administrator | (ScheduledHelloPocReq) -> (ScheduledHelloPocRes)
23699
+
23700
+ </dd>
23701
+ </dl>
23702
+ </dd>
23703
+ </dl>
23704
+
23705
+ #### 🔌 Usage
23706
+
23707
+ <dl>
23708
+ <dd>
23709
+
23710
+ <dl>
23711
+ <dd>
23712
+
23713
+ ```typescript
23714
+ await client.utils.dev.postAgentScheduledHelloPocV1({
23715
+ driver_name: "driver_name",
23716
+ });
23717
+ ```
23718
+
23719
+ </dd>
23720
+ </dl>
23721
+ </dd>
23722
+ </dl>
23723
+
23724
+ #### ⚙️ Parameters
23725
+
23726
+ <dl>
23727
+ <dd>
23728
+
23729
+ <dl>
23730
+ <dd>
23731
+
23732
+ **request:** `Chrt.utils.ScheduledHelloPocReq`
23733
+
23734
+ </dd>
23735
+ </dl>
23736
+
23737
+ <dl>
23738
+ <dd>
23739
+
23740
+ **requestOptions:** `Dev.RequestOptions`
23741
+
23742
+ </dd>
23743
+ </dl>
23744
+ </dd>
23745
+ </dl>
23746
+
23747
+ </dd>
23748
+ </dl>
23749
+ </details>
23750
+
23686
23751
  <details><summary><code>client.utils.dev.<a href="/src/api/resources/utils/resources/dev/client/Client.ts">postAgentV1</a>({ ...params }) -> Chrt.AgentRes</code></summary>
23687
23752
  <dl>
23688
23753
  <dd>
@@ -23746,6 +23811,69 @@ await client.utils.dev.postAgentV1();
23746
23811
  </dl>
23747
23812
  </details>
23748
23813
 
23814
+ <details><summary><code>client.utils.dev.<a href="/src/api/resources/utils/resources/dev/client/Client.ts">postAgentPingV1</a>({ ...params }) -> Chrt.PingRes</code></summary>
23815
+ <dl>
23816
+ <dd>
23817
+
23818
+ #### 📝 Description
23819
+
23820
+ <dl>
23821
+ <dd>
23822
+
23823
+ <dl>
23824
+ <dd>
23825
+
23826
+ Runs a lightweight Temporal workflow and activity round trip for developer diagnostics. | (PingReq) -> (PingRes)
23827
+
23828
+ </dd>
23829
+ </dl>
23830
+ </dd>
23831
+ </dl>
23832
+
23833
+ #### 🔌 Usage
23834
+
23835
+ <dl>
23836
+ <dd>
23837
+
23838
+ <dl>
23839
+ <dd>
23840
+
23841
+ ```typescript
23842
+ await client.utils.dev.postAgentPingV1();
23843
+ ```
23844
+
23845
+ </dd>
23846
+ </dl>
23847
+ </dd>
23848
+ </dl>
23849
+
23850
+ #### ⚙️ Parameters
23851
+
23852
+ <dl>
23853
+ <dd>
23854
+
23855
+ <dl>
23856
+ <dd>
23857
+
23858
+ **request:** `Chrt.utils.PingReq`
23859
+
23860
+ </dd>
23861
+ </dl>
23862
+
23863
+ <dl>
23864
+ <dd>
23865
+
23866
+ **requestOptions:** `Dev.RequestOptions`
23867
+
23868
+ </dd>
23869
+ </dl>
23870
+ </dd>
23871
+ </dl>
23872
+
23873
+ </dd>
23874
+ </dl>
23875
+ </details>
23876
+
23749
23877
  <details><summary><code>client.utils.dev.<a href="/src/api/resources/utils/resources/dev/client/Client.ts">postAgentOrderV1</a>({ ...params }) -> Chrt.ReadOrderAgentRes</code></summary>
23750
23878
  <dl>
23751
23879
  <dd>