@chrt-inc/typescript-sdk 1.1023.0 → 1.1024.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 (183) hide show
  1. package/README.md +12 -9
  2. package/dist/cjs/Client.js +2 -2
  3. package/dist/cjs/api/resources/chrtGpt/client/Client.d.ts +6 -13
  4. package/dist/cjs/api/resources/chrtGpt/client/Client.js +24 -17
  5. package/dist/cjs/api/resources/chrtGpt/client/requests/{ChrtGptMessageReq.d.ts → ChrtGptReq.d.ts} +1 -1
  6. package/dist/cjs/api/resources/chrtGpt/client/requests/index.d.ts +1 -1
  7. package/dist/cjs/api/resources/chrtGpt/index.d.ts +1 -0
  8. package/dist/cjs/api/resources/chrtGpt/index.js +1 -0
  9. package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/Client.d.ts +65 -0
  10. package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/Client.js +205 -0
  11. package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/index.d.ts +2 -0
  12. package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/index.js +17 -0
  13. package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/requests/ConversationsListV1Request.d.ts +21 -0
  14. package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/requests/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/chrtGpt/resources/conversations/client/requests/index.js +2 -0
  16. package/dist/cjs/api/resources/chrtGpt/resources/conversations/index.d.ts +1 -0
  17. package/dist/cjs/api/resources/chrtGpt/resources/conversations/index.js +17 -0
  18. package/dist/cjs/api/resources/chrtGpt/resources/index.d.ts +2 -0
  19. package/dist/cjs/api/resources/chrtGpt/resources/index.js +41 -0
  20. package/dist/cjs/api/resources/orgs/resources/connections/client/Client.d.ts +18 -1
  21. package/dist/cjs/api/resources/orgs/resources/connections/client/Client.js +75 -6
  22. package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ConnectionsListShippersForCoordinatorV1Request.d.ts +4 -1
  23. package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ShipperCoordinatorUpdateKnownShipperReq.d.ts +12 -0
  24. package/dist/cjs/api/resources/orgs/resources/connections/client/requests/ShipperCoordinatorUpdateKnownShipperReq.js +5 -0
  25. package/dist/cjs/api/resources/orgs/resources/connections/client/requests/index.d.ts +1 -0
  26. package/dist/cjs/api/resources/orgs/resources/publicData/client/Client.d.ts +3 -0
  27. package/dist/cjs/api/resources/orgs/resources/publicData/client/Client.js +5 -0
  28. package/dist/cjs/api/resources/orgs/resources/publicData/index.d.ts +1 -0
  29. package/dist/cjs/api/resources/orgs/resources/publicData/index.js +1 -0
  30. package/dist/cjs/api/resources/orgs/resources/publicData/resources/index.d.ts +2 -0
  31. package/dist/cjs/api/resources/orgs/resources/publicData/resources/index.js +41 -0
  32. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/Client.d.ts +86 -0
  33. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/Client.js +319 -0
  34. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/index.d.ts +2 -0
  35. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/index.js +17 -0
  36. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/BodyPostOrgPublicDataS3ObjectAddV1.d.ts +13 -0
  37. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/BodyPostOrgPublicDataS3ObjectAddV1.js +5 -0
  38. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/index.d.ts +1 -0
  39. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/index.js +2 -0
  40. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/index.d.ts +1 -0
  41. package/dist/cjs/api/resources/orgs/resources/publicData/resources/s3Object/index.js +17 -0
  42. package/dist/cjs/api/types/ChrtGptAssistantMessageItem.d.ts +8 -0
  43. package/dist/cjs/api/types/ChrtGptAssistantMessageItem.js +5 -0
  44. package/dist/cjs/api/types/ChrtGptCompletedEvent.d.ts +11 -0
  45. package/dist/cjs/api/types/ChrtGptCompletedEvent.js +5 -0
  46. package/dist/cjs/api/types/ChrtGptConversation1.d.ts +14 -0
  47. package/dist/cjs/api/types/ChrtGptConversation1.js +5 -0
  48. package/dist/cjs/api/types/ChrtGptConversationListRes.d.ts +8 -0
  49. package/dist/cjs/api/types/ChrtGptConversationListRes.js +5 -0
  50. package/dist/cjs/api/types/ChrtGptConversationRes.d.ts +9 -0
  51. package/dist/cjs/api/types/ChrtGptConversationRes.js +5 -0
  52. package/dist/cjs/api/types/ChrtGptConversationSortByEnum.d.ts +8 -0
  53. package/dist/cjs/api/types/ChrtGptConversationSortByEnum.js +10 -0
  54. package/dist/cjs/api/types/ChrtGptErrorEvent.d.ts +9 -0
  55. package/dist/cjs/api/types/ChrtGptErrorEvent.js +5 -0
  56. package/dist/cjs/api/types/ChrtGptEvent.d.ts +31 -0
  57. package/dist/cjs/api/types/ChrtGptEvent.js +5 -0
  58. package/dist/cjs/api/types/ChrtGptHistoryItem.d.ts +22 -0
  59. package/dist/cjs/api/types/ChrtGptHistoryItem.js +5 -0
  60. package/dist/{esm/api/types/ChrtGptMessageRes.d.mts → cjs/api/types/ChrtGptStartedEvent.d.ts} +4 -2
  61. package/dist/cjs/api/types/ChrtGptStartedEvent.js +5 -0
  62. package/dist/cjs/api/types/ChrtGptTextDeltaEvent.d.ts +8 -0
  63. package/dist/cjs/api/types/ChrtGptTextDeltaEvent.js +5 -0
  64. package/dist/cjs/api/types/ChrtGptTitleEvent.d.ts +11 -0
  65. package/dist/cjs/api/types/ChrtGptTitleEvent.js +5 -0
  66. package/dist/cjs/api/types/ChrtGptToolCalledEvent.d.ts +12 -0
  67. package/dist/cjs/api/types/ChrtGptToolCalledEvent.js +5 -0
  68. package/dist/cjs/api/types/ChrtGptToolOutputEvent.d.ts +9 -0
  69. package/dist/cjs/api/types/ChrtGptToolOutputEvent.js +5 -0
  70. package/dist/cjs/api/types/ChrtGptUserMessageItem.d.ts +6 -0
  71. package/dist/cjs/api/types/ChrtGptUserMessageItem.js +5 -0
  72. package/dist/cjs/api/types/ChrtGptWebSearchEvent.d.ts +18 -0
  73. package/dist/cjs/api/types/ChrtGptWebSearchEvent.js +5 -0
  74. package/dist/cjs/api/types/OrgPublicData1.d.ts +1 -0
  75. package/dist/cjs/api/types/OrgPublicDataS3ObjectMetadata1.d.ts +21 -0
  76. package/dist/cjs/api/types/OrgPublicDataS3ObjectMetadata1.js +5 -0
  77. package/dist/cjs/api/types/ShipperCoordinatorConnection1.d.ts +4 -0
  78. package/dist/cjs/api/types/SpecialHandlingCodeEnum1.d.ts +63 -1
  79. package/dist/cjs/api/types/SpecialHandlingCodeEnum1.js +62 -0
  80. package/dist/cjs/api/types/index.d.ts +17 -1
  81. package/dist/cjs/api/types/index.js +17 -1
  82. package/dist/cjs/core/index.d.ts +1 -0
  83. package/dist/cjs/core/index.js +1 -0
  84. package/dist/cjs/core/stream/Stream.d.ts +46 -0
  85. package/dist/cjs/core/stream/Stream.js +169 -0
  86. package/dist/cjs/core/stream/index.d.ts +1 -0
  87. package/dist/cjs/core/stream/index.js +5 -0
  88. package/dist/cjs/version.d.ts +1 -1
  89. package/dist/cjs/version.js +1 -1
  90. package/dist/esm/Client.mjs +2 -2
  91. package/dist/esm/api/resources/chrtGpt/client/Client.d.mts +6 -13
  92. package/dist/esm/api/resources/chrtGpt/client/Client.mjs +24 -17
  93. package/dist/esm/api/resources/chrtGpt/client/requests/{ChrtGptMessageReq.d.mts → ChrtGptReq.d.mts} +1 -1
  94. package/dist/esm/api/resources/chrtGpt/client/requests/index.d.mts +1 -1
  95. package/dist/esm/api/resources/chrtGpt/index.d.mts +1 -0
  96. package/dist/esm/api/resources/chrtGpt/index.mjs +1 -0
  97. package/dist/esm/api/resources/chrtGpt/resources/conversations/client/Client.d.mts +65 -0
  98. package/dist/esm/api/resources/chrtGpt/resources/conversations/client/Client.mjs +168 -0
  99. package/dist/esm/api/resources/chrtGpt/resources/conversations/client/index.d.mts +2 -0
  100. package/dist/esm/api/resources/chrtGpt/resources/conversations/client/index.mjs +1 -0
  101. package/dist/esm/api/resources/chrtGpt/resources/conversations/client/requests/ConversationsListV1Request.d.mts +21 -0
  102. package/dist/esm/api/resources/chrtGpt/resources/conversations/client/requests/index.d.mts +1 -0
  103. package/dist/esm/api/resources/chrtGpt/resources/conversations/client/requests/index.mjs +1 -0
  104. package/dist/esm/api/resources/chrtGpt/resources/conversations/index.d.mts +1 -0
  105. package/dist/esm/api/resources/chrtGpt/resources/conversations/index.mjs +1 -0
  106. package/dist/esm/api/resources/chrtGpt/resources/index.d.mts +2 -0
  107. package/dist/esm/api/resources/chrtGpt/resources/index.mjs +2 -0
  108. package/dist/esm/api/resources/orgs/resources/connections/client/Client.d.mts +18 -1
  109. package/dist/esm/api/resources/orgs/resources/connections/client/Client.mjs +75 -6
  110. package/dist/esm/api/resources/orgs/resources/connections/client/requests/ConnectionsListShippersForCoordinatorV1Request.d.mts +4 -1
  111. package/dist/esm/api/resources/orgs/resources/connections/client/requests/ShipperCoordinatorUpdateKnownShipperReq.d.mts +12 -0
  112. package/dist/esm/api/resources/orgs/resources/connections/client/requests/ShipperCoordinatorUpdateKnownShipperReq.mjs +4 -0
  113. package/dist/esm/api/resources/orgs/resources/connections/client/requests/index.d.mts +1 -0
  114. package/dist/esm/api/resources/orgs/resources/publicData/client/Client.d.mts +3 -0
  115. package/dist/esm/api/resources/orgs/resources/publicData/client/Client.mjs +5 -0
  116. package/dist/esm/api/resources/orgs/resources/publicData/index.d.mts +1 -0
  117. package/dist/esm/api/resources/orgs/resources/publicData/index.mjs +1 -0
  118. package/dist/esm/api/resources/orgs/resources/publicData/resources/index.d.mts +2 -0
  119. package/dist/esm/api/resources/orgs/resources/publicData/resources/index.mjs +2 -0
  120. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/Client.d.mts +86 -0
  121. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/Client.mjs +282 -0
  122. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/index.d.mts +2 -0
  123. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/index.mjs +1 -0
  124. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/BodyPostOrgPublicDataS3ObjectAddV1.d.mts +13 -0
  125. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/BodyPostOrgPublicDataS3ObjectAddV1.mjs +4 -0
  126. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/index.d.mts +1 -0
  127. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/client/requests/index.mjs +1 -0
  128. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/index.d.mts +1 -0
  129. package/dist/esm/api/resources/orgs/resources/publicData/resources/s3Object/index.mjs +1 -0
  130. package/dist/esm/api/types/ChrtGptAssistantMessageItem.d.mts +8 -0
  131. package/dist/esm/api/types/ChrtGptAssistantMessageItem.mjs +4 -0
  132. package/dist/esm/api/types/ChrtGptCompletedEvent.d.mts +11 -0
  133. package/dist/esm/api/types/ChrtGptCompletedEvent.mjs +4 -0
  134. package/dist/esm/api/types/ChrtGptConversation1.d.mts +14 -0
  135. package/dist/esm/api/types/ChrtGptConversation1.mjs +4 -0
  136. package/dist/esm/api/types/ChrtGptConversationListRes.d.mts +8 -0
  137. package/dist/esm/api/types/ChrtGptConversationListRes.mjs +4 -0
  138. package/dist/esm/api/types/ChrtGptConversationRes.d.mts +9 -0
  139. package/dist/esm/api/types/ChrtGptConversationRes.mjs +4 -0
  140. package/dist/esm/api/types/ChrtGptConversationSortByEnum.d.mts +8 -0
  141. package/dist/esm/api/types/ChrtGptConversationSortByEnum.mjs +7 -0
  142. package/dist/esm/api/types/ChrtGptErrorEvent.d.mts +9 -0
  143. package/dist/esm/api/types/ChrtGptErrorEvent.mjs +4 -0
  144. package/dist/esm/api/types/ChrtGptEvent.d.mts +31 -0
  145. package/dist/esm/api/types/ChrtGptEvent.mjs +4 -0
  146. package/dist/esm/api/types/ChrtGptHistoryItem.d.mts +22 -0
  147. package/dist/esm/api/types/ChrtGptHistoryItem.mjs +4 -0
  148. package/dist/{cjs/api/types/ChrtGptMessageRes.d.ts → esm/api/types/ChrtGptStartedEvent.d.mts} +4 -2
  149. package/dist/esm/api/types/ChrtGptStartedEvent.mjs +4 -0
  150. package/dist/esm/api/types/ChrtGptTextDeltaEvent.d.mts +8 -0
  151. package/dist/esm/api/types/ChrtGptTextDeltaEvent.mjs +4 -0
  152. package/dist/esm/api/types/ChrtGptTitleEvent.d.mts +11 -0
  153. package/dist/esm/api/types/ChrtGptTitleEvent.mjs +4 -0
  154. package/dist/esm/api/types/ChrtGptToolCalledEvent.d.mts +12 -0
  155. package/dist/esm/api/types/ChrtGptToolCalledEvent.mjs +4 -0
  156. package/dist/esm/api/types/ChrtGptToolOutputEvent.d.mts +9 -0
  157. package/dist/esm/api/types/ChrtGptToolOutputEvent.mjs +4 -0
  158. package/dist/esm/api/types/ChrtGptUserMessageItem.d.mts +6 -0
  159. package/dist/esm/api/types/ChrtGptUserMessageItem.mjs +4 -0
  160. package/dist/esm/api/types/ChrtGptWebSearchEvent.d.mts +18 -0
  161. package/dist/esm/api/types/ChrtGptWebSearchEvent.mjs +4 -0
  162. package/dist/esm/api/types/OrgPublicData1.d.mts +1 -0
  163. package/dist/esm/api/types/OrgPublicDataS3ObjectMetadata1.d.mts +21 -0
  164. package/dist/esm/api/types/OrgPublicDataS3ObjectMetadata1.mjs +4 -0
  165. package/dist/esm/api/types/ShipperCoordinatorConnection1.d.mts +4 -0
  166. package/dist/esm/api/types/SpecialHandlingCodeEnum1.d.mts +63 -1
  167. package/dist/esm/api/types/SpecialHandlingCodeEnum1.mjs +62 -0
  168. package/dist/esm/api/types/index.d.mts +17 -1
  169. package/dist/esm/api/types/index.mjs +17 -1
  170. package/dist/esm/core/index.d.mts +1 -0
  171. package/dist/esm/core/index.mjs +1 -0
  172. package/dist/esm/core/stream/Stream.d.mts +46 -0
  173. package/dist/esm/core/stream/Stream.mjs +164 -0
  174. package/dist/esm/core/stream/index.d.mts +1 -0
  175. package/dist/esm/core/stream/index.mjs +1 -0
  176. package/dist/esm/version.d.mts +1 -1
  177. package/dist/esm/version.mjs +1 -1
  178. package/package.json +1 -1
  179. package/reference.md +470 -4
  180. /package/dist/cjs/api/resources/chrtGpt/client/requests/{ChrtGptMessageReq.js → ChrtGptReq.js} +0 -0
  181. /package/dist/cjs/api/{types/ChrtGptMessageRes.js → resources/chrtGpt/resources/conversations/client/requests/ConversationsListV1Request.js} +0 -0
  182. /package/dist/esm/api/resources/chrtGpt/client/requests/{ChrtGptMessageReq.mjs → ChrtGptReq.mjs} +0 -0
  183. /package/dist/esm/api/{types/ChrtGptMessageRes.mjs → resources/chrtGpt/resources/conversations/client/requests/ConversationsListV1Request.mjs} +0 -0
