@chrt-inc/typescript-sdk 1.1026.0 → 1.1035.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 (143) hide show
  1. package/dist/cjs/Client.d.ts +3 -3
  2. package/dist/cjs/Client.js +19 -19
  3. package/dist/cjs/api/resources/chrtGpt/client/Client.d.ts +4 -1
  4. package/dist/cjs/api/resources/chrtGpt/client/Client.js +6 -1
  5. package/dist/cjs/api/resources/chrtGpt/client/requests/ChrtGptReq.d.ts +24 -0
  6. package/dist/cjs/api/resources/chrtGpt/client/requests/ChrtGptReq.js +14 -0
  7. package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/Client.d.ts +34 -2
  8. package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/Client.js +139 -3
  9. package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/requests/ChrtGptConversationsDeleteManyReq.d.ts +13 -0
  10. package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/requests/ChrtGptConversationsUpdateTitleReq.d.ts +12 -0
  11. package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/requests/ChrtGptConversationsUpdateTitleReq.js +5 -0
  12. package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/requests/ConversationsListV1Request.d.ts +4 -1
  13. package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/requests/index.d.ts +2 -0
  14. package/dist/cjs/api/resources/chrtGpt/resources/index.d.ts +2 -0
  15. package/dist/cjs/api/resources/chrtGpt/resources/index.js +3 -1
  16. package/dist/cjs/api/resources/chrtGpt/resources/voice/client/Client.d.ts +49 -0
  17. package/dist/cjs/api/resources/chrtGpt/resources/voice/client/Client.js +132 -0
  18. package/dist/cjs/api/resources/chrtGpt/resources/voice/client/index.d.ts +2 -0
  19. package/dist/cjs/api/resources/chrtGpt/resources/voice/client/index.js +17 -0
  20. package/dist/cjs/api/resources/chrtGpt/resources/voice/client/requests/ChrtGptVoiceStartReq.d.ts +13 -0
  21. package/dist/cjs/api/resources/chrtGpt/resources/voice/client/requests/ChrtGptVoiceStartReq.js +5 -0
  22. package/dist/cjs/api/resources/chrtGpt/resources/voice/client/requests/index.d.ts +1 -0
  23. package/dist/cjs/api/resources/index.d.ts +1 -1
  24. package/dist/cjs/api/resources/index.js +2 -2
  25. package/dist/cjs/api/resources/{agent/resources/livekit → livekit}/client/Client.d.ts +2 -2
  26. package/dist/cjs/api/resources/{agent/resources/livekit → livekit}/resources/helloWorld/client/Client.d.ts +4 -4
  27. package/dist/cjs/api/resources/{agent/resources/livekit → livekit}/resources/helloWorld/client/Client.js +7 -7
  28. package/dist/cjs/api/resources/livekit/resources/helloWorld/index.d.ts +1 -0
  29. package/dist/cjs/api/resources/{agent/resources/livekit → livekit/resources/helloWorld}/index.js +0 -1
  30. package/dist/cjs/api/types/Caller.d.ts +1 -0
  31. package/dist/cjs/api/types/ChrtGptCompletedEvent.d.ts +4 -0
  32. package/dist/cjs/api/types/ChrtGptConversation1.d.ts +8 -0
  33. package/dist/cjs/api/types/ChrtGptConversationRes.d.ts +3 -1
  34. package/dist/cjs/api/types/ChrtGptConversationTitleSourceEnum1.d.ts +9 -0
  35. package/dist/cjs/api/types/ChrtGptConversationTitleSourceEnum1.js +11 -0
  36. package/dist/cjs/api/types/ChrtGptConversationsDeleteManyRes.d.ts +7 -0
  37. package/dist/cjs/api/types/ChrtGptConversationsDeleteManyRes.js +5 -0
  38. package/dist/cjs/api/types/ChrtGptEvent.d.ts +1 -4
  39. package/dist/cjs/api/types/ChrtGptVoiceDelegationEnum.d.ts +11 -0
  40. package/dist/cjs/api/types/ChrtGptVoiceDelegationEnum.js +10 -0
  41. package/dist/cjs/api/types/ChrtGptVoiceReq.d.ts +11 -0
  42. package/dist/cjs/api/types/ChrtGptVoiceReq.js +5 -0
  43. package/dist/cjs/api/types/ChrtGptVoiceStartRes.d.ts +9 -0
  44. package/dist/cjs/api/types/ChrtGptVoiceStartRes.js +5 -0
  45. package/dist/cjs/api/types/InternalDelegationOriginEnum.d.ts +8 -0
  46. package/dist/cjs/api/types/InternalDelegationOriginEnum.js +10 -0
  47. package/dist/cjs/api/types/index.d.ts +6 -1
  48. package/dist/cjs/api/types/index.js +6 -1
  49. package/dist/cjs/version.d.ts +1 -1
  50. package/dist/cjs/version.js +1 -1
  51. package/dist/esm/Client.d.mts +3 -3
  52. package/dist/esm/Client.mjs +7 -7
  53. package/dist/esm/api/resources/chrtGpt/client/Client.d.mts +4 -1
  54. package/dist/esm/api/resources/chrtGpt/client/Client.mjs +6 -1
  55. package/dist/esm/api/resources/chrtGpt/client/requests/ChrtGptReq.d.mts +24 -0
  56. package/dist/esm/api/resources/chrtGpt/client/requests/ChrtGptReq.mjs +13 -1
  57. package/dist/esm/api/resources/chrtGpt/resources/conversations/client/Client.d.mts +34 -2
  58. package/dist/esm/api/resources/chrtGpt/resources/conversations/client/Client.mjs +139 -3
  59. package/dist/esm/api/resources/chrtGpt/resources/conversations/client/requests/ChrtGptConversationsDeleteManyReq.d.mts +13 -0
  60. package/dist/esm/api/resources/chrtGpt/resources/conversations/client/requests/ChrtGptConversationsUpdateTitleReq.d.mts +12 -0
  61. package/dist/esm/api/resources/chrtGpt/resources/conversations/client/requests/ChrtGptConversationsUpdateTitleReq.mjs +4 -0
  62. package/dist/esm/api/resources/chrtGpt/resources/conversations/client/requests/ConversationsListV1Request.d.mts +4 -1
  63. package/dist/esm/api/resources/chrtGpt/resources/conversations/client/requests/index.d.mts +2 -0
  64. package/dist/esm/api/resources/chrtGpt/resources/index.d.mts +2 -0
  65. package/dist/esm/api/resources/chrtGpt/resources/index.mjs +2 -0
  66. package/dist/esm/api/resources/chrtGpt/resources/voice/client/Client.d.mts +49 -0
  67. package/dist/esm/api/resources/chrtGpt/resources/voice/client/Client.mjs +95 -0
  68. package/dist/esm/api/resources/chrtGpt/resources/voice/client/index.d.mts +2 -0
  69. package/dist/esm/api/resources/chrtGpt/resources/voice/client/index.mjs +1 -0
  70. package/dist/esm/api/resources/chrtGpt/resources/voice/client/requests/ChrtGptVoiceStartReq.d.mts +13 -0
  71. package/dist/esm/api/resources/chrtGpt/resources/voice/client/requests/ChrtGptVoiceStartReq.mjs +4 -0
  72. package/dist/esm/api/resources/chrtGpt/resources/voice/client/requests/index.d.mts +1 -0
  73. package/dist/esm/api/resources/index.d.mts +1 -1
  74. package/dist/esm/api/resources/index.mjs +1 -1
  75. package/dist/esm/api/resources/{agent/resources/livekit → livekit}/client/Client.d.mts +2 -2
  76. package/dist/esm/api/resources/{agent/resources/livekit → livekit}/resources/helloWorld/client/Client.d.mts +4 -4
  77. package/dist/esm/api/resources/{agent/resources/livekit → livekit}/resources/helloWorld/client/Client.mjs +7 -7
  78. package/dist/esm/api/resources/livekit/resources/helloWorld/index.d.mts +1 -0
  79. package/dist/esm/api/resources/livekit/resources/helloWorld/index.mjs +1 -0
  80. package/dist/esm/api/types/Caller.d.mts +1 -0
  81. package/dist/esm/api/types/ChrtGptCompletedEvent.d.mts +4 -0
  82. package/dist/esm/api/types/ChrtGptConversation1.d.mts +8 -0
  83. package/dist/esm/api/types/ChrtGptConversationRes.d.mts +3 -1
  84. package/dist/esm/api/types/ChrtGptConversationTitleSourceEnum1.d.mts +9 -0
  85. package/dist/esm/api/types/ChrtGptConversationTitleSourceEnum1.mjs +8 -0
  86. package/dist/esm/api/types/ChrtGptConversationsDeleteManyRes.d.mts +7 -0
  87. package/dist/esm/api/types/ChrtGptConversationsDeleteManyRes.mjs +4 -0
  88. package/dist/esm/api/types/ChrtGptEvent.d.mts +1 -4
  89. package/dist/esm/api/types/ChrtGptVoiceDelegationEnum.d.mts +11 -0
  90. package/dist/esm/api/types/ChrtGptVoiceDelegationEnum.mjs +7 -0
  91. package/dist/esm/api/types/ChrtGptVoiceReq.d.mts +11 -0
  92. package/dist/esm/api/types/ChrtGptVoiceReq.mjs +4 -0
  93. package/dist/esm/api/types/ChrtGptVoiceStartRes.d.mts +9 -0
  94. package/dist/esm/api/types/ChrtGptVoiceStartRes.mjs +4 -0
  95. package/dist/esm/api/types/InternalDelegationOriginEnum.d.mts +8 -0
  96. package/dist/esm/api/types/InternalDelegationOriginEnum.mjs +7 -0
  97. package/dist/esm/api/types/index.d.mts +6 -1
  98. package/dist/esm/api/types/index.mjs +6 -1
  99. package/dist/esm/version.d.mts +1 -1
  100. package/dist/esm/version.mjs +1 -1
  101. package/package.json +1 -1
  102. package/reference.md +265 -59
  103. package/dist/cjs/api/resources/agent/client/Client.d.ts +0 -23
  104. package/dist/cjs/api/resources/agent/client/Client.js +0 -17
  105. package/dist/cjs/api/resources/agent/resources/index.d.ts +0 -1
  106. package/dist/cjs/api/resources/agent/resources/index.js +0 -37
  107. package/dist/cjs/api/resources/agent/resources/livekit/index.d.ts +0 -2
  108. package/dist/cjs/api/resources/agent/resources/livekit/resources/helloWorld/client/index.d.ts +0 -1
  109. package/dist/cjs/api/types/ChrtGptTitleEvent.d.ts +0 -11
  110. package/dist/esm/api/resources/agent/client/Client.d.mts +0 -23
  111. package/dist/esm/api/resources/agent/client/Client.mjs +0 -13
  112. package/dist/esm/api/resources/agent/resources/index.d.mts +0 -1
  113. package/dist/esm/api/resources/agent/resources/index.mjs +0 -1
  114. package/dist/esm/api/resources/agent/resources/livekit/index.d.mts +0 -2
  115. package/dist/esm/api/resources/agent/resources/livekit/index.mjs +0 -2
  116. package/dist/esm/api/resources/agent/resources/livekit/resources/helloWorld/client/index.d.mts +0 -1
  117. package/dist/esm/api/types/ChrtGptTitleEvent.d.mts +0 -11
  118. /package/dist/cjs/api/{types/ChrtGptTitleEvent.js → resources/chrtGpt/resources/conversations/client/requests/ChrtGptConversationsDeleteManyReq.js} +0 -0
  119. /package/dist/cjs/api/resources/{agent/client → chrtGpt/resources/voice/client/requests}/index.js +0 -0
  120. /package/dist/cjs/api/resources/{agent/resources/livekit/resources/helloWorld → chrtGpt/resources/voice}/index.d.ts +0 -0
  121. /package/dist/cjs/api/resources/{agent/resources/livekit/resources/helloWorld → chrtGpt/resources/voice}/index.js +0 -0
  122. /package/dist/cjs/api/resources/{agent/resources/livekit → livekit}/client/Client.js +0 -0
  123. /package/dist/cjs/api/resources/{agent → livekit}/client/index.d.ts +0 -0
  124. /package/dist/cjs/api/resources/{agent/resources/livekit → livekit}/client/index.js +0 -0
  125. /package/dist/cjs/api/resources/{agent → livekit}/index.d.ts +0 -0
  126. /package/dist/cjs/api/resources/{agent → livekit}/index.js +0 -0
  127. /package/dist/cjs/api/resources/{agent/resources/livekit → livekit/resources/helloWorld}/client/index.d.ts +0 -0
  128. /package/dist/cjs/api/resources/{agent/resources/livekit → livekit}/resources/helloWorld/client/index.js +0 -0
  129. /package/dist/cjs/api/resources/{agent/resources/livekit → livekit}/resources/index.d.ts +0 -0
  130. /package/dist/cjs/api/resources/{agent/resources/livekit → livekit}/resources/index.js +0 -0
  131. /package/dist/esm/api/{types/ChrtGptTitleEvent.mjs → resources/chrtGpt/resources/conversations/client/requests/ChrtGptConversationsDeleteManyReq.mjs} +0 -0
  132. /package/dist/esm/api/resources/{agent/client → chrtGpt/resources/voice/client/requests}/index.mjs +0 -0
  133. /package/dist/esm/api/resources/{agent/resources/livekit/resources/helloWorld → chrtGpt/resources/voice}/index.d.mts +0 -0
  134. /package/dist/esm/api/resources/{agent/resources/livekit/resources/helloWorld → chrtGpt/resources/voice}/index.mjs +0 -0
  135. /package/dist/esm/api/resources/{agent/resources/livekit → livekit}/client/Client.mjs +0 -0
  136. /package/dist/esm/api/resources/{agent → livekit}/client/index.d.mts +0 -0
  137. /package/dist/esm/api/resources/{agent/resources/livekit → livekit}/client/index.mjs +0 -0
  138. /package/dist/esm/api/resources/{agent → livekit}/index.d.mts +0 -0
  139. /package/dist/esm/api/resources/{agent → livekit}/index.mjs +0 -0
  140. /package/dist/esm/api/resources/{agent/resources/livekit → livekit/resources/helloWorld}/client/index.d.mts +0 -0
  141. /package/dist/esm/api/resources/{agent/resources/livekit → livekit}/resources/helloWorld/client/index.mjs +0 -0
  142. /package/dist/esm/api/resources/{agent/resources/livekit → livekit}/resources/index.d.mts +0 -0
  143. /package/dist/esm/api/resources/{agent/resources/livekit → livekit}/resources/index.mjs +0 -0
