@zernio/node 0.2.518 → 0.2.520

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/src/client.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import packageJson from '../package.json';
2
+ import { createClient, createConfig, type Client } from '@hey-api/client-fetch';
2
3
  import {
3
- client,
4
4
  activateSequence,
5
5
  activateWorkflow,
6
6
  addBroadcastRecipients,
@@ -596,6 +596,13 @@ export interface ClientOptions {
596
596
  export class Zernio {
597
597
  private _options: ClientOptions;
598
598
 
599
+ /**
600
+ * HTTP client owned by this instance. Every namespace method below is bound
601
+ * to it, so two Zernio instances in the same process never see each other's
602
+ * credentials.
603
+ */
604
+ private _client!: Client;
605
+
599
606
  /**
600
607
  * API key used for authentication.
601
608
  */
@@ -606,277 +613,293 @@ export class Zernio {
606
613
  */
607
614
  baseURL: string;
608
615
 
616
+ /**
617
+ * Routes a generated operation through this instance's client, preserving the
618
+ * operation's own signature. Reads `_client` when the method is called, not
619
+ * when it is bound, because class fields initialize before the constructor
620
+ * body runs.
621
+ */
622
+ private _bind<F>(operation: F): F {
623
+ return ((options?: Record<string, unknown>) => {
624
+ const withClient = { ...options };
625
+ if (withClient['client'] === undefined) {
626
+ withClient['client'] = this._client;
627
+ }
628
+ return (operation as (opts: unknown) => unknown)(withClient);
629
+ }) as F;
630
+ }
631
+
609
632
  /**
610
633
  * validate API
611
634
  */
612
635
  validate = {
613
- validatePostLength: validatePostLength,
614
- validatePost: validatePost,
615
- validateMedia: validateMedia,
616
- validateSubreddit: validateSubreddit,
636
+ validatePostLength: this._bind(validatePostLength),
637
+ validatePost: this._bind(validatePost),
638
+ validateMedia: this._bind(validateMedia),
639
+ validateSubreddit: this._bind(validateSubreddit),
617
640
  };
618
641
 
619
642
  /**
620
643
  * Analytics API - Get performance metrics
621
644
  */
622
645
  analytics = {
623
- getAnalytics: getAnalytics,
624
- getYouTubeChannelInsights: getYouTubeChannelInsights,
625
- getLinkedInOrgAggregateAnalytics: getLinkedInOrgAggregateAnalytics,
626
- getTikTokAccountInsights: getTikTokAccountInsights,
627
- getYouTubeDailyViews: getYouTubeDailyViews,
628
- getYouTubeVideoRetention: getYouTubeVideoRetention,
629
- getFacebookPageInsights: getFacebookPageInsights,
630
- getFacebookPostEarnings: getFacebookPostEarnings,
631
- getInstagramAccountInsights: getInstagramAccountInsights,
632
- getInstagramFollowerHistory: getInstagramFollowerHistory,
633
- getInstagramDemographics: getInstagramDemographics,
634
- getYouTubeDemographics: getYouTubeDemographics,
635
- getDailyMetrics: getDailyMetrics,
636
- getBestTimeToPost: getBestTimeToPost,
637
- getContentDecay: getContentDecay,
638
- getPostingFrequency: getPostingFrequency,
639
- getPostTimeline: getPostTimeline,
640
- getGoogleBusinessPerformance: getGoogleBusinessPerformance,
641
- getGoogleBusinessSearchKeywords: getGoogleBusinessSearchKeywords,
642
- syncExternalPosts: syncExternalPosts,
643
- getLinkedInAggregateAnalytics: getLinkedInAggregateAnalytics,
644
- getLinkedInPostAnalytics: getLinkedInPostAnalytics,
645
- getLinkedInPostReactions: getLinkedInPostReactions,
646
- getFacebookPostReactions: getFacebookPostReactions,
646
+ getAnalytics: this._bind(getAnalytics),
647
+ getYouTubeChannelInsights: this._bind(getYouTubeChannelInsights),
648
+ getLinkedInOrgAggregateAnalytics: this._bind(getLinkedInOrgAggregateAnalytics),
649
+ getTikTokAccountInsights: this._bind(getTikTokAccountInsights),
650
+ getYouTubeDailyViews: this._bind(getYouTubeDailyViews),
651
+ getYouTubeVideoRetention: this._bind(getYouTubeVideoRetention),
652
+ getFacebookPageInsights: this._bind(getFacebookPageInsights),
653
+ getFacebookPostEarnings: this._bind(getFacebookPostEarnings),
654
+ getInstagramAccountInsights: this._bind(getInstagramAccountInsights),
655
+ getInstagramFollowerHistory: this._bind(getInstagramFollowerHistory),
656
+ getInstagramDemographics: this._bind(getInstagramDemographics),
657
+ getYouTubeDemographics: this._bind(getYouTubeDemographics),
658
+ getDailyMetrics: this._bind(getDailyMetrics),
659
+ getBestTimeToPost: this._bind(getBestTimeToPost),
660
+ getContentDecay: this._bind(getContentDecay),
661
+ getPostingFrequency: this._bind(getPostingFrequency),
662
+ getPostTimeline: this._bind(getPostTimeline),
663
+ getGoogleBusinessPerformance: this._bind(getGoogleBusinessPerformance),
664
+ getGoogleBusinessSearchKeywords: this._bind(getGoogleBusinessSearchKeywords),
665
+ syncExternalPosts: this._bind(syncExternalPosts),
666
+ getLinkedInAggregateAnalytics: this._bind(getLinkedInAggregateAnalytics),
667
+ getLinkedInPostAnalytics: this._bind(getLinkedInPostAnalytics),
668
+ getLinkedInPostReactions: this._bind(getLinkedInPostReactions),
669
+ getFacebookPostReactions: this._bind(getFacebookPostReactions),
647
670
  };
648
671
 
649
672
  /**
650
673
  * inboxanalytics API
651
674
  */
652
675
  inboxanalytics = {
653
- getInboxVolume: getInboxVolume,
654
- getInboxHeatmap: getInboxHeatmap,
655
- getInboxSourceBreakdown: getInboxSourceBreakdown,
656
- getInboxResponseTime: getInboxResponseTime,
657
- getInboxTopAccounts: getInboxTopAccounts,
658
- listInboxConversationAnalytics: listInboxConversationAnalytics,
659
- getInboxConversationAnalytics: getInboxConversationAnalytics,
676
+ getInboxVolume: this._bind(getInboxVolume),
677
+ getInboxHeatmap: this._bind(getInboxHeatmap),
678
+ getInboxSourceBreakdown: this._bind(getInboxSourceBreakdown),
679
+ getInboxResponseTime: this._bind(getInboxResponseTime),
680
+ getInboxTopAccounts: this._bind(getInboxTopAccounts),
681
+ listInboxConversationAnalytics: this._bind(listInboxConversationAnalytics),
682
+ getInboxConversationAnalytics: this._bind(getInboxConversationAnalytics),
660
683
  };
661
684
 
662
685
  /**
663
686
  * Account Groups API - Organize accounts into groups
664
687
  */
665
688
  accountGroups = {
666
- listAccountGroups: listAccountGroups,
667
- createAccountGroup: createAccountGroup,
668
- updateAccountGroup: updateAccountGroup,
669
- deleteAccountGroup: deleteAccountGroup,
689
+ listAccountGroups: this._bind(listAccountGroups),
690
+ createAccountGroup: this._bind(createAccountGroup),
691
+ updateAccountGroup: this._bind(updateAccountGroup),
692
+ deleteAccountGroup: this._bind(deleteAccountGroup),
670
693
  };
671
694
 
672
695
  /**
673
696
  * Media API - Upload and manage media files
674
697
  */
675
698
  media = {
676
- getMediaPresignedUrl: getMediaPresignedUrl,
699
+ getMediaPresignedUrl: this._bind(getMediaPresignedUrl),
677
700
  };
678
701
 
679
702
  /**
680
703
  * Reddit API - Search and feed
681
704
  */
682
705
  reddit = {
683
- searchReddit: searchReddit,
684
- getRedditFeed: getRedditFeed,
706
+ searchReddit: this._bind(searchReddit),
707
+ getRedditFeed: this._bind(getRedditFeed),
685
708
  };
686
709
 
687
710
  /**
688
711
  * Usage API - Get usage statistics
689
712
  */
690
713
  usage = {
691
- getBilling: getBilling,
692
- getXApiPricing: getXApiPricing,
693
- getUsage: getUsage,
694
- getUsageStats: getUsageStats,
695
- getCallsUsage: getCallsUsage,
696
- getSmsUsage: getSmsUsage,
714
+ getBilling: this._bind(getBilling),
715
+ getXApiPricing: this._bind(getXApiPricing),
716
+ getUsage: this._bind(getUsage),
717
+ getUsageStats: this._bind(getUsageStats),
718
+ getCallsUsage: this._bind(getCallsUsage),
719
+ getSmsUsage: this._bind(getSmsUsage),
697
720
  };
698
721
 
699
722
  /**
700
723
  * Posts API - Create, schedule, and manage social media posts
701
724
  */
702
725
  posts = {
703
- listPosts: listPosts,
704
- createPost: createPost,
705
- getPost: getPost,
706
- updatePost: updatePost,
707
- deletePost: deletePost,
708
- bulkUploadPosts: bulkUploadPosts,
709
- retryPost: retryPost,
710
- unpublishPost: unpublishPost,
711
- editPost: editPost,
712
- updatePostMetadata: updatePostMetadata,
726
+ listPosts: this._bind(listPosts),
727
+ createPost: this._bind(createPost),
728
+ getPost: this._bind(getPost),
729
+ updatePost: this._bind(updatePost),
730
+ deletePost: this._bind(deletePost),
731
+ bulkUploadPosts: this._bind(bulkUploadPosts),
732
+ retryPost: this._bind(retryPost),
733
+ unpublishPost: this._bind(unpublishPost),
734
+ editPost: this._bind(editPost),
735
+ updatePostMetadata: this._bind(updatePostMetadata),
713
736
  };
714
737
 
715
738
  /**
716
739
  * Users API - User management
717
740
  */
718
741
  users = {
719
- listUsers: listUsers,
720
- getUser: getUser,
742
+ listUsers: this._bind(listUsers),
743
+ getUser: this._bind(getUser),
721
744
  };
722
745
 
723
746
  /**
724
747
  * Profiles API - Manage workspace profiles
725
748
  */
726
749
  profiles = {
727
- listProfiles: listProfiles,
728
- createProfile: createProfile,
729
- getProfile: getProfile,
730
- updateProfile: updateProfile,
731
- deleteProfile: deleteProfile,
750
+ listProfiles: this._bind(listProfiles),
751
+ createProfile: this._bind(createProfile),
752
+ getProfile: this._bind(getProfile),
753
+ updateProfile: this._bind(updateProfile),
754
+ deleteProfile: this._bind(deleteProfile),
732
755
  };
733
756
 
734
757
  /**
735
758
  * Accounts API - Manage connected social media accounts
736
759
  */
737
760
  accounts = {
738
- listAccounts: listAccounts,
739
- getFollowerStats: getFollowerStats,
740
- updateAccount: updateAccount,
741
- moveAccountToProfile: moveAccountToProfile,
742
- deleteAccount: deleteAccount,
743
- getAllAccountsHealth: getAllAccountsHealth,
744
- getAccountHealth: getAccountHealth,
745
- getInstagramFollowStatus: getInstagramFollowStatus,
746
- getTikTokCreatorInfo: getTikTokCreatorInfo,
747
- getGoogleBusinessReviews: getGoogleBusinessReviews,
748
- batchGetGoogleBusinessReviews: batchGetGoogleBusinessReviews,
749
- replyToGoogleBusinessReview: replyToGoogleBusinessReview,
750
- deleteGoogleBusinessReviewReply: deleteGoogleBusinessReviewReply,
751
- getLinkedInMentions: getLinkedInMentions,
752
- getSlackSettings: getSlackSettings,
753
- updateSlackSettings: updateSlackSettings,
761
+ listAccounts: this._bind(listAccounts),
762
+ getFollowerStats: this._bind(getFollowerStats),
763
+ updateAccount: this._bind(updateAccount),
764
+ moveAccountToProfile: this._bind(moveAccountToProfile),
765
+ deleteAccount: this._bind(deleteAccount),
766
+ getAllAccountsHealth: this._bind(getAllAccountsHealth),
767
+ getAccountHealth: this._bind(getAccountHealth),
768
+ getInstagramFollowStatus: this._bind(getInstagramFollowStatus),
769
+ getTikTokCreatorInfo: this._bind(getTikTokCreatorInfo),
770
+ getGoogleBusinessReviews: this._bind(getGoogleBusinessReviews),
771
+ batchGetGoogleBusinessReviews: this._bind(batchGetGoogleBusinessReviews),
772
+ replyToGoogleBusinessReview: this._bind(replyToGoogleBusinessReview),
773
+ deleteGoogleBusinessReviewReply: this._bind(deleteGoogleBusinessReviewReply),
774
+ getLinkedInMentions: this._bind(getLinkedInMentions),
775
+ getSlackSettings: this._bind(getSlackSettings),
776
+ updateSlackSettings: this._bind(updateSlackSettings),
754
777
  };
755
778
 
756
779
  /**
757
780
  * whatsapp API
758
781
  */
759
782
  whatsapp = {
760
- registerWhatsAppNumber: registerWhatsAppNumber,
761
- getWhatsAppMedia: getWhatsAppMedia,
762
- getWhatsAppTemplates: getWhatsAppTemplates,
763
- createWhatsAppTemplate: createWhatsAppTemplate,
764
- getWhatsAppTemplate: getWhatsAppTemplate,
765
- updateWhatsAppTemplate: updateWhatsAppTemplate,
766
- deleteWhatsAppTemplate: deleteWhatsAppTemplate,
767
- getWhatsAppBusinessProfile: getWhatsAppBusinessProfile,
768
- updateWhatsAppBusinessProfile: updateWhatsAppBusinessProfile,
769
- uploadWhatsAppProfilePhoto: uploadWhatsAppProfilePhoto,
770
- getWhatsAppDisplayName: getWhatsAppDisplayName,
771
- updateWhatsAppDisplayName: updateWhatsAppDisplayName,
772
- getWhatsappBusinessUsername: getWhatsappBusinessUsername,
773
- setWhatsappBusinessUsername: setWhatsappBusinessUsername,
774
- deleteWhatsappBusinessUsername: deleteWhatsappBusinessUsername,
775
- getWhatsappBusinessUsernameSuggestions: getWhatsappBusinessUsernameSuggestions,
776
- getWhatsAppBlockStatus: getWhatsAppBlockStatus,
777
- getWhatsAppBlockedUsers: getWhatsAppBlockedUsers,
778
- blockWhatsAppUsers: blockWhatsAppUsers,
779
- unblockWhatsAppUsers: unblockWhatsAppUsers,
780
- getWhatsAppDataset: getWhatsAppDataset,
781
- createWhatsAppDataset: createWhatsAppDataset,
782
- listWhatsAppGroupChats: listWhatsAppGroupChats,
783
- createWhatsAppGroupChat: createWhatsAppGroupChat,
784
- getWhatsAppGroupChat: getWhatsAppGroupChat,
785
- updateWhatsAppGroupChat: updateWhatsAppGroupChat,
786
- deleteWhatsAppGroupChat: deleteWhatsAppGroupChat,
787
- addWhatsAppGroupParticipants: addWhatsAppGroupParticipants,
788
- removeWhatsAppGroupParticipants: removeWhatsAppGroupParticipants,
789
- createWhatsAppGroupInviteLink: createWhatsAppGroupInviteLink,
790
- listWhatsAppGroupJoinRequests: listWhatsAppGroupJoinRequests,
791
- approveWhatsAppGroupJoinRequests: approveWhatsAppGroupJoinRequests,
792
- rejectWhatsAppGroupJoinRequests: rejectWhatsAppGroupJoinRequests,
793
- listWhatsAppConversions: listWhatsAppConversions,
794
- sendWhatsAppConversion: sendWhatsAppConversion,
783
+ registerWhatsAppNumber: this._bind(registerWhatsAppNumber),
784
+ getWhatsAppMedia: this._bind(getWhatsAppMedia),
785
+ getWhatsAppTemplates: this._bind(getWhatsAppTemplates),
786
+ createWhatsAppTemplate: this._bind(createWhatsAppTemplate),
787
+ getWhatsAppTemplate: this._bind(getWhatsAppTemplate),
788
+ updateWhatsAppTemplate: this._bind(updateWhatsAppTemplate),
789
+ deleteWhatsAppTemplate: this._bind(deleteWhatsAppTemplate),
790
+ getWhatsAppBusinessProfile: this._bind(getWhatsAppBusinessProfile),
791
+ updateWhatsAppBusinessProfile: this._bind(updateWhatsAppBusinessProfile),
792
+ uploadWhatsAppProfilePhoto: this._bind(uploadWhatsAppProfilePhoto),
793
+ getWhatsAppDisplayName: this._bind(getWhatsAppDisplayName),
794
+ updateWhatsAppDisplayName: this._bind(updateWhatsAppDisplayName),
795
+ getWhatsappBusinessUsername: this._bind(getWhatsappBusinessUsername),
796
+ setWhatsappBusinessUsername: this._bind(setWhatsappBusinessUsername),
797
+ deleteWhatsappBusinessUsername: this._bind(deleteWhatsappBusinessUsername),
798
+ getWhatsappBusinessUsernameSuggestions: this._bind(getWhatsappBusinessUsernameSuggestions),
799
+ getWhatsAppBlockStatus: this._bind(getWhatsAppBlockStatus),
800
+ getWhatsAppBlockedUsers: this._bind(getWhatsAppBlockedUsers),
801
+ blockWhatsAppUsers: this._bind(blockWhatsAppUsers),
802
+ unblockWhatsAppUsers: this._bind(unblockWhatsAppUsers),
803
+ getWhatsAppDataset: this._bind(getWhatsAppDataset),
804
+ createWhatsAppDataset: this._bind(createWhatsAppDataset),
805
+ listWhatsAppGroupChats: this._bind(listWhatsAppGroupChats),
806
+ createWhatsAppGroupChat: this._bind(createWhatsAppGroupChat),
807
+ getWhatsAppGroupChat: this._bind(getWhatsAppGroupChat),
808
+ updateWhatsAppGroupChat: this._bind(updateWhatsAppGroupChat),
809
+ deleteWhatsAppGroupChat: this._bind(deleteWhatsAppGroupChat),
810
+ addWhatsAppGroupParticipants: this._bind(addWhatsAppGroupParticipants),
811
+ removeWhatsAppGroupParticipants: this._bind(removeWhatsAppGroupParticipants),
812
+ createWhatsAppGroupInviteLink: this._bind(createWhatsAppGroupInviteLink),
813
+ listWhatsAppGroupJoinRequests: this._bind(listWhatsAppGroupJoinRequests),
814
+ approveWhatsAppGroupJoinRequests: this._bind(approveWhatsAppGroupJoinRequests),
815
+ rejectWhatsAppGroupJoinRequests: this._bind(rejectWhatsAppGroupJoinRequests),
816
+ listWhatsAppConversions: this._bind(listWhatsAppConversions),
817
+ sendWhatsAppConversion: this._bind(sendWhatsAppConversion),
795
818
  };
796
819
 
797
820
  /**
798
821
  * API Keys API - Manage API keys
799
822
  */
800
823
  apiKeys = {
801
- verifyCredential: verifyCredential,
802
- listApiKeys: listApiKeys,
803
- createApiKey: createApiKey,
804
- deleteApiKey: deleteApiKey,
824
+ verifyCredential: this._bind(verifyCredential),
825
+ listApiKeys: this._bind(listApiKeys),
826
+ createApiKey: this._bind(createApiKey),
827
+ deleteApiKey: this._bind(deleteApiKey),
805
828
  };
806
829
 
807
830
  /**
808
831
  * connectedapps API
809
832
  */
810
833
  connectedapps = {
811
- listConnectedApps: listConnectedApps,
812
- revokeConnectedApp: revokeConnectedApp,
834
+ listConnectedApps: this._bind(listConnectedApps),
835
+ revokeConnectedApp: this._bind(revokeConnectedApp),
813
836
  };
814
837
 
815
838
  /**
816
839
  * Invites API - Team invitations
817
840
  */
818
841
  invites = {
819
- createInviteToken: createInviteToken,
842
+ createInviteToken: this._bind(createInviteToken),
820
843
  };
821
844
 
822
845
  /**
823
846
  * Connect API - OAuth connection flows
824
847
  */
825
848
  connect = {
826
- getConnectUrl: getConnectUrl,
827
- handleOAuthCallback: handleOAuthCallback,
828
- connectAds: connectAds,
829
- configureTikTokAdsBrandIdentity: configureTikTokAdsBrandIdentity,
830
- getPendingOAuthData: getPendingOAuthData,
831
- connectOpenAIAdsCredentials: connectOpenAiAdsCredentials,
832
- connectWhatsAppCredentials: connectWhatsAppCredentials,
833
- listWhatsAppPhoneNumbers: listWhatsAppPhoneNumbers,
834
- completeWhatsAppPhoneSelection: completeWhatsAppPhoneSelection,
835
- getFacebookPages: getFacebookPages,
836
- updateFacebookPage: updateFacebookPage,
837
- getLinkedInOrganizations: getLinkedInOrganizations,
838
- updateLinkedInOrganization: updateLinkedInOrganization,
839
- getPinterestBoards: getPinterestBoards,
840
- updatePinterestBoards: updatePinterestBoards,
841
- createPinterestBoard: createPinterestBoard,
842
- getYoutubePlaylists: getYoutubePlaylists,
843
- updateYoutubeDefaultPlaylist: updateYoutubeDefaultPlaylist,
844
- getGmbLocations: getGmbLocations,
845
- updateGmbLocation: updateGmbLocation,
846
- assignGoogleBusinessLocation: assignGoogleBusinessLocation,
847
- getRedditSubreddits: getRedditSubreddits,
848
- updateRedditSubreddits: updateRedditSubreddits,
849
- getSubredditRules: getSubredditRules,
850
- voteRedditThing: voteRedditThing,
851
- getRedditFlairs: getRedditFlairs,
852
- setRedditPostFlair: setRedditPostFlair,
849
+ getConnectUrl: this._bind(getConnectUrl),
850
+ handleOAuthCallback: this._bind(handleOAuthCallback),
851
+ connectAds: this._bind(connectAds),
852
+ configureTikTokAdsBrandIdentity: this._bind(configureTikTokAdsBrandIdentity),
853
+ getPendingOAuthData: this._bind(getPendingOAuthData),
854
+ connectOpenAIAdsCredentials: this._bind(connectOpenAiAdsCredentials),
855
+ connectWhatsAppCredentials: this._bind(connectWhatsAppCredentials),
856
+ listWhatsAppPhoneNumbers: this._bind(listWhatsAppPhoneNumbers),
857
+ completeWhatsAppPhoneSelection: this._bind(completeWhatsAppPhoneSelection),
858
+ getFacebookPages: this._bind(getFacebookPages),
859
+ updateFacebookPage: this._bind(updateFacebookPage),
860
+ getLinkedInOrganizations: this._bind(getLinkedInOrganizations),
861
+ updateLinkedInOrganization: this._bind(updateLinkedInOrganization),
862
+ getPinterestBoards: this._bind(getPinterestBoards),
863
+ updatePinterestBoards: this._bind(updatePinterestBoards),
864
+ createPinterestBoard: this._bind(createPinterestBoard),
865
+ getYoutubePlaylists: this._bind(getYoutubePlaylists),
866
+ updateYoutubeDefaultPlaylist: this._bind(updateYoutubeDefaultPlaylist),
867
+ getGmbLocations: this._bind(getGmbLocations),
868
+ updateGmbLocation: this._bind(updateGmbLocation),
869
+ assignGoogleBusinessLocation: this._bind(assignGoogleBusinessLocation),
870
+ getRedditSubreddits: this._bind(getRedditSubreddits),
871
+ updateRedditSubreddits: this._bind(updateRedditSubreddits),
872
+ getSubredditRules: this._bind(getSubredditRules),
873
+ voteRedditThing: this._bind(voteRedditThing),
874
+ getRedditFlairs: this._bind(getRedditFlairs),
875
+ setRedditPostFlair: this._bind(setRedditPostFlair),
853
876
  facebook: {
854
- listFacebookPages: listFacebookPages,
855
- selectFacebookPage: selectFacebookPage,
877
+ listFacebookPages: this._bind(listFacebookPages),
878
+ selectFacebookPage: this._bind(selectFacebookPage),
856
879
  },
857
880
  googleBusiness: {
858
- listGoogleBusinessLocations: listGoogleBusinessLocations,
859
- selectGoogleBusinessLocation: selectGoogleBusinessLocation,
881
+ listGoogleBusinessLocations: this._bind(listGoogleBusinessLocations),
882
+ selectGoogleBusinessLocation: this._bind(selectGoogleBusinessLocation),
860
883
  },
861
884
  linkedin: {
862
- listLinkedInOrganizations: listLinkedInOrganizations,
863
- selectLinkedInOrganization: selectLinkedInOrganization,
885
+ listLinkedInOrganizations: this._bind(listLinkedInOrganizations),
886
+ selectLinkedInOrganization: this._bind(selectLinkedInOrganization),
864
887
  },
865
888
  pinterest: {
866
- listPinterestBoardsForSelection: listPinterestBoardsForSelection,
867
- selectPinterestBoard: selectPinterestBoard,
889
+ listPinterestBoardsForSelection: this._bind(listPinterestBoardsForSelection),
890
+ selectPinterestBoard: this._bind(selectPinterestBoard),
868
891
  },
869
892
  snapchat: {
870
- listSnapchatProfiles: listSnapchatProfiles,
871
- selectSnapchatProfile: selectSnapchatProfile,
893
+ listSnapchatProfiles: this._bind(listSnapchatProfiles),
894
+ selectSnapchatProfile: this._bind(selectSnapchatProfile),
872
895
  },
873
896
  bluesky: {
874
- connectBlueskyCredentials: connectBlueskyCredentials,
897
+ connectBlueskyCredentials: this._bind(connectBlueskyCredentials),
875
898
  },
876
899
  telegram: {
877
- getTelegramConnectStatus: getTelegramConnectStatus,
878
- initiateTelegramConnect: initiateTelegramConnect,
879
- completeTelegramConnect: completeTelegramConnect,
900
+ getTelegramConnectStatus: this._bind(getTelegramConnectStatus),
901
+ initiateTelegramConnect: this._bind(initiateTelegramConnect),
902
+ completeTelegramConnect: this._bind(completeTelegramConnect),
880
903
  },
881
904
  };
882
905
 
@@ -884,653 +907,653 @@ export class Zernio {
884
907
  * gmbverifications API
885
908
  */
886
909
  gmbverifications = {
887
- getGoogleBusinessVerifications: getGoogleBusinessVerifications,
888
- startGoogleBusinessVerification: startGoogleBusinessVerification,
889
- fetchGoogleBusinessVerificationOptions: fetchGoogleBusinessVerificationOptions,
890
- completeGoogleBusinessVerification: completeGoogleBusinessVerification,
910
+ getGoogleBusinessVerifications: this._bind(getGoogleBusinessVerifications),
911
+ startGoogleBusinessVerification: this._bind(startGoogleBusinessVerification),
912
+ fetchGoogleBusinessVerificationOptions: this._bind(fetchGoogleBusinessVerificationOptions),
913
+ completeGoogleBusinessVerification: this._bind(completeGoogleBusinessVerification),
891
914
  };
892
915
 
893
916
  /**
894
917
  * gmbfoodmenus API
895
918
  */
896
919
  gmbfoodmenus = {
897
- getGoogleBusinessFoodMenus: getGoogleBusinessFoodMenus,
898
- updateGoogleBusinessFoodMenus: updateGoogleBusinessFoodMenus,
920
+ getGoogleBusinessFoodMenus: this._bind(getGoogleBusinessFoodMenus),
921
+ updateGoogleBusinessFoodMenus: this._bind(updateGoogleBusinessFoodMenus),
899
922
  };
900
923
 
901
924
  /**
902
925
  * gmblocationdetails API
903
926
  */
904
927
  gmblocationdetails = {
905
- getGoogleBusinessLocationDetails: getGoogleBusinessLocationDetails,
906
- updateGoogleBusinessLocationDetails: updateGoogleBusinessLocationDetails,
928
+ getGoogleBusinessLocationDetails: this._bind(getGoogleBusinessLocationDetails),
929
+ updateGoogleBusinessLocationDetails: this._bind(updateGoogleBusinessLocationDetails),
907
930
  };
908
931
 
909
932
  /**
910
933
  * gmbmedia API
911
934
  */
912
935
  gmbmedia = {
913
- listGoogleBusinessMedia: listGoogleBusinessMedia,
914
- createGoogleBusinessMedia: createGoogleBusinessMedia,
915
- deleteGoogleBusinessMedia: deleteGoogleBusinessMedia,
936
+ listGoogleBusinessMedia: this._bind(listGoogleBusinessMedia),
937
+ createGoogleBusinessMedia: this._bind(createGoogleBusinessMedia),
938
+ deleteGoogleBusinessMedia: this._bind(deleteGoogleBusinessMedia),
916
939
  };
917
940
 
918
941
  /**
919
942
  * gmbattributes API
920
943
  */
921
944
  gmbattributes = {
922
- getGmbAttributeMetadata: getGmbAttributeMetadata,
923
- getGoogleBusinessAttributes: getGoogleBusinessAttributes,
924
- updateGoogleBusinessAttributes: updateGoogleBusinessAttributes,
945
+ getGmbAttributeMetadata: this._bind(getGmbAttributeMetadata),
946
+ getGoogleBusinessAttributes: this._bind(getGoogleBusinessAttributes),
947
+ updateGoogleBusinessAttributes: this._bind(updateGoogleBusinessAttributes),
925
948
  };
926
949
 
927
950
  /**
928
951
  * gmbplaceactions API
929
952
  */
930
953
  gmbplaceactions = {
931
- listGoogleBusinessPlaceActions: listGoogleBusinessPlaceActions,
932
- createGoogleBusinessPlaceAction: createGoogleBusinessPlaceAction,
933
- deleteGoogleBusinessPlaceAction: deleteGoogleBusinessPlaceAction,
934
- updateGoogleBusinessPlaceAction: updateGoogleBusinessPlaceAction,
954
+ listGoogleBusinessPlaceActions: this._bind(listGoogleBusinessPlaceActions),
955
+ createGoogleBusinessPlaceAction: this._bind(createGoogleBusinessPlaceAction),
956
+ deleteGoogleBusinessPlaceAction: this._bind(deleteGoogleBusinessPlaceAction),
957
+ updateGoogleBusinessPlaceAction: this._bind(updateGoogleBusinessPlaceAction),
935
958
  };
936
959
 
937
960
  /**
938
961
  * gmbservices API
939
962
  */
940
963
  gmbservices = {
941
- getGoogleBusinessServices: getGoogleBusinessServices,
942
- updateGoogleBusinessServices: updateGoogleBusinessServices,
964
+ getGoogleBusinessServices: this._bind(getGoogleBusinessServices),
965
+ updateGoogleBusinessServices: this._bind(updateGoogleBusinessServices),
943
966
  };
944
967
 
945
968
  /**
946
969
  * instagram API
947
970
  */
948
971
  instagram = {
949
- listInstagramStories: listInstagramStories,
950
- getInstagramPublishingLimit: getInstagramPublishingLimit,
951
- getInstagramStoryInsights: getInstagramStoryInsights,
972
+ listInstagramStories: this._bind(listInstagramStories),
973
+ getInstagramPublishingLimit: this._bind(getInstagramPublishingLimit),
974
+ getInstagramStoryInsights: this._bind(getInstagramStoryInsights),
952
975
  };
953
976
 
954
977
  /**
955
978
  * discord API
956
979
  */
957
980
  discord = {
958
- getDiscordSettings: getDiscordSettings,
959
- updateDiscordSettings: updateDiscordSettings,
960
- getDiscordChannels: getDiscordChannels,
961
- sendDiscordDirectMessage: sendDiscordDirectMessage,
962
- listDiscordGuildRoles: listDiscordGuildRoles,
963
- createDiscordGuildRole: createDiscordGuildRole,
964
- editDiscordGuildRole: editDiscordGuildRole,
965
- deleteDiscordGuildRole: deleteDiscordGuildRole,
966
- listDiscordGuildMembers: listDiscordGuildMembers,
967
- searchDiscordGuildMembers: searchDiscordGuildMembers,
968
- getDiscordGuildMember: getDiscordGuildMember,
969
- addDiscordMemberRole: addDiscordMemberRole,
970
- removeDiscordMemberRole: removeDiscordMemberRole,
971
- deleteDiscordMessage: deleteDiscordMessage,
972
- crosspostDiscordMessage: crosspostDiscordMessage,
973
- createDiscordThread: createDiscordThread,
974
- listDiscordPinnedMessages: listDiscordPinnedMessages,
975
- pinDiscordMessage: pinDiscordMessage,
976
- unpinDiscordMessage: unpinDiscordMessage,
977
- listDiscordScheduledEvents: listDiscordScheduledEvents,
978
- createDiscordScheduledEvent: createDiscordScheduledEvent,
979
- getDiscordScheduledEvent: getDiscordScheduledEvent,
980
- updateDiscordScheduledEvent: updateDiscordScheduledEvent,
981
- deleteDiscordScheduledEvent: deleteDiscordScheduledEvent,
981
+ getDiscordSettings: this._bind(getDiscordSettings),
982
+ updateDiscordSettings: this._bind(updateDiscordSettings),
983
+ getDiscordChannels: this._bind(getDiscordChannels),
984
+ sendDiscordDirectMessage: this._bind(sendDiscordDirectMessage),
985
+ listDiscordGuildRoles: this._bind(listDiscordGuildRoles),
986
+ createDiscordGuildRole: this._bind(createDiscordGuildRole),
987
+ editDiscordGuildRole: this._bind(editDiscordGuildRole),
988
+ deleteDiscordGuildRole: this._bind(deleteDiscordGuildRole),
989
+ listDiscordGuildMembers: this._bind(listDiscordGuildMembers),
990
+ searchDiscordGuildMembers: this._bind(searchDiscordGuildMembers),
991
+ getDiscordGuildMember: this._bind(getDiscordGuildMember),
992
+ addDiscordMemberRole: this._bind(addDiscordMemberRole),
993
+ removeDiscordMemberRole: this._bind(removeDiscordMemberRole),
994
+ deleteDiscordMessage: this._bind(deleteDiscordMessage),
995
+ crosspostDiscordMessage: this._bind(crosspostDiscordMessage),
996
+ createDiscordThread: this._bind(createDiscordThread),
997
+ listDiscordPinnedMessages: this._bind(listDiscordPinnedMessages),
998
+ pinDiscordMessage: this._bind(pinDiscordMessage),
999
+ unpinDiscordMessage: this._bind(unpinDiscordMessage),
1000
+ listDiscordScheduledEvents: this._bind(listDiscordScheduledEvents),
1001
+ createDiscordScheduledEvent: this._bind(createDiscordScheduledEvent),
1002
+ getDiscordScheduledEvent: this._bind(getDiscordScheduledEvent),
1003
+ updateDiscordScheduledEvent: this._bind(updateDiscordScheduledEvent),
1004
+ deleteDiscordScheduledEvent: this._bind(deleteDiscordScheduledEvent),
982
1005
  };
983
1006
 
984
1007
  /**
985
1008
  * slack API
986
1009
  */
987
1010
  slack = {
988
- listSlackMembers: listSlackMembers,
1011
+ listSlackMembers: this._bind(listSlackMembers),
989
1012
  };
990
1013
 
991
1014
  /**
992
1015
  * Queue API - Manage posting queue
993
1016
  */
994
1017
  queue = {
995
- listQueueSlots: listQueueSlots,
996
- createQueueSlot: createQueueSlot,
997
- updateQueueSlot: updateQueueSlot,
998
- deleteQueueSlot: deleteQueueSlot,
999
- previewQueue: previewQueue,
1000
- getNextQueueSlot: getNextQueueSlot,
1018
+ listQueueSlots: this._bind(listQueueSlots),
1019
+ createQueueSlot: this._bind(createQueueSlot),
1020
+ updateQueueSlot: this._bind(updateQueueSlot),
1021
+ deleteQueueSlot: this._bind(deleteQueueSlot),
1022
+ previewQueue: this._bind(previewQueue),
1023
+ getNextQueueSlot: this._bind(getNextQueueSlot),
1001
1024
  };
1002
1025
 
1003
1026
  /**
1004
1027
  * Webhooks API - Configure event webhooks
1005
1028
  */
1006
1029
  webhooks = {
1007
- getWebhookSettings: getWebhookSettings,
1008
- createWebhookSettings: createWebhookSettings,
1009
- updateWebhookSettings: updateWebhookSettings,
1010
- deleteWebhookSettings: deleteWebhookSettings,
1011
- getWebhookLogs: getWebhookLogs,
1012
- testWebhook: testWebhook,
1030
+ getWebhookSettings: this._bind(getWebhookSettings),
1031
+ createWebhookSettings: this._bind(createWebhookSettings),
1032
+ updateWebhookSettings: this._bind(updateWebhookSettings),
1033
+ deleteWebhookSettings: this._bind(deleteWebhookSettings),
1034
+ getWebhookLogs: this._bind(getWebhookLogs),
1035
+ testWebhook: this._bind(testWebhook),
1013
1036
  };
1014
1037
 
1015
1038
  /**
1016
1039
  * Logs API - Publishing logs
1017
1040
  */
1018
1041
  logs = {
1019
- listLogs: listLogs,
1042
+ listLogs: this._bind(listLogs),
1020
1043
  };
1021
1044
 
1022
1045
  /**
1023
1046
  * messages API
1024
1047
  */
1025
1048
  messages = {
1026
- listInboxConversations: listInboxConversations,
1027
- createInboxConversation: createInboxConversation,
1028
- searchInboxConversations: searchInboxConversations,
1029
- getInboxConversation: getInboxConversation,
1030
- updateInboxConversation: updateInboxConversation,
1031
- getInboxConversationMessages: getInboxConversationMessages,
1032
- sendInboxMessage: sendInboxMessage,
1033
- editInboxMessage: editInboxMessage,
1034
- deleteInboxMessage: deleteInboxMessage,
1035
- sendTypingIndicator: sendTypingIndicator,
1036
- markConversationRead: markConversationRead,
1037
- addMessageReaction: addMessageReaction,
1038
- removeMessageReaction: removeMessageReaction,
1039
- uploadMediaDirect: uploadMediaDirect,
1049
+ listInboxConversations: this._bind(listInboxConversations),
1050
+ createInboxConversation: this._bind(createInboxConversation),
1051
+ searchInboxConversations: this._bind(searchInboxConversations),
1052
+ getInboxConversation: this._bind(getInboxConversation),
1053
+ updateInboxConversation: this._bind(updateInboxConversation),
1054
+ getInboxConversationMessages: this._bind(getInboxConversationMessages),
1055
+ sendInboxMessage: this._bind(sendInboxMessage),
1056
+ editInboxMessage: this._bind(editInboxMessage),
1057
+ deleteInboxMessage: this._bind(deleteInboxMessage),
1058
+ sendTypingIndicator: this._bind(sendTypingIndicator),
1059
+ markConversationRead: this._bind(markConversationRead),
1060
+ addMessageReaction: this._bind(addMessageReaction),
1061
+ removeMessageReaction: this._bind(removeMessageReaction),
1062
+ uploadMediaDirect: this._bind(uploadMediaDirect),
1040
1063
  };
1041
1064
 
1042
1065
  /**
1043
1066
  * accountsettings API
1044
1067
  */
1045
1068
  accountsettings = {
1046
- getMessengerMenu: getMessengerMenu,
1047
- setMessengerMenu: setMessengerMenu,
1048
- deleteMessengerMenu: deleteMessengerMenu,
1049
- getInstagramIceBreakers: getInstagramIceBreakers,
1050
- setInstagramIceBreakers: setInstagramIceBreakers,
1051
- deleteInstagramIceBreakers: deleteInstagramIceBreakers,
1052
- getTelegramCommands: getTelegramCommands,
1053
- setTelegramCommands: setTelegramCommands,
1054
- deleteTelegramCommands: deleteTelegramCommands,
1069
+ getMessengerMenu: this._bind(getMessengerMenu),
1070
+ setMessengerMenu: this._bind(setMessengerMenu),
1071
+ deleteMessengerMenu: this._bind(deleteMessengerMenu),
1072
+ getInstagramIceBreakers: this._bind(getInstagramIceBreakers),
1073
+ setInstagramIceBreakers: this._bind(setInstagramIceBreakers),
1074
+ deleteInstagramIceBreakers: this._bind(deleteInstagramIceBreakers),
1075
+ getTelegramCommands: this._bind(getTelegramCommands),
1076
+ setTelegramCommands: this._bind(setTelegramCommands),
1077
+ deleteTelegramCommands: this._bind(deleteTelegramCommands),
1055
1078
  };
1056
1079
 
1057
1080
  /**
1058
1081
  * comments API
1059
1082
  */
1060
1083
  comments = {
1061
- listInboxComments: listInboxComments,
1062
- getInboxPostComments: getInboxPostComments,
1063
- replyToInboxPost: replyToInboxPost,
1064
- deleteInboxComment: deleteInboxComment,
1065
- editInboxComment: editInboxComment,
1066
- setCommentModeration: setCommentModeration,
1067
- hideInboxComment: hideInboxComment,
1068
- unhideInboxComment: unhideInboxComment,
1069
- likeInboxComment: likeInboxComment,
1070
- unlikeInboxComment: unlikeInboxComment,
1071
- sendPrivateReplyToComment: sendPrivateReplyToComment,
1084
+ listInboxComments: this._bind(listInboxComments),
1085
+ getInboxPostComments: this._bind(getInboxPostComments),
1086
+ replyToInboxPost: this._bind(replyToInboxPost),
1087
+ deleteInboxComment: this._bind(deleteInboxComment),
1088
+ editInboxComment: this._bind(editInboxComment),
1089
+ setCommentModeration: this._bind(setCommentModeration),
1090
+ hideInboxComment: this._bind(hideInboxComment),
1091
+ unhideInboxComment: this._bind(unhideInboxComment),
1092
+ likeInboxComment: this._bind(likeInboxComment),
1093
+ unlikeInboxComment: this._bind(unlikeInboxComment),
1094
+ sendPrivateReplyToComment: this._bind(sendPrivateReplyToComment),
1072
1095
  };
1073
1096
 
1074
1097
  /**
1075
1098
  * twitterengagement API
1076
1099
  */
1077
1100
  twitterengagement = {
1078
- retweetPost: retweetPost,
1079
- undoRetweet: undoRetweet,
1080
- bookmarkPost: bookmarkPost,
1081
- removeBookmark: removeBookmark,
1082
- followUser: followUser,
1083
- unfollowUser: unfollowUser,
1084
- searchTweets: searchTweets,
1085
- getTweet: getTweet,
1101
+ retweetPost: this._bind(retweetPost),
1102
+ undoRetweet: this._bind(undoRetweet),
1103
+ bookmarkPost: this._bind(bookmarkPost),
1104
+ removeBookmark: this._bind(removeBookmark),
1105
+ followUser: this._bind(followUser),
1106
+ unfollowUser: this._bind(unfollowUser),
1107
+ searchTweets: this._bind(searchTweets),
1108
+ getTweet: this._bind(getTweet),
1086
1109
  };
1087
1110
 
1088
1111
  /**
1089
1112
  * mentions API
1090
1113
  */
1091
1114
  mentions = {
1092
- listInboxMentions: listInboxMentions,
1093
- replyToMention: replyToMention,
1115
+ listInboxMentions: this._bind(listInboxMentions),
1116
+ replyToMention: this._bind(replyToMention),
1094
1117
  };
1095
1118
 
1096
1119
  /**
1097
1120
  * reviews API
1098
1121
  */
1099
1122
  reviews = {
1100
- listInboxReviews: listInboxReviews,
1101
- replyToInboxReview: replyToInboxReview,
1102
- deleteInboxReviewReply: deleteInboxReviewReply,
1123
+ listInboxReviews: this._bind(listInboxReviews),
1124
+ replyToInboxReview: this._bind(replyToInboxReview),
1125
+ deleteInboxReviewReply: this._bind(deleteInboxReviewReply),
1103
1126
  };
1104
1127
 
1105
1128
  /**
1106
1129
  * whatsappcalling API
1107
1130
  */
1108
1131
  whatsappcalling = {
1109
- getWhatsAppCallingConfig: getWhatsAppCallingConfig,
1110
- enableWhatsAppCallingLegacy: enableWhatsAppCallingLegacy,
1111
- updateWhatsAppCallingLegacy: updateWhatsAppCallingLegacy,
1112
- disableWhatsAppCallingLegacy: disableWhatsAppCallingLegacy,
1113
- getWhatsAppCallPermissions: getWhatsAppCallPermissions,
1114
- initiateWhatsAppCall: initiateWhatsAppCall,
1115
- listWhatsAppCalls: listWhatsAppCalls,
1116
- getWhatsAppCall: getWhatsAppCall,
1117
- getWhatsAppCallRecording: getWhatsAppCallRecording,
1118
- getWhatsAppCallEstimate: getWhatsAppCallEstimate,
1119
- getWhatsAppCalling: getWhatsAppCalling,
1120
- enableWhatsAppCalling: enableWhatsAppCalling,
1121
- updateWhatsAppCalling: updateWhatsAppCalling,
1122
- disableWhatsAppCalling: disableWhatsAppCalling,
1123
- startWhatsAppCallerIdVerification: startWhatsAppCallerIdVerification,
1124
- verifyWhatsAppCallerId: verifyWhatsAppCallerId,
1132
+ getWhatsAppCallingConfig: this._bind(getWhatsAppCallingConfig),
1133
+ enableWhatsAppCallingLegacy: this._bind(enableWhatsAppCallingLegacy),
1134
+ updateWhatsAppCallingLegacy: this._bind(updateWhatsAppCallingLegacy),
1135
+ disableWhatsAppCallingLegacy: this._bind(disableWhatsAppCallingLegacy),
1136
+ getWhatsAppCallPermissions: this._bind(getWhatsAppCallPermissions),
1137
+ initiateWhatsAppCall: this._bind(initiateWhatsAppCall),
1138
+ listWhatsAppCalls: this._bind(listWhatsAppCalls),
1139
+ getWhatsAppCall: this._bind(getWhatsAppCall),
1140
+ getWhatsAppCallRecording: this._bind(getWhatsAppCallRecording),
1141
+ getWhatsAppCallEstimate: this._bind(getWhatsAppCallEstimate),
1142
+ getWhatsAppCalling: this._bind(getWhatsAppCalling),
1143
+ enableWhatsAppCalling: this._bind(enableWhatsAppCalling),
1144
+ updateWhatsAppCalling: this._bind(updateWhatsAppCalling),
1145
+ disableWhatsAppCalling: this._bind(disableWhatsAppCalling),
1146
+ startWhatsAppCallerIdVerification: this._bind(startWhatsAppCallerIdVerification),
1147
+ verifyWhatsAppCallerId: this._bind(verifyWhatsAppCallerId),
1125
1148
  };
1126
1149
 
1127
1150
  /**
1128
1151
  * calls API
1129
1152
  */
1130
1153
  calls = {
1131
- listCalls: listCalls,
1132
- getCall: getCall,
1133
- getCallRecording: getCallRecording,
1154
+ listCalls: this._bind(listCalls),
1155
+ getCall: this._bind(getCall),
1156
+ getCallRecording: this._bind(getCallRecording),
1134
1157
  };
1135
1158
 
1136
1159
  /**
1137
1160
  * voice API
1138
1161
  */
1139
1162
  voice = {
1140
- createVoiceCall: createVoiceCall,
1141
- listVoiceCalls: listVoiceCalls,
1142
- getVoiceCall: getVoiceCall,
1143
- endVoiceCall: endVoiceCall,
1144
- getVoiceCallRecording: getVoiceCallRecording,
1145
- transferVoiceCall: transferVoiceCall,
1146
- getVoiceCallEstimate: getVoiceCallEstimate,
1147
- createVoiceWebSession: createVoiceWebSession,
1148
- dialVoiceWebCall: dialVoiceWebCall,
1149
- enableVoiceOnNumber: enableVoiceOnNumber,
1150
- disableVoiceOnNumber: disableVoiceOnNumber,
1163
+ createVoiceCall: this._bind(createVoiceCall),
1164
+ listVoiceCalls: this._bind(listVoiceCalls),
1165
+ getVoiceCall: this._bind(getVoiceCall),
1166
+ endVoiceCall: this._bind(endVoiceCall),
1167
+ getVoiceCallRecording: this._bind(getVoiceCallRecording),
1168
+ transferVoiceCall: this._bind(transferVoiceCall),
1169
+ getVoiceCallEstimate: this._bind(getVoiceCallEstimate),
1170
+ createVoiceWebSession: this._bind(createVoiceWebSession),
1171
+ dialVoiceWebCall: this._bind(dialVoiceWebCall),
1172
+ enableVoiceOnNumber: this._bind(enableVoiceOnNumber),
1173
+ disableVoiceOnNumber: this._bind(disableVoiceOnNumber),
1151
1174
  };
1152
1175
 
1153
1176
  /**
1154
1177
  * sms API
1155
1178
  */
1156
1179
  sms = {
1157
- sendSms: sendSms,
1158
- lookupSmsNumber: lookupSmsNumber,
1159
- listSmsOptOuts: listSmsOptOuts,
1160
- createSmsSenderId: createSmsSenderId,
1161
- listSmsSenderIds: listSmsSenderIds,
1162
- requestSmsSenderIdLimitIncrease: requestSmsSenderIdLimitIncrease,
1163
- deleteSmsSenderId: deleteSmsSenderId,
1164
- startSmsRegistration: startSmsRegistration,
1165
- listSmsRegistrations: listSmsRegistrations,
1166
- preflightSmsRegistration: preflightSmsRegistration,
1167
- deactivateSmsRegistration: deactivateSmsRegistration,
1168
- getSmsRegistration: getSmsRegistration,
1169
- verifySmsRegistrationOtp: verifySmsRegistrationOtp,
1170
- resendSmsRegistrationOtp: resendSmsRegistrationOtp,
1171
- appealSmsRegistration: appealSmsRegistration,
1172
- respondToSmsRegistrationReview: respondToSmsRegistrationReview,
1173
- uploadSmsOptInProofFile: uploadSmsOptInProofFile,
1174
- uploadSmsOptInProof: uploadSmsOptInProof,
1175
- shareSmsRegistration: shareSmsRegistration,
1176
- enableSmsOnNumber: enableSmsOnNumber,
1177
- disableSmsOnNumber: disableSmsOnNumber,
1178
- reuseSmsRegistrationForNumber: reuseSmsRegistrationForNumber,
1180
+ sendSms: this._bind(sendSms),
1181
+ lookupSmsNumber: this._bind(lookupSmsNumber),
1182
+ listSmsOptOuts: this._bind(listSmsOptOuts),
1183
+ createSmsSenderId: this._bind(createSmsSenderId),
1184
+ listSmsSenderIds: this._bind(listSmsSenderIds),
1185
+ requestSmsSenderIdLimitIncrease: this._bind(requestSmsSenderIdLimitIncrease),
1186
+ deleteSmsSenderId: this._bind(deleteSmsSenderId),
1187
+ startSmsRegistration: this._bind(startSmsRegistration),
1188
+ listSmsRegistrations: this._bind(listSmsRegistrations),
1189
+ preflightSmsRegistration: this._bind(preflightSmsRegistration),
1190
+ deactivateSmsRegistration: this._bind(deactivateSmsRegistration),
1191
+ getSmsRegistration: this._bind(getSmsRegistration),
1192
+ verifySmsRegistrationOtp: this._bind(verifySmsRegistrationOtp),
1193
+ resendSmsRegistrationOtp: this._bind(resendSmsRegistrationOtp),
1194
+ appealSmsRegistration: this._bind(appealSmsRegistration),
1195
+ respondToSmsRegistrationReview: this._bind(respondToSmsRegistrationReview),
1196
+ uploadSmsOptInProofFile: this._bind(uploadSmsOptInProofFile),
1197
+ uploadSmsOptInProof: this._bind(uploadSmsOptInProof),
1198
+ shareSmsRegistration: this._bind(shareSmsRegistration),
1199
+ enableSmsOnNumber: this._bind(enableSmsOnNumber),
1200
+ disableSmsOnNumber: this._bind(disableSmsOnNumber),
1201
+ reuseSmsRegistrationForNumber: this._bind(reuseSmsRegistrationForNumber),
1179
1202
  };
1180
1203
 
1181
1204
  /**
1182
1205
  * whatsapptemplates API
1183
1206
  */
1184
1207
  whatsapptemplates = {
1185
- getWhatsAppLibraryTemplate: getWhatsAppLibraryTemplate,
1208
+ getWhatsAppLibraryTemplate: this._bind(getWhatsAppLibraryTemplate),
1186
1209
  };
1187
1210
 
1188
1211
  /**
1189
1212
  * whatsappphonenumbers API
1190
1213
  */
1191
1214
  whatsappphonenumbers = {
1192
- getWhatsAppNumberInfo: getWhatsAppNumberInfo,
1193
- getWhatsAppPhoneNumbers: getWhatsAppPhoneNumbers,
1194
- purchaseWhatsAppPhoneNumber: purchaseWhatsAppPhoneNumber,
1195
- listWhatsAppNumberCountries: listWhatsAppNumberCountries,
1196
- searchAvailableWhatsAppNumbers: searchAvailableWhatsAppNumbers,
1197
- checkWhatsAppNumberAvailability: checkWhatsAppNumberAvailability,
1198
- getWhatsAppNumberKycForm: getWhatsAppNumberKycForm,
1199
- submitWhatsAppNumberKyc: submitWhatsAppNumberKyc,
1200
- uploadWhatsAppNumberKycDocument: uploadWhatsAppNumberKycDocument,
1201
- validateWhatsAppNumberKycAddress: validateWhatsAppNumberKycAddress,
1202
- createWhatsAppNumberKycLink: createWhatsAppNumberKycLink,
1203
- getWhatsAppNumberRemediation: getWhatsAppNumberRemediation,
1204
- remediateWhatsAppNumber: remediateWhatsAppNumber,
1205
- getWhatsAppPhoneNumber: getWhatsAppPhoneNumber,
1206
- releaseWhatsAppPhoneNumber: releaseWhatsAppPhoneNumber,
1215
+ getWhatsAppNumberInfo: this._bind(getWhatsAppNumberInfo),
1216
+ getWhatsAppPhoneNumbers: this._bind(getWhatsAppPhoneNumbers),
1217
+ purchaseWhatsAppPhoneNumber: this._bind(purchaseWhatsAppPhoneNumber),
1218
+ listWhatsAppNumberCountries: this._bind(listWhatsAppNumberCountries),
1219
+ searchAvailableWhatsAppNumbers: this._bind(searchAvailableWhatsAppNumbers),
1220
+ checkWhatsAppNumberAvailability: this._bind(checkWhatsAppNumberAvailability),
1221
+ getWhatsAppNumberKycForm: this._bind(getWhatsAppNumberKycForm),
1222
+ submitWhatsAppNumberKyc: this._bind(submitWhatsAppNumberKyc),
1223
+ uploadWhatsAppNumberKycDocument: this._bind(uploadWhatsAppNumberKycDocument),
1224
+ validateWhatsAppNumberKycAddress: this._bind(validateWhatsAppNumberKycAddress),
1225
+ createWhatsAppNumberKycLink: this._bind(createWhatsAppNumberKycLink),
1226
+ getWhatsAppNumberRemediation: this._bind(getWhatsAppNumberRemediation),
1227
+ remediateWhatsAppNumber: this._bind(remediateWhatsAppNumber),
1228
+ getWhatsAppPhoneNumber: this._bind(getWhatsAppPhoneNumber),
1229
+ releaseWhatsAppPhoneNumber: this._bind(releaseWhatsAppPhoneNumber),
1207
1230
  };
1208
1231
 
1209
1232
  /**
1210
1233
  * phonenumbers API
1211
1234
  */
1212
1235
  phonenumbers = {
1213
- listPhoneNumbers: listPhoneNumbers,
1214
- getPhoneNumber: getPhoneNumber,
1215
- releasePhoneNumber: releasePhoneNumber,
1216
- purchasePhoneNumber: purchasePhoneNumber,
1217
- listPhoneNumberCountries: listPhoneNumberCountries,
1218
- searchAvailablePhoneNumbers: searchAvailablePhoneNumbers,
1219
- checkPhoneNumberAvailability: checkPhoneNumberAvailability,
1220
- getPhoneNumberKycForm: getPhoneNumberKycForm,
1221
- submitPhoneNumberKyc: submitPhoneNumberKyc,
1222
- viewPhoneNumberKycDocument: viewPhoneNumberKycDocument,
1223
- uploadPhoneNumberKycDocument: uploadPhoneNumberKycDocument,
1224
- validatePhoneNumberKycAddress: validatePhoneNumberKycAddress,
1225
- createPhoneNumberKycLink: createPhoneNumberKycLink,
1226
- createPhoneNumberPortIn: createPhoneNumberPortIn,
1227
- listPhoneNumberPortIns: listPhoneNumberPortIns,
1228
- checkPhoneNumberPortability: checkPhoneNumberPortability,
1229
- uploadPhoneNumberPortInDocument: uploadPhoneNumberPortInDocument,
1230
- getPhoneNumberPortInRequirements: getPhoneNumberPortInRequirements,
1231
- getPhoneNumberPortInOrderRequirements: getPhoneNumberPortInOrderRequirements,
1232
- cancelPhoneNumberPortIn: cancelPhoneNumberPortIn,
1233
- reviewPhoneNumberKycPacket: reviewPhoneNumberKycPacket,
1234
- getPhoneNumberRemediation: getPhoneNumberRemediation,
1235
- remediatePhoneNumber: remediatePhoneNumber,
1236
- replyToPhoneNumberReviewer: replyToPhoneNumberReviewer,
1237
- respondToPhoneNumberReviewer: respondToPhoneNumberReviewer,
1236
+ listPhoneNumbers: this._bind(listPhoneNumbers),
1237
+ getPhoneNumber: this._bind(getPhoneNumber),
1238
+ releasePhoneNumber: this._bind(releasePhoneNumber),
1239
+ purchasePhoneNumber: this._bind(purchasePhoneNumber),
1240
+ listPhoneNumberCountries: this._bind(listPhoneNumberCountries),
1241
+ searchAvailablePhoneNumbers: this._bind(searchAvailablePhoneNumbers),
1242
+ checkPhoneNumberAvailability: this._bind(checkPhoneNumberAvailability),
1243
+ getPhoneNumberKycForm: this._bind(getPhoneNumberKycForm),
1244
+ submitPhoneNumberKyc: this._bind(submitPhoneNumberKyc),
1245
+ viewPhoneNumberKycDocument: this._bind(viewPhoneNumberKycDocument),
1246
+ uploadPhoneNumberKycDocument: this._bind(uploadPhoneNumberKycDocument),
1247
+ validatePhoneNumberKycAddress: this._bind(validatePhoneNumberKycAddress),
1248
+ createPhoneNumberKycLink: this._bind(createPhoneNumberKycLink),
1249
+ createPhoneNumberPortIn: this._bind(createPhoneNumberPortIn),
1250
+ listPhoneNumberPortIns: this._bind(listPhoneNumberPortIns),
1251
+ checkPhoneNumberPortability: this._bind(checkPhoneNumberPortability),
1252
+ uploadPhoneNumberPortInDocument: this._bind(uploadPhoneNumberPortInDocument),
1253
+ getPhoneNumberPortInRequirements: this._bind(getPhoneNumberPortInRequirements),
1254
+ getPhoneNumberPortInOrderRequirements: this._bind(getPhoneNumberPortInOrderRequirements),
1255
+ cancelPhoneNumberPortIn: this._bind(cancelPhoneNumberPortIn),
1256
+ reviewPhoneNumberKycPacket: this._bind(reviewPhoneNumberKycPacket),
1257
+ getPhoneNumberRemediation: this._bind(getPhoneNumberRemediation),
1258
+ remediatePhoneNumber: this._bind(remediatePhoneNumber),
1259
+ replyToPhoneNumberReviewer: this._bind(replyToPhoneNumberReviewer),
1260
+ respondToPhoneNumberReviewer: this._bind(respondToPhoneNumberReviewer),
1238
1261
  };
1239
1262
 
1240
1263
  /**
1241
1264
  * whatsappsandbox API
1242
1265
  */
1243
1266
  whatsappsandbox = {
1244
- listWhatsAppSandboxSessions: listWhatsAppSandboxSessions,
1245
- createWhatsAppSandboxSession: createWhatsAppSandboxSession,
1246
- deleteWhatsAppSandboxSession: deleteWhatsAppSandboxSession,
1267
+ listWhatsAppSandboxSessions: this._bind(listWhatsAppSandboxSessions),
1268
+ createWhatsAppSandboxSession: this._bind(createWhatsAppSandboxSession),
1269
+ deleteWhatsAppSandboxSession: this._bind(deleteWhatsAppSandboxSession),
1247
1270
  };
1248
1271
 
1249
1272
  /**
1250
1273
  * whatsappflows API
1251
1274
  */
1252
1275
  whatsappflows = {
1253
- listWhatsAppFlows: listWhatsAppFlows,
1254
- createWhatsAppFlow: createWhatsAppFlow,
1255
- getWhatsAppFlow: getWhatsAppFlow,
1256
- updateWhatsAppFlow: updateWhatsAppFlow,
1257
- deleteWhatsAppFlow: deleteWhatsAppFlow,
1258
- getWhatsAppFlowJson: getWhatsAppFlowJson,
1259
- uploadWhatsAppFlowJson: uploadWhatsAppFlowJson,
1260
- getWhatsAppFlowPreview: getWhatsAppFlowPreview,
1261
- listWhatsAppFlowVersions: listWhatsAppFlowVersions,
1262
- publishWhatsAppFlow: publishWhatsAppFlow,
1263
- deprecateWhatsAppFlow: deprecateWhatsAppFlow,
1264
- sendWhatsAppFlowMessage: sendWhatsAppFlowMessage,
1265
- listWhatsAppFlowResponses: listWhatsAppFlowResponses,
1276
+ listWhatsAppFlows: this._bind(listWhatsAppFlows),
1277
+ createWhatsAppFlow: this._bind(createWhatsAppFlow),
1278
+ getWhatsAppFlow: this._bind(getWhatsAppFlow),
1279
+ updateWhatsAppFlow: this._bind(updateWhatsAppFlow),
1280
+ deleteWhatsAppFlow: this._bind(deleteWhatsAppFlow),
1281
+ getWhatsAppFlowJson: this._bind(getWhatsAppFlowJson),
1282
+ uploadWhatsAppFlowJson: this._bind(uploadWhatsAppFlowJson),
1283
+ getWhatsAppFlowPreview: this._bind(getWhatsAppFlowPreview),
1284
+ listWhatsAppFlowVersions: this._bind(listWhatsAppFlowVersions),
1285
+ publishWhatsAppFlow: this._bind(publishWhatsAppFlow),
1286
+ deprecateWhatsAppFlow: this._bind(deprecateWhatsAppFlow),
1287
+ sendWhatsAppFlowMessage: this._bind(sendWhatsAppFlowMessage),
1288
+ listWhatsAppFlowResponses: this._bind(listWhatsAppFlowResponses),
1266
1289
  };
1267
1290
 
1268
1291
  /**
1269
1292
  * contacts API
1270
1293
  */
1271
1294
  contacts = {
1272
- listContacts: listContacts,
1273
- createContact: createContact,
1274
- getContact: getContact,
1275
- updateContact: updateContact,
1276
- deleteContact: deleteContact,
1277
- getContactChannels: getContactChannels,
1278
- bulkCreateContacts: bulkCreateContacts,
1295
+ listContacts: this._bind(listContacts),
1296
+ createContact: this._bind(createContact),
1297
+ getContact: this._bind(getContact),
1298
+ updateContact: this._bind(updateContact),
1299
+ deleteContact: this._bind(deleteContact),
1300
+ getContactChannels: this._bind(getContactChannels),
1301
+ bulkCreateContacts: this._bind(bulkCreateContacts),
1279
1302
  };
1280
1303
 
1281
1304
  /**
1282
1305
  * customfields API
1283
1306
  */
1284
1307
  customfields = {
1285
- setContactFieldValue: setContactFieldValue,
1286
- clearContactFieldValue: clearContactFieldValue,
1287
- listCustomFields: listCustomFields,
1288
- createCustomField: createCustomField,
1289
- updateCustomField: updateCustomField,
1290
- deleteCustomField: deleteCustomField,
1308
+ setContactFieldValue: this._bind(setContactFieldValue),
1309
+ clearContactFieldValue: this._bind(clearContactFieldValue),
1310
+ listCustomFields: this._bind(listCustomFields),
1311
+ createCustomField: this._bind(createCustomField),
1312
+ updateCustomField: this._bind(updateCustomField),
1313
+ deleteCustomField: this._bind(deleteCustomField),
1291
1314
  };
1292
1315
 
1293
1316
  /**
1294
1317
  * broadcasts API
1295
1318
  */
1296
1319
  broadcasts = {
1297
- listBroadcasts: listBroadcasts,
1298
- createBroadcast: createBroadcast,
1299
- getBroadcast: getBroadcast,
1300
- updateBroadcast: updateBroadcast,
1301
- deleteBroadcast: deleteBroadcast,
1302
- sendBroadcast: sendBroadcast,
1303
- scheduleBroadcast: scheduleBroadcast,
1304
- cancelBroadcast: cancelBroadcast,
1305
- listBroadcastRecipients: listBroadcastRecipients,
1306
- addBroadcastRecipients: addBroadcastRecipients,
1320
+ listBroadcasts: this._bind(listBroadcasts),
1321
+ createBroadcast: this._bind(createBroadcast),
1322
+ getBroadcast: this._bind(getBroadcast),
1323
+ updateBroadcast: this._bind(updateBroadcast),
1324
+ deleteBroadcast: this._bind(deleteBroadcast),
1325
+ sendBroadcast: this._bind(sendBroadcast),
1326
+ scheduleBroadcast: this._bind(scheduleBroadcast),
1327
+ cancelBroadcast: this._bind(cancelBroadcast),
1328
+ listBroadcastRecipients: this._bind(listBroadcastRecipients),
1329
+ addBroadcastRecipients: this._bind(addBroadcastRecipients),
1307
1330
  };
1308
1331
 
1309
1332
  /**
1310
1333
  * workflows API
1311
1334
  */
1312
1335
  workflows = {
1313
- listWorkflows: listWorkflows,
1314
- createWorkflow: createWorkflow,
1315
- getWorkflow: getWorkflow,
1316
- updateWorkflow: updateWorkflow,
1317
- deleteWorkflow: deleteWorkflow,
1318
- activateWorkflow: activateWorkflow,
1319
- pauseWorkflow: pauseWorkflow,
1320
- listWorkflowExecutions: listWorkflowExecutions,
1321
- triggerWorkflow: triggerWorkflow,
1322
- listWorkflowExecutionEvents: listWorkflowExecutionEvents,
1323
- duplicateWorkflow: duplicateWorkflow,
1324
- listWorkflowVersions: listWorkflowVersions,
1325
- getWorkflowVersion: getWorkflowVersion,
1326
- restoreWorkflowVersion: restoreWorkflowVersion,
1336
+ listWorkflows: this._bind(listWorkflows),
1337
+ createWorkflow: this._bind(createWorkflow),
1338
+ getWorkflow: this._bind(getWorkflow),
1339
+ updateWorkflow: this._bind(updateWorkflow),
1340
+ deleteWorkflow: this._bind(deleteWorkflow),
1341
+ activateWorkflow: this._bind(activateWorkflow),
1342
+ pauseWorkflow: this._bind(pauseWorkflow),
1343
+ listWorkflowExecutions: this._bind(listWorkflowExecutions),
1344
+ triggerWorkflow: this._bind(triggerWorkflow),
1345
+ listWorkflowExecutionEvents: this._bind(listWorkflowExecutionEvents),
1346
+ duplicateWorkflow: this._bind(duplicateWorkflow),
1347
+ listWorkflowVersions: this._bind(listWorkflowVersions),
1348
+ getWorkflowVersion: this._bind(getWorkflowVersion),
1349
+ restoreWorkflowVersion: this._bind(restoreWorkflowVersion),
1327
1350
  };
1328
1351
 
1329
1352
  /**
1330
1353
  * sequences API
1331
1354
  */
1332
1355
  sequences = {
1333
- listSequences: listSequences,
1334
- createSequence: createSequence,
1335
- getSequence: getSequence,
1336
- updateSequence: updateSequence,
1337
- deleteSequence: deleteSequence,
1338
- activateSequence: activateSequence,
1339
- pauseSequence: pauseSequence,
1340
- enrollContacts: enrollContacts,
1341
- unenrollContact: unenrollContact,
1342
- listSequenceEnrollments: listSequenceEnrollments,
1356
+ listSequences: this._bind(listSequences),
1357
+ createSequence: this._bind(createSequence),
1358
+ getSequence: this._bind(getSequence),
1359
+ updateSequence: this._bind(updateSequence),
1360
+ deleteSequence: this._bind(deleteSequence),
1361
+ activateSequence: this._bind(activateSequence),
1362
+ pauseSequence: this._bind(pauseSequence),
1363
+ enrollContacts: this._bind(enrollContacts),
1364
+ unenrollContact: this._bind(unenrollContact),
1365
+ listSequenceEnrollments: this._bind(listSequenceEnrollments),
1343
1366
  };
1344
1367
 
1345
1368
  /**
1346
1369
  * commentautomations API
1347
1370
  */
1348
1371
  commentautomations = {
1349
- listCommentAutomations: listCommentAutomations,
1350
- createCommentAutomation: createCommentAutomation,
1351
- getCommentAutomation: getCommentAutomation,
1352
- updateCommentAutomation: updateCommentAutomation,
1353
- deleteCommentAutomation: deleteCommentAutomation,
1354
- listCommentAutomationLogs: listCommentAutomationLogs,
1372
+ listCommentAutomations: this._bind(listCommentAutomations),
1373
+ createCommentAutomation: this._bind(createCommentAutomation),
1374
+ getCommentAutomation: this._bind(getCommentAutomation),
1375
+ updateCommentAutomation: this._bind(updateCommentAutomation),
1376
+ deleteCommentAutomation: this._bind(deleteCommentAutomation),
1377
+ listCommentAutomationLogs: this._bind(listCommentAutomationLogs),
1355
1378
  };
1356
1379
 
1357
1380
  /**
1358
1381
  * adcampaigns API
1359
1382
  */
1360
1383
  adcampaigns = {
1361
- listAds: listAds,
1362
- listAdKeywords: listAdKeywords,
1363
- listAdCampaigns: listAdCampaigns,
1364
- createAdCampaign: createAdCampaign,
1365
- updateAdCampaignStatus: updateAdCampaignStatus,
1366
- updateAdCampaign: updateAdCampaign,
1367
- deleteAdCampaign: deleteAdCampaign,
1368
- bulkUpdateAdCampaignStatus: bulkUpdateAdCampaignStatus,
1369
- duplicateAdCampaign: duplicateAdCampaign,
1370
- duplicateAdSet: duplicateAdSet,
1371
- duplicateAd: duplicateAd,
1372
- getAdSetDetails: getAdSetDetails,
1373
- updateAdSet: updateAdSet,
1374
- updateAdSetStatus: updateAdSetStatus,
1375
- getAdTree: getAdTree,
1376
- getAdsTimeline: getAdsTimeline,
1377
- getAd: getAd,
1378
- updateAd: updateAd,
1379
- deleteAd: deleteAd,
1380
- updateAdStatus: updateAdStatus,
1381
- boostPost: boostPost,
1382
- createStandaloneAd: createStandaloneAd,
1384
+ listAds: this._bind(listAds),
1385
+ listAdKeywords: this._bind(listAdKeywords),
1386
+ listAdCampaigns: this._bind(listAdCampaigns),
1387
+ createAdCampaign: this._bind(createAdCampaign),
1388
+ updateAdCampaignStatus: this._bind(updateAdCampaignStatus),
1389
+ updateAdCampaign: this._bind(updateAdCampaign),
1390
+ deleteAdCampaign: this._bind(deleteAdCampaign),
1391
+ bulkUpdateAdCampaignStatus: this._bind(bulkUpdateAdCampaignStatus),
1392
+ duplicateAdCampaign: this._bind(duplicateAdCampaign),
1393
+ duplicateAdSet: this._bind(duplicateAdSet),
1394
+ duplicateAd: this._bind(duplicateAd),
1395
+ getAdSetDetails: this._bind(getAdSetDetails),
1396
+ updateAdSet: this._bind(updateAdSet),
1397
+ updateAdSetStatus: this._bind(updateAdSetStatus),
1398
+ getAdTree: this._bind(getAdTree),
1399
+ getAdsTimeline: this._bind(getAdsTimeline),
1400
+ getAd: this._bind(getAd),
1401
+ updateAd: this._bind(updateAd),
1402
+ deleteAd: this._bind(deleteAd),
1403
+ updateAdStatus: this._bind(updateAdStatus),
1404
+ boostPost: this._bind(boostPost),
1405
+ createStandaloneAd: this._bind(createStandaloneAd),
1383
1406
  };
1384
1407
 
1385
1408
  /**
1386
1409
  * adinsights API
1387
1410
  */
1388
1411
  adinsights = {
1389
- getCampaignAnalytics: getCampaignAnalytics,
1390
- generateKeywordIdeas: generateKeywordIdeas,
1391
- generateKeywordHistoricalMetrics: generateKeywordHistoricalMetrics,
1392
- queryAdInsights: queryAdInsights,
1393
- createAdInsightsReport: createAdInsightsReport,
1394
- getAdInsightsReport: getAdInsightsReport,
1395
- getAdAnalytics: getAdAnalytics,
1412
+ getCampaignAnalytics: this._bind(getCampaignAnalytics),
1413
+ generateKeywordIdeas: this._bind(generateKeywordIdeas),
1414
+ generateKeywordHistoricalMetrics: this._bind(generateKeywordHistoricalMetrics),
1415
+ queryAdInsights: this._bind(queryAdInsights),
1416
+ createAdInsightsReport: this._bind(createAdInsightsReport),
1417
+ getAdInsightsReport: this._bind(getAdInsightsReport),
1418
+ getAdAnalytics: this._bind(getAdAnalytics),
1396
1419
  };
1397
1420
 
1398
1421
  /**
1399
1422
  * adcreatives API
1400
1423
  */
1401
1424
  adcreatives = {
1402
- generateAdPreviews: generateAdPreviews,
1403
- getAdPreviews: getAdPreviews,
1404
- listAdCreatives: listAdCreatives,
1405
- createAdCreative: createAdCreative,
1406
- getAdCreative: getAdCreative,
1407
- updateAdCreative: updateAdCreative,
1408
- deleteAdCreative: deleteAdCreative,
1409
- uploadAdImage: uploadAdImage,
1410
- listAdImages: listAdImages,
1411
- listAdCatalogs: listAdCatalogs,
1412
- listAdCatalogProductSets: listAdCatalogProductSets,
1425
+ generateAdPreviews: this._bind(generateAdPreviews),
1426
+ getAdPreviews: this._bind(getAdPreviews),
1427
+ listAdCreatives: this._bind(listAdCreatives),
1428
+ createAdCreative: this._bind(createAdCreative),
1429
+ getAdCreative: this._bind(getAdCreative),
1430
+ updateAdCreative: this._bind(updateAdCreative),
1431
+ deleteAdCreative: this._bind(deleteAdCreative),
1432
+ uploadAdImage: this._bind(uploadAdImage),
1433
+ listAdImages: this._bind(listAdImages),
1434
+ listAdCatalogs: this._bind(listAdCatalogs),
1435
+ listAdCatalogProductSets: this._bind(listAdCatalogProductSets),
1413
1436
  };
1414
1437
 
1415
1438
  /**
1416
1439
  * trackingtags API
1417
1440
  */
1418
1441
  trackingtags = {
1419
- getAdTrackingTags: getAdTrackingTags,
1420
- updateAdTrackingTags: updateAdTrackingTags,
1421
- listTrackingTags: listTrackingTags,
1422
- createTrackingTag: createTrackingTag,
1423
- getTrackingTag: getTrackingTag,
1424
- updateTrackingTag: updateTrackingTag,
1425
- listTrackingTagSharedAccounts: listTrackingTagSharedAccounts,
1426
- addTrackingTagSharedAccount: addTrackingTagSharedAccount,
1427
- removeTrackingTagSharedAccount: removeTrackingTagSharedAccount,
1428
- getTrackingTagStats: getTrackingTagStats,
1442
+ getAdTrackingTags: this._bind(getAdTrackingTags),
1443
+ updateAdTrackingTags: this._bind(updateAdTrackingTags),
1444
+ listTrackingTags: this._bind(listTrackingTags),
1445
+ createTrackingTag: this._bind(createTrackingTag),
1446
+ getTrackingTag: this._bind(getTrackingTag),
1447
+ updateTrackingTag: this._bind(updateTrackingTag),
1448
+ listTrackingTagSharedAccounts: this._bind(listTrackingTagSharedAccounts),
1449
+ addTrackingTagSharedAccount: this._bind(addTrackingTagSharedAccount),
1450
+ removeTrackingTagSharedAccount: this._bind(removeTrackingTagSharedAccount),
1451
+ getTrackingTagStats: this._bind(getTrackingTagStats),
1429
1452
  };
1430
1453
 
1431
1454
  /**
1432
1455
  * adaccounts API
1433
1456
  */
1434
1457
  adaccounts = {
1435
- getAdComments: getAdComments,
1436
- listAdsBusinessCenters: listAdsBusinessCenters,
1437
- getAdsActivityLog: getAdsActivityLog,
1438
- listAdStudies: listAdStudies,
1439
- listMetaBusinesses: listMetaBusinesses,
1440
- listAdLabels: listAdLabels,
1441
- listHighDemandPeriods: listHighDemandPeriods,
1442
- listValueRuleSets: listValueRuleSets,
1443
- createValueRuleSet: createValueRuleSet,
1444
- getValueRuleSet: getValueRuleSet,
1445
- updateValueRuleSet: updateValueRuleSet,
1446
- deleteValueRuleSet: deleteValueRuleSet,
1447
- getAdAccountFinance: getAdAccountFinance,
1448
- listAdAccounts: listAdAccounts,
1449
- updateAdAccount: updateAdAccount,
1450
- getDsaDefaults: getDsaDefaults,
1451
- getDsaRecommendations: getDsaRecommendations,
1458
+ getAdComments: this._bind(getAdComments),
1459
+ listAdsBusinessCenters: this._bind(listAdsBusinessCenters),
1460
+ getAdsActivityLog: this._bind(getAdsActivityLog),
1461
+ listAdStudies: this._bind(listAdStudies),
1462
+ listMetaBusinesses: this._bind(listMetaBusinesses),
1463
+ listAdLabels: this._bind(listAdLabels),
1464
+ listHighDemandPeriods: this._bind(listHighDemandPeriods),
1465
+ listValueRuleSets: this._bind(listValueRuleSets),
1466
+ createValueRuleSet: this._bind(createValueRuleSet),
1467
+ getValueRuleSet: this._bind(getValueRuleSet),
1468
+ updateValueRuleSet: this._bind(updateValueRuleSet),
1469
+ deleteValueRuleSet: this._bind(deleteValueRuleSet),
1470
+ getAdAccountFinance: this._bind(getAdAccountFinance),
1471
+ listAdAccounts: this._bind(listAdAccounts),
1472
+ updateAdAccount: this._bind(updateAdAccount),
1473
+ getDsaDefaults: this._bind(getDsaDefaults),
1474
+ getDsaRecommendations: this._bind(getDsaRecommendations),
1452
1475
  };
1453
1476
 
1454
1477
  /**
1455
1478
  * reachandfrequency API
1456
1479
  */
1457
1480
  reachandfrequency = {
1458
- createRfPrediction: createRfPrediction,
1459
- getRfPrediction: getRfPrediction,
1460
- cancelRfReservation: cancelRfReservation,
1461
- reserveRfPrediction: reserveRfPrediction,
1481
+ createRfPrediction: this._bind(createRfPrediction),
1482
+ getRfPrediction: this._bind(getRfPrediction),
1483
+ cancelRfReservation: this._bind(cancelRfReservation),
1484
+ reserveRfPrediction: this._bind(reserveRfPrediction),
1462
1485
  };
1463
1486
 
1464
1487
  /**
1465
1488
  * leadgen API
1466
1489
  */
1467
1490
  leadgen = {
1468
- listLeads: listLeads,
1469
- listLeadForms: listLeadForms,
1470
- createLeadForm: createLeadForm,
1471
- getLeadForm: getLeadForm,
1472
- archiveLeadForm: archiveLeadForm,
1473
- listFormLeads: listFormLeads,
1474
- createTestLead: createTestLead,
1491
+ listLeads: this._bind(listLeads),
1492
+ listLeadForms: this._bind(listLeadForms),
1493
+ createLeadForm: this._bind(createLeadForm),
1494
+ getLeadForm: this._bind(getLeadForm),
1495
+ archiveLeadForm: this._bind(archiveLeadForm),
1496
+ listFormLeads: this._bind(listFormLeads),
1497
+ createTestLead: this._bind(createTestLead),
1475
1498
  };
1476
1499
 
1477
1500
  /**
1478
1501
  * adtargeting API
1479
1502
  */
1480
1503
  adtargeting = {
1481
- searchAdInterests: searchAdInterests,
1482
- searchAdTargeting: searchAdTargeting,
1483
- estimateAdReach: estimateAdReach,
1484
- getLinkedInBidPricing: getLinkedInBidPricing,
1485
- getLinkedInSupplyForecast: getLinkedInSupplyForecast,
1504
+ searchAdInterests: this._bind(searchAdInterests),
1505
+ searchAdTargeting: this._bind(searchAdTargeting),
1506
+ estimateAdReach: this._bind(estimateAdReach),
1507
+ getLinkedInBidPricing: this._bind(getLinkedInBidPricing),
1508
+ getLinkedInSupplyForecast: this._bind(getLinkedInSupplyForecast),
1486
1509
  };
1487
1510
 
1488
1511
  /**
1489
1512
  * adaudiences API
1490
1513
  */
1491
1514
  adaudiences = {
1492
- listAdAudiences: listAdAudiences,
1493
- createAdAudience: createAdAudience,
1494
- getAdAudience: getAdAudience,
1495
- updateAdAudience: updateAdAudience,
1496
- deleteAdAudience: deleteAdAudience,
1497
- addUsersToAdAudience: addUsersToAdAudience,
1515
+ listAdAudiences: this._bind(listAdAudiences),
1516
+ createAdAudience: this._bind(createAdAudience),
1517
+ getAdAudience: this._bind(getAdAudience),
1518
+ updateAdAudience: this._bind(updateAdAudience),
1519
+ deleteAdAudience: this._bind(deleteAdAudience),
1520
+ addUsersToAdAudience: this._bind(addUsersToAdAudience),
1498
1521
  };
1499
1522
 
1500
1523
  /**
1501
1524
  * conversions API
1502
1525
  */
1503
1526
  conversions = {
1504
- getConversionsQuality: getConversionsQuality,
1505
- sendConversions: sendConversions,
1506
- adjustConversions: adjustConversions,
1507
- listConversionDestinations: listConversionDestinations,
1508
- createConversionDestination: createConversionDestination,
1509
- getConversionDestination: getConversionDestination,
1510
- updateConversionDestination: updateConversionDestination,
1511
- deleteConversionDestination: deleteConversionDestination,
1512
- listConversionAssociations: listConversionAssociations,
1513
- addConversionAssociations: addConversionAssociations,
1514
- removeConversionAssociations: removeConversionAssociations,
1515
- getConversionMetrics: getConversionMetrics,
1527
+ getConversionsQuality: this._bind(getConversionsQuality),
1528
+ sendConversions: this._bind(sendConversions),
1529
+ adjustConversions: this._bind(adjustConversions),
1530
+ listConversionDestinations: this._bind(listConversionDestinations),
1531
+ createConversionDestination: this._bind(createConversionDestination),
1532
+ getConversionDestination: this._bind(getConversionDestination),
1533
+ updateConversionDestination: this._bind(updateConversionDestination),
1534
+ deleteConversionDestination: this._bind(deleteConversionDestination),
1535
+ listConversionAssociations: this._bind(listConversionAssociations),
1536
+ addConversionAssociations: this._bind(addConversionAssociations),
1537
+ removeConversionAssociations: this._bind(removeConversionAssociations),
1538
+ getConversionMetrics: this._bind(getConversionMetrics),
1516
1539
  };
1517
1540
 
1518
1541
  /**
1519
1542
  * messagingads API
1520
1543
  */
1521
1544
  messagingads = {
1522
- createMessagingAd: createMessagingAd,
1523
- createCallAd: createCallAd,
1524
- createCtwaAd: createCtwaAd,
1545
+ createMessagingAd: this._bind(createMessagingAd),
1546
+ createCallAd: this._bind(createCallAd),
1547
+ createCtwaAd: this._bind(createCtwaAd),
1525
1548
  };
1526
1549
 
1527
1550
  /**
1528
1551
  * verify API
1529
1552
  */
1530
1553
  verify = {
1531
- createVerification: createVerification,
1532
- getVerification: getVerification,
1533
- checkVerification: checkVerification,
1554
+ createVerification: this._bind(createVerification),
1555
+ getVerification: this._bind(getVerification),
1556
+ checkVerification: this._bind(checkVerification),
1534
1557
  };
1535
1558
 
1536
1559
  /**
@@ -1540,213 +1563,213 @@ export class Zernio {
1540
1563
  */
1541
1564
  ads = {
1542
1565
  /** @deprecated Use `zernio.adcampaigns.listAds` instead. */
1543
- listAds: listAds,
1566
+ listAds: this._bind(listAds),
1544
1567
  /** @deprecated Use `zernio.adcampaigns.listAdKeywords` instead. */
1545
- listAdKeywords: listAdKeywords,
1568
+ listAdKeywords: this._bind(listAdKeywords),
1546
1569
  /** @deprecated Use `zernio.adcampaigns.listAdCampaigns` instead. */
1547
- listAdCampaigns: listAdCampaigns,
1570
+ listAdCampaigns: this._bind(listAdCampaigns),
1548
1571
  /** @deprecated Use `zernio.adcampaigns.createAdCampaign` instead. */
1549
- createAdCampaign: createAdCampaign,
1572
+ createAdCampaign: this._bind(createAdCampaign),
1550
1573
  /** @deprecated Use `zernio.adcampaigns.updateAdCampaignStatus` instead. */
1551
- updateAdCampaignStatus: updateAdCampaignStatus,
1574
+ updateAdCampaignStatus: this._bind(updateAdCampaignStatus),
1552
1575
  /** @deprecated Use `zernio.adcampaigns.updateAdCampaign` instead. */
1553
- updateAdCampaign: updateAdCampaign,
1576
+ updateAdCampaign: this._bind(updateAdCampaign),
1554
1577
  /** @deprecated Use `zernio.adcampaigns.deleteAdCampaign` instead. */
1555
- deleteAdCampaign: deleteAdCampaign,
1578
+ deleteAdCampaign: this._bind(deleteAdCampaign),
1556
1579
  /** @deprecated Use `zernio.adcampaigns.bulkUpdateAdCampaignStatus` instead. */
1557
- bulkUpdateAdCampaignStatus: bulkUpdateAdCampaignStatus,
1580
+ bulkUpdateAdCampaignStatus: this._bind(bulkUpdateAdCampaignStatus),
1558
1581
  /** @deprecated Use `zernio.adcampaigns.duplicateAdCampaign` instead. */
1559
- duplicateAdCampaign: duplicateAdCampaign,
1582
+ duplicateAdCampaign: this._bind(duplicateAdCampaign),
1560
1583
  /** @deprecated Use `zernio.adcampaigns.duplicateAdSet` instead. */
1561
- duplicateAdSet: duplicateAdSet,
1584
+ duplicateAdSet: this._bind(duplicateAdSet),
1562
1585
  /** @deprecated Use `zernio.adcampaigns.duplicateAd` instead. */
1563
- duplicateAd: duplicateAd,
1586
+ duplicateAd: this._bind(duplicateAd),
1564
1587
  /** @deprecated Use `zernio.adcampaigns.getAdSetDetails` instead. */
1565
- getAdSetDetails: getAdSetDetails,
1588
+ getAdSetDetails: this._bind(getAdSetDetails),
1566
1589
  /** @deprecated Use `zernio.adcampaigns.updateAdSet` instead. */
1567
- updateAdSet: updateAdSet,
1590
+ updateAdSet: this._bind(updateAdSet),
1568
1591
  /** @deprecated Use `zernio.adcampaigns.updateAdSetStatus` instead. */
1569
- updateAdSetStatus: updateAdSetStatus,
1592
+ updateAdSetStatus: this._bind(updateAdSetStatus),
1570
1593
  /** @deprecated Use `zernio.adcampaigns.getAdTree` instead. */
1571
- getAdTree: getAdTree,
1594
+ getAdTree: this._bind(getAdTree),
1572
1595
  /** @deprecated Use `zernio.adcampaigns.getAdsTimeline` instead. */
1573
- getAdsTimeline: getAdsTimeline,
1596
+ getAdsTimeline: this._bind(getAdsTimeline),
1574
1597
  /** @deprecated Use `zernio.adcampaigns.getAd` instead. */
1575
- getAd: getAd,
1598
+ getAd: this._bind(getAd),
1576
1599
  /** @deprecated Use `zernio.adcampaigns.updateAd` instead. */
1577
- updateAd: updateAd,
1600
+ updateAd: this._bind(updateAd),
1578
1601
  /** @deprecated Use `zernio.adcampaigns.deleteAd` instead. */
1579
- deleteAd: deleteAd,
1602
+ deleteAd: this._bind(deleteAd),
1580
1603
  /** @deprecated Use `zernio.adcampaigns.updateAdStatus` instead. */
1581
- updateAdStatus: updateAdStatus,
1604
+ updateAdStatus: this._bind(updateAdStatus),
1582
1605
  /** @deprecated Use `zernio.adcampaigns.boostPost` instead. */
1583
- boostPost: boostPost,
1606
+ boostPost: this._bind(boostPost),
1584
1607
  /** @deprecated Use `zernio.adcampaigns.createStandaloneAd` instead. */
1585
- createStandaloneAd: createStandaloneAd,
1608
+ createStandaloneAd: this._bind(createStandaloneAd),
1586
1609
  /** @deprecated Use `zernio.adaccounts.getAdComments` instead. */
1587
- getAdComments: getAdComments,
1610
+ getAdComments: this._bind(getAdComments),
1588
1611
  /** @deprecated Use `zernio.adaccounts.listAdsBusinessCenters` instead. */
1589
- listAdsBusinessCenters: listAdsBusinessCenters,
1612
+ listAdsBusinessCenters: this._bind(listAdsBusinessCenters),
1590
1613
  /** @deprecated Use `zernio.adaccounts.getAdsActivityLog` instead. */
1591
- getAdsActivityLog: getAdsActivityLog,
1614
+ getAdsActivityLog: this._bind(getAdsActivityLog),
1592
1615
  /** @deprecated Use `zernio.adaccounts.listAdStudies` instead. */
1593
- listAdStudies: listAdStudies,
1616
+ listAdStudies: this._bind(listAdStudies),
1594
1617
  /** @deprecated Use `zernio.adaccounts.listMetaBusinesses` instead. */
1595
- listMetaBusinesses: listMetaBusinesses,
1618
+ listMetaBusinesses: this._bind(listMetaBusinesses),
1596
1619
  /** @deprecated Use `zernio.adaccounts.listAdLabels` instead. */
1597
- listAdLabels: listAdLabels,
1620
+ listAdLabels: this._bind(listAdLabels),
1598
1621
  /** @deprecated Use `zernio.adaccounts.listHighDemandPeriods` instead. */
1599
- listHighDemandPeriods: listHighDemandPeriods,
1622
+ listHighDemandPeriods: this._bind(listHighDemandPeriods),
1600
1623
  /** @deprecated Use `zernio.adaccounts.listValueRuleSets` instead. */
1601
- listValueRuleSets: listValueRuleSets,
1624
+ listValueRuleSets: this._bind(listValueRuleSets),
1602
1625
  /** @deprecated Use `zernio.adaccounts.createValueRuleSet` instead. */
1603
- createValueRuleSet: createValueRuleSet,
1626
+ createValueRuleSet: this._bind(createValueRuleSet),
1604
1627
  /** @deprecated Use `zernio.adaccounts.getValueRuleSet` instead. */
1605
- getValueRuleSet: getValueRuleSet,
1628
+ getValueRuleSet: this._bind(getValueRuleSet),
1606
1629
  /** @deprecated Use `zernio.adaccounts.updateValueRuleSet` instead. */
1607
- updateValueRuleSet: updateValueRuleSet,
1630
+ updateValueRuleSet: this._bind(updateValueRuleSet),
1608
1631
  /** @deprecated Use `zernio.adaccounts.deleteValueRuleSet` instead. */
1609
- deleteValueRuleSet: deleteValueRuleSet,
1632
+ deleteValueRuleSet: this._bind(deleteValueRuleSet),
1610
1633
  /** @deprecated Use `zernio.adaccounts.getAdAccountFinance` instead. */
1611
- getAdAccountFinance: getAdAccountFinance,
1634
+ getAdAccountFinance: this._bind(getAdAccountFinance),
1612
1635
  /** @deprecated Use `zernio.adaccounts.listAdAccounts` instead. */
1613
- listAdAccounts: listAdAccounts,
1636
+ listAdAccounts: this._bind(listAdAccounts),
1614
1637
  /** @deprecated Use `zernio.adaccounts.updateAdAccount` instead. */
1615
- updateAdAccount: updateAdAccount,
1638
+ updateAdAccount: this._bind(updateAdAccount),
1616
1639
  /** @deprecated Use `zernio.adaccounts.getDsaDefaults` instead. */
1617
- getDsaDefaults: getDsaDefaults,
1640
+ getDsaDefaults: this._bind(getDsaDefaults),
1618
1641
  /** @deprecated Use `zernio.adaccounts.getDsaRecommendations` instead. */
1619
- getDsaRecommendations: getDsaRecommendations,
1642
+ getDsaRecommendations: this._bind(getDsaRecommendations),
1620
1643
  /** @deprecated Use `zernio.adcreatives.generateAdPreviews` instead. */
1621
- generateAdPreviews: generateAdPreviews,
1644
+ generateAdPreviews: this._bind(generateAdPreviews),
1622
1645
  /** @deprecated Use `zernio.adcreatives.getAdPreviews` instead. */
1623
- getAdPreviews: getAdPreviews,
1646
+ getAdPreviews: this._bind(getAdPreviews),
1624
1647
  /** @deprecated Use `zernio.adcreatives.listAdCreatives` instead. */
1625
- listAdCreatives: listAdCreatives,
1648
+ listAdCreatives: this._bind(listAdCreatives),
1626
1649
  /** @deprecated Use `zernio.adcreatives.createAdCreative` instead. */
1627
- createAdCreative: createAdCreative,
1650
+ createAdCreative: this._bind(createAdCreative),
1628
1651
  /** @deprecated Use `zernio.adcreatives.getAdCreative` instead. */
1629
- getAdCreative: getAdCreative,
1652
+ getAdCreative: this._bind(getAdCreative),
1630
1653
  /** @deprecated Use `zernio.adcreatives.updateAdCreative` instead. */
1631
- updateAdCreative: updateAdCreative,
1654
+ updateAdCreative: this._bind(updateAdCreative),
1632
1655
  /** @deprecated Use `zernio.adcreatives.deleteAdCreative` instead. */
1633
- deleteAdCreative: deleteAdCreative,
1656
+ deleteAdCreative: this._bind(deleteAdCreative),
1634
1657
  /** @deprecated Use `zernio.adcreatives.uploadAdImage` instead. */
1635
- uploadAdImage: uploadAdImage,
1658
+ uploadAdImage: this._bind(uploadAdImage),
1636
1659
  /** @deprecated Use `zernio.adcreatives.listAdImages` instead. */
1637
- listAdImages: listAdImages,
1660
+ listAdImages: this._bind(listAdImages),
1638
1661
  /** @deprecated Use `zernio.adcreatives.listAdCatalogs` instead. */
1639
- listAdCatalogs: listAdCatalogs,
1662
+ listAdCatalogs: this._bind(listAdCatalogs),
1640
1663
  /** @deprecated Use `zernio.adcreatives.listAdCatalogProductSets` instead. */
1641
- listAdCatalogProductSets: listAdCatalogProductSets,
1664
+ listAdCatalogProductSets: this._bind(listAdCatalogProductSets),
1642
1665
  /** @deprecated Use `zernio.adaudiences.listAdAudiences` instead. */
1643
- listAdAudiences: listAdAudiences,
1666
+ listAdAudiences: this._bind(listAdAudiences),
1644
1667
  /** @deprecated Use `zernio.adaudiences.createAdAudience` instead. */
1645
- createAdAudience: createAdAudience,
1668
+ createAdAudience: this._bind(createAdAudience),
1646
1669
  /** @deprecated Use `zernio.adaudiences.getAdAudience` instead. */
1647
- getAdAudience: getAdAudience,
1670
+ getAdAudience: this._bind(getAdAudience),
1648
1671
  /** @deprecated Use `zernio.adaudiences.updateAdAudience` instead. */
1649
- updateAdAudience: updateAdAudience,
1672
+ updateAdAudience: this._bind(updateAdAudience),
1650
1673
  /** @deprecated Use `zernio.adaudiences.deleteAdAudience` instead. */
1651
- deleteAdAudience: deleteAdAudience,
1674
+ deleteAdAudience: this._bind(deleteAdAudience),
1652
1675
  /** @deprecated Use `zernio.adaudiences.addUsersToAdAudience` instead. */
1653
- addUsersToAdAudience: addUsersToAdAudience,
1676
+ addUsersToAdAudience: this._bind(addUsersToAdAudience),
1654
1677
  /** @deprecated Use `zernio.adtargeting.searchAdInterests` instead. */
1655
- searchAdInterests: searchAdInterests,
1678
+ searchAdInterests: this._bind(searchAdInterests),
1656
1679
  /** @deprecated Use `zernio.adtargeting.searchAdTargeting` instead. */
1657
- searchAdTargeting: searchAdTargeting,
1680
+ searchAdTargeting: this._bind(searchAdTargeting),
1658
1681
  /** @deprecated Use `zernio.adtargeting.estimateAdReach` instead. */
1659
- estimateAdReach: estimateAdReach,
1682
+ estimateAdReach: this._bind(estimateAdReach),
1660
1683
  /** @deprecated Use `zernio.adtargeting.getLinkedInBidPricing` instead. */
1661
- getLinkedInBidPricing: getLinkedInBidPricing,
1684
+ getLinkedInBidPricing: this._bind(getLinkedInBidPricing),
1662
1685
  /** @deprecated Use `zernio.adtargeting.getLinkedInSupplyForecast` instead. */
1663
- getLinkedInSupplyForecast: getLinkedInSupplyForecast,
1686
+ getLinkedInSupplyForecast: this._bind(getLinkedInSupplyForecast),
1664
1687
  /** @deprecated Use `zernio.adinsights.getCampaignAnalytics` instead. */
1665
- getCampaignAnalytics: getCampaignAnalytics,
1688
+ getCampaignAnalytics: this._bind(getCampaignAnalytics),
1666
1689
  /** @deprecated Use `zernio.adinsights.generateKeywordIdeas` instead. */
1667
- generateKeywordIdeas: generateKeywordIdeas,
1690
+ generateKeywordIdeas: this._bind(generateKeywordIdeas),
1668
1691
  /** @deprecated Use `zernio.adinsights.generateKeywordHistoricalMetrics` instead. */
1669
- generateKeywordHistoricalMetrics: generateKeywordHistoricalMetrics,
1692
+ generateKeywordHistoricalMetrics: this._bind(generateKeywordHistoricalMetrics),
1670
1693
  /** @deprecated Use `zernio.adinsights.queryAdInsights` instead. */
1671
- queryAdInsights: queryAdInsights,
1694
+ queryAdInsights: this._bind(queryAdInsights),
1672
1695
  /** @deprecated Use `zernio.adinsights.createAdInsightsReport` instead. */
1673
- createAdInsightsReport: createAdInsightsReport,
1696
+ createAdInsightsReport: this._bind(createAdInsightsReport),
1674
1697
  /** @deprecated Use `zernio.adinsights.getAdInsightsReport` instead. */
1675
- getAdInsightsReport: getAdInsightsReport,
1698
+ getAdInsightsReport: this._bind(getAdInsightsReport),
1676
1699
  /** @deprecated Use `zernio.adinsights.getAdAnalytics` instead. */
1677
- getAdAnalytics: getAdAnalytics,
1700
+ getAdAnalytics: this._bind(getAdAnalytics),
1678
1701
  /** @deprecated Use `zernio.conversions.getConversionsQuality` instead. */
1679
- getConversionsQuality: getConversionsQuality,
1702
+ getConversionsQuality: this._bind(getConversionsQuality),
1680
1703
  /** @deprecated Use `zernio.conversions.sendConversions` instead. */
1681
- sendConversions: sendConversions,
1704
+ sendConversions: this._bind(sendConversions),
1682
1705
  /** @deprecated Use `zernio.conversions.adjustConversions` instead. */
1683
- adjustConversions: adjustConversions,
1706
+ adjustConversions: this._bind(adjustConversions),
1684
1707
  /** @deprecated Use `zernio.conversions.listConversionDestinations` instead. */
1685
- listConversionDestinations: listConversionDestinations,
1708
+ listConversionDestinations: this._bind(listConversionDestinations),
1686
1709
  /** @deprecated Use `zernio.conversions.createConversionDestination` instead. */
1687
- createConversionDestination: createConversionDestination,
1710
+ createConversionDestination: this._bind(createConversionDestination),
1688
1711
  /** @deprecated Use `zernio.conversions.getConversionDestination` instead. */
1689
- getConversionDestination: getConversionDestination,
1712
+ getConversionDestination: this._bind(getConversionDestination),
1690
1713
  /** @deprecated Use `zernio.conversions.updateConversionDestination` instead. */
1691
- updateConversionDestination: updateConversionDestination,
1714
+ updateConversionDestination: this._bind(updateConversionDestination),
1692
1715
  /** @deprecated Use `zernio.conversions.deleteConversionDestination` instead. */
1693
- deleteConversionDestination: deleteConversionDestination,
1716
+ deleteConversionDestination: this._bind(deleteConversionDestination),
1694
1717
  /** @deprecated Use `zernio.conversions.listConversionAssociations` instead. */
1695
- listConversionAssociations: listConversionAssociations,
1718
+ listConversionAssociations: this._bind(listConversionAssociations),
1696
1719
  /** @deprecated Use `zernio.conversions.addConversionAssociations` instead. */
1697
- addConversionAssociations: addConversionAssociations,
1720
+ addConversionAssociations: this._bind(addConversionAssociations),
1698
1721
  /** @deprecated Use `zernio.conversions.removeConversionAssociations` instead. */
1699
- removeConversionAssociations: removeConversionAssociations,
1722
+ removeConversionAssociations: this._bind(removeConversionAssociations),
1700
1723
  /** @deprecated Use `zernio.conversions.getConversionMetrics` instead. */
1701
- getConversionMetrics: getConversionMetrics,
1724
+ getConversionMetrics: this._bind(getConversionMetrics),
1702
1725
  /** @deprecated Use `zernio.messagingads.createMessagingAd` instead. */
1703
- createMessagingAd: createMessagingAd,
1726
+ createMessagingAd: this._bind(createMessagingAd),
1704
1727
  /** @deprecated Use `zernio.messagingads.createCallAd` instead. */
1705
- createCallAd: createCallAd,
1728
+ createCallAd: this._bind(createCallAd),
1706
1729
  /** @deprecated Use `zernio.messagingads.createCtwaAd` instead. */
1707
- createCtwaAd: createCtwaAd,
1730
+ createCtwaAd: this._bind(createCtwaAd),
1708
1731
  /** @deprecated Use `zernio.reachandfrequency.createRfPrediction` instead. */
1709
- createRfPrediction: createRfPrediction,
1732
+ createRfPrediction: this._bind(createRfPrediction),
1710
1733
  /** @deprecated Use `zernio.reachandfrequency.getRfPrediction` instead. */
1711
- getRfPrediction: getRfPrediction,
1734
+ getRfPrediction: this._bind(getRfPrediction),
1712
1735
  /** @deprecated Use `zernio.reachandfrequency.cancelRfReservation` instead. */
1713
- cancelRfReservation: cancelRfReservation,
1736
+ cancelRfReservation: this._bind(cancelRfReservation),
1714
1737
  /** @deprecated Use `zernio.reachandfrequency.reserveRfPrediction` instead. */
1715
- reserveRfPrediction: reserveRfPrediction,
1738
+ reserveRfPrediction: this._bind(reserveRfPrediction),
1716
1739
  /** @deprecated Use `zernio.leadgen.listLeads` instead. */
1717
- listLeads: listLeads,
1740
+ listLeads: this._bind(listLeads),
1718
1741
  /** @deprecated Use `zernio.leadgen.listLeadForms` instead. */
1719
- listLeadForms: listLeadForms,
1742
+ listLeadForms: this._bind(listLeadForms),
1720
1743
  /** @deprecated Use `zernio.leadgen.createLeadForm` instead. */
1721
- createLeadForm: createLeadForm,
1744
+ createLeadForm: this._bind(createLeadForm),
1722
1745
  /** @deprecated Use `zernio.leadgen.getLeadForm` instead. */
1723
- getLeadForm: getLeadForm,
1746
+ getLeadForm: this._bind(getLeadForm),
1724
1747
  /** @deprecated Use `zernio.leadgen.archiveLeadForm` instead. */
1725
- archiveLeadForm: archiveLeadForm,
1748
+ archiveLeadForm: this._bind(archiveLeadForm),
1726
1749
  /** @deprecated Use `zernio.leadgen.listFormLeads` instead. */
1727
- listFormLeads: listFormLeads,
1750
+ listFormLeads: this._bind(listFormLeads),
1728
1751
  /** @deprecated Use `zernio.leadgen.createTestLead` instead. */
1729
- createTestLead: createTestLead,
1752
+ createTestLead: this._bind(createTestLead),
1730
1753
  /** @deprecated Use `zernio.trackingtags.getAdTrackingTags` instead. */
1731
- getAdTrackingTags: getAdTrackingTags,
1754
+ getAdTrackingTags: this._bind(getAdTrackingTags),
1732
1755
  /** @deprecated Use `zernio.trackingtags.updateAdTrackingTags` instead. */
1733
- updateAdTrackingTags: updateAdTrackingTags,
1756
+ updateAdTrackingTags: this._bind(updateAdTrackingTags),
1734
1757
  /** @deprecated Use `zernio.trackingtags.listTrackingTags` instead. */
1735
- listTrackingTags: listTrackingTags,
1758
+ listTrackingTags: this._bind(listTrackingTags),
1736
1759
  /** @deprecated Use `zernio.trackingtags.createTrackingTag` instead. */
1737
- createTrackingTag: createTrackingTag,
1760
+ createTrackingTag: this._bind(createTrackingTag),
1738
1761
  /** @deprecated Use `zernio.trackingtags.getTrackingTag` instead. */
1739
- getTrackingTag: getTrackingTag,
1762
+ getTrackingTag: this._bind(getTrackingTag),
1740
1763
  /** @deprecated Use `zernio.trackingtags.updateTrackingTag` instead. */
1741
- updateTrackingTag: updateTrackingTag,
1764
+ updateTrackingTag: this._bind(updateTrackingTag),
1742
1765
  /** @deprecated Use `zernio.trackingtags.listTrackingTagSharedAccounts` instead. */
1743
- listTrackingTagSharedAccounts: listTrackingTagSharedAccounts,
1766
+ listTrackingTagSharedAccounts: this._bind(listTrackingTagSharedAccounts),
1744
1767
  /** @deprecated Use `zernio.trackingtags.addTrackingTagSharedAccount` instead. */
1745
- addTrackingTagSharedAccount: addTrackingTagSharedAccount,
1768
+ addTrackingTagSharedAccount: this._bind(addTrackingTagSharedAccount),
1746
1769
  /** @deprecated Use `zernio.trackingtags.removeTrackingTagSharedAccount` instead. */
1747
- removeTrackingTagSharedAccount: removeTrackingTagSharedAccount,
1770
+ removeTrackingTagSharedAccount: this._bind(removeTrackingTagSharedAccount),
1748
1771
  /** @deprecated Use `zernio.trackingtags.getTrackingTagStats` instead. */
1749
- getTrackingTagStats: getTrackingTagStats,
1772
+ getTrackingTagStats: this._bind(getTrackingTagStats),
1750
1773
  };
1751
1774
 
1752
1775
  /**
@@ -1770,26 +1793,32 @@ export class Zernio {
1770
1793
  this.baseURL = options.baseURL ?? 'https://zernio.com/api';
1771
1794
  this._options = options;
1772
1795
 
1773
- // Configure the generated client. User-Agent and defaultHeaders are
1774
- // applied at config time (not via the interceptor) because Node 20's
1775
- // undici treats User-Agent as a forbidden header on already-constructed
1776
- // Request objects, silently dropping `headers.set('User-Agent', …)`.
1777
- client.setConfig({
1778
- baseUrl: this.baseURL,
1779
- headers: {
1780
- 'User-Agent': `zernio-node/${packageJson.version}`,
1781
- ...(options.defaultHeaders ?? {}),
1782
- },
1783
- });
1796
+ // One client per instance. Interceptors used to be registered on the
1797
+ // module-global client, so every `new Zernio()` stacked another auth
1798
+ // interceptor on the same shared client and the last-constructed key won
1799
+ // for ALL in-flight requests — one tenant's call could carry another
1800
+ // tenant's token. User-Agent and defaultHeaders are applied at config time
1801
+ // (not via the interceptor) because Node 20's undici treats User-Agent as a
1802
+ // forbidden header on already-constructed Request objects, silently
1803
+ // dropping `headers.set('User-Agent', …)`.
1804
+ this._client = createClient(
1805
+ createConfig({
1806
+ baseUrl: this.baseURL,
1807
+ headers: {
1808
+ 'User-Agent': `zernio-node/${packageJson.version}`,
1809
+ ...(options.defaultHeaders ?? {}),
1810
+ },
1811
+ })
1812
+ );
1784
1813
 
1785
1814
  // Add auth interceptor
1786
- client.interceptors.request.use((request) => {
1815
+ this._client.interceptors.request.use((request) => {
1787
1816
  request.headers.set('Authorization', `Bearer ${this.apiKey}`);
1788
1817
  return request;
1789
1818
  });
1790
1819
 
1791
1820
  // Add error handling interceptor
1792
- client.interceptors.response.use(async (response) => {
1821
+ this._client.interceptors.response.use(async (response) => {
1793
1822
  if (!response.ok) {
1794
1823
  let body: Record<string, unknown> | undefined;
1795
1824
  try {