cloneforce 0.0.2 → 0.1.1

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 (200) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +1 -1
  3. package/client.d.ts +1 -1
  4. package/client.js +3 -3
  5. package/client.mjs +3 -3
  6. package/core/streaming.d.mts +33 -0
  7. package/core/streaming.d.mts.map +1 -0
  8. package/core/streaming.d.ts +33 -0
  9. package/core/streaming.d.ts.map +1 -0
  10. package/core/streaming.js +263 -0
  11. package/core/streaming.js.map +1 -0
  12. package/core/streaming.mjs +258 -0
  13. package/core/streaming.mjs.map +1 -0
  14. package/internal/decoders/line.d.mts +17 -0
  15. package/internal/decoders/line.d.mts.map +1 -0
  16. package/internal/decoders/line.d.ts +17 -0
  17. package/internal/decoders/line.d.ts.map +1 -0
  18. package/internal/decoders/line.js +113 -0
  19. package/internal/decoders/line.js.map +1 -0
  20. package/internal/decoders/line.mjs +108 -0
  21. package/internal/decoders/line.mjs.map +1 -0
  22. package/internal/parse.d.mts.map +1 -1
  23. package/internal/parse.d.ts.map +1 -1
  24. package/internal/parse.js +10 -0
  25. package/internal/parse.js.map +1 -1
  26. package/internal/parse.mjs +10 -0
  27. package/internal/parse.mjs.map +1 -1
  28. package/internal/request-options.d.mts +2 -0
  29. package/internal/request-options.d.mts.map +1 -1
  30. package/internal/request-options.d.ts +2 -0
  31. package/internal/request-options.d.ts.map +1 -1
  32. package/internal/request-options.js.map +1 -1
  33. package/internal/request-options.mjs.map +1 -1
  34. package/internal/tslib.js +17 -17
  35. package/package.json +12 -2
  36. package/resources/v1/clones/activity.js +3 -3
  37. package/resources/v1/clones/activity.js.map +1 -1
  38. package/resources/v1/clones/activity.mjs +3 -3
  39. package/resources/v1/clones/activity.mjs.map +1 -1
  40. package/resources/v1/clones/chats/chats.d.mts +39 -0
  41. package/resources/v1/clones/chats/chats.d.mts.map +1 -0
  42. package/resources/v1/clones/chats/chats.d.ts +39 -0
  43. package/resources/v1/clones/chats/chats.d.ts.map +1 -0
  44. package/resources/v1/clones/chats/chats.js +27 -0
  45. package/resources/v1/clones/chats/chats.js.map +1 -0
  46. package/resources/v1/clones/chats/chats.mjs +22 -0
  47. package/resources/v1/clones/chats/chats.mjs.map +1 -0
  48. package/resources/v1/clones/chats/completions.d.mts +77 -0
  49. package/resources/v1/clones/chats/completions.d.mts.map +1 -0
  50. package/resources/v1/clones/chats/completions.d.ts +77 -0
  51. package/resources/v1/clones/chats/completions.d.ts.map +1 -0
  52. package/resources/v1/clones/chats/completions.js +21 -0
  53. package/resources/v1/clones/chats/completions.js.map +1 -0
  54. package/resources/v1/clones/chats/completions.mjs +17 -0
  55. package/resources/v1/clones/chats/completions.mjs.map +1 -0
  56. package/resources/v1/clones/chats/index.d.mts +3 -0
  57. package/resources/v1/clones/chats/index.d.mts.map +1 -0
  58. package/resources/v1/clones/chats/index.d.ts +3 -0
  59. package/resources/v1/clones/chats/index.d.ts.map +1 -0
  60. package/resources/v1/clones/chats/index.js +9 -0
  61. package/resources/v1/clones/chats/index.js.map +1 -0
  62. package/resources/v1/clones/chats/index.mjs +4 -0
  63. package/resources/v1/clones/chats/index.mjs.map +1 -0
  64. package/resources/v1/clones/chats.d.mts +2 -0
  65. package/resources/v1/clones/chats.d.mts.map +1 -0
  66. package/resources/v1/clones/chats.d.ts +2 -0
  67. package/resources/v1/clones/chats.d.ts.map +1 -0
  68. package/resources/v1/clones/chats.js +6 -0
  69. package/resources/v1/clones/chats.js.map +1 -0
  70. package/resources/v1/clones/chats.mjs +3 -0
  71. package/resources/v1/clones/chats.mjs.map +1 -0
  72. package/resources/v1/clones/clones.d.mts +8 -4
  73. package/resources/v1/clones/clones.d.mts.map +1 -1
  74. package/resources/v1/clones/clones.d.ts +8 -4
  75. package/resources/v1/clones/clones.d.ts.map +1 -1
  76. package/resources/v1/clones/clones.js +5 -1
  77. package/resources/v1/clones/clones.js.map +1 -1
  78. package/resources/v1/clones/clones.mjs +5 -1
  79. package/resources/v1/clones/clones.mjs.map +1 -1
  80. package/resources/v1/clones/files.js +4 -4
  81. package/resources/v1/clones/files.js.map +1 -1
  82. package/resources/v1/clones/files.mjs +4 -4
  83. package/resources/v1/clones/files.mjs.map +1 -1
  84. package/resources/v1/clones/gallery.js +4 -4
  85. package/resources/v1/clones/gallery.js.map +1 -1
  86. package/resources/v1/clones/gallery.mjs +4 -4
  87. package/resources/v1/clones/gallery.mjs.map +1 -1
  88. package/resources/v1/clones/headshot.js +1 -1
  89. package/resources/v1/clones/headshot.js.map +1 -1
  90. package/resources/v1/clones/headshot.mjs +1 -1
  91. package/resources/v1/clones/headshot.mjs.map +1 -1
  92. package/resources/v1/clones/index.d.mts +3 -2
  93. package/resources/v1/clones/index.d.mts.map +1 -1
  94. package/resources/v1/clones/index.d.ts +3 -2
  95. package/resources/v1/clones/index.d.ts.map +1 -1
  96. package/resources/v1/clones/index.js +7 -5
  97. package/resources/v1/clones/index.js.map +1 -1
  98. package/resources/v1/clones/index.mjs +1 -0
  99. package/resources/v1/clones/index.mjs.map +1 -1
  100. package/resources/v1/clones/integrations/index.d.mts +1 -1
  101. package/resources/v1/clones/integrations/index.d.mts.map +1 -1
  102. package/resources/v1/clones/integrations/index.d.ts +1 -1
  103. package/resources/v1/clones/integrations/index.d.ts.map +1 -1
  104. package/resources/v1/clones/integrations/integrations.d.mts +7 -7
  105. package/resources/v1/clones/integrations/integrations.d.mts.map +1 -1
  106. package/resources/v1/clones/integrations/integrations.d.ts +7 -7
  107. package/resources/v1/clones/integrations/integrations.d.ts.map +1 -1
  108. package/resources/v1/clones/integrations/integrations.js +7 -7
  109. package/resources/v1/clones/integrations/integrations.js.map +1 -1
  110. package/resources/v1/clones/integrations/integrations.mjs +7 -7
  111. package/resources/v1/clones/integrations/integrations.mjs.map +1 -1
  112. package/resources/v1/clones/integrations/msteams.js +1 -1
  113. package/resources/v1/clones/integrations/msteams.js.map +1 -1
  114. package/resources/v1/clones/integrations/msteams.mjs +1 -1
  115. package/resources/v1/clones/integrations/msteams.mjs.map +1 -1
  116. package/resources/v1/clones/integrations/slack.js +2 -2
  117. package/resources/v1/clones/integrations/slack.js.map +1 -1
  118. package/resources/v1/clones/integrations/slack.mjs +2 -2
  119. package/resources/v1/clones/integrations/slack.mjs.map +1 -1
  120. package/resources/v1/clones/profile.d.mts +4 -4
  121. package/resources/v1/clones/profile.d.mts.map +1 -1
  122. package/resources/v1/clones/profile.d.ts +4 -4
  123. package/resources/v1/clones/profile.d.ts.map +1 -1
  124. package/resources/v1/clones/profile.js +4 -4
  125. package/resources/v1/clones/profile.js.map +1 -1
  126. package/resources/v1/clones/profile.mjs +4 -4
  127. package/resources/v1/clones/profile.mjs.map +1 -1
  128. package/resources/v1/clones/skills/connections.js +2 -5
  129. package/resources/v1/clones/skills/connections.js.map +1 -1
  130. package/resources/v1/clones/skills/connections.mjs +2 -5
  131. package/resources/v1/clones/skills/connections.mjs.map +1 -1
  132. package/resources/v1/clones/skills/skills.js +4 -4
  133. package/resources/v1/clones/skills/skills.js.map +1 -1
  134. package/resources/v1/clones/skills/skills.mjs +4 -4
  135. package/resources/v1/clones/skills/skills.mjs.map +1 -1
  136. package/resources/v1/clones/tasks.js +5 -5
  137. package/resources/v1/clones/tasks.js.map +1 -1
  138. package/resources/v1/clones/tasks.mjs +5 -5
  139. package/resources/v1/clones/tasks.mjs.map +1 -1
  140. package/resources/v1/clones/voice.js +1 -1
  141. package/resources/v1/clones/voice.js.map +1 -1
  142. package/resources/v1/clones/voice.mjs +1 -1
  143. package/resources/v1/clones/voice.mjs.map +1 -1
  144. package/resources/v1/connections.d.mts +1 -1
  145. package/resources/v1/connections.d.mts.map +1 -1
  146. package/resources/v1/connections.d.ts +1 -1
  147. package/resources/v1/connections.d.ts.map +1 -1
  148. package/resources/v1/connections.js +9 -9
  149. package/resources/v1/connections.js.map +1 -1
  150. package/resources/v1/connections.mjs +9 -9
  151. package/resources/v1/connections.mjs.map +1 -1
  152. package/resources/v1/integrations/phone.js +1 -1
  153. package/resources/v1/integrations/phone.js.map +1 -1
  154. package/resources/v1/integrations/phone.mjs +1 -1
  155. package/resources/v1/integrations/phone.mjs.map +1 -1
  156. package/resources/v1/skills.js +2 -2
  157. package/resources/v1/skills.js.map +1 -1
  158. package/resources/v1/skills.mjs +2 -2
  159. package/resources/v1/skills.mjs.map +1 -1
  160. package/src/client.ts +3 -3
  161. package/src/core/streaming.ts +315 -0
  162. package/src/internal/decoders/line.ts +135 -0
  163. package/src/internal/parse.ts +14 -0
  164. package/src/internal/request-options.ts +2 -0
  165. package/src/resources/v1/clones/activity.ts +3 -3
  166. package/src/resources/v1/clones/chats/chats.ts +77 -0
  167. package/src/resources/v1/clones/chats/completions.ts +125 -0
  168. package/src/resources/v1/clones/chats/index.ts +11 -0
  169. package/src/resources/v1/clones/chats.ts +3 -0
  170. package/src/resources/v1/clones/clones.ts +22 -11
  171. package/src/resources/v1/clones/files.ts +4 -4
  172. package/src/resources/v1/clones/gallery.ts +4 -4
  173. package/src/resources/v1/clones/headshot.ts +1 -1
  174. package/src/resources/v1/clones/index.ts +11 -5
  175. package/src/resources/v1/clones/integrations/index.ts +4 -4
  176. package/src/resources/v1/clones/integrations/integrations.ts +20 -20
  177. package/src/resources/v1/clones/integrations/msteams.ts +1 -1
  178. package/src/resources/v1/clones/integrations/slack.ts +2 -2
  179. package/src/resources/v1/clones/profile.ts +6 -6
  180. package/src/resources/v1/clones/skills/connections.ts +5 -5
  181. package/src/resources/v1/clones/skills/skills.ts +4 -4
  182. package/src/resources/v1/clones/tasks.ts +5 -5
  183. package/src/resources/v1/clones/voice.ts +1 -1
  184. package/src/resources/v1/connections.ts +10 -10
  185. package/src/resources/v1/integrations/phone.ts +1 -1
  186. package/src/resources/v1/skills.ts +2 -2
  187. package/src/streaming.ts +2 -0
  188. package/src/version.ts +1 -1
  189. package/streaming.d.mts +2 -0
  190. package/streaming.d.mts.map +1 -0
  191. package/streaming.d.ts +2 -0
  192. package/streaming.d.ts.map +1 -0
  193. package/streaming.js +6 -0
  194. package/streaming.js.map +1 -0
  195. package/streaming.mjs +2 -0
  196. package/streaming.mjs.map +1 -0
  197. package/version.d.mts +1 -1
  198. package/version.d.ts +1 -1
  199. package/version.js +1 -1
  200. package/version.mjs +1 -1
