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.
- package/CHANGELOG.md +24 -0
- package/client.d.mts +1 -1
- package/client.d.ts +1 -1
- package/client.js +3 -3
- package/client.mjs +3 -3
- package/core/streaming.d.mts +33 -0
- package/core/streaming.d.mts.map +1 -0
- package/core/streaming.d.ts +33 -0
- package/core/streaming.d.ts.map +1 -0
- package/core/streaming.js +263 -0
- package/core/streaming.js.map +1 -0
- package/core/streaming.mjs +258 -0
- package/core/streaming.mjs.map +1 -0
- package/internal/decoders/line.d.mts +17 -0
- package/internal/decoders/line.d.mts.map +1 -0
- package/internal/decoders/line.d.ts +17 -0
- package/internal/decoders/line.d.ts.map +1 -0
- package/internal/decoders/line.js +113 -0
- package/internal/decoders/line.js.map +1 -0
- package/internal/decoders/line.mjs +108 -0
- package/internal/decoders/line.mjs.map +1 -0
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +10 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +10 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts +2 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +2 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/package.json +12 -2
- package/resources/v1/clones/activity.js +3 -3
- package/resources/v1/clones/activity.js.map +1 -1
- package/resources/v1/clones/activity.mjs +3 -3
- package/resources/v1/clones/activity.mjs.map +1 -1
- package/resources/v1/clones/chats/chats.d.mts +39 -0
- package/resources/v1/clones/chats/chats.d.mts.map +1 -0
- package/resources/v1/clones/chats/chats.d.ts +39 -0
- package/resources/v1/clones/chats/chats.d.ts.map +1 -0
- package/resources/v1/clones/chats/chats.js +27 -0
- package/resources/v1/clones/chats/chats.js.map +1 -0
- package/resources/v1/clones/chats/chats.mjs +22 -0
- package/resources/v1/clones/chats/chats.mjs.map +1 -0
- package/resources/v1/clones/chats/completions.d.mts +77 -0
- package/resources/v1/clones/chats/completions.d.mts.map +1 -0
- package/resources/v1/clones/chats/completions.d.ts +77 -0
- package/resources/v1/clones/chats/completions.d.ts.map +1 -0
- package/resources/v1/clones/chats/completions.js +21 -0
- package/resources/v1/clones/chats/completions.js.map +1 -0
- package/resources/v1/clones/chats/completions.mjs +17 -0
- package/resources/v1/clones/chats/completions.mjs.map +1 -0
- package/resources/v1/clones/chats/index.d.mts +3 -0
- package/resources/v1/clones/chats/index.d.mts.map +1 -0
- package/resources/v1/clones/chats/index.d.ts +3 -0
- package/resources/v1/clones/chats/index.d.ts.map +1 -0
- package/resources/v1/clones/chats/index.js +9 -0
- package/resources/v1/clones/chats/index.js.map +1 -0
- package/resources/v1/clones/chats/index.mjs +4 -0
- package/resources/v1/clones/chats/index.mjs.map +1 -0
- package/resources/v1/clones/chats.d.mts +2 -0
- package/resources/v1/clones/chats.d.mts.map +1 -0
- package/resources/v1/clones/chats.d.ts +2 -0
- package/resources/v1/clones/chats.d.ts.map +1 -0
- package/resources/v1/clones/chats.js +6 -0
- package/resources/v1/clones/chats.js.map +1 -0
- package/resources/v1/clones/chats.mjs +3 -0
- package/resources/v1/clones/chats.mjs.map +1 -0
- package/resources/v1/clones/clones.d.mts +8 -4
- package/resources/v1/clones/clones.d.mts.map +1 -1
- package/resources/v1/clones/clones.d.ts +8 -4
- package/resources/v1/clones/clones.d.ts.map +1 -1
- package/resources/v1/clones/clones.js +5 -1
- package/resources/v1/clones/clones.js.map +1 -1
- package/resources/v1/clones/clones.mjs +5 -1
- package/resources/v1/clones/clones.mjs.map +1 -1
- package/resources/v1/clones/files.js +4 -4
- package/resources/v1/clones/files.js.map +1 -1
- package/resources/v1/clones/files.mjs +4 -4
- package/resources/v1/clones/files.mjs.map +1 -1
- package/resources/v1/clones/gallery.js +4 -4
- package/resources/v1/clones/gallery.js.map +1 -1
- package/resources/v1/clones/gallery.mjs +4 -4
- package/resources/v1/clones/gallery.mjs.map +1 -1
- package/resources/v1/clones/headshot.js +1 -1
- package/resources/v1/clones/headshot.js.map +1 -1
- package/resources/v1/clones/headshot.mjs +1 -1
- package/resources/v1/clones/headshot.mjs.map +1 -1
- package/resources/v1/clones/index.d.mts +3 -2
- package/resources/v1/clones/index.d.mts.map +1 -1
- package/resources/v1/clones/index.d.ts +3 -2
- package/resources/v1/clones/index.d.ts.map +1 -1
- package/resources/v1/clones/index.js +7 -5
- package/resources/v1/clones/index.js.map +1 -1
- package/resources/v1/clones/index.mjs +1 -0
- package/resources/v1/clones/index.mjs.map +1 -1
- package/resources/v1/clones/integrations/index.d.mts +1 -1
- package/resources/v1/clones/integrations/index.d.mts.map +1 -1
- package/resources/v1/clones/integrations/index.d.ts +1 -1
- package/resources/v1/clones/integrations/index.d.ts.map +1 -1
- package/resources/v1/clones/integrations/integrations.d.mts +7 -7
- package/resources/v1/clones/integrations/integrations.d.mts.map +1 -1
- package/resources/v1/clones/integrations/integrations.d.ts +7 -7
- package/resources/v1/clones/integrations/integrations.d.ts.map +1 -1
- package/resources/v1/clones/integrations/integrations.js +7 -7
- package/resources/v1/clones/integrations/integrations.js.map +1 -1
- package/resources/v1/clones/integrations/integrations.mjs +7 -7
- package/resources/v1/clones/integrations/integrations.mjs.map +1 -1
- package/resources/v1/clones/integrations/msteams.js +1 -1
- package/resources/v1/clones/integrations/msteams.js.map +1 -1
- package/resources/v1/clones/integrations/msteams.mjs +1 -1
- package/resources/v1/clones/integrations/msteams.mjs.map +1 -1
- package/resources/v1/clones/integrations/slack.js +2 -2
- package/resources/v1/clones/integrations/slack.js.map +1 -1
- package/resources/v1/clones/integrations/slack.mjs +2 -2
- package/resources/v1/clones/integrations/slack.mjs.map +1 -1
- package/resources/v1/clones/profile.d.mts +4 -4
- package/resources/v1/clones/profile.d.mts.map +1 -1
- package/resources/v1/clones/profile.d.ts +4 -4
- package/resources/v1/clones/profile.d.ts.map +1 -1
- package/resources/v1/clones/profile.js +4 -4
- package/resources/v1/clones/profile.js.map +1 -1
- package/resources/v1/clones/profile.mjs +4 -4
- package/resources/v1/clones/profile.mjs.map +1 -1
- package/resources/v1/clones/skills/connections.js +2 -5
- package/resources/v1/clones/skills/connections.js.map +1 -1
- package/resources/v1/clones/skills/connections.mjs +2 -5
- package/resources/v1/clones/skills/connections.mjs.map +1 -1
- package/resources/v1/clones/skills/skills.js +4 -4
- package/resources/v1/clones/skills/skills.js.map +1 -1
- package/resources/v1/clones/skills/skills.mjs +4 -4
- package/resources/v1/clones/skills/skills.mjs.map +1 -1
- package/resources/v1/clones/tasks.js +5 -5
- package/resources/v1/clones/tasks.js.map +1 -1
- package/resources/v1/clones/tasks.mjs +5 -5
- package/resources/v1/clones/tasks.mjs.map +1 -1
- package/resources/v1/clones/voice.js +1 -1
- package/resources/v1/clones/voice.js.map +1 -1
- package/resources/v1/clones/voice.mjs +1 -1
- package/resources/v1/clones/voice.mjs.map +1 -1
- package/resources/v1/connections.d.mts +1 -1
- package/resources/v1/connections.d.mts.map +1 -1
- package/resources/v1/connections.d.ts +1 -1
- package/resources/v1/connections.d.ts.map +1 -1
- package/resources/v1/connections.js +9 -9
- package/resources/v1/connections.js.map +1 -1
- package/resources/v1/connections.mjs +9 -9
- package/resources/v1/connections.mjs.map +1 -1
- package/resources/v1/integrations/phone.js +1 -1
- package/resources/v1/integrations/phone.js.map +1 -1
- package/resources/v1/integrations/phone.mjs +1 -1
- package/resources/v1/integrations/phone.mjs.map +1 -1
- package/resources/v1/skills.js +2 -2
- package/resources/v1/skills.js.map +1 -1
- package/resources/v1/skills.mjs +2 -2
- package/resources/v1/skills.mjs.map +1 -1
- package/src/client.ts +3 -3
- package/src/core/streaming.ts +315 -0
- package/src/internal/decoders/line.ts +135 -0
- package/src/internal/parse.ts +14 -0
- package/src/internal/request-options.ts +2 -0
- package/src/resources/v1/clones/activity.ts +3 -3
- package/src/resources/v1/clones/chats/chats.ts +77 -0
- package/src/resources/v1/clones/chats/completions.ts +125 -0
- package/src/resources/v1/clones/chats/index.ts +11 -0
- package/src/resources/v1/clones/chats.ts +3 -0
- package/src/resources/v1/clones/clones.ts +22 -11
- package/src/resources/v1/clones/files.ts +4 -4
- package/src/resources/v1/clones/gallery.ts +4 -4
- package/src/resources/v1/clones/headshot.ts +1 -1
- package/src/resources/v1/clones/index.ts +11 -5
- package/src/resources/v1/clones/integrations/index.ts +4 -4
- package/src/resources/v1/clones/integrations/integrations.ts +20 -20
- package/src/resources/v1/clones/integrations/msteams.ts +1 -1
- package/src/resources/v1/clones/integrations/slack.ts +2 -2
- package/src/resources/v1/clones/profile.ts +6 -6
- package/src/resources/v1/clones/skills/connections.ts +5 -5
- package/src/resources/v1/clones/skills/skills.ts +4 -4
- package/src/resources/v1/clones/tasks.ts +5 -5
- package/src/resources/v1/clones/voice.ts +1 -1
- package/src/resources/v1/connections.ts +10 -10
- package/src/resources/v1/integrations/phone.ts +1 -1
- package/src/resources/v1/skills.ts +2 -2
- package/src/streaming.ts +2 -0
- package/src/version.ts +1 -1
- package/streaming.d.mts +2 -0
- package/streaming.d.mts.map +1 -0
- package/streaming.d.ts +2 -0
- package/streaming.d.ts.map +1 -0
- package/streaming.js +6 -0
- package/streaming.js.map +1 -0
- package/streaming.mjs +2 -0
- package/streaming.mjs.map +1 -0
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- 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';
|
|
@@ -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,
|
|
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('/
|
|
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
|
|
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
|
|
207
|
-
type
|
|
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
|
|
212
|
-
type
|
|
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`/
|
|
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`/
|
|
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`/
|
|
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`/
|
|
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`/
|
|
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`/
|
|
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`/
|
|
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`/
|
|
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`/
|
|
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
|
|
38
|
-
type
|
|
43
|
+
type IntegrationCreatePhoneResponse,
|
|
44
|
+
type IntegrationGetSetupURLResponse,
|
|
39
45
|
type IntegrationRetrieveParams,
|
|
40
46
|
type IntegrationListParams,
|
|
41
47
|
type IntegrationDeleteParams,
|
|
42
|
-
type
|
|
43
|
-
type
|
|
48
|
+
type IntegrationCreatePhoneParams,
|
|
49
|
+
type IntegrationGetSetupURLParams,
|
|
44
50
|
} from './integrations/index';
|
|
45
|
-
export { Profile, type CloneHeadshot, type CloneProfile, type
|
|
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
|
|
9
|
-
type
|
|
8
|
+
type IntegrationCreatePhoneResponse,
|
|
9
|
+
type IntegrationGetSetupURLResponse,
|
|
10
10
|
type IntegrationRetrieveParams,
|
|
11
11
|
type IntegrationListParams,
|
|
12
12
|
type IntegrationDeleteParams,
|
|
13
|
-
type
|
|
14
|
-
type
|
|
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`/
|
|
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`/
|
|
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`/
|
|
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
|
-
|
|
60
|
+
createPhone(
|
|
61
61
|
cloneID: string,
|
|
62
|
-
body:
|
|
62
|
+
body: IntegrationCreatePhoneParams,
|
|
63
63
|
options?: RequestOptions,
|
|
64
|
-
): APIPromise<
|
|
65
|
-
return this._client.post(path`/
|
|
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
|
-
|
|
74
|
-
|
|
75
|
-
params:
|
|
73
|
+
getSetupURL(
|
|
74
|
+
integrationID: string,
|
|
75
|
+
params: IntegrationGetSetupURLParams,
|
|
76
76
|
options?: RequestOptions,
|
|
77
|
-
): APIPromise<
|
|
77
|
+
): APIPromise<IntegrationGetSetupURLResponse> {
|
|
78
78
|
const { cloneId } = params;
|
|
79
|
-
return this._client.get(path`/
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
189
|
-
type
|
|
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
|
|
194
|
-
type
|
|
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`/
|
|
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`/
|
|
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`/
|
|
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
|
-
|
|
16
|
-
return this._client.get(path`/
|
|
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
|
-
|
|
24
|
-
return this._client.patch(path`/
|
|
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
|
|
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
|
|
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(
|
|
22
|
-
|
|
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`/
|
|
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`/
|
|
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`/
|
|
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`/
|
|
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`/
|
|
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`/
|
|
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`/
|
|
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`/
|
|
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`/
|
|
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`/
|
|
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`/
|
|
26
|
+
return this._client.post(path`/public/v1/clones/${cloneID}/voice/generate`, { body, ...options });
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|