@vendasta/social-posts 5.17.1 → 5.18.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.
@@ -3541,6 +3541,67 @@ class DeletePostRequest {
3541
3541
  return toReturn;
3542
3542
  }
3543
3543
  }
3544
+ class GeneratePostsRequest {
3545
+ static fromProto(proto) {
3546
+ let m = new GeneratePostsRequest();
3547
+ m = Object.assign(m, proto);
3548
+ if (proto.numberOfPosts) {
3549
+ m.numberOfPosts = parseInt(proto.numberOfPosts, 10);
3550
+ }
3551
+ if (proto.postLength) {
3552
+ m.postLength = parseInt(proto.postLength, 10);
3553
+ }
3554
+ return m;
3555
+ }
3556
+ constructor(kwargs) {
3557
+ if (!kwargs) {
3558
+ return;
3559
+ }
3560
+ Object.assign(this, kwargs);
3561
+ }
3562
+ toApiJson() {
3563
+ const toReturn = {};
3564
+ if (typeof this.numberOfPosts !== 'undefined') {
3565
+ toReturn['numberOfPosts'] = this.numberOfPosts;
3566
+ }
3567
+ if (typeof this.topic !== 'undefined') {
3568
+ toReturn['topic'] = this.topic;
3569
+ }
3570
+ if (typeof this.commonInstructions !== 'undefined') {
3571
+ toReturn['commonInstructions'] = this.commonInstructions;
3572
+ }
3573
+ if (typeof this.tone !== 'undefined') {
3574
+ toReturn['tone'] = this.tone;
3575
+ }
3576
+ if (typeof this.postLength !== 'undefined') {
3577
+ toReturn['postLength'] = this.postLength;
3578
+ }
3579
+ return toReturn;
3580
+ }
3581
+ }
3582
+ class GeneratePostsResponse {
3583
+ static fromProto(proto) {
3584
+ let m = new GeneratePostsResponse();
3585
+ m = Object.assign(m, proto);
3586
+ if (proto.posts) {
3587
+ m.posts = proto.posts.map(GeneratePostsResponsePost.fromProto);
3588
+ }
3589
+ return m;
3590
+ }
3591
+ constructor(kwargs) {
3592
+ if (!kwargs) {
3593
+ return;
3594
+ }
3595
+ Object.assign(this, kwargs);
3596
+ }
3597
+ toApiJson() {
3598
+ const toReturn = {};
3599
+ if (typeof this.posts !== 'undefined' && this.posts !== null) {
3600
+ toReturn['posts'] = 'toApiJson' in this.posts ? this.posts.toApiJson() : this.posts;
3601
+ }
3602
+ return toReturn;
3603
+ }
3604
+ }
3544
3605
  class GetCommonAiInstructionsRequest {
3545
3606
  static fromProto(proto) {
3546
3607
  let m = new GetCommonAiInstructionsRequest();
@@ -3702,6 +3763,26 @@ class MediaUploadResponse {
3702
3763
  return toReturn;
3703
3764
  }
3704
3765
  }
3766
+ class GeneratePostsResponsePost {
3767
+ static fromProto(proto) {
3768
+ let m = new GeneratePostsResponsePost();
3769
+ m = Object.assign(m, proto);
3770
+ return m;
3771
+ }
3772
+ constructor(kwargs) {
3773
+ if (!kwargs) {
3774
+ return;
3775
+ }
3776
+ Object.assign(this, kwargs);
3777
+ }
3778
+ toApiJson() {
3779
+ const toReturn = {};
3780
+ if (typeof this.text !== 'undefined') {
3781
+ toReturn['text'] = this.text;
3782
+ }
3783
+ return toReturn;
3784
+ }
3785
+ }
3705
3786
  class RepostSocialPostRequest {
3706
3787
  static fromProto(proto) {
3707
3788
  let m = new RepostSocialPostRequest();
@@ -4182,6 +4263,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4182
4263
  args: [{ providedIn: 'root' }]
4183
4264
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
4184
4265
 
4266
+ // *********************************
4267
+ // Code generated by sdkgen
4268
+ // DO NOT EDIT!.
4269
+ //
4270
+ // API Service.
4271
+ // *********************************
4272
+ class ContentGenerationApiService {
4273
+ constructor(http, hostService) {
4274
+ this.http = http;
4275
+ this.hostService = hostService;
4276
+ this._host = this.hostService.hostWithScheme;
4277
+ }
4278
+ apiOptions() {
4279
+ return {
4280
+ headers: new HttpHeaders({
4281
+ 'Content-Type': 'application/json'
4282
+ }),
4283
+ withCredentials: true
4284
+ };
4285
+ }
4286
+ generatePosts(r) {
4287
+ const request = (r.toApiJson) ? r : new GeneratePostsRequest(r);
4288
+ return this.http.post(this._host + "/socialposts.v2.ContentGeneration/GeneratePosts", request.toApiJson(), this.apiOptions())
4289
+ .pipe(map(resp => GeneratePostsResponse.fromProto(resp)));
4290
+ }
4291
+ }
4292
+ ContentGenerationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContentGenerationApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
4293
+ ContentGenerationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContentGenerationApiService, providedIn: 'root' });
4294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContentGenerationApiService, decorators: [{
4295
+ type: Injectable,
4296
+ args: [{ providedIn: 'root' }]
4297
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
4298
+
4185
4299
  // *********************************
4186
4300
  // Code generated by sdkgen
4187
4301
  // DO NOT EDIT!.
@@ -4828,6 +4942,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4828
4942
  args: [{ providedIn: 'root' }]
4829
4943
  }], ctorParameters: function () { return [{ type: CommonAiInstructionsApiService }]; } });
