@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
|
@@ -20,10 +20,6 @@ export class Webhooks extends APIResource {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
/**
|
|
24
|
-
* The `call.ended` event is delivered whenever a call is completed between a Surge
|
|
25
|
-
* number you own and another phone number.
|
|
26
|
-
*/
|
|
27
23
|
export interface CallEndedWebhookEvent {
|
|
28
24
|
/**
|
|
29
25
|
* The ID of the account in which this event occurred
|
|
@@ -87,10 +83,6 @@ export namespace CallEndedWebhookEvent {
|
|
|
87
83
|
}
|
|
88
84
|
}
|
|
89
85
|
|
|
90
|
-
/**
|
|
91
|
-
* The `campaign.approved` event is delivered whenever a campaign is approved by
|
|
92
|
-
* all of the US carriers and able to start sending text messages.
|
|
93
|
-
*/
|
|
94
86
|
export interface CampaignApprovedWebhookEvent {
|
|
95
87
|
/**
|
|
96
88
|
* The ID of the account in which this event occurred
|
|
@@ -130,13 +122,74 @@ export namespace CampaignApprovedWebhookEvent {
|
|
|
130
122
|
}
|
|
131
123
|
}
|
|
132
124
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
125
|
+
export interface ContactOptedInWebhookEvent {
|
|
126
|
+
/**
|
|
127
|
+
* The ID of the account in which this event occurred
|
|
128
|
+
*/
|
|
129
|
+
account_id: string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The data associated with the event
|
|
133
|
+
*/
|
|
134
|
+
data: ContactOptedInWebhookEvent.Data;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The timestamp when this event occurred, in ISO8601 format
|
|
138
|
+
*/
|
|
139
|
+
timestamp: string;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The type of the event. Always `contact.opted_in` for this event.
|
|
143
|
+
*/
|
|
144
|
+
type: 'contact.opted_in';
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export namespace ContactOptedInWebhookEvent {
|
|
148
|
+
/**
|
|
149
|
+
* The data associated with the event
|
|
150
|
+
*/
|
|
151
|
+
export interface Data {
|
|
152
|
+
/**
|
|
153
|
+
* The unique identifier for the contact
|
|
154
|
+
*/
|
|
155
|
+
id: string;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface ContactOptedOutWebhookEvent {
|
|
160
|
+
/**
|
|
161
|
+
* The ID of the account in which this event occurred
|
|
162
|
+
*/
|
|
163
|
+
account_id: string;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* The data associated with the event
|
|
167
|
+
*/
|
|
168
|
+
data: ContactOptedOutWebhookEvent.Data;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* The timestamp when this event occurred, in ISO8601 format
|
|
172
|
+
*/
|
|
173
|
+
timestamp: string;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* The type of the event. Always `contact.opted_out` for this event.
|
|
177
|
+
*/
|
|
178
|
+
type: 'contact.opted_out';
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export namespace ContactOptedOutWebhookEvent {
|
|
182
|
+
/**
|
|
183
|
+
* The data associated with the event
|
|
184
|
+
*/
|
|
185
|
+
export interface Data {
|
|
186
|
+
/**
|
|
187
|
+
* The unique identifier for the contact
|
|
188
|
+
*/
|
|
189
|
+
id: string;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
140
193
|
export interface ConversationCreatedWebhookEvent {
|
|
141
194
|
/**
|
|
142
195
|
* The ID of the account in which this event occurred
|
|
@@ -181,14 +234,6 @@ export namespace ConversationCreatedWebhookEvent {
|
|
|
181
234
|
}
|
|
182
235
|
}
|
|
183
236
|
|
|
184
|
-
/**
|
|
185
|
-
* The `message.delivered` event is delivered whenever a message sent from a Surge
|
|
186
|
-
* number is successfully delivered to the recipient. When the message is sent from
|
|
187
|
-
* a short code or toll-free number, this means that the message arrived on the
|
|
188
|
-
* recipient's device. When sent from a local number, this means that the message
|
|
189
|
-
* was successfully handed off to the recipient's mobile carrier, but does not
|
|
190
|
-
* guarantee that it arrived on the recipient's device.
|
|
191
|
-
*/
|
|
192
237
|
export interface MessageDeliveredWebhookEvent {
|
|
193
238
|
/**
|
|
194
239
|
* The ID of the account in which this event occurred
|
|
@@ -282,10 +327,6 @@ export namespace MessageDeliveredWebhookEvent {
|
|
|
282
327
|
}
|
|
283
328
|
}
|
|
284
329
|
|
|
285
|
-
/**
|
|
286
|
-
* The `message.failed` event is delivered whenever a message sent from your Surge
|
|
287
|
-
* number fails to be delivered.
|
|
288
|
-
*/
|
|
289
330
|
export interface MessageFailedWebhookEvent {
|
|
290
331
|
/**
|
|
291
332
|
* The ID of the account in which this event occurred
|
|
@@ -384,10 +425,6 @@ export namespace MessageFailedWebhookEvent {
|
|
|
384
425
|
}
|
|
385
426
|
}
|
|
386
427
|
|
|
387
|
-
/**
|
|
388
|
-
* The `message.received` event is delivered whenever a message is received at a
|
|
389
|
-
* Surge number from a contact.
|
|
390
|
-
*/
|
|
391
428
|
export interface MessageReceivedWebhookEvent {
|
|
392
429
|
/**
|
|
393
430
|
* The ID of the account in which this event occurred
|
|
@@ -481,10 +518,6 @@ export namespace MessageReceivedWebhookEvent {
|
|
|
481
518
|
}
|
|
482
519
|
}
|
|
483
520
|
|
|
484
|
-
/**
|
|
485
|
-
* The `message.sent` event is delivered whenever a message is sent from a Surge
|
|
486
|
-
* number to a contact.
|
|
487
|
-
*/
|
|
488
521
|
export interface MessageSentWebhookEvent {
|
|
489
522
|
/**
|
|
490
523
|
* The ID of the account in which this event occurred
|
|
@@ -578,13 +611,11 @@ export namespace MessageSentWebhookEvent {
|
|
|
578
611
|
}
|
|
579
612
|
}
|
|
580
613
|
|
|
581
|
-
/**
|
|
582
|
-
* The `call.ended` event is delivered whenever a call is completed between a Surge
|
|
583
|
-
* number you own and another phone number.
|
|
584
|
-
*/
|
|
585
614
|
export type UnwrapWebhookEvent =
|
|
586
615
|
| CallEndedWebhookEvent
|
|
587
616
|
| CampaignApprovedWebhookEvent
|
|
617
|
+
| ContactOptedInWebhookEvent
|
|
618
|
+
| ContactOptedOutWebhookEvent
|
|
588
619
|
| ConversationCreatedWebhookEvent
|
|
589
620
|
| MessageDeliveredWebhookEvent
|
|
590
621
|
| MessageFailedWebhookEvent
|
|
@@ -595,6 +626,8 @@ export declare namespace Webhooks {
|
|
|
595
626
|
export {
|
|
596
627
|
type CallEndedWebhookEvent as CallEndedWebhookEvent,
|
|
597
628
|
type CampaignApprovedWebhookEvent as CampaignApprovedWebhookEvent,
|
|
629
|
+
type ContactOptedInWebhookEvent as ContactOptedInWebhookEvent,
|
|
630
|
+
type ContactOptedOutWebhookEvent as ContactOptedOutWebhookEvent,
|
|
598
631
|
type ConversationCreatedWebhookEvent as ConversationCreatedWebhookEvent,
|
|
599
632
|
type MessageDeliveredWebhookEvent as MessageDeliveredWebhookEvent,
|
|
600
633
|
type MessageFailedWebhookEvent as MessageFailedWebhookEvent,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.27.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.27.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.27.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.27.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|