@vendasta/social-posts 5.3.0 → 5.4.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.
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/objects/api.mjs +44 -4
- package/esm2020/lib/_internal/objects/index.mjs +2 -2
- package/esm2020/lib/_internal/social-posts.api.service.mjs +7 -2
- package/esm2020/lib/social-posts.service.mjs +6 -2
- package/esm2020/public_api.mjs +1 -4
- package/fesm2015/vendasta-social-posts.mjs +52 -7
- package/fesm2015/vendasta-social-posts.mjs.map +1 -1
- package/fesm2020/vendasta-social-posts.mjs +52 -7
- package/fesm2020/vendasta-social-posts.mjs.map +1 -1
- package/lib/_internal/interfaces/api.interface.d.ts +7 -0
- package/lib/_internal/interfaces/index.d.ts +1 -1
- package/lib/_internal/objects/api.d.ts +13 -0
- package/lib/_internal/objects/index.d.ts +1 -1
- package/lib/_internal/social-posts.api.service.d.ts +3 -2
- package/lib/social-posts.service.d.ts +2 -1
- package/package.json +3 -3
|
@@ -2123,9 +2123,6 @@ class PostData {
|
|
|
2123
2123
|
if (proto.reach) {
|
|
2124
2124
|
m.reach = parseInt(proto.reach, 10);
|
|
2125
2125
|
}
|
|
2126
|
-
if (proto.engagement) {
|
|
2127
|
-
m.engagement = parseInt(proto.engagement, 10);
|
|
2128
|
-
}
|
|
2129
2126
|
if (proto.views) {
|
|
2130
2127
|
m.views = parseInt(proto.views, 10);
|
|
2131
2128
|
}
|
|
@@ -2443,6 +2440,49 @@ class SearchHashtagResponse {
|
|
|
2443
2440
|
return toReturn;
|
|
2444
2441
|
}
|
|
2445
2442
|
}
|
|
2443
|
+
class SuggestMessageRequest {
|
|
2444
|
+
constructor(kwargs) {
|
|
2445
|
+
if (!kwargs) {
|
|
2446
|
+
return;
|
|
2447
|
+
}
|
|
2448
|
+
Object.assign(this, kwargs);
|
|
2449
|
+
}
|
|
2450
|
+
static fromProto(proto) {
|
|
2451
|
+
let m = new SuggestMessageRequest();
|
|
2452
|
+
m = Object.assign(m, proto);
|
|
2453
|
+
return m;
|
|
2454
|
+
}
|
|
2455
|
+
toApiJson() {
|
|
2456
|
+
const toReturn = {};
|
|
2457
|
+
if (typeof this.prompt !== 'undefined') {
|
|
2458
|
+
toReturn['prompt'] = this.prompt;
|
|
2459
|
+
}
|
|
2460
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2461
|
+
toReturn['businessId'] = this.businessId;
|
|
2462
|
+
}
|
|
2463
|
+
return toReturn;
|
|
2464
|
+
}
|
|
2465
|
+
}
|
|
2466
|
+
class SuggestMessageResponse {
|
|
2467
|
+
constructor(kwargs) {
|
|
2468
|
+
if (!kwargs) {
|
|
2469
|
+
return;
|
|
2470
|
+
}
|
|
2471
|
+
Object.assign(this, kwargs);
|
|
2472
|
+
}
|
|
2473
|
+
static fromProto(proto) {
|
|
2474
|
+
let m = new SuggestMessageResponse();
|
|
2475
|
+
m = Object.assign(m, proto);
|
|
2476
|
+
return m;
|
|
2477
|
+
}
|
|
2478
|
+
toApiJson() {
|
|
2479
|
+
const toReturn = {};
|
|
2480
|
+
if (typeof this.message !== 'undefined') {
|
|
2481
|
+
toReturn['message'] = this.message;
|
|
2482
|
+
}
|
|
2483
|
+
return toReturn;
|
|
2484
|
+
}
|
|
2485
|
+
}
|
|
2446
2486
|
class UpdatePostTemplateRequest {
|
|
2447
2487
|
constructor(kwargs) {
|
|
2448
2488
|
if (!kwargs) {
|
|
@@ -2574,6 +2614,11 @@ class SocialPostsApiService {
|
|
|
2574
2614
|
return this.http.post(this._host + "/socialposts.v1.SocialPosts/GetScheduledPostCount", request.toApiJson(), this.apiOptions())
|
|
2575
2615
|
.pipe(map(resp => GetScheduledPostCountResponse.fromProto(resp)));
|
|
2576
2616
|
}
|
|
2617
|
+
suggestMessage(r) {
|
|
2618
|
+
const request = (r.toApiJson) ? r : new SuggestMessageRequest(r);
|
|
2619
|
+
return this.http.post(this._host + "/socialposts.v1.SocialPosts/SuggestMessage", request.toApiJson(), this.apiOptions())
|
|
2620
|
+
.pipe(map(resp => SuggestMessageResponse.fromProto(resp)));
|
|
2621
|
+
}
|
|
2577
2622
|
}
|
|
2578
2623
|
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 });
|
|
2579
2624
|
SocialPostsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsApiService, providedIn: 'root' });
|
|
@@ -2611,6 +2656,10 @@ class SocialPostsService {
|
|
|
2611
2656
|
const req = new GetScheduledPostCountRequest({ partnerId: partnerId, businessId: businessId, socialServiceIds: socialServiceIds });
|
|
2612
2657
|
return this.socialPostsApiService.getScheduledPostCount(req);
|
|
2613
2658
|
}
|
|
2659
|
+
suggestMessage(businessId, prompt) {
|
|
2660
|
+
const req = new SuggestMessageRequest({ businessId: businessId, prompt: prompt });
|
|
2661
|
+
return this.socialPostsApiService.suggestMessage(req);
|
|
2662
|
+
}
|
|
2614
2663
|
}
|
|
2615
2664
|
SocialPostsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsService, deps: [{ token: SocialPostsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2616
2665
|
SocialPostsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsService, providedIn: 'root' });
|
|
@@ -3123,10 +3172,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImpo
|
|
|
3123
3172
|
|
|
3124
3173
|
// *********************************
|
|
3125
3174
|
|
|
3126
|
-
/*
|
|
3127
|
-
* Public API Surface of social-posts
|
|
3128
|
-
*/
|
|
3129
|
-
|
|
3130
3175
|
/**
|
|
3131
3176
|
* Generated bundle index. Do not edit.
|
|
3132
3177
|
*/
|