@@ -0,0 +1,125 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../../core/resource';
4
+ import * as CompletionsAPI from './completions';
5
+ import * as ChatsAPI from './chats';
6
+ import { APIPromise } from '../../../../core/api-promise';
7
+ import { Stream } from '../../../../core/streaming';
8
+ import { RequestOptions } from '../../../../internal/request-options';
9
+ import { path } from '../../../../internal/utils/path';
10
+
11
+ /**
12
+ * Chat sessions and completions
13
+ */
14
+ export class Completions extends APIResource {
15
+ /**
16
+ * Sends a user message to the clone and returns the assistant's response.
17
+ *
18
+ * Set `stream: true` to receive the response as Server-Sent Events (SSE). SSE
19
+ * events: `message.delta` (incremental text), `message.completed` (final message),
20
+ * `done` (stream end).
21
+ */
22
+ create(
23
+ chatID: string,
24
+ params: CompletionCreateParamsNonStreaming,
25
+ options?: RequestOptions,
26
+ ): APIPromise<ChatsAPI.ChatCompletionResponse>;
27
+ create(
28
+ chatID: string,
29
+ params: CompletionCreateParamsStreaming,
30
+ options?: RequestOptions,
31
+ ): APIPromise<Stream<ChatCompletionChunk>>;
32
+ create(
33
+ chatID: string,
34
+ params: CompletionCreateParamsBase,
35
+ options?: RequestOptions,
36
+ ): APIPromise<Stream<ChatCompletionChunk> | ChatsAPI.ChatCompletionResponse>;
37
+ create(
38
+ chatID: string,
39
+ params: CompletionCreateParams,
40
+ options?: RequestOptions,
41
+ ): APIPromise<ChatsAPI.ChatCompletionResponse> | APIPromise<Stream<ChatCompletionChunk>> {
42
+ const { cloneId, ...body } = params;
43
+ return this._client.post(path`/public/v1/clones/${cloneId}/chats/${chatID}/completions`, {
44
+ body,
45
+ ...options,
46
+ stream: params.stream ?? false,
47
+ }) as APIPromise<ChatsAPI.ChatCompletionResponse> | APIPromise<Stream<ChatCompletionChunk>>;
48
+ }
49
+ }
50
+
51
+ /**
52
+ * SSE message.delta event payload
53
+ */
54
+ export interface ChatCompletionChunk {
55
+ id: string;
56
+
57
+ delta?: ChatCompletionChunk.Delta;
58
+ }
59
+
60
+ export namespace ChatCompletionChunk {
61
+ export interface Delta {
62
+ content?: string;
63
+ }
64
+ }
65
+
66
+ /**
67
+ * SSE message.completed event payload
68
+ */
69
+ export interface ChatCompletionCompleted {
70
+ id: string;
71
+
72
+ content: string;
73
+
74
+ createdAt: string;
75
+
76
+ role: string;
77
+ }
78
+
79
+ export type CompletionCreateParams = CompletionCreateParamsNonStreaming | CompletionCreateParamsStreaming;
80
+
81
+ export interface CompletionCreateParamsBase {
82
+ /**
83
+ * Path param
84
+ */
85
+ cloneId: string;
86
+
87
+ /**
88
+ * Body param: The user message to send to the clone
89
+ */
90
+ message: string;
91
+
92
+ /**
93
+ * Body param: If true, response is streamed as SSE events
94
+ */
95
+ stream?: boolean;
96
+ }
97
+
98
+ export namespace CompletionCreateParams {
99
+ export type CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming;
100
+ export type CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming;
101
+ }
102
+
103
+ export interface CompletionCreateParamsNonStreaming extends CompletionCreateParamsBase {
104
+ /**
105
+ * Body param: If true, response is streamed as SSE events
106
+ */
107
+ stream?: false;
108
+ }
109
+
110
+ export interface CompletionCreateParamsStreaming extends CompletionCreateParamsBase {
111
+ /**
112
+ * Body param: If true, response is streamed as SSE events
113
+ */
114
+ stream: true;
115
+ }
116
+
117
+ export declare namespace Completions {
118
+ export {
119
+ type ChatCompletionChunk as ChatCompletionChunk,
120
+ type ChatCompletionCompleted as ChatCompletionCompleted,
121
+ type CompletionCreateParams as CompletionCreateParams,
122
+ type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming,
123
+ type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming,
124
+ };
125
+ }
@@ -0,0 +1,11 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Chats, type ChatCompletionResponse, type CreateChatResponse, type ChatCreateParams } from './chats';
4
+ export {
5
+ Completions,
6
+ type ChatCompletionChunk,
7
+ type ChatCompletionCompleted,
8
+ type CompletionCreateParams,
9
+ type CompletionCreateParamsNonStreaming,
10
+ type CompletionCreateParamsStreaming,
11
+ } from './completions';
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './chats/index';
@@ -34,7 +34,7 @@ import {
34
34
  import * as HeadshotAPI from './headshot';
35
35
  import { Headshot, HeadshotGenerateParams } from './headshot';
36
36
  import * as ProfileAPI from './profile';
37
- import { CloneHeadshot, CloneProfile, Profile, ProfilePatchAllParams } from './profile';
37
+ import { CloneHeadshot, CloneProfile, Profile, ProfileUpdateParams } from './profile';
38
38
  import * as TasksAPI from './tasks';
39
39
  import {
40
40
  TaskCreateParams,
@@ -50,17 +50,19 @@ import {
50
50
  } from './tasks';
51
51
  import * as VoiceAPI from './voice';
52
52
  import { GenerateRequest, GenerationStatus, Voice, VoiceGenerateParams } from './voice';
53
+ import * as ChatsAPI from './chats/chats';
54
+ import { ChatCompletionResponse, ChatCreateParams, Chats, CreateChatResponse } from './chats/chats';
53
55
  import * as IntegrationsAPI from './integrations/integrations';
54
56
  import {
57
+ IntegrationCreatePhoneParams,
58
+ IntegrationCreatePhoneResponse,
55
59
  IntegrationDeleteParams,
56
60
  IntegrationDeleteResponse,
61
+ IntegrationGetSetupURLParams,
62
+ IntegrationGetSetupURLResponse,
57
63
  IntegrationListParams,
58
64
  IntegrationListResponse,
59
- IntegrationPhoneParams,
60
- IntegrationPhoneResponse,
61
65
  IntegrationRetrieveParams,
62
- IntegrationRetrieveSetupParams,
63
- IntegrationRetrieveSetupResponse,
64
66
  IntegrationSummary,
65
67
  Integrations,
66
68
  } from './integrations/integrations';
@@ -91,12 +93,13 @@ export class Clones extends APIResource {
91
93
  gallery: GalleryAPI.Gallery = new GalleryAPI.Gallery(this._client);
92
94
  integrations: IntegrationsAPI.Integrations = new IntegrationsAPI.Integrations(this._client);
93
95
  activity: ActivityAPI.Activity = new ActivityAPI.Activity(this._client);
96
+ chats: ChatsAPI.Chats = new ChatsAPI.Chats(this._client);
94
97
 
95
98
  /**
96
99
  * Returns all clones in the organization, ordered by creation date descending.
97
100
  */
98
101
  list(options?: RequestOptions): APIPromise<CloneListResponse> {
99
- return this._client.get('/api/v1/clones', options);
102
+ return this._client.get('/public/v1/clones', options);
100
103
  }
101
104
  }
102
105
 
@@ -133,6 +136,7 @@ Clones.Files = Files;
133
136
  Clones.Gallery = Gallery;
134
137
  Clones.Integrations = Integrations;
135
138
  Clones.Activity = Activity;
139
+ Clones.Chats = Chats;
136
140
 
137
141
  export declare namespace Clones {
138
142
  export { type CloneListResponse as CloneListResponse };
@@ -141,7 +145,7 @@ export declare namespace Clones {
141
145
  Profile as Profile,
142
146
  type CloneHeadshot as CloneHeadshot,
143
147
  type CloneProfile as CloneProfile,
144
- type ProfilePatchAllParams as ProfilePatchAllParams,
148
+ type ProfileUpdateParams as ProfileUpdateParams,
145
149
  };
146
150
 
147
151
  export {
@@ -203,13 +207,13 @@ export declare namespace Clones {
203
207
  type IntegrationSummary as IntegrationSummary,
204
208
  type IntegrationListResponse as IntegrationListResponse,
205
209
  type IntegrationDeleteResponse as IntegrationDeleteResponse,
206
- type IntegrationPhoneResponse as IntegrationPhoneResponse,
207
- type IntegrationRetrieveSetupResponse as IntegrationRetrieveSetupResponse,
210
+ type IntegrationCreatePhoneResponse as IntegrationCreatePhoneResponse,
211
+ type IntegrationGetSetupURLResponse as IntegrationGetSetupURLResponse,
208
212
  type IntegrationRetrieveParams as IntegrationRetrieveParams,
209
213
  type IntegrationListParams as IntegrationListParams,
210
214
  type IntegrationDeleteParams as IntegrationDeleteParams,
211
- type IntegrationPhoneParams as IntegrationPhoneParams,
212
- type IntegrationRetrieveSetupParams as IntegrationRetrieveSetupParams,
215
+ type IntegrationCreatePhoneParams as IntegrationCreatePhoneParams,
216
+ type IntegrationGetSetupURLParams as IntegrationGetSetupURLParams,
213
217
  };
214
218
 
215
219
  export {
@@ -220,4 +224,11 @@ export declare namespace Clones {
220
224
  type ActivityRetrieveParams as ActivityRetrieveParams,
221
225
  type ActivityDeleteParams as ActivityDeleteParams,
222
226
  };
227
+
228
+ export {
229
+ Chats as Chats,
230
+ type ChatCompletionResponse as ChatCompletionResponse,
231
+ type CreateChatResponse as CreateChatResponse,
232
+ type ChatCreateParams as ChatCreateParams,
233
+ };
223
234
  }
@@ -13,7 +13,7 @@ export class Files extends APIResource {
13
13
  * **Not yet implemented.** Returns 501. Pending Pinecone migration.
14
14
  */
15
15
  create(cloneID: string, body: FileCreateParams, options?: RequestOptions): APIPromise<KBFileSummary> {
16
- return this._client.post(path`/api/v1/clones/${cloneID}/files`, { body, ...options });
16
+ return this._client.post(path`/public/v1/clones/${cloneID}/files`, { body, ...options });
17
17
  }
18
18
 
19
19
  /**
@@ -21,14 +21,14 @@ export class Files extends APIResource {
21
21
  */
22
22
  retrieve(fileID: string, params: FileRetrieveParams, options?: RequestOptions): APIPromise<KBFileSummary> {
23
23
  const { cloneId } = params;
24
- return this._client.get(path`/api/v1/clones/${cloneId}/files/${fileID}`, options);
24
+ return this._client.get(path`/public/v1/clones/${cloneId}/files/${fileID}`, options);
25
25
  }
26
26
 
27
27
  /**
28
28
  * List knowledge base files
29
29
  */
30
30
  list(cloneID: string, options?: RequestOptions): APIPromise<FileListResponse> {
31
- return this._client.get(path`/api/v1/clones/${cloneID}/files`, options);
31
+ return this._client.get(path`/public/v1/clones/${cloneID}/files`, options);
32
32
  }
33
33
 
34
34
  /**
@@ -36,7 +36,7 @@ export class Files extends APIResource {
36
36
  */
37
37
  delete(fileID: string, params: FileDeleteParams, options?: RequestOptions): APIPromise<FileDeleteResponse> {
38
38
  const { cloneId } = params;
39
- return this._client.delete(path`/api/v1/clones/${cloneId}/files/${fileID}`, options);
39
+ return this._client.delete(path`/public/v1/clones/${cloneId}/files/${fileID}`, options);
40
40
  }
41
41
  }
42
42
 
@@ -17,7 +17,7 @@ export class Gallery extends APIResource {
17
17
  body: GalleryCreateParams,
18
18
  options?: RequestOptions,
19
19
  ): APIPromise<GalleryItemSummary> {
20
- return this._client.post(path`/api/v1/clones/${cloneID}/gallery`, { body, ...options });
20
+ return this._client.post(path`/public/v1/clones/${cloneID}/gallery`, { body, ...options });
21
21
  }
22
22
 
23
23
  /**
@@ -29,7 +29,7 @@ export class Gallery extends APIResource {
29
29
  options?: RequestOptions,
30
30
  ): APIPromise<GalleryItemSummary> {
31
31
  const { cloneId } = params;
32
- return this._client.get(path`/api/v1/clones/${cloneId}/gallery/${itemID}`, options);
32
+ return this._client.get(path`/public/v1/clones/${cloneId}/gallery/${itemID}`, options);
33
33
  }
34
34
 
35
35
  /**
@@ -40,7 +40,7 @@ export class Gallery extends APIResource {
40
40
  query: GalleryListParams | null | undefined = {},
41
41
  options?: RequestOptions,
42
42
  ): APIPromise<GalleryListResponse> {
43
- return this._client.get(path`/api/v1/clones/${cloneID}/gallery`, { query, ...options });
43
+ return this._client.get(path`/public/v1/clones/${cloneID}/gallery`, { query, ...options });
44
44
  }
45
45
 
46
46
  /**
@@ -52,7 +52,7 @@ export class Gallery extends APIResource {
52
52
  options?: RequestOptions,
53
53
  ): APIPromise<GalleryDeleteResponse> {
54
54
  const { cloneId } = params;
55
- return this._client.delete(path`/api/v1/clones/${cloneId}/gallery/${itemID}`, options);
55
+ return this._client.delete(path`/public/v1/clones/${cloneId}/gallery/${itemID}`, options);
56
56
  }
57
57
  }
58
58
 
@@ -24,7 +24,7 @@ export class Headshot extends APIResource {
24
24
  body: HeadshotGenerateParams | null | undefined = {},
25
25
  options?: RequestOptions,
26
26
  ): APIPromise<VoiceAPI.GenerationStatus> {
27
- return this._client.post(path`/api/v1/clones/${cloneID}/headshot/generate`, { body, ...options });
27
+ return this._client.post(path`/public/v1/clones/${cloneID}/headshot/generate`, { body, ...options });
28
28
  }
29
29
  }
30
30
 
@@ -8,6 +8,12 @@ export {
8
8
  type ActivityRetrieveParams,
9
9
  type ActivityDeleteParams,
10
10
  } from './activity';
11
+ export {
12
+ Chats,
13
+ type ChatCompletionResponse,
14
+ type CreateChatResponse,
15
+ type ChatCreateParams,
16
+ } from './chats/index';
11
17
  export { Clones, type CloneListResponse } from './clones';
12
18
  export {
13
19
  Files,
@@ -34,15 +40,15 @@ export {
34
40
  type IntegrationSummary,
35
41
  type IntegrationListResponse,
36
42
  type IntegrationDeleteResponse,
37
- type IntegrationPhoneResponse,
38
- type IntegrationRetrieveSetupResponse,
43
+ type IntegrationCreatePhoneResponse,
44
+ type IntegrationGetSetupURLResponse,
39
45
  type IntegrationRetrieveParams,
40
46
  type IntegrationListParams,
41
47
  type IntegrationDeleteParams,
42
- type IntegrationPhoneParams,
43
- type IntegrationRetrieveSetupParams,
48
+ type IntegrationCreatePhoneParams,
49
+ type IntegrationGetSetupURLParams,
44
50
  } from './integrations/index';
45
- export { Profile, type CloneHeadshot, type CloneProfile, type ProfilePatchAllParams } from './profile';
51
+ export { Profile, type CloneHeadshot, type CloneProfile, type ProfileUpdateParams } from './profile';
46
52
  export {
47
53
  Skills,
48
54
  type SkillSummary,
@@ -5,13 +5,13 @@ export {
5
5
  type IntegrationSummary,
6
6
  type IntegrationListResponse,
7
7
  type IntegrationDeleteResponse,
8
- type IntegrationPhoneResponse,
9
- type IntegrationRetrieveSetupResponse,
8
+ type IntegrationCreatePhoneResponse,
9
+ type IntegrationGetSetupURLResponse,
10
10
  type IntegrationRetrieveParams,
11
11
  type IntegrationListParams,
12
12
  type IntegrationDeleteParams,
13
- type IntegrationPhoneParams,
14
- type IntegrationRetrieveSetupParams,
13
+ type IntegrationCreatePhoneParams,
14
+ type IntegrationGetSetupURLParams,
15
15
  } from './integrations';
16
16
  export { Msteams, type MsTeamsTeamRef, type MsteamTeamsResponse, type MsteamTeamsParams } from './msteams';
17
17
  export { Slack, type SlackIntegration, type SlackUpdateParams } from './slack';
@@ -25,7 +25,7 @@ export class Integrations extends APIResource {
25
25
  options?: RequestOptions,
26
26
  ): APIPromise<IntegrationSummary> {
27
27
  const { cloneId } = params;
28
- return this._client.get(path`/api/v1/clones/${cloneId}/integrations/${integrationID}`, options);
28
+ return this._client.get(path`/public/v1/clones/${cloneId}/integrations/${integrationID}`, options);
29
29
  }
30
30
 
31
31
  /**
@@ -36,7 +36,7 @@ export class Integrations extends APIResource {
36
36
  query: IntegrationListParams | null | undefined = {},
37
37
  options?: RequestOptions,
38
38
  ): APIPromise<IntegrationListResponse> {
39
- return this._client.get(path`/api/v1/clones/${cloneID}/integrations`, { query, ...options });
39
+ return this._client.get(path`/public/v1/clones/${cloneID}/integrations`, { query, ...options });
40
40
  }
41
41
 
42
42
  /**
@@ -49,7 +49,7 @@ export class Integrations extends APIResource {
49
49
  options?: RequestOptions,
50
50
  ): APIPromise<IntegrationDeleteResponse> {
51
51
  const { cloneId } = params;
52
- return this._client.delete(path`/api/v1/clones/${cloneId}/integrations/${integrationID}`, options);
52
+ return this._client.delete(path`/public/v1/clones/${cloneId}/integrations/${integrationID}`, options);
53
53
  }
54
54
 
55
55
  /**
@@ -57,12 +57,12 @@ export class Integrations extends APIResource {
57
57
  * sufficient account credits. Creates a Twilio number, ElevenLabs voice agent, and
58
58
  * billing subscription.
59
59
  */
60
- phone(
60
+ createPhone(
61
61
  cloneID: string,
62
- body: IntegrationPhoneParams,
62
+ body: IntegrationCreatePhoneParams,
63
63
  options?: RequestOptions,
64
- ): APIPromise<IntegrationPhoneResponse> {
65
- return this._client.post(path`/api/v1/clones/${cloneID}/integrations/phone`, { body, ...options });
64
+ ): APIPromise<IntegrationCreatePhoneResponse> {
65
+ return this._client.post(path`/public/v1/clones/${cloneID}/integrations/phone`, { body, ...options });
66
66
  }
67
67
 
68
68
  /**
@@ -70,13 +70,13 @@ export class Integrations extends APIResource {
70
70
  * `msteams`. Present this URL to the user and poll the integrations list to detect
71
71
  * completion.
72
72
  */
73
- retrieveSetup(
74
- type: 'email' | 'msteams',
75
- params: IntegrationRetrieveSetupParams,
73
+ getSetupURL(
74
+ integrationID: string,
75
+ params: IntegrationGetSetupURLParams,
76
76
  options?: RequestOptions,
77
- ): APIPromise<IntegrationRetrieveSetupResponse> {
77
+ ): APIPromise<IntegrationGetSetupURLResponse> {
78
78
  const { cloneId } = params;
79
- return this._client.get(path`/api/v1/clones/${cloneId}/integrations/${type}/setup`, options);
79
+ return this._client.get(path`/public/v1/clones/${cloneId}/integrations/${integrationID}/setup`, options);
80
80
  }
81
81
  }
82
82
 
@@ -137,7 +137,7 @@ export interface IntegrationDeleteResponse {
137
137
  deleted: true;
138
138
  }
139
139
 
140
- export interface IntegrationPhoneResponse {
140
+ export interface IntegrationCreatePhoneResponse {
141
141
  id: string;
142
142
 
143
143
  phoneNumber: string;
@@ -145,7 +145,7 @@ export interface IntegrationPhoneResponse {
145
145
  status: string;
146
146
  }
147
147
 
148
- export interface IntegrationRetrieveSetupResponse {
148
+ export interface IntegrationGetSetupURLResponse {
149
149
  setupUrl: string;
150
150
 
151
151
  type: string;
@@ -166,14 +166,14 @@ export interface IntegrationDeleteParams {
166
166
  cloneId: string;
167
167
  }
168
168
 
169
- export interface IntegrationPhoneParams {
169
+ export interface IntegrationCreatePhoneParams {
170
170
  /**
171
171
  * Phone number to purchase (from the available numbers search)
172
172
  */
173
173
  phone: string;
174
174
  }
175
175
 
176
- export interface IntegrationRetrieveSetupParams {
176
+ export interface IntegrationGetSetupURLParams {
177
177
  cloneId: string;
178
178
  }
179
179
 
@@ -185,13 +185,13 @@ export declare namespace Integrations {
185
185
  type IntegrationSummary as IntegrationSummary,
186
186
  type IntegrationListResponse as IntegrationListResponse,
187
187
  type IntegrationDeleteResponse as IntegrationDeleteResponse,
188
- type IntegrationPhoneResponse as IntegrationPhoneResponse,
189
- type IntegrationRetrieveSetupResponse as IntegrationRetrieveSetupResponse,
188
+ type IntegrationCreatePhoneResponse as IntegrationCreatePhoneResponse,
189
+ type IntegrationGetSetupURLResponse as IntegrationGetSetupURLResponse,
190
190
  type IntegrationRetrieveParams as IntegrationRetrieveParams,
191
191
  type IntegrationListParams as IntegrationListParams,
192
192
  type IntegrationDeleteParams as IntegrationDeleteParams,
193
- type IntegrationPhoneParams as IntegrationPhoneParams,
194
- type IntegrationRetrieveSetupParams as IntegrationRetrieveSetupParams,
193
+ type IntegrationCreatePhoneParams as IntegrationCreatePhoneParams,
194
+ type IntegrationGetSetupURLParams as IntegrationGetSetupURLParams,
195
195
  };
196
196
 
197
197
  export {
@@ -19,7 +19,7 @@ export class Msteams extends APIResource {
19
19
  options?: RequestOptions,
20
20
  ): APIPromise<MsteamTeamsResponse> {
21
21
  const { cloneId, ...body } = params;
22
- return this._client.post(path`/api/v1/clones/${cloneId}/integrations/msteams/${integrationID}/teams`, {
22
+ return this._client.post(path`/public/v1/clones/${cloneId}/integrations/msteams/${integrationID}/teams`, {
23
23
  body,
24
24
  ...options,
25
25
  });
@@ -14,7 +14,7 @@ export class Slack extends APIResource {
14
14
  * installation.
15
15
  */
16
16
  create(cloneID: string, options?: RequestOptions): APIPromise<SlackIntegration> {
17
- return this._client.post(path`/api/v1/clones/${cloneID}/integrations/slack`, options);
17
+ return this._client.post(path`/public/v1/clones/${cloneID}/integrations/slack`, options);
18
18
  }
19
19
 
20
20
  /**
@@ -27,7 +27,7 @@ export class Slack extends APIResource {
27
27
  options?: RequestOptions,
28
28
  ): APIPromise<SlackIntegration> {
29
29
  const { cloneId, ...body } = params;
30
- return this._client.patch(path`/api/v1/clones/${cloneId}/integrations/slack/${integrationID}`, {
30
+ return this._client.patch(path`/public/v1/clones/${cloneId}/integrations/slack/${integrationID}`, {
31
31
  body,
32
32
  ...options,
33
33
  });
@@ -12,16 +12,16 @@ export class Profile extends APIResource {
12
12
  /**
13
13
  * Returns the full profile and aesthetics for a clone.
14
14
  */
15
- list(cloneID: string, options?: RequestOptions): APIPromise<CloneProfile> {
16
- return this._client.get(path`/api/v1/clones/${cloneID}/profile`, options);
15
+ retrieve(cloneID: string, options?: RequestOptions): APIPromise<CloneProfile> {
16
+ return this._client.get(path`/public/v1/clones/${cloneID}/profile`, options);
17
17
  }
18
18
 
19
19
  /**
20
20
  * Updates one or more fields on a clone's profile. Only provided fields are
21
21
  * changed.
22
22
  */
23
- patchAll(cloneID: string, body: ProfilePatchAllParams, options?: RequestOptions): APIPromise<CloneProfile> {
24
- return this._client.patch(path`/api/v1/clones/${cloneID}/profile`, { body, ...options });
23
+ update(cloneID: string, body: ProfileUpdateParams, options?: RequestOptions): APIPromise<CloneProfile> {
24
+ return this._client.patch(path`/public/v1/clones/${cloneID}/profile`, { body, ...options });
25
25
  }
26
26
  }
27
27
 
@@ -117,7 +117,7 @@ export namespace CloneProfile {
117
117
  }
118
118
  }
119
119
 
120
- export interface ProfilePatchAllParams {
120
+ export interface ProfileUpdateParams {
121
121
  appearanceDesc?: string;
122
122
 
123
123
  birthdate?: string;
@@ -175,6 +175,6 @@ export declare namespace Profile {
175
175
  export {
176
176
  type CloneHeadshot as CloneHeadshot,
177
177
  type CloneProfile as CloneProfile,
178
- type ProfilePatchAllParams as ProfilePatchAllParams,
178
+ type ProfileUpdateParams as ProfileUpdateParams,
179
179
  };
180
180
  }
@@ -18,10 +18,10 @@ export class Connections extends APIResource {
18
18
  options?: RequestOptions,
19
19
  ): APIPromise<SkillConnectionInfo> {
20
20
  const { cloneId, skillName, ...body } = params;
21
- return this._client.put(path`/api/v1/clones/${cloneId}/skills/${skillName}/connections/${settingName}`, {
22
- body,
23
- ...options,
24
- });
21
+ return this._client.put(
22
+ path`/public/v1/clones/${cloneId}/skills/${skillName}/connections/${settingName}`,
23
+ { body, ...options },
24
+ );
25
25
  }
26
26
 
27
27
  /**
@@ -34,7 +34,7 @@ export class Connections extends APIResource {
34
34
  options?: RequestOptions,
35
35
  ): APIPromise<ConnectionListResponse> {
36
36
  const { cloneId } = params;
37
- return this._client.get(path`/api/v1/clones/${cloneId}/skills/${skillName}/connections`, options);
37
+ return this._client.get(path`/public/v1/clones/${cloneId}/skills/${skillName}/connections`, options);
38
38
  }
39
39
  }
40
40
 
@@ -23,7 +23,7 @@ export class Skills extends APIResource {
23
23
  * Attaches a marketplace skill to a clone. Returns 409 if already attached.
24
24
  */
25
25
  create(cloneID: string, body: SkillCreateParams, options?: RequestOptions): APIPromise<SkillSummary> {
26
- return this._client.post(path`/api/v1/clones/${cloneID}/skills`, { body, ...options });
26
+ return this._client.post(path`/public/v1/clones/${cloneID}/skills`, { body, ...options });
27
27
  }
28
28
 
29
29
  /**
@@ -31,7 +31,7 @@ export class Skills extends APIResource {
31
31
  */
32
32
  update(skillName: string, params: SkillUpdateParams, options?: RequestOptions): APIPromise<SkillSummary> {
33
33
  const { cloneId, ...body } = params;
34
- return this._client.patch(path`/api/v1/clones/${cloneId}/skills/${skillName}`, { body, ...options });
34
+ return this._client.patch(path`/public/v1/clones/${cloneId}/skills/${skillName}`, { body, ...options });
35
35
  }
36
36
 
37
37
  /**
@@ -42,7 +42,7 @@ export class Skills extends APIResource {
42
42
  query: SkillListParams | null | undefined = {},
43
43
  options?: RequestOptions,
44
44
  ): APIPromise<SkillListResponse> {
45
- return this._client.get(path`/api/v1/clones/${cloneID}/skills`, { query, ...options });
45
+ return this._client.get(path`/public/v1/clones/${cloneID}/skills`, { query, ...options });
46
46
  }
47
47
 
48
48
  /**
@@ -54,7 +54,7 @@ export class Skills extends APIResource {
54
54
  options?: RequestOptions,
55
55
  ): APIPromise<SkillDeleteResponse> {
56
56
  const { cloneId } = params;
57
- return this._client.delete(path`/api/v1/clones/${cloneId}/skills/${skillName}`, options);
57
+ return this._client.delete(path`/public/v1/clones/${cloneId}/skills/${skillName}`, options);
58
58
  }
59
59
  }
60
60
 
@@ -13,7 +13,7 @@ export class Tasks extends APIResource {
13
13
  * Creates a new scheduled task for a clone.
14
14
  */
15
15
  create(cloneID: string, body: TaskCreateParams, options?: RequestOptions): APIPromise<TaskSummary> {
16
- return this._client.post(path`/api/v1/clones/${cloneID}/tasks`, { body, ...options });
16
+ return this._client.post(path`/public/v1/clones/${cloneID}/tasks`, { body, ...options });
17
17
  }
18
18
 
19
19
  /**
@@ -21,7 +21,7 @@ export class Tasks extends APIResource {
21
21
  */
22
22
  retrieve(taskID: string, params: TaskRetrieveParams, options?: RequestOptions): APIPromise<TaskSummary> {
23
23
  const { cloneId } = params;
24
- return this._client.get(path`/api/v1/clones/${cloneId}/tasks/${taskID}`, options);
24
+ return this._client.get(path`/public/v1/clones/${cloneId}/tasks/${taskID}`, options);
25
25
  }
26
26
 
27
27
  /**
@@ -29,7 +29,7 @@ export class Tasks extends APIResource {
29
29
  */
30
30
  update(taskID: string, params: TaskUpdateParams, options?: RequestOptions): APIPromise<TaskSummary> {
31
31
  const { cloneId, ...body } = params;
32
- return this._client.patch(path`/api/v1/clones/${cloneId}/tasks/${taskID}`, { body, ...options });
32
+ return this._client.patch(path`/public/v1/clones/${cloneId}/tasks/${taskID}`, { body, ...options });
33
33
  }
34
34
 
35
35
  /**
@@ -40,7 +40,7 @@ export class Tasks extends APIResource {
40
40
  query: TaskListParams | null | undefined = {},
41
41
  options?: RequestOptions,
42
42
  ): APIPromise<TaskListResponse> {
43
- return this._client.get(path`/api/v1/clones/${cloneID}/tasks`, { query, ...options });
43
+ return this._client.get(path`/public/v1/clones/${cloneID}/tasks`, { query, ...options });
44
44
  }
45
45
 
46
46
  /**
@@ -48,7 +48,7 @@ export class Tasks extends APIResource {
48
48
  */
49
49
  delete(taskID: string, params: TaskDeleteParams, options?: RequestOptions): APIPromise<TaskDeleteResponse> {
50
50
  const { cloneId } = params;
51
- return this._client.delete(path`/api/v1/clones/${cloneId}/tasks/${taskID}`, options);
51
+ return this._client.delete(path`/public/v1/clones/${cloneId}/tasks/${taskID}`, options);
52
52
  }
53
53
  }
54
54
 
@@ -23,7 +23,7 @@ export class Voice extends APIResource {
23
23
  body: VoiceGenerateParams | null | undefined = {},
24
24
  options?: RequestOptions,
25
25
  ): APIPromise<GenerationStatus> {
26
- return this._client.post(path`/api/v1/clones/${cloneID}/voice/generate`, { body, ...options });
26
+ return this._client.post(path`/public/v1/clones/${cloneID}/voice/generate`, { body, ...options });
27
27
  }
28
28
  }
29
29