@@ -0,0 +1,169 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __asyncValues = (this && this.__asyncValues) || function (o) {
12
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
13
+ var m = o[Symbol.asyncIterator], i;
14
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
15
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
16
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
17
+ };
18
+ var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
19
+ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
20
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
21
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
22
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
23
+ function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
24
+ function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
25
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
26
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
27
+ function fulfill(value) { resume("next", value); }
28
+ function reject(value) { resume("throw", value); }
29
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.Stream = void 0;
33
+ exports.readableStreamAsyncIterable = readableStreamAsyncIterable;
34
+ const index_js_1 = require("../runtime/index.js");
35
+ const DATA_PREFIX = "data:";
36
+ class Stream {
37
+ constructor({ stream, parse, eventShape, signal }) {
38
+ this.controller = new AbortController();
39
+ this.stream = stream;
40
+ this.parse = parse;
41
+ if (eventShape.type === "sse") {
42
+ this.prefix = DATA_PREFIX;
43
+ this.messageTerminator = "\n";
44
+ this.streamTerminator = eventShape.streamTerminator;
45
+ }
46
+ else {
47
+ this.messageTerminator = eventShape.messageTerminator;
48
+ }
49
+ signal === null || signal === void 0 ? void 0 : signal.addEventListener("abort", () => this.controller.abort());
50
+ }
51
+ iterMessages() {
52
+ return __asyncGenerator(this, arguments, function* iterMessages_1() {
53
+ var _a, e_1, _b, _c;
54
+ this.controller.signal;
55
+ const stream = readableStreamAsyncIterable(this.stream);
56
+ let buf = "";
57
+ let prefixSeen = false;
58
+ try {
59
+ for (var _d = true, stream_1 = __asyncValues(stream), stream_1_1; stream_1_1 = yield __await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) {
60
+ _c = stream_1_1.value;
61
+ _d = false;
62
+ const chunk = _c;
63
+ buf += this.decodeChunk(chunk);
64
+ let terminatorIndex;
65
+ while ((terminatorIndex = buf.indexOf(this.messageTerminator)) >= 0) {
66
+ let line = buf.slice(0, terminatorIndex + 1);
67
+ buf = buf.slice(terminatorIndex + this.messageTerminator.length);
68
+ if (!line.trim()) {
69
+ continue;
70
+ }
71
+ if (!prefixSeen && this.prefix != null) {
72
+ const prefixIndex = line.indexOf(this.prefix);
73
+ if (prefixIndex === -1) {
74
+ continue;
75
+ }
76
+ prefixSeen = true;
77
+ line = line.slice(prefixIndex + this.prefix.length);
78
+ }
79
+ if (this.streamTerminator != null && line.includes(this.streamTerminator)) {
80
+ return yield __await(void 0);
81
+ }
82
+ const message = yield __await(this.parse(JSON.parse(line)));
83
+ yield yield __await(message);
84
+ prefixSeen = false;
85
+ }
86
+ }
87
+ }
88
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
89
+ finally {
90
+ try {
91
+ if (!_d && !_a && (_b = stream_1.return)) yield __await(_b.call(stream_1));
92
+ }
93
+ finally { if (e_1) throw e_1.error; }
94
+ }
95
+ });
96
+ }
97
+ [Symbol.asyncIterator]() {
98
+ return __asyncGenerator(this, arguments, function* _a() {
99
+ var _b, e_2, _c, _d;
100
+ try {
101
+ for (var _e = true, _f = __asyncValues(this.iterMessages()), _g; _g = yield __await(_f.next()), _b = _g.done, !_b; _e = true) {
102
+ _d = _g.value;
103
+ _e = false;
104
+ const message = _d;
105
+ yield yield __await(message);
106
+ }
107
+ }
108
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
109
+ finally {
110
+ try {
111
+ if (!_e && !_b && (_c = _f.return)) yield __await(_c.call(_f));
112
+ }
113
+ finally { if (e_2) throw e_2.error; }
114
+ }
115
+ });
116
+ }
117
+ decodeChunk(chunk) {
118
+ let decoded = "";
119
+ // If TextDecoder is present, use it
120
+ if (typeof TextDecoder !== "undefined") {
121
+ const decoder = new TextDecoder("utf8");
122
+ decoded += decoder.decode(chunk);
123
+ }
124
+ // Buffer is present in Node.js environment
125
+ else if (index_js_1.RUNTIME.type === "node" && typeof chunk !== "undefined") {
126
+ decoded += Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
127
+ }
128
+ return decoded;
129
+ }
130
+ }
131
+ exports.Stream = Stream;
132
+ /**
133
+ * Browser polyfill for ReadableStream
134
+ */
135
+ // biome-ignore lint/suspicious/noExplicitAny: allow explicit any
136
+ function readableStreamAsyncIterable(stream) {
137
+ if (stream[Symbol.asyncIterator]) {
138
+ return stream;
139
+ }
140
+ const reader = stream.getReader();
141
+ return {
142
+ next() {
143
+ return __awaiter(this, void 0, void 0, function* () {
144
+ try {
145
+ const result = yield reader.read();
146
+ if (result === null || result === void 0 ? void 0 : result.done) {
147
+ reader.releaseLock();
148
+ } // release lock when stream becomes closed
149
+ return result;
150
+ }
151
+ catch (e) {
152
+ reader.releaseLock(); // release lock when stream becomes errored
153
+ throw e;
154
+ }
155
+ });
156
+ },
157
+ return() {
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ const cancelPromise = reader.cancel();
160
+ reader.releaseLock();
161
+ yield cancelPromise;
162
+ return { done: true, value: undefined };
163
+ });
164
+ },
165
+ [Symbol.asyncIterator]() {
166
+ return this;
167
+ },
168
+ };
169
+ }
@@ -0,0 +1 @@
1
+ export { Stream } from "./Stream.js";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Stream = void 0;
4
+ var Stream_js_1 = require("./Stream.js");
5
+ Object.defineProperty(exports, "Stream", { enumerable: true, get: function () { return Stream_js_1.Stream; } });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.1023.0";
1
+ export declare const SDK_VERSION = "1.1024.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.1023.0";
4
+ exports.SDK_VERSION = "1.1024.0";
@@ -26,8 +26,8 @@ export class ChrtClient {
26
26
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
27
27
  "X-Fern-Language": "JavaScript",
28
28
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
29
- "X-Fern-SDK-Version": "1.1023.0",
30
- "User-Agent": "@chrt-inc/typescript-sdk/1.1023.0",
29
+ "X-Fern-SDK-Version": "1.1024.0",
30
+ "User-Agent": "@chrt-inc/typescript-sdk/1.1024.0",
31
31
  "X-Fern-Runtime": core.RUNTIME.type,
32
32
  "X-Fern-Runtime-Version": core.RUNTIME.version,
33
33
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -4,6 +4,7 @@
4
4
  import * as environments from "../../../../environments.mjs";
5
5
  import * as core from "../../../../core/index.mjs";
6
6
  import * as Chrt from "../../../index.mjs";
7
+ import { Conversations } from "../resources/conversations/client/Client.mjs";
7
8
  export declare namespace ChrtGpt {
8
9
  interface Options {
9
10
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -29,21 +30,13 @@ export declare namespace ChrtGpt {
29
30
  }
30
31
  export declare class ChrtGpt {
31
32
  protected readonly _options: ChrtGpt.Options;
33
+ protected _conversations: Conversations | undefined;
32
34
  constructor(_options?: ChrtGpt.Options);
35
+ get conversations(): Conversations;
33
36
  /**
34
- * Sends a message to ChrtGPT and returns its reply, starting a new conversation when no conversation_id is given. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | (ChrtGPTMessageReq) -> (ChrtGPTMessageRes)
35
- *
36
- * @param {Chrt.ChrtGptMessageReq} request
37
- * @param {ChrtGpt.RequestOptions} requestOptions - Request-specific configuration.
38
- *
39
- * @throws {@link Chrt.UnprocessableEntityError}
40
- *
41
- * @example
42
- * await client.chrtGpt.messageV1({
43
- * message: "message"
44
- * })
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])
45
38
  */
46
- messageV1(request: Chrt.ChrtGptMessageReq, requestOptions?: ChrtGpt.RequestOptions): core.HttpResponsePromise<Chrt.ChrtGptMessageRes>;
47
- private __messageV1;
39
+ postV1(request: Chrt.ChrtGptReq, requestOptions?: ChrtGpt.RequestOptions): core.HttpResponsePromise<core.Stream<Chrt.ChrtGptEvent>>;
40
+ private __postV1;
48
41
  protected _getAuthorizationHeader(): Promise<string | undefined>;
49
42
  }
@@ -15,44 +15,51 @@ import * as core from "../../../../core/index.mjs";
15
15
  import * as Chrt from "../../../index.mjs";
16
16
  import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
17
17
  import * as errors from "../../../../errors/index.mjs";
18
+ import { Conversations } from "../resources/conversations/client/Client.mjs";
18
19
  export class ChrtGpt {
19
20
  constructor(_options = {}) {
20
21
  this._options = _options;
21
22
  }
23
+ get conversations() {
24
+ var _a;
25
+ return ((_a = this._conversations) !== null && _a !== void 0 ? _a : (this._conversations = new Conversations(this._options)));
26
+ }
22
27
  /**
23
- * Sends a message to ChrtGPT and returns its reply, starting a new conversation when no conversation_id is given. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | (ChrtGPTMessageReq) -> (ChrtGPTMessageRes)
24
- *
25
- * @param {Chrt.ChrtGptMessageReq} request
26
- * @param {ChrtGpt.RequestOptions} requestOptions - Request-specific configuration.
27
- *
28
- * @throws {@link Chrt.UnprocessableEntityError}
29
- *
30
- * @example
31
- * await client.chrtGpt.messageV1({
32
- * message: "message"
33
- * })
28
+ * 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])
34
29
  */
35
- messageV1(request, requestOptions) {
36
- return core.HttpResponsePromise.fromPromise(this.__messageV1(request, requestOptions));
30
+ postV1(request, requestOptions) {
31
+ return core.HttpResponsePromise.fromPromise(this.__postV1(request, requestOptions));
37
32
  }
38
- __messageV1(request, requestOptions) {
33
+ __postV1(request, requestOptions) {
39
34
  return __awaiter(this, void 0, void 0, function* () {
40
35
  var _a, _b, _c, _d;
41
36
  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
37
  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, "chrt_gpt/message/v1"),
38
+ 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/v1"),
44
39
  method: "POST",
45
40
  headers: _headers,
46
41
  contentType: "application/json",
47
42
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
48
43
  requestType: "json",
49
44
  body: request,
45
+ responseType: "sse",
50
46
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
51
47
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
52
48
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
53
49
  });
54
50
  if (_response.ok) {
55
- return { data: _response.body, rawResponse: _response.rawResponse };
51
+ return {
52
+ data: new core.Stream({
53
+ stream: _response.body,
54
+ parse: (data) => data,
55
+ signal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
56
+ eventShape: {
57
+ type: "sse",
58
+ streamTerminator: "[DONE]",
59
+ },
60
+ }),
61
+ rawResponse: _response.rawResponse,
62
+ };
56
63
  }
57
64
  if (_response.error.reason === "status-code") {
58
65
  switch (_response.error.statusCode) {
@@ -74,7 +81,7 @@ export class ChrtGpt {
74
81
  rawResponse: _response.rawResponse,
75
82
  });
76
83
  case "timeout":
77
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /chrt_gpt/message/v1.");
84
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /chrt_gpt/v1.");
78
85
  case "unknown":
79
86
  throw new errors.ChrtError({
80
87
  message: _response.error.errorMessage,
@@ -7,7 +7,7 @@
7
7
  * message: "message"
8
8
  * }
9
9
  */
10
- export interface ChrtGptMessageReq {
10
+ export interface ChrtGptReq {
11
11
  /** Omit to start a new conversation. */
12
12
  conversation_id?: string | null;
13
13
  message: string;
@@ -1 +1 @@
1
- export { type ChrtGptMessageReq } from "./ChrtGptMessageReq.mjs";
1
+ export { type ChrtGptReq } from "./ChrtGptReq.mjs";
@@ -1 +1,2 @@
1
1
  export * from "./client/index.mjs";
2
+ export * from "./resources/index.mjs";
@@ -1 +1,2 @@
1
1
  export * from "./client/index.mjs";
2
+ export * from "./resources/index.mjs";
@@ -0,0 +1,65 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../environments.mjs";
5
+ import * as core from "../../../../../../core/index.mjs";
6
+ import * as Chrt from "../../../../../index.mjs";
7
+ export declare namespace Conversations {
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 Conversations {
31
+ protected readonly _options: Conversations.Options;
32
+ constructor(_options?: Conversations.Options);
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)
35
+ *
36
+ * @param {Chrt.chrtGpt.ConversationsListV1Request} request
37
+ * @param {Conversations.RequestOptions} requestOptions - Request-specific configuration.
38
+ *
39
+ * @throws {@link Chrt.UnprocessableEntityError}
40
+ *
41
+ * @example
42
+ * await client.chrtGpt.conversations.listV1({
43
+ * sort_by: "updated_at",
44
+ * sort_order: "asc",
45
+ * page: 1,
46
+ * page_size: 1
47
+ * })
48
+ */
49
+ listV1(request?: Chrt.chrtGpt.ConversationsListV1Request, requestOptions?: Conversations.RequestOptions): core.HttpResponsePromise<Chrt.ChrtGptConversationListRes>;
50
+ private __listV1;
51
+ /**
52
+ * 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
+ *
54
+ * @param {string} conversationId
55
+ * @param {Conversations.RequestOptions} requestOptions - Request-specific configuration.
56
+ *
57
+ * @throws {@link Chrt.UnprocessableEntityError}
58
+ *
59
+ * @example
60
+ * await client.chrtGpt.conversations.getV1("conversation_id")
61
+ */
62
+ getV1(conversationId: string, requestOptions?: Conversations.RequestOptions): core.HttpResponsePromise<Chrt.ChrtGptConversationRes>;
63
+ private __getV1;
64
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
65
+ }
@@ -0,0 +1,168 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
+ return new (P || (P = Promise))(function (resolve, reject) {
7
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
11
+ });
12
+ };
13
+ import * as environments from "../../../../../../environments.mjs";
14
+ import * as core from "../../../../../../core/index.mjs";
15
+ import * as Chrt from "../../../../../index.mjs";
16
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
17
+ import * as errors from "../../../../../../errors/index.mjs";
18
+ export class Conversations {
19
+ constructor(_options = {}) {
20
+ this._options = _options;
21
+ }
22
+ /**
23
+ * Lists the caller's ChrtGPT conversations, most recently active first by default. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | () -> (ChrtGPTConversationListRes)
24
+ *
25
+ * @param {Chrt.chrtGpt.ConversationsListV1Request} request
26
+ * @param {Conversations.RequestOptions} requestOptions - Request-specific configuration.
27
+ *
28
+ * @throws {@link Chrt.UnprocessableEntityError}
29
+ *
30
+ * @example
31
+ * await client.chrtGpt.conversations.listV1({
32
+ * sort_by: "updated_at",
33
+ * sort_order: "asc",
34
+ * page: 1,
35
+ * page_size: 1
36
+ * })
37
+ */
38
+ listV1(request = {}, requestOptions) {
39
+ return core.HttpResponsePromise.fromPromise(this.__listV1(request, requestOptions));
40
+ }
41
+ __listV1() {
42
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
43
+ var _a, _b, _c, _d, _e, _f;
44
+ const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize } = request;
45
+ const _queryParams = {};
46
+ if (sortBy !== undefined) {
47
+ _queryParams["sort_by"] = sortBy;
48
+ }
49
+ if (sortOrder !== undefined) {
50
+ _queryParams["sort_order"] = sortOrder;
51
+ }
52
+ if (page !== undefined) {
53
+ _queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
54
+ }
55
+ if (pageSize !== undefined) {
56
+ _queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
57
+ }
58
+ let _headers = mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
59
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
60
+ 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"),
61
+ method: "GET",
62
+ headers: _headers,
63
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
64
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
65
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
66
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
67
+ });
68
+ if (_response.ok) {
69
+ return { data: _response.body, rawResponse: _response.rawResponse };
70
+ }
71
+ if (_response.error.reason === "status-code") {
72
+ switch (_response.error.statusCode) {
73
+ case 422:
74
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
75
+ default:
76
+ throw new errors.ChrtError({
77
+ statusCode: _response.error.statusCode,
78
+ body: _response.error.body,
79
+ rawResponse: _response.rawResponse,
80
+ });
81
+ }
82
+ }
83
+ switch (_response.error.reason) {
84
+ case "non-json":
85
+ throw new errors.ChrtError({
86
+ statusCode: _response.error.statusCode,
87
+ body: _response.error.rawBody,
88
+ rawResponse: _response.rawResponse,
89
+ });
90
+ case "timeout":
91
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /chrt_gpt/conversations/list/v1.");
92
+ case "unknown":
93
+ throw new errors.ChrtError({
94
+ message: _response.error.errorMessage,
95
+ rawResponse: _response.rawResponse,
96
+ });
97
+ }
98
+ });
99
+ }
100
+ /**
101
+ * 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)
102
+ *
103
+ * @param {string} conversationId
104
+ * @param {Conversations.RequestOptions} requestOptions - Request-specific configuration.
105
+ *
106
+ * @throws {@link Chrt.UnprocessableEntityError}
107
+ *
108
+ * @example
109
+ * await client.chrtGpt.conversations.getV1("conversation_id")
110
+ */
111
+ getV1(conversationId, requestOptions) {
112
+ return core.HttpResponsePromise.fromPromise(this.__getV1(conversationId, requestOptions));
113
+ }
114
+ __getV1(conversationId, requestOptions) {
115
+ return __awaiter(this, void 0, void 0, function* () {
116
+ var _a, _b, _c, _d;
117
+ 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);
118
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
119
+ 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/v1/${encodeURIComponent(conversationId)}`),
120
+ method: "GET",
121
+ headers: _headers,
122
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
123
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
124
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
125
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
126
+ });
127
+ if (_response.ok) {
128
+ return { data: _response.body, rawResponse: _response.rawResponse };
129
+ }
130
+ if (_response.error.reason === "status-code") {
131
+ switch (_response.error.statusCode) {
132
+ case 422:
133
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
134
+ default:
135
+ throw new errors.ChrtError({
136
+ statusCode: _response.error.statusCode,
137
+ body: _response.error.body,
138
+ rawResponse: _response.rawResponse,
139
+ });
140
+ }
141
+ }
142
+ switch (_response.error.reason) {
143
+ case "non-json":
144
+ throw new errors.ChrtError({
145
+ statusCode: _response.error.statusCode,
146
+ body: _response.error.rawBody,
147
+ rawResponse: _response.rawResponse,
148
+ });
149
+ case "timeout":
150
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /chrt_gpt/conversations/v1/{conversation_id}.");
151
+ case "unknown":
152
+ throw new errors.ChrtError({
153
+ message: _response.error.errorMessage,
154
+ rawResponse: _response.rawResponse,
155
+ });
156
+ }
157
+ });
158
+ }
159
+ _getAuthorizationHeader() {
160
+ return __awaiter(this, void 0, void 0, function* () {
161
+ const bearer = yield core.Supplier.get(this._options.token);
162
+ if (bearer != null) {
163
+ return `Bearer ${bearer}`;
164
+ }
165
+ return undefined;
166
+ });
167
+ }
168
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ export * from "./requests/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1,21 @@
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
+ * sort_by: "updated_at",
9
+ * sort_order: "asc",
10
+ * page: 1,
11
+ * page_size: 1
12
+ * }
13
+ */
14
+ export interface ConversationsListV1Request {
15
+ /** Field to sort by */
16
+ sort_by?: Chrt.ChrtGptConversationSortByEnum | null;
17
+ /** Sort order (asc or desc) */
18
+ sort_order?: Chrt.SortOrderEnum | null;
19
+ page?: number | null;
20
+ page_size?: number | null;
21
+ }
@@ -0,0 +1 @@
1
+ export { type ConversationsListV1Request } from "./ConversationsListV1Request.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1,2 @@
1
+ export * as conversations from "./conversations/index.mjs";
2
+ export * from "./conversations/client/requests/index.mjs";
@@ -0,0 +1,2 @@
1
+ export * as conversations from "./conversations/index.mjs";
2
+ export * from "./conversations/client/requests/index.mjs";