@vendasta/social-posts 5.15.1 → 5.15.3

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.
Files changed (31) hide show
  1. package/esm2020/lib/_internal/interfaces/api-v2.interface.mjs +1 -1
  2. package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
  3. package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
  4. package/esm2020/lib/_internal/interfaces/social-post-v2.interface.mjs +1 -1
  5. package/esm2020/lib/_internal/interfaces/social-posts.interface.mjs +1 -1
  6. package/esm2020/lib/_internal/objects/api-v2.mjs +8 -2
  7. package/esm2020/lib/_internal/objects/api.mjs +20 -2
  8. package/esm2020/lib/_internal/objects/index.mjs +3 -3
  9. package/esm2020/lib/_internal/objects/social-post-v2.mjs +27 -1
  10. package/esm2020/lib/_internal/objects/social-posts.mjs +27 -1
  11. package/esm2020/lib/post-templates.service.mjs +5 -3
  12. package/esm2020/lib/social-post-v2.service.mjs +3 -3
  13. package/esm2020/lib/social-posts.service.mjs +3 -3
  14. package/fesm2015/vendasta-social-posts.mjs +85 -7
  15. package/fesm2015/vendasta-social-posts.mjs.map +1 -1
  16. package/fesm2020/vendasta-social-posts.mjs +85 -7
  17. package/fesm2020/vendasta-social-posts.mjs.map +1 -1
  18. package/lib/_internal/interfaces/api-v2.interface.d.ts +2 -1
  19. package/lib/_internal/interfaces/api.interface.d.ts +4 -1
  20. package/lib/_internal/interfaces/index.d.ts +2 -2
  21. package/lib/_internal/interfaces/social-post-v2.interface.d.ts +4 -0
  22. package/lib/_internal/interfaces/social-posts.interface.d.ts +4 -0
  23. package/lib/_internal/objects/api-v2.d.ts +2 -1
  24. package/lib/_internal/objects/api.d.ts +4 -1
  25. package/lib/_internal/objects/index.d.ts +2 -2
  26. package/lib/_internal/objects/social-post-v2.d.ts +7 -0
  27. package/lib/_internal/objects/social-posts.d.ts +7 -0
  28. package/lib/post-templates.service.d.ts +3 -3
  29. package/lib/social-post-v2.service.d.ts +2 -2
  30. package/lib/social-posts.service.d.ts +2 -2
  31. package/package.json +1 -1
@@ -349,6 +349,9 @@ class PostTemplate {
349
349
  if (proto.postType) {
350
350
  m.postType = enumStringToValue$8(PostType, proto.postType);
351
351
  }
352
+ if (proto.youtubeCustomization) {
353
+ m.youtubeCustomization = YoutubeCustomization.fromProto(proto.youtubeCustomization);
354
+ }
352
355
  return m;
353
356
  }
354
357
  constructor(kwargs) {
@@ -410,6 +413,9 @@ class PostTemplate {
410
413
  if (typeof this.postType !== 'undefined') {
411
414
  toReturn['postType'] = this.postType;
412
415
  }
416
+ if (typeof this.youtubeCustomization !== 'undefined' && this.youtubeCustomization !== null) {
417
+ toReturn['youtubeCustomization'] = 'toApiJson' in this.youtubeCustomization ? this.youtubeCustomization.toApiJson() : this.youtubeCustomization;
418
+ }
413
419
  return toReturn;
414
420
  }
415
421
  }
@@ -614,6 +620,26 @@ class SocialPostData {
614
620
  return toReturn;
615
621
  }
616
622
  }
623
+ class YoutubeCustomization {
624
+ static fromProto(proto) {
625
+ let m = new YoutubeCustomization();
626
+ m = Object.assign(m, proto);
627
+ return m;
628
+ }
629
+ constructor(kwargs) {
630
+ if (!kwargs) {
631
+ return;
632
+ }
633
+ Object.assign(this, kwargs);
634
+ }
635
+ toApiJson() {
636
+ const toReturn = {};
637
+ if (typeof this.title !== 'undefined') {
638
+ toReturn['title'] = this.title;
639
+ }
640
+ return toReturn;
641
+ }
642
+ }
617
643
 
