@vendasta/social-posts 5.28.0 → 5.30.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.
@@ -5656,6 +5656,293 @@ function enumStringToValue(enumRef, value) {
5656
5656
  }
5657
5657
  return enumRef[value];
5658
5658
  }
5659
+ class Author {
5660
+ static fromProto(proto) {
5661
+ let m = new Author();
5662
+ m = Object.assign(m, proto);
5663
+ if (proto.id) {
5664
+ m.id = parseInt(proto.id, 10);
5665
+ }
5666
+ return m;
5667
+ }
5668
+ constructor(kwargs) {
5669
+ if (!kwargs) {
5670
+ return;
5671
+ }
5672
+ Object.assign(this, kwargs);
5673
+ }
5674
+ toApiJson() {
5675
+ const toReturn = {};
5676
+ if (typeof this.id !== 'undefined') {
5677
+ toReturn['id'] = this.id;
5678
+ }
5679
+ if (typeof this.name !== 'undefined') {
5680
+ toReturn['name'] = this.name;
5681
+ }
5682
+ return toReturn;
5683
+ }
5684
+ }
5685
+ class AuthorsRequest {
5686
+ static fromProto(proto) {
5687
+ let m = new AuthorsRequest();
5688
+ m = Object.assign(m, proto);
5689
+ return m;
5690
+ }
5691
+ constructor(kwargs) {
5692
+ if (!kwargs) {
5693
+ return;
5694
+ }
5695
+ Object.assign(this, kwargs);
5696
+ }
5697
+ toApiJson() {
5698
+ const toReturn = {};
5699
+ if (typeof this.businessId !== 'undefined') {
5700
+ toReturn['businessId'] = this.businessId;
5701
+ }
5702
+ if (typeof this.socialServiceId !== 'undefined') {
5703
+ toReturn['socialServiceId'] = this.socialServiceId;
5704
+ }
5705
+ return toReturn;
5706
+ }
5707
+ }
5708
+ class AuthorsResponse {
5709
+ static fromProto(proto) {
5710
+ let m = new AuthorsResponse();
5711
+ m = Object.assign(m, proto);
5712
+ if (proto.authors) {
5713
+ m.authors = proto.authors.map(Author.fromProto);
5714
+ }
5715
+ return m;
5716
+ }
5717
+ constructor(kwargs) {
5718
+ if (!kwargs) {
5719
+ return;
5720
+ }
5721
+ Object.assign(this, kwargs);
5722
+ }
5723
+ toApiJson() {
5724
+ const toReturn = {};
5725
+ if (typeof this.authors !== 'undefined' && this.authors !== null) {
5726
+ toReturn['authors'] = 'toApiJson' in this.authors ? this.authors.toApiJson() : this.authors;
5727
+ }
5728
+ return toReturn;
5729
+ }
5730
+ }
5731
+ class BlogImage {
5732
+ static fromProto(proto) {
5733
+ let m = new BlogImage();
5734
+ m = Object.assign(m, proto);
5735
+ return m;
5736
+ }
5737
+ constructor(kwargs) {
5738
+ if (!kwargs) {
5739
+ return;
5740
+ }
5741
+ Object.assign(this, kwargs);
5742
+ }
5743
+ toApiJson() {
5744
+ const toReturn = {};
5745
+ if (typeof this.path !== 'undefined') {
5746
+ toReturn['path'] = this.path;
5747
+ }
5748
+ if (typeof this.publicUrl !== 'undefined') {
5749
+ toReturn['publicUrl'] = this.publicUrl;
5750
+ }
5751
+ return toReturn;
5752
+ }
5753
+ }
5754
+ class BlogVideo {
5755
+ static fromProto(proto) {
5756
+ let m = new BlogVideo();
5757
+ m = Object.assign(m, proto);
5758
+ return m;
5759
+ }
5760
+ constructor(kwargs) {
5761
+ if (!kwargs) {
5762
+ return;
5763
+ }
5764
+ Object.assign(this, kwargs);
5765
+ }
5766
+ toApiJson() {
5767
+ const toReturn = {};
5768
+ if (typeof this.path !== 'undefined') {
5769
+ toReturn['path'] = this.path;
5770
+ }
5771
+ if (typeof this.publicUrl !== 'undefined') {
5772
+ toReturn['publicUrl'] = this.publicUrl;
5773
+ }
5774
+ return toReturn;
5775
+ }
5776
+ }
5777
+ class Category {
5778
+ static fromProto(proto) {
5779
+ let m = new Category();
5780
+ m = Object.assign(m, proto);
5781
+ if (proto.id) {
5782
+ m.id = parseInt(proto.id, 10);
5783
+ }
5784
+ return m;
5785
+ }
5786
+ constructor(kwargs) {
5787
+ if (!kwargs) {
5788
+ return;
5789
+ }
5790
+ Object.assign(this, kwargs);
5791
+ }
5792
+ toApiJson() {
5793
+ const toReturn = {};
5794
+ if (typeof this.id !== 'undefined') {
5795
+ toReturn['id'] = this.id;
5796
+ }
5797
+ if (typeof this.name !== 'undefined') {
5798
+ toReturn['name'] = this.name;
5799
+ }
5800
+ return toReturn;
5801
+ }
5802
+ }
5803
+ class CategoryRequest {
5804
+ static fromProto(proto) {
5805
+ let m = new CategoryRequest();
5806
+ m = Object.assign(m, proto);
5807
+ return m;
5808
+ }
5809
+ constructor(kwargs) {
5810
+ if (!kwargs) {
5811
+ return;
5812
+ }
5813
+ Object.assign(this, kwargs);
5814
+ }
5815
+ toApiJson() {
5816
+ const toReturn = {};
5817
+ if (typeof this.socialServiceId !== 'undefined') {
5818
+ toReturn['socialServiceId'] = this.socialServiceId;
5819
+ }
5820
+ if (typeof this.businessId !== 'undefined') {
5821
+ toReturn['businessId'] = this.businessId;
5822
+ }
5823
+ return toReturn;
5824
+ }
5825
+ }
5826
+ class CategoryResponse {
5827
+ static fromProto(proto) {
5828
+ let m = new CategoryResponse();
5829
+ m = Object.assign(m, proto);
5830
+ if (proto.categories) {
5831
+ m.categories = proto.categories.map(Category.fromProto);
5832
+ }
5833
+ return m;
5834
+ }
5835
+ constructor(kwargs) {
5836
+ if (!kwargs) {
5837
+ return;
5838
+ }
5839
+ Object.assign(this, kwargs);
5840
+ }
5841
+ toApiJson() {
5842
+ const toReturn = {};
5843
+ if (typeof this.categories !== 'undefined' && this.categories !== null) {
5844
+ toReturn['categories'] = 'toApiJson' in this.categories ? this.categories.toApiJson() : this.categories;
5845
+ }
5846
+ return toReturn;
5847
+ }
5848
+ }
5849
+ class PublishPostRequest {
5850
+ static fromProto(proto) {
5851
+ let m = new PublishPostRequest();
5852
+ m = Object.assign(m, proto);
5853
+ if (proto.images) {
5854
+ m.images = proto.images.map(BlogImage.fromProto);
5855
+ }
5856
+ if (proto.videos) {
5857
+ m.videos = proto.videos.map(BlogVideo.fromProto);
5858
+ }
5859
+ if (proto.author) {
5860
+ m.author = Author.fromProto(proto.author);
5861
+ }
5862
+ if (proto.categories) {
5863
+ m.categories = proto.categories.map(Category.fromProto);
5864
+ }
5865
+ if (proto.postDateTime) {
5866
+ m.postDateTime = new Date(proto.postDateTime);
5867
+ }
5868
+ return m;
5869
+ }
5870
+ constructor(kwargs) {
5871
+ if (!kwargs) {
5872
+ return;
5873
+ }
5874
+ Object.assign(this, kwargs);
5875
+ }
5876
+ toApiJson() {
5877
+ const toReturn = {};
5878
+ if (typeof this.businessId !== 'undefined') {
5879
+ toReturn['businessId'] = this.businessId;
5880
+ }
5881
+ if (typeof this.socialServiceId !== 'undefined') {
5882
+ toReturn['socialServiceId'] = this.socialServiceId;
5883
+ }
5884
+ if (typeof this.title !== 'undefined') {
5885
+ toReturn['title'] = this.title;
5886
+ }
5887
+ if (typeof this.content !== 'undefined') {
5888
+ toReturn['content'] = this.content;
5889
+ }
5890
+ if (typeof this.images !== 'undefined' && this.images !== null) {
5891
+ toReturn['images'] = 'toApiJson' in this.images ? this.images.toApiJson() : this.images;
5892
+ }
5893
+ if (typeof this.videos !== 'undefined' && this.videos !== null) {
5894
+ toReturn['videos'] = 'toApiJson' in this.videos ? this.videos.toApiJson() : this.videos;
5895
+ }
5896
+ if (typeof this.siteType !== 'undefined') {
5897
+ toReturn['siteType'] = this.siteType;
5898
+ }
5899
+ if (typeof this.author !== 'undefined' && this.author !== null) {
5900
+ toReturn['author'] = 'toApiJson' in this.author ? this.author.toApiJson() : this.author;
5901
+ }
5902
+ if (typeof this.categories !== 'undefined' && this.categories !== null) {
5903
+ toReturn['categories'] = 'toApiJson' in this.categories ? this.categories.toApiJson() : this.categories;
5904
+ }
5905
+ if (typeof this.tags !== 'undefined') {
5906
+ toReturn['tags'] = this.tags;
5907
+ }
5908
+ if (typeof this.postTags !== 'undefined') {
5909
+ toReturn['postTags'] = this.postTags;
5910
+ }
5911
+ if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
5912
+ toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
5913
+ }
5914
+ if (typeof this.userId !== 'undefined') {
5915
+ toReturn['userId'] = this.userId;
5916
+ }
5917
+ if (typeof this.userName !== 'undefined') {
5918
+ toReturn['userName'] = this.userName;
5919
+ }
5920
+ if (typeof this.partnerId !== 'undefined') {
5921
+ toReturn['partnerId'] = this.partnerId;
5922
+ }
5923
+ return toReturn;
5924
+ }
5925
+ }
5926
+ class PublishPostResponse {
5927
+ static fromProto(proto) {
5928
+ let m = new PublishPostResponse();
5929
+ m = Object.assign(m, proto);
5930
+ return m;
5931
+ }
5932
+ constructor(kwargs) {
5933
+ if (!kwargs) {
5934
+ return;
5935
+ }
5936
+ Object.assign(this, kwargs);
5937
+ }
5938
+ toApiJson() {
5939
+ const toReturn = {};
5940
+ if (typeof this.internalPostId !== 'undefined') {
5941
+ toReturn['internalPostId'] = this.internalPostId;
5942
+ }
5943
+ return toReturn;
5944
+ }
5945
+ }
5659
5946
  class StatusRequest {
5660
5947
  static fromProto(proto) {
5661
5948
  let m = new StatusRequest();
@@ -6543,6 +6830,21 @@ class WordpressPluginApiService {
6543
6830
  return this.http.post(this._host + "/socialposts.v2.WordpressPluginService/Status", request.toApiJson(), this.apiOptions())
6544
6831
  .pipe(map(resp => StatusResponse.fromProto(resp)));
6545
6832
  }
6833
+ getAuthors(r) {
6834
+ const request = (r.toApiJson) ? r : new AuthorsRequest(r);
6835
+ return this.http.post(this._host + "/socialposts.v2.WordpressPluginService/GetAuthors", request.toApiJson(), this.apiOptions())
6836
+ .pipe(map(resp => AuthorsResponse.fromProto(resp)));
6837
+ }
6838
+ getCategories(r) {
6839
+ const request = (r.toApiJson) ? r : new CategoryRequest(r);
6840
+ return this.http.post(this._host + "/socialposts.v2.WordpressPluginService/GetCategories", request.toApiJson(), this.apiOptions())
6841
+ .pipe(map(resp => CategoryResponse.fromProto(resp)));
6842
+ }
6843
+ publishPost(r) {
6844
+ const request = (r.toApiJson) ? r : new PublishPostRequest(r);
6845
+ return this.http.post(this._host + "/socialposts.v2.WordpressPluginService/PublishPost", request.toApiJson(), this.apiOptions())
6846
+ .pipe(map(resp => PublishPostResponse.fromProto(resp)));
6847
+ }
6546
6848
  }
6547
6849
  WordpressPluginApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordpressPluginApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
6548
6850
  WordpressPluginApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordpressPluginApiService, providedIn: 'root' });
