@vendasta/social-posts 5.11.0 → 5.12.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 +2 -2
- package/esm2020/lib/_internal/enums/social-post-v2.enum.mjs +16 -16
- package/esm2020/lib/_internal/interfaces/api-v2.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/social-post-v2.interface.mjs +1 -1
- package/esm2020/lib/_internal/objects/api-v2.mjs +23 -23
- package/esm2020/lib/_internal/objects/api.mjs +2 -3
- package/esm2020/lib/_internal/objects/index.mjs +2 -2
- package/esm2020/lib/_internal/objects/social-post-v2.mjs +35 -32
- package/fesm2015/vendasta-social-posts.mjs +830 -827
- package/fesm2015/vendasta-social-posts.mjs.map +1 -1
- package/fesm2020/vendasta-social-posts.mjs +830 -827
- package/fesm2020/vendasta-social-posts.mjs.map +1 -1
- package/lib/_internal/enums/index.d.ts +1 -1
- package/lib/_internal/enums/social-post-v2.enum.d.ts +2 -2
- package/lib/_internal/interfaces/api-v2.interface.d.ts +12 -12
- package/lib/_internal/interfaces/api.interface.d.ts +1 -2
- package/lib/_internal/interfaces/index.d.ts +1 -1
- package/lib/_internal/interfaces/social-post-v2.interface.d.ts +18 -17
- package/lib/_internal/objects/api-v2.d.ts +12 -12
- package/lib/_internal/objects/api.d.ts +1 -2
- package/lib/_internal/objects/index.d.ts +1 -1
- package/lib/_internal/objects/social-post-v2.d.ts +34 -33
- package/package.json +1 -1
|
@@ -225,7 +225,7 @@ var MessageLength;
|
|
|
225
225
|
MessageLength[MessageLength["SHORT_FORM"] = 0] = "SHORT_FORM";
|
|
226
226
|
MessageLength[MessageLength["LONG_FORM"] = 1] = "LONG_FORM";
|
|
227
227
|
})(MessageLength || (MessageLength = {}));
|
|
228
|
-
var PostType
|
|
228
|
+
var PostType;
|
|
229
229
|
(function (PostType) {
|
|
230
230
|
PostType[PostType["POST_TYPE_INVALID"] = 0] = "POST_TYPE_INVALID";
|
|
231
231
|
PostType[PostType["POST_TYPE_IMAGE"] = 1] = "POST_TYPE_IMAGE";
|
|
@@ -233,7 +233,7 @@ var PostType$1;
|
|
|
233
233
|
PostType[PostType["POST_TYPE_GIF"] = 3] = "POST_TYPE_GIF";
|
|
234
234
|
PostType[PostType["POST_TYPE_REEL"] = 4] = "POST_TYPE_REEL";
|
|
235
235
|
PostType[PostType["POST_TYPE_CAROUSEL"] = 5] = "POST_TYPE_CAROUSEL";
|
|
236
|
-
})(PostType
|
|
236
|
+
})(PostType || (PostType = {}));
|
|
237
237
|
var PostingStatus;
|
|
238
238
|
(function (PostingStatus) {
|
|
239
239
|
PostingStatus[PostingStatus["POSTING_IN_PROGRESS"] = 0] = "POSTING_IN_PROGRESS";
|
|
@@ -263,21 +263,21 @@ var TemplateType;
|
|
|
263
263
|
//
|
|
264
264
|
// Enums.
|
|
265
265
|
// *********************************
|
|
266
|
-
var
|
|
267
|
-
(function (
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
})(
|
|
272
|
-
var
|
|
273
|
-
(function (
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
})(
|
|
266
|
+
var PostStatusV2;
|
|
267
|
+
(function (PostStatusV2) {
|
|
268
|
+
PostStatusV2[PostStatusV2["POST_STATUS_INVALID"] = 0] = "POST_STATUS_INVALID";
|
|
269
|
+
PostStatusV2[PostStatusV2["POST_STATUS_SUCCESS"] = 1] = "POST_STATUS_SUCCESS";
|
|
270
|
+
PostStatusV2[PostStatusV2["POST_STATUS_ERROR"] = 2] = "POST_STATUS_ERROR";
|
|
271
|
+
})(PostStatusV2 || (PostStatusV2 = {}));
|
|
272
|
+
var PostTypeV2;
|
|
273
|
+
(function (PostTypeV2) {
|
|
274
|
+
PostTypeV2[PostTypeV2["POST_TYPE_INVALID"] = 0] = "POST_TYPE_INVALID";
|
|
275
|
+
PostTypeV2[PostTypeV2["POST_TYPE_IMAGE"] = 1] = "POST_TYPE_IMAGE";
|
|
276
|
+
PostTypeV2[PostTypeV2["POST_TYPE_VIDEO"] = 2] = "POST_TYPE_VIDEO";
|
|
277
|
+
PostTypeV2[PostTypeV2["POST_TYPE_GIF"] = 3] = "POST_TYPE_GIF";
|
|
278
|
+
PostTypeV2[PostTypeV2["POST_TYPE_MULTI_MEDIA"] = 4] = "POST_TYPE_MULTI_MEDIA";
|
|
279
|
+
PostTypeV2[PostTypeV2["POST_TYPE_TEXT"] = 5] = "POST_TYPE_TEXT";
|
|
280
|
+
})(PostTypeV2 || (PostTypeV2 = {}));
|
|
281
281
|
|
|
282
282
|
// *********************************
|
|
283
283
|
// Code generated by sdkgen
|
|
@@ -461,7 +461,7 @@ class PostTemplate {
|
|
|
461
461
|
m.metaData = proto.metaData.map(MetaData.fromProto);
|
|
462
462
|
}
|
|
463
463
|
if (proto.postType) {
|
|
464
|
-
m.postType = enumStringToValue$7(PostType
|
|
464
|
+
m.postType = enumStringToValue$7(PostType, proto.postType);
|
|
465
465
|
}
|
|
466
466
|
return m;
|
|
467
467
|
}
|
|
@@ -559,7 +559,7 @@ class SchedulePostStatus {
|
|
|
559
559
|
return toReturn;
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
|
-
|
|
562
|
+
class SocialPost {
|
|
563
563
|
static fromProto(proto) {
|
|
564
564
|
let m = new SocialPost();
|
|
565
565
|
m = Object.assign(m, proto);
|
|
@@ -591,7 +591,7 @@ let SocialPost$1 = class SocialPost {
|
|
|
591
591
|
m.error = Error.fromProto(proto.error);
|
|
592
592
|
}
|
|
593
593
|
if (proto.postType) {
|
|
594
|
-
m.postType = enumStringToValue$7(PostType
|
|
594
|
+
m.postType = enumStringToValue$7(PostType, proto.postType);
|
|
595
595
|
}
|
|
596
596
|
if (proto.mediaEntries) {
|
|
597
597
|
m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
|
|
@@ -698,7 +698,7 @@ let SocialPost$1 = class SocialPost {
|
|
|
698
698
|
}
|
|
699
699
|
return toReturn;
|
|
700
700
|
}
|
|
701
|
-
}
|
|
701
|
+
}
|
|
702
702
|
class SocialPostData {
|
|
703
703
|
static fromProto(proto) {
|
|
704
704
|
let m = new SocialPostData();
|
|
@@ -873,10 +873,25 @@ function enumStringToValue$5(enumRef, value) {
|
|
|
873
873
|
}
|
|
874
874
|
return enumRef[value];
|
|
875
875
|
}
|
|
876
|
-
class
|
|
876
|
+
class FacebookPostStats {
|
|
877
877
|
static fromProto(proto) {
|
|
878
|
-
let m = new
|
|
878
|
+
let m = new FacebookPostStats();
|
|
879
879
|
m = Object.assign(m, proto);
|
|
880
|
+
if (proto.commentCount) {
|
|
881
|
+
m.commentCount = parseInt(proto.commentCount, 10);
|
|
882
|
+
}
|
|
883
|
+
if (proto.shareCount) {
|
|
884
|
+
m.shareCount = parseInt(proto.shareCount, 10);
|
|
885
|
+
}
|
|
886
|
+
if (proto.likeCount) {
|
|
887
|
+
m.likeCount = parseInt(proto.likeCount, 10);
|
|
888
|
+
}
|
|
889
|
+
if (proto.reactions) {
|
|
890
|
+
m.reactions = parseInt(proto.reactions, 10);
|
|
891
|
+
}
|
|
892
|
+
if (proto.peopleReached) {
|
|
893
|
+
m.peopleReached = parseInt(proto.peopleReached, 10);
|
|
894
|
+
}
|
|
880
895
|
return m;
|
|
881
896
|
}
|
|
882
897
|
constructor(kwargs) {
|
|
@@ -887,31 +902,40 @@ class Link {
|
|
|
887
902
|
}
|
|
888
903
|
toApiJson() {
|
|
889
904
|
const toReturn = {};
|
|
890
|
-
if (typeof this.
|
|
891
|
-
toReturn['
|
|
905
|
+
if (typeof this.commentCount !== 'undefined') {
|
|
906
|
+
toReturn['commentCount'] = this.commentCount;
|
|
892
907
|
}
|
|
893
|
-
if (typeof this.
|
|
894
|
-
toReturn['
|
|
908
|
+
if (typeof this.shareCount !== 'undefined') {
|
|
909
|
+
toReturn['shareCount'] = this.shareCount;
|
|
895
910
|
}
|
|
896
|
-
if (typeof this.
|
|
897
|
-
toReturn['
|
|
911
|
+
if (typeof this.likeCount !== 'undefined') {
|
|
912
|
+
toReturn['likeCount'] = this.likeCount;
|
|
898
913
|
}
|
|
899
|
-
if (typeof this.
|
|
900
|
-
toReturn['
|
|
914
|
+
if (typeof this.hasLike !== 'undefined') {
|
|
915
|
+
toReturn['hasLike'] = this.hasLike;
|
|
901
916
|
}
|
|
902
|
-
if (typeof this.
|
|
903
|
-
toReturn['
|
|
917
|
+
if (typeof this.canLike !== 'undefined') {
|
|
918
|
+
toReturn['canLike'] = this.canLike;
|
|
904
919
|
}
|
|
905
|
-
if (typeof this.
|
|
906
|
-
toReturn['
|
|
920
|
+
if (typeof this.reactions !== 'undefined') {
|
|
921
|
+
toReturn['reactions'] = this.reactions;
|
|
922
|
+
}
|
|
923
|
+
if (typeof this.peopleReached !== 'undefined') {
|
|
924
|
+
toReturn['peopleReached'] = this.peopleReached;
|
|
907
925
|
}
|
|
908
926
|
return toReturn;
|
|
909
927
|
}
|
|
910
928
|
}
|
|
911
|
-
class
|
|
929
|
+
class SocialPostStats {
|
|
912
930
|
static fromProto(proto) {
|
|
913
|
-
let m = new
|
|
931
|
+
let m = new SocialPostStats();
|
|
914
932
|
m = Object.assign(m, proto);
|
|
933
|
+
if (proto.facebookPostStats) {
|
|
934
|
+
m.facebookPostStats = FacebookPostStats.fromProto(proto.facebookPostStats);
|
|
935
|
+
}
|
|
936
|
+
if (proto.twitterPostStats) {
|
|
937
|
+
m.twitterPostStats = TwitterPostStats.fromProto(proto.twitterPostStats);
|
|
938
|
+
}
|
|
915
939
|
return m;
|
|
916
940
|
}
|
|
917
941
|
constructor(kwargs) {
|
|
@@ -922,19 +946,28 @@ class Metadata {
|
|
|
922
946
|
}
|
|
923
947
|
toApiJson() {
|
|
924
948
|
const toReturn = {};
|
|
925
|
-
if (typeof this.
|
|
926
|
-
toReturn['
|
|
949
|
+
if (typeof this.internalPostId !== 'undefined') {
|
|
950
|
+
toReturn['internalPostId'] = this.internalPostId;
|
|
927
951
|
}
|
|
928
|
-
if (typeof this.
|
|
929
|
-
toReturn['
|
|
952
|
+
if (typeof this.facebookPostStats !== 'undefined' && this.facebookPostStats !== null) {
|
|
953
|
+
toReturn['facebookPostStats'] = 'toApiJson' in this.facebookPostStats ? this.facebookPostStats.toApiJson() : this.facebookPostStats;
|
|
954
|
+
}
|
|
955
|
+
if (typeof this.twitterPostStats !== 'undefined' && this.twitterPostStats !== null) {
|
|
956
|
+
toReturn['twitterPostStats'] = 'toApiJson' in this.twitterPostStats ? this.twitterPostStats.toApiJson() : this.twitterPostStats;
|
|
930
957
|
}
|
|
931
958
|
return toReturn;
|
|
932
959
|
}
|
|
933
960
|
}
|
|
934
|
-
class
|
|
961
|
+
class TwitterPostStats {
|
|
935
962
|
static fromProto(proto) {
|
|
936
|
-
let m = new
|
|
963
|
+
let m = new TwitterPostStats();
|
|
937
964
|
m = Object.assign(m, proto);
|
|
965
|
+
if (proto.favourites) {
|
|
966
|
+
m.favourites = parseInt(proto.favourites, 10);
|
|
967
|
+
}
|
|
968
|
+
if (proto.retweets) {
|
|
969
|
+
m.retweets = parseInt(proto.retweets, 10);
|
|
970
|
+
}
|
|
938
971
|
return m;
|
|
939
972
|
}
|
|
940
973
|
constructor(kwargs) {
|
|
@@ -945,24 +978,34 @@ class PostAction {
|
|
|
945
978
|
}
|
|
946
979
|
toApiJson() {
|
|
947
980
|
const toReturn = {};
|
|
948
|
-
if (typeof this.
|
|
949
|
-
toReturn['
|
|
981
|
+
if (typeof this.favourites !== 'undefined') {
|
|
982
|
+
toReturn['favourites'] = this.favourites;
|
|
950
983
|
}
|
|
951
|
-
if (typeof this.
|
|
952
|
-
toReturn['
|
|
984
|
+
if (typeof this.hasFavourited !== 'undefined') {
|
|
985
|
+
toReturn['hasFavourited'] = this.hasFavourited;
|
|
986
|
+
}
|
|
987
|
+
if (typeof this.retweets !== 'undefined') {
|
|
988
|
+
toReturn['retweets'] = this.retweets;
|
|
989
|
+
}
|
|
990
|
+
if (typeof this.hasRetweeted !== 'undefined') {
|
|
991
|
+
toReturn['hasRetweeted'] = this.hasRetweeted;
|
|
953
992
|
}
|
|
954
993
|
return toReturn;
|
|
955
994
|
}
|
|
956
995
|
}
|
|
957
|
-
|
|
996
|
+
|
|
997
|
+
function enumStringToValue$4(enumRef, value) {
|
|
998
|
+
if (typeof value === 'number') {
|
|
999
|
+
return value;
|
|
1000
|
+
}
|
|
1001
|
+
return enumRef[value];
|
|
1002
|
+
}
|
|
1003
|
+
class TenorGifMediaEntry {
|
|
958
1004
|
static fromProto(proto) {
|
|
959
|
-
let m = new
|
|
1005
|
+
let m = new TenorGifMediaEntry();
|
|
960
1006
|
m = Object.assign(m, proto);
|
|
961
|
-
if (proto.
|
|
962
|
-
m.
|
|
963
|
-
}
|
|
964
|
-
if (proto.link) {
|
|
965
|
-
m.link = proto.link.map(Link.fromProto);
|
|
1007
|
+
if (proto.value) {
|
|
1008
|
+
m.value = TenorMediaObject.fromProto(proto.value);
|
|
966
1009
|
}
|
|
967
1010
|
return m;
|
|
968
1011
|
}
|
|
@@ -974,33 +1017,62 @@ class PostContent {
|
|
|
974
1017
|
}
|
|
975
1018
|
toApiJson() {
|
|
976
1019
|
const toReturn = {};
|
|
977
|
-
if (typeof this.
|
|
978
|
-
toReturn['
|
|
1020
|
+
if (typeof this.key !== 'undefined') {
|
|
1021
|
+
toReturn['key'] = this.key;
|
|
1022
|
+
}
|
|
1023
|
+
if (typeof this.value !== 'undefined' && this.value !== null) {
|
|
1024
|
+
toReturn['value'] = 'toApiJson' in this.value ? this.value.toApiJson() : this.value;
|
|
1025
|
+
}
|
|
1026
|
+
return toReturn;
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
class TenorGif {
|
|
1030
|
+
static fromProto(proto) {
|
|
1031
|
+
let m = new TenorGif();
|
|
1032
|
+
m = Object.assign(m, proto);
|
|
1033
|
+
if (proto.media) {
|
|
1034
|
+
m.media = Object.keys(proto.media).reduce((obj, k) => { obj[k] = TenorMediaObject.fromProto(proto.media[k]); return obj; }, {});
|
|
1035
|
+
}
|
|
1036
|
+
return m;
|
|
1037
|
+
}
|
|
1038
|
+
constructor(kwargs) {
|
|
1039
|
+
if (!kwargs) {
|
|
1040
|
+
return;
|
|
979
1041
|
}
|
|
1042
|
+
Object.assign(this, kwargs);
|
|
1043
|
+
}
|
|
1044
|
+
toApiJson() {
|
|
1045
|
+
const toReturn = {};
|
|
980
1046
|
if (typeof this.media !== 'undefined' && this.media !== null) {
|
|
981
1047
|
toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
|
|
982
1048
|
}
|
|
983
|
-
if (typeof this.
|
|
984
|
-
toReturn['
|
|
1049
|
+
if (typeof this.tags !== 'undefined') {
|
|
1050
|
+
toReturn['tags'] = this.tags;
|
|
985
1051
|
}
|
|
986
|
-
if (typeof this.
|
|
987
|
-
toReturn['
|
|
1052
|
+
if (typeof this.hasAudio !== 'undefined') {
|
|
1053
|
+
toReturn['hasAudio'] = this.hasAudio;
|
|
988
1054
|
}
|
|
989
1055
|
if (typeof this.title !== 'undefined') {
|
|
990
1056
|
toReturn['title'] = this.title;
|
|
991
1057
|
}
|
|
1058
|
+
if (typeof this.id !== 'undefined') {
|
|
1059
|
+
toReturn['id'] = this.id;
|
|
1060
|
+
}
|
|
1061
|
+
if (typeof this.created !== 'undefined') {
|
|
1062
|
+
toReturn['created'] = this.created;
|
|
1063
|
+
}
|
|
992
1064
|
return toReturn;
|
|
993
1065
|
}
|
|
994
1066
|
}
|
|
995
|
-
class
|
|
1067
|
+
class TenorMediaObject {
|
|
996
1068
|
static fromProto(proto) {
|
|
997
|
-
let m = new
|
|
1069
|
+
let m = new TenorMediaObject();
|
|
998
1070
|
m = Object.assign(m, proto);
|
|
999
|
-
if (proto.
|
|
1000
|
-
m.
|
|
1071
|
+
if (proto.dimensions) {
|
|
1072
|
+
m.dimensions = proto.dimensions.map((i) => parseInt(i, 10));
|
|
1001
1073
|
}
|
|
1002
|
-
if (proto.
|
|
1003
|
-
m.
|
|
1074
|
+
if (proto.size) {
|
|
1075
|
+
m.size = parseInt(proto.size, 10);
|
|
1004
1076
|
}
|
|
1005
1077
|
return m;
|
|
1006
1078
|
}
|
|
@@ -1012,24 +1084,37 @@ class PostCustomization {
|
|
|
1012
1084
|
}
|
|
1013
1085
|
toApiJson() {
|
|
1014
1086
|
const toReturn = {};
|
|
1015
|
-
if (typeof this.
|
|
1016
|
-
toReturn['
|
|
1087
|
+
if (typeof this.preview !== 'undefined') {
|
|
1088
|
+
toReturn['preview'] = this.preview;
|
|
1017
1089
|
}
|
|
1018
|
-
if (typeof this.
|
|
1019
|
-
toReturn['
|
|
1090
|
+
if (typeof this.url !== 'undefined') {
|
|
1091
|
+
toReturn['url'] = this.url;
|
|
1092
|
+
}
|
|
1093
|
+
if (typeof this.dimensions !== 'undefined') {
|
|
1094
|
+
toReturn['dimensions'] = this.dimensions;
|
|
1095
|
+
}
|
|
1096
|
+
if (typeof this.size !== 'undefined') {
|
|
1097
|
+
toReturn['size'] = this.size;
|
|
1020
1098
|
}
|
|
1021
1099
|
return toReturn;
|
|
1022
1100
|
}
|
|
1023
1101
|
}
|
|
1024
|
-
|
|
1102
|
+
|
|
1103
|
+
function enumStringToValue$3(enumRef, value) {
|
|
1104
|
+
if (typeof value === 'number') {
|
|
1105
|
+
return value;
|
|
1106
|
+
}
|
|
1107
|
+
return enumRef[value];
|
|
1108
|
+
}
|
|
1109
|
+
class CreateMultilocationPostRequest {
|
|
1025
1110
|
static fromProto(proto) {
|
|
1026
|
-
let m = new
|
|
1111
|
+
let m = new CreateMultilocationPostRequest();
|
|
1027
1112
|
m = Object.assign(m, proto);
|
|
1028
|
-
if (proto.
|
|
1029
|
-
m.
|
|
1113
|
+
if (proto.scheduledDate) {
|
|
1114
|
+
m.scheduledDate = new Date(proto.scheduledDate);
|
|
1030
1115
|
}
|
|
1031
|
-
if (proto.
|
|
1032
|
-
m.
|
|
1116
|
+
if (proto.locations) {
|
|
1117
|
+
m.locations = proto.locations.map(Location.fromProto);
|
|
1033
1118
|
}
|
|
1034
1119
|
return m;
|
|
1035
1120
|
}
|
|
@@ -1041,24 +1126,39 @@ class PostEvent {
|
|
|
1041
1126
|
}
|
|
1042
1127
|
toApiJson() {
|
|
1043
1128
|
const toReturn = {};
|
|
1044
|
-
if (typeof this.
|
|
1045
|
-
toReturn['
|
|
1129
|
+
if (typeof this.brandId !== 'undefined') {
|
|
1130
|
+
toReturn['brandId'] = this.brandId;
|
|
1046
1131
|
}
|
|
1047
|
-
if (typeof this.
|
|
1048
|
-
toReturn['
|
|
1132
|
+
if (typeof this.text !== 'undefined') {
|
|
1133
|
+
toReturn['text'] = this.text;
|
|
1049
1134
|
}
|
|
1050
|
-
if (typeof this.
|
|
1051
|
-
toReturn['
|
|
1135
|
+
if (typeof this.media !== 'undefined') {
|
|
1136
|
+
toReturn['media'] = this.media;
|
|
1137
|
+
}
|
|
1138
|
+
if (typeof this.scheduledDate !== 'undefined' && this.scheduledDate !== null) {
|
|
1139
|
+
toReturn['scheduledDate'] = 'toApiJson' in this.scheduledDate ? this.scheduledDate.toApiJson() : this.scheduledDate;
|
|
1140
|
+
}
|
|
1141
|
+
if (typeof this.locations !== 'undefined' && this.locations !== null) {
|
|
1142
|
+
toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
|
|
1143
|
+
}
|
|
1144
|
+
if (typeof this.gifs !== 'undefined') {
|
|
1145
|
+
toReturn['gifs'] = this.gifs;
|
|
1146
|
+
}
|
|
1147
|
+
if (typeof this.videos !== 'undefined') {
|
|
1148
|
+
toReturn['videos'] = this.videos;
|
|
1052
1149
|
}
|
|
1053
1150
|
return toReturn;
|
|
1054
1151
|
}
|
|
1055
1152
|
}
|
|
1056
|
-
class
|
|
1153
|
+
class CreateMultilocationPostResponse {
|
|
1057
1154
|
static fromProto(proto) {
|
|
1058
|
-
let m = new
|
|
1155
|
+
let m = new CreateMultilocationPostResponse();
|
|
1059
1156
|
m = Object.assign(m, proto);
|
|
1060
|
-
if (proto.
|
|
1061
|
-
m.
|
|
1157
|
+
if (proto.post) {
|
|
1158
|
+
m.post = MultilocationPost.fromProto(proto.post);
|
|
1159
|
+
}
|
|
1160
|
+
if (proto.errors) {
|
|
1161
|
+
m.errors = proto.errors.map(MultilocationPostError.fromProto);
|
|
1062
1162
|
}
|
|
1063
1163
|
return m;
|
|
1064
1164
|
}
|
|
@@ -1070,42 +1170,30 @@ class PostMedia {
|
|
|
1070
1170
|
}
|
|
1071
1171
|
toApiJson() {
|
|
1072
1172
|
const toReturn = {};
|
|
1073
|
-
if (typeof this.
|
|
1074
|
-
toReturn['
|
|
1075
|
-
}
|
|
1076
|
-
if (typeof this.mediaUrl !== 'undefined') {
|
|
1077
|
-
toReturn['mediaUrl'] = this.mediaUrl;
|
|
1078
|
-
}
|
|
1079
|
-
if (typeof this.mediaType !== 'undefined') {
|
|
1080
|
-
toReturn['mediaType'] = this.mediaType;
|
|
1081
|
-
}
|
|
1082
|
-
if (typeof this.containerId !== 'undefined') {
|
|
1083
|
-
toReturn['containerId'] = this.containerId;
|
|
1173
|
+
if (typeof this.post !== 'undefined' && this.post !== null) {
|
|
1174
|
+
toReturn['post'] = 'toApiJson' in this.post ? this.post.toApiJson() : this.post;
|
|
1084
1175
|
}
|
|
1085
|
-
if (typeof this.
|
|
1086
|
-
toReturn['
|
|
1176
|
+
if (typeof this.errors !== 'undefined' && this.errors !== null) {
|
|
1177
|
+
toReturn['errors'] = 'toApiJson' in this.errors ? this.errors.toApiJson() : this.errors;
|
|
1087
1178
|
}
|
|
1088
1179
|
return toReturn;
|
|
1089
1180
|
}
|
|
1090
1181
|
}
|
|
1091
|
-
class
|
|
1182
|
+
class CreatePostTemplateRequest {
|
|
1092
1183
|
static fromProto(proto) {
|
|
1093
|
-
let m = new
|
|
1184
|
+
let m = new CreatePostTemplateRequest();
|
|
1094
1185
|
m = Object.assign(m, proto);
|
|
1095
|
-
if (proto.
|
|
1096
|
-
m.
|
|
1186
|
+
if (proto.postDateTime) {
|
|
1187
|
+
m.postDateTime = new Date(proto.postDateTime);
|
|
1097
1188
|
}
|
|
1098
|
-
if (proto.
|
|
1099
|
-
m.
|
|
1189
|
+
if (proto.mediaEntries) {
|
|
1190
|
+
m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
|
|
1100
1191
|
}
|
|
1101
|
-
if (proto.
|
|
1102
|
-
m.
|
|
1192
|
+
if (proto.metaData) {
|
|
1193
|
+
m.metaData = proto.metaData.map(MetaData.fromProto);
|
|
1103
1194
|
}
|
|
1104
1195
|
if (proto.postType) {
|
|
1105
|
-
m.postType = enumStringToValue$
|
|
1106
|
-
}
|
|
1107
|
-
if (proto.metadata) {
|
|
1108
|
-
m.metadata = proto.metadata.map(Metadata.fromProto);
|
|
1196
|
+
m.postType = enumStringToValue$3(PostType, proto.postType);
|
|
1109
1197
|
}
|
|
1110
1198
|
return m;
|
|
1111
1199
|
}
|
|
@@ -1117,59 +1205,55 @@ class SocialPost {
|
|
|
1117
1205
|
}
|
|
1118
1206
|
toApiJson() {
|
|
1119
1207
|
const toReturn = {};
|
|
1120
|
-
if (typeof this.
|
|
1121
|
-
toReturn['
|
|
1122
|
-
}
|
|
1123
|
-
if (typeof this.socialServiceId !== 'undefined') {
|
|
1124
|
-
toReturn['socialServiceId'] = this.socialServiceId;
|
|
1208
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
1209
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
1125
1210
|
}
|
|
1126
|
-
if (typeof this.
|
|
1127
|
-
toReturn['
|
|
1211
|
+
if (typeof this.title !== 'undefined') {
|
|
1212
|
+
toReturn['title'] = this.title;
|
|
1128
1213
|
}
|
|
1129
|
-
if (typeof this.
|
|
1130
|
-
toReturn['
|
|
1214
|
+
if (typeof this.postText !== 'undefined') {
|
|
1215
|
+
toReturn['postText'] = this.postText;
|
|
1131
1216
|
}
|
|
1132
|
-
if (typeof this.
|
|
1133
|
-
toReturn['
|
|
1217
|
+
if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
|
|
1218
|
+
toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
|
|
1134
1219
|
}
|
|
1135
|
-
if (typeof this.
|
|
1136
|
-
toReturn['
|
|
1220
|
+
if (typeof this.gmbPostCustomization !== 'undefined') {
|
|
1221
|
+
toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
|
|
1137
1222
|
}
|
|
1138
|
-
if (typeof this.
|
|
1139
|
-
toReturn['
|
|
1223
|
+
if (typeof this.imageUrl !== 'undefined') {
|
|
1224
|
+
toReturn['imageUrl'] = this.imageUrl;
|
|
1140
1225
|
}
|
|
1141
|
-
if (typeof this.
|
|
1142
|
-
toReturn['
|
|
1226
|
+
if (typeof this.imagePath !== 'undefined') {
|
|
1227
|
+
toReturn['imagePath'] = this.imagePath;
|
|
1143
1228
|
}
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
|
-
function enumStringToValue$4(enumRef, value) {
|
|
1149
|
-
if (typeof value === 'number') {
|
|
1150
|
-
return value;
|
|
1151
|
-
}
|
|
1152
|
-
return enumRef[value];
|
|
1153
|
-
}
|
|
1154
|
-
class FacebookPostStats {
|
|
1155
|
-
static fromProto(proto) {
|
|
1156
|
-
let m = new FacebookPostStats();
|
|
1157
|
-
m = Object.assign(m, proto);
|
|
1158
|
-
if (proto.commentCount) {
|
|
1159
|
-
m.commentCount = parseInt(proto.commentCount, 10);
|
|
1229
|
+
if (typeof this.imageSize !== 'undefined') {
|
|
1230
|
+
toReturn['imageSize'] = this.imageSize;
|
|
1160
1231
|
}
|
|
1161
|
-
if (
|
|
1162
|
-
|
|
1232
|
+
if (typeof this.previews !== 'undefined') {
|
|
1233
|
+
toReturn['previews'] = this.previews;
|
|
1163
1234
|
}
|
|
1164
|
-
if (
|
|
1165
|
-
|
|
1235
|
+
if (typeof this.options !== 'undefined') {
|
|
1236
|
+
toReturn['options'] = this.options;
|
|
1166
1237
|
}
|
|
1167
|
-
if (
|
|
1168
|
-
|
|
1238
|
+
if (typeof this.videoUrl !== 'undefined') {
|
|
1239
|
+
toReturn['videoUrl'] = this.videoUrl;
|
|
1169
1240
|
}
|
|
1170
|
-
if (
|
|
1171
|
-
|
|
1241
|
+
if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
|
|
1242
|
+
toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
|
|
1243
|
+
}
|
|
1244
|
+
if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
|
|
1245
|
+
toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
|
|
1246
|
+
}
|
|
1247
|
+
if (typeof this.postType !== 'undefined') {
|
|
1248
|
+
toReturn['postType'] = this.postType;
|
|
1172
1249
|
}
|
|
1250
|
+
return toReturn;
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
class CreatePostTemplateResponse {
|
|
1254
|
+
static fromProto(proto) {
|
|
1255
|
+
let m = new CreatePostTemplateResponse();
|
|
1256
|
+
m = Object.assign(m, proto);
|
|
1173
1257
|
return m;
|
|
1174
1258
|
}
|
|
1175
1259
|
constructor(kwargs) {
|
|
@@ -1180,39 +1264,21 @@ class FacebookPostStats {
|
|
|
1180
1264
|
}
|
|
1181
1265
|
toApiJson() {
|
|
1182
1266
|
const toReturn = {};
|
|
1183
|
-
if (typeof this.
|
|
1184
|
-
toReturn['
|
|
1185
|
-
}
|
|
1186
|
-
if (typeof this.shareCount !== 'undefined') {
|
|
1187
|
-
toReturn['shareCount'] = this.shareCount;
|
|
1188
|
-
}
|
|
1189
|
-
if (typeof this.likeCount !== 'undefined') {
|
|
1190
|
-
toReturn['likeCount'] = this.likeCount;
|
|
1191
|
-
}
|
|
1192
|
-
if (typeof this.hasLike !== 'undefined') {
|
|
1193
|
-
toReturn['hasLike'] = this.hasLike;
|
|
1194
|
-
}
|
|
1195
|
-
if (typeof this.canLike !== 'undefined') {
|
|
1196
|
-
toReturn['canLike'] = this.canLike;
|
|
1197
|
-
}
|
|
1198
|
-
if (typeof this.reactions !== 'undefined') {
|
|
1199
|
-
toReturn['reactions'] = this.reactions;
|
|
1200
|
-
}
|
|
1201
|
-
if (typeof this.peopleReached !== 'undefined') {
|
|
1202
|
-
toReturn['peopleReached'] = this.peopleReached;
|
|
1267
|
+
if (typeof this.templateId !== 'undefined') {
|
|
1268
|
+
toReturn['templateId'] = this.templateId;
|
|
1203
1269
|
}
|
|
1204
1270
|
return toReturn;
|
|
1205
1271
|
}
|
|
1206
1272
|
}
|
|
1207
|
-
class
|
|
1273
|
+
class DateRangeFilter {
|
|
1208
1274
|
static fromProto(proto) {
|
|
1209
|
-
let m = new
|
|
1275
|
+
let m = new DateRangeFilter();
|
|
1210
1276
|
m = Object.assign(m, proto);
|
|
1211
|
-
if (proto.
|
|
1212
|
-
m.
|
|
1277
|
+
if (proto.beginRange) {
|
|
1278
|
+
m.beginRange = new Date(proto.beginRange);
|
|
1213
1279
|
}
|
|
1214
|
-
if (proto.
|
|
1215
|
-
m.
|
|
1280
|
+
if (proto.endRange) {
|
|
1281
|
+
m.endRange = new Date(proto.endRange);
|
|
1216
1282
|
}
|
|
1217
1283
|
return m;
|
|
1218
1284
|
}
|
|
@@ -1224,28 +1290,19 @@ class SocialPostStats {
|
|
|
1224
1290
|
}
|
|
1225
1291
|
toApiJson() {
|
|
1226
1292
|
const toReturn = {};
|
|
1227
|
-
if (typeof this.
|
|
1228
|
-
toReturn['
|
|
1229
|
-
}
|
|
1230
|
-
if (typeof this.facebookPostStats !== 'undefined' && this.facebookPostStats !== null) {
|
|
1231
|
-
toReturn['facebookPostStats'] = 'toApiJson' in this.facebookPostStats ? this.facebookPostStats.toApiJson() : this.facebookPostStats;
|
|
1293
|
+
if (typeof this.beginRange !== 'undefined' && this.beginRange !== null) {
|
|
1294
|
+
toReturn['beginRange'] = 'toApiJson' in this.beginRange ? this.beginRange.toApiJson() : this.beginRange;
|
|
1232
1295
|
}
|
|
1233
|
-
if (typeof this.
|
|
1234
|
-
toReturn['
|
|
1296
|
+
if (typeof this.endRange !== 'undefined' && this.endRange !== null) {
|
|
1297
|
+
toReturn['endRange'] = 'toApiJson' in this.endRange ? this.endRange.toApiJson() : this.endRange;
|
|
1235
1298
|
}
|
|
1236
1299
|
return toReturn;
|
|
1237
1300
|
}
|
|
1238
1301
|
}
|
|
1239
|
-
class
|
|
1302
|
+
class DeleteHashtagsRequest {
|
|
1240
1303
|
static fromProto(proto) {
|
|
1241
|
-
let m = new
|
|
1304
|
+
let m = new DeleteHashtagsRequest();
|
|
1242
1305
|
m = Object.assign(m, proto);
|
|
1243
|
-
if (proto.favourites) {
|
|
1244
|
-
m.favourites = parseInt(proto.favourites, 10);
|
|
1245
|
-
}
|
|
1246
|
-
if (proto.retweets) {
|
|
1247
|
-
m.retweets = parseInt(proto.retweets, 10);
|
|
1248
|
-
}
|
|
1249
1306
|
return m;
|
|
1250
1307
|
}
|
|
1251
1308
|
constructor(kwargs) {
|
|
@@ -1256,35 +1313,22 @@ class TwitterPostStats {
|
|
|
1256
1313
|
}
|
|
1257
1314
|
toApiJson() {
|
|
1258
1315
|
const toReturn = {};
|
|
1259
|
-
if (typeof this.
|
|
1260
|
-
toReturn['
|
|
1261
|
-
}
|
|
1262
|
-
if (typeof this.hasFavourited !== 'undefined') {
|
|
1263
|
-
toReturn['hasFavourited'] = this.hasFavourited;
|
|
1316
|
+
if (typeof this.keyword !== 'undefined') {
|
|
1317
|
+
toReturn['keyword'] = this.keyword;
|
|
1264
1318
|
}
|
|
1265
|
-
if (typeof this.
|
|
1266
|
-
toReturn['
|
|
1319
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1320
|
+
toReturn['businessId'] = this.businessId;
|
|
1267
1321
|
}
|
|
1268
|
-
if (typeof this.
|
|
1269
|
-
toReturn['
|
|
1322
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
1323
|
+
toReturn['partnerId'] = this.partnerId;
|
|
1270
1324
|
}
|
|
1271
1325
|
return toReturn;
|
|
1272
1326
|
}
|
|
1273
1327
|
}
|
|
1274
|
-
|
|
1275
|
-
function enumStringToValue$3(enumRef, value) {
|
|
1276
|
-
if (typeof value === 'number') {
|
|
1277
|
-
return value;
|
|
1278
|
-
}
|
|
1279
|
-
return enumRef[value];
|
|
1280
|
-
}
|
|
1281
|
-
class TenorGifMediaEntry {
|
|
1328
|
+
class DeleteMultilocationPostRequest {
|
|
1282
1329
|
static fromProto(proto) {
|
|
1283
|
-
let m = new
|
|
1330
|
+
let m = new DeleteMultilocationPostRequest();
|
|
1284
1331
|
m = Object.assign(m, proto);
|
|
1285
|
-
if (proto.value) {
|
|
1286
|
-
m.value = TenorMediaObject.fromProto(proto.value);
|
|
1287
|
-
}
|
|
1288
1332
|
return m;
|
|
1289
1333
|
}
|
|
1290
1334
|
constructor(kwargs) {
|
|
@@ -1295,22 +1339,19 @@ class TenorGifMediaEntry {
|
|
|
1295
1339
|
}
|
|
1296
1340
|
toApiJson() {
|
|
1297
1341
|
const toReturn = {};
|
|
1298
|
-
if (typeof this.
|
|
1299
|
-
toReturn['
|
|
1342
|
+
if (typeof this.brandId !== 'undefined') {
|
|
1343
|
+
toReturn['brandId'] = this.brandId;
|
|
1300
1344
|
}
|
|
1301
|
-
if (typeof this.
|
|
1302
|
-
toReturn['
|
|
1345
|
+
if (typeof this.multilocationId !== 'undefined') {
|
|
1346
|
+
toReturn['multilocationId'] = this.multilocationId;
|
|
1303
1347
|
}
|
|
1304
1348
|
return toReturn;
|
|
1305
1349
|
}
|
|
1306
1350
|
}
|
|
1307
|
-
class
|
|
1351
|
+
class DeletePostTemplateRequest {
|
|
1308
1352
|
static fromProto(proto) {
|
|
1309
|
-
let m = new
|
|
1353
|
+
let m = new DeletePostTemplateRequest();
|
|
1310
1354
|
m = Object.assign(m, proto);
|
|
1311
|
-
if (proto.media) {
|
|
1312
|
-
m.media = Object.keys(proto.media).reduce((obj, k) => { obj[k] = TenorMediaObject.fromProto(proto.media[k]); return obj; }, {});
|
|
1313
|
-
}
|
|
1314
1355
|
return m;
|
|
1315
1356
|
}
|
|
1316
1357
|
constructor(kwargs) {
|
|
@@ -1321,37 +1362,19 @@ class TenorGif {
|
|
|
1321
1362
|
}
|
|
1322
1363
|
toApiJson() {
|
|
1323
1364
|
const toReturn = {};
|
|
1324
|
-
if (typeof this.
|
|
1325
|
-
toReturn['
|
|
1326
|
-
}
|
|
1327
|
-
if (typeof this.tags !== 'undefined') {
|
|
1328
|
-
toReturn['tags'] = this.tags;
|
|
1329
|
-
}
|
|
1330
|
-
if (typeof this.hasAudio !== 'undefined') {
|
|
1331
|
-
toReturn['hasAudio'] = this.hasAudio;
|
|
1332
|
-
}
|
|
1333
|
-
if (typeof this.title !== 'undefined') {
|
|
1334
|
-
toReturn['title'] = this.title;
|
|
1335
|
-
}
|
|
1336
|
-
if (typeof this.id !== 'undefined') {
|
|
1337
|
-
toReturn['id'] = this.id;
|
|
1365
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
1366
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
1338
1367
|
}
|
|
1339
|
-
if (typeof this.
|
|
1340
|
-
toReturn['
|
|
1368
|
+
if (typeof this.templateId !== 'undefined') {
|
|
1369
|
+
toReturn['templateId'] = this.templateId;
|
|
1341
1370
|
}
|
|
1342
1371
|
return toReturn;
|
|
1343
1372
|
}
|
|
1344
1373
|
}
|
|
1345
|
-
class
|
|
1374
|
+
class DeleteSocialPostRequest {
|
|
1346
1375
|
static fromProto(proto) {
|
|
1347
|
-
let m = new
|
|
1376
|
+
let m = new DeleteSocialPostRequest();
|
|
1348
1377
|
m = Object.assign(m, proto);
|
|
1349
|
-
if (proto.dimensions) {
|
|
1350
|
-
m.dimensions = proto.dimensions.map((i) => parseInt(i, 10));
|
|
1351
|
-
}
|
|
1352
|
-
if (proto.size) {
|
|
1353
|
-
m.size = parseInt(proto.size, 10);
|
|
1354
|
-
}
|
|
1355
1378
|
return m;
|
|
1356
1379
|
}
|
|
1357
1380
|
constructor(kwargs) {
|
|
@@ -1362,35 +1385,25 @@ class TenorMediaObject {
|
|
|
1362
1385
|
}
|
|
1363
1386
|
toApiJson() {
|
|
1364
1387
|
const toReturn = {};
|
|
1365
|
-
if (typeof this.
|
|
1366
|
-
toReturn['
|
|
1367
|
-
}
|
|
1368
|
-
if (typeof this.url !== 'undefined') {
|
|
1369
|
-
toReturn['url'] = this.url;
|
|
1370
|
-
}
|
|
1371
|
-
if (typeof this.dimensions !== 'undefined') {
|
|
1372
|
-
toReturn['dimensions'] = this.dimensions;
|
|
1388
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1389
|
+
toReturn['businessId'] = this.businessId;
|
|
1373
1390
|
}
|
|
1374
|
-
if (typeof this.
|
|
1375
|
-
toReturn['
|
|
1391
|
+
if (typeof this.socialPostId !== 'undefined') {
|
|
1392
|
+
toReturn['socialPostId'] = this.socialPostId;
|
|
1376
1393
|
}
|
|
1377
1394
|
return toReturn;
|
|
1378
1395
|
}
|
|
1379
1396
|
}
|
|
1380
|
-
|
|
1381
|
-
function enumStringToValue$2(enumRef, value) {
|
|
1382
|
-
if (typeof value === 'number') {
|
|
1383
|
-
return value;
|
|
1384
|
-
}
|
|
1385
|
-
return enumRef[value];
|
|
1386
|
-
}
|
|
1387
|
-
class CreateMultilocationPostRequest {
|
|
1397
|
+
class EditMultilocationPostRequest {
|
|
1388
1398
|
static fromProto(proto) {
|
|
1389
|
-
let m = new
|
|
1399
|
+
let m = new EditMultilocationPostRequest();
|
|
1390
1400
|
m = Object.assign(m, proto);
|
|
1391
1401
|
if (proto.scheduledDate) {
|
|
1392
1402
|
m.scheduledDate = new Date(proto.scheduledDate);
|
|
1393
1403
|
}
|
|
1404
|
+
if (proto.fieldMask) {
|
|
1405
|
+
m.fieldMask = FieldMask.fromProto(proto.fieldMask);
|
|
1406
|
+
}
|
|
1394
1407
|
if (proto.locations) {
|
|
1395
1408
|
m.locations = proto.locations.map(Location.fromProto);
|
|
1396
1409
|
}
|
|
@@ -1407,6 +1420,9 @@ class CreateMultilocationPostRequest {
|
|
|
1407
1420
|
if (typeof this.brandId !== 'undefined') {
|
|
1408
1421
|
toReturn['brandId'] = this.brandId;
|
|
1409
1422
|
}
|
|
1423
|
+
if (typeof this.multilocationId !== 'undefined') {
|
|
1424
|
+
toReturn['multilocationId'] = this.multilocationId;
|
|
1425
|
+
}
|
|
1410
1426
|
if (typeof this.text !== 'undefined') {
|
|
1411
1427
|
toReturn['text'] = this.text;
|
|
1412
1428
|
}
|
|
@@ -1416,8 +1432,8 @@ class CreateMultilocationPostRequest {
|
|
|
1416
1432
|
if (typeof this.scheduledDate !== 'undefined' && this.scheduledDate !== null) {
|
|
1417
1433
|
toReturn['scheduledDate'] = 'toApiJson' in this.scheduledDate ? this.scheduledDate.toApiJson() : this.scheduledDate;
|
|
1418
1434
|
}
|
|
1419
|
-
if (typeof this.
|
|
1420
|
-
toReturn['
|
|
1435
|
+
if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
|
|
1436
|
+
toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
|
|
1421
1437
|
}
|
|
1422
1438
|
if (typeof this.gifs !== 'undefined') {
|
|
1423
1439
|
toReturn['gifs'] = this.gifs;
|
|
@@ -1425,12 +1441,15 @@ class CreateMultilocationPostRequest {
|
|
|
1425
1441
|
if (typeof this.videos !== 'undefined') {
|
|
1426
1442
|
toReturn['videos'] = this.videos;
|
|
1427
1443
|
}
|
|
1444
|
+
if (typeof this.locations !== 'undefined' && this.locations !== null) {
|
|
1445
|
+
toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
|
|
1446
|
+
}
|
|
1428
1447
|
return toReturn;
|
|
1429
1448
|
}
|
|
1430
1449
|
}
|
|
1431
|
-
class
|
|
1450
|
+
class EditMultilocationPostResponse {
|
|
1432
1451
|
static fromProto(proto) {
|
|
1433
|
-
let m = new
|
|
1452
|
+
let m = new EditMultilocationPostResponse();
|
|
1434
1453
|
m = Object.assign(m, proto);
|
|
1435
1454
|
if (proto.post) {
|
|
1436
1455
|
m.post = MultilocationPost.fromProto(proto.post);
|
|
@@ -1457,21 +1476,12 @@ class CreateMultilocationPostResponse {
|
|
|
1457
1476
|
return toReturn;
|
|
1458
1477
|
}
|
|
1459
1478
|
}
|
|
1460
|
-
class
|
|
1479
|
+
class PartnerListScheduledSocialPostsRequestFilters {
|
|
1461
1480
|
static fromProto(proto) {
|
|
1462
|
-
let m = new
|
|
1481
|
+
let m = new PartnerListScheduledSocialPostsRequestFilters();
|
|
1463
1482
|
m = Object.assign(m, proto);
|
|
1464
|
-
if (proto.
|
|
1465
|
-
m.
|
|
1466
|
-
}
|
|
1467
|
-
if (proto.mediaEntries) {
|
|
1468
|
-
m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
|
|
1469
|
-
}
|
|
1470
|
-
if (proto.metaData) {
|
|
1471
|
-
m.metaData = proto.metaData.map(MetaData.fromProto);
|
|
1472
|
-
}
|
|
1473
|
-
if (proto.postType) {
|
|
1474
|
-
m.postType = enumStringToValue$2(PostType$1, proto.postType);
|
|
1483
|
+
if (proto.dateRange) {
|
|
1484
|
+
m.dateRange = DateRangeFilter.fromProto(proto.dateRange);
|
|
1475
1485
|
}
|
|
1476
1486
|
return m;
|
|
1477
1487
|
}
|
|
@@ -1483,54 +1493,47 @@ class CreatePostTemplateRequest {
|
|
|
1483
1493
|
}
|
|
1484
1494
|
toApiJson() {
|
|
1485
1495
|
const toReturn = {};
|
|
1486
|
-
if (typeof this.
|
|
1487
|
-
toReturn['
|
|
1488
|
-
}
|
|
1489
|
-
if (typeof this.title !== 'undefined') {
|
|
1490
|
-
toReturn['title'] = this.title;
|
|
1491
|
-
}
|
|
1492
|
-
if (typeof this.postText !== 'undefined') {
|
|
1493
|
-
toReturn['postText'] = this.postText;
|
|
1494
|
-
}
|
|
1495
|
-
if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
|
|
1496
|
-
toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
|
|
1497
|
-
}
|
|
1498
|
-
if (typeof this.gmbPostCustomization !== 'undefined') {
|
|
1499
|
-
toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
|
|
1500
|
-
}
|
|
1501
|
-
if (typeof this.imageUrl !== 'undefined') {
|
|
1502
|
-
toReturn['imageUrl'] = this.imageUrl;
|
|
1503
|
-
}
|
|
1504
|
-
if (typeof this.imagePath !== 'undefined') {
|
|
1505
|
-
toReturn['imagePath'] = this.imagePath;
|
|
1506
|
-
}
|
|
1507
|
-
if (typeof this.imageSize !== 'undefined') {
|
|
1508
|
-
toReturn['imageSize'] = this.imageSize;
|
|
1496
|
+
if (typeof this.dateRange !== 'undefined' && this.dateRange !== null) {
|
|
1497
|
+
toReturn['dateRange'] = 'toApiJson' in this.dateRange ? this.dateRange.toApiJson() : this.dateRange;
|
|
1509
1498
|
}
|
|
1510
|
-
if (typeof this.
|
|
1511
|
-
toReturn['
|
|
1499
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
1500
|
+
toReturn['partnerId'] = this.partnerId;
|
|
1512
1501
|
}
|
|
1513
|
-
|
|
1514
|
-
|
|
1502
|
+
return toReturn;
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
class GenerateCSVForPerformanceStatsRequest {
|
|
1506
|
+
static fromProto(proto) {
|
|
1507
|
+
let m = new GenerateCSVForPerformanceStatsRequest();
|
|
1508
|
+
m = Object.assign(m, proto);
|
|
1509
|
+
if (proto.postData) {
|
|
1510
|
+
m.postData = proto.postData.map(PostData.fromProto);
|
|
1515
1511
|
}
|
|
1516
|
-
|
|
1517
|
-
|
|
1512
|
+
return m;
|
|
1513
|
+
}
|
|
1514
|
+
constructor(kwargs) {
|
|
1515
|
+
if (!kwargs) {
|
|
1516
|
+
return;
|
|
1518
1517
|
}
|
|
1519
|
-
|
|
1520
|
-
|
|
1518
|
+
Object.assign(this, kwargs);
|
|
1519
|
+
}
|
|
1520
|
+
toApiJson() {
|
|
1521
|
+
const toReturn = {};
|
|
1522
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1523
|
+
toReturn['businessId'] = this.businessId;
|
|
1521
1524
|
}
|
|
1522
|
-
if (typeof this.
|
|
1523
|
-
toReturn['
|
|
1525
|
+
if (typeof this.postData !== 'undefined' && this.postData !== null) {
|
|
1526
|
+
toReturn['postData'] = 'toApiJson' in this.postData ? this.postData.toApiJson() : this.postData;
|
|
1524
1527
|
}
|
|
1525
|
-
if (typeof this.
|
|
1526
|
-
toReturn['
|
|
1528
|
+
if (typeof this.includeHeaders !== 'undefined') {
|
|
1529
|
+
toReturn['includeHeaders'] = this.includeHeaders;
|
|
1527
1530
|
}
|
|
1528
1531
|
return toReturn;
|
|
1529
1532
|
}
|
|
1530
1533
|
}
|
|
1531
|
-
class
|
|
1534
|
+
class GenerateCSVForPerformanceStatsResponse {
|
|
1532
1535
|
static fromProto(proto) {
|
|
1533
|
-
let m = new
|
|
1536
|
+
let m = new GenerateCSVForPerformanceStatsResponse();
|
|
1534
1537
|
m = Object.assign(m, proto);
|
|
1535
1538
|
return m;
|
|
1536
1539
|
}
|
|
@@ -1542,22 +1545,16 @@ class CreatePostTemplateResponse {
|
|
|
1542
1545
|
}
|
|
1543
1546
|
toApiJson() {
|
|
1544
1547
|
const toReturn = {};
|
|
1545
|
-
if (typeof this.
|
|
1546
|
-
toReturn['
|
|
1548
|
+
if (typeof this.generatedId !== 'undefined') {
|
|
1549
|
+
toReturn['generatedId'] = this.generatedId;
|
|
1547
1550
|
}
|
|
1548
1551
|
return toReturn;
|
|
1549
1552
|
}
|
|
1550
1553
|
}
|
|
1551
|
-
class
|
|
1554
|
+
class GetGeneratedCSVForPerformanceStatsRequest {
|
|
1552
1555
|
static fromProto(proto) {
|
|
1553
|
-
let m = new
|
|
1556
|
+
let m = new GetGeneratedCSVForPerformanceStatsRequest();
|
|
1554
1557
|
m = Object.assign(m, proto);
|
|
1555
|
-
if (proto.beginRange) {
|
|
1556
|
-
m.beginRange = new Date(proto.beginRange);
|
|
1557
|
-
}
|
|
1558
|
-
if (proto.endRange) {
|
|
1559
|
-
m.endRange = new Date(proto.endRange);
|
|
1560
|
-
}
|
|
1561
1558
|
return m;
|
|
1562
1559
|
}
|
|
1563
1560
|
constructor(kwargs) {
|
|
@@ -1568,18 +1565,15 @@ class DateRangeFilter {
|
|
|
1568
1565
|
}
|
|
1569
1566
|
toApiJson() {
|
|
1570
1567
|
const toReturn = {};
|
|
1571
|
-
if (typeof this.
|
|
1572
|
-
toReturn['
|
|
1573
|
-
}
|
|
1574
|
-
if (typeof this.endRange !== 'undefined' && this.endRange !== null) {
|
|
1575
|
-
toReturn['endRange'] = 'toApiJson' in this.endRange ? this.endRange.toApiJson() : this.endRange;
|
|
1568
|
+
if (typeof this.generatedId !== 'undefined') {
|
|
1569
|
+
toReturn['generatedId'] = this.generatedId;
|
|
1576
1570
|
}
|
|
1577
1571
|
return toReturn;
|
|
1578
1572
|
}
|
|
1579
1573
|
}
|
|
1580
|
-
class
|
|
1574
|
+
class GetGeneratedCSVForPerformanceStatsResponse {
|
|
1581
1575
|
static fromProto(proto) {
|
|
1582
|
-
let m = new
|
|
1576
|
+
let m = new GetGeneratedCSVForPerformanceStatsResponse();
|
|
1583
1577
|
m = Object.assign(m, proto);
|
|
1584
1578
|
return m;
|
|
1585
1579
|
}
|
|
@@ -1591,21 +1585,15 @@ class DeleteHashtagsRequest {
|
|
|
1591
1585
|
}
|
|
1592
1586
|
toApiJson() {
|
|
1593
1587
|
const toReturn = {};
|
|
1594
|
-
if (typeof this.
|
|
1595
|
-
toReturn['
|
|
1596
|
-
}
|
|
1597
|
-
if (typeof this.businessId !== 'undefined') {
|
|
1598
|
-
toReturn['businessId'] = this.businessId;
|
|
1599
|
-
}
|
|
1600
|
-
if (typeof this.partnerId !== 'undefined') {
|
|
1601
|
-
toReturn['partnerId'] = this.partnerId;
|
|
1588
|
+
if (typeof this.url !== 'undefined') {
|
|
1589
|
+
toReturn['url'] = this.url;
|
|
1602
1590
|
}
|
|
1603
1591
|
return toReturn;
|
|
1604
1592
|
}
|
|
1605
1593
|
}
|
|
1606
|
-
class
|
|
1594
|
+
class GetMultiSocialPostStatsRequest {
|
|
1607
1595
|
static fromProto(proto) {
|
|
1608
|
-
let m = new
|
|
1596
|
+
let m = new GetMultiSocialPostStatsRequest();
|
|
1609
1597
|
m = Object.assign(m, proto);
|
|
1610
1598
|
return m;
|
|
1611
1599
|
}
|
|
@@ -1617,19 +1605,25 @@ class DeleteMultilocationPostRequest {
|
|
|
1617
1605
|
}
|
|
1618
1606
|
toApiJson() {
|
|
1619
1607
|
const toReturn = {};
|
|
1620
|
-
if (typeof this.
|
|
1621
|
-
toReturn['
|
|
1608
|
+
if (typeof this.internalPostIds !== 'undefined') {
|
|
1609
|
+
toReturn['internalPostIds'] = this.internalPostIds;
|
|
1622
1610
|
}
|
|
1623
|
-
if (typeof this.
|
|
1624
|
-
toReturn['
|
|
1611
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1612
|
+
toReturn['businessId'] = this.businessId;
|
|
1613
|
+
}
|
|
1614
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
1615
|
+
toReturn['partnerId'] = this.partnerId;
|
|
1625
1616
|
}
|
|
1626
1617
|
return toReturn;
|
|
1627
1618
|
}
|
|
1628
1619
|
}
|
|
1629
|
-
class
|
|
1620
|
+
class GetMultiSocialPostStatsResponse {
|
|
1630
1621
|
static fromProto(proto) {
|
|
1631
|
-
let m = new
|
|
1622
|
+
let m = new GetMultiSocialPostStatsResponse();
|
|
1632
1623
|
m = Object.assign(m, proto);
|
|
1624
|
+
if (proto.socialPostStats) {
|
|
1625
|
+
m.socialPostStats = proto.socialPostStats.map(SocialPostStats.fromProto);
|
|
1626
|
+
}
|
|
1633
1627
|
return m;
|
|
1634
1628
|
}
|
|
1635
1629
|
constructor(kwargs) {
|
|
@@ -1640,18 +1634,15 @@ class DeletePostTemplateRequest {
|
|
|
1640
1634
|
}
|
|
1641
1635
|
toApiJson() {
|
|
1642
1636
|
const toReturn = {};
|
|
1643
|
-
if (typeof this.
|
|
1644
|
-
toReturn['
|
|
1645
|
-
}
|
|
1646
|
-
if (typeof this.templateId !== 'undefined') {
|
|
1647
|
-
toReturn['templateId'] = this.templateId;
|
|
1637
|
+
if (typeof this.socialPostStats !== 'undefined' && this.socialPostStats !== null) {
|
|
1638
|
+
toReturn['socialPostStats'] = 'toApiJson' in this.socialPostStats ? this.socialPostStats.toApiJson() : this.socialPostStats;
|
|
1648
1639
|
}
|
|
1649
1640
|
return toReturn;
|
|
1650
1641
|
}
|
|
1651
1642
|
}
|
|
1652
|
-
class
|
|
1643
|
+
class GetMultiSocialPostsRequest {
|
|
1653
1644
|
static fromProto(proto) {
|
|
1654
|
-
let m = new
|
|
1645
|
+
let m = new GetMultiSocialPostsRequest();
|
|
1655
1646
|
m = Object.assign(m, proto);
|
|
1656
1647
|
return m;
|
|
1657
1648
|
}
|
|
@@ -1666,24 +1657,18 @@ class DeleteSocialPostRequest {
|
|
|
1666
1657
|
if (typeof this.businessId !== 'undefined') {
|
|
1667
1658
|
toReturn['businessId'] = this.businessId;
|
|
1668
1659
|
}
|
|
1669
|
-
if (typeof this.
|
|
1670
|
-
toReturn['
|
|
1660
|
+
if (typeof this.internalPostIds !== 'undefined') {
|
|
1661
|
+
toReturn['internalPostIds'] = this.internalPostIds;
|
|
1671
1662
|
}
|
|
1672
1663
|
return toReturn;
|
|
1673
1664
|
}
|
|
1674
1665
|
}
|
|
1675
|
-
class
|
|
1666
|
+
class GetMultiSocialPostsResponse {
|
|
1676
1667
|
static fromProto(proto) {
|
|
1677
|
-
let m = new
|
|
1668
|
+
let m = new GetMultiSocialPostsResponse();
|
|
1678
1669
|
m = Object.assign(m, proto);
|
|
1679
|
-
if (proto.
|
|
1680
|
-
m.
|
|
1681
|
-
}
|
|
1682
|
-
if (proto.fieldMask) {
|
|
1683
|
-
m.fieldMask = FieldMask.fromProto(proto.fieldMask);
|
|
1684
|
-
}
|
|
1685
|
-
if (proto.locations) {
|
|
1686
|
-
m.locations = proto.locations.map(Location.fromProto);
|
|
1670
|
+
if (proto.socialPosts) {
|
|
1671
|
+
m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
|
|
1687
1672
|
}
|
|
1688
1673
|
return m;
|
|
1689
1674
|
}
|
|
@@ -1695,46 +1680,16 @@ class EditMultilocationPostRequest {
|
|
|
1695
1680
|
}
|
|
1696
1681
|
toApiJson() {
|
|
1697
1682
|
const toReturn = {};
|
|
1698
|
-
if (typeof this.
|
|
1699
|
-
toReturn['
|
|
1700
|
-
}
|
|
1701
|
-
if (typeof this.multilocationId !== 'undefined') {
|
|
1702
|
-
toReturn['multilocationId'] = this.multilocationId;
|
|
1703
|
-
}
|
|
1704
|
-
if (typeof this.text !== 'undefined') {
|
|
1705
|
-
toReturn['text'] = this.text;
|
|
1706
|
-
}
|
|
1707
|
-
if (typeof this.media !== 'undefined') {
|
|
1708
|
-
toReturn['media'] = this.media;
|
|
1709
|
-
}
|
|
1710
|
-
if (typeof this.scheduledDate !== 'undefined' && this.scheduledDate !== null) {
|
|
1711
|
-
toReturn['scheduledDate'] = 'toApiJson' in this.scheduledDate ? this.scheduledDate.toApiJson() : this.scheduledDate;
|
|
1712
|
-
}
|
|
1713
|
-
if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
|
|
1714
|
-
toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
|
|
1715
|
-
}
|
|
1716
|
-
if (typeof this.gifs !== 'undefined') {
|
|
1717
|
-
toReturn['gifs'] = this.gifs;
|
|
1718
|
-
}
|
|
1719
|
-
if (typeof this.videos !== 'undefined') {
|
|
1720
|
-
toReturn['videos'] = this.videos;
|
|
1721
|
-
}
|
|
1722
|
-
if (typeof this.locations !== 'undefined' && this.locations !== null) {
|
|
1723
|
-
toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
|
|
1683
|
+
if (typeof this.socialPosts !== 'undefined' && this.socialPosts !== null) {
|
|
1684
|
+
toReturn['socialPosts'] = 'toApiJson' in this.socialPosts ? this.socialPosts.toApiJson() : this.socialPosts;
|
|
1724
1685
|
}
|
|
1725
1686
|
return toReturn;
|
|
1726
1687
|
}
|
|
1727
1688
|
}
|
|
1728
|
-
class
|
|
1689
|
+
class GetMultilocationPostRequest {
|
|
1729
1690
|
static fromProto(proto) {
|
|
1730
|
-
let m = new
|
|
1691
|
+
let m = new GetMultilocationPostRequest();
|
|
1731
1692
|
m = Object.assign(m, proto);
|
|
1732
|
-
if (proto.post) {
|
|
1733
|
-
m.post = MultilocationPost.fromProto(proto.post);
|
|
1734
|
-
}
|
|
1735
|
-
if (proto.errors) {
|
|
1736
|
-
m.errors = proto.errors.map(MultilocationPostError.fromProto);
|
|
1737
|
-
}
|
|
1738
1693
|
return m;
|
|
1739
1694
|
}
|
|
1740
1695
|
constructor(kwargs) {
|
|
@@ -1745,21 +1700,21 @@ class EditMultilocationPostResponse {
|
|
|
1745
1700
|
}
|
|
1746
1701
|
toApiJson() {
|
|
1747
1702
|
const toReturn = {};
|
|
1748
|
-
if (typeof this.
|
|
1749
|
-
toReturn['
|
|
1703
|
+
if (typeof this.brandId !== 'undefined') {
|
|
1704
|
+
toReturn['brandId'] = this.brandId;
|
|
1750
1705
|
}
|
|
1751
|
-
if (typeof this.
|
|
1752
|
-
toReturn['
|
|
1706
|
+
if (typeof this.multilocationId !== 'undefined') {
|
|
1707
|
+
toReturn['multilocationId'] = this.multilocationId;
|
|
1753
1708
|
}
|
|
1754
1709
|
return toReturn;
|
|
1755
1710
|
}
|
|
1756
1711
|
}
|
|
1757
|
-
class
|
|
1712
|
+
class GetMultilocationPostResponse {
|
|
1758
1713
|
static fromProto(proto) {
|
|
1759
|
-
let m = new
|
|
1714
|
+
let m = new GetMultilocationPostResponse();
|
|
1760
1715
|
m = Object.assign(m, proto);
|
|
1761
|
-
if (proto.
|
|
1762
|
-
m.
|
|
1716
|
+
if (proto.multilocationPost) {
|
|
1717
|
+
m.multilocationPost = MultilocationPost.fromProto(proto.multilocationPost);
|
|
1763
1718
|
}
|
|
1764
1719
|
return m;
|
|
1765
1720
|
}
|
|
@@ -1771,22 +1726,16 @@ class PartnerListScheduledSocialPostsRequestFilters {
|
|
|
1771
1726
|
}
|
|
1772
1727
|
toApiJson() {
|
|
1773
1728
|
const toReturn = {};
|
|
1774
|
-
if (typeof this.
|
|
1775
|
-
toReturn['
|
|
1776
|
-
}
|
|
1777
|
-
if (typeof this.partnerId !== 'undefined') {
|
|
1778
|
-
toReturn['partnerId'] = this.partnerId;
|
|
1729
|
+
if (typeof this.multilocationPost !== 'undefined' && this.multilocationPost !== null) {
|
|
1730
|
+
toReturn['multilocationPost'] = 'toApiJson' in this.multilocationPost ? this.multilocationPost.toApiJson() : this.multilocationPost;
|
|
1779
1731
|
}
|
|
1780
1732
|
return toReturn;
|
|
1781
1733
|
}
|
|
1782
1734
|
}
|
|
1783
|
-
class
|
|
1735
|
+
class GetPostTemplateRequest {
|
|
1784
1736
|
static fromProto(proto) {
|
|
1785
|
-
let m = new
|
|
1737
|
+
let m = new GetPostTemplateRequest();
|
|
1786
1738
|
m = Object.assign(m, proto);
|
|
1787
|
-
if (proto.postData) {
|
|
1788
|
-
m.postData = proto.postData.map(PostData.fromProto);
|
|
1789
|
-
}
|
|
1790
1739
|
return m;
|
|
1791
1740
|
}
|
|
1792
1741
|
constructor(kwargs) {
|
|
@@ -1797,22 +1746,22 @@ class GenerateCSVForPerformanceStatsRequest {
|
|
|
1797
1746
|
}
|
|
1798
1747
|
toApiJson() {
|
|
1799
1748
|
const toReturn = {};
|
|
1800
|
-
if (typeof this.
|
|
1801
|
-
toReturn['
|
|
1802
|
-
}
|
|
1803
|
-
if (typeof this.postData !== 'undefined' && this.postData !== null) {
|
|
1804
|
-
toReturn['postData'] = 'toApiJson' in this.postData ? this.postData.toApiJson() : this.postData;
|
|
1749
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
1750
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
1805
1751
|
}
|
|
1806
|
-
if (typeof this.
|
|
1807
|
-
toReturn['
|
|
1752
|
+
if (typeof this.templateId !== 'undefined') {
|
|
1753
|
+
toReturn['templateId'] = this.templateId;
|
|
1808
1754
|
}
|
|
1809
1755
|
return toReturn;
|
|
1810
1756
|
}
|
|
1811
1757
|
}
|
|
1812
|
-
class
|
|
1758
|
+
class GetPostTemplateResponse {
|
|
1813
1759
|
static fromProto(proto) {
|
|
1814
|
-
let m = new
|
|
1760
|
+
let m = new GetPostTemplateResponse();
|
|
1815
1761
|
m = Object.assign(m, proto);
|
|
1762
|
+
if (proto.postTemplate) {
|
|
1763
|
+
m.postTemplate = PostTemplate.fromProto(proto.postTemplate);
|
|
1764
|
+
}
|
|
1816
1765
|
return m;
|
|
1817
1766
|
}
|
|
1818
1767
|
constructor(kwargs) {
|
|
@@ -1823,242 +1772,15 @@ class GenerateCSVForPerformanceStatsResponse {
|
|
|
1823
1772
|
}
|
|
1824
1773
|
toApiJson() {
|
|
1825
1774
|
const toReturn = {};
|
|
1826
|
-
if (typeof this.
|
|
1827
|
-
toReturn['
|
|
1775
|
+
if (typeof this.postTemplate !== 'undefined' && this.postTemplate !== null) {
|
|
1776
|
+
toReturn['postTemplate'] = 'toApiJson' in this.postTemplate ? this.postTemplate.toApiJson() : this.postTemplate;
|
|
1828
1777
|
}
|
|
1829
1778
|
return toReturn;
|
|
1830
1779
|
}
|
|
1831
1780
|
}
|
|
1832
|
-
class
|
|
1781
|
+
class GetScheduledPostCountRequest {
|
|
1833
1782
|
static fromProto(proto) {
|
|
1834
|
-
let m = new
|
|
1835
|
-
m = Object.assign(m, proto);
|
|
1836
|
-
return m;
|
|
1837
|
-
}
|
|
1838
|
-
constructor(kwargs) {
|
|
1839
|
-
if (!kwargs) {
|
|
1840
|
-
return;
|
|
1841
|
-
}
|
|
1842
|
-
Object.assign(this, kwargs);
|
|
1843
|
-
}
|
|
1844
|
-
toApiJson() {
|
|
1845
|
-
const toReturn = {};
|
|
1846
|
-
if (typeof this.generatedId !== 'undefined') {
|
|
1847
|
-
toReturn['generatedId'] = this.generatedId;
|
|
1848
|
-
}
|
|
1849
|
-
return toReturn;
|
|
1850
|
-
}
|
|
1851
|
-
}
|
|
1852
|
-
class GetGeneratedCSVForPerformanceStatsResponse {
|
|
1853
|
-
static fromProto(proto) {
|
|
1854
|
-
let m = new GetGeneratedCSVForPerformanceStatsResponse();
|
|
1855
|
-
m = Object.assign(m, proto);
|
|
1856
|
-
return m;
|
|
1857
|
-
}
|
|
1858
|
-
constructor(kwargs) {
|
|
1859
|
-
if (!kwargs) {
|
|
1860
|
-
return;
|
|
1861
|
-
}
|
|
1862
|
-
Object.assign(this, kwargs);
|
|
1863
|
-
}
|
|
1864
|
-
toApiJson() {
|
|
1865
|
-
const toReturn = {};
|
|
1866
|
-
if (typeof this.url !== 'undefined') {
|
|
1867
|
-
toReturn['url'] = this.url;
|
|
1868
|
-
}
|
|
1869
|
-
return toReturn;
|
|
1870
|
-
}
|
|
1871
|
-
}
|
|
1872
|
-
class GetMultiSocialPostStatsRequest {
|
|
1873
|
-
static fromProto(proto) {
|
|
1874
|
-
let m = new GetMultiSocialPostStatsRequest();
|
|
1875
|
-
m = Object.assign(m, proto);
|
|
1876
|
-
return m;
|
|
1877
|
-
}
|
|
1878
|
-
constructor(kwargs) {
|
|
1879
|
-
if (!kwargs) {
|
|
1880
|
-
return;
|
|
1881
|
-
}
|
|
1882
|
-
Object.assign(this, kwargs);
|
|
1883
|
-
}
|
|
1884
|
-
toApiJson() {
|
|
1885
|
-
const toReturn = {};
|
|
1886
|
-
if (typeof this.internalPostIds !== 'undefined') {
|
|
1887
|
-
toReturn['internalPostIds'] = this.internalPostIds;
|
|
1888
|
-
}
|
|
1889
|
-
if (typeof this.businessId !== 'undefined') {
|
|
1890
|
-
toReturn['businessId'] = this.businessId;
|
|
1891
|
-
}
|
|
1892
|
-
if (typeof this.partnerId !== 'undefined') {
|
|
1893
|
-
toReturn['partnerId'] = this.partnerId;
|
|
1894
|
-
}
|
|
1895
|
-
return toReturn;
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1898
|
-
class GetMultiSocialPostStatsResponse {
|
|
1899
|
-
static fromProto(proto) {
|
|
1900
|
-
let m = new GetMultiSocialPostStatsResponse();
|
|
1901
|
-
m = Object.assign(m, proto);
|
|
1902
|
-
if (proto.socialPostStats) {
|
|
1903
|
-
m.socialPostStats = proto.socialPostStats.map(SocialPostStats.fromProto);
|
|
1904
|
-
}
|
|
1905
|
-
return m;
|
|
1906
|
-
}
|
|
1907
|
-
constructor(kwargs) {
|
|
1908
|
-
if (!kwargs) {
|
|
1909
|
-
return;
|
|
1910
|
-
}
|
|
1911
|
-
Object.assign(this, kwargs);
|
|
1912
|
-
}
|
|
1913
|
-
toApiJson() {
|
|
1914
|
-
const toReturn = {};
|
|
1915
|
-
if (typeof this.socialPostStats !== 'undefined' && this.socialPostStats !== null) {
|
|
1916
|
-
toReturn['socialPostStats'] = 'toApiJson' in this.socialPostStats ? this.socialPostStats.toApiJson() : this.socialPostStats;
|
|
1917
|
-
}
|
|
1918
|
-
return toReturn;
|
|
1919
|
-
}
|
|
1920
|
-
}
|
|
1921
|
-
class GetMultiSocialPostsRequest {
|
|
1922
|
-
static fromProto(proto) {
|
|
1923
|
-
let m = new GetMultiSocialPostsRequest();
|
|
1924
|
-
m = Object.assign(m, proto);
|
|
1925
|
-
return m;
|
|
1926
|
-
}
|
|
1927
|
-
constructor(kwargs) {
|
|
1928
|
-
if (!kwargs) {
|
|
1929
|
-
return;
|
|
1930
|
-
}
|
|
1931
|
-
Object.assign(this, kwargs);
|
|
1932
|
-
}
|
|
1933
|
-
toApiJson() {
|
|
1934
|
-
const toReturn = {};
|
|
1935
|
-
if (typeof this.businessId !== 'undefined') {
|
|
1936
|
-
toReturn['businessId'] = this.businessId;
|
|
1937
|
-
}
|
|
1938
|
-
if (typeof this.internalPostIds !== 'undefined') {
|
|
1939
|
-
toReturn['internalPostIds'] = this.internalPostIds;
|
|
1940
|
-
}
|
|
1941
|
-
return toReturn;
|
|
1942
|
-
}
|
|
1943
|
-
}
|
|
1944
|
-
class GetMultiSocialPostsResponse {
|
|
1945
|
-
static fromProto(proto) {
|
|
1946
|
-
let m = new GetMultiSocialPostsResponse();
|
|
1947
|
-
m = Object.assign(m, proto);
|
|
1948
|
-
if (proto.socialPosts) {
|
|
1949
|
-
m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
|
|
1950
|
-
}
|
|
1951
|
-
return m;
|
|
1952
|
-
}
|
|
1953
|
-
constructor(kwargs) {
|
|
1954
|
-
if (!kwargs) {
|
|
1955
|
-
return;
|
|
1956
|
-
}
|
|
1957
|
-
Object.assign(this, kwargs);
|
|
1958
|
-
}
|
|
1959
|
-
toApiJson() {
|
|
1960
|
-
const toReturn = {};
|
|
1961
|
-
if (typeof this.socialPosts !== 'undefined' && this.socialPosts !== null) {
|
|
1962
|
-
toReturn['socialPosts'] = 'toApiJson' in this.socialPosts ? this.socialPosts.toApiJson() : this.socialPosts;
|
|
1963
|
-
}
|
|
1964
|
-
return toReturn;
|
|
1965
|
-
}
|
|
1966
|
-
}
|
|
1967
|
-
class GetMultilocationPostRequest {
|
|
1968
|
-
static fromProto(proto) {
|
|
1969
|
-
let m = new GetMultilocationPostRequest();
|
|
1970
|
-
m = Object.assign(m, proto);
|
|
1971
|
-
return m;
|
|
1972
|
-
}
|
|
1973
|
-
constructor(kwargs) {
|
|
1974
|
-
if (!kwargs) {
|
|
1975
|
-
return;
|
|
1976
|
-
}
|
|
1977
|
-
Object.assign(this, kwargs);
|
|
1978
|
-
}
|
|
1979
|
-
toApiJson() {
|
|
1980
|
-
const toReturn = {};
|
|
1981
|
-
if (typeof this.brandId !== 'undefined') {
|
|
1982
|
-
toReturn['brandId'] = this.brandId;
|
|
1983
|
-
}
|
|
1984
|
-
if (typeof this.multilocationId !== 'undefined') {
|
|
1985
|
-
toReturn['multilocationId'] = this.multilocationId;
|
|
1986
|
-
}
|
|
1987
|
-
return toReturn;
|
|
1988
|
-
}
|
|
1989
|
-
}
|
|
1990
|
-
class GetMultilocationPostResponse {
|
|
1991
|
-
static fromProto(proto) {
|
|
1992
|
-
let m = new GetMultilocationPostResponse();
|
|
1993
|
-
m = Object.assign(m, proto);
|
|
1994
|
-
if (proto.multilocationPost) {
|
|
1995
|
-
m.multilocationPost = MultilocationPost.fromProto(proto.multilocationPost);
|
|
1996
|
-
}
|
|
1997
|
-
return m;
|
|
1998
|
-
}
|
|
1999
|
-
constructor(kwargs) {
|
|
2000
|
-
if (!kwargs) {
|
|
2001
|
-
return;
|
|
2002
|
-
}
|
|
2003
|
-
Object.assign(this, kwargs);
|
|
2004
|
-
}
|
|
2005
|
-
toApiJson() {
|
|
2006
|
-
const toReturn = {};
|
|
2007
|
-
if (typeof this.multilocationPost !== 'undefined' && this.multilocationPost !== null) {
|
|
2008
|
-
toReturn['multilocationPost'] = 'toApiJson' in this.multilocationPost ? this.multilocationPost.toApiJson() : this.multilocationPost;
|
|
2009
|
-
}
|
|
2010
|
-
return toReturn;
|
|
2011
|
-
}
|
|
2012
|
-
}
|
|
2013
|
-
class GetPostTemplateRequest {
|
|
2014
|
-
static fromProto(proto) {
|
|
2015
|
-
let m = new GetPostTemplateRequest();
|
|
2016
|
-
m = Object.assign(m, proto);
|
|
2017
|
-
return m;
|
|
2018
|
-
}
|
|
2019
|
-
constructor(kwargs) {
|
|
2020
|
-
if (!kwargs) {
|
|
2021
|
-
return;
|
|
2022
|
-
}
|
|
2023
|
-
Object.assign(this, kwargs);
|
|
2024
|
-
}
|
|
2025
|
-
toApiJson() {
|
|
2026
|
-
const toReturn = {};
|
|
2027
|
-
if (typeof this.accountGroupId !== 'undefined') {
|
|
2028
|
-
toReturn['accountGroupId'] = this.accountGroupId;
|
|
2029
|
-
}
|
|
2030
|
-
if (typeof this.templateId !== 'undefined') {
|
|
2031
|
-
toReturn['templateId'] = this.templateId;
|
|
2032
|
-
}
|
|
2033
|
-
return toReturn;
|
|
2034
|
-
}
|
|
2035
|
-
}
|
|
2036
|
-
class GetPostTemplateResponse {
|
|
2037
|
-
static fromProto(proto) {
|
|
2038
|
-
let m = new GetPostTemplateResponse();
|
|
2039
|
-
m = Object.assign(m, proto);
|
|
2040
|
-
if (proto.postTemplate) {
|
|
2041
|
-
m.postTemplate = PostTemplate.fromProto(proto.postTemplate);
|
|
2042
|
-
}
|
|
2043
|
-
return m;
|
|
2044
|
-
}
|
|
2045
|
-
constructor(kwargs) {
|
|
2046
|
-
if (!kwargs) {
|
|
2047
|
-
return;
|
|
2048
|
-
}
|
|
2049
|
-
Object.assign(this, kwargs);
|
|
2050
|
-
}
|
|
2051
|
-
toApiJson() {
|
|
2052
|
-
const toReturn = {};
|
|
2053
|
-
if (typeof this.postTemplate !== 'undefined' && this.postTemplate !== null) {
|
|
2054
|
-
toReturn['postTemplate'] = 'toApiJson' in this.postTemplate ? this.postTemplate.toApiJson() : this.postTemplate;
|
|
2055
|
-
}
|
|
2056
|
-
return toReturn;
|
|
2057
|
-
}
|
|
2058
|
-
}
|
|
2059
|
-
class GetScheduledPostCountRequest {
|
|
2060
|
-
static fromProto(proto) {
|
|
2061
|
-
let m = new GetScheduledPostCountRequest();
|
|
1783
|
+
let m = new GetScheduledPostCountRequest();
|
|
2062
1784
|
m = Object.assign(m, proto);
|
|
2063
1785
|
return m;
|
|
2064
1786
|
}
|
|
@@ -2662,7 +2384,7 @@ class RemoveFromMultilocationPostRequest {
|
|
|
2662
2384
|
let m = new RemoveFromMultilocationPostRequest();
|
|
2663
2385
|
m = Object.assign(m, proto);
|
|
2664
2386
|
if (proto.reason) {
|
|
2665
|
-
m.reason = enumStringToValue$
|
|
2387
|
+
m.reason = enumStringToValue$3(RemoveReason, proto.reason);
|
|
2666
2388
|
}
|
|
2667
2389
|
if (proto.locations) {
|
|
2668
2390
|
m.locations = proto.locations.map(Location.fromProto);
|
|
@@ -2709,22 +2431,317 @@ class ReplaceHashtagsRequest {
|
|
|
2709
2431
|
if (typeof this.keyword !== 'undefined') {
|
|
2710
2432
|
toReturn['keyword'] = this.keyword;
|
|
2711
2433
|
}
|
|
2712
|
-
if (typeof this.businessId !== 'undefined') {
|
|
2713
|
-
toReturn['businessId'] = this.businessId;
|
|
2434
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2435
|
+
toReturn['businessId'] = this.businessId;
|
|
2436
|
+
}
|
|
2437
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
2438
|
+
toReturn['partnerId'] = this.partnerId;
|
|
2439
|
+
}
|
|
2440
|
+
return toReturn;
|
|
2441
|
+
}
|
|
2442
|
+
}
|
|
2443
|
+
class SchedulePostRequest {
|
|
2444
|
+
static fromProto(proto) {
|
|
2445
|
+
let m = new SchedulePostRequest();
|
|
2446
|
+
m = Object.assign(m, proto);
|
|
2447
|
+
if (proto.socialPost) {
|
|
2448
|
+
m.socialPost = SocialPostData.fromProto(proto.socialPost);
|
|
2449
|
+
}
|
|
2450
|
+
return m;
|
|
2451
|
+
}
|
|
2452
|
+
constructor(kwargs) {
|
|
2453
|
+
if (!kwargs) {
|
|
2454
|
+
return;
|
|
2455
|
+
}
|
|
2456
|
+
Object.assign(this, kwargs);
|
|
2457
|
+
}
|
|
2458
|
+
toApiJson() {
|
|
2459
|
+
const toReturn = {};
|
|
2460
|
+
if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
|
|
2461
|
+
toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
|
|
2462
|
+
}
|
|
2463
|
+
if (typeof this.socialServiceIds !== 'undefined') {
|
|
2464
|
+
toReturn['socialServiceIds'] = this.socialServiceIds;
|
|
2465
|
+
}
|
|
2466
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
2467
|
+
toReturn['partnerId'] = this.partnerId;
|
|
2468
|
+
}
|
|
2469
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2470
|
+
toReturn['businessId'] = this.businessId;
|
|
2471
|
+
}
|
|
2472
|
+
return toReturn;
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
class SchedulePostResponse {
|
|
2476
|
+
static fromProto(proto) {
|
|
2477
|
+
let m = new SchedulePostResponse();
|
|
2478
|
+
m = Object.assign(m, proto);
|
|
2479
|
+
if (proto.statuses) {
|
|
2480
|
+
m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
|
|
2481
|
+
}
|
|
2482
|
+
return m;
|
|
2483
|
+
}
|
|
2484
|
+
constructor(kwargs) {
|
|
2485
|
+
if (!kwargs) {
|
|
2486
|
+
return;
|
|
2487
|
+
}
|
|
2488
|
+
Object.assign(this, kwargs);
|
|
2489
|
+
}
|
|
2490
|
+
toApiJson() {
|
|
2491
|
+
const toReturn = {};
|
|
2492
|
+
if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
|
|
2493
|
+
toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
|
|
2494
|
+
}
|
|
2495
|
+
return toReturn;
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2498
|
+
class ScheduleToAllPagesRequest {
|
|
2499
|
+
static fromProto(proto) {
|
|
2500
|
+
let m = new ScheduleToAllPagesRequest();
|
|
2501
|
+
m = Object.assign(m, proto);
|
|
2502
|
+
if (proto.socialPost) {
|
|
2503
|
+
m.socialPost = SocialPostData.fromProto(proto.socialPost);
|
|
2504
|
+
}
|
|
2505
|
+
return m;
|
|
2506
|
+
}
|
|
2507
|
+
constructor(kwargs) {
|
|
2508
|
+
if (!kwargs) {
|
|
2509
|
+
return;
|
|
2510
|
+
}
|
|
2511
|
+
Object.assign(this, kwargs);
|
|
2512
|
+
}
|
|
2513
|
+
toApiJson() {
|
|
2514
|
+
const toReturn = {};
|
|
2515
|
+
if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
|
|
2516
|
+
toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
|
|
2517
|
+
}
|
|
2518
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
2519
|
+
toReturn['partnerId'] = this.partnerId;
|
|
2520
|
+
}
|
|
2521
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2522
|
+
toReturn['businessId'] = this.businessId;
|
|
2523
|
+
}
|
|
2524
|
+
return toReturn;
|
|
2525
|
+
}
|
|
2526
|
+
}
|
|
2527
|
+
class ScheduleToAllPagesResponse {
|
|
2528
|
+
static fromProto(proto) {
|
|
2529
|
+
let m = new ScheduleToAllPagesResponse();
|
|
2530
|
+
m = Object.assign(m, proto);
|
|
2531
|
+
if (proto.statuses) {
|
|
2532
|
+
m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
|
|
2533
|
+
}
|
|
2534
|
+
return m;
|
|
2535
|
+
}
|
|
2536
|
+
constructor(kwargs) {
|
|
2537
|
+
if (!kwargs) {
|
|
2538
|
+
return;
|
|
2539
|
+
}
|
|
2540
|
+
Object.assign(this, kwargs);
|
|
2541
|
+
}
|
|
2542
|
+
toApiJson() {
|
|
2543
|
+
const toReturn = {};
|
|
2544
|
+
if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
|
|
2545
|
+
toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
|
|
2546
|
+
}
|
|
2547
|
+
return toReturn;
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
class SearchHashtagRequest {
|
|
2551
|
+
static fromProto(proto) {
|
|
2552
|
+
let m = new SearchHashtagRequest();
|
|
2553
|
+
m = Object.assign(m, proto);
|
|
2554
|
+
if (proto.limit) {
|
|
2555
|
+
m.limit = parseInt(proto.limit, 10);
|
|
2556
|
+
}
|
|
2557
|
+
return m;
|
|
2558
|
+
}
|
|
2559
|
+
constructor(kwargs) {
|
|
2560
|
+
if (!kwargs) {
|
|
2561
|
+
return;
|
|
2562
|
+
}
|
|
2563
|
+
Object.assign(this, kwargs);
|
|
2564
|
+
}
|
|
2565
|
+
toApiJson() {
|
|
2566
|
+
const toReturn = {};
|
|
2567
|
+
if (typeof this.searchTerm !== 'undefined') {
|
|
2568
|
+
toReturn['searchTerm'] = this.searchTerm;
|
|
2569
|
+
}
|
|
2570
|
+
if (typeof this.limit !== 'undefined') {
|
|
2571
|
+
toReturn['limit'] = this.limit;
|
|
2572
|
+
}
|
|
2573
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2574
|
+
toReturn['businessId'] = this.businessId;
|
|
2575
|
+
}
|
|
2576
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
2577
|
+
toReturn['partnerId'] = this.partnerId;
|
|
2578
|
+
}
|
|
2579
|
+
return toReturn;
|
|
2580
|
+
}
|
|
2581
|
+
}
|
|
2582
|
+
class SearchHashtagResponse {
|
|
2583
|
+
static fromProto(proto) {
|
|
2584
|
+
let m = new SearchHashtagResponse();
|
|
2585
|
+
m = Object.assign(m, proto);
|
|
2586
|
+
if (proto.hashtags) {
|
|
2587
|
+
m.hashtags = proto.hashtags.map(Hashtag.fromProto);
|
|
2588
|
+
}
|
|
2589
|
+
return m;
|
|
2590
|
+
}
|
|
2591
|
+
constructor(kwargs) {
|
|
2592
|
+
if (!kwargs) {
|
|
2593
|
+
return;
|
|
2594
|
+
}
|
|
2595
|
+
Object.assign(this, kwargs);
|
|
2596
|
+
}
|
|
2597
|
+
toApiJson() {
|
|
2598
|
+
const toReturn = {};
|
|
2599
|
+
if (typeof this.hashtags !== 'undefined' && this.hashtags !== null) {
|
|
2600
|
+
toReturn['hashtags'] = 'toApiJson' in this.hashtags ? this.hashtags.toApiJson() : this.hashtags;
|
|
2601
|
+
}
|
|
2602
|
+
return toReturn;
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2605
|
+
class SuggestMessageRequest {
|
|
2606
|
+
static fromProto(proto) {
|
|
2607
|
+
let m = new SuggestMessageRequest();
|
|
2608
|
+
m = Object.assign(m, proto);
|
|
2609
|
+
if (proto.length) {
|
|
2610
|
+
m.length = enumStringToValue$3(MessageLength, proto.length);
|
|
2611
|
+
}
|
|
2612
|
+
if (proto.type) {
|
|
2613
|
+
m.type = enumStringToValue$3(TemplateType, proto.type);
|
|
2614
|
+
}
|
|
2615
|
+
return m;
|
|
2616
|
+
}
|
|
2617
|
+
constructor(kwargs) {
|
|
2618
|
+
if (!kwargs) {
|
|
2619
|
+
return;
|
|
2620
|
+
}
|
|
2621
|
+
Object.assign(this, kwargs);
|
|
2622
|
+
}
|
|
2623
|
+
toApiJson() {
|
|
2624
|
+
const toReturn = {};
|
|
2625
|
+
if (typeof this.prompt !== 'undefined') {
|
|
2626
|
+
toReturn['prompt'] = this.prompt;
|
|
2627
|
+
}
|
|
2628
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2629
|
+
toReturn['businessId'] = this.businessId;
|
|
2630
|
+
}
|
|
2631
|
+
if (typeof this.length !== 'undefined') {
|
|
2632
|
+
toReturn['length'] = this.length;
|
|
2633
|
+
}
|
|
2634
|
+
if (typeof this.type !== 'undefined') {
|
|
2635
|
+
toReturn['type'] = this.type;
|
|
2636
|
+
}
|
|
2637
|
+
return toReturn;
|
|
2638
|
+
}
|
|
2639
|
+
}
|
|
2640
|
+
class SuggestMessageResponse {
|
|
2641
|
+
static fromProto(proto) {
|
|
2642
|
+
let m = new SuggestMessageResponse();
|
|
2643
|
+
m = Object.assign(m, proto);
|
|
2644
|
+
return m;
|
|
2645
|
+
}
|
|
2646
|
+
constructor(kwargs) {
|
|
2647
|
+
if (!kwargs) {
|
|
2648
|
+
return;
|
|
2649
|
+
}
|
|
2650
|
+
Object.assign(this, kwargs);
|
|
2651
|
+
}
|
|
2652
|
+
toApiJson() {
|
|
2653
|
+
const toReturn = {};
|
|
2654
|
+
if (typeof this.message !== 'undefined') {
|
|
2655
|
+
toReturn['message'] = this.message;
|
|
2656
|
+
}
|
|
2657
|
+
return toReturn;
|
|
2658
|
+
}
|
|
2659
|
+
}
|
|
2660
|
+
class UpdatePostTemplateRequest {
|
|
2661
|
+
static fromProto(proto) {
|
|
2662
|
+
let m = new UpdatePostTemplateRequest();
|
|
2663
|
+
m = Object.assign(m, proto);
|
|
2664
|
+
if (proto.postDateTime) {
|
|
2665
|
+
m.postDateTime = new Date(proto.postDateTime);
|
|
2666
|
+
}
|
|
2667
|
+
if (proto.mediaEntries) {
|
|
2668
|
+
m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
|
|
2669
|
+
}
|
|
2670
|
+
if (proto.metaData) {
|
|
2671
|
+
m.metaData = proto.metaData.map(MetaData.fromProto);
|
|
2672
|
+
}
|
|
2673
|
+
if (proto.postType) {
|
|
2674
|
+
m.postType = enumStringToValue$3(PostType, proto.postType);
|
|
2675
|
+
}
|
|
2676
|
+
return m;
|
|
2677
|
+
}
|
|
2678
|
+
constructor(kwargs) {
|
|
2679
|
+
if (!kwargs) {
|
|
2680
|
+
return;
|
|
2681
|
+
}
|
|
2682
|
+
Object.assign(this, kwargs);
|
|
2683
|
+
}
|
|
2684
|
+
toApiJson() {
|
|
2685
|
+
const toReturn = {};
|
|
2686
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
2687
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
2688
|
+
}
|
|
2689
|
+
if (typeof this.templateId !== 'undefined') {
|
|
2690
|
+
toReturn['templateId'] = this.templateId;
|
|
2691
|
+
}
|
|
2692
|
+
if (typeof this.title !== 'undefined') {
|
|
2693
|
+
toReturn['title'] = this.title;
|
|
2694
|
+
}
|
|
2695
|
+
if (typeof this.postText !== 'undefined') {
|
|
2696
|
+
toReturn['postText'] = this.postText;
|
|
2697
|
+
}
|
|
2698
|
+
if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
|
|
2699
|
+
toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
|
|
2700
|
+
}
|
|
2701
|
+
if (typeof this.gmbPostCustomization !== 'undefined') {
|
|
2702
|
+
toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
|
|
2703
|
+
}
|
|
2704
|
+
if (typeof this.imageUrl !== 'undefined') {
|
|
2705
|
+
toReturn['imageUrl'] = this.imageUrl;
|
|
2706
|
+
}
|
|
2707
|
+
if (typeof this.imagePath !== 'undefined') {
|
|
2708
|
+
toReturn['imagePath'] = this.imagePath;
|
|
2709
|
+
}
|
|
2710
|
+
if (typeof this.imageSize !== 'undefined') {
|
|
2711
|
+
toReturn['imageSize'] = this.imageSize;
|
|
2712
|
+
}
|
|
2713
|
+
if (typeof this.previews !== 'undefined') {
|
|
2714
|
+
toReturn['previews'] = this.previews;
|
|
2715
|
+
}
|
|
2716
|
+
if (typeof this.options !== 'undefined') {
|
|
2717
|
+
toReturn['options'] = this.options;
|
|
2718
|
+
}
|
|
2719
|
+
if (typeof this.videoUrl !== 'undefined') {
|
|
2720
|
+
toReturn['videoUrl'] = this.videoUrl;
|
|
2714
2721
|
}
|
|
2715
|
-
if (typeof this.
|
|
2716
|
-
toReturn['
|
|
2722
|
+
if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
|
|
2723
|
+
toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
|
|
2724
|
+
}
|
|
2725
|
+
if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
|
|
2726
|
+
toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
|
|
2727
|
+
}
|
|
2728
|
+
if (typeof this.postType !== 'undefined') {
|
|
2729
|
+
toReturn['postType'] = this.postType;
|
|
2717
2730
|
}
|
|
2718
2731
|
return toReturn;
|
|
2719
2732
|
}
|
|
2720
2733
|
}
|
|
2721
|
-
|
|
2734
|
+
|
|
2735
|
+
function enumStringToValue$2(enumRef, value) {
|
|
2736
|
+
if (typeof value === 'number') {
|
|
2737
|
+
return value;
|
|
2738
|
+
}
|
|
2739
|
+
return enumRef[value];
|
|
2740
|
+
}
|
|
2741
|
+
class LinkV2 {
|
|
2722
2742
|
static fromProto(proto) {
|
|
2723
|
-
let m = new
|
|
2743
|
+
let m = new LinkV2();
|
|
2724
2744
|
m = Object.assign(m, proto);
|
|
2725
|
-
if (proto.socialPost) {
|
|
2726
|
-
m.socialPost = SocialPostData.fromProto(proto.socialPost);
|
|
2727
|
-
}
|
|
2728
2745
|
return m;
|
|
2729
2746
|
}
|
|
2730
2747
|
constructor(kwargs) {
|
|
@@ -2735,51 +2752,31 @@ class SchedulePostRequest {
|
|
|
2735
2752
|
}
|
|
2736
2753
|
toApiJson() {
|
|
2737
2754
|
const toReturn = {};
|
|
2738
|
-
if (typeof this.
|
|
2739
|
-
toReturn['
|
|
2740
|
-
}
|
|
2741
|
-
if (typeof this.socialServiceIds !== 'undefined') {
|
|
2742
|
-
toReturn['socialServiceIds'] = this.socialServiceIds;
|
|
2755
|
+
if (typeof this.name !== 'undefined') {
|
|
2756
|
+
toReturn['name'] = this.name;
|
|
2743
2757
|
}
|
|
2744
|
-
if (typeof this.
|
|
2745
|
-
toReturn['
|
|
2758
|
+
if (typeof this.picture !== 'undefined') {
|
|
2759
|
+
toReturn['picture'] = this.picture;
|
|
2746
2760
|
}
|
|
2747
|
-
if (typeof this.
|
|
2748
|
-
toReturn['
|
|
2761
|
+
if (typeof this.description !== 'undefined') {
|
|
2762
|
+
toReturn['description'] = this.description;
|
|
2749
2763
|
}
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
}
|
|
2753
|
-
class SchedulePostResponse {
|
|
2754
|
-
static fromProto(proto) {
|
|
2755
|
-
let m = new SchedulePostResponse();
|
|
2756
|
-
m = Object.assign(m, proto);
|
|
2757
|
-
if (proto.statuses) {
|
|
2758
|
-
m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
|
|
2764
|
+
if (typeof this.title !== 'undefined') {
|
|
2765
|
+
toReturn['title'] = this.title;
|
|
2759
2766
|
}
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
constructor(kwargs) {
|
|
2763
|
-
if (!kwargs) {
|
|
2764
|
-
return;
|
|
2767
|
+
if (typeof this.url !== 'undefined') {
|
|
2768
|
+
toReturn['url'] = this.url;
|
|
2765
2769
|
}
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
toApiJson() {
|
|
2769
|
-
const toReturn = {};
|
|
2770
|
-
if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
|
|
2771
|
-
toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
|
|
2770
|
+
if (typeof this.shortcode !== 'undefined') {
|
|
2771
|
+
toReturn['shortcode'] = this.shortcode;
|
|
2772
2772
|
}
|
|
2773
2773
|
return toReturn;
|
|
2774
2774
|
}
|
|
2775
2775
|
}
|
|
2776
|
-
class
|
|
2776
|
+
class MetadataV2 {
|
|
2777
2777
|
static fromProto(proto) {
|
|
2778
|
-
let m = new
|
|
2778
|
+
let m = new MetadataV2();
|
|
2779
2779
|
m = Object.assign(m, proto);
|
|
2780
|
-
if (proto.socialPost) {
|
|
2781
|
-
m.socialPost = SocialPostData.fromProto(proto.socialPost);
|
|
2782
|
-
}
|
|
2783
2780
|
return m;
|
|
2784
2781
|
}
|
|
2785
2782
|
constructor(kwargs) {
|
|
@@ -2790,25 +2787,19 @@ class ScheduleToAllPagesRequest {
|
|
|
2790
2787
|
}
|
|
2791
2788
|
toApiJson() {
|
|
2792
2789
|
const toReturn = {};
|
|
2793
|
-
if (typeof this.
|
|
2794
|
-
toReturn['
|
|
2795
|
-
}
|
|
2796
|
-
if (typeof this.partnerId !== 'undefined') {
|
|
2797
|
-
toReturn['partnerId'] = this.partnerId;
|
|
2790
|
+
if (typeof this.name !== 'undefined') {
|
|
2791
|
+
toReturn['name'] = this.name;
|
|
2798
2792
|
}
|
|
2799
|
-
if (typeof this.
|
|
2800
|
-
toReturn['
|
|
2793
|
+
if (typeof this.value !== 'undefined') {
|
|
2794
|
+
toReturn['value'] = this.value;
|
|
2801
2795
|
}
|
|
2802
2796
|
return toReturn;
|
|
2803
2797
|
}
|
|
2804
2798
|
}
|
|
2805
|
-
class
|
|
2799
|
+
class PostActionV2 {
|
|
2806
2800
|
static fromProto(proto) {
|
|
2807
|
-
let m = new
|
|
2801
|
+
let m = new PostActionV2();
|
|
2808
2802
|
m = Object.assign(m, proto);
|
|
2809
|
-
if (proto.statuses) {
|
|
2810
|
-
m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
|
|
2811
|
-
}
|
|
2812
2803
|
return m;
|
|
2813
2804
|
}
|
|
2814
2805
|
constructor(kwargs) {
|
|
@@ -2819,18 +2810,24 @@ class ScheduleToAllPagesResponse {
|
|
|
2819
2810
|
}
|
|
2820
2811
|
toApiJson() {
|
|
2821
2812
|
const toReturn = {};
|
|
2822
|
-
if (typeof this.
|
|
2823
|
-
toReturn['
|
|
2813
|
+
if (typeof this.type !== 'undefined') {
|
|
2814
|
+
toReturn['type'] = this.type;
|
|
2815
|
+
}
|
|
2816
|
+
if (typeof this.linkUrl !== 'undefined') {
|
|
2817
|
+
toReturn['linkUrl'] = this.linkUrl;
|
|
2824
2818
|
}
|
|
2825
2819
|
return toReturn;
|
|
2826
2820
|
}
|
|
2827
2821
|
}
|
|
2828
|
-
class
|
|
2822
|
+
class PostContentV2 {
|
|
2829
2823
|
static fromProto(proto) {
|
|
2830
|
-
let m = new
|
|
2824
|
+
let m = new PostContentV2();
|
|
2831
2825
|
m = Object.assign(m, proto);
|
|
2832
|
-
if (proto.
|
|
2833
|
-
m.
|
|
2826
|
+
if (proto.medias) {
|
|
2827
|
+
m.medias = proto.medias.map(PostMediaV2.fromProto);
|
|
2828
|
+
}
|
|
2829
|
+
if (proto.links) {
|
|
2830
|
+
m.links = proto.links.map(LinkV2.fromProto);
|
|
2834
2831
|
}
|
|
2835
2832
|
return m;
|
|
2836
2833
|
}
|
|
@@ -2842,27 +2839,33 @@ class SearchHashtagRequest {
|
|
|
2842
2839
|
}
|
|
2843
2840
|
toApiJson() {
|
|
2844
2841
|
const toReturn = {};
|
|
2845
|
-
if (typeof this.
|
|
2846
|
-
toReturn['
|
|
2842
|
+
if (typeof this.postText !== 'undefined') {
|
|
2843
|
+
toReturn['postText'] = this.postText;
|
|
2847
2844
|
}
|
|
2848
|
-
if (typeof this.
|
|
2849
|
-
toReturn['
|
|
2845
|
+
if (typeof this.medias !== 'undefined' && this.medias !== null) {
|
|
2846
|
+
toReturn['medias'] = 'toApiJson' in this.medias ? this.medias.toApiJson() : this.medias;
|
|
2850
2847
|
}
|
|
2851
|
-
if (typeof this.
|
|
2852
|
-
toReturn['
|
|
2848
|
+
if (typeof this.links !== 'undefined' && this.links !== null) {
|
|
2849
|
+
toReturn['links'] = 'toApiJson' in this.links ? this.links.toApiJson() : this.links;
|
|
2853
2850
|
}
|
|
2854
|
-
if (typeof this.
|
|
2855
|
-
toReturn['
|
|
2851
|
+
if (typeof this.description !== 'undefined') {
|
|
2852
|
+
toReturn['description'] = this.description;
|
|
2853
|
+
}
|
|
2854
|
+
if (typeof this.title !== 'undefined') {
|
|
2855
|
+
toReturn['title'] = this.title;
|
|
2856
2856
|
}
|
|
2857
2857
|
return toReturn;
|
|
2858
2858
|
}
|
|
2859
2859
|
}
|
|
2860
|
-
class
|
|
2860
|
+
class PostCustomizationV2 {
|
|
2861
2861
|
static fromProto(proto) {
|
|
2862
|
-
let m = new
|
|
2862
|
+
let m = new PostCustomizationV2();
|
|
2863
2863
|
m = Object.assign(m, proto);
|
|
2864
|
-
if (proto.
|
|
2865
|
-
m.
|
|
2864
|
+
if (proto.event) {
|
|
2865
|
+
m.event = PostEventV2.fromProto(proto.event);
|
|
2866
|
+
}
|
|
2867
|
+
if (proto.action) {
|
|
2868
|
+
m.action = PostActionV2.fromProto(proto.action);
|
|
2866
2869
|
}
|
|
2867
2870
|
return m;
|
|
2868
2871
|
}
|
|
@@ -2874,21 +2877,24 @@ class SearchHashtagResponse {
|
|
|
2874
2877
|
}
|
|
2875
2878
|
toApiJson() {
|
|
2876
2879
|
const toReturn = {};
|
|
2877
|
-
if (typeof this.
|
|
2878
|
-
toReturn['
|
|
2880
|
+
if (typeof this.event !== 'undefined' && this.event !== null) {
|
|
2881
|
+
toReturn['event'] = 'toApiJson' in this.event ? this.event.toApiJson() : this.event;
|
|
2882
|
+
}
|
|
2883
|
+
if (typeof this.action !== 'undefined' && this.action !== null) {
|
|
2884
|
+
toReturn['action'] = 'toApiJson' in this.action ? this.action.toApiJson() : this.action;
|
|
2879
2885
|
}
|
|
2880
2886
|
return toReturn;
|
|
2881
2887
|
}
|
|
2882
2888
|
}
|
|
2883
|
-
class
|
|
2889
|
+
class PostEventV2 {
|
|
2884
2890
|
static fromProto(proto) {
|
|
2885
|
-
let m = new
|
|
2891
|
+
let m = new PostEventV2();
|
|
2886
2892
|
m = Object.assign(m, proto);
|
|
2887
|
-
if (proto.
|
|
2888
|
-
m.
|
|
2893
|
+
if (proto.start) {
|
|
2894
|
+
m.start = new Date(proto.start);
|
|
2889
2895
|
}
|
|
2890
|
-
if (proto.
|
|
2891
|
-
m.
|
|
2896
|
+
if (proto.end) {
|
|
2897
|
+
m.end = new Date(proto.end);
|
|
2892
2898
|
}
|
|
2893
2899
|
return m;
|
|
2894
2900
|
}
|
|
@@ -2900,25 +2906,25 @@ class SuggestMessageRequest {
|
|
|
2900
2906
|
}
|
|
2901
2907
|
toApiJson() {
|
|
2902
2908
|
const toReturn = {};
|
|
2903
|
-
if (typeof this.
|
|
2904
|
-
toReturn['
|
|
2905
|
-
}
|
|
2906
|
-
if (typeof this.businessId !== 'undefined') {
|
|
2907
|
-
toReturn['businessId'] = this.businessId;
|
|
2909
|
+
if (typeof this.title !== 'undefined') {
|
|
2910
|
+
toReturn['title'] = this.title;
|
|
2908
2911
|
}
|
|
2909
|
-
if (typeof this.
|
|
2910
|
-
toReturn['
|
|
2912
|
+
if (typeof this.start !== 'undefined' && this.start !== null) {
|
|
2913
|
+
toReturn['start'] = 'toApiJson' in this.start ? this.start.toApiJson() : this.start;
|
|
2911
2914
|
}
|
|
2912
|
-
if (typeof this.
|
|
2913
|
-
toReturn['
|
|
2915
|
+
if (typeof this.end !== 'undefined' && this.end !== null) {
|
|
2916
|
+
toReturn['end'] = 'toApiJson' in this.end ? this.end.toApiJson() : this.end;
|
|
2914
2917
|
}
|
|
2915
2918
|
return toReturn;
|
|
2916
2919
|
}
|
|
2917
2920
|
}
|
|
2918
|
-
class
|
|
2921
|
+
class PostMediaV2 {
|
|
2919
2922
|
static fromProto(proto) {
|
|
2920
|
-
let m = new
|
|
2923
|
+
let m = new PostMediaV2();
|
|
2921
2924
|
m = Object.assign(m, proto);
|
|
2925
|
+
if (proto.metadata) {
|
|
2926
|
+
m.metadata = proto.metadata.map(MetadataV2.fromProto);
|
|
2927
|
+
}
|
|
2922
2928
|
return m;
|
|
2923
2929
|
}
|
|
2924
2930
|
constructor(kwargs) {
|
|
@@ -2929,27 +2935,42 @@ class SuggestMessageResponse {
|
|
|
2929
2935
|
}
|
|
2930
2936
|
toApiJson() {
|
|
2931
2937
|
const toReturn = {};
|
|
2932
|
-
if (typeof this.
|
|
2933
|
-
toReturn['
|
|
2938
|
+
if (typeof this.mediaId !== 'undefined') {
|
|
2939
|
+
toReturn['mediaId'] = this.mediaId;
|
|
2940
|
+
}
|
|
2941
|
+
if (typeof this.mediaUrl !== 'undefined') {
|
|
2942
|
+
toReturn['mediaUrl'] = this.mediaUrl;
|
|
2943
|
+
}
|
|
2944
|
+
if (typeof this.mediaType !== 'undefined') {
|
|
2945
|
+
toReturn['mediaType'] = this.mediaType;
|
|
2946
|
+
}
|
|
2947
|
+
if (typeof this.containerId !== 'undefined') {
|
|
2948
|
+
toReturn['containerId'] = this.containerId;
|
|
2949
|
+
}
|
|
2950
|
+
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
2951
|
+
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
2934
2952
|
}
|
|
2935
2953
|
return toReturn;
|
|
2936
2954
|
}
|
|
2937
2955
|
}
|
|
2938
|
-
class
|
|
2956
|
+
class SocialPostV2 {
|
|
2939
2957
|
static fromProto(proto) {
|
|
2940
|
-
let m = new
|
|
2958
|
+
let m = new SocialPostV2();
|
|
2941
2959
|
m = Object.assign(m, proto);
|
|
2942
|
-
if (proto.
|
|
2943
|
-
m.
|
|
2960
|
+
if (proto.postContent) {
|
|
2961
|
+
m.postContent = PostContentV2.fromProto(proto.postContent);
|
|
2944
2962
|
}
|
|
2945
|
-
if (proto.
|
|
2946
|
-
m.
|
|
2963
|
+
if (proto.scheduled) {
|
|
2964
|
+
m.scheduled = new Date(proto.scheduled);
|
|
2947
2965
|
}
|
|
2948
|
-
if (proto.
|
|
2949
|
-
m.
|
|
2966
|
+
if (proto.customization) {
|
|
2967
|
+
m.customization = PostCustomizationV2.fromProto(proto.customization);
|
|
2950
2968
|
}
|
|
2951
2969
|
if (proto.postType) {
|
|
2952
|
-
m.postType = enumStringToValue$2(
|
|
2970
|
+
m.postType = enumStringToValue$2(PostTypeV2, proto.postType);
|
|
2971
|
+
}
|
|
2972
|
+
if (proto.metadata) {
|
|
2973
|
+
m.metadata = proto.metadata.map(MetadataV2.fromProto);
|
|
2953
2974
|
}
|
|
2954
2975
|
return m;
|
|
2955
2976
|
}
|
|
@@ -2961,50 +2982,32 @@ class UpdatePostTemplateRequest {
|
|
|
2961
2982
|
}
|
|
2962
2983
|
toApiJson() {
|
|
2963
2984
|
const toReturn = {};
|
|
2964
|
-
if (typeof this.
|
|
2965
|
-
toReturn['
|
|
2966
|
-
}
|
|
2967
|
-
if (typeof this.templateId !== 'undefined') {
|
|
2968
|
-
toReturn['templateId'] = this.templateId;
|
|
2969
|
-
}
|
|
2970
|
-
if (typeof this.title !== 'undefined') {
|
|
2971
|
-
toReturn['title'] = this.title;
|
|
2972
|
-
}
|
|
2973
|
-
if (typeof this.postText !== 'undefined') {
|
|
2974
|
-
toReturn['postText'] = this.postText;
|
|
2975
|
-
}
|
|
2976
|
-
if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
|
|
2977
|
-
toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
|
|
2978
|
-
}
|
|
2979
|
-
if (typeof this.gmbPostCustomization !== 'undefined') {
|
|
2980
|
-
toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
|
|
2981
|
-
}
|
|
2982
|
-
if (typeof this.imageUrl !== 'undefined') {
|
|
2983
|
-
toReturn['imageUrl'] = this.imageUrl;
|
|
2985
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2986
|
+
toReturn['businessId'] = this.businessId;
|
|
2984
2987
|
}
|
|
2985
|
-
if (typeof this.
|
|
2986
|
-
toReturn['
|
|
2988
|
+
if (typeof this.socialServiceId !== 'undefined') {
|
|
2989
|
+
toReturn['socialServiceId'] = this.socialServiceId;
|
|
2987
2990
|
}
|
|
2988
|
-
if (typeof this.
|
|
2989
|
-
toReturn['
|
|
2991
|
+
if (typeof this.postContent !== 'undefined' && this.postContent !== null) {
|
|
2992
|
+
toReturn['postContent'] = 'toApiJson' in this.postContent ? this.postContent.toApiJson() : this.postContent;
|
|
2990
2993
|
}
|
|
2991
|
-
if (typeof this.
|
|
2992
|
-
toReturn['
|
|
2994
|
+
if (typeof this.scheduled !== 'undefined' && this.scheduled !== null) {
|
|
2995
|
+
toReturn['scheduled'] = 'toApiJson' in this.scheduled ? this.scheduled.toApiJson() : this.scheduled;
|
|
2993
2996
|
}
|
|
2994
|
-
if (typeof this.
|
|
2995
|
-
toReturn['
|
|
2997
|
+
if (typeof this.customization !== 'undefined' && this.customization !== null) {
|
|
2998
|
+
toReturn['customization'] = 'toApiJson' in this.customization ? this.customization.toApiJson() : this.customization;
|
|
2996
2999
|
}
|
|
2997
|
-
if (typeof this.
|
|
2998
|
-
toReturn['
|
|
3000
|
+
if (typeof this.postType !== 'undefined') {
|
|
3001
|
+
toReturn['postType'] = this.postType;
|
|
2999
3002
|
}
|
|
3000
|
-
if (typeof this.
|
|
3001
|
-
toReturn['
|
|
3003
|
+
if (typeof this.internalPostId !== 'undefined') {
|
|
3004
|
+
toReturn['internalPostId'] = this.internalPostId;
|
|
3002
3005
|
}
|
|
3003
|
-
if (typeof this.
|
|
3004
|
-
toReturn['
|
|
3006
|
+
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
3007
|
+
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
3005
3008
|
}
|
|
3006
|
-
if (typeof this.
|
|
3007
|
-
toReturn['
|
|
3009
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
3010
|
+
toReturn['partnerId'] = this.partnerId;
|
|
3008
3011
|
}
|
|
3009
3012
|
return toReturn;
|
|
3010
3013
|
}
|
|
@@ -3200,8 +3203,8 @@ class MediaUploadRequest {
|
|
|
3200
3203
|
static fromProto(proto) {
|
|
3201
3204
|
let m = new MediaUploadRequest();
|
|
3202
3205
|
m = Object.assign(m, proto);
|
|
3203
|
-
if (proto.
|
|
3204
|
-
m.
|
|
3206
|
+
if (proto.medias) {
|
|
3207
|
+
m.medias = proto.medias.map(Media.fromProto);
|
|
3205
3208
|
}
|
|
3206
3209
|
return m;
|
|
3207
3210
|
}
|
|
@@ -3219,8 +3222,8 @@ class MediaUploadRequest {
|
|
|
3219
3222
|
if (typeof this.owner !== 'undefined') {
|
|
3220
3223
|
toReturn['owner'] = this.owner;
|
|
3221
3224
|
}
|
|
3222
|
-
if (typeof this.
|
|
3223
|
-
toReturn['
|
|
3225
|
+
if (typeof this.medias !== 'undefined' && this.medias !== null) {
|
|
3226
|
+
toReturn['medias'] = 'toApiJson' in this.medias ? this.medias.toApiJson() : this.medias;
|
|
3224
3227
|
}
|
|
3225
3228
|
return toReturn;
|
|
3226
3229
|
}
|
|
@@ -3239,8 +3242,8 @@ class MediaUploadResponse {
|
|
|
3239
3242
|
}
|
|
3240
3243
|
toApiJson() {
|
|
3241
3244
|
const toReturn = {};
|
|
3242
|
-
if (typeof this.
|
|
3243
|
-
toReturn['
|
|
3245
|
+
if (typeof this.uploadUrns !== 'undefined') {
|
|
3246
|
+
toReturn['uploadUrns'] = this.uploadUrns;
|
|
3244
3247
|
}
|
|
3245
3248
|
return toReturn;
|
|
3246
3249
|
}
|
|
@@ -3250,13 +3253,13 @@ class SocialPostOutput {
|
|
|
3250
3253
|
let m = new SocialPostOutput();
|
|
3251
3254
|
m = Object.assign(m, proto);
|
|
3252
3255
|
if (proto.socialPost) {
|
|
3253
|
-
m.socialPost =
|
|
3256
|
+
m.socialPost = SocialPostV2.fromProto(proto.socialPost);
|
|
3254
3257
|
}
|
|
3255
3258
|
if (proto.metadata) {
|
|
3256
|
-
m.metadata = proto.metadata.map(
|
|
3259
|
+
m.metadata = proto.metadata.map(MetadataV2.fromProto);
|
|
3257
3260
|
}
|
|
3258
3261
|
if (proto.status) {
|
|
3259
|
-
m.status = enumStringToValue(
|
|
3262
|
+
m.status = enumStringToValue(PostStatusV2, proto.status);
|
|
3260
3263
|
}
|
|
3261
3264
|
return m;
|
|
3262
3265
|
}
|
|
@@ -3290,8 +3293,8 @@ class SocialPostRequest {
|
|
|
3290
3293
|
static fromProto(proto) {
|
|
3291
3294
|
let m = new SocialPostRequest();
|
|
3292
3295
|
m = Object.assign(m, proto);
|
|
3293
|
-
if (proto.
|
|
3294
|
-
m.
|
|
3296
|
+
if (proto.socialPosts) {
|
|
3297
|
+
m.socialPosts = proto.socialPosts.map(SocialPostV2.fromProto);
|
|
3295
3298
|
}
|
|
3296
3299
|
return m;
|
|
3297
3300
|
}
|
|
@@ -3303,8 +3306,8 @@ class SocialPostRequest {
|
|
|
3303
3306
|
}
|
|
3304
3307
|
toApiJson() {
|
|
3305
3308
|
const toReturn = {};
|
|
3306
|
-
if (typeof this.
|
|
3307
|
-
toReturn['
|
|
3309
|
+
if (typeof this.socialPosts !== 'undefined' && this.socialPosts !== null) {
|
|
3310
|
+
toReturn['socialPosts'] = 'toApiJson' in this.socialPosts ? this.socialPosts.toApiJson() : this.socialPosts;
|
|
3308
3311
|
}
|
|
3309
3312
|
return toReturn;
|
|
3310
3313
|
}
|
|
@@ -3313,8 +3316,8 @@ class SocialPostResponse {
|
|
|
3313
3316
|
static fromProto(proto) {
|
|
3314
3317
|
let m = new SocialPostResponse();
|
|
3315
3318
|
m = Object.assign(m, proto);
|
|
3316
|
-
if (proto.
|
|
3317
|
-
m.
|
|
3319
|
+
if (proto.socialPosts) {
|
|
3320
|
+
m.socialPosts = proto.socialPosts.map(SocialPostOutput.fromProto);
|
|
3318
3321
|
}
|
|
3319
3322
|
return m;
|
|
3320
3323
|
}
|
|
@@ -3326,8 +3329,8 @@ class SocialPostResponse {
|
|
|
3326
3329
|
}
|
|
3327
3330
|
toApiJson() {
|
|
3328
3331
|
const toReturn = {};
|
|
3329
|
-
if (typeof this.
|
|
3330
|
-
toReturn['
|
|
3332
|
+
if (typeof this.socialPosts !== 'undefined' && this.socialPosts !== null) {
|
|
3333
|
+
toReturn['socialPosts'] = 'toApiJson' in this.socialPosts ? this.socialPosts.toApiJson() : this.socialPosts;
|
|
3331
3334
|
}
|
|
3332
3335
|
return toReturn;
|
|
3333
3336
|
}
|
|
@@ -3337,10 +3340,10 @@ class UpdateSocialPostRequest {
|
|
|
3337
3340
|
let m = new UpdateSocialPostRequest();
|
|
3338
3341
|
m = Object.assign(m, proto);
|
|
3339
3342
|
if (proto.socialPost) {
|
|
3340
|
-
m.socialPost =
|
|
3343
|
+
m.socialPost = SocialPostV2.fromProto(proto.socialPost);
|
|
3341
3344
|
}
|
|
3342
3345
|
if (proto.metadata) {
|
|
3343
|
-
m.metadata = proto.metadata.map(
|
|
3346
|
+
m.metadata = proto.metadata.map(MetadataV2.fromProto);
|
|
3344
3347
|
}
|
|
3345
3348
|
return m;
|
|
3346
3349
|
}
|
|
@@ -3381,10 +3384,10 @@ class UpdateSocialPostResponse {
|
|
|
3381
3384
|
let m = new UpdateSocialPostResponse();
|
|
3382
3385
|
m = Object.assign(m, proto);
|
|
3383
3386
|
if (proto.socialPost) {
|
|
3384
|
-
m.socialPost =
|
|
3387
|
+
m.socialPost = SocialPostV2.fromProto(proto.socialPost);
|
|
3385
3388
|
}
|
|
3386
3389
|
if (proto.metadata) {
|
|
3387
|
-
m.metadata = proto.metadata.map(
|
|
3390
|
+
m.metadata = proto.metadata.map(MetadataV2.fromProto);
|
|
3388
3391
|
}
|
|
3389
3392
|
return m;
|
|
3390
3393
|
}
|
|
@@ -3902,7 +3905,7 @@ class PostTemplatesService {
|
|
|
3902
3905
|
previews: previews,
|
|
3903
3906
|
options: options,
|
|
3904
3907
|
videoUrl: videoUrl,
|
|
3905
|
-
postType: postType || PostType
|
|
3908
|
+
postType: postType || PostType.POST_TYPE_INVALID,
|
|
3906
3909
|
mediaEntries: mediaEntries,
|
|
3907
3910
|
metaData: metadata,
|
|
3908
3911
|
});
|
|
@@ -3921,7 +3924,7 @@ class PostTemplatesService {
|
|
|
3921
3924
|
previews: previews,
|
|
3922
3925
|
options: options,
|
|
3923
3926
|
videoUrl: videoUrl,
|
|
3924
|
-
postType: postType || PostType
|
|
3927
|
+
postType: postType || PostType.POST_TYPE_INVALID,
|
|
3925
3928
|
mediaEntries: mediaEntries,
|
|
3926
3929
|
metaData: metadata,
|
|
3927
3930
|
});
|