agentphone 1.0.9 → 1.0.11

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 (134) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +6 -0
  3. package/dist/cjs/Client.js +22 -12
  4. package/dist/cjs/api/resources/agentSignup/client/Client.d.ts +1 -1
  5. package/dist/cjs/api/resources/agentSignup/client/Client.js +1 -1
  6. package/dist/cjs/api/resources/agents/client/Client.d.ts +1 -1
  7. package/dist/cjs/api/resources/agents/client/Client.js +1 -1
  8. package/dist/cjs/api/resources/agents/client/requests/CreateAgentRequest.d.ts +8 -0
  9. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +8 -0
  10. package/dist/cjs/api/resources/calls/client/Client.d.ts +20 -0
  11. package/dist/cjs/api/resources/calls/client/Client.js +56 -0
  12. package/dist/cjs/api/resources/calls/client/requests/EndCallV1CallsCallIdEndPostRequest.d.ts +9 -0
  13. package/dist/cjs/api/resources/calls/client/requests/EndCallV1CallsCallIdEndPostRequest.js +3 -0
  14. package/dist/cjs/api/resources/calls/client/requests/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/contactCards/client/Client.d.ts +61 -0
  16. package/dist/cjs/api/resources/contactCards/client/Client.js +229 -0
  17. package/dist/cjs/api/resources/contactCards/client/index.d.ts +1 -0
  18. package/dist/cjs/api/resources/contactCards/client/index.js +17 -0
  19. package/dist/cjs/api/resources/contactCards/client/requests/ContactCardWriteRequest.d.ts +16 -0
  20. package/dist/cjs/api/resources/contactCards/client/requests/ContactCardWriteRequest.js +3 -0
  21. package/dist/cjs/api/resources/contactCards/client/requests/DeleteContactCardV1NumbersNumberIdContactCardDeleteRequest.d.ts +9 -0
  22. package/dist/cjs/api/resources/contactCards/client/requests/DeleteContactCardV1NumbersNumberIdContactCardDeleteRequest.js +3 -0
  23. package/dist/cjs/api/resources/contactCards/client/requests/GetContactCardV1NumbersNumberIdContactCardGetRequest.d.ts +9 -0
  24. package/dist/cjs/api/resources/contactCards/client/requests/GetContactCardV1NumbersNumberIdContactCardGetRequest.js +3 -0
  25. package/dist/cjs/api/resources/contactCards/client/requests/index.d.ts +3 -0
  26. package/dist/cjs/api/resources/contactCards/client/requests/index.js +2 -0
  27. package/dist/cjs/api/resources/contactCards/index.d.ts +1 -0
  28. package/dist/cjs/api/resources/contactCards/index.js +17 -0
  29. package/dist/cjs/api/resources/conversations/client/Client.d.ts +39 -0
  30. package/dist/cjs/api/resources/conversations/client/Client.js +114 -0
  31. package/dist/cjs/api/resources/conversations/client/requests/RemoveChatBackgroundV1ConversationsConversationIdBackgroundDeleteRequest.d.ts +9 -0
  32. package/dist/cjs/api/resources/conversations/client/requests/RemoveChatBackgroundV1ConversationsConversationIdBackgroundDeleteRequest.js +3 -0
  33. package/dist/cjs/api/resources/conversations/client/requests/SetBackgroundRequest.d.ts +12 -0
  34. package/dist/cjs/api/resources/conversations/client/requests/SetBackgroundRequest.js +3 -0
  35. package/dist/cjs/api/resources/conversations/client/requests/index.d.ts +2 -0
  36. package/dist/cjs/api/resources/index.d.ts +4 -0
  37. package/dist/cjs/api/resources/index.js +5 -1
  38. package/dist/cjs/api/resources/integrations/client/Client.d.ts +64 -0
  39. package/dist/cjs/api/resources/integrations/client/Client.js +268 -0
  40. package/dist/cjs/api/resources/integrations/client/index.d.ts +1 -0
  41. package/dist/cjs/api/resources/integrations/client/index.js +17 -0
  42. package/dist/cjs/api/resources/integrations/client/requests/SupabaseConnectIntegrationsSupabaseConnectGetRequest.d.ts +9 -0
  43. package/dist/cjs/api/resources/integrations/client/requests/SupabaseConnectIntegrationsSupabaseConnectGetRequest.js +3 -0
  44. package/dist/cjs/api/resources/integrations/client/requests/index.d.ts +1 -0
  45. package/dist/cjs/api/resources/integrations/client/requests/index.js +2 -0
  46. package/dist/cjs/api/resources/integrations/index.d.ts +1 -0
  47. package/dist/cjs/api/resources/integrations/index.js +17 -0
  48. package/dist/cjs/api/resources/messages/client/Client.d.ts +10 -11
  49. package/dist/cjs/api/resources/messages/client/Client.js +10 -11
  50. package/dist/cjs/api/resources/messages/client/requests/SendMessageRequest.d.ts +22 -0
  51. package/dist/cjs/api/resources/messages/client/requests/SendMessageRequest.js +19 -0
  52. package/dist/cjs/api/resources/messages/client/requests/SendReactionRequest.d.ts +2 -1
  53. package/dist/cjs/api/resources/messages/client/requests/index.d.ts +1 -1
  54. package/dist/cjs/api/resources/messages/client/requests/index.js +3 -0
  55. package/dist/cjs/api/resources/numbers/client/Client.d.ts +4 -4
  56. package/dist/cjs/api/resources/numbers/client/Client.js +4 -4
  57. package/dist/cjs/api/types/AgentResponse.d.ts +7 -0
  58. package/dist/cjs/api/types/ContactCardResponse.d.ts +6 -0
  59. package/dist/cjs/api/types/ContactCardResponse.js +3 -0
  60. package/dist/cjs/api/types/SendMessageResponse.d.ts +2 -0
  61. package/dist/cjs/api/types/SetBackgroundResponse.d.ts +8 -0
  62. package/dist/cjs/api/types/SetBackgroundResponse.js +3 -0
  63. package/dist/cjs/api/types/index.d.ts +2 -0
  64. package/dist/cjs/api/types/index.js +2 -0
  65. package/dist/cjs/version.d.ts +1 -1
  66. package/dist/cjs/version.js +1 -1
  67. package/dist/esm/BaseClient.mjs +2 -2
  68. package/dist/esm/Client.d.mts +6 -0
  69. package/dist/esm/Client.mjs +10 -0
  70. package/dist/esm/api/resources/agentSignup/client/Client.d.mts +1 -1
  71. package/dist/esm/api/resources/agentSignup/client/Client.mjs +1 -1
  72. package/dist/esm/api/resources/agents/client/Client.d.mts +1 -1
  73. package/dist/esm/api/resources/agents/client/Client.mjs +1 -1
  74. package/dist/esm/api/resources/agents/client/requests/CreateAgentRequest.d.mts +8 -0
  75. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +8 -0
  76. package/dist/esm/api/resources/calls/client/Client.d.mts +20 -0
  77. package/dist/esm/api/resources/calls/client/Client.mjs +56 -0
  78. package/dist/esm/api/resources/calls/client/requests/EndCallV1CallsCallIdEndPostRequest.d.mts +9 -0
  79. package/dist/esm/api/resources/calls/client/requests/EndCallV1CallsCallIdEndPostRequest.mjs +2 -0
  80. package/dist/esm/api/resources/calls/client/requests/index.d.mts +1 -0
  81. package/dist/esm/api/resources/contactCards/client/Client.d.mts +61 -0
  82. package/dist/esm/api/resources/contactCards/client/Client.mjs +192 -0
  83. package/dist/esm/api/resources/contactCards/client/index.d.mts +1 -0
  84. package/dist/esm/api/resources/contactCards/client/index.mjs +1 -0
  85. package/dist/esm/api/resources/contactCards/client/requests/ContactCardWriteRequest.d.mts +16 -0
  86. package/dist/esm/api/resources/contactCards/client/requests/ContactCardWriteRequest.mjs +2 -0
  87. package/dist/esm/api/resources/contactCards/client/requests/DeleteContactCardV1NumbersNumberIdContactCardDeleteRequest.d.mts +9 -0
  88. package/dist/esm/api/resources/contactCards/client/requests/DeleteContactCardV1NumbersNumberIdContactCardDeleteRequest.mjs +2 -0
  89. package/dist/esm/api/resources/contactCards/client/requests/GetContactCardV1NumbersNumberIdContactCardGetRequest.d.mts +9 -0
  90. package/dist/esm/api/resources/contactCards/client/requests/GetContactCardV1NumbersNumberIdContactCardGetRequest.mjs +2 -0
  91. package/dist/esm/api/resources/contactCards/client/requests/index.d.mts +3 -0
  92. package/dist/esm/api/resources/contactCards/client/requests/index.mjs +1 -0
  93. package/dist/esm/api/resources/contactCards/index.d.mts +1 -0
  94. package/dist/esm/api/resources/contactCards/index.mjs +1 -0
  95. package/dist/esm/api/resources/conversations/client/Client.d.mts +39 -0
  96. package/dist/esm/api/resources/conversations/client/Client.mjs +114 -0
  97. package/dist/esm/api/resources/conversations/client/requests/RemoveChatBackgroundV1ConversationsConversationIdBackgroundDeleteRequest.d.mts +9 -0
  98. package/dist/esm/api/resources/conversations/client/requests/RemoveChatBackgroundV1ConversationsConversationIdBackgroundDeleteRequest.mjs +2 -0
  99. package/dist/esm/api/resources/conversations/client/requests/SetBackgroundRequest.d.mts +12 -0
  100. package/dist/esm/api/resources/conversations/client/requests/SetBackgroundRequest.mjs +2 -0
  101. package/dist/esm/api/resources/conversations/client/requests/index.d.mts +2 -0
  102. package/dist/esm/api/resources/index.d.mts +4 -0
  103. package/dist/esm/api/resources/index.mjs +4 -0
  104. package/dist/esm/api/resources/integrations/client/Client.d.mts +64 -0
  105. package/dist/esm/api/resources/integrations/client/Client.mjs +231 -0
  106. package/dist/esm/api/resources/integrations/client/index.d.mts +1 -0
  107. package/dist/esm/api/resources/integrations/client/index.mjs +1 -0
  108. package/dist/esm/api/resources/integrations/client/requests/SupabaseConnectIntegrationsSupabaseConnectGetRequest.d.mts +9 -0
  109. package/dist/esm/api/resources/integrations/client/requests/SupabaseConnectIntegrationsSupabaseConnectGetRequest.mjs +2 -0
  110. package/dist/esm/api/resources/integrations/client/requests/index.d.mts +1 -0
  111. package/dist/esm/api/resources/integrations/client/requests/index.mjs +1 -0
  112. package/dist/esm/api/resources/integrations/index.d.mts +1 -0
  113. package/dist/esm/api/resources/integrations/index.mjs +1 -0
  114. package/dist/esm/api/resources/messages/client/Client.d.mts +10 -11
  115. package/dist/esm/api/resources/messages/client/Client.mjs +10 -11
  116. package/dist/esm/api/resources/messages/client/requests/SendMessageRequest.d.mts +22 -0
  117. package/dist/esm/api/resources/messages/client/requests/SendMessageRequest.mjs +18 -1
  118. package/dist/esm/api/resources/messages/client/requests/SendReactionRequest.d.mts +2 -1
  119. package/dist/esm/api/resources/messages/client/requests/index.d.mts +1 -1
  120. package/dist/esm/api/resources/messages/client/requests/index.mjs +1 -1
  121. package/dist/esm/api/resources/numbers/client/Client.d.mts +4 -4
  122. package/dist/esm/api/resources/numbers/client/Client.mjs +4 -4
  123. package/dist/esm/api/types/AgentResponse.d.mts +7 -0
  124. package/dist/esm/api/types/ContactCardResponse.d.mts +6 -0
  125. package/dist/esm/api/types/ContactCardResponse.mjs +2 -0
  126. package/dist/esm/api/types/SendMessageResponse.d.mts +2 -0
  127. package/dist/esm/api/types/SetBackgroundResponse.d.mts +8 -0
  128. package/dist/esm/api/types/SetBackgroundResponse.mjs +2 -0
  129. package/dist/esm/api/types/index.d.mts +2 -0
  130. package/dist/esm/api/types/index.mjs +2 -0
  131. package/dist/esm/version.d.mts +1 -1
  132. package/dist/esm/version.mjs +1 -1
  133. package/package.json +1 -1
  134. package/reference.md +709 -44