@@ -7019,6 +7321,12 @@ class WordpressPluginService {
7019
7321
  status(statusRequestInterface) {
7020
7322
  return this.wordpressPluginApiService.status(statusRequestInterface);
7021
7323
  }
7324
+ getCategories(categoryRequestInterface) {
7325
+ return this.wordpressPluginApiService.getCategories(categoryRequestInterface);
7326
+ }
7327
+ publishPost(PublishPostRequestInterface) {
7328
+ return this.wordpressPluginApiService.publishPost(PublishPostRequestInterface);
7329
+ }
7022
7330
  }
7023
7331
  WordpressPluginService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordpressPluginService, deps: [{ token: WordpressPluginApiService }], target: i0.ɵɵFactoryTarget.Injectable });
7024
7332
  WordpressPluginService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordpressPluginService, providedIn: 'root' });
@@ -7031,5 +7339,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
7031
7339
  * Generated bundle index. Do not edit.
7032
7340
  */
7033
7341
 
7034
- export { Access, Action, ActionType, AiInstructionService, AiInstructions, Ancestry, BlogConnection, BlogConnectionService, CallToAction, CallToActionCallToActionType, ChatBotService, ChatBotV2Service, ChatMessage, Collection, ContentGenerationService, ContentLength, CreateBlogConnectionRequest, CreateBlogConnectionResponse, CreateCommonAiInstructionsRequest, CreateCommonAiInstructionsResponse, CreateImageRequest, CreateImageResponse, CreateMultilocationPostRequest, CreateMultilocationPostResponse, CreatePostTemplateRequest, CreatePostTemplateResponse, CuratedContentPost, DateRangeFilter, DeleteBlogConnectionRequest, DeleteHashtagsRequest, DeleteMultilocationPostRequest, DeletePostRequest, DeletePostTemplateRequest, DeleteSocialPostRequest, EditMultilocationPostRequest, EditMultilocationPostResponse, EndChatRequest, Error, Event, FacebookPostStats, FieldMask, GenerateAiRequest, GenerateAiResponse, GenerateCSVForPerformanceStatsRequest, GenerateCSVForPerformanceStatsResponse, GeneratePostsRequest, GeneratePostsResponse, GeneratePostsResponsePost, GenerateType, GetBlogConnectionRequest, GetBlogConnectionResponse, GetCommonAiInstructionsRequest, GetCommonAiInstructionsResponse, GetGeneratedCSVForPerformanceStatsRequest, GetGeneratedCSVForPerformanceStatsResponse, GetMultiSocialPostStatsRequest, GetMultiSocialPostStatsResponse, GetMultiSocialPostsRequest, GetMultiSocialPostsResponse, GetMultilocationPostRequest, GetMultilocationPostResponse, GetPostTemplateRequest, GetPostTemplateResponse, GetScheduledPostCountRequest, GetScheduledPostCountResponse, GetTenorAnonymousIdRequest, GetTenorAnonymousIdResponse, HashTagsService, Hashtag, Image, ImageBlob, ImageCreated, ImageUrl, LinkV2, Links, ListBlogConnectionRequest, ListBlogConnectionResponse, ListCuratedContentRequest, ListCuratedContentResponse, ListMultilocationPostsForBrandRequest, ListMultilocationPostsForBrandResponse, ListPixabayImagesRequest, ListPixabayImagesResponse, ListPostTemplatesRequest, ListPostTemplatesResponse, ListSocialPostsRequest, ListSocialPostsResponse, ListTenorGifsRequest, ListTenorGifsResponse, ListUnsplashImagesRequest, ListUnsplashImagesResponse, Location, Media, MediaEntry, MediaType, MediaUploadRequest, MediaUploadResponse, MessageLength, MetaData, MetadataV2, MultiResponse, MultilocationPost, MultilocationPostApiService, MultilocationPostError, MultilocationPostsService, PartnerListScheduledPostsResponse, PartnerListScheduledSocialPostsRequest, PartnerListScheduledSocialPostsRequestFilters, Photo, PixabayImage, PixabayImageService, PostAction, PostActionV2, PostContentV2, PostCustomization, PostCustomizationV2, PostData, PostEvent, PostEventV2, PostMediaV2, PostPerformanceApiService, PostPerformanceService, PostStatusV2, PostTemplate, PostTemplatesService, PostType, PostTypeV2, PostingStatus, RemoveFromMultilocationPostRequest, RemoveReason, ReplaceHashtagsRequest, RepostSocialPostRequest, Response, Role, SSIDPostType, SchedulePostRequest, SchedulePostResponse, SchedulePostStatus, ScheduleToAllPagesRequest, ScheduleToAllPagesResponse, SearchHashtagRequest, SearchHashtagResponse, SendMessageRequest, SendMessageResponse, SendMessageV2Request, SendMessageV2Response, Social, SocialPost, SocialPostData, SocialPostDeletionStatus, SocialPostOutput, SocialPostRequest, SocialPostResponse, SocialPostService, SocialPostStats, SocialPostV2, SocialPostsService, SocialPostsV2Service, Source, StartChatRequest, StartChatResponse, StatusRequest, StatusResponse, SubAncestry, SuggestMessageRequest, SuggestMessageResponse, Tags, TemplateType, TenorGif, TenorGifMediaMapEntry, TenorGifsService, TenorMediaObject, TikTokCustomization, TikTokCustomizationV2, TwitterPostStats, UnsplashImageService, UpdateBlogConnectionRequest, UpdateCommonAiInstructionsRequest, UpdateCommonAiInstructionsResponse, UpdatePostTemplateRequest, UpdateSocialPostRequest, UpdateSocialPostResponse, UploadToStorageRequest, UploadToStorageResponse, UploadedMedia, Urls, User, UserLink, WordpressPluginService, YoutubeCustomization, YoutubeCustomizationPrivacyStatus, YoutubeCustomizationV2, YoutubeCustomizationV2PrivacyStatusV2 };
7342
+ export { Access, Action, ActionType, AiInstructionService, AiInstructions, Ancestry, Author, AuthorsRequest, AuthorsResponse, BlogConnection, BlogConnectionService, BlogImage, BlogVideo, CallToAction, CallToActionCallToActionType, Category, CategoryRequest, CategoryResponse, ChatBotService, ChatBotV2Service, ChatMessage, Collection, ContentGenerationService, ContentLength, CreateBlogConnectionRequest, CreateBlogConnectionResponse, CreateCommonAiInstructionsRequest, CreateCommonAiInstructionsResponse, CreateImageRequest, CreateImageResponse, CreateMultilocationPostRequest, CreateMultilocationPostResponse, CreatePostTemplateRequest, CreatePostTemplateResponse, CuratedContentPost, DateRangeFilter, DeleteBlogConnectionRequest, DeleteHashtagsRequest, DeleteMultilocationPostRequest, DeletePostRequest, DeletePostTemplateRequest, DeleteSocialPostRequest, EditMultilocationPostRequest, EditMultilocationPostResponse, EndChatRequest, Error, Event, FacebookPostStats, FieldMask, GenerateAiRequest, GenerateAiResponse, GenerateCSVForPerformanceStatsRequest, GenerateCSVForPerformanceStatsResponse, GeneratePostsRequest, GeneratePostsResponse, GeneratePostsResponsePost, GenerateType, GetBlogConnectionRequest, GetBlogConnectionResponse, GetCommonAiInstructionsRequest, GetCommonAiInstructionsResponse, GetGeneratedCSVForPerformanceStatsRequest, GetGeneratedCSVForPerformanceStatsResponse, GetMultiSocialPostStatsRequest, GetMultiSocialPostStatsResponse, GetMultiSocialPostsRequest, GetMultiSocialPostsResponse, GetMultilocationPostRequest, GetMultilocationPostResponse, GetPostTemplateRequest, GetPostTemplateResponse, GetScheduledPostCountRequest, GetScheduledPostCountResponse, GetTenorAnonymousIdRequest, GetTenorAnonymousIdResponse, HashTagsService, Hashtag, Image, ImageBlob, ImageCreated, ImageUrl, LinkV2, Links, ListBlogConnectionRequest, ListBlogConnectionResponse, ListCuratedContentRequest, ListCuratedContentResponse, ListMultilocationPostsForBrandRequest, ListMultilocationPostsForBrandResponse, ListPixabayImagesRequest, ListPixabayImagesResponse, ListPostTemplatesRequest, ListPostTemplatesResponse, ListSocialPostsRequest, ListSocialPostsResponse, ListTenorGifsRequest, ListTenorGifsResponse, ListUnsplashImagesRequest, ListUnsplashImagesResponse, Location, Media, MediaEntry, MediaType, MediaUploadRequest, MediaUploadResponse, MessageLength, MetaData, MetadataV2, MultiResponse, MultilocationPost, MultilocationPostApiService, MultilocationPostError, MultilocationPostsService, PartnerListScheduledPostsResponse, PartnerListScheduledSocialPostsRequest, PartnerListScheduledSocialPostsRequestFilters, Photo, PixabayImage, PixabayImageService, PostAction, PostActionV2, PostContentV2, PostCustomization, PostCustomizationV2, PostData, PostEvent, PostEventV2, PostMediaV2, PostPerformanceApiService, PostPerformanceService, PostStatusV2, PostTemplate, PostTemplatesService, PostType, PostTypeV2, PostingStatus, PublishPostRequest, PublishPostResponse, RemoveFromMultilocationPostRequest, RemoveReason, ReplaceHashtagsRequest, RepostSocialPostRequest, Response, Role, SSIDPostType, SchedulePostRequest, SchedulePostResponse, SchedulePostStatus, ScheduleToAllPagesRequest, ScheduleToAllPagesResponse, SearchHashtagRequest, SearchHashtagResponse, SendMessageRequest, SendMessageResponse, SendMessageV2Request, SendMessageV2Response, Social, SocialPost, SocialPostData, SocialPostDeletionStatus, SocialPostOutput, SocialPostRequest, SocialPostResponse, SocialPostService, SocialPostStats, SocialPostV2, SocialPostsService, SocialPostsV2Service, Source, StartChatRequest, StartChatResponse, StatusRequest, StatusResponse, SubAncestry, SuggestMessageRequest, SuggestMessageResponse, Tags, TemplateType, TenorGif, TenorGifMediaMapEntry, TenorGifsService, TenorMediaObject, TikTokCustomization, TikTokCustomizationV2, TwitterPostStats, UnsplashImageService, UpdateBlogConnectionRequest, UpdateCommonAiInstructionsRequest, UpdateCommonAiInstructionsResponse, UpdatePostTemplateRequest, UpdateSocialPostRequest, UpdateSocialPostResponse, UploadToStorageRequest, UploadToStorageResponse, UploadedMedia, Urls, User, UserLink, WordpressPluginService, YoutubeCustomization, YoutubeCustomizationPrivacyStatus, YoutubeCustomizationV2, YoutubeCustomizationV2PrivacyStatusV2 };
7035
7343
  //# sourceMappingURL=vendasta-social-posts.mjs.map