@surgeapi/node 0.26.0 → 0.27.0
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 +31 -0
- package/client.d.mts +16 -16
- package/client.d.mts.map +1 -1
- package/client.d.ts +16 -16
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs +2 -2
- package/client.mjs.map +1 -1
- package/internal/to-file.d.mts +1 -1
- package/internal/to-file.d.ts +1 -1
- package/internal/to-file.js +1 -1
- package/internal/to-file.mjs +1 -1
- package/package.json +1 -1
- package/resources/accounts.d.mts +292 -191
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +292 -191
- package/resources/accounts.d.ts.map +1 -1
- package/resources/blasts.d.mts +11 -32
- package/resources/blasts.d.mts.map +1 -1
- package/resources/blasts.d.ts +11 -32
- package/resources/blasts.d.ts.map +1 -1
- package/resources/blasts.js.map +1 -1
- package/resources/blasts.mjs.map +1 -1
- package/resources/campaigns.d.mts +1 -103
- package/resources/campaigns.d.mts.map +1 -1
- package/resources/campaigns.d.ts +1 -103
- package/resources/campaigns.d.ts.map +1 -1
- package/resources/contacts.d.mts +1 -28
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +1 -28
- package/resources/contacts.d.ts.map +1 -1
- package/resources/index.d.mts +8 -8
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -8
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/messages.d.mts +49 -81
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +49 -81
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs.map +1 -1
- package/resources/phone-numbers.d.mts +0 -30
- package/resources/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers.d.ts +0 -30
- package/resources/phone-numbers.d.ts.map +1 -1
- package/resources/users.d.mts +1 -33
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +1 -33
- package/resources/users.d.ts.map +1 -1
- package/resources/verifications.d.mts +1 -19
- package/resources/verifications.d.mts.map +1 -1
- package/resources/verifications.d.ts +1 -19
- package/resources/verifications.d.ts.map +1 -1
- package/resources/webhooks.d.mts +60 -41
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +60 -41
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +12 -43
- package/src/internal/to-file.ts +1 -1
- package/src/resources/accounts.ts +475 -284
- package/src/resources/blasts.ts +11 -42
- package/src/resources/campaigns.ts +1 -127
- package/src/resources/contacts.ts +0 -31
- package/src/resources/index.ts +8 -23
- package/src/resources/messages.ts +54 -99
- package/src/resources/phone-numbers.ts +0 -34
- package/src/resources/users.ts +0 -37
- package/src/resources/verifications.ts +1 -22
- package/src/resources/webhooks.ts +72 -39
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/messages.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import * as MessagesAPI from "./messages.mjs";
|
|
3
2
|
import * as ContactsAPI from "./contacts.mjs";
|
|
4
3
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
5
4
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
@@ -45,15 +44,6 @@ export declare class Messages extends APIResource {
|
|
|
45
44
|
*/
|
|
46
45
|
create(accountID: string, body: MessageCreateParams, options?: RequestOptions): APIPromise<Message>;
|
|
47
46
|
}
|
|
48
|
-
/**
|
|
49
|
-
* Params for creating an attachment
|
|
50
|
-
*/
|
|
51
|
-
export interface AttachmentParams {
|
|
52
|
-
/**
|
|
53
|
-
* The URL of the attachment.
|
|
54
|
-
*/
|
|
55
|
-
url: string;
|
|
56
|
-
}
|
|
57
47
|
/**
|
|
58
48
|
* A Message is a communication sent to a Contact.
|
|
59
49
|
*/
|
|
@@ -127,24 +117,15 @@ export declare namespace Message {
|
|
|
127
117
|
}
|
|
128
118
|
}
|
|
129
119
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
* You can specify the recipient either using the 'conversation' parameter or the
|
|
133
|
-
* 'to'/'from' parameters, but not both.
|
|
134
|
-
*/
|
|
135
|
-
export type MessageParams = MessageParams.MessageParamsWithConversation | MessageParams.SimpleMessageParams;
|
|
136
|
-
export declare namespace MessageParams {
|
|
137
|
-
/**
|
|
138
|
-
* Create a message while including parameters for the conversation in which the
|
|
139
|
-
* message should be sent.
|
|
140
|
-
*/
|
|
120
|
+
export type MessageCreateParams = MessageCreateParams.MessageParamsWithConversation | MessageCreateParams.SimpleMessageParams;
|
|
121
|
+
export declare namespace MessageCreateParams {
|
|
141
122
|
interface MessageParamsWithConversation {
|
|
142
123
|
/**
|
|
143
124
|
* Params for selecting or creating a new conversation. Either the id or the
|
|
144
125
|
* Contact must be given.
|
|
145
126
|
*/
|
|
146
127
|
conversation: MessageParamsWithConversation.Conversation;
|
|
147
|
-
attachments?: Array<
|
|
128
|
+
attachments?: Array<MessageParamsWithConversation.Attachment>;
|
|
148
129
|
/**
|
|
149
130
|
* The message body.
|
|
150
131
|
*/
|
|
@@ -164,74 +145,50 @@ export declare namespace MessageParams {
|
|
|
164
145
|
/**
|
|
165
146
|
* Parameters for creating a contact
|
|
166
147
|
*/
|
|
167
|
-
contact:
|
|
148
|
+
contact: Conversation.Contact;
|
|
168
149
|
/**
|
|
169
150
|
* The phone number from which to send the message. This can be either the phone
|
|
170
151
|
* number in E.164 format or a Surge phone number id.
|
|
171
152
|
*/
|
|
172
153
|
phone_number?: string;
|
|
173
154
|
}
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Create a basic message by specifying just the to/from phone numbers.
|
|
177
|
-
*/
|
|
178
|
-
interface SimpleMessageParams {
|
|
179
|
-
/**
|
|
180
|
-
* The recipient's phone number in E.164 format. Cannot be used together with
|
|
181
|
-
* 'conversation'.
|
|
182
|
-
*/
|
|
183
|
-
to: string;
|
|
184
|
-
attachments?: Array<MessagesAPI.AttachmentParams>;
|
|
185
|
-
/**
|
|
186
|
-
* The message body.
|
|
187
|
-
*/
|
|
188
|
-
body?: string;
|
|
189
|
-
/**
|
|
190
|
-
* The sender's phone number in E.164 format or phone number ID. If omitted, uses
|
|
191
|
-
* the account's default phone number. Cannot be used together with 'conversation'.
|
|
192
|
-
*/
|
|
193
|
-
from?: string;
|
|
194
|
-
/**
|
|
195
|
-
* An optional datetime for scheduling message up to a couple of months in the
|
|
196
|
-
* future.
|
|
197
|
-
*/
|
|
198
|
-
send_at?: string;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
export type MessageCreateParams = MessageCreateParams.MessageParamsWithConversation | MessageCreateParams.SimpleMessageParams;
|
|
202
|
-
export declare namespace MessageCreateParams {
|
|
203
|
-
interface MessageParamsWithConversation {
|
|
204
|
-
/**
|
|
205
|
-
* Params for selecting or creating a new conversation. Either the id or the
|
|
206
|
-
* Contact must be given.
|
|
207
|
-
*/
|
|
208
|
-
conversation: MessageParamsWithConversation.Conversation;
|
|
209
|
-
attachments?: Array<AttachmentParams>;
|
|
210
|
-
/**
|
|
211
|
-
* The message body.
|
|
212
|
-
*/
|
|
213
|
-
body?: string;
|
|
214
|
-
/**
|
|
215
|
-
* An optional datetime for scheduling message up to a couple of months in the
|
|
216
|
-
* future.
|
|
217
|
-
*/
|
|
218
|
-
send_at?: string;
|
|
219
|
-
}
|
|
220
|
-
namespace MessageParamsWithConversation {
|
|
221
|
-
/**
|
|
222
|
-
* Params for selecting or creating a new conversation. Either the id or the
|
|
223
|
-
* Contact must be given.
|
|
224
|
-
*/
|
|
225
|
-
interface Conversation {
|
|
155
|
+
namespace Conversation {
|
|
226
156
|
/**
|
|
227
157
|
* Parameters for creating a contact
|
|
228
158
|
*/
|
|
229
|
-
|
|
159
|
+
interface Contact {
|
|
160
|
+
/**
|
|
161
|
+
* The contact's phone number in E.164 format.
|
|
162
|
+
*/
|
|
163
|
+
phone_number: string;
|
|
164
|
+
/**
|
|
165
|
+
* The contact's email address.
|
|
166
|
+
*/
|
|
167
|
+
email?: string;
|
|
168
|
+
/**
|
|
169
|
+
* The contact's first name.
|
|
170
|
+
*/
|
|
171
|
+
first_name?: string;
|
|
172
|
+
/**
|
|
173
|
+
* The contact's last name.
|
|
174
|
+
*/
|
|
175
|
+
last_name?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Set of key-value pairs that will be stored with the object.
|
|
178
|
+
*/
|
|
179
|
+
metadata?: {
|
|
180
|
+
[key: string]: string;
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Params for creating an attachment
|
|
186
|
+
*/
|
|
187
|
+
interface Attachment {
|
|
230
188
|
/**
|
|
231
|
-
* The
|
|
232
|
-
* number in E.164 format or a Surge phone number id.
|
|
189
|
+
* The URL of the attachment.
|
|
233
190
|
*/
|
|
234
|
-
|
|
191
|
+
url: string;
|
|
235
192
|
}
|
|
236
193
|
}
|
|
237
194
|
interface SimpleMessageParams {
|
|
@@ -240,7 +197,7 @@ export declare namespace MessageCreateParams {
|
|
|
240
197
|
* 'conversation'.
|
|
241
198
|
*/
|
|
242
199
|
to: string;
|
|
243
|
-
attachments?: Array<
|
|
200
|
+
attachments?: Array<SimpleMessageParams.Attachment>;
|
|
244
201
|
/**
|
|
245
202
|
* The message body.
|
|
246
203
|
*/
|
|
@@ -256,8 +213,19 @@ export declare namespace MessageCreateParams {
|
|
|
256
213
|
*/
|
|
257
214
|
send_at?: string;
|
|
258
215
|
}
|
|
216
|
+
namespace SimpleMessageParams {
|
|
217
|
+
/**
|
|
218
|
+
* Params for creating an attachment
|
|
219
|
+
*/
|
|
220
|
+
interface Attachment {
|
|
221
|
+
/**
|
|
222
|
+
* The URL of the attachment.
|
|
223
|
+
*/
|
|
224
|
+
url: string;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
259
227
|
}
|
|
260
228
|
export declare namespace Messages {
|
|
261
|
-
export { type
|
|
229
|
+
export { type Message as Message, type MessageCreateParams as MessageCreateParams };
|
|
262
230
|
}
|
|
263
231
|
//# sourceMappingURL=messages.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,
|
|
1
|
+
{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;CAGpG;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,WAAW,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAExC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC;CACrC;AAED,yBAAiB,OAAO,CAAC;IACvB;;OAEG;IACH,UAAiB,UAAU;QACzB;;WAEG;QACH,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;IAED;;OAEG;IACH,UAAiB,YAAY;QAC3B;;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gBACH,QAAQ,CAAC,EAAE;oBAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;iBAAE,CAAC;aACtC;SACF;QAED;;WAEG;QACH,UAAiB,UAAU;YACzB;;eAEG;YACH,GAAG,EAAE,MAAM,CAAC;SACb;KACF;IAED,UAAiB,mBAAmB;QAClC;;;WAGG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX,WAAW,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;QAEpD;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;;WAGG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;IAED,UAAiB,mBAAmB,CAAC;QACnC;;WAEG;QACH,UAAiB,UAAU;YACzB;;eAEG;YACH,GAAG,EAAE,MAAM,CAAC;SACb;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,OAAO,IAAI,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,CAAC;CACrF"}
|
package/resources/messages.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import * as MessagesAPI from "./messages.js";
|
|
3
2
|
import * as ContactsAPI from "./contacts.js";
|
|
4
3
|
import { APIPromise } from "../core/api-promise.js";
|
|
5
4
|
import { RequestOptions } from "../internal/request-options.js";
|
|
@@ -45,15 +44,6 @@ export declare class Messages extends APIResource {
|
|
|
45
44
|
*/
|
|
46
45
|
create(accountID: string, body: MessageCreateParams, options?: RequestOptions): APIPromise<Message>;
|
|
47
46
|
}
|
|
48
|
-
/**
|
|
49
|
-
* Params for creating an attachment
|
|
50
|
-
*/
|
|
51
|
-
export interface AttachmentParams {
|
|
52
|
-
/**
|
|
53
|
-
* The URL of the attachment.
|
|
54
|
-
*/
|
|
55
|
-
url: string;
|
|
56
|
-
}
|
|
57
47
|
/**
|
|
58
48
|
* A Message is a communication sent to a Contact.
|
|
59
49
|
*/
|
|
@@ -127,24 +117,15 @@ export declare namespace Message {
|
|
|
127
117
|
}
|
|
128
118
|
}
|
|
129
119
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
* You can specify the recipient either using the 'conversation' parameter or the
|
|
133
|
-
* 'to'/'from' parameters, but not both.
|
|
134
|
-
*/
|
|
135
|
-
export type MessageParams = MessageParams.MessageParamsWithConversation | MessageParams.SimpleMessageParams;
|
|
136
|
-
export declare namespace MessageParams {
|
|
137
|
-
/**
|
|
138
|
-
* Create a message while including parameters for the conversation in which the
|
|
139
|
-
* message should be sent.
|
|
140
|
-
*/
|
|
120
|
+
export type MessageCreateParams = MessageCreateParams.MessageParamsWithConversation | MessageCreateParams.SimpleMessageParams;
|
|
121
|
+
export declare namespace MessageCreateParams {
|
|
141
122
|
interface MessageParamsWithConversation {
|
|
142
123
|
/**
|
|
143
124
|
* Params for selecting or creating a new conversation. Either the id or the
|
|
144
125
|
* Contact must be given.
|
|
145
126
|
*/
|
|
146
127
|
conversation: MessageParamsWithConversation.Conversation;
|
|
147
|
-
attachments?: Array<
|
|
128
|
+
attachments?: Array<MessageParamsWithConversation.Attachment>;
|
|
148
129
|
/**
|
|
149
130
|
* The message body.
|
|
150
131
|
*/
|
|
@@ -164,74 +145,50 @@ export declare namespace MessageParams {
|
|
|
164
145
|
/**
|
|
165
146
|
* Parameters for creating a contact
|
|
166
147
|
*/
|
|
167
|
-
contact:
|
|
148
|
+
contact: Conversation.Contact;
|
|
168
149
|
/**
|
|
169
150
|
* The phone number from which to send the message. This can be either the phone
|
|
170
151
|
* number in E.164 format or a Surge phone number id.
|
|
171
152
|
*/
|
|
172
153
|
phone_number?: string;
|
|
173
154
|
}
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Create a basic message by specifying just the to/from phone numbers.
|
|
177
|
-
*/
|
|
178
|
-
interface SimpleMessageParams {
|
|
179
|
-
/**
|
|
180
|
-
* The recipient's phone number in E.164 format. Cannot be used together with
|
|
181
|
-
* 'conversation'.
|
|
182
|
-
*/
|
|
183
|
-
to: string;
|
|
184
|
-
attachments?: Array<MessagesAPI.AttachmentParams>;
|
|
185
|
-
/**
|
|
186
|
-
* The message body.
|
|
187
|
-
*/
|
|
188
|
-
body?: string;
|
|
189
|
-
/**
|
|
190
|
-
* The sender's phone number in E.164 format or phone number ID. If omitted, uses
|
|
191
|
-
* the account's default phone number. Cannot be used together with 'conversation'.
|
|
192
|
-
*/
|
|
193
|
-
from?: string;
|
|
194
|
-
/**
|
|
195
|
-
* An optional datetime for scheduling message up to a couple of months in the
|
|
196
|
-
* future.
|
|
197
|
-
*/
|
|
198
|
-
send_at?: string;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
export type MessageCreateParams = MessageCreateParams.MessageParamsWithConversation | MessageCreateParams.SimpleMessageParams;
|
|
202
|
-
export declare namespace MessageCreateParams {
|
|
203
|
-
interface MessageParamsWithConversation {
|
|
204
|
-
/**
|
|
205
|
-
* Params for selecting or creating a new conversation. Either the id or the
|
|
206
|
-
* Contact must be given.
|
|
207
|
-
*/
|
|
208
|
-
conversation: MessageParamsWithConversation.Conversation;
|
|
209
|
-
attachments?: Array<AttachmentParams>;
|
|
210
|
-
/**
|
|
211
|
-
* The message body.
|
|
212
|
-
*/
|
|
213
|
-
body?: string;
|
|
214
|
-
/**
|
|
215
|
-
* An optional datetime for scheduling message up to a couple of months in the
|
|
216
|
-
* future.
|
|
217
|
-
*/
|
|
218
|
-
send_at?: string;
|
|
219
|
-
}
|
|
220
|
-
namespace MessageParamsWithConversation {
|
|
221
|
-
/**
|
|
222
|
-
* Params for selecting or creating a new conversation. Either the id or the
|
|
223
|
-
* Contact must be given.
|
|
224
|
-
*/
|
|
225
|
-
interface Conversation {
|
|
155
|
+
namespace Conversation {
|
|
226
156
|
/**
|
|
227
157
|
* Parameters for creating a contact
|
|
228
158
|
*/
|
|
229
|
-
|
|
159
|
+
interface Contact {
|
|
160
|
+
/**
|
|
161
|
+
* The contact's phone number in E.164 format.
|
|
162
|
+
*/
|
|
163
|
+
phone_number: string;
|
|
164
|
+
/**
|
|
165
|
+
* The contact's email address.
|
|
166
|
+
*/
|
|
167
|
+
email?: string;
|
|
168
|
+
/**
|
|
169
|
+
* The contact's first name.
|
|
170
|
+
*/
|
|
171
|
+
first_name?: string;
|
|
172
|
+
/**
|
|
173
|
+
* The contact's last name.
|
|
174
|
+
*/
|
|
175
|
+
last_name?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Set of key-value pairs that will be stored with the object.
|
|
178
|
+
*/
|
|
179
|
+
metadata?: {
|
|
180
|
+
[key: string]: string;
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Params for creating an attachment
|
|
186
|
+
*/
|
|
187
|
+
interface Attachment {
|
|
230
188
|
/**
|
|
231
|
-
* The
|
|
232
|
-
* number in E.164 format or a Surge phone number id.
|
|
189
|
+
* The URL of the attachment.
|
|
233
190
|
*/
|
|
234
|
-
|
|
191
|
+
url: string;
|
|
235
192
|
}
|
|
236
193
|
}
|
|
237
194
|
interface SimpleMessageParams {
|
|
@@ -240,7 +197,7 @@ export declare namespace MessageCreateParams {
|
|
|
240
197
|
* 'conversation'.
|
|
241
198
|
*/
|
|
242
199
|
to: string;
|
|
243
|
-
attachments?: Array<
|
|
200
|
+
attachments?: Array<SimpleMessageParams.Attachment>;
|
|
244
201
|
/**
|
|
245
202
|
* The message body.
|
|
246
203
|
*/
|
|
@@ -256,8 +213,19 @@ export declare namespace MessageCreateParams {
|
|
|
256
213
|
*/
|
|
257
214
|
send_at?: string;
|
|
258
215
|
}
|
|
216
|
+
namespace SimpleMessageParams {
|
|
217
|
+
/**
|
|
218
|
+
* Params for creating an attachment
|
|
219
|
+
*/
|
|
220
|
+
interface Attachment {
|
|
221
|
+
/**
|
|
222
|
+
* The URL of the attachment.
|
|
223
|
+
*/
|
|
224
|
+
url: string;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
259
227
|
}
|
|
260
228
|
export declare namespace Messages {
|
|
261
|
-
export { type
|
|
229
|
+
export { type Message as Message, type MessageCreateParams as MessageCreateParams };
|
|
262
230
|
}
|
|
263
231
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;CAGpG;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,WAAW,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAExC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC;CACrC;AAED,yBAAiB,OAAO,CAAC;IACvB;;OAEG;IACH,UAAiB,UAAU;QACzB;;WAEG;QACH,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;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AC,EAAE,MAAM,CAAC;gBAEnB;;mBAEG;gBACH,QAAQ,CAAC,EAAE;oBAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;iBAAE,CAAC;aACtC;SACF;QAED;;WAEG;QACH,UAAiB,UAAU;YACzB;;eAEG;YACH,GAAG,EAAE,MAAM,CAAC;SACb;KACF;IAED,UAAiB,mBAAmB;QAClC;;;WAGG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX,WAAW,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;QAEpD;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;;WAGG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;IAED,UAAiB,mBAAmB,CAAC;QACnC;;WAEG;QACH,UAAiB,UAAU;YACzB;;eAEG;YACH,GAAG,EAAE,MAAM,CAAC;SACb;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,OAAO,IAAI,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,CAAC;CACrF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAA8C;AAE9C,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,MAAM,CAAC,SAAiB,EAAE,IAAyB,EAAE,OAAwB;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,SAAS,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;CACF;AA3CD,4BA2CC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,MAAM,CAAC,SAAiB,EAAE,IAAyB,EAAE,OAAwB;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,SAAS,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;CACF"}
|
|
@@ -32,36 +32,6 @@ export interface PhoneNumber {
|
|
|
32
32
|
*/
|
|
33
33
|
type: 'local' | 'toll_free';
|
|
34
34
|
}
|
|
35
|
-
/**
|
|
36
|
-
* Parameters for purchasing a new phone number. The system will automatically
|
|
37
|
-
* infer the type in certain cases:
|
|
38
|
-
*
|
|
39
|
-
* - If only area_code is provided, type is inferred from the area code
|
|
40
|
-
* - If only latitude/longitude are provided, type is inferred as 'local'
|
|
41
|
-
* - Otherwise, type must be explicitly specified
|
|
42
|
-
*/
|
|
43
|
-
export interface PhoneNumberPurchaseParams {
|
|
44
|
-
/**
|
|
45
|
-
* The desired area code for this phone number. If provided without type, the type
|
|
46
|
-
* will be inferred.
|
|
47
|
-
*/
|
|
48
|
-
area_code?: string;
|
|
49
|
-
/**
|
|
50
|
-
* Latitude to search for nearby phone numbers. Must be used with longitude. If
|
|
51
|
-
* provided without type, type will be inferred as 'local'.
|
|
52
|
-
*/
|
|
53
|
-
latitude?: number;
|
|
54
|
-
/**
|
|
55
|
-
* Longitude to search for nearby phone numbers. Must be used with latitude. If
|
|
56
|
-
* provided without type, type will be inferred as 'local'.
|
|
57
|
-
*/
|
|
58
|
-
longitude?: number;
|
|
59
|
-
/**
|
|
60
|
-
* Whether the phone number is local or toll-free. Can be omitted if area_code or
|
|
61
|
-
* latitude/longitude are provided.
|
|
62
|
-
*/
|
|
63
|
-
type?: 'local' | 'toll_free';
|
|
64
|
-
}
|
|
65
35
|
export interface PhoneNumberPurchaseParams {
|
|
66
36
|
/**
|
|
67
37
|
* The desired area code for this phone number. If provided without type, the type
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone-numbers.d.mts","sourceRoot":"","sources":["../src/resources/phone-numbers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,QAAQ,CACN,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,yBAAyB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC;CAG3B;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,OAAO,GAAG,WAAW,CAAC;CAC7B;AAED
|
|
1
|
+
{"version":3,"file":"phone-numbers.d.mts","sourceRoot":"","sources":["../src/resources/phone-numbers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,QAAQ,CACN,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,yBAAyB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC;CAG3B;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,OAAO,GAAG,WAAW,CAAC;CAC7B;AAED,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EAAE,KAAK,WAAW,IAAI,WAAW,EAAE,KAAK,yBAAyB,IAAI,yBAAyB,EAAE,CAAC;CACzG"}
|
|
@@ -32,36 +32,6 @@ export interface PhoneNumber {
|
|
|
32
32
|
*/
|
|
33
33
|
type: 'local' | 'toll_free';
|
|
34
34
|
}
|
|
35
|
-
/**
|
|
36
|
-
* Parameters for purchasing a new phone number. The system will automatically
|
|
37
|
-
* infer the type in certain cases:
|
|
38
|
-
*
|
|
39
|
-
* - If only area_code is provided, type is inferred from the area code
|
|
40
|
-
* - If only latitude/longitude are provided, type is inferred as 'local'
|
|
41
|
-
* - Otherwise, type must be explicitly specified
|
|
42
|
-
*/
|
|
43
|
-
export interface PhoneNumberPurchaseParams {
|
|
44
|
-
/**
|
|
45
|
-
* The desired area code for this phone number. If provided without type, the type
|
|
46
|
-
* will be inferred.
|
|
47
|
-
*/
|
|
48
|
-
area_code?: string;
|
|
49
|
-
/**
|
|
50
|
-
* Latitude to search for nearby phone numbers. Must be used with longitude. If
|
|
51
|
-
* provided without type, type will be inferred as 'local'.
|
|
52
|
-
*/
|
|
53
|
-
latitude?: number;
|
|
54
|
-
/**
|
|
55
|
-
* Longitude to search for nearby phone numbers. Must be used with latitude. If
|
|
56
|
-
* provided without type, type will be inferred as 'local'.
|
|
57
|
-
*/
|
|
58
|
-
longitude?: number;
|
|
59
|
-
/**
|
|
60
|
-
* Whether the phone number is local or toll-free. Can be omitted if area_code or
|
|
61
|
-
* latitude/longitude are provided.
|
|
62
|
-
*/
|
|
63
|
-
type?: 'local' | 'toll_free';
|
|
64
|
-
}
|
|
65
35
|
export interface PhoneNumberPurchaseParams {
|
|
66
36
|
/**
|
|
67
37
|
* The desired area code for this phone number. If provided without type, the type
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone-numbers.d.ts","sourceRoot":"","sources":["../src/resources/phone-numbers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,QAAQ,CACN,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,yBAAyB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC;CAG3B;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,OAAO,GAAG,WAAW,CAAC;CAC7B;AAED
|
|
1
|
+
{"version":3,"file":"phone-numbers.d.ts","sourceRoot":"","sources":["../src/resources/phone-numbers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,QAAQ,CACN,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,yBAAyB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC;CAG3B;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,OAAO,GAAG,WAAW,CAAC;CAC7B;AAED,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EAAE,KAAK,WAAW,IAAI,WAAW,EAAE,KAAK,yBAAyB,IAAI,yBAAyB,EAAE,CAAC;CACzG"}
|
package/resources/users.d.mts
CHANGED
|
@@ -77,38 +77,6 @@ export interface User {
|
|
|
77
77
|
*/
|
|
78
78
|
photo_url?: string;
|
|
79
79
|
}
|
|
80
|
-
/**
|
|
81
|
-
* POST body for creating a user
|
|
82
|
-
*/
|
|
83
|
-
export interface UserParams {
|
|
84
|
-
/**
|
|
85
|
-
* The user's first name.
|
|
86
|
-
*/
|
|
87
|
-
first_name: string;
|
|
88
|
-
/**
|
|
89
|
-
* The user's last name.
|
|
90
|
-
*/
|
|
91
|
-
last_name?: string;
|
|
92
|
-
/**
|
|
93
|
-
* Set of key-value pairs that will be stored with the object.
|
|
94
|
-
*/
|
|
95
|
-
metadata?: {
|
|
96
|
-
[key: string]: string;
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* URL of a photo to be used as the user's avatar.
|
|
100
|
-
*/
|
|
101
|
-
photo_url?: string;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* A request to create a token
|
|
105
|
-
*/
|
|
106
|
-
export interface UserTokenParams {
|
|
107
|
-
/**
|
|
108
|
-
* For how many seconds the token should be accepted. Defaults to 15 minutes.
|
|
109
|
-
*/
|
|
110
|
-
duration_seconds?: number;
|
|
111
|
-
}
|
|
112
80
|
/**
|
|
113
81
|
* Response when token has been created successfully
|
|
114
82
|
*/
|
|
@@ -165,6 +133,6 @@ export interface UserCreateTokenParams {
|
|
|
165
133
|
duration_seconds?: number;
|
|
166
134
|
}
|
|
167
135
|
export declare namespace Users {
|
|
168
|
-
export { type User as User, type
|
|
136
|
+
export { type User as User, type UserTokenResponse as UserTokenResponse, type UserCreateParams as UserCreateParams, type UserUpdateParams as UserUpdateParams, type UserCreateTokenParams as UserCreateTokenParams, };
|
|
169
137
|
}
|
|
170
138
|
//# sourceMappingURL=users.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.mts","sourceRoot":"","sources":["../src/resources/users.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAI7F;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAIhE;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAItF;;;;;;;;;;OAUG;IACH,WAAW,CACT,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE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77,38 +77,6 @@ export interface User {
|
|
|
77
77
|
*/
|
|
78
78
|
photo_url?: string;
|
|
79
79
|
}
|
|
80
|
-
/**
|
|
81
|
-
* POST body for creating a user
|
|
82
|
-
*/
|
|
83
|
-
export interface UserParams {
|
|
84
|
-
/**
|
|
85
|
-
* The user's first name.
|
|
86
|
-
*/
|
|
87
|
-
first_name: string;
|
|
88
|
-
/**
|
|
89
|
-
* The user's last name.
|
|
90
|
-
*/
|
|
91
|
-
last_name?: string;
|
|
92
|
-
/**
|
|
93
|
-
* Set of key-value pairs that will be stored with the object.
|
|
94
|
-
*/
|
|
95
|
-
metadata?: {
|
|
96
|
-
[key: string]: string;
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* URL of a photo to be used as the user's avatar.
|
|
100
|
-
*/
|
|
101
|
-
photo_url?: string;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* A request to create a token
|
|
105
|
-
*/
|
|
106
|
-
export interface UserTokenParams {
|
|
107
|
-
/**
|
|
108
|
-
* For how many seconds the token should be accepted. Defaults to 15 minutes.
|
|
109
|
-
*/
|
|
110
|
-
duration_seconds?: number;
|
|
111
|
-
}
|
|
112
80
|
/**
|
|
113
81
|
* Response when token has been created successfully
|
|
114
82
|
*/
|
|
@@ -165,6 +133,6 @@ export interface UserCreateTokenParams {
|
|
|
165
133
|
duration_seconds?: number;
|
|
166
134
|
}
|
|
167
135
|
export declare namespace Users {
|
|
168
|
-
export { type User as User, type
|
|
136
|
+
export { type User as User, type UserTokenResponse as UserTokenResponse, type UserCreateParams as UserCreateParams, type UserUpdateParams as UserUpdateParams, type UserCreateTokenParams as UserCreateTokenParams, };
|
|
169
137
|
}
|
|
170
138
|
//# sourceMappingURL=users.d.ts.map
|
package/resources/users.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../src/resources/users.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OAC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G;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAErC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,IAAI,IAAI,IAAI,EACjB,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -60,24 +60,6 @@ export interface VerificationCheck {
|
|
|
60
60
|
*/
|
|
61
61
|
verification?: Verification;
|
|
62
62
|
}
|
|
63
|
-
/**
|
|
64
|
-
* Parameters for checking a Verification code
|
|
65
|
-
*/
|
|
66
|
-
export interface VerificationCheckParams {
|
|
67
|
-
/**
|
|
68
|
-
* The Verification code that was received.
|
|
69
|
-
*/
|
|
70
|
-
code: string;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Parameters for creating a Verification
|
|
74
|
-
*/
|
|
75
|
-
export interface VerificationParams {
|
|
76
|
-
/**
|
|
77
|
-
* The phone number to be verified. In E.164 format.
|
|
78
|
-
*/
|
|
79
|
-
phone_number: string;
|
|
80
|
-
}
|
|
81
63
|
export interface VerificationCreateParams {
|
|
82
64
|
/**
|
|
83
65
|
* The phone number to be verified. In E.164 format.
|
|
@@ -91,6 +73,6 @@ export interface VerificationCheckParams {
|
|
|
91
73
|
code: string;
|
|
92
74
|
}
|
|
93
75
|
export declare namespace Verifications {
|
|
94
|
-
export { type Verification as Verification, type VerificationCheck as VerificationCheck, type
|
|
76
|
+
export { type Verification as Verification, type VerificationCheck as VerificationCheck, type VerificationCreateParams as VerificationCreateParams, type VerificationCheckParams as VerificationCheckParams, };
|
|
95
77
|
}
|
|
96
78
|
//# sourceMappingURL=verifications.d.mts.map
|