@linqapp/sdk 0.32.1 → 0.33.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +82 -112
  3. package/client.d.mts +42 -6
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +42 -6
  6. package/client.d.ts.map +1 -1
  7. package/client.js +39 -3
  8. package/client.js.map +1 -1
  9. package/client.mjs +39 -3
  10. package/client.mjs.map +1 -1
  11. package/core/error.d.mts +13 -0
  12. package/core/error.d.mts.map +1 -1
  13. package/core/error.d.ts +13 -0
  14. package/core/error.d.ts.map +1 -1
  15. package/core/error.js +5 -1
  16. package/core/error.js.map +1 -1
  17. package/core/error.mjs +5 -1
  18. package/core/error.mjs.map +1 -1
  19. package/package.json +1 -1
  20. package/resources/available-number.d.mts +13 -1
  21. package/resources/available-number.d.mts.map +1 -1
  22. package/resources/available-number.d.ts +13 -1
  23. package/resources/available-number.d.ts.map +1 -1
  24. package/resources/available-number.js +2 -1
  25. package/resources/available-number.js.map +1 -1
  26. package/resources/available-number.mjs +2 -1
  27. package/resources/available-number.mjs.map +1 -1
  28. package/resources/chats/chats.d.mts +175 -70
  29. package/resources/chats/chats.d.mts.map +1 -1
  30. package/resources/chats/chats.d.ts +175 -70
  31. package/resources/chats/chats.d.ts.map +1 -1
  32. package/resources/chats/chats.js +65 -61
  33. package/resources/chats/chats.js.map +1 -1
  34. package/resources/chats/chats.mjs +65 -61
  35. package/resources/chats/chats.mjs.map +1 -1
  36. package/resources/chats/index.d.mts +3 -2
  37. package/resources/chats/index.d.mts.map +1 -1
  38. package/resources/chats/index.d.ts +3 -2
  39. package/resources/chats/index.d.ts.map +1 -1
  40. package/resources/chats/index.js +3 -1
  41. package/resources/chats/index.js.map +1 -1
  42. package/resources/chats/index.mjs +1 -0
  43. package/resources/chats/index.mjs.map +1 -1
  44. package/resources/chats/location.d.mts +25 -25
  45. package/resources/chats/location.d.mts.map +1 -1
  46. package/resources/chats/location.d.ts +25 -25
  47. package/resources/chats/location.d.ts.map +1 -1
  48. package/resources/chats/location.js +27 -27
  49. package/resources/chats/location.js.map +1 -1
  50. package/resources/chats/location.mjs +27 -27
  51. package/resources/chats/location.mjs.map +1 -1
  52. package/resources/chats/messages.d.mts +28 -21
  53. package/resources/chats/messages.d.mts.map +1 -1
  54. package/resources/chats/messages.d.ts +28 -21
  55. package/resources/chats/messages.d.ts.map +1 -1
  56. package/resources/chats/messages.js +16 -16
  57. package/resources/chats/messages.js.map +1 -1
  58. package/resources/chats/messages.mjs +16 -16
  59. package/resources/chats/messages.mjs.map +1 -1
  60. package/resources/chats/polls.d.mts +171 -0
  61. package/resources/chats/polls.d.mts.map +1 -0
  62. package/resources/chats/polls.d.ts +171 -0
  63. package/resources/chats/polls.d.ts.map +1 -0
  64. package/resources/chats/polls.js +95 -0
  65. package/resources/chats/polls.js.map +1 -0
  66. package/resources/chats/polls.mjs +91 -0
  67. package/resources/chats/polls.mjs.map +1 -0
  68. package/resources/contact-card.d.mts +29 -28
  69. package/resources/contact-card.d.mts.map +1 -1
  70. package/resources/contact-card.d.ts +29 -28
  71. package/resources/contact-card.d.ts.map +1 -1
  72. package/resources/contact-card.js +23 -22
  73. package/resources/contact-card.js.map +1 -1
  74. package/resources/contact-card.mjs +23 -22
  75. package/resources/contact-card.mjs.map +1 -1
  76. package/resources/experiences.d.mts +91 -0
  77. package/resources/experiences.d.mts.map +1 -0
  78. package/resources/experiences.d.ts +91 -0
  79. package/resources/experiences.d.ts.map +1 -0
  80. package/resources/experiences.js +29 -0
  81. package/resources/experiences.js.map +1 -0
  82. package/resources/experiences.mjs +25 -0
  83. package/resources/experiences.mjs.map +1 -0
  84. package/resources/index.d.mts +7 -3
  85. package/resources/index.d.mts.map +1 -1
  86. package/resources/index.d.ts +7 -3
  87. package/resources/index.d.ts.map +1 -1
  88. package/resources/index.js +10 -2
  89. package/resources/index.js.map +1 -1
  90. package/resources/index.mjs +5 -1
  91. package/resources/index.mjs.map +1 -1
  92. package/resources/messages/index.d.mts +3 -0
  93. package/resources/messages/index.d.mts.map +1 -0
  94. package/resources/messages/index.d.ts +3 -0
  95. package/resources/messages/index.d.ts.map +1 -0
  96. package/resources/messages/index.js +9 -0
  97. package/resources/messages/index.js.map +1 -0
  98. package/resources/messages/index.mjs +4 -0
  99. package/resources/messages/index.mjs.map +1 -0
  100. package/resources/messages/messages.d.mts +795 -0
  101. package/resources/messages/messages.d.mts.map +1 -0
  102. package/resources/messages/messages.d.ts +795 -0
  103. package/resources/messages/messages.d.ts.map +1 -0
  104. package/resources/messages/messages.js +298 -0
  105. package/resources/messages/messages.js.map +1 -0
  106. package/resources/messages/messages.mjs +293 -0
  107. package/resources/messages/messages.mjs.map +1 -0
  108. package/resources/messages/poll.d.mts +131 -0
  109. package/resources/messages/poll.d.mts.map +1 -0
  110. package/resources/messages/poll.d.ts +131 -0
  111. package/resources/messages/poll.d.ts.map +1 -0
  112. package/resources/messages/poll.js +119 -0
  113. package/resources/messages/poll.js.map +1 -0
  114. package/resources/messages/poll.mjs +115 -0
  115. package/resources/messages/poll.mjs.map +1 -0
  116. package/resources/messages.d.mts +1 -747
  117. package/resources/messages.d.mts.map +1 -1
  118. package/resources/messages.d.ts +1 -747
  119. package/resources/messages.d.ts.map +1 -1
  120. package/resources/messages.js +2 -275
  121. package/resources/messages.js.map +1 -1
  122. package/resources/messages.mjs +1 -273
  123. package/resources/messages.mjs.map +1 -1
  124. package/resources/payment-handles.d.mts +87 -0
  125. package/resources/payment-handles.d.mts.map +1 -0
  126. package/resources/payment-handles.d.ts +87 -0
  127. package/resources/payment-handles.d.ts.map +1 -0
  128. package/resources/payment-handles.js +76 -0
  129. package/resources/payment-handles.js.map +1 -0
  130. package/resources/payment-handles.mjs +72 -0
  131. package/resources/payment-handles.mjs.map +1 -0
  132. package/resources/payment-providers.d.mts +58 -0
  133. package/resources/payment-providers.d.mts.map +1 -0
  134. package/resources/payment-providers.d.ts +58 -0
  135. package/resources/payment-providers.d.ts.map +1 -0
  136. package/resources/payment-providers.js +45 -0
  137. package/resources/payment-providers.js.map +1 -0
  138. package/resources/payment-providers.mjs +41 -0
  139. package/resources/payment-providers.mjs.map +1 -0
  140. package/resources/payment-requests.d.mts +2 -2
  141. package/resources/payment-requests.d.ts +2 -2
  142. package/resources/payment-requests.js +2 -2
  143. package/resources/payment-requests.mjs +2 -2
  144. package/resources/payments.d.mts +116 -0
  145. package/resources/payments.d.mts.map +1 -0
  146. package/resources/payments.d.ts +116 -0
  147. package/resources/payments.d.ts.map +1 -0
  148. package/resources/payments.js +70 -0
  149. package/resources/payments.js.map +1 -0
  150. package/resources/payments.mjs +66 -0
  151. package/resources/payments.mjs.map +1 -0
  152. package/resources/phone-numbers.d.mts +11 -11
  153. package/resources/phone-numbers.d.mts.map +1 -1
  154. package/resources/phone-numbers.d.ts +11 -11
  155. package/resources/phone-numbers.d.ts.map +1 -1
  156. package/resources/phone-numbers.js +13 -13
  157. package/resources/phone-numbers.js.map +1 -1
  158. package/resources/phone-numbers.mjs +13 -13
  159. package/resources/phone-numbers.mjs.map +1 -1
  160. package/resources/webhook-events.d.mts +1 -1
  161. package/resources/webhook-events.d.mts.map +1 -1
  162. package/resources/webhook-events.d.ts +1 -1
  163. package/resources/webhook-events.d.ts.map +1 -1
  164. package/resources/webhook-subscriptions.d.mts +11 -11
  165. package/resources/webhook-subscriptions.d.mts.map +1 -1
  166. package/resources/webhook-subscriptions.d.ts +11 -11
  167. package/resources/webhook-subscriptions.d.ts.map +1 -1
  168. package/resources/webhook-subscriptions.js +13 -13
  169. package/resources/webhook-subscriptions.js.map +1 -1
  170. package/resources/webhook-subscriptions.mjs +13 -13
  171. package/resources/webhook-subscriptions.mjs.map +1 -1
  172. package/resources/webhooks.d.mts +72 -1
  173. package/resources/webhooks.d.mts.map +1 -1
  174. package/resources/webhooks.d.ts +72 -1
  175. package/resources/webhooks.d.ts.map +1 -1
  176. package/src/client.ts +91 -20
  177. package/src/core/error.ts +20 -1
  178. package/src/resources/available-number.ts +14 -1
  179. package/src/resources/chats/chats.ts +203 -85
  180. package/src/resources/chats/index.ts +3 -2
  181. package/src/resources/chats/location.ts +28 -28
  182. package/src/resources/chats/messages.ts +40 -32
  183. package/src/resources/chats/polls.ts +196 -0
  184. package/src/resources/contact-card.ts +36 -35
  185. package/src/resources/experiences.ts +118 -0
  186. package/src/resources/index.ts +23 -5
  187. package/src/resources/messages/index.ts +18 -0
  188. package/src/resources/messages/messages.ts +958 -0
  189. package/src/resources/messages/poll.ts +151 -0
  190. package/src/resources/messages.ts +1 -894
  191. package/src/resources/payment-handles.ts +114 -0
  192. package/src/resources/payment-providers.ts +81 -0
  193. package/src/resources/payment-requests.ts +2 -2
  194. package/src/resources/payments.ts +163 -0
  195. package/src/resources/phone-numbers.ts +14 -14
  196. package/src/resources/webhook-events.ts +9 -0
  197. package/src/resources/webhook-subscriptions.ts +14 -14
  198. package/src/resources/webhooks.ts +82 -0
  199. package/src/version.ts +1 -1
  200. package/version.d.mts +1 -1
  201. package/version.d.ts +1 -1
  202. package/version.js +1 -1
  203. package/version.mjs +1 -1