@@ -14,6 +14,7 @@ export declare class ConversationsClient {
14
14
  * List all conversations for this account.
15
15
  *
16
16
  * Sorted by most recent activity (lastMessageAt desc).
17
+ * Sorted by most recent activity.
17
18
  *
18
19
  * @param {AgentPhone.ListConversationsV1ConversationsGetRequest} request
19
20
  * @param {ConversationsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -98,4 +99,42 @@ export declare class ConversationsClient {
98
99
  */
99
100
  sendTypingIndicator(request: AgentPhone.SendTypingIndicatorV1ConversationsConversationIdTypingPostRequest, requestOptions?: ConversationsClient.RequestOptions): core.HttpResponsePromise<AgentPhone.SendTypingResponse>;
100
101
  private __sendTypingIndicator;
102
+ /**
103
+ * Set a custom wallpaper for the chat (iMessage only).
104
+ *
105
+ * Customer sends `image_url`; we fetch (≤10MB, JPEG/PNG/GIF/WebP/HEIC),
106
+ * validate, and forward as multipart to the iMessage provider. Idempotent —
107
+ * re-setting replaces. Recipients on iOS < 18 fall back to the default
108
+ * silently.
109
+ *
110
+ * @param {AgentPhone.SetBackgroundRequest} request
111
+ * @param {ConversationsClient.RequestOptions} requestOptions - Request-specific configuration.
112
+ *
113
+ * @throws {@link AgentPhone.UnprocessableEntityError}
114
+ *
115
+ * @example
116
+ * await client.conversations.setChatBackground({
117
+ * conversation_id: "conversation_id",
118
+ * image_url: "https://example.com/wallpaper.jpg"
119
+ * })
120
+ */
121
+ setChatBackground(request: AgentPhone.SetBackgroundRequest, requestOptions?: ConversationsClient.RequestOptions): core.HttpResponsePromise<AgentPhone.SetBackgroundResponse>;
122
+ private __setChatBackground;
123
+ /**
124
+ * Clear the custom wallpaper for the chat (iMessage only).
125
+ *
126
+ * Idempotent: deleting a default-background chat returns 204 (no-op).
127
+ *
128
+ * @param {AgentPhone.RemoveChatBackgroundV1ConversationsConversationIdBackgroundDeleteRequest} request
129
+ * @param {ConversationsClient.RequestOptions} requestOptions - Request-specific configuration.
130
+ *
131
+ * @throws {@link AgentPhone.UnprocessableEntityError}
132
+ *
133
+ * @example
134
+ * await client.conversations.removeChatBackground({
135
+ * conversation_id: "conversation_id"
136
+ * })
137
+ */
138
+ removeChatBackground(request: AgentPhone.RemoveChatBackgroundV1ConversationsConversationIdBackgroundDeleteRequest, requestOptions?: ConversationsClient.RequestOptions): core.HttpResponsePromise<void>;
139
+ private __removeChatBackground;
101
140
  }
@@ -34,6 +34,7 @@ export class ConversationsClient {
34
34
  * List all conversations for this account.
35
35
  *
36
36
  * Sorted by most recent activity (lastMessageAt desc).
37
+ * Sorted by most recent activity.
37
38
  *
38
39
  * @param {AgentPhone.ListConversationsV1ConversationsGetRequest} request
39
40
  * @param {ConversationsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -316,4 +317,117 @@ export class ConversationsClient {
316
317
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/conversations/{conversation_id}/typing");
317
318
  });
318
319
  }
320
+ /**
321
+ * Set a custom wallpaper for the chat (iMessage only).
322
+ *
323
+ * Customer sends `image_url`; we fetch (≤10MB, JPEG/PNG/GIF/WebP/HEIC),
324
+ * validate, and forward as multipart to the iMessage provider. Idempotent —
325
+ * re-setting replaces. Recipients on iOS < 18 fall back to the default
326
+ * silently.
327
+ *
328
+ * @param {AgentPhone.SetBackgroundRequest} request
329
+ * @param {ConversationsClient.RequestOptions} requestOptions - Request-specific configuration.
330
+ *
331
+ * @throws {@link AgentPhone.UnprocessableEntityError}
332
+ *
333
+ * @example
334
+ * await client.conversations.setChatBackground({
335
+ * conversation_id: "conversation_id",
336
+ * image_url: "https://example.com/wallpaper.jpg"
337
+ * })
338
+ */
339
+ setChatBackground(request, requestOptions) {
340
+ return core.HttpResponsePromise.fromPromise(this.__setChatBackground(request, requestOptions));
341
+ }
342
+ __setChatBackground(request, requestOptions) {
343
+ return __awaiter(this, void 0, void 0, function* () {
344
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
345
+ const { conversation_id: conversationId } = request, _body = __rest(request, ["conversation_id"]);
346
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
347
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
348
+ const _response = yield core.fetcher({
349
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/conversations/${core.url.encodePathParam(conversationId)}/background`),
350
+ method: "POST",
351
+ headers: _headers,
352
+ contentType: "application/json",
353
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
354
+ requestType: "json",
355
+ body: _body,
356
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
357
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
358
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
359
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
360
+ logging: this._options.logging,
361
+ });
362
+ if (_response.ok) {
363
+ return { data: _response.body, rawResponse: _response.rawResponse };
364
+ }
365
+ if (_response.error.reason === "status-code") {
366
+ switch (_response.error.statusCode) {
367
+ case 422:
368
+ throw new AgentPhone.UnprocessableEntityError(_response.error.body, _response.rawResponse);
369
+ default:
370
+ throw new errors.AgentPhoneError({
371
+ statusCode: _response.error.statusCode,
372
+ body: _response.error.body,
373
+ rawResponse: _response.rawResponse,
374
+ });
375
+ }
376
+ }
377
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/conversations/{conversation_id}/background");
378
+ });
379
+ }
380
+ /**
381
+ * Clear the custom wallpaper for the chat (iMessage only).
382
+ *
383
+ * Idempotent: deleting a default-background chat returns 204 (no-op).
384
+ *
385
+ * @param {AgentPhone.RemoveChatBackgroundV1ConversationsConversationIdBackgroundDeleteRequest} request
386
+ * @param {ConversationsClient.RequestOptions} requestOptions - Request-specific configuration.
387
+ *
388
+ * @throws {@link AgentPhone.UnprocessableEntityError}
389
+ *
390
+ * @example
391
+ * await client.conversations.removeChatBackground({
392
+ * conversation_id: "conversation_id"
393
+ * })
394
+ */
395
+ removeChatBackground(request, requestOptions) {
396
+ return core.HttpResponsePromise.fromPromise(this.__removeChatBackground(request, requestOptions));
397
+ }
398
+ __removeChatBackground(request, requestOptions) {
399
+ return __awaiter(this, void 0, void 0, function* () {
400
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
401
+ const { conversation_id: conversationId } = request;
402
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
403
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
404
+ const _response = yield core.fetcher({
405
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, `v1/conversations/${core.url.encodePathParam(conversationId)}/background`),
406
+ method: "DELETE",
407
+ headers: _headers,
408
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
409
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
410
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
411
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
412
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
413
+ logging: this._options.logging,
414
+ });
415
+ if (_response.ok) {
416
+ return { data: undefined, rawResponse: _response.rawResponse };
417
+ }
418
+ if (_response.error.reason === "status-code") {
419
+ switch (_response.error.statusCode) {
420
+ case 422:
421
+ throw new AgentPhone.UnprocessableEntityError(_response.error.body, _response.rawResponse);
422
+ default:
423
+ throw new errors.AgentPhoneError({
424
+ statusCode: _response.error.statusCode,
425
+ body: _response.error.body,
426
+ rawResponse: _response.rawResponse,
427
+ });
428
+ }
429
+ }
430
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v1/conversations/{conversation_id}/background");
431
+ });
432
+ }
319
433
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * conversation_id: "conversation_id"
5
+ * }
6
+ */
7
+ export interface RemoveChatBackgroundV1ConversationsConversationIdBackgroundDeleteRequest {
8
+ conversation_id: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * conversation_id: "conversation_id",
5
+ * image_url: "https://example.com/wallpaper.jpg"
6
+ * }
7
+ */
8
+ export interface SetBackgroundRequest {
9
+ conversation_id: string;
10
+ /** HTTPS URL of the background image. JPEG/PNG/GIF/WebP/HEIC, max 10MB. Recipients on iOS < 18 see the default background; no error is raised. */
11
+ image_url: string;
12
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,5 +1,7 @@
1
1
  export type { GetConversationMessagesV1ConversationsConversationIdMessagesGetRequest } from "./GetConversationMessagesV1ConversationsConversationIdMessagesGetRequest.mjs";
2
2
  export type { GetConversationV1ConversationsConversationIdGetRequest } from "./GetConversationV1ConversationsConversationIdGetRequest.mjs";
3
3
  export type { ListConversationsV1ConversationsGetRequest } from "./ListConversationsV1ConversationsGetRequest.mjs";
4
+ export type { RemoveChatBackgroundV1ConversationsConversationIdBackgroundDeleteRequest } from "./RemoveChatBackgroundV1ConversationsConversationIdBackgroundDeleteRequest.mjs";
4
5
  export type { SendTypingIndicatorV1ConversationsConversationIdTypingPostRequest } from "./SendTypingIndicatorV1ConversationsConversationIdTypingPostRequest.mjs";
6
+ export type { SetBackgroundRequest } from "./SetBackgroundRequest.mjs";
5
7
  export type { UpdateConversationRequest } from "./UpdateConversationRequest.mjs";
@@ -6,10 +6,14 @@ export * from "./agentWebhooks/client/requests/index.mjs";
6
6
  export * as agentWebhooks from "./agentWebhooks/index.mjs";
7
7
  export * from "./calls/client/requests/index.mjs";
8
8
  export * as calls from "./calls/index.mjs";
9
+ export * from "./contactCards/client/requests/index.mjs";
10
+ export * as contactCards from "./contactCards/index.mjs";
9
11
  export * from "./contacts/client/requests/index.mjs";
10
12
  export * as contacts from "./contacts/index.mjs";
11
13
  export * from "./conversations/client/requests/index.mjs";
12
14
  export * as conversations from "./conversations/index.mjs";
15
+ export * from "./integrations/client/requests/index.mjs";
16
+ export * as integrations from "./integrations/index.mjs";
13
17
  export * from "./messages/client/requests/index.mjs";
14
18
  export * as messages from "./messages/index.mjs";
15
19
  export * from "./numbers/client/requests/index.mjs";
@@ -6,10 +6,14 @@ export * from "./agentWebhooks/client/requests/index.mjs";
6
6
  export * as agentWebhooks from "./agentWebhooks/index.mjs";
7
7
  export * from "./calls/client/requests/index.mjs";
8
8
  export * as calls from "./calls/index.mjs";
9
+ export * from "./contactCards/client/requests/index.mjs";
10
+ export * as contactCards from "./contactCards/index.mjs";
9
11
  export * from "./contacts/client/requests/index.mjs";
10
12
  export * as contacts from "./contacts/index.mjs";
11
13
  export * from "./conversations/client/requests/index.mjs";
12
14
  export * as conversations from "./conversations/index.mjs";
15
+ export * from "./integrations/client/requests/index.mjs";
16
+ export * as integrations from "./integrations/index.mjs";
13
17
  export * from "./messages/client/requests/index.mjs";
14
18
  export * as messages from "./messages/index.mjs";
15
19
  export * from "./numbers/client/requests/index.mjs";
@@ -0,0 +1,64 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
+ import * as core from "../../../../core/index.mjs";
4
+ import * as AgentPhone from "../../../index.mjs";
5
+ export declare namespace IntegrationsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class IntegrationsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<IntegrationsClient.Options>;
12
+ constructor(options?: IntegrationsClient.Options);
13
+ /**
14
+ * Exchange a one-time connect code and redirect to Supabase OAuth.
15
+ *
16
+ * @param {AgentPhone.SupabaseConnectIntegrationsSupabaseConnectGetRequest} request
17
+ * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
18
+ *
19
+ * @throws {@link AgentPhone.UnprocessableEntityError}
20
+ *
21
+ * @example
22
+ * await client.integrations.supabaseConnect({
23
+ * code: "code"
24
+ * })
25
+ */
26
+ supabaseConnect(request: AgentPhone.SupabaseConnectIntegrationsSupabaseConnectGetRequest, requestOptions?: IntegrationsClient.RequestOptions): core.HttpResponsePromise<unknown>;
27
+ private __supabaseConnect;
28
+ /**
29
+ * Create a short-lived one-time code for initiating the Supabase OAuth flow.
30
+ *
31
+ * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
32
+ *
33
+ * @example
34
+ * await client.integrations.supabaseConnectCode()
35
+ */
36
+ supabaseConnectCode(requestOptions?: IntegrationsClient.RequestOptions): core.HttpResponsePromise<unknown>;
37
+ private __supabaseConnectCode;
38
+ /**
39
+ * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
40
+ *
41
+ * @example
42
+ * await client.integrations.supabaseStatus()
43
+ */
44
+ supabaseStatus(requestOptions?: IntegrationsClient.RequestOptions): core.HttpResponsePromise<unknown>;
45
+ private __supabaseStatus;
46
+ /**
47
+ * Get a valid Supabase access token, auto-refreshing if expired.
48
+ *
49
+ * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
50
+ *
51
+ * @example
52
+ * await client.integrations.supabaseToken()
53
+ */
54
+ supabaseToken(requestOptions?: IntegrationsClient.RequestOptions): core.HttpResponsePromise<unknown>;
55
+ private __supabaseToken;
56
+ /**
57
+ * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
58
+ *
59
+ * @example
60
+ * await client.integrations.supabaseDisconnect()
61
+ */
62
+ supabaseDisconnect(requestOptions?: IntegrationsClient.RequestOptions): core.HttpResponsePromise<unknown>;
63
+ private __supabaseDisconnect;
64
+ }
@@ -0,0 +1,231 @@
1
+ // This file was auto-generated by Fern from our API Definition.
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
+ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
+ import { mergeHeaders } from "../../../../core/headers.mjs";
13
+ import * as core from "../../../../core/index.mjs";
14
+ import * as environments from "../../../../environments.mjs";
15
+ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
16
+ import * as errors from "../../../../errors/index.mjs";
17
+ import * as AgentPhone from "../../../index.mjs";
18
+ export class IntegrationsClient {
19
+ constructor(options = {}) {
20
+ this._options = normalizeClientOptionsWithAuth(options);
21
+ }
22
+ /**
23
+ * Exchange a one-time connect code and redirect to Supabase OAuth.
24
+ *
25
+ * @param {AgentPhone.SupabaseConnectIntegrationsSupabaseConnectGetRequest} request
26
+ * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
27
+ *
28
+ * @throws {@link AgentPhone.UnprocessableEntityError}
29
+ *
30
+ * @example
31
+ * await client.integrations.supabaseConnect({
32
+ * code: "code"
33
+ * })
34
+ */
35
+ supabaseConnect(request, requestOptions) {
36
+ return core.HttpResponsePromise.fromPromise(this.__supabaseConnect(request, requestOptions));
37
+ }
38
+ __supabaseConnect(request, requestOptions) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
41
+ const { code } = request;
42
+ const _queryParams = {
43
+ code,
44
+ };
45
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
46
+ const _response = yield core.fetcher({
47
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "integrations/supabase/connect"),
48
+ method: "GET",
49
+ headers: _headers,
50
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
51
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
52
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
53
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
54
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
55
+ logging: this._options.logging,
56
+ });
57
+ if (_response.ok) {
58
+ return { data: _response.body, rawResponse: _response.rawResponse };
59
+ }
60
+ if (_response.error.reason === "status-code") {
61
+ switch (_response.error.statusCode) {
62
+ case 422:
63
+ throw new AgentPhone.UnprocessableEntityError(_response.error.body, _response.rawResponse);
64
+ default:
65
+ throw new errors.AgentPhoneError({
66
+ statusCode: _response.error.statusCode,
67
+ body: _response.error.body,
68
+ rawResponse: _response.rawResponse,
69
+ });
70
+ }
71
+ }
72
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/integrations/supabase/connect");
73
+ });
74
+ }
75
+ /**
76
+ * Create a short-lived one-time code for initiating the Supabase OAuth flow.
77
+ *
78
+ * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
79
+ *
80
+ * @example
81
+ * await client.integrations.supabaseConnectCode()
82
+ */
83
+ supabaseConnectCode(requestOptions) {
84
+ return core.HttpResponsePromise.fromPromise(this.__supabaseConnectCode(requestOptions));
85
+ }
86
+ __supabaseConnectCode(requestOptions) {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
89
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
90
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
91
+ const _response = yield core.fetcher({
92
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "integrations/supabase/connect"),
93
+ method: "POST",
94
+ headers: _headers,
95
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
96
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
97
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
98
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
99
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
100
+ logging: this._options.logging,
101
+ });
102
+ if (_response.ok) {
103
+ return { data: _response.body, rawResponse: _response.rawResponse };
104
+ }
105
+ if (_response.error.reason === "status-code") {
106
+ throw new errors.AgentPhoneError({
107
+ statusCode: _response.error.statusCode,
108
+ body: _response.error.body,
109
+ rawResponse: _response.rawResponse,
110
+ });
111
+ }
112
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/integrations/supabase/connect");
113
+ });
114
+ }
115
+ /**
116
+ * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
117
+ *
118
+ * @example
119
+ * await client.integrations.supabaseStatus()
120
+ */
121
+ supabaseStatus(requestOptions) {
122
+ return core.HttpResponsePromise.fromPromise(this.__supabaseStatus(requestOptions));
123
+ }
124
+ __supabaseStatus(requestOptions) {
125
+ return __awaiter(this, void 0, void 0, function* () {
126
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
127
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
128
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
129
+ const _response = yield core.fetcher({
130
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "integrations/supabase/status"),
131
+ method: "GET",
132
+ headers: _headers,
133
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
134
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
135
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
136
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
137
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
138
+ logging: this._options.logging,
139
+ });
140
+ if (_response.ok) {
141
+ return { data: _response.body, rawResponse: _response.rawResponse };
142
+ }
143
+ if (_response.error.reason === "status-code") {
144
+ throw new errors.AgentPhoneError({
145
+ statusCode: _response.error.statusCode,
146
+ body: _response.error.body,
147
+ rawResponse: _response.rawResponse,
148
+ });
149
+ }
150
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/integrations/supabase/status");
151
+ });
152
+ }
153
+ /**
154
+ * Get a valid Supabase access token, auto-refreshing if expired.
155
+ *
156
+ * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
157
+ *
158
+ * @example
159
+ * await client.integrations.supabaseToken()
160
+ */
161
+ supabaseToken(requestOptions) {
162
+ return core.HttpResponsePromise.fromPromise(this.__supabaseToken(requestOptions));
163
+ }
164
+ __supabaseToken(requestOptions) {
165
+ return __awaiter(this, void 0, void 0, function* () {
166
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
167
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
168
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
169
+ const _response = yield core.fetcher({
170
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "integrations/supabase/token"),
171
+ method: "GET",
172
+ headers: _headers,
173
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
174
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
175
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
176
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
177
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
178
+ logging: this._options.logging,
179
+ });
180
+ if (_response.ok) {
181
+ return { data: _response.body, rawResponse: _response.rawResponse };
182
+ }
183
+ if (_response.error.reason === "status-code") {
184
+ throw new errors.AgentPhoneError({
185
+ statusCode: _response.error.statusCode,
186
+ body: _response.error.body,
187
+ rawResponse: _response.rawResponse,
188
+ });
189
+ }
190
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/integrations/supabase/token");
191
+ });
192
+ }
193
+ /**
194
+ * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
195
+ *
196
+ * @example
197
+ * await client.integrations.supabaseDisconnect()
198
+ */
199
+ supabaseDisconnect(requestOptions) {
200
+ return core.HttpResponsePromise.fromPromise(this.__supabaseDisconnect(requestOptions));
201
+ }
202
+ __supabaseDisconnect(requestOptions) {
203
+ return __awaiter(this, void 0, void 0, function* () {
204
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
205
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
206
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
207
+ const _response = yield core.fetcher({
208
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "integrations/supabase"),
209
+ method: "DELETE",
210
+ headers: _headers,
211
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
212
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
213
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
214
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
215
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
216
+ logging: this._options.logging,
217
+ });
218
+ if (_response.ok) {
219
+ return { data: _response.body, rawResponse: _response.rawResponse };
220
+ }
221
+ if (_response.error.reason === "status-code") {
222
+ throw new errors.AgentPhoneError({
223
+ statusCode: _response.error.statusCode,
224
+ body: _response.error.body,
225
+ rawResponse: _response.rawResponse,
226
+ });
227
+ }
228
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/integrations/supabase");
229
+ });
230
+ }
231
+ }
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * code: "code"
5
+ * }
6
+ */
7
+ export interface SupabaseConnectIntegrationsSupabaseConnectGetRequest {
8
+ code: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1 @@
1
+ export type { SupabaseConnectIntegrationsSupabaseConnectGetRequest } from "./SupabaseConnectIntegrationsSupabaseConnectGetRequest.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -13,7 +13,11 @@ export declare class MessagesClient {
13
13
  /**
14
14
  * Send an outbound message (SMS or iMessage) via the provider assigned to the number.
15
15
  *
16
- * Supports single attachments via `media_url` or multiple attachments via `media_urls`. You may use one or the other, but not both.
16
+ * Attach media by passing public HTTPS URLs in `media_urls`.
17
+ *
18
+ * ### Single attachment
19
+ *
20
+ * Pass a single-item array in `media_urls`. The URL must be publicly accessible.
17
21
  *
18
22
  * ### Carousel / multi-image (iMessage)
19
23
  *
@@ -23,13 +27,7 @@ export declare class MessagesClient {
23
27
  * - `body` must be omitted or empty (text cannot be sent alongside a carousel)
24
28
  * - Only supported on iMessage-capable lines
25
29
  *
26
- * ### Single attachment
27
- *
28
- * Pass a single URL in `media_url`. The URL must be publicly accessible. Works across all channels.
29
- *
30
- * ### Multi-attachment (iMessage)
31
- *
32
- * Some iMessage lines support multiple attachments (images and other file types) via `media_urls`. No minimum count; `body` can be included alongside attachments.
30
+ * > **Deprecation notice:** The `media_url` field (singular) is deprecated and will be removed in a future version. Use `media_urls` (array) instead — even for a single attachment, pass it as `media_urls: ["https://..."]`.
33
31
  *
34
32
  * @param {AgentPhone.SendMessageRequest} request
35
33
  * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -48,8 +46,9 @@ export declare class MessagesClient {
48
46
  /**
49
47
  * Send a tapback reaction to a message (iMessage only).
50
48
  *
51
- * Reactions are an iMessage feature. Attempting to react to a message
52
- * sent via an SMS/Twilio number will return a clear error.
49
+ * Reactions are available only for iMessage messages. Attempting to react
50
+ * to an SMS message or another channel that does not support tapbacks
51
+ * returns a clear error.
53
52
  *
54
53
  * @param {AgentPhone.SendReactionRequest} request
55
54
  * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -59,7 +58,7 @@ export declare class MessagesClient {
59
58
  * @example
60
59
  * await client.messages.sendReaction({
61
60
  * message_id: "message_id",
62
- * reaction: "reaction"
61
+ * reaction: "love"
63
62
  * })
64
63
  */
65
64
  sendReaction(request: AgentPhone.SendReactionRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentPhone.SendReactionResponse>;