4830
4944
 
4945
+ class ContentGenerationService {
4946
+ constructor(contentGenerationApiService) {
4947
+ this.contentGenerationApiService = contentGenerationApiService;
4948
+ }
4949
+ generatePosts(r) {
4950
+ return this.contentGenerationApiService.generatePosts(r);
4951
+ }
4952
+ }
4953
+ ContentGenerationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContentGenerationService, deps: [{ token: ContentGenerationApiService }], target: i0.ɵɵFactoryTarget.Injectable });
4954
+ ContentGenerationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContentGenerationService, providedIn: 'root' });
4955
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContentGenerationService, decorators: [{
4956
+ type: Injectable,
4957
+ args: [{ providedIn: 'root' }]
4958
+ }], ctorParameters: function () { return [{ type: ContentGenerationApiService }]; } });
4959
+
4831
4960
  class SocialPostsV2Service {
4832
4961
  constructor(socialpostV2ApiService) {
4833
4962
  this.socialpostV2ApiService = socialpostV2ApiService;
@@ -4862,5 +4991,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4862
4991
  * Generated bundle index. Do not edit.
4863
4992
  */
4864
4993
 
4865
- export { AiInstructionService, AiInstructions, CallToAction, CallToActionCallToActionType, CreateCommonAiInstructionsRequest, CreateCommonAiInstructionsResponse, CreateImageRequest, CreateImageResponse, CreateMultilocationPostRequest, CreateMultilocationPostResponse, CreatePostTemplateRequest, CreatePostTemplateResponse, DateRangeFilter, DeleteHashtagsRequest, DeleteMultilocationPostRequest, DeletePostRequest, DeletePostTemplateRequest, DeleteSocialPostRequest, EditMultilocationPostRequest, EditMultilocationPostResponse, Error, Event, FacebookPostStats, FieldMask, GenerateCSVForPerformanceStatsRequest, GenerateCSVForPerformanceStatsResponse, GetCommonAiInstructionsRequest, GetCommonAiInstructionsResponse, GetGeneratedCSVForPerformanceStatsRequest, GetGeneratedCSVForPerformanceStatsResponse, GetMultiSocialPostStatsRequest, GetMultiSocialPostStatsResponse, GetMultiSocialPostsRequest, GetMultiSocialPostsResponse, GetMultilocationPostRequest, GetMultilocationPostResponse, GetPostTemplateRequest, GetPostTemplateResponse, GetScheduledPostCountRequest, GetScheduledPostCountResponse, GetTenorAnonymousIdRequest, GetTenorAnonymousIdResponse, HashTagsService, Hashtag, ImageBlob, ImageCreated, ImageUrl, LinkV2, ListMultilocationPostsForBrandRequest, ListMultilocationPostsForBrandResponse, ListPixabayImagesRequest, ListPixabayImagesResponse, ListPostTemplatesRequest, ListPostTemplatesResponse, ListSocialPostsRequest, ListSocialPostsResponse, ListTenorGifsRequest, ListTenorGifsResponse, Location, Media, MediaEntry, MediaType, MediaUploadRequest, MediaUploadResponse, MessageLength, MetaData, MetadataV2, MultilocationPost, MultilocationPostApiService, MultilocationPostError, MultilocationPostsService, PartnerListScheduledPostsResponse, PartnerListScheduledSocialPostsRequest, PartnerListScheduledSocialPostsRequestFilters, PixabayImage, PixabayImageService, PostAction, PostActionV2, PostContentV2, PostCustomization, PostCustomizationV2, PostData, PostEvent, PostEventV2, PostMediaV2, PostPerformanceApiService, PostPerformanceService, PostStatusV2, PostTemplate, PostTemplatesService, PostType, PostTypeV2, PostingStatus, RemoveFromMultilocationPostRequest, RemoveReason, ReplaceHashtagsRequest, RepostSocialPostRequest, SSIDPostType, SchedulePostRequest, SchedulePostResponse, SchedulePostStatus, ScheduleToAllPagesRequest, ScheduleToAllPagesResponse, SearchHashtagRequest, SearchHashtagResponse, SocialPost, SocialPostData, SocialPostDeletionStatus, SocialPostOutput, SocialPostRequest, SocialPostResponse, SocialPostService, SocialPostStats, SocialPostV2, SocialPostsService, SocialPostsV2Service, SuggestMessageRequest, SuggestMessageResponse, TemplateType, TenorGif, TenorGifMediaMapEntry, TenorGifsService, TenorMediaObject, TwitterPostStats, UpdateCommonAiInstructionsRequest, UpdateCommonAiInstructionsResponse, UpdatePostTemplateRequest, UpdateSocialPostRequest, UpdateSocialPostResponse, YoutubeCustomization, YoutubeCustomizationPrivacyStatus, YoutubeCustomizationV2, YoutubeCustomizationV2PrivacyStatusV2 };
4994
+ export { AiInstructionService, AiInstructions, CallToAction, CallToActionCallToActionType, ContentGenerationService, CreateCommonAiInstructionsRequest, CreateCommonAiInstructionsResponse, CreateImageRequest, CreateImageResponse, CreateMultilocationPostRequest, CreateMultilocationPostResponse, CreatePostTemplateRequest, CreatePostTemplateResponse, DateRangeFilter, DeleteHashtagsRequest, DeleteMultilocationPostRequest, DeletePostRequest, DeletePostTemplateRequest, DeleteSocialPostRequest, EditMultilocationPostRequest, EditMultilocationPostResponse, Error, Event, FacebookPostStats, FieldMask, GenerateCSVForPerformanceStatsRequest, GenerateCSVForPerformanceStatsResponse, GeneratePostsRequest, GeneratePostsResponse, GeneratePostsResponsePost, GetCommonAiInstructionsRequest, GetCommonAiInstructionsResponse, GetGeneratedCSVForPerformanceStatsRequest, GetGeneratedCSVForPerformanceStatsResponse, GetMultiSocialPostStatsRequest, GetMultiSocialPostStatsResponse, GetMultiSocialPostsRequest, GetMultiSocialPostsResponse, GetMultilocationPostRequest, GetMultilocationPostResponse, GetPostTemplateRequest, GetPostTemplateResponse, GetScheduledPostCountRequest, GetScheduledPostCountResponse, GetTenorAnonymousIdRequest, GetTenorAnonymousIdResponse, HashTagsService, Hashtag, ImageBlob, ImageCreated, ImageUrl, LinkV2, ListMultilocationPostsForBrandRequest, ListMultilocationPostsForBrandResponse, ListPixabayImagesRequest, ListPixabayImagesResponse, ListPostTemplatesRequest, ListPostTemplatesResponse, ListSocialPostsRequest, ListSocialPostsResponse, ListTenorGifsRequest, ListTenorGifsResponse, Location, Media, MediaEntry, MediaType, MediaUploadRequest, MediaUploadResponse, MessageLength, MetaData, MetadataV2, MultilocationPost, MultilocationPostApiService, MultilocationPostError, MultilocationPostsService, PartnerListScheduledPostsResponse, PartnerListScheduledSocialPostsRequest, PartnerListScheduledSocialPostsRequestFilters, PixabayImage, PixabayImageService, PostAction, PostActionV2, PostContentV2, PostCustomization, PostCustomizationV2, PostData, PostEvent, PostEventV2, PostMediaV2, PostPerformanceApiService, PostPerformanceService, PostStatusV2, PostTemplate, PostTemplatesService, PostType, PostTypeV2, PostingStatus, RemoveFromMultilocationPostRequest, RemoveReason, ReplaceHashtagsRequest, RepostSocialPostRequest, SSIDPostType, SchedulePostRequest, SchedulePostResponse, SchedulePostStatus, ScheduleToAllPagesRequest, ScheduleToAllPagesResponse, SearchHashtagRequest, SearchHashtagResponse, SocialPost, SocialPostData, SocialPostDeletionStatus, SocialPostOutput, SocialPostRequest, SocialPostResponse, SocialPostService, SocialPostStats, SocialPostV2, SocialPostsService, SocialPostsV2Service, SuggestMessageRequest, SuggestMessageResponse, TemplateType, TenorGif, TenorGifMediaMapEntry, TenorGifsService, TenorMediaObject, TwitterPostStats, UpdateCommonAiInstructionsRequest, UpdateCommonAiInstructionsResponse, UpdatePostTemplateRequest, UpdateSocialPostRequest, UpdateSocialPostResponse, YoutubeCustomization, YoutubeCustomizationPrivacyStatus, YoutubeCustomizationV2, YoutubeCustomizationV2PrivacyStatusV2 };
4866
4995
  //# sourceMappingURL=vendasta-social-posts.mjs.map