@vendasta/social-posts 5.3.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.
- package/esm2020/lib/_internal/enums/index.mjs +2 -2
- package/esm2020/lib/_internal/enums/social-posts.enum.mjs +15 -1
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/social-posts.interface.mjs +1 -1
- package/esm2020/lib/_internal/objects/api.mjs +50 -4
- package/esm2020/lib/_internal/objects/index.mjs +3 -3
- package/esm2020/lib/_internal/objects/social-posts.mjs +77 -1
- package/esm2020/lib/_internal/social-posts.api.service.mjs +7 -2
- package/esm2020/lib/index.mjs +2 -2
- package/esm2020/lib/social-posts.service.mjs +6 -2
- package/esm2020/public_api.mjs +1 -4
- package/fesm2015/vendasta-social-posts.mjs +149 -8
- package/fesm2015/vendasta-social-posts.mjs.map +1 -1
- package/fesm2020/vendasta-social-posts.mjs +149 -8
- package/fesm2020/vendasta-social-posts.mjs.map +1 -1
- package/lib/_internal/enums/index.d.ts +1 -1
- package/lib/_internal/enums/social-posts.enum.d.ts +12 -0
- package/lib/_internal/interfaces/api.interface.d.ts +8 -0
- package/lib/_internal/interfaces/index.d.ts +2 -2
- package/lib/_internal/interfaces/social-posts.interface.d.ts +14 -0
- package/lib/_internal/objects/api.d.ts +14 -0
- package/lib/_internal/objects/index.d.ts +2 -2
- package/lib/_internal/objects/social-posts.d.ts +20 -0
- package/lib/_internal/social-posts.api.service.d.ts +3 -2
- package/lib/index.d.ts +1 -1
- package/lib/social-posts.service.d.ts +3 -1
- package/package.json +3 -3
|
@@ -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
|
}
|
|
@@ -2123,9 +2213,6 @@ class PostData {
|
|
|
2123
2213
|
if (proto.reach) {
|
|
2124
2214
|
m.reach = parseInt(proto.reach, 10);
|
|
2125
2215
|
}
|
|
2126
|
-
if (proto.engagement) {
|
|
2127
|
-
m.engagement = parseInt(proto.engagement, 10);
|
|
2128
|
-
}
|
|
2129
2216
|
if (proto.views) {
|
|
2130
2217
|
m.views = parseInt(proto.views, 10);
|
|
2131
2218
|
}
|
|
@@ -2443,6 +2530,55 @@ class SearchHashtagResponse {
|
|
|
2443
2530
|
return toReturn;
|
|
2444
2531
|
}
|
|
2445
2532
|
}
|
|
2533
|
+
class SuggestMessageRequest {
|
|
2534
|
+
constructor(kwargs) {
|
|
2535
|
+
if (!kwargs) {
|
|
2536
|
+
return;
|
|
2537
|
+
}
|
|
2538
|
+
Object.assign(this, kwargs);
|
|
2539
|
+
}
|
|
2540
|
+
static fromProto(proto) {
|
|
2541
|
+
let m = new SuggestMessageRequest();
|
|
2542
|
+
m = Object.assign(m, proto);
|
|
2543
|
+
if (proto.length) {
|
|
2544
|
+
m.length = enumStringToValue(PostLength, proto.length);
|
|
2545
|
+
}
|
|
2546
|
+
return m;
|
|
2547
|
+
}
|
|
2548
|
+
toApiJson() {
|
|
2549
|
+
const toReturn = {};
|
|
2550
|
+
if (typeof this.prompt !== 'undefined') {
|
|
2551
|
+
toReturn['prompt'] = this.prompt;
|
|
2552
|
+
}
|
|
2553
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2554
|
+
toReturn['businessId'] = this.businessId;
|
|
2555
|
+
}
|
|
2556
|
+
if (typeof this.length !== 'undefined') {
|
|
2557
|
+
toReturn['length'] = this.length;
|
|
2558
|
+
}
|
|
2559
|
+
return toReturn;
|
|
2560
|
+
}
|
|
2561
|
+
}
|
|
2562
|
+
class SuggestMessageResponse {
|
|
2563
|
+
constructor(kwargs) {
|
|
2564
|
+
if (!kwargs) {
|
|
2565
|
+
return;
|
|
2566
|
+
}
|
|
2567
|
+
Object.assign(this, kwargs);
|
|
2568
|
+
}
|
|
2569
|
+
static fromProto(proto) {
|
|
2570
|
+
let m = new SuggestMessageResponse();
|
|
2571
|
+
m = Object.assign(m, proto);
|
|
2572
|
+
return m;
|
|
2573
|
+
}
|
|
2574
|
+
toApiJson() {
|
|
2575
|
+
const toReturn = {};
|
|
2576
|
+
if (typeof this.message !== 'undefined') {
|
|
2577
|
+
toReturn['message'] = this.message;
|
|
2578
|
+
}
|
|
2579
|
+
return toReturn;
|
|
2580
|
+
}
|
|
2581
|
+
}
|
|
2446
2582
|
class UpdatePostTemplateRequest {
|
|
2447
2583
|
constructor(kwargs) {
|
|
2448
2584
|
if (!kwargs) {
|
|
@@ -2575,6 +2711,11 @@ class SocialPostsApiService {
|
|
|
2575
2711
|
return this.http.post(this._host + "/socialposts.v1.SocialPosts/GetScheduledPostCount", request.toApiJson(), this.apiOptions())
|
|
2576
2712
|
.pipe(map(resp => GetScheduledPostCountResponse.fromProto(resp)));
|
|
2577
2713
|
}
|
|
2714
|
+
suggestMessage(r) {
|
|
2715
|
+
const request = (r.toApiJson) ? r : new SuggestMessageRequest(r);
|
|
2716
|
+
return this.http.post(this._host + "/socialposts.v1.SocialPosts/SuggestMessage", request.toApiJson(), this.apiOptions())
|
|
2717
|
+
.pipe(map(resp => SuggestMessageResponse.fromProto(resp)));
|
|
2718
|
+
}
|
|
2578
2719
|
}
|
|
2579
2720
|
SocialPostsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2580
2721
|
SocialPostsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsApiService, providedIn: 'root' });
|
|
@@ -2612,6 +2753,10 @@ class SocialPostsService {
|
|
|
2612
2753
|
const req = new GetScheduledPostCountRequest({ partnerId: partnerId, businessId: businessId, socialServiceIds: socialServiceIds });
|
|
2613
2754
|
return this.socialPostsApiService.getScheduledPostCount(req);
|
|
2614
2755
|
}
|
|
2756
|
+
suggestMessage(businessId, prompt, postLength) {
|
|
2757
|
+
const req = new SuggestMessageRequest({ businessId: businessId, prompt: prompt, length: postLength });
|
|
2758
|
+
return this.socialPostsApiService.suggestMessage(req);
|
|
2759
|
+
}
|
|
2615
2760
|
}
|
|
2616
2761
|
SocialPostsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsService, deps: [{ token: SocialPostsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2617
2762
|
SocialPostsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsService, providedIn: 'root' });
|
|
@@ -3124,13 +3269,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImpo
|
|
|
3124
3269
|
|
|
3125
3270
|
// *********************************
|
|
3126
3271
|
|
|
3127
|
-
/*
|
|
3128
|
-
* Public API Surface of social-posts
|
|
3129
|
-
*/
|
|
3130
|
-
|
|
3131
3272
|
/**
|
|
3132
3273
|
* Generated bundle index. Do not edit.
|
|
3133
3274
|
*/
|
|
3134
3275
|
|
|
3135
|
-
export { DeleteMultilocationPostRequest, FieldMask, GetMultilocationPostRequest, HashTagsService, ListMultilocationPostsForBrandRequest, Location, MultilocationPost, MultilocationPostApiService, MultilocationPostsService, PixabayImageService, PostPerformanceApiService, PostPerformanceService, PostTemplatesService, PostingStatus, RemoveReason, SocialPostsService, TenorGifsService };
|
|
3276
|
+
export { DeleteMultilocationPostRequest, FieldMask, GetMultilocationPostRequest, HashTagsService, ListMultilocationPostsForBrandRequest, Location, MultilocationPost, MultilocationPostApiService, MultilocationPostsService, PixabayImageService, PostLength, PostPerformanceApiService, PostPerformanceService, PostTemplatesService, PostingStatus, RemoveReason, SocialPostsService, TenorGifsService };
|
|
3136
3277
|
//# sourceMappingURL=vendasta-social-posts.mjs.map
|