618
644
  function enumStringToValue$7(enumRef, value) {
619
645
  if (typeof value === 'number') {
@@ -1328,6 +1354,9 @@ class CreatePostTemplateRequest {
1328
1354
  if (proto.postType) {
1329
1355
  m.postType = enumStringToValue$3(PostType, proto.postType);
1330
1356
  }
1357
+ if (proto.youtubeCustomization) {
1358
+ m.youtubeCustomization = YoutubeCustomization.fromProto(proto.youtubeCustomization);
1359
+ }
1331
1360
  return m;
1332
1361
  }
1333
1362
  constructor(kwargs) {
@@ -1380,6 +1409,9 @@ class CreatePostTemplateRequest {
1380
1409
  if (typeof this.postType !== 'undefined') {
1381
1410
  toReturn['postType'] = this.postType;
1382
1411
  }
1412
+ if (typeof this.youtubeCustomization !== 'undefined' && this.youtubeCustomization !== null) {
1413
+ toReturn['youtubeCustomization'] = 'toApiJson' in this.youtubeCustomization ? this.youtubeCustomization.toApiJson() : this.youtubeCustomization;
1414
+ }
1383
1415
  return toReturn;
1384
1416
  }
1385
1417
  }
@@ -2769,6 +2801,9 @@ class SuggestMessageRequest {
2769
2801
  if (proto.type) {
2770
2802
  m.type = enumStringToValue$3(TemplateType, proto.type);
2771
2803
  }
2804
+ if (proto.metadata) {
2805
+ m.metadata = proto.metadata.map(MetaData.fromProto);
2806
+ }
2772
2807
  return m;
2773
2808
  }
2774
2809
  constructor(kwargs) {
@@ -2791,6 +2826,9 @@ class SuggestMessageRequest {
2791
2826
  if (typeof this.type !== 'undefined') {
2792
2827
  toReturn['type'] = this.type;
2793
2828
  }
2829
+ if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
2830
+ toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
2831
+ }
2794
2832
  return toReturn;
2795
2833
  }
2796
2834
  }
@@ -2830,6 +2868,9 @@ class UpdatePostTemplateRequest {
2830
2868
  if (proto.postType) {
2831
2869
  m.postType = enumStringToValue$3(PostType, proto.postType);
2832
2870
  }
2871
+ if (proto.youtubeCustomization) {
2872
+ m.youtubeCustomization = YoutubeCustomization.fromProto(proto.youtubeCustomization);
2873
+ }
2833
2874
  return m;
2834
2875
  }
2835
2876
  constructor(kwargs) {
@@ -2885,6 +2926,9 @@ class UpdatePostTemplateRequest {
2885
2926
  if (typeof this.postType !== 'undefined') {
2886
2927
  toReturn['postType'] = this.postType;
2887
2928
  }
2929
+ if (typeof this.youtubeCustomization !== 'undefined' && this.youtubeCustomization !== null) {
2930
+ toReturn['youtubeCustomization'] = 'toApiJson' in this.youtubeCustomization ? this.youtubeCustomization.toApiJson() : this.youtubeCustomization;
2931
+ }
2888
2932
  return toReturn;
2889
2933
  }
2890
2934
  }
@@ -3024,6 +3068,9 @@ class PostCustomizationV2 {
3024
3068
  if (proto.action) {
3025
3069
  m.action = PostActionV2.fromProto(proto.action);
3026
3070
  }
3071
+ if (proto.youtubeCustomization) {
3072
+ m.youtubeCustomization = YoutubeCustomizationV2.fromProto(proto.youtubeCustomization);
3073
+ }
3027
3074
  return m;
3028
3075
  }
3029
3076
  constructor(kwargs) {
@@ -3040,6 +3087,9 @@ class PostCustomizationV2 {
3040
3087
  if (typeof this.action !== 'undefined' && this.action !== null) {
3041
3088
  toReturn['action'] = 'toApiJson' in this.action ? this.action.toApiJson() : this.action;
3042
3089
  }
3090
+ if (typeof this.youtubeCustomization !== 'undefined' && this.youtubeCustomization !== null) {
3091
+ toReturn['youtubeCustomization'] = 'toApiJson' in this.youtubeCustomization ? this.youtubeCustomization.toApiJson() : this.youtubeCustomization;
3092
+ }
3043
3093
  return toReturn;
3044
3094
  }
3045
3095
  }
@@ -3175,6 +3225,26 @@ class SocialPostV2 {
3175
3225
  return toReturn;
3176
3226
  }
3177
3227
  }