@@ -7,13 +7,13 @@ import { ChrtGpt } from "./api/resources/chrtGpt/client/Client.js";
7
7
  import { Flights } from "./api/resources/flights/client/Client.js";
8
8
  import { Orgs } from "./api/resources/orgs/client/Client.js";
9
9
  import { Utils } from "./api/resources/utils/client/Client.js";
10
- import { Agent } from "./api/resources/agent/client/Client.js";
11
10
  import { Analytics } from "./api/resources/analytics/client/Client.js";
12
11
  import { Billing } from "./api/resources/billing/client/Client.js";
13
12
  import { BillingNew } from "./api/resources/billingNew/client/Client.js";
14
13
  import { CargoOnFlightIntegrations } from "./api/resources/cargoOnFlightIntegrations/client/Client.js";
15
14
  import { Integrations } from "./api/resources/integrations/client/Client.js";
16
15
  import { Listing } from "./api/resources/listing/client/Client.js";
16
+ import { Livekit } from "./api/resources/livekit/client/Client.js";
17
17
  import { Notifications } from "./api/resources/notifications/client/Client.js";
18
18
  import { Operations } from "./api/resources/operations/client/Client.js";
19
19
  import { Shipping } from "./api/resources/shipping/client/Client.js";
@@ -50,13 +50,13 @@ export declare class ChrtClient {
50
50
  protected _flights: Flights | undefined;
51
51
  protected _orgs: Orgs | undefined;
52
52
  protected _utils: Utils | undefined;
53
- protected _agent: Agent | undefined;
54
53
  protected _analytics: Analytics | undefined;
55
54
  protected _billing: Billing | undefined;
56
55
  protected _billingNew: BillingNew | undefined;
57
56
  protected _cargoOnFlightIntegrations: CargoOnFlightIntegrations | undefined;
58
57
  protected _integrations: Integrations | undefined;
59
58
  protected _listing: Listing | undefined;
59
+ protected _livekit: Livekit | undefined;
60
60
  protected _notifications: Notifications | undefined;
61
61
  protected _operations: Operations | undefined;
62
62
  protected _shipping: Shipping | undefined;
@@ -69,13 +69,13 @@ export declare class ChrtClient {
69
69
  get flights(): Flights;
70
70
  get orgs(): Orgs;
71
71
  get utils(): Utils;
72
- get agent(): Agent;
73
72
  get analytics(): Analytics;
74
73
  get billing(): Billing;
75
74
  get billingNew(): BillingNew;
76
75
  get cargoOnFlightIntegrations(): CargoOnFlightIntegrations;
77
76
  get integrations(): Integrations;
78
77
  get listing(): Listing;
78
+ get livekit(): Livekit;
79
79
  get notifications(): Notifications;
80
80
  get operations(): Operations;
81
81
  get shipping(): Shipping;
@@ -43,13 +43,13 @@ const Client_js_1 = require("./api/resources/chrtGpt/client/Client.js");
43
43
  const Client_js_2 = require("./api/resources/flights/client/Client.js");
44
44
  const Client_js_3 = require("./api/resources/orgs/client/Client.js");
45
45
  const Client_js_4 = require("./api/resources/utils/client/Client.js");
46
- const Client_js_5 = require("./api/resources/agent/client/Client.js");
47
- const Client_js_6 = require("./api/resources/analytics/client/Client.js");
48
- const Client_js_7 = require("./api/resources/billing/client/Client.js");
49
- const Client_js_8 = require("./api/resources/billingNew/client/Client.js");
50
- const Client_js_9 = require("./api/resources/cargoOnFlightIntegrations/client/Client.js");
51
- const Client_js_10 = require("./api/resources/integrations/client/Client.js");
52
- const Client_js_11 = require("./api/resources/listing/client/Client.js");
46
+ const Client_js_5 = require("./api/resources/analytics/client/Client.js");
47
+ const Client_js_6 = require("./api/resources/billing/client/Client.js");
48
+ const Client_js_7 = require("./api/resources/billingNew/client/Client.js");
49
+ const Client_js_8 = require("./api/resources/cargoOnFlightIntegrations/client/Client.js");
50
+ const Client_js_9 = require("./api/resources/integrations/client/Client.js");
51
+ const Client_js_10 = require("./api/resources/listing/client/Client.js");
52
+ const Client_js_11 = require("./api/resources/livekit/client/Client.js");
53
53
  const Client_js_12 = require("./api/resources/notifications/client/Client.js");
54
54
  const Client_js_13 = require("./api/resources/operations/client/Client.js");
55
55
  const Client_js_14 = require("./api/resources/shipping/client/Client.js");
@@ -62,8 +62,8 @@ class ChrtClient {
62
62
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
63
63
  "X-Fern-Language": "JavaScript",
64
64
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
65
- "X-Fern-SDK-Version": "1.1026.0",
66
- "User-Agent": "@chrt-inc/typescript-sdk/1.1026.0",
65
+ "X-Fern-SDK-Version": "1.1035.0",
66
+ "User-Agent": "@chrt-inc/typescript-sdk/1.1035.0",
67
67
  "X-Fern-Runtime": core.RUNTIME.type,
68
68
  "X-Fern-Runtime-Version": core.RUNTIME.version,
69
69
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -84,33 +84,33 @@ class ChrtClient {
84
84
  var _a;
85
85
  return ((_a = this._utils) !== null && _a !== void 0 ? _a : (this._utils = new Client_js_4.Utils(this._options)));
86
86
  }
87
- get agent() {
88
- var _a;
89
- return ((_a = this._agent) !== null && _a !== void 0 ? _a : (this._agent = new Client_js_5.Agent(this._options)));
90
- }
91
87
  get analytics() {
92
88
  var _a;
93
- return ((_a = this._analytics) !== null && _a !== void 0 ? _a : (this._analytics = new Client_js_6.Analytics(this._options)));
89
+ return ((_a = this._analytics) !== null && _a !== void 0 ? _a : (this._analytics = new Client_js_5.Analytics(this._options)));
94
90
  }
95
91
  get billing() {
96
92
  var _a;
97
- return ((_a = this._billing) !== null && _a !== void 0 ? _a : (this._billing = new Client_js_7.Billing(this._options)));
93
+ return ((_a = this._billing) !== null && _a !== void 0 ? _a : (this._billing = new Client_js_6.Billing(this._options)));
98
94
  }
99
95
  get billingNew() {
100
96
  var _a;
101
- return ((_a = this._billingNew) !== null && _a !== void 0 ? _a : (this._billingNew = new Client_js_8.BillingNew(this._options)));
97
+ return ((_a = this._billingNew) !== null && _a !== void 0 ? _a : (this._billingNew = new Client_js_7.BillingNew(this._options)));
102
98
  }
103
99
  get cargoOnFlightIntegrations() {
104
100
  var _a;
105
- return ((_a = this._cargoOnFlightIntegrations) !== null && _a !== void 0 ? _a : (this._cargoOnFlightIntegrations = new Client_js_9.CargoOnFlightIntegrations(this._options)));
101
+ return ((_a = this._cargoOnFlightIntegrations) !== null && _a !== void 0 ? _a : (this._cargoOnFlightIntegrations = new Client_js_8.CargoOnFlightIntegrations(this._options)));
106
102
  }
107
103
  get integrations() {
108
104
  var _a;
109
- return ((_a = this._integrations) !== null && _a !== void 0 ? _a : (this._integrations = new Client_js_10.Integrations(this._options)));
105
+ return ((_a = this._integrations) !== null && _a !== void 0 ? _a : (this._integrations = new Client_js_9.Integrations(this._options)));
110
106
  }
111
107
  get listing() {
112
108
  var _a;
113
- return ((_a = this._listing) !== null && _a !== void 0 ? _a : (this._listing = new Client_js_11.Listing(this._options)));
109
+ return ((_a = this._listing) !== null && _a !== void 0 ? _a : (this._listing = new Client_js_10.Listing(this._options)));
110
+ }
111
+ get livekit() {
112
+ var _a;
113
+ return ((_a = this._livekit) !== null && _a !== void 0 ? _a : (this._livekit = new Client_js_11.Livekit(this._options)));
114
114
  }
115
115
  get notifications() {
116
116
  var _a;
@@ -5,6 +5,7 @@ import * as environments from "../../../../environments.js";
5
5
  import * as core from "../../../../core/index.js";
6
6
  import * as Chrt from "../../../index.js";
7
7
  import { Conversations } from "../resources/conversations/client/Client.js";
8
+ import { Voice } from "../resources/voice/client/Client.js";
8
9
  export declare namespace ChrtGpt {
9
10
  interface Options {
10
11
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -31,10 +32,12 @@ export declare namespace ChrtGpt {
31
32
  export declare class ChrtGpt {
32
33
  protected readonly _options: ChrtGpt.Options;
33
34
  protected _conversations: Conversations | undefined;
35
+ protected _voice: Voice | undefined;
34
36
  constructor(_options?: ChrtGpt.Options);
35
37
  get conversations(): Conversations;
38
+ get voice(): Voice;
36
39
  /**
37
- * Sends a message to ChrtGPT and streams its reply, starting and titling a new conversation when no conversation_id is given. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | (ChrtGPTReq) -> (stream[ChrtGPTEvent])
40
+ * Sends a message to ChrtGPT and streams its reply, starting a new conversation when no conversation_id is given. In the background, retitles the conversation after each of its first 3 turns and updates its summary and order identifiers after every turn. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | (ChrtGPTReq) -> (stream[ChrtGPTEvent])
38
41
  */
39
42
  postV1(request: Chrt.ChrtGptReq, requestOptions?: ChrtGpt.RequestOptions): core.HttpResponsePromise<core.Stream<Chrt.ChrtGptEvent>>;
40
43
  private __postV1;
@@ -52,6 +52,7 @@ const Chrt = __importStar(require("../../../index.js"));
52
52
  const headers_js_1 = require("../../../../core/headers.js");
53
53
  const errors = __importStar(require("../../../../errors/index.js"));
54
54
  const Client_js_1 = require("../resources/conversations/client/Client.js");
55
+ const Client_js_2 = require("../resources/voice/client/Client.js");
55
56
  class ChrtGpt {
56
57
  constructor(_options = {}) {
57
58
  this._options = _options;
@@ -60,8 +61,12 @@ class ChrtGpt {
60
61
  var _a;
61
62
  return ((_a = this._conversations) !== null && _a !== void 0 ? _a : (this._conversations = new Client_js_1.Conversations(this._options)));
62
63
  }
64
+ get voice() {
65
+ var _a;
66
+ return ((_a = this._voice) !== null && _a !== void 0 ? _a : (this._voice = new Client_js_2.Voice(this._options)));
67
+ }
63
68
  /**
64
- * Sends a message to ChrtGPT and streams its reply, starting and titling a new conversation when no conversation_id is given. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | (ChrtGPTReq) -> (stream[ChrtGPTEvent])
69
+ * Sends a message to ChrtGPT and streams its reply, starting a new conversation when no conversation_id is given. In the background, retitles the conversation after each of its first 3 turns and updates its summary and order identifiers after every turn. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | (ChrtGPTReq) -> (stream[ChrtGPTEvent])
65
70
  */
66
71
  postV1(request, requestOptions) {
67
72
  return core.HttpResponsePromise.fromPromise(this.__postV1(request, requestOptions));
@@ -11,4 +11,28 @@ export interface ChrtGptReq {
11
11
  /** Omit to start a new conversation. */
12
12
  conversation_id?: string | null;
13
13
  message: string;
14
+ /** How much ChrtGPT reasons before answering this message. Higher is slower and more thorough. */
15
+ reasoning_effort?: ChrtGptReq.ReasoningEffort;
16
+ /** How long and detailed ChrtGPT's reply is. */
17
+ verbosity?: ChrtGptReq.Verbosity;
18
+ }
19
+ export declare namespace ChrtGptReq {
20
+ /**
21
+ * How much ChrtGPT reasons before answering this message. Higher is slower and more thorough.
22
+ */
23
+ type ReasoningEffort = "low" | "medium" | "high";
24
+ const ReasoningEffort: {
25
+ readonly Low: "low";
26
+ readonly Medium: "medium";
27
+ readonly High: "high";
28
+ };
29
+ /**
30
+ * How long and detailed ChrtGPT's reply is.
31
+ */
32
+ type Verbosity = "low" | "medium" | "high";
33
+ const Verbosity: {
34
+ readonly Low: "low";
35
+ readonly Medium: "medium";
36
+ readonly High: "high";
37
+ };
14
38
  }
@@ -3,3 +3,17 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ChrtGptReq = void 0;
7
+ var ChrtGptReq;
8
+ (function (ChrtGptReq) {
9
+ ChrtGptReq.ReasoningEffort = {
10
+ Low: "low",
11
+ Medium: "medium",
12
+ High: "high",
13
+ };
14
+ ChrtGptReq.Verbosity = {
15
+ Low: "low",
16
+ Medium: "medium",
17
+ High: "high",
18
+ };
19
+ })(ChrtGptReq || (exports.ChrtGptReq = ChrtGptReq = {}));
@@ -31,7 +31,22 @@ export declare class Conversations {
31
31
  protected readonly _options: Conversations.Options;
32
32
  constructor(_options?: Conversations.Options);
33
33
  /**
34
- * Lists the caller's ChrtGPT conversations, most recently active first by default. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | () -> (ChrtGPTConversationListRes)
34
+ * Permanently deletes the caller's ChrtGPT conversations and their history, skipping IDs that don't exist or aren't the caller's. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | (ChrtGPTConversationsDeleteManyReq) -> (ChrtGPTConversationsDeleteManyRes)
35
+ *
36
+ * @param {Chrt.chrtGpt.ChrtGptConversationsDeleteManyReq} request
37
+ * @param {Conversations.RequestOptions} requestOptions - Request-specific configuration.
38
+ *
39
+ * @throws {@link Chrt.UnprocessableEntityError}
40
+ *
41
+ * @example
42
+ * await client.chrtGpt.conversations.deleteManyV1({
43
+ * conversation_ids: ["conversation_ids"]
44
+ * })
45
+ */
46
+ deleteManyV1(request: Chrt.chrtGpt.ChrtGptConversationsDeleteManyReq, requestOptions?: Conversations.RequestOptions): core.HttpResponsePromise<Chrt.ChrtGptConversationsDeleteManyRes>;
47
+ private __deleteManyV1;
48
+ /**
49
+ * Lists the caller's ChrtGPT conversations, most recently active first by default, with optional search over summaries, titles, and order identifiers. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | () -> (ChrtGPTConversationListRes)
35
50
  *
36
51
  * @param {Chrt.chrtGpt.ConversationsListV1Request} request
37
52
  * @param {Conversations.RequestOptions} requestOptions - Request-specific configuration.
@@ -43,11 +58,28 @@ export declare class Conversations {
43
58
  * sort_by: "updated_at",
44
59
  * sort_order: "asc",
45
60
  * page: 1,
46
- * page_size: 1
61
+ * page_size: 1,
62
+ * search: "search"
47
63
  * })
48
64
  */
49
65
  listV1(request?: Chrt.chrtGpt.ConversationsListV1Request, requestOptions?: Conversations.RequestOptions): core.HttpResponsePromise<Chrt.ChrtGptConversationListRes>;
50
66
  private __listV1;
67
+ /**
68
+ * Renames one of the caller's ChrtGPT conversations; ChrtGPT never retitles it after that. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | (ChrtGPTConversationsUpdateTitleReq) -> (ChrtGPTConversation1)
69
+ *
70
+ * @param {string} conversationId
71
+ * @param {Chrt.chrtGpt.ChrtGptConversationsUpdateTitleReq} request
72
+ * @param {Conversations.RequestOptions} requestOptions - Request-specific configuration.
73
+ *
74
+ * @throws {@link Chrt.UnprocessableEntityError}
75
+ *
76
+ * @example
77
+ * await client.chrtGpt.conversations.updateTitleV1("conversation_id", {
78
+ * title: "title"
79
+ * })
80
+ */
81
+ updateTitleV1(conversationId: string, request: Chrt.chrtGpt.ChrtGptConversationsUpdateTitleReq, requestOptions?: Conversations.RequestOptions): core.HttpResponsePromise<Chrt.ChrtGptConversation1>;
82
+ private __updateTitleV1;
51
83
  /**
52
84
  * Gets one of the caller's ChrtGPT conversations with its history of messages, tool calls, and web searches. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | () -> (ChrtGPTConversationRes)
53
85
  *
@@ -56,7 +56,74 @@ class Conversations {
56
56
  this._options = _options;
57
57
  }
58
58
  /**
59
- * Lists the caller's ChrtGPT conversations, most recently active first by default. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | () -> (ChrtGPTConversationListRes)
59
+ * Permanently deletes the caller's ChrtGPT conversations and their history, skipping IDs that don't exist or aren't the caller's. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | (ChrtGPTConversationsDeleteManyReq) -> (ChrtGPTConversationsDeleteManyRes)
60
+ *
61
+ * @param {Chrt.chrtGpt.ChrtGptConversationsDeleteManyReq} request
62
+ * @param {Conversations.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link Chrt.UnprocessableEntityError}
65
+ *
66
+ * @example
67
+ * await client.chrtGpt.conversations.deleteManyV1({
68
+ * conversation_ids: ["conversation_ids"]
69
+ * })
70
+ */
71
+ deleteManyV1(request, requestOptions) {
72
+ return core.HttpResponsePromise.fromPromise(this.__deleteManyV1(request, requestOptions));
73
+ }
74
+ __deleteManyV1(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, "chrt_gpt/conversations/delete_many/v1"),
80
+ method: "DELETE",
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 {
92
+ data: _response.body,
93
+ rawResponse: _response.rawResponse,
94
+ };
95
+ }
96
+ if (_response.error.reason === "status-code") {
97
+ switch (_response.error.statusCode) {
98
+ case 422:
99
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
100
+ default:
101
+ throw new errors.ChrtError({
102
+ statusCode: _response.error.statusCode,
103
+ body: _response.error.body,
104
+ rawResponse: _response.rawResponse,
105
+ });
106
+ }
107
+ }
108
+ switch (_response.error.reason) {
109
+ case "non-json":
110
+ throw new errors.ChrtError({
111
+ statusCode: _response.error.statusCode,
112
+ body: _response.error.rawBody,
113
+ rawResponse: _response.rawResponse,
114
+ });
115
+ case "timeout":
116
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /chrt_gpt/conversations/delete_many/v1.");
117
+ case "unknown":
118
+ throw new errors.ChrtError({
119
+ message: _response.error.errorMessage,
120
+ rawResponse: _response.rawResponse,
121
+ });
122
+ }
123
+ });
124
+ }
125
+ /**
126
+ * Lists the caller's ChrtGPT conversations, most recently active first by default, with optional search over summaries, titles, and order identifiers. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | () -> (ChrtGPTConversationListRes)
60
127
  *
61
128
  * @param {Chrt.chrtGpt.ConversationsListV1Request} request
62
129
  * @param {Conversations.RequestOptions} requestOptions - Request-specific configuration.
@@ -68,7 +135,8 @@ class Conversations {
68
135
  * sort_by: "updated_at",
69
136
  * sort_order: "asc",
70
137
  * page: 1,
71
- * page_size: 1
138
+ * page_size: 1,
139
+ * search: "search"
72
140
  * })
73
141
  */
74
142
  listV1(request = {}, requestOptions) {
@@ -77,7 +145,7 @@ class Conversations {
77
145
  __listV1() {
78
146
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
79
147
  var _a, _b, _c, _d, _e, _f;
80
- const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize } = request;
148
+ const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search } = request;
81
149
  const _queryParams = {};
82
150
  if (sortBy !== undefined) {
83
151
  _queryParams["sort_by"] = sortBy;
@@ -91,6 +159,9 @@ class Conversations {
91
159
  if (pageSize !== undefined) {
92
160
  _queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
93
161
  }
162
+ if (search !== undefined) {
163
+ _queryParams["search"] = search;
164
+ }
94
165
  let _headers = (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
95
166
  const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
96
167
  url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, "chrt_gpt/conversations/list/v1"),
@@ -133,6 +204,71 @@ class Conversations {
133
204
  }
134
205
  });
135
206
  }
207
+ /**
208
+ * Renames one of the caller's ChrtGPT conversations; ChrtGPT never retitles it after that. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | (ChrtGPTConversationsUpdateTitleReq) -> (ChrtGPTConversation1)
209
+ *
210
+ * @param {string} conversationId
211
+ * @param {Chrt.chrtGpt.ChrtGptConversationsUpdateTitleReq} request
212
+ * @param {Conversations.RequestOptions} requestOptions - Request-specific configuration.
213
+ *
214
+ * @throws {@link Chrt.UnprocessableEntityError}
215
+ *
216
+ * @example
217
+ * await client.chrtGpt.conversations.updateTitleV1("conversation_id", {
218
+ * title: "title"
219
+ * })
220
+ */
221
+ updateTitleV1(conversationId, request, requestOptions) {
222
+ return core.HttpResponsePromise.fromPromise(this.__updateTitleV1(conversationId, request, requestOptions));
223
+ }
224
+ __updateTitleV1(conversationId, request, requestOptions) {
225
+ return __awaiter(this, void 0, void 0, function* () {
226
+ var _a, _b, _c, _d;
227
+ 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);
228
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
229
+ 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, `chrt_gpt/conversations/update_title/v1/${encodeURIComponent(conversationId)}`),
230
+ method: "PATCH",
231
+ headers: _headers,
232
+ contentType: "application/json",
233
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
234
+ requestType: "json",
235
+ body: request,
236
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
237
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
238
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
239
+ });
240
+ if (_response.ok) {
241
+ return { data: _response.body, rawResponse: _response.rawResponse };
242
+ }
243
+ if (_response.error.reason === "status-code") {
244
+ switch (_response.error.statusCode) {
245
+ case 422:
246
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
247
+ default:
248
+ throw new errors.ChrtError({
249
+ statusCode: _response.error.statusCode,
250
+ body: _response.error.body,
251
+ rawResponse: _response.rawResponse,
252
+ });
253
+ }
254
+ }
255
+ switch (_response.error.reason) {
256
+ case "non-json":
257
+ throw new errors.ChrtError({
258
+ statusCode: _response.error.statusCode,
259
+ body: _response.error.rawBody,
260
+ rawResponse: _response.rawResponse,
261
+ });
262
+ case "timeout":
263
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /chrt_gpt/conversations/update_title/v1/{conversation_id}.");
264
+ case "unknown":
265
+ throw new errors.ChrtError({
266
+ message: _response.error.errorMessage,
267
+ rawResponse: _response.rawResponse,
268
+ });
269
+ }
270
+ });
271
+ }
136
272
  /**
137
273
  * Gets one of the caller's ChrtGPT conversations with its history of messages, tool calls, and web searches. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | () -> (ChrtGPTConversationRes)
138
274
  *
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * conversation_ids: ["conversation_ids"]
8
+ * }
9
+ */
10
+ export interface ChrtGptConversationsDeleteManyReq {
11
+ /** IDs that don't exist or aren't the caller's are skipped. */
12
+ conversation_ids: string[];
13
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * title: "title"
8
+ * }
9
+ */
10
+ export interface ChrtGptConversationsUpdateTitleReq {
11
+ title: 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 });
@@ -8,7 +8,8 @@ import * as Chrt from "../../../../../../index.js";
8
8
  * sort_by: "updated_at",
9
9
  * sort_order: "asc",
10
10
  * page: 1,
11
- * page_size: 1
11
+ * page_size: 1,
12
+ * search: "search"
12
13
  * }
13
14
  */
14
15
  export interface ConversationsListV1Request {
@@ -18,4 +19,6 @@ export interface ConversationsListV1Request {
18
19
  sort_order?: Chrt.SortOrderEnum | null;
19
20
  page?: number | null;
20
21
  page_size?: number | null;
22
+ /** Full-text search query for conversation summary, title, order short IDs, AWB numbers, or off-CHRT reference IDs. */
23
+ search?: string | null;
21
24
  }
@@ -1 +1,3 @@
1
+ export { type ChrtGptConversationsDeleteManyReq } from "./ChrtGptConversationsDeleteManyReq.js";
1
2
  export { type ConversationsListV1Request } from "./ConversationsListV1Request.js";
3
+ export { type ChrtGptConversationsUpdateTitleReq } from "./ChrtGptConversationsUpdateTitleReq.js";
@@ -1,2 +1,4 @@
1
1
  export * as conversations from "./conversations/index.js";
2
+ export * as voice from "./voice/index.js";
2
3
  export * from "./conversations/client/requests/index.js";
4
+ export * from "./voice/client/requests/index.js";
@@ -36,6 +36,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.conversations = void 0;
39
+ exports.voice = exports.conversations = void 0;
40
40
  exports.conversations = __importStar(require("./conversations/index.js"));
41
+ exports.voice = __importStar(require("./voice/index.js"));
41
42
  __exportStar(require("./conversations/client/requests/index.js"), exports);
43
+ __exportStar(require("./voice/client/requests/index.js"), exports);
@@ -0,0 +1,49 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../environments.js";
5
+ import * as core from "../../../../../../core/index.js";
6
+ import * as Chrt from "../../../../../index.js";
7
+ export declare namespace Voice {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.ChrtEnvironment | string>;
10
+ /** Specify a custom URL to connect the client to. */
11
+ baseUrl?: core.Supplier<string>;
12
+ token?: core.Supplier<core.BearerToken | undefined>;
13
+ /** Additional headers to include in requests. */
14
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
+ fetcher?: core.FetchFunction;
16
+ }
17
+ interface RequestOptions {
18
+ /** The maximum time to wait for a response in seconds. */
19
+ timeoutInSeconds?: number;
20
+ /** The number of times to retry the request. Defaults to 2. */
21
+ maxRetries?: number;
22
+ /** A hook to abort the request. */
23
+ abortSignal?: AbortSignal;
24
+ /** Additional query string parameters to include in the request. */
25
+ queryParams?: Record<string, unknown>;
26
+ /** Additional headers to include in the request. */
27
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
28
+ }
29
+ }
30
+ export declare class Voice {
31
+ protected readonly _options: Voice.Options;
32
+ constructor(_options?: Voice.Options);
33
+ /**
34
+ * Creates a LiveKit room with a ChrtGPT voice agent acting as the caller, using the chosen delegation, and returns a token to join it. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | (ChrtGPTVoiceStartReq) -> (ChrtGPTVoiceStartRes)
35
+ *
36
+ * @param {Chrt.chrtGpt.ChrtGptVoiceStartReq} request
37
+ * @param {Voice.RequestOptions} requestOptions - Request-specific configuration.
38
+ *
39
+ * @throws {@link Chrt.UnprocessableEntityError}
40
+ *
41
+ * @example
42
+ * await client.chrtGpt.voice.startV1({
43
+ * delegation: "responses"
44
+ * })
45
+ */
46
+ startV1(request: Chrt.chrtGpt.ChrtGptVoiceStartReq, requestOptions?: Voice.RequestOptions): core.HttpResponsePromise<Chrt.ChrtGptVoiceStartRes>;
47
+ private __startV1;
48
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
49
+ }