@vendasta/social-posts 5.6.1 → 5.7.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/enums/index.mjs +3 -2
- package/esm2020/lib/_internal/enums/linkedin-v2.enum.mjs +15 -0
- package/esm2020/lib/_internal/enums/social-post-v2.enum.mjs +16 -0
- package/esm2020/lib/_internal/index.mjs +2 -1
- package/esm2020/lib/_internal/interfaces/api-v2.interface.mjs +2 -0
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/linkedin-v2.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/social-post-v2.interface.mjs +8 -0
- package/esm2020/lib/_internal/linkedin.api.service.mjs +7 -3
- package/esm2020/lib/_internal/objects/api-v2.mjs +243 -0
- package/esm2020/lib/_internal/objects/api.mjs +3 -52
- package/esm2020/lib/_internal/objects/index.mjs +8 -6
- package/esm2020/lib/_internal/objects/linkedin-v2.mjs +34 -0
- package/esm2020/lib/_internal/objects/social-post-v2.mjs +264 -0
- package/esm2020/lib/_internal/social-posts-v2.api.service.mjs +46 -0
- package/fesm2015/vendasta-social-posts.mjs +1214 -706
- package/fesm2015/vendasta-social-posts.mjs.map +1 -1
- package/fesm2020/vendasta-social-posts.mjs +1214 -706
- package/fesm2020/vendasta-social-posts.mjs.map +1 -1
- package/lib/_internal/enums/index.d.ts +2 -1
- package/lib/_internal/enums/{linkedin.enum.d.ts → linkedin-v2.enum.d.ts} +0 -0
- package/lib/_internal/enums/social-post-v2.enum.d.ts +8 -0
- package/lib/_internal/index.d.ts +1 -0
- package/lib/_internal/interfaces/api-v2.interface.d.ts +40 -0
- package/lib/_internal/interfaces/api.interface.d.ts +2 -10
- package/lib/_internal/interfaces/index.d.ts +7 -5
- package/lib/_internal/interfaces/{linkedin.interface.d.ts → linkedin-v2.interface.d.ts} +0 -0
- package/lib/_internal/interfaces/social-post-v2.interface.d.ts +46 -0
- package/lib/_internal/linkedin.api.service.d.ts +4 -3
- package/lib/_internal/objects/api-v2.d.ts +69 -0
- package/lib/_internal/objects/api.d.ts +2 -16
- package/lib/_internal/objects/index.d.ts +7 -5
- package/lib/_internal/objects/{linkedin.d.ts → linkedin-v2.d.ts} +0 -0
- package/lib/_internal/objects/social-post-v2.d.ts +72 -0
- package/lib/_internal/social-posts-v2.api.service.d.ts +17 -0
- package/package.json +1 -1
- package/esm2020/lib/_internal/enums/linkedin.enum.mjs +0 -15
- package/esm2020/lib/_internal/interfaces/linkedin.interface.mjs +0 -8
- package/esm2020/lib/_internal/objects/linkedin.mjs +0 -34
|
@@ -5,7 +5,7 @@ import * as i1 from '@angular/common/http';
|
|
|
5
5
|
import { HttpHeaders } from '@angular/common/http';
|
|
6
6
|
import { map } from 'rxjs/operators';
|
|
7
7
|
|
|
8
|
-
function enumStringToValue$
|
|
8
|
+
function enumStringToValue$a(enumRef, value) {
|
|
9
9
|
if (typeof value === 'number') {
|
|
10
10
|
return value;
|
|
11
11
|
}
|
|
@@ -32,7 +32,7 @@ class FieldMask {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
function enumStringToValue$
|
|
35
|
+
function enumStringToValue$9(enumRef, value) {
|
|
36
36
|
if (typeof value === 'number') {
|
|
37
37
|
return value;
|
|
38
38
|
}
|
|
@@ -71,7 +71,7 @@ class Hashtag {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
function enumStringToValue$
|
|
74
|
+
function enumStringToValue$8(enumRef, value) {
|
|
75
75
|
if (typeof value === 'number') {
|
|
76
76
|
return value;
|
|
77
77
|
}
|
|
@@ -198,21 +198,6 @@ var RemoveReason;
|
|
|
198
198
|
RemoveReason[RemoveReason["REMOVE_REASON_DELETE"] = 1] = "REMOVE_REASON_DELETE";
|
|
199
199
|
})(RemoveReason || (RemoveReason = {}));
|
|
200
200
|
|
|
201
|
-
// *********************************
|
|
202
|
-
// Code generated by sdkgen
|
|
203
|
-
// DO NOT EDIT!.
|
|
204
|
-
//
|
|
205
|
-
// Enums.
|
|
206
|
-
// *********************************
|
|
207
|
-
var MediaType;
|
|
208
|
-
(function (MediaType) {
|
|
209
|
-
MediaType[MediaType["MEDIA_TYPE_INVALID"] = 0] = "MEDIA_TYPE_INVALID";
|
|
210
|
-
MediaType[MediaType["MEDIA_TYPE_IMAGE"] = 1] = "MEDIA_TYPE_IMAGE";
|
|
211
|
-
MediaType[MediaType["MEDIA_TYPE_VIDEO"] = 2] = "MEDIA_TYPE_VIDEO";
|
|
212
|
-
MediaType[MediaType["MEDIA_TYPE_GIF"] = 3] = "MEDIA_TYPE_GIF";
|
|
213
|
-
MediaType[MediaType["MEDIA_TYPE_CAROUSEL"] = 4] = "MEDIA_TYPE_CAROUSEL";
|
|
214
|
-
})(MediaType || (MediaType = {}));
|
|
215
|
-
|
|
216
201
|
// *********************************
|
|
217
202
|
// Code generated by sdkgen
|
|
218
203
|
// DO NOT EDIT!.
|
|
@@ -240,7 +225,7 @@ var PostLength;
|
|
|
240
225
|
PostLength[PostLength["SHORT_FORM"] = 0] = "SHORT_FORM";
|
|
241
226
|
PostLength[PostLength["LONG_FORM"] = 1] = "LONG_FORM";
|
|
242
227
|
})(PostLength || (PostLength = {}));
|
|
243
|
-
var PostType;
|
|
228
|
+
var PostType$1;
|
|
244
229
|
(function (PostType) {
|
|
245
230
|
PostType[PostType["POST_TYPE_INVALID"] = 0] = "POST_TYPE_INVALID";
|
|
246
231
|
PostType[PostType["POST_TYPE_IMAGE"] = 1] = "POST_TYPE_IMAGE";
|
|
@@ -248,7 +233,7 @@ var PostType;
|
|
|
248
233
|
PostType[PostType["POST_TYPE_GIF"] = 3] = "POST_TYPE_GIF";
|
|
249
234
|
PostType[PostType["POST_TYPE_REEL"] = 4] = "POST_TYPE_REEL";
|
|
250
235
|
PostType[PostType["POST_TYPE_CAROUSEL"] = 5] = "POST_TYPE_CAROUSEL";
|
|
251
|
-
})(PostType || (PostType = {}));
|
|
236
|
+
})(PostType$1 || (PostType$1 = {}));
|
|
252
237
|
var PostingStatus;
|
|
253
238
|
(function (PostingStatus) {
|
|
254
239
|
PostingStatus[PostingStatus["POSTING_IN_PROGRESS"] = 0] = "POSTING_IN_PROGRESS";
|
|
@@ -267,41 +252,39 @@ var SocialPostService;
|
|
|
267
252
|
})(SocialPostService || (SocialPostService = {}));
|
|
268
253
|
|
|
269
254
|
// *********************************
|
|
255
|
+
// Code generated by sdkgen
|
|
256
|
+
// DO NOT EDIT!.
|
|
257
|
+
//
|
|
258
|
+
// Enums.
|
|
259
|
+
// *********************************
|
|
260
|
+
var PostType;
|
|
261
|
+
(function (PostType) {
|
|
262
|
+
PostType[PostType["POST_TYPE_INVALID"] = 0] = "POST_TYPE_INVALID";
|
|
263
|
+
PostType[PostType["POST_TYPE_IMAGE"] = 1] = "POST_TYPE_IMAGE";
|
|
264
|
+
PostType[PostType["POST_TYPE_VIDEO"] = 2] = "POST_TYPE_VIDEO";
|
|
265
|
+
PostType[PostType["POST_TYPE_GIF"] = 3] = "POST_TYPE_GIF";
|
|
266
|
+
PostType[PostType["POST_TYPE_MULTI_MEDIA"] = 4] = "POST_TYPE_MULTI_MEDIA";
|
|
267
|
+
PostType[PostType["POST_TYPE_TEXT"] = 5] = "POST_TYPE_TEXT";
|
|
268
|
+
})(PostType || (PostType = {}));
|
|
270
269
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
let m = new Media();
|
|
286
|
-
m = Object.assign(m, proto);
|
|
287
|
-
if (proto.mediaType) {
|
|
288
|
-
m.mediaType = enumStringToValue$5(MediaType, proto.mediaType);
|
|
289
|
-
}
|
|
290
|
-
return m;
|
|
291
|
-
}
|
|
292
|
-
toApiJson() {
|
|
293
|
-
const toReturn = {};
|
|
294
|
-
if (typeof this.url !== 'undefined') {
|
|
295
|
-
toReturn['url'] = this.url;
|
|
296
|
-
}
|
|
297
|
-
if (typeof this.mediaType !== 'undefined') {
|
|
298
|
-
toReturn['mediaType'] = this.mediaType;
|
|
299
|
-
}
|
|
300
|
-
return toReturn;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
270
|
+
// *********************************
|
|
271
|
+
// Code generated by sdkgen
|
|
272
|
+
// DO NOT EDIT!.
|
|
273
|
+
//
|
|
274
|
+
// Enums.
|
|
275
|
+
// *********************************
|
|
276
|
+
var MediaType;
|
|
277
|
+
(function (MediaType) {
|
|
278
|
+
MediaType[MediaType["MEDIA_TYPE_INVALID"] = 0] = "MEDIA_TYPE_INVALID";
|
|
279
|
+
MediaType[MediaType["MEDIA_TYPE_IMAGE"] = 1] = "MEDIA_TYPE_IMAGE";
|
|
280
|
+
MediaType[MediaType["MEDIA_TYPE_VIDEO"] = 2] = "MEDIA_TYPE_VIDEO";
|
|
281
|
+
MediaType[MediaType["MEDIA_TYPE_GIF"] = 3] = "MEDIA_TYPE_GIF";
|
|
282
|
+
MediaType[MediaType["MEDIA_TYPE_CAROUSEL"] = 4] = "MEDIA_TYPE_CAROUSEL";
|
|
283
|
+
})(MediaType || (MediaType = {}));
|
|
303
284
|
|
|
304
|
-
|
|
285
|
+
// *********************************
|
|
286
|
+
|
|
287
|
+
function enumStringToValue$7(enumRef, value) {
|
|
305
288
|
if (typeof value === 'number') {
|
|
306
289
|
return value;
|
|
307
290
|
}
|
|
@@ -318,7 +301,7 @@ class CallToAction {
|
|
|
318
301
|
let m = new CallToAction();
|
|
319
302
|
m = Object.assign(m, proto);
|
|
320
303
|
if (proto.actionType) {
|
|
321
|
-
m.actionType = enumStringToValue$
|
|
304
|
+
m.actionType = enumStringToValue$7(CallToActionCallToActionType, proto.actionType);
|
|
322
305
|
}
|
|
323
306
|
return m;
|
|
324
307
|
}
|
|
@@ -472,7 +455,7 @@ class PostTemplate {
|
|
|
472
455
|
m.metaData = proto.metaData.map(MetaData.fromProto);
|
|
473
456
|
}
|
|
474
457
|
if (proto.postType) {
|
|
475
|
-
m.postType = enumStringToValue$
|
|
458
|
+
m.postType = enumStringToValue$7(PostType$1, proto.postType);
|
|
476
459
|
}
|
|
477
460
|
return m;
|
|
478
461
|
}
|
|
@@ -564,7 +547,7 @@ class SchedulePostStatus {
|
|
|
564
547
|
return toReturn;
|
|
565
548
|
}
|
|
566
549
|
}
|
|
567
|
-
class SocialPost {
|
|
550
|
+
class SocialPost$1 {
|
|
568
551
|
constructor(kwargs) {
|
|
569
552
|
if (!kwargs) {
|
|
570
553
|
return;
|
|
@@ -572,16 +555,16 @@ class SocialPost {
|
|
|
572
555
|
Object.assign(this, kwargs);
|
|
573
556
|
}
|
|
574
557
|
static fromProto(proto) {
|
|
575
|
-
let m = new SocialPost();
|
|
558
|
+
let m = new SocialPost$1();
|
|
576
559
|
m = Object.assign(m, proto);
|
|
577
560
|
if (proto.posted) {
|
|
578
561
|
m.posted = new Date(proto.posted);
|
|
579
562
|
}
|
|
580
563
|
if (proto.deletionStatus) {
|
|
581
|
-
m.deletionStatus = enumStringToValue$
|
|
564
|
+
m.deletionStatus = enumStringToValue$7(SocialPostDeletionStatus, proto.deletionStatus);
|
|
582
565
|
}
|
|
583
566
|
if (proto.service) {
|
|
584
|
-
m.service = enumStringToValue$
|
|
567
|
+
m.service = enumStringToValue$7(SocialPostService, proto.service);
|
|
585
568
|
}
|
|
586
569
|
if (proto.created) {
|
|
587
570
|
m.created = new Date(proto.created);
|
|
@@ -590,7 +573,7 @@ class SocialPost {
|
|
|
590
573
|
m.scheduled = new Date(proto.scheduled);
|
|
591
574
|
}
|
|
592
575
|
if (proto.status) {
|
|
593
|
-
m.status = enumStringToValue$
|
|
576
|
+
m.status = enumStringToValue$7(PostingStatus, proto.status);
|
|
594
577
|
}
|
|
595
578
|
if (proto.event) {
|
|
596
579
|
m.event = Event.fromProto(proto.event);
|
|
@@ -602,7 +585,7 @@ class SocialPost {
|
|
|
602
585
|
m.error = Error.fromProto(proto.error);
|
|
603
586
|
}
|
|
604
587
|
if (proto.postType) {
|
|
605
|
-
m.postType = enumStringToValue$
|
|
588
|
+
m.postType = enumStringToValue$7(PostType$1, proto.postType);
|
|
606
589
|
}
|
|
607
590
|
if (proto.mediaEntries) {
|
|
608
591
|
m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
|
|
@@ -734,7 +717,7 @@ class SocialPostData {
|
|
|
734
717
|
}
|
|
735
718
|
}
|
|
736
719
|
|
|
737
|
-
function enumStringToValue$
|
|
720
|
+
function enumStringToValue$6(enumRef, value) {
|
|
738
721
|
if (typeof value === 'number') {
|
|
739
722
|
return value;
|
|
740
723
|
}
|
|
@@ -872,13 +855,13 @@ class PixabayImage {
|
|
|
872
855
|
}
|
|
873
856
|
}
|
|
874
857
|
|
|
875
|
-
function enumStringToValue$
|
|
858
|
+
function enumStringToValue$5(enumRef, value) {
|
|
876
859
|
if (typeof value === 'number') {
|
|
877
860
|
return value;
|
|
878
861
|
}
|
|
879
862
|
return enumRef[value];
|
|
880
863
|
}
|
|
881
|
-
class
|
|
864
|
+
class Link {
|
|
882
865
|
constructor(kwargs) {
|
|
883
866
|
if (!kwargs) {
|
|
884
867
|
return;
|
|
@@ -886,52 +869,34 @@ class FacebookPostStats {
|
|
|
886
869
|
Object.assign(this, kwargs);
|
|
887
870
|
}
|
|
888
871
|
static fromProto(proto) {
|
|
889
|
-
let m = new
|
|
872
|
+
let m = new Link();
|
|
890
873
|
m = Object.assign(m, proto);
|
|
891
|
-
if (proto.commentCount) {
|
|
892
|
-
m.commentCount = parseInt(proto.commentCount, 10);
|
|
893
|
-
}
|
|
894
|
-
if (proto.shareCount) {
|
|
895
|
-
m.shareCount = parseInt(proto.shareCount, 10);
|
|
896
|
-
}
|
|
897
|
-
if (proto.likeCount) {
|
|
898
|
-
m.likeCount = parseInt(proto.likeCount, 10);
|
|
899
|
-
}
|
|
900
|
-
if (proto.reactions) {
|
|
901
|
-
m.reactions = parseInt(proto.reactions, 10);
|
|
902
|
-
}
|
|
903
|
-
if (proto.peopleReached) {
|
|
904
|
-
m.peopleReached = parseInt(proto.peopleReached, 10);
|
|
905
|
-
}
|
|
906
874
|
return m;
|
|
907
875
|
}
|
|
908
876
|
toApiJson() {
|
|
909
877
|
const toReturn = {};
|
|
910
|
-
if (typeof this.
|
|
911
|
-
toReturn['
|
|
912
|
-
}
|
|
913
|
-
if (typeof this.shareCount !== 'undefined') {
|
|
914
|
-
toReturn['shareCount'] = this.shareCount;
|
|
878
|
+
if (typeof this.name !== 'undefined') {
|
|
879
|
+
toReturn['name'] = this.name;
|
|
915
880
|
}
|
|
916
|
-
if (typeof this.
|
|
917
|
-
toReturn['
|
|
881
|
+
if (typeof this.picture !== 'undefined') {
|
|
882
|
+
toReturn['picture'] = this.picture;
|
|
918
883
|
}
|
|
919
|
-
if (typeof this.
|
|
920
|
-
toReturn['
|
|
884
|
+
if (typeof this.description !== 'undefined') {
|
|
885
|
+
toReturn['description'] = this.description;
|
|
921
886
|
}
|
|
922
|
-
if (typeof this.
|
|
923
|
-
toReturn['
|
|
887
|
+
if (typeof this.title !== 'undefined') {
|
|
888
|
+
toReturn['title'] = this.title;
|
|
924
889
|
}
|
|
925
|
-
if (typeof this.
|
|
926
|
-
toReturn['
|
|
890
|
+
if (typeof this.url !== 'undefined') {
|
|
891
|
+
toReturn['url'] = this.url;
|
|
927
892
|
}
|
|
928
|
-
if (typeof this.
|
|
929
|
-
toReturn['
|
|
893
|
+
if (typeof this.shortcode !== 'undefined') {
|
|
894
|
+
toReturn['shortcode'] = this.shortcode;
|
|
930
895
|
}
|
|
931
896
|
return toReturn;
|
|
932
897
|
}
|
|
933
898
|
}
|
|
934
|
-
class
|
|
899
|
+
class Metadata {
|
|
935
900
|
constructor(kwargs) {
|
|
936
901
|
if (!kwargs) {
|
|
937
902
|
return;
|
|
@@ -939,31 +904,45 @@ class SocialPostStats {
|
|
|
939
904
|
Object.assign(this, kwargs);
|
|
940
905
|
}
|
|
941
906
|
static fromProto(proto) {
|
|
942
|
-
let m = new
|
|
907
|
+
let m = new Metadata();
|
|
943
908
|
m = Object.assign(m, proto);
|
|
944
|
-
|
|
945
|
-
|
|
909
|
+
return m;
|
|
910
|
+
}
|
|
911
|
+
toApiJson() {
|
|
912
|
+
const toReturn = {};
|
|
913
|
+
if (typeof this.name !== 'undefined') {
|
|
914
|
+
toReturn['name'] = this.name;
|
|
946
915
|
}
|
|
947
|
-
if (
|
|
948
|
-
|
|
916
|
+
if (typeof this.value !== 'undefined') {
|
|
917
|
+
toReturn['value'] = this.value;
|
|
918
|
+
}
|
|
919
|
+
return toReturn;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
class PostAction {
|
|
923
|
+
constructor(kwargs) {
|
|
924
|
+
if (!kwargs) {
|
|
925
|
+
return;
|
|
949
926
|
}
|
|
927
|
+
Object.assign(this, kwargs);
|
|
928
|
+
}
|
|
929
|
+
static fromProto(proto) {
|
|
930
|
+
let m = new PostAction();
|
|
931
|
+
m = Object.assign(m, proto);
|
|
950
932
|
return m;
|
|
951
933
|
}
|
|
952
934
|
toApiJson() {
|
|
953
935
|
const toReturn = {};
|
|
954
|
-
if (typeof this.
|
|
955
|
-
toReturn['
|
|
956
|
-
}
|
|
957
|
-
if (typeof this.facebookPostStats !== 'undefined' && this.facebookPostStats !== null) {
|
|
958
|
-
toReturn['facebookPostStats'] = 'toApiJson' in this.facebookPostStats ? this.facebookPostStats.toApiJson() : this.facebookPostStats;
|
|
936
|
+
if (typeof this.type !== 'undefined') {
|
|
937
|
+
toReturn['type'] = this.type;
|
|
959
938
|
}
|
|
960
|
-
if (typeof this.
|
|
961
|
-
toReturn['
|
|
939
|
+
if (typeof this.linkUrl !== 'undefined') {
|
|
940
|
+
toReturn['linkUrl'] = this.linkUrl;
|
|
962
941
|
}
|
|
963
942
|
return toReturn;
|
|
964
943
|
}
|
|
965
944
|
}
|
|
966
|
-
class
|
|
945
|
+
class PostContent {
|
|
967
946
|
constructor(kwargs) {
|
|
968
947
|
if (!kwargs) {
|
|
969
948
|
return;
|
|
@@ -971,41 +950,31 @@ class TwitterPostStats {
|
|
|
971
950
|
Object.assign(this, kwargs);
|
|
972
951
|
}
|
|
973
952
|
static fromProto(proto) {
|
|
974
|
-
let m = new
|
|
953
|
+
let m = new PostContent();
|
|
975
954
|
m = Object.assign(m, proto);
|
|
976
|
-
if (proto.
|
|
977
|
-
m.
|
|
955
|
+
if (proto.media) {
|
|
956
|
+
m.media = proto.media.map(PostMedia.fromProto);
|
|
978
957
|
}
|
|
979
|
-
if (proto.
|
|
980
|
-
m.
|
|
958
|
+
if (proto.link) {
|
|
959
|
+
m.link = proto.link.map(Link.fromProto);
|
|
981
960
|
}
|
|
982
961
|
return m;
|
|
983
962
|
}
|
|
984
963
|
toApiJson() {
|
|
985
964
|
const toReturn = {};
|
|
986
|
-
if (typeof this.
|
|
987
|
-
toReturn['
|
|
988
|
-
}
|
|
989
|
-
if (typeof this.hasFavourited !== 'undefined') {
|
|
990
|
-
toReturn['hasFavourited'] = this.hasFavourited;
|
|
965
|
+
if (typeof this.postText !== 'undefined') {
|
|
966
|
+
toReturn['postText'] = this.postText;
|
|
991
967
|
}
|
|
992
|
-
if (typeof this.
|
|
993
|
-
toReturn['
|
|
968
|
+
if (typeof this.media !== 'undefined' && this.media !== null) {
|
|
969
|
+
toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
|
|
994
970
|
}
|
|
995
|
-
if (typeof this.
|
|
996
|
-
toReturn['
|
|
971
|
+
if (typeof this.link !== 'undefined' && this.link !== null) {
|
|
972
|
+
toReturn['link'] = 'toApiJson' in this.link ? this.link.toApiJson() : this.link;
|
|
997
973
|
}
|
|
998
974
|
return toReturn;
|
|
999
975
|
}
|
|
1000
976
|
}
|
|
1001
|
-
|
|
1002
|
-
function enumStringToValue$1(enumRef, value) {
|
|
1003
|
-
if (typeof value === 'number') {
|
|
1004
|
-
return value;
|
|
1005
|
-
}
|
|
1006
|
-
return enumRef[value];
|
|
1007
|
-
}
|
|
1008
|
-
class TenorGifMediaEntry {
|
|
977
|
+
class PostCustomization {
|
|
1009
978
|
constructor(kwargs) {
|
|
1010
979
|
if (!kwargs) {
|
|
1011
980
|
return;
|
|
@@ -1013,25 +982,28 @@ class TenorGifMediaEntry {
|
|
|
1013
982
|
Object.assign(this, kwargs);
|
|
1014
983
|
}
|
|
1015
984
|
static fromProto(proto) {
|
|
1016
|
-
let m = new
|
|
985
|
+
let m = new PostCustomization();
|
|
1017
986
|
m = Object.assign(m, proto);
|
|
1018
|
-
if (proto.
|
|
1019
|
-
m.
|
|
987
|
+
if (proto.event) {
|
|
988
|
+
m.event = PostEvent.fromProto(proto.event);
|
|
989
|
+
}
|
|
990
|
+
if (proto.action) {
|
|
991
|
+
m.action = PostAction.fromProto(proto.action);
|
|
1020
992
|
}
|
|
1021
993
|
return m;
|
|
1022
994
|
}
|
|
1023
995
|
toApiJson() {
|
|
1024
996
|
const toReturn = {};
|
|
1025
|
-
if (typeof this.
|
|
1026
|
-
toReturn['
|
|
997
|
+
if (typeof this.event !== 'undefined' && this.event !== null) {
|
|
998
|
+
toReturn['event'] = 'toApiJson' in this.event ? this.event.toApiJson() : this.event;
|
|
1027
999
|
}
|
|
1028
|
-
if (typeof this.
|
|
1029
|
-
toReturn['
|
|
1000
|
+
if (typeof this.action !== 'undefined' && this.action !== null) {
|
|
1001
|
+
toReturn['action'] = 'toApiJson' in this.action ? this.action.toApiJson() : this.action;
|
|
1030
1002
|
}
|
|
1031
1003
|
return toReturn;
|
|
1032
1004
|
}
|
|
1033
1005
|
}
|
|
1034
|
-
class
|
|
1006
|
+
class PostEvent {
|
|
1035
1007
|
constructor(kwargs) {
|
|
1036
1008
|
if (!kwargs) {
|
|
1037
1009
|
return;
|
|
@@ -1039,37 +1011,31 @@ class TenorGif {
|
|
|
1039
1011
|
Object.assign(this, kwargs);
|
|
1040
1012
|
}
|
|
1041
1013
|
static fromProto(proto) {
|
|
1042
|
-
let m = new
|
|
1014
|
+
let m = new PostEvent();
|
|
1043
1015
|
m = Object.assign(m, proto);
|
|
1044
|
-
if (proto.
|
|
1045
|
-
m.
|
|
1016
|
+
if (proto.start) {
|
|
1017
|
+
m.start = new Date(proto.start);
|
|
1018
|
+
}
|
|
1019
|
+
if (proto.end) {
|
|
1020
|
+
m.end = new Date(proto.end);
|
|
1046
1021
|
}
|
|
1047
1022
|
return m;
|
|
1048
1023
|
}
|
|
1049
1024
|
toApiJson() {
|
|
1050
1025
|
const toReturn = {};
|
|
1051
|
-
if (typeof this.media !== 'undefined' && this.media !== null) {
|
|
1052
|
-
toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
|
|
1053
|
-
}
|
|
1054
|
-
if (typeof this.tags !== 'undefined') {
|
|
1055
|
-
toReturn['tags'] = this.tags;
|
|
1056
|
-
}
|
|
1057
|
-
if (typeof this.hasAudio !== 'undefined') {
|
|
1058
|
-
toReturn['hasAudio'] = this.hasAudio;
|
|
1059
|
-
}
|
|
1060
1026
|
if (typeof this.title !== 'undefined') {
|
|
1061
1027
|
toReturn['title'] = this.title;
|
|
1062
1028
|
}
|
|
1063
|
-
if (typeof this.
|
|
1064
|
-
toReturn['
|
|
1029
|
+
if (typeof this.start !== 'undefined' && this.start !== null) {
|
|
1030
|
+
toReturn['start'] = 'toApiJson' in this.start ? this.start.toApiJson() : this.start;
|
|
1065
1031
|
}
|
|
1066
|
-
if (typeof this.
|
|
1067
|
-
toReturn['
|
|
1032
|
+
if (typeof this.end !== 'undefined' && this.end !== null) {
|
|
1033
|
+
toReturn['end'] = 'toApiJson' in this.end ? this.end.toApiJson() : this.end;
|
|
1068
1034
|
}
|
|
1069
1035
|
return toReturn;
|
|
1070
1036
|
}
|
|
1071
1037
|
}
|
|
1072
|
-
class
|
|
1038
|
+
class PostMedia {
|
|
1073
1039
|
constructor(kwargs) {
|
|
1074
1040
|
if (!kwargs) {
|
|
1075
1041
|
return;
|
|
@@ -1077,41 +1043,34 @@ class TenorMediaObject {
|
|
|
1077
1043
|
Object.assign(this, kwargs);
|
|
1078
1044
|
}
|
|
1079
1045
|
static fromProto(proto) {
|
|
1080
|
-
let m = new
|
|
1046
|
+
let m = new PostMedia();
|
|
1081
1047
|
m = Object.assign(m, proto);
|
|
1082
|
-
if (proto.
|
|
1083
|
-
m.
|
|
1084
|
-
}
|
|
1085
|
-
if (proto.size) {
|
|
1086
|
-
m.size = parseInt(proto.size, 10);
|
|
1048
|
+
if (proto.metadata) {
|
|
1049
|
+
m.metadata = proto.metadata.map(Metadata.fromProto);
|
|
1087
1050
|
}
|
|
1088
1051
|
return m;
|
|
1089
1052
|
}
|
|
1090
1053
|
toApiJson() {
|
|
1091
1054
|
const toReturn = {};
|
|
1092
|
-
if (typeof this.
|
|
1093
|
-
toReturn['
|
|
1055
|
+
if (typeof this.mediaId !== 'undefined') {
|
|
1056
|
+
toReturn['mediaId'] = this.mediaId;
|
|
1094
1057
|
}
|
|
1095
|
-
if (typeof this.
|
|
1096
|
-
toReturn['
|
|
1058
|
+
if (typeof this.mediaUrl !== 'undefined') {
|
|
1059
|
+
toReturn['mediaUrl'] = this.mediaUrl;
|
|
1097
1060
|
}
|
|
1098
|
-
if (typeof this.
|
|
1099
|
-
toReturn['
|
|
1061
|
+
if (typeof this.mediaType !== 'undefined') {
|
|
1062
|
+
toReturn['mediaType'] = this.mediaType;
|
|
1100
1063
|
}
|
|
1101
|
-
if (typeof this.
|
|
1102
|
-
toReturn['
|
|
1064
|
+
if (typeof this.containerId !== 'undefined') {
|
|
1065
|
+
toReturn['containerId'] = this.containerId;
|
|
1066
|
+
}
|
|
1067
|
+
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
1068
|
+
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
1103
1069
|
}
|
|
1104
1070
|
return toReturn;
|
|
1105
1071
|
}
|
|
1106
1072
|
}
|
|
1107
|
-
|
|
1108
|
-
function enumStringToValue(enumRef, value) {
|
|
1109
|
-
if (typeof value === 'number') {
|
|
1110
|
-
return value;
|
|
1111
|
-
}
|
|
1112
|
-
return enumRef[value];
|
|
1113
|
-
}
|
|
1114
|
-
class CreateMultilocationPostRequest {
|
|
1073
|
+
class SocialPost {
|
|
1115
1074
|
constructor(kwargs) {
|
|
1116
1075
|
if (!kwargs) {
|
|
1117
1076
|
return;
|
|
@@ -1119,7 +1078,294 @@ class CreateMultilocationPostRequest {
|
|
|
1119
1078
|
Object.assign(this, kwargs);
|
|
1120
1079
|
}
|
|
1121
1080
|
static fromProto(proto) {
|
|
1122
|
-
let m = new
|
|
1081
|
+
let m = new SocialPost();
|
|
1082
|
+
m = Object.assign(m, proto);
|
|
1083
|
+
if (proto.postContent) {
|
|
1084
|
+
m.postContent = PostContent.fromProto(proto.postContent);
|
|
1085
|
+
}
|
|
1086
|
+
if (proto.scheduled) {
|
|
1087
|
+
m.scheduled = new Date(proto.scheduled);
|
|
1088
|
+
}
|
|
1089
|
+
if (proto.customization) {
|
|
1090
|
+
m.customization = PostCustomization.fromProto(proto.customization);
|
|
1091
|
+
}
|
|
1092
|
+
if (proto.postType) {
|
|
1093
|
+
m.postType = enumStringToValue$5(PostType$1, proto.postType);
|
|
1094
|
+
}
|
|
1095
|
+
return m;
|
|
1096
|
+
}
|
|
1097
|
+
toApiJson() {
|
|
1098
|
+
const toReturn = {};
|
|
1099
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1100
|
+
toReturn['businessId'] = this.businessId;
|
|
1101
|
+
}
|
|
1102
|
+
if (typeof this.socialServiceId !== 'undefined') {
|
|
1103
|
+
toReturn['socialServiceId'] = this.socialServiceId;
|
|
1104
|
+
}
|
|
1105
|
+
if (typeof this.postContent !== 'undefined' && this.postContent !== null) {
|
|
1106
|
+
toReturn['postContent'] = 'toApiJson' in this.postContent ? this.postContent.toApiJson() : this.postContent;
|
|
1107
|
+
}
|
|
1108
|
+
if (typeof this.scheduled !== 'undefined' && this.scheduled !== null) {
|
|
1109
|
+
toReturn['scheduled'] = 'toApiJson' in this.scheduled ? this.scheduled.toApiJson() : this.scheduled;
|
|
1110
|
+
}
|
|
1111
|
+
if (typeof this.customization !== 'undefined' && this.customization !== null) {
|
|
1112
|
+
toReturn['customization'] = 'toApiJson' in this.customization ? this.customization.toApiJson() : this.customization;
|
|
1113
|
+
}
|
|
1114
|
+
if (typeof this.postType !== 'undefined') {
|
|
1115
|
+
toReturn['postType'] = this.postType;
|
|
1116
|
+
}
|
|
1117
|
+
return toReturn;
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
function enumStringToValue$4(enumRef, value) {
|
|
1122
|
+
if (typeof value === 'number') {
|
|
1123
|
+
return value;
|
|
1124
|
+
}
|
|
1125
|
+
return enumRef[value];
|
|
1126
|
+
}
|
|
1127
|
+
class FacebookPostStats {
|
|
1128
|
+
constructor(kwargs) {
|
|
1129
|
+
if (!kwargs) {
|
|
1130
|
+
return;
|
|
1131
|
+
}
|
|
1132
|
+
Object.assign(this, kwargs);
|
|
1133
|
+
}
|
|
1134
|
+
static fromProto(proto) {
|
|
1135
|
+
let m = new FacebookPostStats();
|
|
1136
|
+
m = Object.assign(m, proto);
|
|
1137
|
+
if (proto.commentCount) {
|
|
1138
|
+
m.commentCount = parseInt(proto.commentCount, 10);
|
|
1139
|
+
}
|
|
1140
|
+
if (proto.shareCount) {
|
|
1141
|
+
m.shareCount = parseInt(proto.shareCount, 10);
|
|
1142
|
+
}
|
|
1143
|
+
if (proto.likeCount) {
|
|
1144
|
+
m.likeCount = parseInt(proto.likeCount, 10);
|
|
1145
|
+
}
|
|
1146
|
+
if (proto.reactions) {
|
|
1147
|
+
m.reactions = parseInt(proto.reactions, 10);
|
|
1148
|
+
}
|
|
1149
|
+
if (proto.peopleReached) {
|
|
1150
|
+
m.peopleReached = parseInt(proto.peopleReached, 10);
|
|
1151
|
+
}
|
|
1152
|
+
return m;
|
|
1153
|
+
}
|
|
1154
|
+
toApiJson() {
|
|
1155
|
+
const toReturn = {};
|
|
1156
|
+
if (typeof this.commentCount !== 'undefined') {
|
|
1157
|
+
toReturn['commentCount'] = this.commentCount;
|
|
1158
|
+
}
|
|
1159
|
+
if (typeof this.shareCount !== 'undefined') {
|
|
1160
|
+
toReturn['shareCount'] = this.shareCount;
|
|
1161
|
+
}
|
|
1162
|
+
if (typeof this.likeCount !== 'undefined') {
|
|
1163
|
+
toReturn['likeCount'] = this.likeCount;
|
|
1164
|
+
}
|
|
1165
|
+
if (typeof this.hasLike !== 'undefined') {
|
|
1166
|
+
toReturn['hasLike'] = this.hasLike;
|
|
1167
|
+
}
|
|
1168
|
+
if (typeof this.canLike !== 'undefined') {
|
|
1169
|
+
toReturn['canLike'] = this.canLike;
|
|
1170
|
+
}
|
|
1171
|
+
if (typeof this.reactions !== 'undefined') {
|
|
1172
|
+
toReturn['reactions'] = this.reactions;
|
|
1173
|
+
}
|
|
1174
|
+
if (typeof this.peopleReached !== 'undefined') {
|
|
1175
|
+
toReturn['peopleReached'] = this.peopleReached;
|
|
1176
|
+
}
|
|
1177
|
+
return toReturn;
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
class SocialPostStats {
|
|
1181
|
+
constructor(kwargs) {
|
|
1182
|
+
if (!kwargs) {
|
|
1183
|
+
return;
|
|
1184
|
+
}
|
|
1185
|
+
Object.assign(this, kwargs);
|
|
1186
|
+
}
|
|
1187
|
+
static fromProto(proto) {
|
|
1188
|
+
let m = new SocialPostStats();
|
|
1189
|
+
m = Object.assign(m, proto);
|
|
1190
|
+
if (proto.facebookPostStats) {
|
|
1191
|
+
m.facebookPostStats = FacebookPostStats.fromProto(proto.facebookPostStats);
|
|
1192
|
+
}
|
|
1193
|
+
if (proto.twitterPostStats) {
|
|
1194
|
+
m.twitterPostStats = TwitterPostStats.fromProto(proto.twitterPostStats);
|
|
1195
|
+
}
|
|
1196
|
+
return m;
|
|
1197
|
+
}
|
|
1198
|
+
toApiJson() {
|
|
1199
|
+
const toReturn = {};
|
|
1200
|
+
if (typeof this.internalPostId !== 'undefined') {
|
|
1201
|
+
toReturn['internalPostId'] = this.internalPostId;
|
|
1202
|
+
}
|
|
1203
|
+
if (typeof this.facebookPostStats !== 'undefined' && this.facebookPostStats !== null) {
|
|
1204
|
+
toReturn['facebookPostStats'] = 'toApiJson' in this.facebookPostStats ? this.facebookPostStats.toApiJson() : this.facebookPostStats;
|
|
1205
|
+
}
|
|
1206
|
+
if (typeof this.twitterPostStats !== 'undefined' && this.twitterPostStats !== null) {
|
|
1207
|
+
toReturn['twitterPostStats'] = 'toApiJson' in this.twitterPostStats ? this.twitterPostStats.toApiJson() : this.twitterPostStats;
|
|
1208
|
+
}
|
|
1209
|
+
return toReturn;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
class TwitterPostStats {
|
|
1213
|
+
constructor(kwargs) {
|
|
1214
|
+
if (!kwargs) {
|
|
1215
|
+
return;
|
|
1216
|
+
}
|
|
1217
|
+
Object.assign(this, kwargs);
|
|
1218
|
+
}
|
|
1219
|
+
static fromProto(proto) {
|
|
1220
|
+
let m = new TwitterPostStats();
|
|
1221
|
+
m = Object.assign(m, proto);
|
|
1222
|
+
if (proto.favourites) {
|
|
1223
|
+
m.favourites = parseInt(proto.favourites, 10);
|
|
1224
|
+
}
|
|
1225
|
+
if (proto.retweets) {
|
|
1226
|
+
m.retweets = parseInt(proto.retweets, 10);
|
|
1227
|
+
}
|
|
1228
|
+
return m;
|
|
1229
|
+
}
|
|
1230
|
+
toApiJson() {
|
|
1231
|
+
const toReturn = {};
|
|
1232
|
+
if (typeof this.favourites !== 'undefined') {
|
|
1233
|
+
toReturn['favourites'] = this.favourites;
|
|
1234
|
+
}
|
|
1235
|
+
if (typeof this.hasFavourited !== 'undefined') {
|
|
1236
|
+
toReturn['hasFavourited'] = this.hasFavourited;
|
|
1237
|
+
}
|
|
1238
|
+
if (typeof this.retweets !== 'undefined') {
|
|
1239
|
+
toReturn['retweets'] = this.retweets;
|
|
1240
|
+
}
|
|
1241
|
+
if (typeof this.hasRetweeted !== 'undefined') {
|
|
1242
|
+
toReturn['hasRetweeted'] = this.hasRetweeted;
|
|
1243
|
+
}
|
|
1244
|
+
return toReturn;
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
function enumStringToValue$3(enumRef, value) {
|
|
1249
|
+
if (typeof value === 'number') {
|
|
1250
|
+
return value;
|
|
1251
|
+
}
|
|
1252
|
+
return enumRef[value];
|
|
1253
|
+
}
|
|
1254
|
+
class TenorGifMediaEntry {
|
|
1255
|
+
constructor(kwargs) {
|
|
1256
|
+
if (!kwargs) {
|
|
1257
|
+
return;
|
|
1258
|
+
}
|
|
1259
|
+
Object.assign(this, kwargs);
|
|
1260
|
+
}
|
|
1261
|
+
static fromProto(proto) {
|
|
1262
|
+
let m = new TenorGifMediaEntry();
|
|
1263
|
+
m = Object.assign(m, proto);
|
|
1264
|
+
if (proto.value) {
|
|
1265
|
+
m.value = TenorMediaObject.fromProto(proto.value);
|
|
1266
|
+
}
|
|
1267
|
+
return m;
|
|
1268
|
+
}
|
|
1269
|
+
toApiJson() {
|
|
1270
|
+
const toReturn = {};
|
|
1271
|
+
if (typeof this.key !== 'undefined') {
|
|
1272
|
+
toReturn['key'] = this.key;
|
|
1273
|
+
}
|
|
1274
|
+
if (typeof this.value !== 'undefined' && this.value !== null) {
|
|
1275
|
+
toReturn['value'] = 'toApiJson' in this.value ? this.value.toApiJson() : this.value;
|
|
1276
|
+
}
|
|
1277
|
+
return toReturn;
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
class TenorGif {
|
|
1281
|
+
constructor(kwargs) {
|
|
1282
|
+
if (!kwargs) {
|
|
1283
|
+
return;
|
|
1284
|
+
}
|
|
1285
|
+
Object.assign(this, kwargs);
|
|
1286
|
+
}
|
|
1287
|
+
static fromProto(proto) {
|
|
1288
|
+
let m = new TenorGif();
|
|
1289
|
+
m = Object.assign(m, proto);
|
|
1290
|
+
if (proto.media) {
|
|
1291
|
+
m.media = Object.keys(proto.media).reduce((obj, k) => { obj[k] = TenorMediaObject.fromProto(proto.media[k]); return obj; }, {});
|
|
1292
|
+
}
|
|
1293
|
+
return m;
|
|
1294
|
+
}
|
|
1295
|
+
toApiJson() {
|
|
1296
|
+
const toReturn = {};
|
|
1297
|
+
if (typeof this.media !== 'undefined' && this.media !== null) {
|
|
1298
|
+
toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
|
|
1299
|
+
}
|
|
1300
|
+
if (typeof this.tags !== 'undefined') {
|
|
1301
|
+
toReturn['tags'] = this.tags;
|
|
1302
|
+
}
|
|
1303
|
+
if (typeof this.hasAudio !== 'undefined') {
|
|
1304
|
+
toReturn['hasAudio'] = this.hasAudio;
|
|
1305
|
+
}
|
|
1306
|
+
if (typeof this.title !== 'undefined') {
|
|
1307
|
+
toReturn['title'] = this.title;
|
|
1308
|
+
}
|
|
1309
|
+
if (typeof this.id !== 'undefined') {
|
|
1310
|
+
toReturn['id'] = this.id;
|
|
1311
|
+
}
|
|
1312
|
+
if (typeof this.created !== 'undefined') {
|
|
1313
|
+
toReturn['created'] = this.created;
|
|
1314
|
+
}
|
|
1315
|
+
return toReturn;
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
class TenorMediaObject {
|
|
1319
|
+
constructor(kwargs) {
|
|
1320
|
+
if (!kwargs) {
|
|
1321
|
+
return;
|
|
1322
|
+
}
|
|
1323
|
+
Object.assign(this, kwargs);
|
|
1324
|
+
}
|
|
1325
|
+
static fromProto(proto) {
|
|
1326
|
+
let m = new TenorMediaObject();
|
|
1327
|
+
m = Object.assign(m, proto);
|
|
1328
|
+
if (proto.dimensions) {
|
|
1329
|
+
m.dimensions = proto.dimensions.map((i) => parseInt(i, 10));
|
|
1330
|
+
}
|
|
1331
|
+
if (proto.size) {
|
|
1332
|
+
m.size = parseInt(proto.size, 10);
|
|
1333
|
+
}
|
|
1334
|
+
return m;
|
|
1335
|
+
}
|
|
1336
|
+
toApiJson() {
|
|
1337
|
+
const toReturn = {};
|
|
1338
|
+
if (typeof this.preview !== 'undefined') {
|
|
1339
|
+
toReturn['preview'] = this.preview;
|
|
1340
|
+
}
|
|
1341
|
+
if (typeof this.url !== 'undefined') {
|
|
1342
|
+
toReturn['url'] = this.url;
|
|
1343
|
+
}
|
|
1344
|
+
if (typeof this.dimensions !== 'undefined') {
|
|
1345
|
+
toReturn['dimensions'] = this.dimensions;
|
|
1346
|
+
}
|
|
1347
|
+
if (typeof this.size !== 'undefined') {
|
|
1348
|
+
toReturn['size'] = this.size;
|
|
1349
|
+
}
|
|
1350
|
+
return toReturn;
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
function enumStringToValue$2(enumRef, value) {
|
|
1355
|
+
if (typeof value === 'number') {
|
|
1356
|
+
return value;
|
|
1357
|
+
}
|
|
1358
|
+
return enumRef[value];
|
|
1359
|
+
}
|
|
1360
|
+
class CreateMultilocationPostRequest {
|
|
1361
|
+
constructor(kwargs) {
|
|
1362
|
+
if (!kwargs) {
|
|
1363
|
+
return;
|
|
1364
|
+
}
|
|
1365
|
+
Object.assign(this, kwargs);
|
|
1366
|
+
}
|
|
1367
|
+
static fromProto(proto) {
|
|
1368
|
+
let m = new CreateMultilocationPostRequest();
|
|
1123
1369
|
m = Object.assign(m, proto);
|
|
1124
1370
|
if (proto.scheduledDate) {
|
|
1125
1371
|
m.scheduledDate = new Date(proto.scheduledDate);
|
|
@@ -1204,7 +1450,7 @@ class CreatePostTemplateRequest {
|
|
|
1204
1450
|
m.metaData = proto.metaData.map(MetaData.fromProto);
|
|
1205
1451
|
}
|
|
1206
1452
|
if (proto.postType) {
|
|
1207
|
-
m.postType = enumStringToValue(PostType, proto.postType);
|
|
1453
|
+
m.postType = enumStringToValue$2(PostType$1, proto.postType);
|
|
1208
1454
|
}
|
|
1209
1455
|
return m;
|
|
1210
1456
|
}
|
|
@@ -1564,19 +1810,252 @@ class GetGeneratedCSVForPerformanceStatsRequest {
|
|
|
1564
1810
|
Object.assign(this, kwargs);
|
|
1565
1811
|
}
|
|
1566
1812
|
static fromProto(proto) {
|
|
1567
|
-
let m = new GetGeneratedCSVForPerformanceStatsRequest();
|
|
1813
|
+
let m = new GetGeneratedCSVForPerformanceStatsRequest();
|
|
1814
|
+
m = Object.assign(m, proto);
|
|
1815
|
+
return m;
|
|
1816
|
+
}
|
|
1817
|
+
toApiJson() {
|
|
1818
|
+
const toReturn = {};
|
|
1819
|
+
if (typeof this.generatedId !== 'undefined') {
|
|
1820
|
+
toReturn['generatedId'] = this.generatedId;
|
|
1821
|
+
}
|
|
1822
|
+
return toReturn;
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
class GetGeneratedCSVForPerformanceStatsResponse {
|
|
1826
|
+
constructor(kwargs) {
|
|
1827
|
+
if (!kwargs) {
|
|
1828
|
+
return;
|
|
1829
|
+
}
|
|
1830
|
+
Object.assign(this, kwargs);
|
|
1831
|
+
}
|
|
1832
|
+
static fromProto(proto) {
|
|
1833
|
+
let m = new GetGeneratedCSVForPerformanceStatsResponse();
|
|
1834
|
+
m = Object.assign(m, proto);
|
|
1835
|
+
return m;
|
|
1836
|
+
}
|
|
1837
|
+
toApiJson() {
|
|
1838
|
+
const toReturn = {};
|
|
1839
|
+
if (typeof this.url !== 'undefined') {
|
|
1840
|
+
toReturn['url'] = this.url;
|
|
1841
|
+
}
|
|
1842
|
+
return toReturn;
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
class GetMultiSocialPostStatsRequest {
|
|
1846
|
+
constructor(kwargs) {
|
|
1847
|
+
if (!kwargs) {
|
|
1848
|
+
return;
|
|
1849
|
+
}
|
|
1850
|
+
Object.assign(this, kwargs);
|
|
1851
|
+
}
|
|
1852
|
+
static fromProto(proto) {
|
|
1853
|
+
let m = new GetMultiSocialPostStatsRequest();
|
|
1854
|
+
m = Object.assign(m, proto);
|
|
1855
|
+
return m;
|
|
1856
|
+
}
|
|
1857
|
+
toApiJson() {
|
|
1858
|
+
const toReturn = {};
|
|
1859
|
+
if (typeof this.internalPostIds !== 'undefined') {
|
|
1860
|
+
toReturn['internalPostIds'] = this.internalPostIds;
|
|
1861
|
+
}
|
|
1862
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1863
|
+
toReturn['businessId'] = this.businessId;
|
|
1864
|
+
}
|
|
1865
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
1866
|
+
toReturn['partnerId'] = this.partnerId;
|
|
1867
|
+
}
|
|
1868
|
+
return toReturn;
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
class GetMultiSocialPostStatsResponse {
|
|
1872
|
+
constructor(kwargs) {
|
|
1873
|
+
if (!kwargs) {
|
|
1874
|
+
return;
|
|
1875
|
+
}
|
|
1876
|
+
Object.assign(this, kwargs);
|
|
1877
|
+
}
|
|
1878
|
+
static fromProto(proto) {
|
|
1879
|
+
let m = new GetMultiSocialPostStatsResponse();
|
|
1880
|
+
m = Object.assign(m, proto);
|
|
1881
|
+
if (proto.socialPostStats) {
|
|
1882
|
+
m.socialPostStats = proto.socialPostStats.map(SocialPostStats.fromProto);
|
|
1883
|
+
}
|
|
1884
|
+
return m;
|
|
1885
|
+
}
|
|
1886
|
+
toApiJson() {
|
|
1887
|
+
const toReturn = {};
|
|
1888
|
+
if (typeof this.socialPostStats !== 'undefined' && this.socialPostStats !== null) {
|
|
1889
|
+
toReturn['socialPostStats'] = 'toApiJson' in this.socialPostStats ? this.socialPostStats.toApiJson() : this.socialPostStats;
|
|
1890
|
+
}
|
|
1891
|
+
return toReturn;
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
class GetMultiSocialPostsRequest {
|
|
1895
|
+
constructor(kwargs) {
|
|
1896
|
+
if (!kwargs) {
|
|
1897
|
+
return;
|
|
1898
|
+
}
|
|
1899
|
+
Object.assign(this, kwargs);
|
|
1900
|
+
}
|
|
1901
|
+
static fromProto(proto) {
|
|
1902
|
+
let m = new GetMultiSocialPostsRequest();
|
|
1903
|
+
m = Object.assign(m, proto);
|
|
1904
|
+
return m;
|
|
1905
|
+
}
|
|
1906
|
+
toApiJson() {
|
|
1907
|
+
const toReturn = {};
|
|
1908
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1909
|
+
toReturn['businessId'] = this.businessId;
|
|
1910
|
+
}
|
|
1911
|
+
if (typeof this.internalPostIds !== 'undefined') {
|
|
1912
|
+
toReturn['internalPostIds'] = this.internalPostIds;
|
|
1913
|
+
}
|
|
1914
|
+
return toReturn;
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
class GetMultiSocialPostsResponse {
|
|
1918
|
+
constructor(kwargs) {
|
|
1919
|
+
if (!kwargs) {
|
|
1920
|
+
return;
|
|
1921
|
+
}
|
|
1922
|
+
Object.assign(this, kwargs);
|
|
1923
|
+
}
|
|
1924
|
+
static fromProto(proto) {
|
|
1925
|
+
let m = new GetMultiSocialPostsResponse();
|
|
1926
|
+
m = Object.assign(m, proto);
|
|
1927
|
+
if (proto.socialPosts) {
|
|
1928
|
+
m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
|
|
1929
|
+
}
|
|
1930
|
+
return m;
|
|
1931
|
+
}
|
|
1932
|
+
toApiJson() {
|
|
1933
|
+
const toReturn = {};
|
|
1934
|
+
if (typeof this.socialPosts !== 'undefined' && this.socialPosts !== null) {
|
|
1935
|
+
toReturn['socialPosts'] = 'toApiJson' in this.socialPosts ? this.socialPosts.toApiJson() : this.socialPosts;
|
|
1936
|
+
}
|
|
1937
|
+
return toReturn;
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1940
|
+
class GetMultilocationPostRequest {
|
|
1941
|
+
constructor(kwargs) {
|
|
1942
|
+
if (!kwargs) {
|
|
1943
|
+
return;
|
|
1944
|
+
}
|
|
1945
|
+
Object.assign(this, kwargs);
|
|
1946
|
+
}
|
|
1947
|
+
static fromProto(proto) {
|
|
1948
|
+
let m = new GetMultilocationPostRequest();
|
|
1949
|
+
m = Object.assign(m, proto);
|
|
1950
|
+
return m;
|
|
1951
|
+
}
|
|
1952
|
+
toApiJson() {
|
|
1953
|
+
const toReturn = {};
|
|
1954
|
+
if (typeof this.brandId !== 'undefined') {
|
|
1955
|
+
toReturn['brandId'] = this.brandId;
|
|
1956
|
+
}
|
|
1957
|
+
if (typeof this.multilocationId !== 'undefined') {
|
|
1958
|
+
toReturn['multilocationId'] = this.multilocationId;
|
|
1959
|
+
}
|
|
1960
|
+
return toReturn;
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
class GetMultilocationPostResponse {
|
|
1964
|
+
constructor(kwargs) {
|
|
1965
|
+
if (!kwargs) {
|
|
1966
|
+
return;
|
|
1967
|
+
}
|
|
1968
|
+
Object.assign(this, kwargs);
|
|
1969
|
+
}
|
|
1970
|
+
static fromProto(proto) {
|
|
1971
|
+
let m = new GetMultilocationPostResponse();
|
|
1972
|
+
m = Object.assign(m, proto);
|
|
1973
|
+
if (proto.multilocationPost) {
|
|
1974
|
+
m.multilocationPost = MultilocationPost.fromProto(proto.multilocationPost);
|
|
1975
|
+
}
|
|
1976
|
+
return m;
|
|
1977
|
+
}
|
|
1978
|
+
toApiJson() {
|
|
1979
|
+
const toReturn = {};
|
|
1980
|
+
if (typeof this.multilocationPost !== 'undefined' && this.multilocationPost !== null) {
|
|
1981
|
+
toReturn['multilocationPost'] = 'toApiJson' in this.multilocationPost ? this.multilocationPost.toApiJson() : this.multilocationPost;
|
|
1982
|
+
}
|
|
1983
|
+
return toReturn;
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
class GetPostTemplateRequest {
|
|
1987
|
+
constructor(kwargs) {
|
|
1988
|
+
if (!kwargs) {
|
|
1989
|
+
return;
|
|
1990
|
+
}
|
|
1991
|
+
Object.assign(this, kwargs);
|
|
1992
|
+
}
|
|
1993
|
+
static fromProto(proto) {
|
|
1994
|
+
let m = new GetPostTemplateRequest();
|
|
1995
|
+
m = Object.assign(m, proto);
|
|
1996
|
+
return m;
|
|
1997
|
+
}
|
|
1998
|
+
toApiJson() {
|
|
1999
|
+
const toReturn = {};
|
|
2000
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
2001
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
2002
|
+
}
|
|
2003
|
+
if (typeof this.templateId !== 'undefined') {
|
|
2004
|
+
toReturn['templateId'] = this.templateId;
|
|
2005
|
+
}
|
|
2006
|
+
return toReturn;
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
class GetPostTemplateResponse {
|
|
2010
|
+
constructor(kwargs) {
|
|
2011
|
+
if (!kwargs) {
|
|
2012
|
+
return;
|
|
2013
|
+
}
|
|
2014
|
+
Object.assign(this, kwargs);
|
|
2015
|
+
}
|
|
2016
|
+
static fromProto(proto) {
|
|
2017
|
+
let m = new GetPostTemplateResponse();
|
|
2018
|
+
m = Object.assign(m, proto);
|
|
2019
|
+
if (proto.postTemplate) {
|
|
2020
|
+
m.postTemplate = PostTemplate.fromProto(proto.postTemplate);
|
|
2021
|
+
}
|
|
2022
|
+
return m;
|
|
2023
|
+
}
|
|
2024
|
+
toApiJson() {
|
|
2025
|
+
const toReturn = {};
|
|
2026
|
+
if (typeof this.postTemplate !== 'undefined' && this.postTemplate !== null) {
|
|
2027
|
+
toReturn['postTemplate'] = 'toApiJson' in this.postTemplate ? this.postTemplate.toApiJson() : this.postTemplate;
|
|
2028
|
+
}
|
|
2029
|
+
return toReturn;
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
class GetScheduledPostCountRequest {
|
|
2033
|
+
constructor(kwargs) {
|
|
2034
|
+
if (!kwargs) {
|
|
2035
|
+
return;
|
|
2036
|
+
}
|
|
2037
|
+
Object.assign(this, kwargs);
|
|
2038
|
+
}
|
|
2039
|
+
static fromProto(proto) {
|
|
2040
|
+
let m = new GetScheduledPostCountRequest();
|
|
1568
2041
|
m = Object.assign(m, proto);
|
|
1569
2042
|
return m;
|
|
1570
2043
|
}
|
|
1571
2044
|
toApiJson() {
|
|
1572
2045
|
const toReturn = {};
|
|
1573
|
-
if (typeof this.
|
|
1574
|
-
toReturn['
|
|
2046
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
2047
|
+
toReturn['partnerId'] = this.partnerId;
|
|
2048
|
+
}
|
|
2049
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2050
|
+
toReturn['businessId'] = this.businessId;
|
|
2051
|
+
}
|
|
2052
|
+
if (typeof this.socialServiceIds !== 'undefined') {
|
|
2053
|
+
toReturn['socialServiceIds'] = this.socialServiceIds;
|
|
1575
2054
|
}
|
|
1576
2055
|
return toReturn;
|
|
1577
2056
|
}
|
|
1578
2057
|
}
|
|
1579
|
-
class
|
|
2058
|
+
class GetScheduledPostCountResponse {
|
|
1580
2059
|
constructor(kwargs) {
|
|
1581
2060
|
if (!kwargs) {
|
|
1582
2061
|
return;
|
|
@@ -1584,45 +2063,39 @@ class GetGeneratedCSVForPerformanceStatsResponse {
|
|
|
1584
2063
|
Object.assign(this, kwargs);
|
|
1585
2064
|
}
|
|
1586
2065
|
static fromProto(proto) {
|
|
1587
|
-
let m = new
|
|
2066
|
+
let m = new GetScheduledPostCountResponse();
|
|
1588
2067
|
m = Object.assign(m, proto);
|
|
2068
|
+
if (proto.count) {
|
|
2069
|
+
m.count = parseInt(proto.count, 10);
|
|
2070
|
+
}
|
|
1589
2071
|
return m;
|
|
1590
2072
|
}
|
|
1591
2073
|
toApiJson() {
|
|
1592
2074
|
const toReturn = {};
|
|
1593
|
-
if (typeof this.
|
|
1594
|
-
toReturn['
|
|
2075
|
+
if (typeof this.count !== 'undefined') {
|
|
2076
|
+
toReturn['count'] = this.count;
|
|
1595
2077
|
}
|
|
1596
2078
|
return toReturn;
|
|
1597
2079
|
}
|
|
1598
2080
|
}
|
|
1599
|
-
class
|
|
2081
|
+
class GetTenorAnonymousIdRequest {
|
|
2082
|
+
static fromProto(proto) {
|
|
2083
|
+
let m = new GetTenorAnonymousIdRequest();
|
|
2084
|
+
m = Object.assign(m, proto);
|
|
2085
|
+
return m;
|
|
2086
|
+
}
|
|
1600
2087
|
constructor(kwargs) {
|
|
1601
2088
|
if (!kwargs) {
|
|
1602
2089
|
return;
|
|
1603
2090
|
}
|
|
1604
2091
|
Object.assign(this, kwargs);
|
|
1605
2092
|
}
|
|
1606
|
-
static fromProto(proto) {
|
|
1607
|
-
let m = new GetMultiSocialPostStatsRequest();
|
|
1608
|
-
m = Object.assign(m, proto);
|
|
1609
|
-
return m;
|
|
1610
|
-
}
|
|
1611
2093
|
toApiJson() {
|
|
1612
2094
|
const toReturn = {};
|
|
1613
|
-
if (typeof this.internalPostIds !== 'undefined') {
|
|
1614
|
-
toReturn['internalPostIds'] = this.internalPostIds;
|
|
1615
|
-
}
|
|
1616
|
-
if (typeof this.businessId !== 'undefined') {
|
|
1617
|
-
toReturn['businessId'] = this.businessId;
|
|
1618
|
-
}
|
|
1619
|
-
if (typeof this.partnerId !== 'undefined') {
|
|
1620
|
-
toReturn['partnerId'] = this.partnerId;
|
|
1621
|
-
}
|
|
1622
2095
|
return toReturn;
|
|
1623
2096
|
}
|
|
1624
2097
|
}
|
|
1625
|
-
class
|
|
2098
|
+
class GetTenorAnonymousIdResponse {
|
|
1626
2099
|
constructor(kwargs) {
|
|
1627
2100
|
if (!kwargs) {
|
|
1628
2101
|
return;
|
|
@@ -1630,22 +2103,19 @@ class GetMultiSocialPostStatsResponse {
|
|
|
1630
2103
|
Object.assign(this, kwargs);
|
|
1631
2104
|
}
|
|
1632
2105
|
static fromProto(proto) {
|
|
1633
|
-
let m = new
|
|
2106
|
+
let m = new GetTenorAnonymousIdResponse();
|
|
1634
2107
|
m = Object.assign(m, proto);
|
|
1635
|
-
if (proto.socialPostStats) {
|
|
1636
|
-
m.socialPostStats = proto.socialPostStats.map(SocialPostStats.fromProto);
|
|
1637
|
-
}
|
|
1638
2108
|
return m;
|
|
1639
2109
|
}
|
|
1640
2110
|
toApiJson() {
|
|
1641
2111
|
const toReturn = {};
|
|
1642
|
-
if (typeof this.
|
|
1643
|
-
toReturn['
|
|
2112
|
+
if (typeof this.anonymousId !== 'undefined') {
|
|
2113
|
+
toReturn['anonymousId'] = this.anonymousId;
|
|
1644
2114
|
}
|
|
1645
2115
|
return toReturn;
|
|
1646
2116
|
}
|
|
1647
2117
|
}
|
|
1648
|
-
class
|
|
2118
|
+
class ListMultilocationPostsForBrandRequest {
|
|
1649
2119
|
constructor(kwargs) {
|
|
1650
2120
|
if (!kwargs) {
|
|
1651
2121
|
return;
|
|
@@ -1653,22 +2123,40 @@ class GetMultiSocialPostsRequest {
|
|
|
1653
2123
|
Object.assign(this, kwargs);
|
|
1654
2124
|
}
|
|
1655
2125
|
static fromProto(proto) {
|
|
1656
|
-
let m = new
|
|
2126
|
+
let m = new ListMultilocationPostsForBrandRequest();
|
|
1657
2127
|
m = Object.assign(m, proto);
|
|
2128
|
+
if (proto.startDate) {
|
|
2129
|
+
m.startDate = new Date(proto.startDate);
|
|
2130
|
+
}
|
|
2131
|
+
if (proto.endDate) {
|
|
2132
|
+
m.endDate = new Date(proto.endDate);
|
|
2133
|
+
}
|
|
2134
|
+
if (proto.pageSize) {
|
|
2135
|
+
m.pageSize = parseInt(proto.pageSize, 10);
|
|
2136
|
+
}
|
|
1658
2137
|
return m;
|
|
1659
2138
|
}
|
|
1660
2139
|
toApiJson() {
|
|
1661
2140
|
const toReturn = {};
|
|
1662
|
-
if (typeof this.
|
|
1663
|
-
toReturn['
|
|
2141
|
+
if (typeof this.brandId !== 'undefined') {
|
|
2142
|
+
toReturn['brandId'] = this.brandId;
|
|
1664
2143
|
}
|
|
1665
|
-
if (typeof this.
|
|
1666
|
-
toReturn['
|
|
2144
|
+
if (typeof this.startDate !== 'undefined' && this.startDate !== null) {
|
|
2145
|
+
toReturn['startDate'] = 'toApiJson' in this.startDate ? this.startDate.toApiJson() : this.startDate;
|
|
2146
|
+
}
|
|
2147
|
+
if (typeof this.endDate !== 'undefined' && this.endDate !== null) {
|
|
2148
|
+
toReturn['endDate'] = 'toApiJson' in this.endDate ? this.endDate.toApiJson() : this.endDate;
|
|
2149
|
+
}
|
|
2150
|
+
if (typeof this.cursor !== 'undefined') {
|
|
2151
|
+
toReturn['cursor'] = this.cursor;
|
|
2152
|
+
}
|
|
2153
|
+
if (typeof this.pageSize !== 'undefined') {
|
|
2154
|
+
toReturn['pageSize'] = this.pageSize;
|
|
1667
2155
|
}
|
|
1668
2156
|
return toReturn;
|
|
1669
2157
|
}
|
|
1670
2158
|
}
|
|
1671
|
-
class
|
|
2159
|
+
class ListMultilocationPostsForBrandResponse {
|
|
1672
2160
|
constructor(kwargs) {
|
|
1673
2161
|
if (!kwargs) {
|
|
1674
2162
|
return;
|
|
@@ -1676,22 +2164,34 @@ class GetMultiSocialPostsResponse {
|
|
|
1676
2164
|
Object.assign(this, kwargs);
|
|
1677
2165
|
}
|
|
1678
2166
|
static fromProto(proto) {
|
|
1679
|
-
let m = new
|
|
2167
|
+
let m = new ListMultilocationPostsForBrandResponse();
|
|
1680
2168
|
m = Object.assign(m, proto);
|
|
1681
|
-
if (proto.
|
|
1682
|
-
m.
|
|
2169
|
+
if (proto.multilocationPosts) {
|
|
2170
|
+
m.multilocationPosts = proto.multilocationPosts.map(MultilocationPost.fromProto);
|
|
2171
|
+
}
|
|
2172
|
+
if (proto.failedSocialPosts) {
|
|
2173
|
+
m.failedSocialPosts = proto.failedSocialPosts.map(SocialPost.fromProto);
|
|
1683
2174
|
}
|
|
1684
2175
|
return m;
|
|
1685
2176
|
}
|
|
1686
2177
|
toApiJson() {
|
|
1687
2178
|
const toReturn = {};
|
|
1688
|
-
if (typeof this.
|
|
1689
|
-
toReturn['
|
|
2179
|
+
if (typeof this.multilocationPosts !== 'undefined' && this.multilocationPosts !== null) {
|
|
2180
|
+
toReturn['multilocationPosts'] = 'toApiJson' in this.multilocationPosts ? this.multilocationPosts.toApiJson() : this.multilocationPosts;
|
|
2181
|
+
}
|
|
2182
|
+
if (typeof this.nextCursor !== 'undefined') {
|
|
2183
|
+
toReturn['nextCursor'] = this.nextCursor;
|
|
2184
|
+
}
|
|
2185
|
+
if (typeof this.hasMore !== 'undefined') {
|
|
2186
|
+
toReturn['hasMore'] = this.hasMore;
|
|
2187
|
+
}
|
|
2188
|
+
if (typeof this.failedSocialPosts !== 'undefined' && this.failedSocialPosts !== null) {
|
|
2189
|
+
toReturn['failedSocialPosts'] = 'toApiJson' in this.failedSocialPosts ? this.failedSocialPosts.toApiJson() : this.failedSocialPosts;
|
|
1690
2190
|
}
|
|
1691
2191
|
return toReturn;
|
|
1692
2192
|
}
|
|
1693
2193
|
}
|
|
1694
|
-
class
|
|
2194
|
+
class ListPixabayImagesRequest {
|
|
1695
2195
|
constructor(kwargs) {
|
|
1696
2196
|
if (!kwargs) {
|
|
1697
2197
|
return;
|
|
@@ -1699,22 +2199,28 @@ class GetMultilocationPostRequest {
|
|
|
1699
2199
|
Object.assign(this, kwargs);
|
|
1700
2200
|
}
|
|
1701
2201
|
static fromProto(proto) {
|
|
1702
|
-
let m = new
|
|
2202
|
+
let m = new ListPixabayImagesRequest();
|
|
1703
2203
|
m = Object.assign(m, proto);
|
|
2204
|
+
if (proto.pageSize) {
|
|
2205
|
+
m.pageSize = parseInt(proto.pageSize, 10);
|
|
2206
|
+
}
|
|
1704
2207
|
return m;
|
|
1705
2208
|
}
|
|
1706
2209
|
toApiJson() {
|
|
1707
2210
|
const toReturn = {};
|
|
1708
|
-
if (typeof this.
|
|
1709
|
-
toReturn['
|
|
2211
|
+
if (typeof this.query !== 'undefined') {
|
|
2212
|
+
toReturn['query'] = this.query;
|
|
1710
2213
|
}
|
|
1711
|
-
if (typeof this.
|
|
1712
|
-
toReturn['
|
|
2214
|
+
if (typeof this.cursor !== 'undefined') {
|
|
2215
|
+
toReturn['cursor'] = this.cursor;
|
|
2216
|
+
}
|
|
2217
|
+
if (typeof this.pageSize !== 'undefined') {
|
|
2218
|
+
toReturn['pageSize'] = this.pageSize;
|
|
1713
2219
|
}
|
|
1714
2220
|
return toReturn;
|
|
1715
2221
|
}
|
|
1716
2222
|
}
|
|
1717
|
-
class
|
|
2223
|
+
class ListPixabayImagesResponse {
|
|
1718
2224
|
constructor(kwargs) {
|
|
1719
2225
|
if (!kwargs) {
|
|
1720
2226
|
return;
|
|
@@ -1722,22 +2228,34 @@ class GetMultilocationPostResponse {
|
|
|
1722
2228
|
Object.assign(this, kwargs);
|
|
1723
2229
|
}
|
|
1724
2230
|
static fromProto(proto) {
|
|
1725
|
-
let m = new
|
|
2231
|
+
let m = new ListPixabayImagesResponse();
|
|
1726
2232
|
m = Object.assign(m, proto);
|
|
1727
|
-
if (proto.
|
|
1728
|
-
m.
|
|
2233
|
+
if (proto.total) {
|
|
2234
|
+
m.total = parseInt(proto.total, 10);
|
|
2235
|
+
}
|
|
2236
|
+
if (proto.totalHits) {
|
|
2237
|
+
m.totalHits = parseInt(proto.totalHits, 10);
|
|
2238
|
+
}
|
|
2239
|
+
if (proto.hits) {
|
|
2240
|
+
m.hits = proto.hits.map(PixabayImage.fromProto);
|
|
1729
2241
|
}
|
|
1730
2242
|
return m;
|
|
1731
2243
|
}
|
|
1732
2244
|
toApiJson() {
|
|
1733
2245
|
const toReturn = {};
|
|
1734
|
-
if (typeof this.
|
|
1735
|
-
toReturn['
|
|
2246
|
+
if (typeof this.total !== 'undefined') {
|
|
2247
|
+
toReturn['total'] = this.total;
|
|
2248
|
+
}
|
|
2249
|
+
if (typeof this.totalHits !== 'undefined') {
|
|
2250
|
+
toReturn['totalHits'] = this.totalHits;
|
|
2251
|
+
}
|
|
2252
|
+
if (typeof this.hits !== 'undefined' && this.hits !== null) {
|
|
2253
|
+
toReturn['hits'] = 'toApiJson' in this.hits ? this.hits.toApiJson() : this.hits;
|
|
1736
2254
|
}
|
|
1737
2255
|
return toReturn;
|
|
1738
2256
|
}
|
|
1739
2257
|
}
|
|
1740
|
-
class
|
|
2258
|
+
class ListPostTemplatesRequest {
|
|
1741
2259
|
constructor(kwargs) {
|
|
1742
2260
|
if (!kwargs) {
|
|
1743
2261
|
return;
|
|
@@ -1745,8 +2263,11 @@ class GetPostTemplateRequest {
|
|
|
1745
2263
|
Object.assign(this, kwargs);
|
|
1746
2264
|
}
|
|
1747
2265
|
static fromProto(proto) {
|
|
1748
|
-
let m = new
|
|
2266
|
+
let m = new ListPostTemplatesRequest();
|
|
1749
2267
|
m = Object.assign(m, proto);
|
|
2268
|
+
if (proto.pageSize) {
|
|
2269
|
+
m.pageSize = parseInt(proto.pageSize, 10);
|
|
2270
|
+
}
|
|
1750
2271
|
return m;
|
|
1751
2272
|
}
|
|
1752
2273
|
toApiJson() {
|
|
@@ -1754,13 +2275,16 @@ class GetPostTemplateRequest {
|
|
|
1754
2275
|
if (typeof this.accountGroupId !== 'undefined') {
|
|
1755
2276
|
toReturn['accountGroupId'] = this.accountGroupId;
|
|
1756
2277
|
}
|
|
1757
|
-
if (typeof this.
|
|
1758
|
-
toReturn['
|
|
2278
|
+
if (typeof this.cursor !== 'undefined') {
|
|
2279
|
+
toReturn['cursor'] = this.cursor;
|
|
2280
|
+
}
|
|
2281
|
+
if (typeof this.pageSize !== 'undefined') {
|
|
2282
|
+
toReturn['pageSize'] = this.pageSize;
|
|
1759
2283
|
}
|
|
1760
2284
|
return toReturn;
|
|
1761
2285
|
}
|
|
1762
2286
|
}
|
|
1763
|
-
class
|
|
2287
|
+
class ListPostTemplatesResponse {
|
|
1764
2288
|
constructor(kwargs) {
|
|
1765
2289
|
if (!kwargs) {
|
|
1766
2290
|
return;
|
|
@@ -1768,10 +2292,10 @@ class GetPostTemplateResponse {
|
|
|
1768
2292
|
Object.assign(this, kwargs);
|
|
1769
2293
|
}
|
|
1770
2294
|
static fromProto(proto) {
|
|
1771
|
-
let m = new
|
|
2295
|
+
let m = new ListPostTemplatesResponse();
|
|
1772
2296
|
m = Object.assign(m, proto);
|
|
1773
2297
|
if (proto.postTemplate) {
|
|
1774
|
-
m.postTemplate = PostTemplate.fromProto
|
|
2298
|
+
m.postTemplate = proto.postTemplate.map(PostTemplate.fromProto);
|
|
1775
2299
|
}
|
|
1776
2300
|
return m;
|
|
1777
2301
|
}
|
|
@@ -1780,10 +2304,16 @@ class GetPostTemplateResponse {
|
|
|
1780
2304
|
if (typeof this.postTemplate !== 'undefined' && this.postTemplate !== null) {
|
|
1781
2305
|
toReturn['postTemplate'] = 'toApiJson' in this.postTemplate ? this.postTemplate.toApiJson() : this.postTemplate;
|
|
1782
2306
|
}
|
|
2307
|
+
if (typeof this.nextCursor !== 'undefined') {
|
|
2308
|
+
toReturn['nextCursor'] = this.nextCursor;
|
|
2309
|
+
}
|
|
2310
|
+
if (typeof this.hasMore !== 'undefined') {
|
|
2311
|
+
toReturn['hasMore'] = this.hasMore;
|
|
2312
|
+
}
|
|
1783
2313
|
return toReturn;
|
|
1784
2314
|
}
|
|
1785
2315
|
}
|
|
1786
|
-
class
|
|
2316
|
+
class ListSocialPostsRequest {
|
|
1787
2317
|
constructor(kwargs) {
|
|
1788
2318
|
if (!kwargs) {
|
|
1789
2319
|
return;
|
|
@@ -1791,25 +2321,49 @@ class GetScheduledPostCountRequest {
|
|
|
1791
2321
|
Object.assign(this, kwargs);
|
|
1792
2322
|
}
|
|
1793
2323
|
static fromProto(proto) {
|
|
1794
|
-
let m = new
|
|
2324
|
+
let m = new ListSocialPostsRequest();
|
|
1795
2325
|
m = Object.assign(m, proto);
|
|
2326
|
+
if (proto.start) {
|
|
2327
|
+
m.start = new Date(proto.start);
|
|
2328
|
+
}
|
|
2329
|
+
if (proto.end) {
|
|
2330
|
+
m.end = new Date(proto.end);
|
|
2331
|
+
}
|
|
2332
|
+
if (proto.pageSize) {
|
|
2333
|
+
m.pageSize = parseInt(proto.pageSize, 10);
|
|
2334
|
+
}
|
|
1796
2335
|
return m;
|
|
1797
2336
|
}
|
|
1798
2337
|
toApiJson() {
|
|
1799
2338
|
const toReturn = {};
|
|
1800
|
-
if (typeof this.
|
|
1801
|
-
toReturn['
|
|
2339
|
+
if (typeof this.start !== 'undefined' && this.start !== null) {
|
|
2340
|
+
toReturn['start'] = 'toApiJson' in this.start ? this.start.toApiJson() : this.start;
|
|
2341
|
+
}
|
|
2342
|
+
if (typeof this.end !== 'undefined' && this.end !== null) {
|
|
2343
|
+
toReturn['end'] = 'toApiJson' in this.end ? this.end.toApiJson() : this.end;
|
|
1802
2344
|
}
|
|
1803
2345
|
if (typeof this.businessId !== 'undefined') {
|
|
1804
2346
|
toReturn['businessId'] = this.businessId;
|
|
1805
2347
|
}
|
|
2348
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
2349
|
+
toReturn['partnerId'] = this.partnerId;
|
|
2350
|
+
}
|
|
2351
|
+
if (typeof this.cursor !== 'undefined') {
|
|
2352
|
+
toReturn['cursor'] = this.cursor;
|
|
2353
|
+
}
|
|
1806
2354
|
if (typeof this.socialServiceIds !== 'undefined') {
|
|
1807
2355
|
toReturn['socialServiceIds'] = this.socialServiceIds;
|
|
1808
2356
|
}
|
|
2357
|
+
if (typeof this.tags !== 'undefined') {
|
|
2358
|
+
toReturn['tags'] = this.tags;
|
|
2359
|
+
}
|
|
2360
|
+
if (typeof this.pageSize !== 'undefined') {
|
|
2361
|
+
toReturn['pageSize'] = this.pageSize;
|
|
2362
|
+
}
|
|
1809
2363
|
return toReturn;
|
|
1810
2364
|
}
|
|
1811
2365
|
}
|
|
1812
|
-
class
|
|
2366
|
+
class ListSocialPostsResponse {
|
|
1813
2367
|
constructor(kwargs) {
|
|
1814
2368
|
if (!kwargs) {
|
|
1815
2369
|
return;
|
|
@@ -1817,39 +2371,28 @@ class GetScheduledPostCountResponse {
|
|
|
1817
2371
|
Object.assign(this, kwargs);
|
|
1818
2372
|
}
|
|
1819
2373
|
static fromProto(proto) {
|
|
1820
|
-
let m = new
|
|
2374
|
+
let m = new ListSocialPostsResponse();
|
|
1821
2375
|
m = Object.assign(m, proto);
|
|
1822
|
-
if (proto.
|
|
1823
|
-
m.
|
|
2376
|
+
if (proto.socialPosts) {
|
|
2377
|
+
m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
|
|
1824
2378
|
}
|
|
1825
2379
|
return m;
|
|
1826
2380
|
}
|
|
1827
2381
|
toApiJson() {
|
|
1828
2382
|
const toReturn = {};
|
|
1829
|
-
if (typeof this.
|
|
1830
|
-
toReturn['
|
|
2383
|
+
if (typeof this.socialPosts !== 'undefined' && this.socialPosts !== null) {
|
|
2384
|
+
toReturn['socialPosts'] = 'toApiJson' in this.socialPosts ? this.socialPosts.toApiJson() : this.socialPosts;
|
|
1831
2385
|
}
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
}
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
let m = new GetTenorAnonymousIdRequest();
|
|
1838
|
-
m = Object.assign(m, proto);
|
|
1839
|
-
return m;
|
|
1840
|
-
}
|
|
1841
|
-
constructor(kwargs) {
|
|
1842
|
-
if (!kwargs) {
|
|
1843
|
-
return;
|
|
2386
|
+
if (typeof this.nextCursor !== 'undefined') {
|
|
2387
|
+
toReturn['nextCursor'] = this.nextCursor;
|
|
2388
|
+
}
|
|
2389
|
+
if (typeof this.hasMore !== 'undefined') {
|
|
2390
|
+
toReturn['hasMore'] = this.hasMore;
|
|
1844
2391
|
}
|
|
1845
|
-
Object.assign(this, kwargs);
|
|
1846
|
-
}
|
|
1847
|
-
toApiJson() {
|
|
1848
|
-
const toReturn = {};
|
|
1849
2392
|
return toReturn;
|
|
1850
2393
|
}
|
|
1851
2394
|
}
|
|
1852
|
-
class
|
|
2395
|
+
class ListTenorGifsRequest {
|
|
1853
2396
|
constructor(kwargs) {
|
|
1854
2397
|
if (!kwargs) {
|
|
1855
2398
|
return;
|
|
@@ -1857,19 +2400,43 @@ class GetTenorAnonymousIdResponse {
|
|
|
1857
2400
|
Object.assign(this, kwargs);
|
|
1858
2401
|
}
|
|
1859
2402
|
static fromProto(proto) {
|
|
1860
|
-
let m = new
|
|
2403
|
+
let m = new ListTenorGifsRequest();
|
|
1861
2404
|
m = Object.assign(m, proto);
|
|
2405
|
+
if (proto.pageSize) {
|
|
2406
|
+
m.pageSize = parseInt(proto.pageSize, 10);
|
|
2407
|
+
}
|
|
1862
2408
|
return m;
|
|
1863
2409
|
}
|
|
1864
2410
|
toApiJson() {
|
|
1865
2411
|
const toReturn = {};
|
|
2412
|
+
if (typeof this.query !== 'undefined') {
|
|
2413
|
+
toReturn['query'] = this.query;
|
|
2414
|
+
}
|
|
2415
|
+
if (typeof this.cursor !== 'undefined') {
|
|
2416
|
+
toReturn['cursor'] = this.cursor;
|
|
2417
|
+
}
|
|
2418
|
+
if (typeof this.pageSize !== 'undefined') {
|
|
2419
|
+
toReturn['pageSize'] = this.pageSize;
|
|
2420
|
+
}
|
|
2421
|
+
if (typeof this.locale !== 'undefined') {
|
|
2422
|
+
toReturn['locale'] = this.locale;
|
|
2423
|
+
}
|
|
1866
2424
|
if (typeof this.anonymousId !== 'undefined') {
|
|
1867
2425
|
toReturn['anonymousId'] = this.anonymousId;
|
|
1868
2426
|
}
|
|
2427
|
+
if (typeof this.mediaFilter !== 'undefined') {
|
|
2428
|
+
toReturn['mediaFilter'] = this.mediaFilter;
|
|
2429
|
+
}
|
|
2430
|
+
if (typeof this.aspectRatioRange !== 'undefined') {
|
|
2431
|
+
toReturn['aspectRatioRange'] = this.aspectRatioRange;
|
|
2432
|
+
}
|
|
2433
|
+
if (typeof this.contentFilter !== 'undefined') {
|
|
2434
|
+
toReturn['contentFilter'] = this.contentFilter;
|
|
2435
|
+
}
|
|
1869
2436
|
return toReturn;
|
|
1870
2437
|
}
|
|
1871
2438
|
}
|
|
1872
|
-
class
|
|
2439
|
+
class ListTenorGifsResponse {
|
|
1873
2440
|
constructor(kwargs) {
|
|
1874
2441
|
if (!kwargs) {
|
|
1875
2442
|
return;
|
|
@@ -1877,40 +2444,25 @@ class ListMultilocationPostsForBrandRequest {
|
|
|
1877
2444
|
Object.assign(this, kwargs);
|
|
1878
2445
|
}
|
|
1879
2446
|
static fromProto(proto) {
|
|
1880
|
-
let m = new
|
|
2447
|
+
let m = new ListTenorGifsResponse();
|
|
1881
2448
|
m = Object.assign(m, proto);
|
|
1882
|
-
if (proto.
|
|
1883
|
-
m.
|
|
1884
|
-
}
|
|
1885
|
-
if (proto.endDate) {
|
|
1886
|
-
m.endDate = new Date(proto.endDate);
|
|
1887
|
-
}
|
|
1888
|
-
if (proto.pageSize) {
|
|
1889
|
-
m.pageSize = parseInt(proto.pageSize, 10);
|
|
2449
|
+
if (proto.results) {
|
|
2450
|
+
m.results = proto.results.map(TenorGif.fromProto);
|
|
1890
2451
|
}
|
|
1891
2452
|
return m;
|
|
1892
2453
|
}
|
|
1893
2454
|
toApiJson() {
|
|
1894
2455
|
const toReturn = {};
|
|
1895
|
-
if (typeof this.
|
|
1896
|
-
toReturn['
|
|
1897
|
-
}
|
|
1898
|
-
if (typeof this.startDate !== 'undefined' && this.startDate !== null) {
|
|
1899
|
-
toReturn['startDate'] = 'toApiJson' in this.startDate ? this.startDate.toApiJson() : this.startDate;
|
|
1900
|
-
}
|
|
1901
|
-
if (typeof this.endDate !== 'undefined' && this.endDate !== null) {
|
|
1902
|
-
toReturn['endDate'] = 'toApiJson' in this.endDate ? this.endDate.toApiJson() : this.endDate;
|
|
1903
|
-
}
|
|
1904
|
-
if (typeof this.cursor !== 'undefined') {
|
|
1905
|
-
toReturn['cursor'] = this.cursor;
|
|
2456
|
+
if (typeof this.next !== 'undefined') {
|
|
2457
|
+
toReturn['next'] = this.next;
|
|
1906
2458
|
}
|
|
1907
|
-
if (typeof this.
|
|
1908
|
-
toReturn['
|
|
2459
|
+
if (typeof this.results !== 'undefined' && this.results !== null) {
|
|
2460
|
+
toReturn['results'] = 'toApiJson' in this.results ? this.results.toApiJson() : this.results;
|
|
1909
2461
|
}
|
|
1910
2462
|
return toReturn;
|
|
1911
2463
|
}
|
|
1912
2464
|
}
|
|
1913
|
-
class
|
|
2465
|
+
class PartnerListScheduledPostsResponse {
|
|
1914
2466
|
constructor(kwargs) {
|
|
1915
2467
|
if (!kwargs) {
|
|
1916
2468
|
return;
|
|
@@ -1918,20 +2470,17 @@ class ListMultilocationPostsForBrandResponse {
|
|
|
1918
2470
|
Object.assign(this, kwargs);
|
|
1919
2471
|
}
|
|
1920
2472
|
static fromProto(proto) {
|
|
1921
|
-
let m = new
|
|
2473
|
+
let m = new PartnerListScheduledPostsResponse();
|
|
1922
2474
|
m = Object.assign(m, proto);
|
|
1923
|
-
if (proto.
|
|
1924
|
-
m.
|
|
1925
|
-
}
|
|
1926
|
-
if (proto.failedSocialPosts) {
|
|
1927
|
-
m.failedSocialPosts = proto.failedSocialPosts.map(SocialPost.fromProto);
|
|
2475
|
+
if (proto.socialPosts) {
|
|
2476
|
+
m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
|
|
1928
2477
|
}
|
|
1929
2478
|
return m;
|
|
1930
2479
|
}
|
|
1931
2480
|
toApiJson() {
|
|
1932
2481
|
const toReturn = {};
|
|
1933
|
-
if (typeof this.
|
|
1934
|
-
toReturn['
|
|
2482
|
+
if (typeof this.socialPosts !== 'undefined' && this.socialPosts !== null) {
|
|
2483
|
+
toReturn['socialPosts'] = 'toApiJson' in this.socialPosts ? this.socialPosts.toApiJson() : this.socialPosts;
|
|
1935
2484
|
}
|
|
1936
2485
|
if (typeof this.nextCursor !== 'undefined') {
|
|
1937
2486
|
toReturn['nextCursor'] = this.nextCursor;
|
|
@@ -1939,13 +2488,10 @@ class ListMultilocationPostsForBrandResponse {
|
|
|
1939
2488
|
if (typeof this.hasMore !== 'undefined') {
|
|
1940
2489
|
toReturn['hasMore'] = this.hasMore;
|
|
1941
2490
|
}
|
|
1942
|
-
if (typeof this.failedSocialPosts !== 'undefined' && this.failedSocialPosts !== null) {
|
|
1943
|
-
toReturn['failedSocialPosts'] = 'toApiJson' in this.failedSocialPosts ? this.failedSocialPosts.toApiJson() : this.failedSocialPosts;
|
|
1944
|
-
}
|
|
1945
2491
|
return toReturn;
|
|
1946
2492
|
}
|
|
1947
2493
|
}
|
|
1948
|
-
class
|
|
2494
|
+
class PartnerListScheduledSocialPostsRequest {
|
|
1949
2495
|
constructor(kwargs) {
|
|
1950
2496
|
if (!kwargs) {
|
|
1951
2497
|
return;
|
|
@@ -1953,8 +2499,11 @@ class ListPixabayImagesRequest {
|
|
|
1953
2499
|
Object.assign(this, kwargs);
|
|
1954
2500
|
}
|
|
1955
2501
|
static fromProto(proto) {
|
|
1956
|
-
let m = new
|
|
2502
|
+
let m = new PartnerListScheduledSocialPostsRequest();
|
|
1957
2503
|
m = Object.assign(m, proto);
|
|
2504
|
+
if (proto.filters) {
|
|
2505
|
+
m.filters = PartnerListScheduledSocialPostsRequestFilters.fromProto(proto.filters);
|
|
2506
|
+
}
|
|
1958
2507
|
if (proto.pageSize) {
|
|
1959
2508
|
m.pageSize = parseInt(proto.pageSize, 10);
|
|
1960
2509
|
}
|
|
@@ -1962,19 +2511,19 @@ class ListPixabayImagesRequest {
|
|
|
1962
2511
|
}
|
|
1963
2512
|
toApiJson() {
|
|
1964
2513
|
const toReturn = {};
|
|
1965
|
-
if (typeof this.query !== 'undefined') {
|
|
1966
|
-
toReturn['query'] = this.query;
|
|
1967
|
-
}
|
|
1968
2514
|
if (typeof this.cursor !== 'undefined') {
|
|
1969
2515
|
toReturn['cursor'] = this.cursor;
|
|
1970
2516
|
}
|
|
2517
|
+
if (typeof this.filters !== 'undefined' && this.filters !== null) {
|
|
2518
|
+
toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;
|
|
2519
|
+
}
|
|
1971
2520
|
if (typeof this.pageSize !== 'undefined') {
|
|
1972
2521
|
toReturn['pageSize'] = this.pageSize;
|
|
1973
2522
|
}
|
|
1974
2523
|
return toReturn;
|
|
1975
2524
|
}
|
|
1976
2525
|
}
|
|
1977
|
-
class
|
|
2526
|
+
class PostData {
|
|
1978
2527
|
constructor(kwargs) {
|
|
1979
2528
|
if (!kwargs) {
|
|
1980
2529
|
return;
|
|
@@ -1982,34 +2531,106 @@ class ListPixabayImagesResponse {
|
|
|
1982
2531
|
Object.assign(this, kwargs);
|
|
1983
2532
|
}
|
|
1984
2533
|
static fromProto(proto) {
|
|
1985
|
-
let m = new
|
|
2534
|
+
let m = new PostData();
|
|
1986
2535
|
m = Object.assign(m, proto);
|
|
1987
|
-
if (proto.
|
|
1988
|
-
m.
|
|
2536
|
+
if (proto.reach) {
|
|
2537
|
+
m.reach = parseInt(proto.reach, 10);
|
|
1989
2538
|
}
|
|
1990
|
-
if (proto.
|
|
1991
|
-
m.
|
|
2539
|
+
if (proto.views) {
|
|
2540
|
+
m.views = parseInt(proto.views, 10);
|
|
1992
2541
|
}
|
|
1993
|
-
if (proto.
|
|
1994
|
-
m.
|
|
2542
|
+
if (proto.clicks) {
|
|
2543
|
+
m.clicks = parseInt(proto.clicks, 10);
|
|
2544
|
+
}
|
|
2545
|
+
if (proto.comments) {
|
|
2546
|
+
m.comments = parseInt(proto.comments, 10);
|
|
2547
|
+
}
|
|
2548
|
+
if (proto.shares) {
|
|
2549
|
+
m.shares = parseInt(proto.shares, 10);
|
|
2550
|
+
}
|
|
2551
|
+
if (proto.reactions) {
|
|
2552
|
+
m.reactions = parseInt(proto.reactions, 10);
|
|
2553
|
+
}
|
|
2554
|
+
if (proto.saves) {
|
|
2555
|
+
m.saves = parseInt(proto.saves, 10);
|
|
2556
|
+
}
|
|
2557
|
+
if (proto.likes) {
|
|
2558
|
+
m.likes = parseInt(proto.likes, 10);
|
|
2559
|
+
}
|
|
2560
|
+
if (proto.videoViews) {
|
|
2561
|
+
m.videoViews = parseInt(proto.videoViews, 10);
|
|
2562
|
+
}
|
|
2563
|
+
if (proto.retweets) {
|
|
2564
|
+
m.retweets = parseInt(proto.retweets, 10);
|
|
2565
|
+
}
|
|
2566
|
+
if (proto.favourites) {
|
|
2567
|
+
m.favourites = parseInt(proto.favourites, 10);
|
|
2568
|
+
}
|
|
2569
|
+
if (proto.impressions) {
|
|
2570
|
+
m.impressions = parseInt(proto.impressions, 10);
|
|
2571
|
+
}
|
|
2572
|
+
if (proto.commentsCount) {
|
|
2573
|
+
m.commentsCount = parseInt(proto.commentsCount, 10);
|
|
2574
|
+
}
|
|
2575
|
+
if (proto.likeCount) {
|
|
2576
|
+
m.likeCount = parseInt(proto.likeCount, 10);
|
|
1995
2577
|
}
|
|
1996
2578
|
return m;
|
|
1997
2579
|
}
|
|
1998
2580
|
toApiJson() {
|
|
1999
2581
|
const toReturn = {};
|
|
2000
|
-
if (typeof this.
|
|
2001
|
-
toReturn['
|
|
2582
|
+
if (typeof this.postId !== 'undefined') {
|
|
2583
|
+
toReturn['postId'] = this.postId;
|
|
2002
2584
|
}
|
|
2003
|
-
if (typeof this.
|
|
2004
|
-
toReturn['
|
|
2585
|
+
if (typeof this.reach !== 'undefined') {
|
|
2586
|
+
toReturn['reach'] = this.reach;
|
|
2005
2587
|
}
|
|
2006
|
-
if (typeof this.
|
|
2007
|
-
toReturn['
|
|
2588
|
+
if (typeof this.engagement !== 'undefined') {
|
|
2589
|
+
toReturn['engagement'] = this.engagement;
|
|
2590
|
+
}
|
|
2591
|
+
if (typeof this.views !== 'undefined') {
|
|
2592
|
+
toReturn['views'] = this.views;
|
|
2593
|
+
}
|
|
2594
|
+
if (typeof this.clicks !== 'undefined') {
|
|
2595
|
+
toReturn['clicks'] = this.clicks;
|
|
2596
|
+
}
|
|
2597
|
+
if (typeof this.comments !== 'undefined') {
|
|
2598
|
+
toReturn['comments'] = this.comments;
|
|
2599
|
+
}
|
|
2600
|
+
if (typeof this.shares !== 'undefined') {
|
|
2601
|
+
toReturn['shares'] = this.shares;
|
|
2602
|
+
}
|
|
2603
|
+
if (typeof this.reactions !== 'undefined') {
|
|
2604
|
+
toReturn['reactions'] = this.reactions;
|
|
2605
|
+
}
|
|
2606
|
+
if (typeof this.saves !== 'undefined') {
|
|
2607
|
+
toReturn['saves'] = this.saves;
|
|
2608
|
+
}
|
|
2609
|
+
if (typeof this.likes !== 'undefined') {
|
|
2610
|
+
toReturn['likes'] = this.likes;
|
|
2611
|
+
}
|
|
2612
|
+
if (typeof this.videoViews !== 'undefined') {
|
|
2613
|
+
toReturn['videoViews'] = this.videoViews;
|
|
2614
|
+
}
|
|
2615
|
+
if (typeof this.retweets !== 'undefined') {
|
|
2616
|
+
toReturn['retweets'] = this.retweets;
|
|
2617
|
+
}
|
|
2618
|
+
if (typeof this.favourites !== 'undefined') {
|
|
2619
|
+
toReturn['favourites'] = this.favourites;
|
|
2620
|
+
}
|
|
2621
|
+
if (typeof this.impressions !== 'undefined') {
|
|
2622
|
+
toReturn['impressions'] = this.impressions;
|
|
2623
|
+
}
|
|
2624
|
+
if (typeof this.commentsCount !== 'undefined') {
|
|
2625
|
+
toReturn['commentsCount'] = this.commentsCount;
|
|
2626
|
+
}
|
|
2627
|
+
if (typeof this.likeCount !== 'undefined') {
|
|
2628
|
+
toReturn['likeCount'] = this.likeCount;
|
|
2008
2629
|
}
|
|
2009
2630
|
return toReturn;
|
|
2010
2631
|
}
|
|
2011
2632
|
}
|
|
2012
|
-
class
|
|
2633
|
+
class RemoveFromMultilocationPostRequest {
|
|
2013
2634
|
constructor(kwargs) {
|
|
2014
2635
|
if (!kwargs) {
|
|
2015
2636
|
return;
|
|
@@ -2017,28 +2638,34 @@ class ListPostTemplatesRequest {
|
|
|
2017
2638
|
Object.assign(this, kwargs);
|
|
2018
2639
|
}
|
|
2019
2640
|
static fromProto(proto) {
|
|
2020
|
-
let m = new
|
|
2641
|
+
let m = new RemoveFromMultilocationPostRequest();
|
|
2021
2642
|
m = Object.assign(m, proto);
|
|
2022
|
-
if (proto.
|
|
2023
|
-
m.
|
|
2643
|
+
if (proto.reason) {
|
|
2644
|
+
m.reason = enumStringToValue$2(RemoveReason, proto.reason);
|
|
2645
|
+
}
|
|
2646
|
+
if (proto.locations) {
|
|
2647
|
+
m.locations = proto.locations.map(Location.fromProto);
|
|
2024
2648
|
}
|
|
2025
2649
|
return m;
|
|
2026
2650
|
}
|
|
2027
2651
|
toApiJson() {
|
|
2028
2652
|
const toReturn = {};
|
|
2029
|
-
if (typeof this.
|
|
2030
|
-
toReturn['
|
|
2653
|
+
if (typeof this.reason !== 'undefined') {
|
|
2654
|
+
toReturn['reason'] = this.reason;
|
|
2031
2655
|
}
|
|
2032
|
-
if (typeof this.
|
|
2033
|
-
toReturn['
|
|
2656
|
+
if (typeof this.brandId !== 'undefined') {
|
|
2657
|
+
toReturn['brandId'] = this.brandId;
|
|
2034
2658
|
}
|
|
2035
|
-
if (typeof this.
|
|
2036
|
-
toReturn['
|
|
2659
|
+
if (typeof this.multilocationId !== 'undefined') {
|
|
2660
|
+
toReturn['multilocationId'] = this.multilocationId;
|
|
2661
|
+
}
|
|
2662
|
+
if (typeof this.locations !== 'undefined' && this.locations !== null) {
|
|
2663
|
+
toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
|
|
2037
2664
|
}
|
|
2038
2665
|
return toReturn;
|
|
2039
2666
|
}
|
|
2040
2667
|
}
|
|
2041
|
-
class
|
|
2668
|
+
class ReplaceHashtagsRequest {
|
|
2042
2669
|
constructor(kwargs) {
|
|
2043
2670
|
if (!kwargs) {
|
|
2044
2671
|
return;
|
|
@@ -2046,28 +2673,25 @@ class ListPostTemplatesResponse {
|
|
|
2046
2673
|
Object.assign(this, kwargs);
|
|
2047
2674
|
}
|
|
2048
2675
|
static fromProto(proto) {
|
|
2049
|
-
let m = new
|
|
2676
|
+
let m = new ReplaceHashtagsRequest();
|
|
2050
2677
|
m = Object.assign(m, proto);
|
|
2051
|
-
if (proto.postTemplate) {
|
|
2052
|
-
m.postTemplate = proto.postTemplate.map(PostTemplate.fromProto);
|
|
2053
|
-
}
|
|
2054
2678
|
return m;
|
|
2055
2679
|
}
|
|
2056
2680
|
toApiJson() {
|
|
2057
2681
|
const toReturn = {};
|
|
2058
|
-
if (typeof this.
|
|
2059
|
-
toReturn['
|
|
2682
|
+
if (typeof this.keyword !== 'undefined') {
|
|
2683
|
+
toReturn['keyword'] = this.keyword;
|
|
2060
2684
|
}
|
|
2061
|
-
if (typeof this.
|
|
2062
|
-
toReturn['
|
|
2685
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2686
|
+
toReturn['businessId'] = this.businessId;
|
|
2063
2687
|
}
|
|
2064
|
-
if (typeof this.
|
|
2065
|
-
toReturn['
|
|
2688
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
2689
|
+
toReturn['partnerId'] = this.partnerId;
|
|
2066
2690
|
}
|
|
2067
2691
|
return toReturn;
|
|
2068
2692
|
}
|
|
2069
2693
|
}
|
|
2070
|
-
class
|
|
2694
|
+
class SchedulePostRequest {
|
|
2071
2695
|
constructor(kwargs) {
|
|
2072
2696
|
if (!kwargs) {
|
|
2073
2697
|
return;
|
|
@@ -2075,49 +2699,31 @@ class ListSocialPostsRequest {
|
|
|
2075
2699
|
Object.assign(this, kwargs);
|
|
2076
2700
|
}
|
|
2077
2701
|
static fromProto(proto) {
|
|
2078
|
-
let m = new
|
|
2702
|
+
let m = new SchedulePostRequest();
|
|
2079
2703
|
m = Object.assign(m, proto);
|
|
2080
|
-
if (proto.
|
|
2081
|
-
m.
|
|
2082
|
-
}
|
|
2083
|
-
if (proto.end) {
|
|
2084
|
-
m.end = new Date(proto.end);
|
|
2085
|
-
}
|
|
2086
|
-
if (proto.pageSize) {
|
|
2087
|
-
m.pageSize = parseInt(proto.pageSize, 10);
|
|
2704
|
+
if (proto.socialPost) {
|
|
2705
|
+
m.socialPost = SocialPostData.fromProto(proto.socialPost);
|
|
2088
2706
|
}
|
|
2089
2707
|
return m;
|
|
2090
2708
|
}
|
|
2091
2709
|
toApiJson() {
|
|
2092
2710
|
const toReturn = {};
|
|
2093
|
-
if (typeof this.
|
|
2094
|
-
toReturn['
|
|
2095
|
-
}
|
|
2096
|
-
if (typeof this.end !== 'undefined' && this.end !== null) {
|
|
2097
|
-
toReturn['end'] = 'toApiJson' in this.end ? this.end.toApiJson() : this.end;
|
|
2098
|
-
}
|
|
2099
|
-
if (typeof this.businessId !== 'undefined') {
|
|
2100
|
-
toReturn['businessId'] = this.businessId;
|
|
2101
|
-
}
|
|
2102
|
-
if (typeof this.partnerId !== 'undefined') {
|
|
2103
|
-
toReturn['partnerId'] = this.partnerId;
|
|
2104
|
-
}
|
|
2105
|
-
if (typeof this.cursor !== 'undefined') {
|
|
2106
|
-
toReturn['cursor'] = this.cursor;
|
|
2711
|
+
if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
|
|
2712
|
+
toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
|
|
2107
2713
|
}
|
|
2108
2714
|
if (typeof this.socialServiceIds !== 'undefined') {
|
|
2109
2715
|
toReturn['socialServiceIds'] = this.socialServiceIds;
|
|
2110
2716
|
}
|
|
2111
|
-
if (typeof this.
|
|
2112
|
-
toReturn['
|
|
2717
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
2718
|
+
toReturn['partnerId'] = this.partnerId;
|
|
2113
2719
|
}
|
|
2114
|
-
if (typeof this.
|
|
2115
|
-
toReturn['
|
|
2720
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2721
|
+
toReturn['businessId'] = this.businessId;
|
|
2116
2722
|
}
|
|
2117
2723
|
return toReturn;
|
|
2118
2724
|
}
|
|
2119
2725
|
}
|
|
2120
|
-
class
|
|
2726
|
+
class SchedulePostResponse {
|
|
2121
2727
|
constructor(kwargs) {
|
|
2122
2728
|
if (!kwargs) {
|
|
2123
2729
|
return;
|
|
@@ -2125,28 +2731,22 @@ class ListSocialPostsResponse {
|
|
|
2125
2731
|
Object.assign(this, kwargs);
|
|
2126
2732
|
}
|
|
2127
2733
|
static fromProto(proto) {
|
|
2128
|
-
let m = new
|
|
2734
|
+
let m = new SchedulePostResponse();
|
|
2129
2735
|
m = Object.assign(m, proto);
|
|
2130
|
-
if (proto.
|
|
2131
|
-
m.
|
|
2736
|
+
if (proto.statuses) {
|
|
2737
|
+
m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
|
|
2132
2738
|
}
|
|
2133
2739
|
return m;
|
|
2134
2740
|
}
|
|
2135
2741
|
toApiJson() {
|
|
2136
2742
|
const toReturn = {};
|
|
2137
|
-
if (typeof this.
|
|
2138
|
-
toReturn['
|
|
2139
|
-
}
|
|
2140
|
-
if (typeof this.nextCursor !== 'undefined') {
|
|
2141
|
-
toReturn['nextCursor'] = this.nextCursor;
|
|
2142
|
-
}
|
|
2143
|
-
if (typeof this.hasMore !== 'undefined') {
|
|
2144
|
-
toReturn['hasMore'] = this.hasMore;
|
|
2743
|
+
if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
|
|
2744
|
+
toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
|
|
2145
2745
|
}
|
|
2146
2746
|
return toReturn;
|
|
2147
2747
|
}
|
|
2148
2748
|
}
|
|
2149
|
-
class
|
|
2749
|
+
class ScheduleToAllPagesRequest {
|
|
2150
2750
|
constructor(kwargs) {
|
|
2151
2751
|
if (!kwargs) {
|
|
2152
2752
|
return;
|
|
@@ -2154,43 +2754,28 @@ class ListTenorGifsRequest {
|
|
|
2154
2754
|
Object.assign(this, kwargs);
|
|
2155
2755
|
}
|
|
2156
2756
|
static fromProto(proto) {
|
|
2157
|
-
let m = new
|
|
2757
|
+
let m = new ScheduleToAllPagesRequest();
|
|
2158
2758
|
m = Object.assign(m, proto);
|
|
2159
|
-
if (proto.
|
|
2160
|
-
m.
|
|
2759
|
+
if (proto.socialPost) {
|
|
2760
|
+
m.socialPost = SocialPostData.fromProto(proto.socialPost);
|
|
2161
2761
|
}
|
|
2162
2762
|
return m;
|
|
2163
2763
|
}
|
|
2164
2764
|
toApiJson() {
|
|
2165
2765
|
const toReturn = {};
|
|
2166
|
-
if (typeof this.
|
|
2167
|
-
toReturn['
|
|
2168
|
-
}
|
|
2169
|
-
if (typeof this.cursor !== 'undefined') {
|
|
2170
|
-
toReturn['cursor'] = this.cursor;
|
|
2171
|
-
}
|
|
2172
|
-
if (typeof this.pageSize !== 'undefined') {
|
|
2173
|
-
toReturn['pageSize'] = this.pageSize;
|
|
2174
|
-
}
|
|
2175
|
-
if (typeof this.locale !== 'undefined') {
|
|
2176
|
-
toReturn['locale'] = this.locale;
|
|
2177
|
-
}
|
|
2178
|
-
if (typeof this.anonymousId !== 'undefined') {
|
|
2179
|
-
toReturn['anonymousId'] = this.anonymousId;
|
|
2180
|
-
}
|
|
2181
|
-
if (typeof this.mediaFilter !== 'undefined') {
|
|
2182
|
-
toReturn['mediaFilter'] = this.mediaFilter;
|
|
2766
|
+
if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
|
|
2767
|
+
toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
|
|
2183
2768
|
}
|
|
2184
|
-
if (typeof this.
|
|
2185
|
-
toReturn['
|
|
2769
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
2770
|
+
toReturn['partnerId'] = this.partnerId;
|
|
2186
2771
|
}
|
|
2187
|
-
if (typeof this.
|
|
2188
|
-
toReturn['
|
|
2772
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2773
|
+
toReturn['businessId'] = this.businessId;
|
|
2189
2774
|
}
|
|
2190
2775
|
return toReturn;
|
|
2191
2776
|
}
|
|
2192
2777
|
}
|
|
2193
|
-
class
|
|
2778
|
+
class ScheduleToAllPagesResponse {
|
|
2194
2779
|
constructor(kwargs) {
|
|
2195
2780
|
if (!kwargs) {
|
|
2196
2781
|
return;
|
|
@@ -2198,25 +2783,22 @@ class ListTenorGifsResponse {
|
|
|
2198
2783
|
Object.assign(this, kwargs);
|
|
2199
2784
|
}
|
|
2200
2785
|
static fromProto(proto) {
|
|
2201
|
-
let m = new
|
|
2786
|
+
let m = new ScheduleToAllPagesResponse();
|
|
2202
2787
|
m = Object.assign(m, proto);
|
|
2203
|
-
if (proto.
|
|
2204
|
-
m.
|
|
2788
|
+
if (proto.statuses) {
|
|
2789
|
+
m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
|
|
2205
2790
|
}
|
|
2206
2791
|
return m;
|
|
2207
2792
|
}
|
|
2208
2793
|
toApiJson() {
|
|
2209
2794
|
const toReturn = {};
|
|
2210
|
-
if (typeof this.
|
|
2211
|
-
toReturn['
|
|
2212
|
-
}
|
|
2213
|
-
if (typeof this.results !== 'undefined' && this.results !== null) {
|
|
2214
|
-
toReturn['results'] = 'toApiJson' in this.results ? this.results.toApiJson() : this.results;
|
|
2795
|
+
if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
|
|
2796
|
+
toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
|
|
2215
2797
|
}
|
|
2216
2798
|
return toReturn;
|
|
2217
2799
|
}
|
|
2218
2800
|
}
|
|
2219
|
-
class
|
|
2801
|
+
class SearchHashtagRequest {
|
|
2220
2802
|
constructor(kwargs) {
|
|
2221
2803
|
if (!kwargs) {
|
|
2222
2804
|
return;
|
|
@@ -2224,28 +2806,31 @@ class MediaUploadRequest {
|
|
|
2224
2806
|
Object.assign(this, kwargs);
|
|
2225
2807
|
}
|
|
2226
2808
|
static fromProto(proto) {
|
|
2227
|
-
let m = new
|
|
2809
|
+
let m = new SearchHashtagRequest();
|
|
2228
2810
|
m = Object.assign(m, proto);
|
|
2229
|
-
if (proto.
|
|
2230
|
-
m.
|
|
2811
|
+
if (proto.limit) {
|
|
2812
|
+
m.limit = parseInt(proto.limit, 10);
|
|
2231
2813
|
}
|
|
2232
2814
|
return m;
|
|
2233
2815
|
}
|
|
2234
2816
|
toApiJson() {
|
|
2235
2817
|
const toReturn = {};
|
|
2236
|
-
if (typeof this.
|
|
2237
|
-
toReturn['
|
|
2818
|
+
if (typeof this.searchTerm !== 'undefined') {
|
|
2819
|
+
toReturn['searchTerm'] = this.searchTerm;
|
|
2238
2820
|
}
|
|
2239
|
-
if (typeof this.
|
|
2240
|
-
toReturn['
|
|
2821
|
+
if (typeof this.limit !== 'undefined') {
|
|
2822
|
+
toReturn['limit'] = this.limit;
|
|
2241
2823
|
}
|
|
2242
|
-
if (typeof this.
|
|
2243
|
-
toReturn['
|
|
2824
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2825
|
+
toReturn['businessId'] = this.businessId;
|
|
2826
|
+
}
|
|
2827
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
2828
|
+
toReturn['partnerId'] = this.partnerId;
|
|
2244
2829
|
}
|
|
2245
2830
|
return toReturn;
|
|
2246
2831
|
}
|
|
2247
2832
|
}
|
|
2248
|
-
class
|
|
2833
|
+
class SearchHashtagResponse {
|
|
2249
2834
|
constructor(kwargs) {
|
|
2250
2835
|
if (!kwargs) {
|
|
2251
2836
|
return;
|
|
@@ -2253,19 +2838,22 @@ class MediaUploadResponse {
|
|
|
2253
2838
|
Object.assign(this, kwargs);
|
|
2254
2839
|
}
|
|
2255
2840
|
static fromProto(proto) {
|
|
2256
|
-
let m = new
|
|
2841
|
+
let m = new SearchHashtagResponse();
|
|
2257
2842
|
m = Object.assign(m, proto);
|
|
2843
|
+
if (proto.hashtags) {
|
|
2844
|
+
m.hashtags = proto.hashtags.map(Hashtag.fromProto);
|
|
2845
|
+
}
|
|
2258
2846
|
return m;
|
|
2259
2847
|
}
|
|
2260
2848
|
toApiJson() {
|
|
2261
2849
|
const toReturn = {};
|
|
2262
|
-
if (typeof this.
|
|
2263
|
-
toReturn['
|
|
2850
|
+
if (typeof this.hashtags !== 'undefined' && this.hashtags !== null) {
|
|
2851
|
+
toReturn['hashtags'] = 'toApiJson' in this.hashtags ? this.hashtags.toApiJson() : this.hashtags;
|
|
2264
2852
|
}
|
|
2265
2853
|
return toReturn;
|
|
2266
2854
|
}
|
|
2267
2855
|
}
|
|
2268
|
-
class
|
|
2856
|
+
class SuggestMessageRequest {
|
|
2269
2857
|
constructor(kwargs) {
|
|
2270
2858
|
if (!kwargs) {
|
|
2271
2859
|
return;
|
|
@@ -2273,28 +2861,28 @@ class PartnerListScheduledPostsResponse {
|
|
|
2273
2861
|
Object.assign(this, kwargs);
|
|
2274
2862
|
}
|
|
2275
2863
|
static fromProto(proto) {
|
|
2276
|
-
let m = new
|
|
2864
|
+
let m = new SuggestMessageRequest();
|
|
2277
2865
|
m = Object.assign(m, proto);
|
|
2278
|
-
if (proto.
|
|
2279
|
-
m.
|
|
2866
|
+
if (proto.length) {
|
|
2867
|
+
m.length = enumStringToValue$2(PostLength, proto.length);
|
|
2280
2868
|
}
|
|
2281
2869
|
return m;
|
|
2282
2870
|
}
|
|
2283
2871
|
toApiJson() {
|
|
2284
2872
|
const toReturn = {};
|
|
2285
|
-
if (typeof this.
|
|
2286
|
-
toReturn['
|
|
2873
|
+
if (typeof this.prompt !== 'undefined') {
|
|
2874
|
+
toReturn['prompt'] = this.prompt;
|
|
2287
2875
|
}
|
|
2288
|
-
if (typeof this.
|
|
2289
|
-
toReturn['
|
|
2876
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2877
|
+
toReturn['businessId'] = this.businessId;
|
|
2290
2878
|
}
|
|
2291
|
-
if (typeof this.
|
|
2292
|
-
toReturn['
|
|
2879
|
+
if (typeof this.length !== 'undefined') {
|
|
2880
|
+
toReturn['length'] = this.length;
|
|
2293
2881
|
}
|
|
2294
2882
|
return toReturn;
|
|
2295
2883
|
}
|
|
2296
2884
|
}
|
|
2297
|
-
class
|
|
2885
|
+
class SuggestMessageResponse {
|
|
2298
2886
|
constructor(kwargs) {
|
|
2299
2887
|
if (!kwargs) {
|
|
2300
2888
|
return;
|
|
@@ -2302,31 +2890,19 @@ class PartnerListScheduledSocialPostsRequest {
|
|
|
2302
2890
|
Object.assign(this, kwargs);
|
|
2303
2891
|
}
|
|
2304
2892
|
static fromProto(proto) {
|
|
2305
|
-
let m = new
|
|
2893
|
+
let m = new SuggestMessageResponse();
|
|
2306
2894
|
m = Object.assign(m, proto);
|
|
2307
|
-
if (proto.filters) {
|
|
2308
|
-
m.filters = PartnerListScheduledSocialPostsRequestFilters.fromProto(proto.filters);
|
|
2309
|
-
}
|
|
2310
|
-
if (proto.pageSize) {
|
|
2311
|
-
m.pageSize = parseInt(proto.pageSize, 10);
|
|
2312
|
-
}
|
|
2313
2895
|
return m;
|
|
2314
2896
|
}
|
|
2315
2897
|
toApiJson() {
|
|
2316
2898
|
const toReturn = {};
|
|
2317
|
-
if (typeof this.
|
|
2318
|
-
toReturn['
|
|
2319
|
-
}
|
|
2320
|
-
if (typeof this.filters !== 'undefined' && this.filters !== null) {
|
|
2321
|
-
toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;
|
|
2322
|
-
}
|
|
2323
|
-
if (typeof this.pageSize !== 'undefined') {
|
|
2324
|
-
toReturn['pageSize'] = this.pageSize;
|
|
2899
|
+
if (typeof this.message !== 'undefined') {
|
|
2900
|
+
toReturn['message'] = this.message;
|
|
2325
2901
|
}
|
|
2326
2902
|
return toReturn;
|
|
2327
2903
|
}
|
|
2328
2904
|
}
|
|
2329
|
-
class
|
|
2905
|
+
class UpdatePostTemplateRequest {
|
|
2330
2906
|
constructor(kwargs) {
|
|
2331
2907
|
if (!kwargs) {
|
|
2332
2908
|
return;
|
|
@@ -2334,141 +2910,80 @@ class PostData {
|
|
|
2334
2910
|
Object.assign(this, kwargs);
|
|
2335
2911
|
}
|
|
2336
2912
|
static fromProto(proto) {
|
|
2337
|
-
let m = new
|
|
2913
|
+
let m = new UpdatePostTemplateRequest();
|
|
2338
2914
|
m = Object.assign(m, proto);
|
|
2339
|
-
if (proto.
|
|
2340
|
-
m.
|
|
2341
|
-
}
|
|
2342
|
-
if (proto.views) {
|
|
2343
|
-
m.views = parseInt(proto.views, 10);
|
|
2344
|
-
}
|
|
2345
|
-
if (proto.clicks) {
|
|
2346
|
-
m.clicks = parseInt(proto.clicks, 10);
|
|
2347
|
-
}
|
|
2348
|
-
if (proto.comments) {
|
|
2349
|
-
m.comments = parseInt(proto.comments, 10);
|
|
2350
|
-
}
|
|
2351
|
-
if (proto.shares) {
|
|
2352
|
-
m.shares = parseInt(proto.shares, 10);
|
|
2353
|
-
}
|
|
2354
|
-
if (proto.reactions) {
|
|
2355
|
-
m.reactions = parseInt(proto.reactions, 10);
|
|
2356
|
-
}
|
|
2357
|
-
if (proto.saves) {
|
|
2358
|
-
m.saves = parseInt(proto.saves, 10);
|
|
2359
|
-
}
|
|
2360
|
-
if (proto.likes) {
|
|
2361
|
-
m.likes = parseInt(proto.likes, 10);
|
|
2362
|
-
}
|
|
2363
|
-
if (proto.videoViews) {
|
|
2364
|
-
m.videoViews = parseInt(proto.videoViews, 10);
|
|
2365
|
-
}
|
|
2366
|
-
if (proto.retweets) {
|
|
2367
|
-
m.retweets = parseInt(proto.retweets, 10);
|
|
2368
|
-
}
|
|
2369
|
-
if (proto.favourites) {
|
|
2370
|
-
m.favourites = parseInt(proto.favourites, 10);
|
|
2915
|
+
if (proto.postDateTime) {
|
|
2916
|
+
m.postDateTime = new Date(proto.postDateTime);
|
|
2371
2917
|
}
|
|
2372
|
-
if (proto.
|
|
2373
|
-
m.
|
|
2918
|
+
if (proto.mediaEntries) {
|
|
2919
|
+
m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
|
|
2374
2920
|
}
|
|
2375
|
-
if (proto.
|
|
2376
|
-
m.
|
|
2921
|
+
if (proto.metaData) {
|
|
2922
|
+
m.metaData = proto.metaData.map(MetaData.fromProto);
|
|
2377
2923
|
}
|
|
2378
|
-
if (proto.
|
|
2379
|
-
m.
|
|
2924
|
+
if (proto.postType) {
|
|
2925
|
+
m.postType = enumStringToValue$2(PostType$1, proto.postType);
|
|
2380
2926
|
}
|
|
2381
2927
|
return m;
|
|
2382
2928
|
}
|
|
2383
2929
|
toApiJson() {
|
|
2384
2930
|
const toReturn = {};
|
|
2385
|
-
if (typeof this.
|
|
2386
|
-
toReturn['
|
|
2387
|
-
}
|
|
2388
|
-
if (typeof this.reach !== 'undefined') {
|
|
2389
|
-
toReturn['reach'] = this.reach;
|
|
2390
|
-
}
|
|
2391
|
-
if (typeof this.engagement !== 'undefined') {
|
|
2392
|
-
toReturn['engagement'] = this.engagement;
|
|
2393
|
-
}
|
|
2394
|
-
if (typeof this.views !== 'undefined') {
|
|
2395
|
-
toReturn['views'] = this.views;
|
|
2396
|
-
}
|
|
2397
|
-
if (typeof this.clicks !== 'undefined') {
|
|
2398
|
-
toReturn['clicks'] = this.clicks;
|
|
2399
|
-
}
|
|
2400
|
-
if (typeof this.comments !== 'undefined') {
|
|
2401
|
-
toReturn['comments'] = this.comments;
|
|
2402
|
-
}
|
|
2403
|
-
if (typeof this.shares !== 'undefined') {
|
|
2404
|
-
toReturn['shares'] = this.shares;
|
|
2405
|
-
}
|
|
2406
|
-
if (typeof this.reactions !== 'undefined') {
|
|
2407
|
-
toReturn['reactions'] = this.reactions;
|
|
2408
|
-
}
|
|
2409
|
-
if (typeof this.saves !== 'undefined') {
|
|
2410
|
-
toReturn['saves'] = this.saves;
|
|
2931
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
2932
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
2411
2933
|
}
|
|
2412
|
-
if (typeof this.
|
|
2413
|
-
toReturn['
|
|
2934
|
+
if (typeof this.templateId !== 'undefined') {
|
|
2935
|
+
toReturn['templateId'] = this.templateId;
|
|
2414
2936
|
}
|
|
2415
|
-
if (typeof this.
|
|
2416
|
-
toReturn['
|
|
2937
|
+
if (typeof this.title !== 'undefined') {
|
|
2938
|
+
toReturn['title'] = this.title;
|
|
2417
2939
|
}
|
|
2418
|
-
if (typeof this.
|
|
2419
|
-
toReturn['
|
|
2940
|
+
if (typeof this.postText !== 'undefined') {
|
|
2941
|
+
toReturn['postText'] = this.postText;
|
|
2420
2942
|
}
|
|
2421
|
-
if (typeof this.
|
|
2422
|
-
toReturn['
|
|
2943
|
+
if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
|
|
2944
|
+
toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
|
|
2423
2945
|
}
|
|
2424
|
-
if (typeof this.
|
|
2425
|
-
toReturn['
|
|
2946
|
+
if (typeof this.gmbPostCustomization !== 'undefined') {
|
|
2947
|
+
toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
|
|
2426
2948
|
}
|
|
2427
|
-
if (typeof this.
|
|
2428
|
-
toReturn['
|
|
2949
|
+
if (typeof this.imageUrl !== 'undefined') {
|
|
2950
|
+
toReturn['imageUrl'] = this.imageUrl;
|
|
2429
2951
|
}
|
|
2430
|
-
if (typeof this.
|
|
2431
|
-
toReturn['
|
|
2952
|
+
if (typeof this.imagePath !== 'undefined') {
|
|
2953
|
+
toReturn['imagePath'] = this.imagePath;
|
|
2432
2954
|
}
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
}
|
|
2436
|
-
class RemoveFromMultilocationPostRequest {
|
|
2437
|
-
constructor(kwargs) {
|
|
2438
|
-
if (!kwargs) {
|
|
2439
|
-
return;
|
|
2955
|
+
if (typeof this.imageSize !== 'undefined') {
|
|
2956
|
+
toReturn['imageSize'] = this.imageSize;
|
|
2440
2957
|
}
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
static fromProto(proto) {
|
|
2444
|
-
let m = new RemoveFromMultilocationPostRequest();
|
|
2445
|
-
m = Object.assign(m, proto);
|
|
2446
|
-
if (proto.reason) {
|
|
2447
|
-
m.reason = enumStringToValue(RemoveReason, proto.reason);
|
|
2958
|
+
if (typeof this.previews !== 'undefined') {
|
|
2959
|
+
toReturn['previews'] = this.previews;
|
|
2448
2960
|
}
|
|
2449
|
-
if (
|
|
2450
|
-
|
|
2961
|
+
if (typeof this.options !== 'undefined') {
|
|
2962
|
+
toReturn['options'] = this.options;
|
|
2451
2963
|
}
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
toApiJson() {
|
|
2455
|
-
const toReturn = {};
|
|
2456
|
-
if (typeof this.reason !== 'undefined') {
|
|
2457
|
-
toReturn['reason'] = this.reason;
|
|
2964
|
+
if (typeof this.videoUrl !== 'undefined') {
|
|
2965
|
+
toReturn['videoUrl'] = this.videoUrl;
|
|
2458
2966
|
}
|
|
2459
|
-
if (typeof this.
|
|
2460
|
-
toReturn['
|
|
2967
|
+
if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
|
|
2968
|
+
toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
|
|
2461
2969
|
}
|
|
2462
|
-
if (typeof this.
|
|
2463
|
-
toReturn['
|
|
2970
|
+
if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
|
|
2971
|
+
toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
|
|
2464
2972
|
}
|
|
2465
|
-
if (typeof this.
|
|
2466
|
-
toReturn['
|
|
2973
|
+
if (typeof this.postType !== 'undefined') {
|
|
2974
|
+
toReturn['postType'] = this.postType;
|
|
2467
2975
|
}
|
|
2468
2976
|
return toReturn;
|
|
2469
2977
|
}
|
|
2470
2978
|
}
|
|
2471
|
-
|
|
2979
|
+
|
|
2980
|
+
function enumStringToValue$1(enumRef, value) {
|
|
2981
|
+
if (typeof value === 'number') {
|
|
2982
|
+
return value;
|
|
2983
|
+
}
|
|
2984
|
+
return enumRef[value];
|
|
2985
|
+
}
|
|
2986
|
+
class Media {
|
|
2472
2987
|
constructor(kwargs) {
|
|
2473
2988
|
if (!kwargs) {
|
|
2474
2989
|
return;
|
|
@@ -2476,25 +2991,32 @@ class ReplaceHashtagsRequest {
|
|
|
2476
2991
|
Object.assign(this, kwargs);
|
|
2477
2992
|
}
|
|
2478
2993
|
static fromProto(proto) {
|
|
2479
|
-
let m = new
|
|
2994
|
+
let m = new Media();
|
|
2480
2995
|
m = Object.assign(m, proto);
|
|
2996
|
+
if (proto.mediaType) {
|
|
2997
|
+
m.mediaType = enumStringToValue$1(MediaType, proto.mediaType);
|
|
2998
|
+
}
|
|
2481
2999
|
return m;
|
|
2482
3000
|
}
|
|
2483
3001
|
toApiJson() {
|
|
2484
3002
|
const toReturn = {};
|
|
2485
|
-
if (typeof this.
|
|
2486
|
-
toReturn['
|
|
2487
|
-
}
|
|
2488
|
-
if (typeof this.businessId !== 'undefined') {
|
|
2489
|
-
toReturn['businessId'] = this.businessId;
|
|
3003
|
+
if (typeof this.url !== 'undefined') {
|
|
3004
|
+
toReturn['url'] = this.url;
|
|
2490
3005
|
}
|
|
2491
|
-
if (typeof this.
|
|
2492
|
-
toReturn['
|
|
3006
|
+
if (typeof this.mediaType !== 'undefined') {
|
|
3007
|
+
toReturn['mediaType'] = this.mediaType;
|
|
2493
3008
|
}
|
|
2494
3009
|
return toReturn;
|
|
2495
3010
|
}
|
|
2496
3011
|
}
|
|
2497
|
-
|
|
3012
|
+
|
|
3013
|
+
function enumStringToValue(enumRef, value) {
|
|
3014
|
+
if (typeof value === 'number') {
|
|
3015
|
+
return value;
|
|
3016
|
+
}
|
|
3017
|
+
return enumRef[value];
|
|
3018
|
+
}
|
|
3019
|
+
class CreateImageRequest {
|
|
2498
3020
|
constructor(kwargs) {
|
|
2499
3021
|
if (!kwargs) {
|
|
2500
3022
|
return;
|
|
@@ -2502,31 +3024,31 @@ class SchedulePostRequest {
|
|
|
2502
3024
|
Object.assign(this, kwargs);
|
|
2503
3025
|
}
|
|
2504
3026
|
static fromProto(proto) {
|
|
2505
|
-
let m = new
|
|
3027
|
+
let m = new CreateImageRequest();
|
|
2506
3028
|
m = Object.assign(m, proto);
|
|
2507
|
-
if (proto.socialPost) {
|
|
2508
|
-
m.socialPost = SocialPostData.fromProto(proto.socialPost);
|
|
2509
|
-
}
|
|
2510
3029
|
return m;
|
|
2511
3030
|
}
|
|
2512
3031
|
toApiJson() {
|
|
2513
3032
|
const toReturn = {};
|
|
2514
|
-
if (typeof this.
|
|
2515
|
-
toReturn['
|
|
3033
|
+
if (typeof this.businessId !== 'undefined') {
|
|
3034
|
+
toReturn['businessId'] = this.businessId;
|
|
2516
3035
|
}
|
|
2517
|
-
if (typeof this.
|
|
2518
|
-
toReturn['
|
|
3036
|
+
if (typeof this.prompt !== 'undefined') {
|
|
3037
|
+
toReturn['prompt'] = this.prompt;
|
|
2519
3038
|
}
|
|
2520
|
-
if (typeof this.
|
|
2521
|
-
toReturn['
|
|
3039
|
+
if (typeof this.imageAmount !== 'undefined') {
|
|
3040
|
+
toReturn['imageAmount'] = this.imageAmount;
|
|
2522
3041
|
}
|
|
2523
|
-
if (typeof this.
|
|
2524
|
-
toReturn['
|
|
3042
|
+
if (typeof this.size !== 'undefined') {
|
|
3043
|
+
toReturn['size'] = this.size;
|
|
3044
|
+
}
|
|
3045
|
+
if (typeof this.responseFormat !== 'undefined') {
|
|
3046
|
+
toReturn['responseFormat'] = this.responseFormat;
|
|
2525
3047
|
}
|
|
2526
3048
|
return toReturn;
|
|
2527
3049
|
}
|
|
2528
3050
|
}
|
|
2529
|
-
class
|
|
3051
|
+
class CreateImageResponse {
|
|
2530
3052
|
constructor(kwargs) {
|
|
2531
3053
|
if (!kwargs) {
|
|
2532
3054
|
return;
|
|
@@ -2534,22 +3056,28 @@ class SchedulePostResponse {
|
|
|
2534
3056
|
Object.assign(this, kwargs);
|
|
2535
3057
|
}
|
|
2536
3058
|
static fromProto(proto) {
|
|
2537
|
-
let m = new
|
|
3059
|
+
let m = new CreateImageResponse();
|
|
2538
3060
|
m = Object.assign(m, proto);
|
|
2539
|
-
if (proto.
|
|
2540
|
-
m.
|
|
3061
|
+
if (proto.createdId) {
|
|
3062
|
+
m.createdId = parseInt(proto.createdId, 10);
|
|
3063
|
+
}
|
|
3064
|
+
if (proto.generatedImages) {
|
|
3065
|
+
m.generatedImages = proto.generatedImages.map(ImageCreated.fromProto);
|
|
2541
3066
|
}
|
|
2542
3067
|
return m;
|
|
2543
3068
|
}
|
|
2544
3069
|
toApiJson() {
|
|
2545
3070
|
const toReturn = {};
|
|
2546
|
-
if (typeof this.
|
|
2547
|
-
toReturn['
|
|
3071
|
+
if (typeof this.createdId !== 'undefined') {
|
|
3072
|
+
toReturn['createdId'] = this.createdId;
|
|
3073
|
+
}
|
|
3074
|
+
if (typeof this.generatedImages !== 'undefined' && this.generatedImages !== null) {
|
|
3075
|
+
toReturn['generatedImages'] = 'toApiJson' in this.generatedImages ? this.generatedImages.toApiJson() : this.generatedImages;
|
|
2548
3076
|
}
|
|
2549
3077
|
return toReturn;
|
|
2550
3078
|
}
|
|
2551
3079
|
}
|
|
2552
|
-
class
|
|
3080
|
+
class DeletePostRequest {
|
|
2553
3081
|
constructor(kwargs) {
|
|
2554
3082
|
if (!kwargs) {
|
|
2555
3083
|
return;
|
|
@@ -2557,28 +3085,22 @@ class ScheduleToAllPagesRequest {
|
|
|
2557
3085
|
Object.assign(this, kwargs);
|
|
2558
3086
|
}
|
|
2559
3087
|
static fromProto(proto) {
|
|
2560
|
-
let m = new
|
|
3088
|
+
let m = new DeletePostRequest();
|
|
2561
3089
|
m = Object.assign(m, proto);
|
|
2562
|
-
if (proto.socialPost) {
|
|
2563
|
-
m.socialPost = SocialPostData.fromProto(proto.socialPost);
|
|
2564
|
-
}
|
|
2565
3090
|
return m;
|
|
2566
3091
|
}
|
|
2567
3092
|
toApiJson() {
|
|
2568
3093
|
const toReturn = {};
|
|
2569
|
-
if (typeof this.
|
|
2570
|
-
toReturn['
|
|
2571
|
-
}
|
|
2572
|
-
if (typeof this.partnerId !== 'undefined') {
|
|
2573
|
-
toReturn['partnerId'] = this.partnerId;
|
|
3094
|
+
if (typeof this.accessToken !== 'undefined') {
|
|
3095
|
+
toReturn['accessToken'] = this.accessToken;
|
|
2574
3096
|
}
|
|
2575
|
-
if (typeof this.
|
|
2576
|
-
toReturn['
|
|
3097
|
+
if (typeof this.postId !== 'undefined') {
|
|
3098
|
+
toReturn['postId'] = this.postId;
|
|
2577
3099
|
}
|
|
2578
3100
|
return toReturn;
|
|
2579
3101
|
}
|
|
2580
3102
|
}
|
|
2581
|
-
class
|
|
3103
|
+
class ImageCreated {
|
|
2582
3104
|
constructor(kwargs) {
|
|
2583
3105
|
if (!kwargs) {
|
|
2584
3106
|
return;
|
|
@@ -2586,22 +3108,22 @@ class ScheduleToAllPagesResponse {
|
|
|
2586
3108
|
Object.assign(this, kwargs);
|
|
2587
3109
|
}
|
|
2588
3110
|
static fromProto(proto) {
|
|
2589
|
-
let m = new
|
|
3111
|
+
let m = new ImageCreated();
|
|
2590
3112
|
m = Object.assign(m, proto);
|
|
2591
|
-
if (proto.statuses) {
|
|
2592
|
-
m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
|
|
2593
|
-
}
|
|
2594
3113
|
return m;
|
|
2595
3114
|
}
|
|
2596
3115
|
toApiJson() {
|
|
2597
3116
|
const toReturn = {};
|
|
2598
|
-
if (typeof this.
|
|
2599
|
-
toReturn['
|
|
3117
|
+
if (typeof this.url !== 'undefined') {
|
|
3118
|
+
toReturn['url'] = this.url;
|
|
3119
|
+
}
|
|
3120
|
+
if (typeof this.b64Json !== 'undefined') {
|
|
3121
|
+
toReturn['b64Json'] = this.b64Json;
|
|
2600
3122
|
}
|
|
2601
3123
|
return toReturn;
|
|
2602
3124
|
}
|
|
2603
3125
|
}
|
|
2604
|
-
class
|
|
3126
|
+
class MediaUploadRequest {
|
|
2605
3127
|
constructor(kwargs) {
|
|
2606
3128
|
if (!kwargs) {
|
|
2607
3129
|
return;
|
|
@@ -2609,31 +3131,28 @@ class SearchHashtagRequest {
|
|
|
2609
3131
|
Object.assign(this, kwargs);
|
|
2610
3132
|
}
|
|
2611
3133
|
static fromProto(proto) {
|
|
2612
|
-
let m = new
|
|
3134
|
+
let m = new MediaUploadRequest();
|
|
2613
3135
|
m = Object.assign(m, proto);
|
|
2614
|
-
if (proto.
|
|
2615
|
-
m.
|
|
3136
|
+
if (proto.media) {
|
|
3137
|
+
m.media = proto.media.map(Media.fromProto);
|
|
2616
3138
|
}
|
|
2617
3139
|
return m;
|
|
2618
3140
|
}
|
|
2619
3141
|
toApiJson() {
|
|
2620
3142
|
const toReturn = {};
|
|
2621
|
-
if (typeof this.
|
|
2622
|
-
toReturn['
|
|
2623
|
-
}
|
|
2624
|
-
if (typeof this.limit !== 'undefined') {
|
|
2625
|
-
toReturn['limit'] = this.limit;
|
|
3143
|
+
if (typeof this.accessToken !== 'undefined') {
|
|
3144
|
+
toReturn['accessToken'] = this.accessToken;
|
|
2626
3145
|
}
|
|
2627
|
-
if (typeof this.
|
|
2628
|
-
toReturn['
|
|
3146
|
+
if (typeof this.owner !== 'undefined') {
|
|
3147
|
+
toReturn['owner'] = this.owner;
|
|
2629
3148
|
}
|
|
2630
|
-
if (typeof this.
|
|
2631
|
-
toReturn['
|
|
3149
|
+
if (typeof this.media !== 'undefined' && this.media !== null) {
|
|
3150
|
+
toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
|
|
2632
3151
|
}
|
|
2633
3152
|
return toReturn;
|
|
2634
3153
|
}
|
|
2635
3154
|
}
|
|
2636
|
-
class
|
|
3155
|
+
class MediaUploadResponse {
|
|
2637
3156
|
constructor(kwargs) {
|
|
2638
3157
|
if (!kwargs) {
|
|
2639
3158
|
return;
|
|
@@ -2641,22 +3160,19 @@ class SearchHashtagResponse {
|
|
|
2641
3160
|
Object.assign(this, kwargs);
|
|
2642
3161
|
}
|
|
2643
3162
|
static fromProto(proto) {
|
|
2644
|
-
let m = new
|
|
3163
|
+
let m = new MediaUploadResponse();
|
|
2645
3164
|
m = Object.assign(m, proto);
|
|
2646
|
-
if (proto.hashtags) {
|
|
2647
|
-
m.hashtags = proto.hashtags.map(Hashtag.fromProto);
|
|
2648
|
-
}
|
|
2649
3165
|
return m;
|
|
2650
3166
|
}
|
|
2651
3167
|
toApiJson() {
|
|
2652
3168
|
const toReturn = {};
|
|
2653
|
-
if (typeof this.
|
|
2654
|
-
toReturn['
|
|
3169
|
+
if (typeof this.uploadUrn !== 'undefined') {
|
|
3170
|
+
toReturn['uploadUrn'] = this.uploadUrn;
|
|
2655
3171
|
}
|
|
2656
3172
|
return toReturn;
|
|
2657
3173
|
}
|
|
2658
3174
|
}
|
|
2659
|
-
class
|
|
3175
|
+
class SocialPostOutput {
|
|
2660
3176
|
constructor(kwargs) {
|
|
2661
3177
|
if (!kwargs) {
|
|
2662
3178
|
return;
|
|
@@ -2664,28 +3180,31 @@ class SuggestMessageRequest {
|
|
|
2664
3180
|
Object.assign(this, kwargs);
|
|
2665
3181
|
}
|
|
2666
3182
|
static fromProto(proto) {
|
|
2667
|
-
let m = new
|
|
3183
|
+
let m = new SocialPostOutput();
|
|
2668
3184
|
m = Object.assign(m, proto);
|
|
2669
|
-
if (proto.
|
|
2670
|
-
m.
|
|
3185
|
+
if (proto.socialPost) {
|
|
3186
|
+
m.socialPost = SocialPost.fromProto(proto.socialPost);
|
|
3187
|
+
}
|
|
3188
|
+
if (proto.metadata) {
|
|
3189
|
+
m.metadata = proto.metadata.map(Metadata.fromProto);
|
|
2671
3190
|
}
|
|
2672
3191
|
return m;
|
|
2673
3192
|
}
|
|
2674
3193
|
toApiJson() {
|
|
2675
3194
|
const toReturn = {};
|
|
2676
|
-
if (typeof this.
|
|
2677
|
-
toReturn['
|
|
3195
|
+
if (typeof this.internalPostId !== 'undefined') {
|
|
3196
|
+
toReturn['internalPostId'] = this.internalPostId;
|
|
2678
3197
|
}
|
|
2679
|
-
if (typeof this.
|
|
2680
|
-
toReturn['
|
|
3198
|
+
if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
|
|
3199
|
+
toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
|
|
2681
3200
|
}
|
|
2682
|
-
if (typeof this.
|
|
2683
|
-
toReturn['
|
|
3201
|
+
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
3202
|
+
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
2684
3203
|
}
|
|
2685
3204
|
return toReturn;
|
|
2686
3205
|
}
|
|
2687
3206
|
}
|
|
2688
|
-
class
|
|
3207
|
+
class SocialPostRequest {
|
|
2689
3208
|
constructor(kwargs) {
|
|
2690
3209
|
if (!kwargs) {
|
|
2691
3210
|
return;
|
|
@@ -2693,19 +3212,22 @@ class SuggestMessageResponse {
|
|
|
2693
3212
|
Object.assign(this, kwargs);
|
|
2694
3213
|
}
|
|
2695
3214
|
static fromProto(proto) {
|
|
2696
|
-
let m = new
|
|
3215
|
+
let m = new SocialPostRequest();
|
|
2697
3216
|
m = Object.assign(m, proto);
|
|
3217
|
+
if (proto.socialPost) {
|
|
3218
|
+
m.socialPost = proto.socialPost.map(SocialPost.fromProto);
|
|
3219
|
+
}
|
|
2698
3220
|
return m;
|
|
2699
3221
|
}
|
|
2700
3222
|
toApiJson() {
|
|
2701
3223
|
const toReturn = {};
|
|
2702
|
-
if (typeof this.
|
|
2703
|
-
toReturn['
|
|
3224
|
+
if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
|
|
3225
|
+
toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
|
|
2704
3226
|
}
|
|
2705
3227
|
return toReturn;
|
|
2706
3228
|
}
|
|
2707
3229
|
}
|
|
2708
|
-
class
|
|
3230
|
+
class SocialPostResponse {
|
|
2709
3231
|
constructor(kwargs) {
|
|
2710
3232
|
if (!kwargs) {
|
|
2711
3233
|
return;
|
|
@@ -2713,68 +3235,17 @@ class UpdatePostTemplateRequest {
|
|
|
2713
3235
|
Object.assign(this, kwargs);
|
|
2714
3236
|
}
|
|
2715
3237
|
static fromProto(proto) {
|
|
2716
|
-
let m = new
|
|
3238
|
+
let m = new SocialPostResponse();
|
|
2717
3239
|
m = Object.assign(m, proto);
|
|
2718
|
-
if (proto.
|
|
2719
|
-
m.
|
|
2720
|
-
}
|
|
2721
|
-
if (proto.mediaEntries) {
|
|
2722
|
-
m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
|
|
2723
|
-
}
|
|
2724
|
-
if (proto.metaData) {
|
|
2725
|
-
m.metaData = proto.metaData.map(MetaData.fromProto);
|
|
2726
|
-
}
|
|
2727
|
-
if (proto.postType) {
|
|
2728
|
-
m.postType = enumStringToValue(PostType, proto.postType);
|
|
3240
|
+
if (proto.socialPost) {
|
|
3241
|
+
m.socialPost = proto.socialPost.map(SocialPostOutput.fromProto);
|
|
2729
3242
|
}
|
|
2730
3243
|
return m;
|
|
2731
3244
|
}
|
|
2732
3245
|
toApiJson() {
|
|
2733
3246
|
const toReturn = {};
|
|
2734
|
-
if (typeof this.
|
|
2735
|
-
toReturn['
|
|
2736
|
-
}
|
|
2737
|
-
if (typeof this.templateId !== 'undefined') {
|
|
2738
|
-
toReturn['templateId'] = this.templateId;
|
|
2739
|
-
}
|
|
2740
|
-
if (typeof this.title !== 'undefined') {
|
|
2741
|
-
toReturn['title'] = this.title;
|
|
2742
|
-
}
|
|
2743
|
-
if (typeof this.postText !== 'undefined') {
|
|
2744
|
-
toReturn['postText'] = this.postText;
|
|
2745
|
-
}
|
|
2746
|
-
if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
|
|
2747
|
-
toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
|
|
2748
|
-
}
|
|
2749
|
-
if (typeof this.gmbPostCustomization !== 'undefined') {
|
|
2750
|
-
toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
|
|
2751
|
-
}
|
|
2752
|
-
if (typeof this.imageUrl !== 'undefined') {
|
|
2753
|
-
toReturn['imageUrl'] = this.imageUrl;
|
|
2754
|
-
}
|
|
2755
|
-
if (typeof this.imagePath !== 'undefined') {
|
|
2756
|
-
toReturn['imagePath'] = this.imagePath;
|
|
2757
|
-
}
|
|
2758
|
-
if (typeof this.imageSize !== 'undefined') {
|
|
2759
|
-
toReturn['imageSize'] = this.imageSize;
|
|
2760
|
-
}
|
|
2761
|
-
if (typeof this.previews !== 'undefined') {
|
|
2762
|
-
toReturn['previews'] = this.previews;
|
|
2763
|
-
}
|
|
2764
|
-
if (typeof this.options !== 'undefined') {
|
|
2765
|
-
toReturn['options'] = this.options;
|
|
2766
|
-
}
|
|
2767
|
-
if (typeof this.videoUrl !== 'undefined') {
|
|
2768
|
-
toReturn['videoUrl'] = this.videoUrl;
|
|
2769
|
-
}
|
|
2770
|
-
if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
|
|
2771
|
-
toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
|
|
2772
|
-
}
|
|
2773
|
-
if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
|
|
2774
|
-
toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
|
|
2775
|
-
}
|
|
2776
|
-
if (typeof this.postType !== 'undefined') {
|
|
2777
|
-
toReturn['postType'] = this.postType;
|
|
3247
|
+
if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
|
|
3248
|
+
toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
|
|
2778
3249
|
}
|
|
2779
3250
|
return toReturn;
|
|
2780
3251
|
}
|
|
@@ -3005,9 +3476,13 @@ class LinkedinApiService {
|
|
|
3005
3476
|
withCredentials: true
|
|
3006
3477
|
};
|
|
3007
3478
|
}
|
|
3479
|
+
deletePost(r) {
|
|
3480
|
+
const request = (r.toApiJson) ? r : new DeletePostRequest(r);
|
|
3481
|
+
return this.http.post(this._host + "/socialposts.v2.Linkedin/DeletePost", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
|
|
3482
|
+
}
|
|
3008
3483
|
uploadMedia(r) {
|
|
3009
3484
|
const request = (r.toApiJson) ? r : new MediaUploadRequest(r);
|
|
3010
|
-
return this.http.post(this._host + "/socialposts.
|
|
3485
|
+
return this.http.post(this._host + "/socialposts.v2.Linkedin/UploadMedia", request.toApiJson(), this.apiOptions())
|
|
3011
3486
|
.pipe(map(resp => MediaUploadResponse.fromProto(resp)));
|
|
3012
3487
|
}
|
|
3013
3488
|
}
|
|
@@ -3163,6 +3638,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImpo
|
|
|
3163
3638
|
args: [{ providedIn: 'root' }]
|
|
3164
3639
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
3165
3640
|
|
|
3641
|
+
// *********************************
|
|
3642
|
+
class SocialPostsV2ApiService {
|
|
3643
|
+
constructor(http, hostService) {
|
|
3644
|
+
this.http = http;
|
|
3645
|
+
this.hostService = hostService;
|
|
3646
|
+
this._host = this.hostService.hostWithScheme;
|
|
3647
|
+
}
|
|
3648
|
+
apiOptions() {
|
|
3649
|
+
return {
|
|
3650
|
+
headers: new HttpHeaders({
|
|
3651
|
+
'Content-Type': 'application/json'
|
|
3652
|
+
}),
|
|
3653
|
+
withCredentials: true
|
|
3654
|
+
};
|
|
3655
|
+
}
|
|
3656
|
+
scheduleSocialPosts(r) {
|
|
3657
|
+
const request = (r.toApiJson) ? r : new SocialPostRequest(r);
|
|
3658
|
+
return this.http.post(this._host + "/socialposts.v2.SocialPostsV2/ScheduleSocialPosts", request.toApiJson(), this.apiOptions())
|
|
3659
|
+
.pipe(map(resp => SocialPostResponse.fromProto(resp)));
|
|
3660
|
+
}
|
|
3661
|
+
createImages(r) {
|
|
3662
|
+
const request = (r.toApiJson) ? r : new CreateImageRequest(r);
|
|
3663
|
+
return this.http.post(this._host + "/socialposts.v2.SocialPostsV2/CreateImages", request.toApiJson(), this.apiOptions())
|
|
3664
|
+
.pipe(map(resp => CreateImageResponse.fromProto(resp)));
|
|
3665
|
+
}
|
|
3666
|
+
}
|
|
3667
|
+
SocialPostsV2ApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2ApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3668
|
+
SocialPostsV2ApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2ApiService, providedIn: 'root' });
|
|
3669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2ApiService, decorators: [{
|
|
3670
|
+
type: Injectable,
|
|
3671
|
+
args: [{ providedIn: 'root' }]
|
|
3672
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
3673
|
+
|
|
3166
3674
|
// *********************************
|
|
3167
3675
|
class TenorGifsApiService {
|
|
3168
3676
|
constructor(http, hostService) {
|
|
@@ -3216,7 +3724,7 @@ class PostTemplatesService {
|
|
|
3216
3724
|
previews: previews,
|
|
3217
3725
|
options: options,
|
|
3218
3726
|
videoUrl: videoUrl,
|
|
3219
|
-
postType: postType || PostType.POST_TYPE_INVALID,
|
|
3727
|
+
postType: postType || PostType$1.POST_TYPE_INVALID,
|
|
3220
3728
|
mediaEntries: mediaEntries,
|
|
3221
3729
|
metaData: metadata,
|
|
3222
3730
|
});
|
|
@@ -3235,7 +3743,7 @@ class PostTemplatesService {
|
|
|
3235
3743
|
previews: previews,
|
|
3236
3744
|
options: options,
|
|
3237
3745
|
videoUrl: videoUrl,
|
|
3238
|
-
postType: postType || PostType.POST_TYPE_INVALID,
|
|
3746
|
+
postType: postType || PostType$1.POST_TYPE_INVALID,
|
|
3239
3747
|
mediaEntries: mediaEntries,
|
|
3240
3748
|
metaData: metadata,
|
|
3241
3749
|
});
|