@@ -0,0 +1,196 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as Shared from '../shared';
5
+ import { APIPromise } from '../../core/api-promise';
6
+ import { RequestOptions } from '../../internal/request-options';
7
+ import { path } from '../../internal/utils/path';
8
+
9
+ /**
10
+ * Messages are individual communications within a chat thread.
11
+ *
12
+ * Messages can include text, media attachments, rich link previews, special effects
13
+ * (like confetti or fireworks), and reactions. All messages are associated with a
14
+ * specific chat and sent from a phone number you own.
15
+ *
16
+ * Messages support delivery status tracking, read receipts, and editing capabilities.
17
+ *
18
+ * ## Rich Link Previews
19
+ *
20
+ * Send a URL as a `link` part to deliver it with a rich preview card showing the
21
+ * page's title, description, and image (when available). A `link` part must be the
22
+ * **only** part in the message — it cannot be combined with text or media parts.
23
+ * To send a URL without a preview card, include it in a `text` part instead.
24
+ *
25
+ * **Limitations:**
26
+ * - A `link` part cannot be combined with other parts in the same message.
27
+ * - Maximum URL length: 2,048 characters.
28
+ *
29
+ * ## Ephemeral Messages (Privacy Tier)
30
+ *
31
+ * For regulated or sensitive conversations, opt in to the **ephemeral messages** tier by contacting your Linq support contact. When enabled, every message on the covered phone numbers is automatically given a fixed **24-hour retention window** — after that window the platform permanently deletes the message from Linq storage. There is no per-message flag; ephemerality is applied automatically based on your configuration.
32
+ *
33
+ * You can request it at two scopes:
34
+ *
35
+ * | Scope | Effect |
36
+ * |---|---|
37
+ * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for 24 hours, then deleted. |
38
+ * | **Per phone number** | Only the specified phone numbers have their messages auto-deleted. The rest follow the standard message-retention policy. |
39
+ *
40
+ * **Behavioral differences vs the standard default:**
41
+ *
42
+ * | Aspect | Standard | Ephemeral |
43
+ * |---|---|---|
44
+ * | Retention | Retained per the standard message-retention policy | **Hard backstop: 24 hours** from when the message is created |
45
+ * | After expiry | Message stays retrievable | Message is permanently deleted — `GET /v3/messages/{messageId}` returns `404` and it no longer appears in `GET /v3/chats/{chatId}/messages` |
46
+ * | Content on expiry | N/A | Text, formatting, and attachment references are scrubbed; the message is gone, not blanked out |
47
+ * | Cross-partner isolation | Enforced | Enforced |
48
+ *
49
+ * **How the 24-hour window works:**
50
+ *
51
+ * - The window is fixed at **24 hours from message creation** (`created_at`) and cannot be configured per message.
52
+ * - It mirrors the ephemeral *attachments* 1-day backstop, so a message and any media it carries expire together.
53
+ * - Expiry is delivery-independent — the clock starts when the message is created, not when it is delivered or read.
54
+ *
55
+ * **What you observe:**
56
+ *
57
+ * - **No expiry timestamp is exposed.** API responses and webhook payloads do not include the deletion time. If you need it, compute `created_at + 24h` yourself.
58
+ * - **No deletion webhook is sent.** There is no `message.deleted` event — a message simply stops being retrievable once its window passes.
59
+ * - **Delivery is unaffected.** Ephemeral messages send, deliver, and fire the usual `message.sent` / `message.received` and status webhooks exactly like standard messages. Only retention changes.
60
+ *
61
+ * **When to choose ephemeral:**
62
+ *
63
+ * - You have a compliance requirement that the platform must not retain message content beyond a short window.
64
+ * - The conversation is high-sensitivity (PHI, financial, identity verification) and you do not want it sitting in storage long-term.
65
+ * - Your application is the system of record — you capture what you need from the delivery webhook in real time and do not rely on reading message history back from Linq later.
66
+ *
67
+ * **Important:** ephemeral applies in *both directions* — messages you send **and** messages received by the phone numbers in that scope. Because Linq can no longer return the message after 24 hours, persist anything you need to keep from the webhook payload at the time it is delivered.
68
+ */
69
+ export class Polls extends APIResource {
70
+ /**
71
+ * Create an iMessage poll in an existing chat and send it. Polls are
72
+ * iMessage-only.
73
+ *
74
+ * The chat must already exist — **a poll cannot be the first message of a new
75
+ * chat** (use `POST /v3/chats` for that). Options are **add-only and immutable**:
76
+ * you can add options later via `POST /v3/messages/{messageId}/poll/options`, but
77
+ * never edit or remove them.
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * const pollEnvelope = await client.chats.polls.create(
82
+ * '550e8400-e29b-41d4-a716-446655440000',
83
+ * {
84
+ * poll: {
85
+ * options: [{ text: 'Tacos' }, { text: 'Sushi' }],
86
+ * idempotency_key: 'poll-abc123',
87
+ * },
88
+ * },
89
+ * );
90
+ * ```
91
+ */
92
+ create(chatID: string, body: PollCreateParams, options?: RequestOptions): APIPromise<PollEnvelope> {
93
+ return this._client.post(path`/v3/chats/${chatID}/polls`, { body, ...options });
94
+ }
95
+ }
96
+
97
+ /**
98
+ * Poll content — options and the aggregate voter count.
99
+ */
100
+ export interface Poll {
101
+ options: Array<Poll.Option>;
102
+
103
+ /**
104
+ * Distinct participants across the whole poll (a voter picking two options counts
105
+ * once).
106
+ */
107
+ total_voters: number;
108
+ }
109
+
110
+ export namespace Poll {
111
+ export interface Option {
112
+ can_be_edited: boolean;
113
+
114
+ /**
115
+ * The participant who added this option (poll creator for the initial options;
116
+ * whoever added later ones).
117
+ */
118
+ creator_handle: Shared.ChatHandle;
119
+
120
+ option_id: string;
121
+
122
+ text: string;
123
+
124
+ /**
125
+ * Participants who voted for this option (vote_count = voters.length).
126
+ */
127
+ voters: Array<Option.Voter>;
128
+ }
129
+
130
+ export namespace Option {
131
+ export interface Voter {
132
+ handle: string;
133
+
134
+ voted_at: string;
135
+ }
136
+ }
137
+ }
138
+
139
+ /**
140
+ * Message-level envelope returned by every poll endpoint.
141
+ */
142
+ export interface PollEnvelope {
143
+ chat_id: string;
144
+
145
+ created_at: string;
146
+
147
+ /**
148
+ * The poll-definition message's ID — reference this poll by it.
149
+ */
150
+ message_id: string;
151
+
152
+ /**
153
+ * Poll content — options and the aggregate voter count.
154
+ */
155
+ poll: Poll;
156
+
157
+ /**
158
+ * Tapbacks/stickers on the whole poll (message part 0).
159
+ */
160
+ reactions: Array<Shared.Reaction>;
161
+
162
+ updated_at: string;
163
+ }
164
+
165
+ export interface PollCreateParams {
166
+ /**
167
+ * Poll content to create. A poll needs at least two options. Options are add-only
168
+ * and immutable — there is no title/question (send that as a normal text message).
169
+ */
170
+ poll: PollCreateParams.Poll;
171
+ }
172
+
173
+ export namespace PollCreateParams {
174
+ /**
175
+ * Poll content to create. A poll needs at least two options. Options are add-only
176
+ * and immutable — there is no title/question (send that as a normal text message).
177
+ */
178
+ export interface Poll {
179
+ options: Array<Poll.Option>;
180
+
181
+ /**
182
+ * Optional key to deduplicate the poll creation.
183
+ */
184
+ idempotency_key?: string;
185
+ }
186
+
187
+ export namespace Poll {
188
+ export interface Option {
189
+ text: string;
190
+ }
191
+ }
192
+ }
193
+
194
+ export declare namespace Polls {
195
+ export { type Poll as Poll, type PollEnvelope as PollEnvelope, type PollCreateParams as PollCreateParams };
196
+ }
@@ -14,32 +14,16 @@ import { RequestOptions } from '../internal/request-options';
14
14
  * **Sharing behavior:** Sharing may not take effect in every chat due to limitations outside our control. We recommend calling the share endpoint once per day, after the first outbound activity.
