agentphone 1.0.14 → 1.0.15
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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/conversations/client/Client.d.ts +8 -6
- package/dist/cjs/api/resources/conversations/client/Client.js +8 -6
- package/dist/cjs/api/resources/conversations/client/requests/UpdateConversationRequest.d.ts +2 -0
- package/dist/cjs/api/resources/messages/client/Client.d.ts +0 -1
- package/dist/cjs/api/resources/messages/client/Client.js +0 -1
- package/dist/cjs/api/resources/messages/client/requests/SendMessageRequest.d.ts +4 -2
- package/dist/cjs/api/types/MessageInConversation.d.ts +1 -0
- package/dist/cjs/api/types/ReplyToInConversation.d.ts +5 -0
- package/dist/cjs/api/types/ReplyToInConversation.js +3 -0
- package/dist/cjs/api/types/SendMessageResponse.d.ts +1 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/conversations/client/Client.d.mts +8 -6
- package/dist/esm/api/resources/conversations/client/Client.mjs +8 -6
- package/dist/esm/api/resources/conversations/client/requests/UpdateConversationRequest.d.mts +2 -0
- package/dist/esm/api/resources/messages/client/Client.d.mts +0 -1
- package/dist/esm/api/resources/messages/client/Client.mjs +0 -1
- package/dist/esm/api/resources/messages/client/requests/SendMessageRequest.d.mts +4 -2
- package/dist/esm/api/types/MessageInConversation.d.mts +1 -0
- package/dist/esm/api/types/ReplyToInConversation.d.mts +5 -0
- package/dist/esm/api/types/ReplyToInConversation.mjs +2 -0
- package/dist/esm/api/types/SendMessageResponse.d.mts +1 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +8 -7
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "agentphone",
|
|
46
|
-
"X-Fern-SDK-Version": "1.0.
|
|
47
|
-
"User-Agent": "agentphone/1.0.
|
|
46
|
+
"X-Fern-SDK-Version": "1.0.15",
|
|
47
|
+
"User-Agent": "agentphone/1.0.15",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -42,14 +42,16 @@ export declare class ConversationsClient {
|
|
|
42
42
|
getConversation(request: AgentPhone.GetConversationV1ConversationsConversationIdGetRequest, requestOptions?: ConversationsClient.RequestOptions): core.HttpResponsePromise<AgentPhone.ConversationDetail>;
|
|
43
43
|
private __getConversation;
|
|
44
44
|
/**
|
|
45
|
-
* Update conversation
|
|
45
|
+
* Update a conversation.
|
|
46
46
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* -
|
|
47
|
+
* - `metadata`: store custom context for AI agents (customer info, order/ticket
|
|
48
|
+
* ids, session state). Replaces the stored object; surfaced in webhook
|
|
49
|
+
* payloads as `conversationState`.
|
|
50
|
+
* - `group_name`: rename a group conversation (iMessage groups only). Also
|
|
51
|
+
* renames the underlying iMessage thread.
|
|
51
52
|
*
|
|
52
|
-
*
|
|
53
|
+
* Only the fields you include are changed: a rename-only PATCH leaves metadata
|
|
54
|
+
* untouched, and vice versa.
|
|
53
55
|
*
|
|
54
56
|
* @param {AgentPhone.UpdateConversationRequest} request
|
|
55
57
|
* @param {ConversationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -179,14 +179,16 @@ class ConversationsClient {
|
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
181
|
/**
|
|
182
|
-
* Update conversation
|
|
182
|
+
* Update a conversation.
|
|
183
183
|
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
* -
|
|
184
|
+
* - `metadata`: store custom context for AI agents (customer info, order/ticket
|
|
185
|
+
* ids, session state). Replaces the stored object; surfaced in webhook
|
|
186
|
+
* payloads as `conversationState`.
|
|
187
|
+
* - `group_name`: rename a group conversation (iMessage groups only). Also
|
|
188
|
+
* renames the underlying iMessage thread.
|
|
188
189
|
*
|
|
189
|
-
*
|
|
190
|
+
* Only the fields you include are changed: a rename-only PATCH leaves metadata
|
|
191
|
+
* untouched, and vice versa.
|
|
190
192
|
*
|
|
191
193
|
* @param {AgentPhone.UpdateConversationRequest} request
|
|
192
194
|
* @param {ConversationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -7,4 +7,6 @@
|
|
|
7
7
|
export interface UpdateConversationRequest {
|
|
8
8
|
conversation_id: string;
|
|
9
9
|
metadata?: Record<string, unknown> | null;
|
|
10
|
+
/** New display name for a group conversation. iMessage groups only; also renames the underlying iMessage thread. Ignored (omit) for 1:1 chats. */
|
|
11
|
+
group_name?: string | null;
|
|
10
12
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* to_number: "to_number",
|
|
5
4
|
* body: "body"
|
|
6
5
|
* }
|
|
7
6
|
*/
|
|
8
7
|
export interface SendMessageRequest {
|
|
9
8
|
agent_id?: string | null;
|
|
10
|
-
|
|
9
|
+
/** Recipient of an existing chat: a phone (any format, normalized to E.164), US short code, email, or a group id (grp_...). Provide this OR `recipients` (to start a new group), not both. */
|
|
10
|
+
to_number?: string | null;
|
|
11
|
+
/** Start a NEW iMessage group by listing 2 or more recipients (phones or emails). The first message is delivered to all of them, an iMessage group is created, and the response `to_number` returns the new group id (grp_...) to use for follow-up sends. iMessage numbers only. */
|
|
12
|
+
recipients?: string[] | null;
|
|
11
13
|
body: string;
|
|
12
14
|
media_url?: string | null;
|
|
13
15
|
media_urls?: string[] | null;
|
|
@@ -41,6 +41,7 @@ export * from "./PlanInfo.js";
|
|
|
41
41
|
export * from "./PlanLimits.js";
|
|
42
42
|
export * from "./ReactionInConversation.js";
|
|
43
43
|
export * from "./RegistrationResponse.js";
|
|
44
|
+
export * from "./ReplyToInConversation.js";
|
|
44
45
|
export * from "./SendMessageResponse.js";
|
|
45
46
|
export * from "./SendReactionResponse.js";
|
|
46
47
|
export * from "./SendTypingResponse.js";
|
|
@@ -57,6 +57,7 @@ __exportStar(require("./PlanInfo.js"), exports);
|
|
|
57
57
|
__exportStar(require("./PlanLimits.js"), exports);
|
|
58
58
|
__exportStar(require("./ReactionInConversation.js"), exports);
|
|
59
59
|
__exportStar(require("./RegistrationResponse.js"), exports);
|
|
60
|
+
__exportStar(require("./ReplyToInConversation.js"), exports);
|
|
60
61
|
__exportStar(require("./SendMessageResponse.js"), exports);
|
|
61
62
|
__exportStar(require("./SendReactionResponse.js"), exports);
|
|
62
63
|
__exportStar(require("./SendTypingResponse.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.
|
|
1
|
+
export declare const SDK_VERSION = "1.0.15";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "agentphone",
|
|
9
|
-
"X-Fern-SDK-Version": "1.0.
|
|
10
|
-
"User-Agent": "agentphone/1.0.
|
|
9
|
+
"X-Fern-SDK-Version": "1.0.15",
|
|
10
|
+
"User-Agent": "agentphone/1.0.15",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -42,14 +42,16 @@ export declare class ConversationsClient {
|
|
|
42
42
|
getConversation(request: AgentPhone.GetConversationV1ConversationsConversationIdGetRequest, requestOptions?: ConversationsClient.RequestOptions): core.HttpResponsePromise<AgentPhone.ConversationDetail>;
|
|
43
43
|
private __getConversation;
|
|
44
44
|
/**
|
|
45
|
-
* Update conversation
|
|
45
|
+
* Update a conversation.
|
|
46
46
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* -
|
|
47
|
+
* - `metadata`: store custom context for AI agents (customer info, order/ticket
|
|
48
|
+
* ids, session state). Replaces the stored object; surfaced in webhook
|
|
49
|
+
* payloads as `conversationState`.
|
|
50
|
+
* - `group_name`: rename a group conversation (iMessage groups only). Also
|
|
51
|
+
* renames the underlying iMessage thread.
|
|
51
52
|
*
|
|
52
|
-
*
|
|
53
|
+
* Only the fields you include are changed: a rename-only PATCH leaves metadata
|
|
54
|
+
* untouched, and vice versa.
|
|
53
55
|
*
|
|
54
56
|
* @param {AgentPhone.UpdateConversationRequest} request
|
|
55
57
|
* @param {ConversationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -143,14 +143,16 @@ export class ConversationsClient {
|
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
/**
|
|
146
|
-
* Update conversation
|
|
146
|
+
* Update a conversation.
|
|
147
147
|
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* -
|
|
148
|
+
* - `metadata`: store custom context for AI agents (customer info, order/ticket
|
|
149
|
+
* ids, session state). Replaces the stored object; surfaced in webhook
|
|
150
|
+
* payloads as `conversationState`.
|
|
151
|
+
* - `group_name`: rename a group conversation (iMessage groups only). Also
|
|
152
|
+
* renames the underlying iMessage thread.
|
|
152
153
|
*
|
|
153
|
-
*
|
|
154
|
+
* Only the fields you include are changed: a rename-only PATCH leaves metadata
|
|
155
|
+
* untouched, and vice versa.
|
|
154
156
|
*
|
|
155
157
|
* @param {AgentPhone.UpdateConversationRequest} request
|
|
156
158
|
* @param {ConversationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
package/dist/esm/api/resources/conversations/client/requests/UpdateConversationRequest.d.mts
CHANGED
|
@@ -7,4 +7,6 @@
|
|
|
7
7
|
export interface UpdateConversationRequest {
|
|
8
8
|
conversation_id: string;
|
|
9
9
|
metadata?: Record<string, unknown> | null;
|
|
10
|
+
/** New display name for a group conversation. iMessage groups only; also renames the underlying iMessage thread. Ignored (omit) for 1:1 chats. */
|
|
11
|
+
group_name?: string | null;
|
|
10
12
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* to_number: "to_number",
|
|
5
4
|
* body: "body"
|
|
6
5
|
* }
|
|
7
6
|
*/
|
|
8
7
|
export interface SendMessageRequest {
|
|
9
8
|
agent_id?: string | null;
|
|
10
|
-
|
|
9
|
+
/** Recipient of an existing chat: a phone (any format, normalized to E.164), US short code, email, or a group id (grp_...). Provide this OR `recipients` (to start a new group), not both. */
|
|
10
|
+
to_number?: string | null;
|
|
11
|
+
/** Start a NEW iMessage group by listing 2 or more recipients (phones or emails). The first message is delivered to all of them, an iMessage group is created, and the response `to_number` returns the new group id (grp_...) to use for follow-up sends. iMessage numbers only. */
|
|
12
|
+
recipients?: string[] | null;
|
|
11
13
|
body: string;
|
|
12
14
|
media_url?: string | null;
|
|
13
15
|
media_urls?: string[] | null;
|
|
@@ -41,6 +41,7 @@ export * from "./PlanInfo.mjs";
|
|
|
41
41
|
export * from "./PlanLimits.mjs";
|
|
42
42
|
export * from "./ReactionInConversation.mjs";
|
|
43
43
|
export * from "./RegistrationResponse.mjs";
|
|
44
|
+
export * from "./ReplyToInConversation.mjs";
|
|
44
45
|
export * from "./SendMessageResponse.mjs";
|
|
45
46
|
export * from "./SendReactionResponse.mjs";
|
|
46
47
|
export * from "./SendTypingResponse.mjs";
|
|
@@ -41,6 +41,7 @@ export * from "./PlanInfo.mjs";
|
|
|
41
41
|
export * from "./PlanLimits.mjs";
|
|
42
42
|
export * from "./ReactionInConversation.mjs";
|
|
43
43
|
export * from "./RegistrationResponse.mjs";
|
|
44
|
+
export * from "./ReplyToInConversation.mjs";
|
|
44
45
|
export * from "./SendMessageResponse.mjs";
|
|
45
46
|
export * from "./SendReactionResponse.mjs";
|
|
46
47
|
export * from "./SendTypingResponse.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.
|
|
1
|
+
export declare const SDK_VERSION = "1.0.15";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.0.
|
|
1
|
+
export const SDK_VERSION = "1.0.15";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -2247,14 +2247,16 @@ await client.conversations.getConversation({
|
|
|
2247
2247
|
<dl>
|
|
2248
2248
|
<dd>
|
|
2249
2249
|
|
|
2250
|
-
Update conversation
|
|
2250
|
+
Update a conversation.
|
|
2251
2251
|
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
-
|
|
2252
|
+
- `metadata`: store custom context for AI agents (customer info, order/ticket
|
|
2253
|
+
ids, session state). Replaces the stored object; surfaced in webhook
|
|
2254
|
+
payloads as `conversationState`.
|
|
2255
|
+
- `group_name`: rename a group conversation (iMessage groups only). Also
|
|
2256
|
+
renames the underlying iMessage thread.
|
|
2256
2257
|
|
|
2257
|
-
|
|
2258
|
+
Only the fields you include are changed: a rename-only PATCH leaves metadata
|
|
2259
|
+
untouched, and vice versa.
|
|
2258
2260
|
</dd>
|
|
2259
2261
|
</dl>
|
|
2260
2262
|
</dd>
|
|
@@ -3575,7 +3577,6 @@ To send a carousel of images on iMessage, pass 2-20 URLs in `media_urls`. Requir
|
|
|
3575
3577
|
|
|
3576
3578
|
```typescript
|
|
3577
3579
|
await client.messages.sendMessage({
|
|
3578
|
-
to_number: "to_number",
|
|
3579
3580
|
body: "body"
|
|
3580
3581
|
});
|
|
3581
3582
|
|