@vendasta/social-posts 5.4.0 → 5.4.1

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.
@@ -421,6 +421,20 @@ var SocialPostDeletionStatus;
421
421
  SocialPostDeletionStatus[SocialPostDeletionStatus["FAILED"] = 1] = "FAILED";
422
422
  SocialPostDeletionStatus[SocialPostDeletionStatus["IN_PROGRESS"] = 2] = "IN_PROGRESS";
423
423
  })(SocialPostDeletionStatus || (SocialPostDeletionStatus = {}));
424
+ var PostLength;
425
+ (function (PostLength) {
426
+ PostLength[PostLength["SHORT_FORM"] = 0] = "SHORT_FORM";
427
+ PostLength[PostLength["LONG_FORM"] = 1] = "LONG_FORM";
428
+ })(PostLength || (PostLength = {}));
429
+ var PostType;
430
+ (function (PostType) {
431
+ PostType[PostType["POST_TYPE_INVALID"] = 0] = "POST_TYPE_INVALID";
432
+ PostType[PostType["POST_TYPE_IMAGE"] = 1] = "POST_TYPE_IMAGE";
433
+ PostType[PostType["POST_TYPE_VIDEO"] = 2] = "POST_TYPE_VIDEO";
434
+ PostType[PostType["POST_TYPE_GIF"] = 3] = "POST_TYPE_GIF";
435
+ PostType[PostType["POST_TYPE_REEL"] = 4] = "POST_TYPE_REEL";
436
+ PostType[PostType["POST_TYPE_CAROUSEL"] = 5] = "POST_TYPE_CAROUSEL";
437
+ })(PostType || (PostType = {}));
424
438
  var PostingStatus;