15
15
  */
16
16
  export class ContactCard extends APIResource {
17
- /**
18
- * Returns the contact card for a specific phone number, or all contact cards for
19
- * the authenticated partner if no `phone_number` is provided.
20
- *
21
- * @example
22
- * ```ts
23
- * const contactCard = await client.contactCard.retrieve();
24
- * ```
25
- */
26
- retrieve(
27
- query: ContactCardRetrieveParams | null | undefined = {},
28
- options?: RequestOptions,
29
- ): APIPromise<ContactCardRetrieveResponse> {
30
- return this._client.get('/v3/contact_card', { query, ...options });
31
- }
32
-
33
17
  /**
34
18
  * Creates a contact card for a phone number. This endpoint is intended for
35
19
  * initial, one-time setup only.
36
20
  *
37
- * The contact card is stored in an inactive state first. Once it's applied
38
- * successfully, it is activated and `is_active` is returned as `true`. On failure,
39
- * `is_active` is `false`.
21
+ * If setup does not complete, the response is `500` (`2022`) — call this endpoint
22
+ * again.
40
23
  *
41
- * **Note:** To update an existing contact card after setup, use
42
- * `PATCH /v3/contact_card` instead.
24
+ * **Note:** once a card is active, this endpoint returns `409` (`2014`) so an
25
+ * existing card is never overwritten by accident. Use `PATCH /v3/contact_card` to
26
+ * change it.
43
27
  *
44
28
  * @example
45
29
  * ```ts
@@ -57,13 +41,30 @@ export class ContactCard extends APIResource {
57
41
  }
58
42
 
59
43
  /**
60
- * Partially updates an existing active contact card for a phone number.
44
+ * Returns the contact card for a specific phone number, or all contact cards for
45
+ * the authenticated partner if no `phone_number` is provided.
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const contactCard = await client.contactCard.retrieve();
50
+ * ```
51
+ */
52
+ retrieve(
53
+ query: ContactCardRetrieveParams | null | undefined = {},
54
+ options?: RequestOptions,
55
+ ): APIPromise<ContactCardRetrieveResponse> {
56
+ return this._client.get('/v3/contact_card', { query, ...options });
57
+ }
58
+
59
+ /**
60
+ * Partially updates the contact card for a phone number.
61
61
  *
62
- * Fetches the current active contact card and merges the provided fields. Only
63
- * fields present in the request body are updated; omitted fields retain their
64
- * existing values.
62
+ * Fetches the current contact card and merges the provided fields. Only fields
63
+ * present in the request body are updated; omitted fields retain their existing
64
+ * values.
65
65
  *
66
- * Requires an active contact card to exist for the phone number.
66
+ * If the update does not complete, the response is `500` (`2022`) — call this
67
+ * endpoint again.
67
68
  *
68
69
  * @example
69
70
  * ```ts
@@ -127,14 +128,6 @@ export namespace ContactCardRetrieveResponse {
127
128
  }
128
129
  }
129
130
 
130
- export interface ContactCardRetrieveParams {
131
- /**
132
- * E.164 phone number to filter by. If omitted, all my cards for the partner are
133
- * returned.
134
- */
135
- phone_number?: string;
136
- }
137
-
138
131
  export interface ContactCardCreateParams {
139
132
  /**
140
133
  * First name for the contact card. Required.
@@ -157,6 +150,14 @@ export interface ContactCardCreateParams {
157
150
  last_name?: string;
158
151
  }
159
152
 
153
+ export interface ContactCardRetrieveParams {
154
+ /**
155
+ * E.164 phone number to filter by. If omitted, all my cards for the partner are
156
+ * returned.
157
+ */
158
+ phone_number?: string;
159
+ }
160
+
160
161
  export interface ContactCardUpdateParams {
161
162
  /**
162
163
  * Query param: E.164 phone number of the contact card to update
@@ -183,8 +184,8 @@ export declare namespace ContactCard {
183
184
  export {
184
185
  type SetContactCard as SetContactCard,
185
186
  type ContactCardRetrieveResponse as ContactCardRetrieveResponse,
186
- type ContactCardRetrieveParams as ContactCardRetrieveParams,
187
187
  type ContactCardCreateParams as ContactCardCreateParams,
188
+ type ContactCardRetrieveParams as ContactCardRetrieveParams,
188
189
  type ContactCardUpdateParams as ContactCardUpdateParams,
189
190
  };
190
191
  }
@@ -0,0 +1,118 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+ import { path } from '../internal/utils/path';
7
+
8
+ /**
9
+ * Let an agent pay on a customer's behalf with a single-use virtual card.
10
+ * Connect a customer once, then create a payment — a virtual card is minted
11
+ * scoped to that purchase and the card details are handed back for checkout.
12
+ */
13
+ export class Experiences extends APIResource {
14
+ /**
15
+ * Get one experience
16
+ */
17
+ retrieve(experience: string, options?: RequestOptions): APIPromise<ExperienceRetrieveResponse> {
18
+ return this._client.get(path`/v3/experiences/${experience}`, options);
19
+ }
20
+
21
+ /**
22
+ * The experiences enabled for your account, with the actions you may invoke on
23
+ * each and the fields each action accepts. This is the authoritative list — an
24
+ * action missing here cannot be sent.
25
+ */
26
+ list(options?: RequestOptions): APIPromise<ExperienceListResponse> {
27
+ return this._client.get('/v3/experiences', options);
28
+ }
29
+ }
30
+
31
+ /**
32
+ * What an experience offers you. Deliberately a projection: where its templates
33
+ * live and how they are built is not yours to depend on, so it is not here.
34
+ */
35
+ export interface ExperienceRetrieveResponse {
36
+ actions?: Array<ExperienceRetrieveResponse.Action>;
37
+
38
+ display_name?: string;
39
+
40
+ experience?: string;
41
+ }
42
+
43
+ export namespace ExperienceRetrieveResponse {
44
+ export interface Action {
45
+ /**
46
+ * Fields you may send in `params`, keyed by the exact name to use.
47
+ */
48
+ fields?: { [key: string]: Action.Fields };
49
+
50
+ name?: string;
51
+
52
+ summary?: string;
53
+ }
54
+
55
+ export namespace Action {
56
+ export interface Fields {
57
+ /**
58
+ * Maximum length, for strings.
59
+ */
60
+ max?: number;
61
+
62
+ required?: boolean;
63
+
64
+ type?: 'string' | 'cents' | 'int' | 'url';
65
+ }
66
+ }
67
+ }
68
+
69
+ export interface ExperienceListResponse {
70
+ experiences?: Array<ExperienceListResponse.Experience>;
71
+ }
72
+
73
+ export namespace ExperienceListResponse {
74
+ /**
75
+ * What an experience offers you. Deliberately a projection: where its templates
76
+ * live and how they are built is not yours to depend on, so it is not here.
77
+ */
78
+ export interface Experience {
79
+ actions?: Array<Experience.Action>;
80
+
81
+ display_name?: string;
82
+
83
+ experience?: string;
84
+ }
85
+
86
+ export namespace Experience {
87
+ export interface Action {
88
+ /**
89
+ * Fields you may send in `params`, keyed by the exact name to use.
90
+ */
91
+ fields?: { [key: string]: Action.Fields };
92
+
93
+ name?: string;
94
+
95
+ summary?: string;
96
+ }
97
+
98
+ export namespace Action {
99
+ export interface Fields {
100
+ /**
101
+ * Maximum length, for strings.
102
+ */
103
+ max?: number;
104
+
105
+ required?: boolean;
106
+
107
+ type?: 'string' | 'cents' | 'int' | 'url';
108
+ }
109
+ }
110
+ }
111
+ }
112
+
113
+ export declare namespace Experiences {
114
+ export {
115
+ type ExperienceRetrieveResponse as ExperienceRetrieveResponse,
116
+ type ExperienceListResponse as ExperienceListResponse,
117
+ };
118
+ }
@@ -32,8 +32,8 @@ export {
32
32
  type ChatLeaveChatResponse,
33
33
  type ChatSendVoicememoResponse,
34
34
  type ChatCreateParams,
35
- type ChatListChatsParams,
36
35
  type ChatUpdateParams,
36
+ type ChatListChatsParams,
37
37
  type ChatSendVoicememoParams,
38
38
  type ChatsListChatsPagination,
39
39
  } from './chats/chats';
@@ -41,10 +41,11 @@ export {
41
41
  ContactCard,
42
42
  type SetContactCard,
43
43
  type ContactCardRetrieveResponse,
44
- type ContactCardRetrieveParams,
45
44
  type ContactCardCreateParams,
45
+ type ContactCardRetrieveParams,
46
46
  type ContactCardUpdateParams,
47
47
  } from './contact-card';
48
+ export { Experiences, type ExperienceRetrieveResponse, type ExperienceListResponse } from './experiences';
48
49
  export {
49
50
  Messages,
50
51
  type Message,
@@ -54,12 +55,23 @@ export {
54
55
  type MessageAddReactionResponse,
55
56
  type MessageUpdateAppCardResponse,
56
57
  type MessageCreateParams,
57
- type MessageListMessagesThreadParams,
58
- type MessageAddReactionParams,
59
58
  type MessageUpdateParams,
59
+ type MessageAddReactionParams,
60
+ type MessageListMessagesThreadParams,
60
61
  type MessageUpdateAppCardParams,
61
62
  type MessagesListMessagesPagination,
62
- } from './messages';
63
+ } from './messages/messages';
64
+ export {
65
+ PaymentHandles,
66
+ type PaymentHandleConnection,
67
+ type PaymentHandleVerifyParams,
68
+ } from './payment-handles';
69
+ export {
70
+ PaymentProviders,
71
+ type PaymentProvider,
72
+ type PaymentProviderConnectResponse,
73
+ type PaymentProviderConnectParams,
74
+ } from './payment-providers';
63
75
  export {
64
76
  PaymentRequests,
65
77
  type PaymentRequest,
@@ -67,6 +79,12 @@ export {
67
79
  type PaymentRequestCreateParams,
68
80
  type PaymentRequestListParams,
69
81
  } from './payment-requests';
82
+ export {
83
+ Payments,
84
+ type Payment,
85
+ type PaymentCredentialsResponse,
86
+ type PaymentCreateParams,
87
+ } from './payments';
70
88
  export {
71
89
  PhoneNumbers,
72
90
  type PhoneNumberUpdateResponse,
@@ -0,0 +1,18 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export {
4
+ Messages,
5
+ type Message,
6
+ type MessageEffect,
7
+ type ReplyTo,
8
+ type MessageCreateResponse,
9
+ type MessageAddReactionResponse,
10
+ type MessageUpdateAppCardResponse,
11
+ type MessageCreateParams,
12
+ type MessageUpdateParams,
13
+ type MessageAddReactionParams,
14
+ type MessageListMessagesThreadParams,
15
+ type MessageUpdateAppCardParams,
16
+ type MessagesListMessagesPagination,
17
+ } from './messages';
18
+ export { Poll, type PollAddOptionsParams, type PollVoteParams } from './poll';