@surgeapi/node 0.34.0 → 0.36.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 +48 -0
- package/README.md +31 -0
- package/client.d.mts +18 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +18 -8
- package/client.d.ts.map +1 -1
- package/client.js +21 -2
- package/client.js.map +1 -1
- package/client.mjs +24 -5
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +60 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +60 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +115 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +109 -0
- package/core/pagination.mjs.map +1 -0
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/package.json +11 -1
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/blasts.d.mts +4 -4
- package/resources/blasts.d.mts.map +1 -1
- package/resources/blasts.d.ts +4 -4
- package/resources/blasts.d.ts.map +1 -1
- package/resources/campaigns.d.mts +15 -0
- package/resources/campaigns.d.mts.map +1 -1
- package/resources/campaigns.d.ts +15 -0
- package/resources/campaigns.d.ts.map +1 -1
- package/resources/campaigns.js +13 -0
- package/resources/campaigns.js.map +1 -1
- package/resources/campaigns.mjs +13 -0
- package/resources/campaigns.mjs.map +1 -1
- package/resources/contacts.d.mts +19 -1
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +19 -1
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +20 -0
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +20 -0
- package/resources/contacts.mjs.map +1 -1
- package/resources/index.d.mts +5 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -3
- package/resources/index.mjs.map +1 -1
- package/resources/messages.d.mts +21 -3
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +21 -3
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +20 -0
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +20 -0
- package/resources/messages.mjs.map +1 -1
- package/resources/phone-numbers.d.mts +19 -1
- package/resources/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers.d.ts +19 -1
- package/resources/phone-numbers.d.ts.map +1 -1
- package/resources/phone-numbers.js +20 -0
- package/resources/phone-numbers.js.map +1 -1
- package/resources/phone-numbers.mjs +20 -0
- package/resources/phone-numbers.mjs.map +1 -1
- package/resources/recordings.d.mts +31 -0
- package/resources/recordings.d.mts.map +1 -0
- package/resources/recordings.d.ts +31 -0
- package/resources/recordings.d.ts.map +1 -0
- package/resources/recordings.js +24 -0
- package/resources/recordings.js.map +1 -0
- package/resources/recordings.mjs +20 -0
- package/resources/recordings.mjs.map +1 -0
- package/resources/webhooks.d.mts +138 -6
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +138 -6
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +80 -6
- package/src/core/pagination.ts +176 -0
- package/src/index.ts +1 -0
- package/src/internal/parse.ts +6 -0
- package/src/pagination.ts +2 -0
- package/src/resources/blasts.ts +4 -4
- package/src/resources/campaigns.ts +19 -0
- package/src/resources/contacts.ts +31 -0
- package/src/resources/index.ts +25 -3
- package/src/resources/messages.ts +37 -3
- package/src/resources/phone-numbers.ts +35 -1
- package/src/resources/recordings.ts +38 -0
- package/src/resources/webhooks.ts +184 -5
- 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
|
@@ -313,7 +313,7 @@ export namespace MessageDeliveredWebhookEvent {
|
|
|
313
313
|
/**
|
|
314
314
|
* The content of the message
|
|
315
315
|
*/
|
|
316
|
-
body: string;
|
|
316
|
+
body: string | null;
|
|
317
317
|
|
|
318
318
|
/**
|
|
319
319
|
* The conversation this message belongs to
|
|
@@ -412,7 +412,7 @@ export namespace MessageFailedWebhookEvent {
|
|
|
412
412
|
/**
|
|
413
413
|
* The content of the message
|
|
414
414
|
*/
|
|
415
|
-
body: string;
|
|
415
|
+
body: string | null;
|
|
416
416
|
|
|
417
417
|
/**
|
|
418
418
|
* The conversation this message belongs to
|
|
@@ -516,7 +516,7 @@ export namespace MessageReceivedWebhookEvent {
|
|
|
516
516
|
/**
|
|
517
517
|
* The content of the message
|
|
518
518
|
*/
|
|
519
|
-
body: string;
|
|
519
|
+
body: string | null;
|
|
520
520
|
|
|
521
521
|
/**
|
|
522
522
|
* The conversation this message belongs to
|
|
@@ -615,7 +615,7 @@ export namespace MessageSentWebhookEvent {
|
|
|
615
615
|
/**
|
|
616
616
|
* The content of the message
|
|
617
617
|
*/
|
|
618
|
-
body: string;
|
|
618
|
+
body: string | null;
|
|
619
619
|
|
|
620
620
|
/**
|
|
621
621
|
* The conversation this message belongs to
|
|
@@ -679,6 +679,181 @@ export namespace MessageSentWebhookEvent {
|
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
681
|
|
|
682
|
+
export interface RecordingCompletedWebhookEvent {
|
|
683
|
+
/**
|
|
684
|
+
* The ID of the account in which this event occurred
|
|
685
|
+
*/
|
|
686
|
+
account_id: string;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* The data associated with the event
|
|
690
|
+
*/
|
|
691
|
+
data: RecordingCompletedWebhookEvent.Data;
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* The timestamp when this event occurred, in ISO8601 format
|
|
695
|
+
*/
|
|
696
|
+
timestamp: string;
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* The type of the event. Always `recording.completed` for this event.
|
|
700
|
+
*/
|
|
701
|
+
type: 'recording.completed';
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
export namespace RecordingCompletedWebhookEvent {
|
|
705
|
+
/**
|
|
706
|
+
* The data associated with the event
|
|
707
|
+
*/
|
|
708
|
+
export interface Data {
|
|
709
|
+
/**
|
|
710
|
+
* The unique identifier for the recording
|
|
711
|
+
*/
|
|
712
|
+
id: string;
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* The call that produced this recording
|
|
716
|
+
*/
|
|
717
|
+
call: Data.Call;
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* The duration of the recording in seconds
|
|
721
|
+
*/
|
|
722
|
+
duration: number;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
export namespace Data {
|
|
726
|
+
/**
|
|
727
|
+
* The call that produced this recording
|
|
728
|
+
*/
|
|
729
|
+
export interface Call {
|
|
730
|
+
/**
|
|
731
|
+
* The unique identifier for the call
|
|
732
|
+
*/
|
|
733
|
+
id: string;
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* A contact who has consented to receive messages
|
|
737
|
+
*/
|
|
738
|
+
contact: ContactsAPI.Contact;
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* The duration of the call in seconds
|
|
742
|
+
*/
|
|
743
|
+
duration: number;
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* When the call was initiated
|
|
747
|
+
*/
|
|
748
|
+
initiated_at: string;
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* The status of the call
|
|
752
|
+
*/
|
|
753
|
+
status:
|
|
754
|
+
| 'busy'
|
|
755
|
+
| 'canceled'
|
|
756
|
+
| 'completed'
|
|
757
|
+
| 'failed'
|
|
758
|
+
| 'in_progress'
|
|
759
|
+
| 'missed'
|
|
760
|
+
| 'no_answer'
|
|
761
|
+
| 'queued'
|
|
762
|
+
| 'ringing';
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
export interface VoicemailReceivedWebhookEvent {
|
|
768
|
+
/**
|
|
769
|
+
* The ID of the account in which this event occurred
|
|
770
|
+
*/
|
|
771
|
+
account_id: string;
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* The data associated with the event
|
|
775
|
+
*/
|
|
776
|
+
data: VoicemailReceivedWebhookEvent.Data;
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* The timestamp when this event occurred, in ISO8601 format
|
|
780
|
+
*/
|
|
781
|
+
timestamp: string;
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* The type of the event. Always `voicemail.received` for this event.
|
|
785
|
+
*/
|
|
786
|
+
type: 'voicemail.received';
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
export namespace VoicemailReceivedWebhookEvent {
|
|
790
|
+
/**
|
|
791
|
+
* The data associated with the event
|
|
792
|
+
*/
|
|
793
|
+
export interface Data {
|
|
794
|
+
/**
|
|
795
|
+
* The unique identifier for the voicemail
|
|
796
|
+
*/
|
|
797
|
+
id: string;
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* The call that resulted in this voicemail
|
|
801
|
+
*/
|
|
802
|
+
call: Data.Call;
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* The duration of the voicemail in seconds
|
|
806
|
+
*/
|
|
807
|
+
duration: number;
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* The unique identifier for the recording
|
|
811
|
+
*/
|
|
812
|
+
recording_id: string;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
export namespace Data {
|
|
816
|
+
/**
|
|
817
|
+
* The call that resulted in this voicemail
|
|
818
|
+
*/
|
|
819
|
+
export interface Call {
|
|
820
|
+
/**
|
|
821
|
+
* The unique identifier for the call
|
|
822
|
+
*/
|
|
823
|
+
id: string;
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* A contact who has consented to receive messages
|
|
827
|
+
*/
|
|
828
|
+
contact: ContactsAPI.Contact;
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* The duration of the call in seconds
|
|
832
|
+
*/
|
|
833
|
+
duration: number;
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* When the call was initiated
|
|
837
|
+
*/
|
|
838
|
+
initiated_at: string;
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* The status of the call
|
|
842
|
+
*/
|
|
843
|
+
status:
|
|
844
|
+
| 'busy'
|
|
845
|
+
| 'canceled'
|
|
846
|
+
| 'completed'
|
|
847
|
+
| 'failed'
|
|
848
|
+
| 'in_progress'
|
|
849
|
+
| 'missed'
|
|
850
|
+
| 'no_answer'
|
|
851
|
+
| 'queued'
|
|
852
|
+
| 'ringing';
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
|
|
682
857
|
export type UnwrapWebhookEvent =
|
|
683
858
|
| CallEndedWebhookEvent
|
|
684
859
|
| CampaignApprovedWebhookEvent
|
|
@@ -689,7 +864,9 @@ export type UnwrapWebhookEvent =
|
|
|
689
864
|
| MessageDeliveredWebhookEvent
|
|
690
865
|
| MessageFailedWebhookEvent
|
|
691
866
|
| MessageReceivedWebhookEvent
|
|
692
|
-
| MessageSentWebhookEvent
|
|
867
|
+
| MessageSentWebhookEvent
|
|
868
|
+
| RecordingCompletedWebhookEvent
|
|
869
|
+
| VoicemailReceivedWebhookEvent;
|
|
693
870
|
|
|
694
871
|
export declare namespace Webhooks {
|
|
695
872
|
export {
|
|
@@ -703,6 +880,8 @@ export declare namespace Webhooks {
|
|
|
703
880
|
type MessageFailedWebhookEvent as MessageFailedWebhookEvent,
|
|
704
881
|
type MessageReceivedWebhookEvent as MessageReceivedWebhookEvent,
|
|
705
882
|
type MessageSentWebhookEvent as MessageSentWebhookEvent,
|
|
883
|
+
type RecordingCompletedWebhookEvent as RecordingCompletedWebhookEvent,
|
|
884
|
+
type VoicemailReceivedWebhookEvent as VoicemailReceivedWebhookEvent,
|
|
706
885
|
type UnwrapWebhookEvent as UnwrapWebhookEvent,
|
|
707
886
|
};
|
|
708
887
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.36.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.36.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.36.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.36.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|