425
439
  (function (PostingStatus) {
426
440
  PostingStatus[PostingStatus["POSTING_IN_PROGRESS"] = 0] = "POSTING_IN_PROGRESS";
@@ -539,6 +553,64 @@ class Event {
539
553
  return toReturn;
540
554
  }
541
555
  }
556
+ class MediaEntry {
557
+ constructor(kwargs) {
558
+ if (!kwargs) {
559
+ return;
560
+ }
561
+ Object.assign(this, kwargs);
562
+ }
563
+ static fromProto(proto) {
564
+ let m = new MediaEntry();
565
+ m = Object.assign(m, proto);
566
+ if (proto.metaData) {
567
+ m.metaData = proto.metaData.map(MetaData.fromProto);
568
+ }
569
+ return m;
570
+ }
571
+ toApiJson() {
572
+ const toReturn = {};
573
+ if (typeof this.mediaEntryId !== 'undefined') {
574
+ toReturn['mediaEntryId'] = this.mediaEntryId;
575
+ }
576
+ if (typeof this.mediaUrl !== 'undefined') {
577
+ toReturn['mediaUrl'] = this.mediaUrl;
578
+ }
579
+ if (typeof this.mediaType !== 'undefined') {
580
+ toReturn['mediaType'] = this.mediaType;
581
+ }
582
+ if (typeof this.containerId !== 'undefined') {
583
+ toReturn['containerId'] = this.containerId;
584
+ }
585
+ if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
586
+ toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
587
+ }
588
+ return toReturn;
589
+ }
590
+ }
591
+ class MetaData {
592
+ constructor(kwargs) {
593
+ if (!kwargs) {
594
+ return;
595
+ }
596
+ Object.assign(this, kwargs);
597
+ }
598
+ static fromProto(proto) {
599
+ let m = new MetaData();
600
+ m = Object.assign(m, proto);
601
+ return m;
602
+ }
603
+ toApiJson() {
604
+ const toReturn = {};
605
+ if (typeof this.propertyName !== 'undefined') {
606
+ toReturn['propertyName'] = this.propertyName;
607
+ }
608
+ if (typeof this.propertyValue !== 'undefined') {
609
+ toReturn['propertyValue'] = this.propertyValue;
610
+ }
611
+ return toReturn;
612
+ }
613
+ }
542
614
  class SchedulePostStatus {
543
615
  constructor(kwargs) {
544
616
  if (!kwargs) {
@@ -608,6 +680,15 @@ class SocialPost {
608
680
  if (proto.error) {
609
681
  m.error = Error.fromProto(proto.error);
610
682
  }
683
+ if (proto.postType) {
684
+ m.postType = enumStringToValue$3(PostType, proto.postType);
685
+ }
686
+ if (proto.mediaEntries) {
687
+ m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
688
+ }
689
+ if (proto.metaData) {
690
+ m.metaData = proto.metaData.map(MetaData.fromProto);
691
+ }
611
692
  return m;
612
693
  }
613
694
  toApiJson() {
@@ -690,6 +771,15 @@ class SocialPost {
690
771
  if (typeof this.multilocationPostId !== 'undefined') {
691
772
  toReturn['multilocationPostId'] = this.multilocationPostId;
692
773
  }
774
+ if (typeof this.postType !== 'undefined') {
775
+ toReturn['postType'] = this.postType;
776
+ }
777
+ if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
778
+ toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
779
+ }
780
+ if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
781
+ toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
782
+ }
693
783
  return toReturn;
694
784
  }
695
785
  }
@@ -2450,6 +2540,9 @@ class SuggestMessageRequest {
2450
2540
  static fromProto(proto) {
2451
2541
  let m = new SuggestMessageRequest();
2452
2542
  m = Object.assign(m, proto);
2543
+ if (proto.length) {
2544
+ m.length = enumStringToValue(PostLength, proto.length);
2545
+ }
2453
2546
  return m;
2454
2547
  }
2455
2548
  toApiJson() {
@@ -2460,6 +2553,9 @@ class SuggestMessageRequest {
2460
2553
  if (typeof this.businessId !== 'undefined') {
2461
2554
  toReturn['businessId'] = this.businessId;
2462
2555
  }
2556
+ if (typeof this.length !== 'undefined') {
2557
+ toReturn['length'] = this.length;
2558
+ }
2463
2559
  return toReturn;
2464
2560
  }
2465
2561
  }
@@ -2656,8 +2752,8 @@ class SocialPostsService {
2656
2752
  const req = new GetScheduledPostCountRequest({ partnerId: partnerId, businessId: businessId, socialServiceIds: socialServiceIds });
2657
2753
  return this.socialPostsApiService.getScheduledPostCount(req);
2658
2754
  }
2659
- suggestMessage(businessId, prompt) {
2660
- const req = new SuggestMessageRequest({ businessId: businessId, prompt: prompt });
2755
+ suggestMessage(businessId, prompt, postLength) {
2756
+ const req = new SuggestMessageRequest({ businessId: businessId, prompt: prompt, length: postLength });
2661
2757
  return this.socialPostsApiService.suggestMessage(req);
2662
2758
  }
2663
2759
  }
@@ -3176,5 +3272,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImpo
3176
3272
  * Generated bundle index. Do not edit.
3177
3273
  */
3178
3274
 
3179
- export { DeleteMultilocationPostRequest, FieldMask, GetMultilocationPostRequest, HashTagsService, ListMultilocationPostsForBrandRequest, Location, MultilocationPost, MultilocationPostApiService, MultilocationPostsService, PixabayImageService, PostPerformanceApiService, PostPerformanceService, PostTemplatesService, PostingStatus, RemoveReason, SocialPostsService, TenorGifsService };
3275
+ export { DeleteMultilocationPostRequest, FieldMask, GetMultilocationPostRequest, HashTagsService, ListMultilocationPostsForBrandRequest, Location, MultilocationPost, MultilocationPostApiService, MultilocationPostsService, PixabayImageService, PostLength, PostPerformanceApiService, PostPerformanceService, PostTemplatesService, PostingStatus, RemoveReason, SocialPostsService, TenorGifsService };
3180
3276
  //# sourceMappingURL=vendasta-social-posts.mjs.map