3228
+ class YoutubeCustomizationV2 {
3229
+ static fromProto(proto) {
3230
+ let m = new YoutubeCustomizationV2();
3231
+ m = Object.assign(m, proto);
3232
+ return m;
3233
+ }
3234
+ constructor(kwargs) {
3235
+ if (!kwargs) {
3236
+ return;
3237
+ }
3238
+ Object.assign(this, kwargs);
3239
+ }
3240
+ toApiJson() {
3241
+ const toReturn = {};
3242
+ if (typeof this.title !== 'undefined') {
3243
+ toReturn['title'] = this.title;
3244
+ }
3245
+ return toReturn;
3246
+ }
3247
+ }
3178
3248
 
3179
3249
  function enumStringToValue$1(enumRef, value) {
3180
3250
  if (typeof value === 'number') {
@@ -3219,6 +3289,9 @@ class CreateImageRequest {
3219
3289
  static fromProto(proto) {
3220
3290
  let m = new CreateImageRequest();
3221
3291
  m = Object.assign(m, proto);
3292
+ if (proto.metadata) {
3293
+ m.metadata = proto.metadata.map(MetadataV2.fromProto);
3294
+ }
3222
3295
  return m;
3223
3296
  }
3224
3297
  constructor(kwargs) {
@@ -3244,6 +3317,9 @@ class CreateImageRequest {
3244
3317
  if (typeof this.responseFormat !== 'undefined') {
3245
3318
  toReturn['responseFormat'] = this.responseFormat;
3246
3319
  }
3320
+ if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
3321
+ toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
3322
+ }
3247
3323
  return toReturn;
3248
3324
  }
3249
3325
  }
@@ -3723,8 +3799,8 @@ class SocialPostsService {
3723
3799
  const req = new GetScheduledPostCountRequest({ partnerId: partnerId, businessId: businessId, socialServiceIds: socialServiceIds });
3724
3800
  return this.socialPostsApiService.getScheduledPostCount(req);
3725
3801
  }
3726
- suggestMessage(businessId, prompt, postLength, templateType) {
3727
- const req = new SuggestMessageRequest({ businessId: businessId, prompt: prompt, length: postLength, type: templateType });
3802
+ suggestMessage(businessId, prompt, postLength, templateType, metadata) {
3803
+ const req = new SuggestMessageRequest({ businessId: businessId, prompt: prompt, length: postLength, type: templateType, metadata: metadata });
3728
3804
  return this.socialPostsApiService.suggestMessage(req);
3729
3805
  }
3730
3806
  }
@@ -4085,7 +4161,7 @@ class PostTemplatesService {
4085
4161
  constructor(socialPostsApiService) {
4086
4162
  this.socialPostsApiService = socialPostsApiService;
4087
4163
  }
4088
- updatePostTemplate(accountGroupId, templateId, title, postText, postDateTime, gmbPostCustomization, imageUrl, imagePath, imageSize, previews, options, videoUrl, postType, mediaEntries, metadata) {
4164
+ updatePostTemplate(accountGroupId, templateId, title, postText, postDateTime, gmbPostCustomization, imageUrl, imagePath, imageSize, previews, options, videoUrl, postType, mediaEntries, metadata, youtubeCustomization) {
4089
4165
  const req = new UpdatePostTemplateRequest({
4090
4166
  accountGroupId: accountGroupId,
4091
4167
  templateId: templateId,
@@ -4102,10 +4178,11 @@ class PostTemplatesService {
4102
4178
  postType: postType || PostType.POST_TYPE_INVALID,
4103
4179
  mediaEntries: mediaEntries,
4104
4180
  metaData: metadata,
4181
+ youtubeCustomization: youtubeCustomization,
4105
4182
  });
4106
4183
  return this.socialPostsApiService.updatePostTemplate(req);
4107
4184
  }
4108
- createPostTemplate(accountGroupId, title, postText, postDateTime, gmbPostCustomization, imageUrl, imagePath, imageSize, previews, options, videoUrl, postType, mediaEntries, metadata) {
4185
+ createPostTemplate(accountGroupId, title, postText, postDateTime, gmbPostCustomization, imageUrl, imagePath, imageSize, previews, options, videoUrl, postType, mediaEntries, metadata, youtubeCustomization) {
4109
4186
  const req = new CreatePostTemplateRequest({
4110
4187
  accountGroupId: accountGroupId,
4111
4188
  title: title,
@@ -4121,6 +4198,7 @@ class PostTemplatesService {
4121
4198
  postType: postType || PostType.POST_TYPE_INVALID,
4122
4199
  mediaEntries: mediaEntries,
4123
4200
  metaData: metadata,
4201
+ youtubeCustomization: youtubeCustomization,
4124
4202
  });
4125
4203
  return this.socialPostsApiService.createPostTemplate(req);
4126
4204
  }
@@ -4344,8 +4422,8 @@ class SocialPostsV2Service {
4344
4422
  scheduleSocialPostV2(socialPost) {
4345
4423
  return this.socialpostV2ApiService.scheduleSocialPosts(socialPost);
4346
4424
  }
4347
- createImage(businessId, prompt, imageAmount = 3, size = '1024x1024') {
4348
- const req = new CreateImageRequest({ businessId: businessId, prompt: prompt, imageAmount: imageAmount, size: size, responseFormat: 'url' });
4425
+ createImage(businessId, prompt, imageAmount = 3, size = '1024x1024', metadata) {
4426
+ const req = new CreateImageRequest({ businessId: businessId, prompt: prompt, imageAmount: imageAmount, size: size, responseFormat: 'url', metadata: metadata });
4349
4427
  return this.socialpostV2ApiService.createImages(req);
4350
4428
  }
4351
4429
  getImageByUrl(url) {
@@ -4372,5 +4450,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImpor
4372
4450
  * Generated bundle index. Do not edit.
4373
4451
  */
4374
4452
 
4375
- export { CallToAction, CallToActionCallToActionType, CreateImageRequest, CreateImageResponse, CreateMultilocationPostRequest, CreateMultilocationPostResponse, CreatePostTemplateRequest, CreatePostTemplateResponse, DateRangeFilter, DeleteHashtagsRequest, DeleteMultilocationPostRequest, DeletePostRequest, DeletePostTemplateRequest, DeleteSocialPostRequest, EditMultilocationPostRequest, EditMultilocationPostResponse, Error, Event, FacebookPostStats, FieldMask, GenerateCSVForPerformanceStatsRequest, GenerateCSVForPerformanceStatsResponse, 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, 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, UpdatePostTemplateRequest, UpdateSocialPostRequest, UpdateSocialPostResponse };
4453
+ export { CallToAction, CallToActionCallToActionType, CreateImageRequest, CreateImageResponse, CreateMultilocationPostRequest, CreateMultilocationPostResponse, CreatePostTemplateRequest, CreatePostTemplateResponse, DateRangeFilter, DeleteHashtagsRequest, DeleteMultilocationPostRequest, DeletePostRequest, DeletePostTemplateRequest, DeleteSocialPostRequest, EditMultilocationPostRequest, EditMultilocationPostResponse, Error, Event, FacebookPostStats, FieldMask, GenerateCSVForPerformanceStatsRequest, GenerateCSVForPerformanceStatsResponse, 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, 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, UpdatePostTemplateRequest, UpdateSocialPostRequest, UpdateSocialPostResponse, YoutubeCustomization, YoutubeCustomizationV2 };
4376
4454
  //# sourceMappingURL=vendasta-social-posts.mjs.map