@vendasta/social-posts 5.10.0 → 5.11.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 +7 -1
- package/esm2020/lib/_internal/interfaces/api-v2.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 +96 -1
- 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 +7 -1
- package/esm2020/lib/_internal/social-posts-v2.api.service.mjs +7 -2
- package/fesm2015/vendasta-social-posts.mjs +850 -739
- package/fesm2015/vendasta-social-posts.mjs.map +1 -1
- package/fesm2020/vendasta-social-posts.mjs +850 -739
- 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 +5 -0
- package/lib/_internal/interfaces/api-v2.interface.d.ts +20 -0
- package/lib/_internal/interfaces/index.d.ts +1 -1
- package/lib/_internal/interfaces/social-post-v2.interface.d.ts +2 -0
- package/lib/_internal/objects/api-v2.d.ts +26 -0
- package/lib/_internal/objects/api.d.ts +1 -1
- package/lib/_internal/objects/index.d.ts +1 -1
- package/lib/_internal/objects/social-post-v2.d.ts +2 -0
- package/lib/_internal/social-posts-v2.api.service.d.ts +3 -2
- package/package.json +1 -1
|
@@ -263,6 +263,12 @@ var TemplateType;
|
|
|
263
263
|
//
|
|
264
264
|
// Enums.
|
|
265
265
|
// *********************************
|
|
266
|
+
var PostStatus;
|
|
267
|
+
(function (PostStatus) {
|
|
268
|
+
PostStatus[PostStatus["POST_STATUS_INVALID"] = 0] = "POST_STATUS_INVALID";
|
|
269
|
+
PostStatus[PostStatus["POST_STATUS_SUCCESS"] = 1] = "POST_STATUS_SUCCESS";
|
|
270
|
+
PostStatus[PostStatus["POST_STATUS_ERROR"] = 2] = "POST_STATUS_ERROR";
|
|
271
|
+
})(PostStatus || (PostStatus = {}));
|
|
266
272
|
var PostType;
|
|
267
273
|
(function (PostType) {
|
|
268
274
|
PostType[PostType["POST_TYPE_INVALID"] = 0] = "POST_TYPE_INVALID";
|
|
@@ -867,25 +873,10 @@ function enumStringToValue$5(enumRef, value) {
|
|
|
867
873
|
}
|
|
868
874
|
return enumRef[value];
|
|
869
875
|
}
|
|
870
|
-
class
|
|
876
|
+
class Link {
|
|
871
877
|
static fromProto(proto) {
|
|
872
|
-
let m = new
|
|
878
|
+
let m = new Link();
|
|
873
879
|
m = Object.assign(m, proto);
|
|
874
|
-
if (proto.commentCount) {
|
|
875
|
-
m.commentCount = parseInt(proto.commentCount, 10);
|
|
876
|
-
}
|
|
877
|
-
if (proto.shareCount) {
|
|
878
|
-
m.shareCount = parseInt(proto.shareCount, 10);
|
|
879
|
-
}
|
|
880
|
-
if (proto.likeCount) {
|
|
881
|
-
m.likeCount = parseInt(proto.likeCount, 10);
|
|
882
|
-
}
|
|
883
|
-
if (proto.reactions) {
|
|
884
|
-
m.reactions = parseInt(proto.reactions, 10);
|
|
885
|
-
}
|
|
886
|
-
if (proto.peopleReached) {
|
|
887
|
-
m.peopleReached = parseInt(proto.peopleReached, 10);
|
|
888
|
-
}
|
|
889
880
|
return m;
|
|
890
881
|
}
|
|
891
882
|
constructor(kwargs) {
|
|
@@ -896,40 +887,31 @@ class FacebookPostStats {
|
|
|
896
887
|
}
|
|
897
888
|
toApiJson() {
|
|
898
889
|
const toReturn = {};
|
|
899
|
-
if (typeof this.
|
|
900
|
-
toReturn['
|
|
901
|
-
}
|
|
902
|
-
if (typeof this.shareCount !== 'undefined') {
|
|
903
|
-
toReturn['shareCount'] = this.shareCount;
|
|
890
|
+
if (typeof this.name !== 'undefined') {
|
|
891
|
+
toReturn['name'] = this.name;
|
|
904
892
|
}
|
|
905
|
-
if (typeof this.
|
|
906
|
-
toReturn['
|
|
893
|
+
if (typeof this.picture !== 'undefined') {
|
|
894
|
+
toReturn['picture'] = this.picture;
|
|
907
895
|
}
|
|
908
|
-
if (typeof this.
|
|
909
|
-
toReturn['
|
|
896
|
+
if (typeof this.description !== 'undefined') {
|
|
897
|
+
toReturn['description'] = this.description;
|
|
910
898
|
}
|
|
911
|
-
if (typeof this.
|
|
912
|
-
toReturn['
|
|
899
|
+
if (typeof this.title !== 'undefined') {
|
|
900
|
+
toReturn['title'] = this.title;
|
|
913
901
|
}
|
|
914
|
-
if (typeof this.
|
|
915
|
-
toReturn['
|
|
902
|
+
if (typeof this.url !== 'undefined') {
|
|
903
|
+
toReturn['url'] = this.url;
|
|
916
904
|
}
|
|
917
|
-
if (typeof this.
|
|
918
|
-
toReturn['
|
|
905
|
+
if (typeof this.shortcode !== 'undefined') {
|
|
906
|
+
toReturn['shortcode'] = this.shortcode;
|
|
919
907
|
}
|
|
920
908
|
return toReturn;
|
|
921
909
|
}
|
|
922
910
|
}
|
|
923
|
-
class
|
|
911
|
+
class Metadata {
|
|
924
912
|
static fromProto(proto) {
|
|
925
|
-
let m = new
|
|
913
|
+
let m = new Metadata();
|
|
926
914
|
m = Object.assign(m, proto);
|
|
927
|
-
if (proto.facebookPostStats) {
|
|
928
|
-
m.facebookPostStats = FacebookPostStats.fromProto(proto.facebookPostStats);
|
|
929
|
-
}
|
|
930
|
-
if (proto.twitterPostStats) {
|
|
931
|
-
m.twitterPostStats = TwitterPostStats.fromProto(proto.twitterPostStats);
|
|
932
|
-
}
|
|
933
915
|
return m;
|
|
934
916
|
}
|
|
935
917
|
constructor(kwargs) {
|
|
@@ -940,28 +922,19 @@ class SocialPostStats {
|
|
|
940
922
|
}
|
|
941
923
|
toApiJson() {
|
|
942
924
|
const toReturn = {};
|
|
943
|
-
if (typeof this.
|
|
944
|
-
toReturn['
|
|
945
|
-
}
|
|
946
|
-
if (typeof this.facebookPostStats !== 'undefined' && this.facebookPostStats !== null) {
|
|
947
|
-
toReturn['facebookPostStats'] = 'toApiJson' in this.facebookPostStats ? this.facebookPostStats.toApiJson() : this.facebookPostStats;
|
|
925
|
+
if (typeof this.name !== 'undefined') {
|
|
926
|
+
toReturn['name'] = this.name;
|
|
948
927
|
}
|
|
949
|
-
if (typeof this.
|
|
950
|
-
toReturn['
|
|
928
|
+
if (typeof this.value !== 'undefined') {
|
|
929
|
+
toReturn['value'] = this.value;
|
|
951
930
|
}
|
|
952
931
|
return toReturn;
|
|
953
932
|
}
|
|
954
933
|
}
|
|
955
|
-
class
|
|
934
|
+
class PostAction {
|
|
956
935
|
static fromProto(proto) {
|
|
957
|
-
let m = new
|
|
936
|
+
let m = new PostAction();
|
|
958
937
|
m = Object.assign(m, proto);
|
|
959
|
-
if (proto.favourites) {
|
|
960
|
-
m.favourites = parseInt(proto.favourites, 10);
|
|
961
|
-
}
|
|
962
|
-
if (proto.retweets) {
|
|
963
|
-
m.retweets = parseInt(proto.retweets, 10);
|
|
964
|
-
}
|
|
965
938
|
return m;
|
|
966
939
|
}
|
|
967
940
|
constructor(kwargs) {
|
|
@@ -972,34 +945,24 @@ class TwitterPostStats {
|
|
|
972
945
|
}
|
|
973
946
|
toApiJson() {
|
|
974
947
|
const toReturn = {};
|
|
975
|
-
if (typeof this.
|
|
976
|
-
toReturn['
|
|
977
|
-
}
|
|
978
|
-
if (typeof this.hasFavourited !== 'undefined') {
|
|
979
|
-
toReturn['hasFavourited'] = this.hasFavourited;
|
|
980
|
-
}
|
|
981
|
-
if (typeof this.retweets !== 'undefined') {
|
|
982
|
-
toReturn['retweets'] = this.retweets;
|
|
948
|
+
if (typeof this.type !== 'undefined') {
|
|
949
|
+
toReturn['type'] = this.type;
|
|
983
950
|
}
|
|
984
|
-
if (typeof this.
|
|
985
|
-
toReturn['
|
|
951
|
+
if (typeof this.linkUrl !== 'undefined') {
|
|
952
|
+
toReturn['linkUrl'] = this.linkUrl;
|
|
986
953
|
}
|
|
987
954
|
return toReturn;
|
|
988
955
|
}
|
|
989
956
|
}
|
|
990
|
-
|
|
991
|
-
function enumStringToValue$4(enumRef, value) {
|
|
992
|
-
if (typeof value === 'number') {
|
|
993
|
-
return value;
|
|
994
|
-
}
|
|
995
|
-
return enumRef[value];
|
|
996
|
-
}
|
|
997
|
-
class TenorGifMediaEntry {
|
|
957
|
+
class PostContent {
|
|
998
958
|
static fromProto(proto) {
|
|
999
|
-
let m = new
|
|
959
|
+
let m = new PostContent();
|
|
1000
960
|
m = Object.assign(m, proto);
|
|
1001
|
-
if (proto.
|
|
1002
|
-
m.
|
|
961
|
+
if (proto.media) {
|
|
962
|
+
m.media = proto.media.map(PostMedia.fromProto);
|
|
963
|
+
}
|
|
964
|
+
if (proto.link) {
|
|
965
|
+
m.link = proto.link.map(Link.fromProto);
|
|
1003
966
|
}
|
|
1004
967
|
return m;
|
|
1005
968
|
}
|
|
@@ -1011,21 +974,33 @@ class TenorGifMediaEntry {
|
|
|
1011
974
|
}
|
|
1012
975
|
toApiJson() {
|
|
1013
976
|
const toReturn = {};
|
|
1014
|
-
if (typeof this.
|
|
1015
|
-
toReturn['
|
|
977
|
+
if (typeof this.postText !== 'undefined') {
|
|
978
|
+
toReturn['postText'] = this.postText;
|
|
1016
979
|
}
|
|
1017
|
-
if (typeof this.
|
|
1018
|
-
toReturn['
|
|
980
|
+
if (typeof this.media !== 'undefined' && this.media !== null) {
|
|
981
|
+
toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
|
|
982
|
+
}
|
|
983
|
+
if (typeof this.link !== 'undefined' && this.link !== null) {
|
|
984
|
+
toReturn['link'] = 'toApiJson' in this.link ? this.link.toApiJson() : this.link;
|
|
985
|
+
}
|
|
986
|
+
if (typeof this.description !== 'undefined') {
|
|
987
|
+
toReturn['description'] = this.description;
|
|
988
|
+
}
|
|
989
|
+
if (typeof this.title !== 'undefined') {
|
|
990
|
+
toReturn['title'] = this.title;
|
|
1019
991
|
}
|
|
1020
992
|
return toReturn;
|
|
1021
993
|
}
|
|
1022
994
|
}
|
|
1023
|
-
class
|
|
995
|
+
class PostCustomization {
|
|
1024
996
|
static fromProto(proto) {
|
|
1025
|
-
let m = new
|
|
997
|
+
let m = new PostCustomization();
|
|
1026
998
|
m = Object.assign(m, proto);
|
|
1027
|
-
if (proto.
|
|
1028
|
-
m.
|
|
999
|
+
if (proto.event) {
|
|
1000
|
+
m.event = PostEvent.fromProto(proto.event);
|
|
1001
|
+
}
|
|
1002
|
+
if (proto.action) {
|
|
1003
|
+
m.action = PostAction.fromProto(proto.action);
|
|
1029
1004
|
}
|
|
1030
1005
|
return m;
|
|
1031
1006
|
}
|
|
@@ -1037,36 +1012,24 @@ class TenorGif {
|
|
|
1037
1012
|
}
|
|
1038
1013
|
toApiJson() {
|
|
1039
1014
|
const toReturn = {};
|
|
1040
|
-
if (typeof this.
|
|
1041
|
-
toReturn['
|
|
1042
|
-
}
|
|
1043
|
-
if (typeof this.tags !== 'undefined') {
|
|
1044
|
-
toReturn['tags'] = this.tags;
|
|
1045
|
-
}
|
|
1046
|
-
if (typeof this.hasAudio !== 'undefined') {
|
|
1047
|
-
toReturn['hasAudio'] = this.hasAudio;
|
|
1048
|
-
}
|
|
1049
|
-
if (typeof this.title !== 'undefined') {
|
|
1050
|
-
toReturn['title'] = this.title;
|
|
1051
|
-
}
|
|
1052
|
-
if (typeof this.id !== 'undefined') {
|
|
1053
|
-
toReturn['id'] = this.id;
|
|
1015
|
+
if (typeof this.event !== 'undefined' && this.event !== null) {
|
|
1016
|
+
toReturn['event'] = 'toApiJson' in this.event ? this.event.toApiJson() : this.event;
|
|
1054
1017
|
}
|
|
1055
|
-
if (typeof this.
|
|
1056
|
-
toReturn['
|
|
1018
|
+
if (typeof this.action !== 'undefined' && this.action !== null) {
|
|
1019
|
+
toReturn['action'] = 'toApiJson' in this.action ? this.action.toApiJson() : this.action;
|
|
1057
1020
|
}
|
|
1058
1021
|
return toReturn;
|
|
1059
1022
|
}
|
|
1060
1023
|
}
|
|
1061
|
-
class
|
|
1024
|
+
class PostEvent {
|
|
1062
1025
|
static fromProto(proto) {
|
|
1063
|
-
let m = new
|
|
1026
|
+
let m = new PostEvent();
|
|
1064
1027
|
m = Object.assign(m, proto);
|
|
1065
|
-
if (proto.
|
|
1066
|
-
m.
|
|
1028
|
+
if (proto.start) {
|
|
1029
|
+
m.start = new Date(proto.start);
|
|
1067
1030
|
}
|
|
1068
|
-
if (proto.
|
|
1069
|
-
m.
|
|
1031
|
+
if (proto.end) {
|
|
1032
|
+
m.end = new Date(proto.end);
|
|
1070
1033
|
}
|
|
1071
1034
|
return m;
|
|
1072
1035
|
}
|
|
@@ -1078,37 +1041,24 @@ class TenorMediaObject {
|
|
|
1078
1041
|
}
|
|
1079
1042
|
toApiJson() {
|
|
1080
1043
|
const toReturn = {};
|
|
1081
|
-
if (typeof this.
|
|
1082
|
-
toReturn['
|
|
1083
|
-
}
|
|
1084
|
-
if (typeof this.url !== 'undefined') {
|
|
1085
|
-
toReturn['url'] = this.url;
|
|
1044
|
+
if (typeof this.title !== 'undefined') {
|
|
1045
|
+
toReturn['title'] = this.title;
|
|
1086
1046
|
}
|
|
1087
|
-
if (typeof this.
|
|
1088
|
-
toReturn['
|
|
1047
|
+
if (typeof this.start !== 'undefined' && this.start !== null) {
|
|
1048
|
+
toReturn['start'] = 'toApiJson' in this.start ? this.start.toApiJson() : this.start;
|
|
1089
1049
|
}
|
|
1090
|
-
if (typeof this.
|
|
1091
|
-
toReturn['
|
|
1050
|
+
if (typeof this.end !== 'undefined' && this.end !== null) {
|
|
1051
|
+
toReturn['end'] = 'toApiJson' in this.end ? this.end.toApiJson() : this.end;
|
|
1092
1052
|
}
|
|
1093
1053
|
return toReturn;
|
|
1094
1054
|
}
|
|
1095
1055
|
}
|
|
1096
|
-
|
|
1097
|
-
function enumStringToValue$3(enumRef, value) {
|
|
1098
|
-
if (typeof value === 'number') {
|
|
1099
|
-
return value;
|
|
1100
|
-
}
|
|
1101
|
-
return enumRef[value];
|
|
1102
|
-
}
|
|
1103
|
-
class CreateMultilocationPostRequest {
|
|
1056
|
+
class PostMedia {
|
|
1104
1057
|
static fromProto(proto) {
|
|
1105
|
-
let m = new
|
|
1058
|
+
let m = new PostMedia();
|
|
1106
1059
|
m = Object.assign(m, proto);
|
|
1107
|
-
if (proto.
|
|
1108
|
-
m.
|
|
1109
|
-
}
|
|
1110
|
-
if (proto.locations) {
|
|
1111
|
-
m.locations = proto.locations.map(Location.fromProto);
|
|
1060
|
+
if (proto.metadata) {
|
|
1061
|
+
m.metadata = proto.metadata.map(Metadata.fromProto);
|
|
1112
1062
|
}
|
|
1113
1063
|
return m;
|
|
1114
1064
|
}
|
|
@@ -1120,39 +1070,42 @@ class CreateMultilocationPostRequest {
|
|
|
1120
1070
|
}
|
|
1121
1071
|
toApiJson() {
|
|
1122
1072
|
const toReturn = {};
|
|
1123
|
-
if (typeof this.
|
|
1124
|
-
toReturn['
|
|
1125
|
-
}
|
|
1126
|
-
if (typeof this.text !== 'undefined') {
|
|
1127
|
-
toReturn['text'] = this.text;
|
|
1128
|
-
}
|
|
1129
|
-
if (typeof this.media !== 'undefined') {
|
|
1130
|
-
toReturn['media'] = this.media;
|
|
1073
|
+
if (typeof this.mediaId !== 'undefined') {
|
|
1074
|
+
toReturn['mediaId'] = this.mediaId;
|
|
1131
1075
|
}
|
|
1132
|
-
if (typeof this.
|
|
1133
|
-
toReturn['
|
|
1076
|
+
if (typeof this.mediaUrl !== 'undefined') {
|
|
1077
|
+
toReturn['mediaUrl'] = this.mediaUrl;
|
|
1134
1078
|
}
|
|
1135
|
-
if (typeof this.
|
|
1136
|
-
toReturn['
|
|
1079
|
+
if (typeof this.mediaType !== 'undefined') {
|
|
1080
|
+
toReturn['mediaType'] = this.mediaType;
|
|
1137
1081
|
}
|
|
1138
|
-
if (typeof this.
|
|
1139
|
-
toReturn['
|
|
1082
|
+
if (typeof this.containerId !== 'undefined') {
|
|
1083
|
+
toReturn['containerId'] = this.containerId;
|
|
1140
1084
|
}
|
|
1141
|
-
if (typeof this.
|
|
1142
|
-
toReturn['
|
|
1085
|
+
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
1086
|
+
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
1143
1087
|
}
|
|
1144
1088
|
return toReturn;
|
|
1145
1089
|
}
|
|
1146
1090
|
}
|
|
1147
|
-
class
|
|
1091
|
+
class SocialPost {
|
|
1148
1092
|
static fromProto(proto) {
|
|
1149
|
-
let m = new
|
|
1093
|
+
let m = new SocialPost();
|
|
1150
1094
|
m = Object.assign(m, proto);
|
|
1151
|
-
if (proto.
|
|
1152
|
-
m.
|
|
1095
|
+
if (proto.postContent) {
|
|
1096
|
+
m.postContent = PostContent.fromProto(proto.postContent);
|
|
1153
1097
|
}
|
|
1154
|
-
if (proto.
|
|
1155
|
-
m.
|
|
1098
|
+
if (proto.scheduled) {
|
|
1099
|
+
m.scheduled = new Date(proto.scheduled);
|
|
1100
|
+
}
|
|
1101
|
+
if (proto.customization) {
|
|
1102
|
+
m.customization = PostCustomization.fromProto(proto.customization);
|
|
1103
|
+
}
|
|
1104
|
+
if (proto.postType) {
|
|
1105
|
+
m.postType = enumStringToValue$5(PostType$1, proto.postType);
|
|
1106
|
+
}
|
|
1107
|
+
if (proto.metadata) {
|
|
1108
|
+
m.metadata = proto.metadata.map(Metadata.fromProto);
|
|
1156
1109
|
}
|
|
1157
1110
|
return m;
|
|
1158
1111
|
}
|
|
@@ -1164,30 +1117,58 @@ class CreateMultilocationPostResponse {
|
|
|
1164
1117
|
}
|
|
1165
1118
|
toApiJson() {
|
|
1166
1119
|
const toReturn = {};
|
|
1167
|
-
if (typeof this.
|
|
1168
|
-
toReturn['
|
|
1120
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1121
|
+
toReturn['businessId'] = this.businessId;
|
|
1169
1122
|
}
|
|
1170
|
-
if (typeof this.
|
|
1171
|
-
toReturn['
|
|
1123
|
+
if (typeof this.socialServiceId !== 'undefined') {
|
|
1124
|
+
toReturn['socialServiceId'] = this.socialServiceId;
|
|
1125
|
+
}
|
|
1126
|
+
if (typeof this.postContent !== 'undefined' && this.postContent !== null) {
|
|
1127
|
+
toReturn['postContent'] = 'toApiJson' in this.postContent ? this.postContent.toApiJson() : this.postContent;
|
|
1128
|
+
}
|
|
1129
|
+
if (typeof this.scheduled !== 'undefined' && this.scheduled !== null) {
|
|
1130
|
+
toReturn['scheduled'] = 'toApiJson' in this.scheduled ? this.scheduled.toApiJson() : this.scheduled;
|
|
1131
|
+
}
|
|
1132
|
+
if (typeof this.customization !== 'undefined' && this.customization !== null) {
|
|
1133
|
+
toReturn['customization'] = 'toApiJson' in this.customization ? this.customization.toApiJson() : this.customization;
|
|
1134
|
+
}
|
|
1135
|
+
if (typeof this.postType !== 'undefined') {
|
|
1136
|
+
toReturn['postType'] = this.postType;
|
|
1137
|
+
}
|
|
1138
|
+
if (typeof this.internalPostId !== 'undefined') {
|
|
1139
|
+
toReturn['internalPostId'] = this.internalPostId;
|
|
1140
|
+
}
|
|
1141
|
+
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
1142
|
+
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
1172
1143
|
}
|
|
1173
1144
|
return toReturn;
|
|
1174
1145
|
}
|
|
1175
1146
|
}
|
|
1176
|
-
|
|
1147
|
+
|
|
1148
|
+
function enumStringToValue$4(enumRef, value) {
|
|
1149
|
+
if (typeof value === 'number') {
|
|
1150
|
+
return value;
|
|
1151
|
+
}
|
|
1152
|
+
return enumRef[value];
|
|
1153
|
+
}
|
|
1154
|
+
class FacebookPostStats {
|
|
1177
1155
|
static fromProto(proto) {
|
|
1178
|
-
let m = new
|
|
1156
|
+
let m = new FacebookPostStats();
|
|
1179
1157
|
m = Object.assign(m, proto);
|
|
1180
|
-
if (proto.
|
|
1181
|
-
m.
|
|
1158
|
+
if (proto.commentCount) {
|
|
1159
|
+
m.commentCount = parseInt(proto.commentCount, 10);
|
|
1182
1160
|
}
|
|
1183
|
-
if (proto.
|
|
1184
|
-
m.
|
|
1161
|
+
if (proto.shareCount) {
|
|
1162
|
+
m.shareCount = parseInt(proto.shareCount, 10);
|
|
1185
1163
|
}
|
|
1186
|
-
if (proto.
|
|
1187
|
-
m.
|
|
1164
|
+
if (proto.likeCount) {
|
|
1165
|
+
m.likeCount = parseInt(proto.likeCount, 10);
|
|
1188
1166
|
}
|
|
1189
|
-
if (proto.
|
|
1190
|
-
m.
|
|
1167
|
+
if (proto.reactions) {
|
|
1168
|
+
m.reactions = parseInt(proto.reactions, 10);
|
|
1169
|
+
}
|
|
1170
|
+
if (proto.peopleReached) {
|
|
1171
|
+
m.peopleReached = parseInt(proto.peopleReached, 10);
|
|
1191
1172
|
}
|
|
1192
1173
|
return m;
|
|
1193
1174
|
}
|
|
@@ -1199,55 +1180,40 @@ class CreatePostTemplateRequest {
|
|
|
1199
1180
|
}
|
|
1200
1181
|
toApiJson() {
|
|
1201
1182
|
const toReturn = {};
|
|
1202
|
-
if (typeof this.
|
|
1203
|
-
toReturn['
|
|
1204
|
-
}
|
|
1205
|
-
if (typeof this.title !== 'undefined') {
|
|
1206
|
-
toReturn['title'] = this.title;
|
|
1207
|
-
}
|
|
1208
|
-
if (typeof this.postText !== 'undefined') {
|
|
1209
|
-
toReturn['postText'] = this.postText;
|
|
1210
|
-
}
|
|
1211
|
-
if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
|
|
1212
|
-
toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
|
|
1213
|
-
}
|
|
1214
|
-
if (typeof this.gmbPostCustomization !== 'undefined') {
|
|
1215
|
-
toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
|
|
1216
|
-
}
|
|
1217
|
-
if (typeof this.imageUrl !== 'undefined') {
|
|
1218
|
-
toReturn['imageUrl'] = this.imageUrl;
|
|
1219
|
-
}
|
|
1220
|
-
if (typeof this.imagePath !== 'undefined') {
|
|
1221
|
-
toReturn['imagePath'] = this.imagePath;
|
|
1222
|
-
}
|
|
1223
|
-
if (typeof this.imageSize !== 'undefined') {
|
|
1224
|
-
toReturn['imageSize'] = this.imageSize;
|
|
1183
|
+
if (typeof this.commentCount !== 'undefined') {
|
|
1184
|
+
toReturn['commentCount'] = this.commentCount;
|
|
1225
1185
|
}
|
|
1226
|
-
if (typeof this.
|
|
1227
|
-
toReturn['
|
|
1186
|
+
if (typeof this.shareCount !== 'undefined') {
|
|
1187
|
+
toReturn['shareCount'] = this.shareCount;
|
|
1228
1188
|
}
|
|
1229
|
-
if (typeof this.
|
|
1230
|
-
toReturn['
|
|
1189
|
+
if (typeof this.likeCount !== 'undefined') {
|
|
1190
|
+
toReturn['likeCount'] = this.likeCount;
|
|
1231
1191
|
}
|
|
1232
|
-
if (typeof this.
|
|
1233
|
-
toReturn['
|
|
1192
|
+
if (typeof this.hasLike !== 'undefined') {
|
|
1193
|
+
toReturn['hasLike'] = this.hasLike;
|
|
1234
1194
|
}
|
|
1235
|
-
if (typeof this.
|
|
1236
|
-
toReturn['
|
|
1195
|
+
if (typeof this.canLike !== 'undefined') {
|
|
1196
|
+
toReturn['canLike'] = this.canLike;
|
|
1237
1197
|
}
|
|
1238
|
-
if (typeof this.
|
|
1239
|
-
toReturn['
|
|
1198
|
+
if (typeof this.reactions !== 'undefined') {
|
|
1199
|
+
toReturn['reactions'] = this.reactions;
|
|
1240
1200
|
}
|
|
1241
|
-
if (typeof this.
|
|
1242
|
-
toReturn['
|
|
1201
|
+
if (typeof this.peopleReached !== 'undefined') {
|
|
1202
|
+
toReturn['peopleReached'] = this.peopleReached;
|
|
1243
1203
|
}
|
|
1244
1204
|
return toReturn;
|
|
1245
1205
|
}
|
|
1246
1206
|
}
|
|
1247
|
-
class
|
|
1207
|
+
class SocialPostStats {
|
|
1248
1208
|
static fromProto(proto) {
|
|
1249
|
-
let m = new
|
|
1209
|
+
let m = new SocialPostStats();
|
|
1250
1210
|
m = Object.assign(m, proto);
|
|
1211
|
+
if (proto.facebookPostStats) {
|
|
1212
|
+
m.facebookPostStats = FacebookPostStats.fromProto(proto.facebookPostStats);
|
|
1213
|
+
}
|
|
1214
|
+
if (proto.twitterPostStats) {
|
|
1215
|
+
m.twitterPostStats = TwitterPostStats.fromProto(proto.twitterPostStats);
|
|
1216
|
+
}
|
|
1251
1217
|
return m;
|
|
1252
1218
|
}
|
|
1253
1219
|
constructor(kwargs) {
|
|
@@ -1258,21 +1224,27 @@ class CreatePostTemplateResponse {
|
|
|
1258
1224
|
}
|
|
1259
1225
|
toApiJson() {
|
|
1260
1226
|
const toReturn = {};
|
|
1261
|
-
if (typeof this.
|
|
1262
|
-
toReturn['
|
|
1227
|
+
if (typeof this.internalPostId !== 'undefined') {
|
|
1228
|
+
toReturn['internalPostId'] = this.internalPostId;
|
|
1229
|
+
}
|
|
1230
|
+
if (typeof this.facebookPostStats !== 'undefined' && this.facebookPostStats !== null) {
|
|
1231
|
+
toReturn['facebookPostStats'] = 'toApiJson' in this.facebookPostStats ? this.facebookPostStats.toApiJson() : this.facebookPostStats;
|
|
1232
|
+
}
|
|
1233
|
+
if (typeof this.twitterPostStats !== 'undefined' && this.twitterPostStats !== null) {
|
|
1234
|
+
toReturn['twitterPostStats'] = 'toApiJson' in this.twitterPostStats ? this.twitterPostStats.toApiJson() : this.twitterPostStats;
|
|
1263
1235
|
}
|
|
1264
1236
|
return toReturn;
|
|
1265
1237
|
}
|
|
1266
1238
|
}
|
|
1267
|
-
class
|
|
1239
|
+
class TwitterPostStats {
|
|
1268
1240
|
static fromProto(proto) {
|
|
1269
|
-
let m = new
|
|
1241
|
+
let m = new TwitterPostStats();
|
|
1270
1242
|
m = Object.assign(m, proto);
|
|
1271
|
-
if (proto.
|
|
1272
|
-
m.
|
|
1243
|
+
if (proto.favourites) {
|
|
1244
|
+
m.favourites = parseInt(proto.favourites, 10);
|
|
1273
1245
|
}
|
|
1274
|
-
if (proto.
|
|
1275
|
-
m.
|
|
1246
|
+
if (proto.retweets) {
|
|
1247
|
+
m.retweets = parseInt(proto.retweets, 10);
|
|
1276
1248
|
}
|
|
1277
1249
|
return m;
|
|
1278
1250
|
}
|
|
@@ -1284,19 +1256,35 @@ class DateRangeFilter {
|
|
|
1284
1256
|
}
|
|
1285
1257
|
toApiJson() {
|
|
1286
1258
|
const toReturn = {};
|
|
1287
|
-
if (typeof this.
|
|
1288
|
-
toReturn['
|
|
1259
|
+
if (typeof this.favourites !== 'undefined') {
|
|
1260
|
+
toReturn['favourites'] = this.favourites;
|
|
1289
1261
|
}
|
|
1290
|
-
if (typeof this.
|
|
1291
|
-
toReturn['
|
|
1262
|
+
if (typeof this.hasFavourited !== 'undefined') {
|
|
1263
|
+
toReturn['hasFavourited'] = this.hasFavourited;
|
|
1264
|
+
}
|
|
1265
|
+
if (typeof this.retweets !== 'undefined') {
|
|
1266
|
+
toReturn['retweets'] = this.retweets;
|
|
1267
|
+
}
|
|
1268
|
+
if (typeof this.hasRetweeted !== 'undefined') {
|
|
1269
|
+
toReturn['hasRetweeted'] = this.hasRetweeted;
|
|
1292
1270
|
}
|
|
1293
1271
|
return toReturn;
|
|
1294
1272
|
}
|
|
1295
1273
|
}
|
|
1296
|
-
|
|
1274
|
+
|
|
1275
|
+
function enumStringToValue$3(enumRef, value) {
|
|
1276
|
+
if (typeof value === 'number') {
|
|
1277
|
+
return value;
|
|
1278
|
+
}
|
|
1279
|
+
return enumRef[value];
|
|
1280
|
+
}
|
|
1281
|
+
class TenorGifMediaEntry {
|
|
1297
1282
|
static fromProto(proto) {
|
|
1298
|
-
let m = new
|
|
1283
|
+
let m = new TenorGifMediaEntry();
|
|
1299
1284
|
m = Object.assign(m, proto);
|
|
1285
|
+
if (proto.value) {
|
|
1286
|
+
m.value = TenorMediaObject.fromProto(proto.value);
|
|
1287
|
+
}
|
|
1300
1288
|
return m;
|
|
1301
1289
|
}
|
|
1302
1290
|
constructor(kwargs) {
|
|
@@ -1307,22 +1295,22 @@ class DeleteHashtagsRequest {
|
|
|
1307
1295
|
}
|
|
1308
1296
|
toApiJson() {
|
|
1309
1297
|
const toReturn = {};
|
|
1310
|
-
if (typeof this.
|
|
1311
|
-
toReturn['
|
|
1312
|
-
}
|
|
1313
|
-
if (typeof this.businessId !== 'undefined') {
|
|
1314
|
-
toReturn['businessId'] = this.businessId;
|
|
1298
|
+
if (typeof this.key !== 'undefined') {
|
|
1299
|
+
toReturn['key'] = this.key;
|
|
1315
1300
|
}
|
|
1316
|
-
if (typeof this.
|
|
1317
|
-
toReturn['
|
|
1301
|
+
if (typeof this.value !== 'undefined' && this.value !== null) {
|
|
1302
|
+
toReturn['value'] = 'toApiJson' in this.value ? this.value.toApiJson() : this.value;
|
|
1318
1303
|
}
|
|
1319
1304
|
return toReturn;
|
|
1320
1305
|
}
|
|
1321
1306
|
}
|
|
1322
|
-
class
|
|
1307
|
+
class TenorGif {
|
|
1323
1308
|
static fromProto(proto) {
|
|
1324
|
-
let m = new
|
|
1309
|
+
let m = new TenorGif();
|
|
1325
1310
|
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
|
+
}
|
|
1326
1314
|
return m;
|
|
1327
1315
|
}
|
|
1328
1316
|
constructor(kwargs) {
|
|
@@ -1333,42 +1321,37 @@ class DeleteMultilocationPostRequest {
|
|
|
1333
1321
|
}
|
|
1334
1322
|
toApiJson() {
|
|
1335
1323
|
const toReturn = {};
|
|
1336
|
-
if (typeof this.
|
|
1337
|
-
toReturn['
|
|
1324
|
+
if (typeof this.media !== 'undefined' && this.media !== null) {
|
|
1325
|
+
toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
|
|
1338
1326
|
}
|
|
1339
|
-
if (typeof this.
|
|
1340
|
-
toReturn['
|
|
1327
|
+
if (typeof this.tags !== 'undefined') {
|
|
1328
|
+
toReturn['tags'] = this.tags;
|
|
1341
1329
|
}
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
}
|
|
1345
|
-
class DeletePostTemplateRequest {
|
|
1346
|
-
static fromProto(proto) {
|
|
1347
|
-
let m = new DeletePostTemplateRequest();
|
|
1348
|
-
m = Object.assign(m, proto);
|
|
1349
|
-
return m;
|
|
1350
|
-
}
|
|
1351
|
-
constructor(kwargs) {
|
|
1352
|
-
if (!kwargs) {
|
|
1353
|
-
return;
|
|
1330
|
+
if (typeof this.hasAudio !== 'undefined') {
|
|
1331
|
+
toReturn['hasAudio'] = this.hasAudio;
|
|
1354
1332
|
}
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
toApiJson() {
|
|
1358
|
-
const toReturn = {};
|
|
1359
|
-
if (typeof this.accountGroupId !== 'undefined') {
|
|
1360
|
-
toReturn['accountGroupId'] = this.accountGroupId;
|
|
1333
|
+
if (typeof this.title !== 'undefined') {
|
|
1334
|
+
toReturn['title'] = this.title;
|
|
1361
1335
|
}
|
|
1362
|
-
if (typeof this.
|
|
1363
|
-
toReturn['
|
|
1336
|
+
if (typeof this.id !== 'undefined') {
|
|
1337
|
+
toReturn['id'] = this.id;
|
|
1338
|
+
}
|
|
1339
|
+
if (typeof this.created !== 'undefined') {
|
|
1340
|
+
toReturn['created'] = this.created;
|
|
1364
1341
|
}
|
|
1365
1342
|
return toReturn;
|
|
1366
1343
|
}
|
|
1367
1344
|
}
|
|
1368
|
-
class
|
|
1345
|
+
class TenorMediaObject {
|
|
1369
1346
|
static fromProto(proto) {
|
|
1370
|
-
let m = new
|
|
1347
|
+
let m = new TenorMediaObject();
|
|
1371
1348
|
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
|
+
}
|
|
1372
1355
|
return m;
|
|
1373
1356
|
}
|
|
1374
1357
|
constructor(kwargs) {
|
|
@@ -1379,25 +1362,35 @@ class DeleteSocialPostRequest {
|
|
|
1379
1362
|
}
|
|
1380
1363
|
toApiJson() {
|
|
1381
1364
|
const toReturn = {};
|
|
1382
|
-
if (typeof this.
|
|
1383
|
-
toReturn['
|
|
1365
|
+
if (typeof this.preview !== 'undefined') {
|
|
1366
|
+
toReturn['preview'] = this.preview;
|
|
1384
1367
|
}
|
|
1385
|
-
if (typeof this.
|
|
1386
|
-
toReturn['
|
|
1368
|
+
if (typeof this.url !== 'undefined') {
|
|
1369
|
+
toReturn['url'] = this.url;
|
|
1370
|
+
}
|
|
1371
|
+
if (typeof this.dimensions !== 'undefined') {
|
|
1372
|
+
toReturn['dimensions'] = this.dimensions;
|
|
1373
|
+
}
|
|
1374
|
+
if (typeof this.size !== 'undefined') {
|
|
1375
|
+
toReturn['size'] = this.size;
|
|
1387
1376
|
}
|
|
1388
1377
|
return toReturn;
|
|
1389
1378
|
}
|
|
1390
1379
|
}
|
|
1391
|
-
|
|
1380
|
+
|
|
1381
|
+
function enumStringToValue$2(enumRef, value) {
|
|
1382
|
+
if (typeof value === 'number') {
|
|
1383
|
+
return value;
|
|
1384
|
+
}
|
|
1385
|
+
return enumRef[value];
|
|
1386
|
+
}
|
|
1387
|
+
class CreateMultilocationPostRequest {
|
|
1392
1388
|
static fromProto(proto) {
|
|
1393
|
-
let m = new
|
|
1389
|
+
let m = new CreateMultilocationPostRequest();
|
|
1394
1390
|
m = Object.assign(m, proto);
|
|
1395
1391
|
if (proto.scheduledDate) {
|
|
1396
1392
|
m.scheduledDate = new Date(proto.scheduledDate);
|
|
1397
1393
|
}
|
|
1398
|
-
if (proto.fieldMask) {
|
|
1399
|
-
m.fieldMask = FieldMask.fromProto(proto.fieldMask);
|
|
1400
|
-
}
|
|
1401
1394
|
if (proto.locations) {
|
|
1402
1395
|
m.locations = proto.locations.map(Location.fromProto);
|
|
1403
1396
|
}
|
|
@@ -1414,9 +1407,6 @@ class EditMultilocationPostRequest {
|
|
|
1414
1407
|
if (typeof this.brandId !== 'undefined') {
|
|
1415
1408
|
toReturn['brandId'] = this.brandId;
|
|
1416
1409
|
}
|
|
1417
|
-
if (typeof this.multilocationId !== 'undefined') {
|
|
1418
|
-
toReturn['multilocationId'] = this.multilocationId;
|
|
1419
|
-
}
|
|
1420
1410
|
if (typeof this.text !== 'undefined') {
|
|
1421
1411
|
toReturn['text'] = this.text;
|
|
1422
1412
|
}
|
|
@@ -1426,8 +1416,8 @@ class EditMultilocationPostRequest {
|
|
|
1426
1416
|
if (typeof this.scheduledDate !== 'undefined' && this.scheduledDate !== null) {
|
|
1427
1417
|
toReturn['scheduledDate'] = 'toApiJson' in this.scheduledDate ? this.scheduledDate.toApiJson() : this.scheduledDate;
|
|
1428
1418
|
}
|
|
1429
|
-
if (typeof this.
|
|
1430
|
-
toReturn['
|
|
1419
|
+
if (typeof this.locations !== 'undefined' && this.locations !== null) {
|
|
1420
|
+
toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
|
|
1431
1421
|
}
|
|
1432
1422
|
if (typeof this.gifs !== 'undefined') {
|
|
1433
1423
|
toReturn['gifs'] = this.gifs;
|
|
@@ -1435,15 +1425,12 @@ class EditMultilocationPostRequest {
|
|
|
1435
1425
|
if (typeof this.videos !== 'undefined') {
|
|
1436
1426
|
toReturn['videos'] = this.videos;
|
|
1437
1427
|
}
|
|
1438
|
-
if (typeof this.locations !== 'undefined' && this.locations !== null) {
|
|
1439
|
-
toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
|
|
1440
|
-
}
|
|
1441
1428
|
return toReturn;
|
|
1442
1429
|
}
|
|
1443
1430
|
}
|
|
1444
|
-
class
|
|
1431
|
+
class CreateMultilocationPostResponse {
|
|
1445
1432
|
static fromProto(proto) {
|
|
1446
|
-
let m = new
|
|
1433
|
+
let m = new CreateMultilocationPostResponse();
|
|
1447
1434
|
m = Object.assign(m, proto);
|
|
1448
1435
|
if (proto.post) {
|
|
1449
1436
|
m.post = MultilocationPost.fromProto(proto.post);
|
|
@@ -1470,12 +1457,21 @@ class EditMultilocationPostResponse {
|
|
|
1470
1457
|
return toReturn;
|
|
1471
1458
|
}
|
|
1472
1459
|
}
|
|
1473
|
-
class
|
|
1460
|
+
class CreatePostTemplateRequest {
|
|
1474
1461
|
static fromProto(proto) {
|
|
1475
|
-
let m = new
|
|
1462
|
+
let m = new CreatePostTemplateRequest();
|
|
1476
1463
|
m = Object.assign(m, proto);
|
|
1477
|
-
if (proto.
|
|
1478
|
-
m.
|
|
1464
|
+
if (proto.postDateTime) {
|
|
1465
|
+
m.postDateTime = new Date(proto.postDateTime);
|
|
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);
|
|
1479
1475
|
}
|
|
1480
1476
|
return m;
|
|
1481
1477
|
}
|
|
@@ -1487,67 +1483,54 @@ class PartnerListScheduledSocialPostsRequestFilters {
|
|
|
1487
1483
|
}
|
|
1488
1484
|
toApiJson() {
|
|
1489
1485
|
const toReturn = {};
|
|
1490
|
-
if (typeof this.
|
|
1491
|
-
toReturn['
|
|
1486
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
1487
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
1492
1488
|
}
|
|
1493
|
-
if (typeof this.
|
|
1494
|
-
toReturn['
|
|
1489
|
+
if (typeof this.title !== 'undefined') {
|
|
1490
|
+
toReturn['title'] = this.title;
|
|
1495
1491
|
}
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
}
|
|
1499
|
-
class GenerateCSVForPerformanceStatsRequest {
|
|
1500
|
-
static fromProto(proto) {
|
|
1501
|
-
let m = new GenerateCSVForPerformanceStatsRequest();
|
|
1502
|
-
m = Object.assign(m, proto);
|
|
1503
|
-
if (proto.postData) {
|
|
1504
|
-
m.postData = proto.postData.map(PostData.fromProto);
|
|
1492
|
+
if (typeof this.postText !== 'undefined') {
|
|
1493
|
+
toReturn['postText'] = this.postText;
|
|
1505
1494
|
}
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
constructor(kwargs) {
|
|
1509
|
-
if (!kwargs) {
|
|
1510
|
-
return;
|
|
1495
|
+
if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
|
|
1496
|
+
toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
|
|
1511
1497
|
}
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
toApiJson() {
|
|
1515
|
-
const toReturn = {};
|
|
1516
|
-
if (typeof this.businessId !== 'undefined') {
|
|
1517
|
-
toReturn['businessId'] = this.businessId;
|
|
1498
|
+
if (typeof this.gmbPostCustomization !== 'undefined') {
|
|
1499
|
+
toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
|
|
1518
1500
|
}
|
|
1519
|
-
if (typeof this.
|
|
1520
|
-
toReturn['
|
|
1501
|
+
if (typeof this.imageUrl !== 'undefined') {
|
|
1502
|
+
toReturn['imageUrl'] = this.imageUrl;
|
|
1521
1503
|
}
|
|
1522
|
-
if (typeof this.
|
|
1523
|
-
toReturn['
|
|
1504
|
+
if (typeof this.imagePath !== 'undefined') {
|
|
1505
|
+
toReturn['imagePath'] = this.imagePath;
|
|
1524
1506
|
}
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
}
|
|
1528
|
-
class GenerateCSVForPerformanceStatsResponse {
|
|
1529
|
-
static fromProto(proto) {
|
|
1530
|
-
let m = new GenerateCSVForPerformanceStatsResponse();
|
|
1531
|
-
m = Object.assign(m, proto);
|
|
1532
|
-
return m;
|
|
1533
|
-
}
|
|
1534
|
-
constructor(kwargs) {
|
|
1535
|
-
if (!kwargs) {
|
|
1536
|
-
return;
|
|
1507
|
+
if (typeof this.imageSize !== 'undefined') {
|
|
1508
|
+
toReturn['imageSize'] = this.imageSize;
|
|
1537
1509
|
}
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1510
|
+
if (typeof this.previews !== 'undefined') {
|
|
1511
|
+
toReturn['previews'] = this.previews;
|
|
1512
|
+
}
|
|
1513
|
+
if (typeof this.options !== 'undefined') {
|
|
1514
|
+
toReturn['options'] = this.options;
|
|
1515
|
+
}
|
|
1516
|
+
if (typeof this.videoUrl !== 'undefined') {
|
|
1517
|
+
toReturn['videoUrl'] = this.videoUrl;
|
|
1518
|
+
}
|
|
1519
|
+
if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
|
|
1520
|
+
toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
|
|
1521
|
+
}
|
|
1522
|
+
if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
|
|
1523
|
+
toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
|
|
1524
|
+
}
|
|
1525
|
+
if (typeof this.postType !== 'undefined') {
|
|
1526
|
+
toReturn['postType'] = this.postType;
|
|
1544
1527
|
}
|
|
1545
1528
|
return toReturn;
|
|
1546
1529
|
}
|
|
1547
1530
|
}
|
|
1548
|
-
class
|
|
1531
|
+
class CreatePostTemplateResponse {
|
|
1549
1532
|
static fromProto(proto) {
|
|
1550
|
-
let m = new
|
|
1533
|
+
let m = new CreatePostTemplateResponse();
|
|
1551
1534
|
m = Object.assign(m, proto);
|
|
1552
1535
|
return m;
|
|
1553
1536
|
}
|
|
@@ -1559,16 +1542,22 @@ class GetGeneratedCSVForPerformanceStatsRequest {
|
|
|
1559
1542
|
}
|
|
1560
1543
|
toApiJson() {
|
|
1561
1544
|
const toReturn = {};
|
|
1562
|
-
if (typeof this.
|
|
1563
|
-
toReturn['
|
|
1545
|
+
if (typeof this.templateId !== 'undefined') {
|
|
1546
|
+
toReturn['templateId'] = this.templateId;
|
|
1564
1547
|
}
|
|
1565
1548
|
return toReturn;
|
|
1566
1549
|
}
|
|
1567
1550
|
}
|
|
1568
|
-
class
|
|
1551
|
+
class DateRangeFilter {
|
|
1569
1552
|
static fromProto(proto) {
|
|
1570
|
-
let m = new
|
|
1553
|
+
let m = new DateRangeFilter();
|
|
1571
1554
|
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
|
+
}
|
|
1572
1561
|
return m;
|
|
1573
1562
|
}
|
|
1574
1563
|
constructor(kwargs) {
|
|
@@ -1579,15 +1568,18 @@ class GetGeneratedCSVForPerformanceStatsResponse {
|
|
|
1579
1568
|
}
|
|
1580
1569
|
toApiJson() {
|
|
1581
1570
|
const toReturn = {};
|
|
1582
|
-
if (typeof this.
|
|
1583
|
-
toReturn['
|
|
1571
|
+
if (typeof this.beginRange !== 'undefined' && this.beginRange !== null) {
|
|
1572
|
+
toReturn['beginRange'] = 'toApiJson' in this.beginRange ? this.beginRange.toApiJson() : this.beginRange;
|
|
1573
|
+
}
|
|
1574
|
+
if (typeof this.endRange !== 'undefined' && this.endRange !== null) {
|
|
1575
|
+
toReturn['endRange'] = 'toApiJson' in this.endRange ? this.endRange.toApiJson() : this.endRange;
|
|
1584
1576
|
}
|
|
1585
1577
|
return toReturn;
|
|
1586
1578
|
}
|
|
1587
1579
|
}
|
|
1588
|
-
class
|
|
1580
|
+
class DeleteHashtagsRequest {
|
|
1589
1581
|
static fromProto(proto) {
|
|
1590
|
-
let m = new
|
|
1582
|
+
let m = new DeleteHashtagsRequest();
|
|
1591
1583
|
m = Object.assign(m, proto);
|
|
1592
1584
|
return m;
|
|
1593
1585
|
}
|
|
@@ -1599,8 +1591,8 @@ class GetMultiSocialPostStatsRequest {
|
|
|
1599
1591
|
}
|
|
1600
1592
|
toApiJson() {
|
|
1601
1593
|
const toReturn = {};
|
|
1602
|
-
if (typeof this.
|
|
1603
|
-
toReturn['
|
|
1594
|
+
if (typeof this.keyword !== 'undefined') {
|
|
1595
|
+
toReturn['keyword'] = this.keyword;
|
|
1604
1596
|
}
|
|
1605
1597
|
if (typeof this.businessId !== 'undefined') {
|
|
1606
1598
|
toReturn['businessId'] = this.businessId;
|
|
@@ -1611,13 +1603,10 @@ class GetMultiSocialPostStatsRequest {
|
|
|
1611
1603
|
return toReturn;
|
|
1612
1604
|
}
|
|
1613
1605
|
}
|
|
1614
|
-
class
|
|
1606
|
+
class DeleteMultilocationPostRequest {
|
|
1615
1607
|
static fromProto(proto) {
|
|
1616
|
-
let m = new
|
|
1608
|
+
let m = new DeleteMultilocationPostRequest();
|
|
1617
1609
|
m = Object.assign(m, proto);
|
|
1618
|
-
if (proto.socialPostStats) {
|
|
1619
|
-
m.socialPostStats = proto.socialPostStats.map(SocialPostStats.fromProto);
|
|
1620
|
-
}
|
|
1621
1610
|
return m;
|
|
1622
1611
|
}
|
|
1623
1612
|
constructor(kwargs) {
|
|
@@ -1628,15 +1617,18 @@ class GetMultiSocialPostStatsResponse {
|
|
|
1628
1617
|
}
|
|
1629
1618
|
toApiJson() {
|
|
1630
1619
|
const toReturn = {};
|
|
1631
|
-
if (typeof this.
|
|
1632
|
-
toReturn['
|
|
1620
|
+
if (typeof this.brandId !== 'undefined') {
|
|
1621
|
+
toReturn['brandId'] = this.brandId;
|
|
1622
|
+
}
|
|
1623
|
+
if (typeof this.multilocationId !== 'undefined') {
|
|
1624
|
+
toReturn['multilocationId'] = this.multilocationId;
|
|
1633
1625
|
}
|
|
1634
1626
|
return toReturn;
|
|
1635
1627
|
}
|
|
1636
1628
|
}
|
|
1637
|
-
class
|
|
1629
|
+
class DeletePostTemplateRequest {
|
|
1638
1630
|
static fromProto(proto) {
|
|
1639
|
-
let m = new
|
|
1631
|
+
let m = new DeletePostTemplateRequest();
|
|
1640
1632
|
m = Object.assign(m, proto);
|
|
1641
1633
|
return m;
|
|
1642
1634
|
}
|
|
@@ -1648,22 +1640,19 @@ class GetMultiSocialPostsRequest {
|
|
|
1648
1640
|
}
|
|
1649
1641
|
toApiJson() {
|
|
1650
1642
|
const toReturn = {};
|
|
1651
|
-
if (typeof this.
|
|
1652
|
-
toReturn['
|
|
1643
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
1644
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
1653
1645
|
}
|
|
1654
|
-
if (typeof this.
|
|
1655
|
-
toReturn['
|
|
1646
|
+
if (typeof this.templateId !== 'undefined') {
|
|
1647
|
+
toReturn['templateId'] = this.templateId;
|
|
1656
1648
|
}
|
|
1657
1649
|
return toReturn;
|
|
1658
1650
|
}
|
|
1659
1651
|
}
|
|
1660
|
-
class
|
|
1652
|
+
class DeleteSocialPostRequest {
|
|
1661
1653
|
static fromProto(proto) {
|
|
1662
|
-
let m = new
|
|
1654
|
+
let m = new DeleteSocialPostRequest();
|
|
1663
1655
|
m = Object.assign(m, proto);
|
|
1664
|
-
if (proto.socialPosts) {
|
|
1665
|
-
m.socialPosts = proto.socialPosts.map(SocialPost$1.fromProto);
|
|
1666
|
-
}
|
|
1667
1656
|
return m;
|
|
1668
1657
|
}
|
|
1669
1658
|
constructor(kwargs) {
|
|
@@ -1674,16 +1663,28 @@ class GetMultiSocialPostsResponse {
|
|
|
1674
1663
|
}
|
|
1675
1664
|
toApiJson() {
|
|
1676
1665
|
const toReturn = {};
|
|
1677
|
-
if (typeof this.
|
|
1678
|
-
toReturn['
|
|
1666
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1667
|
+
toReturn['businessId'] = this.businessId;
|
|
1668
|
+
}
|
|
1669
|
+
if (typeof this.socialPostId !== 'undefined') {
|
|
1670
|
+
toReturn['socialPostId'] = this.socialPostId;
|
|
1679
1671
|
}
|
|
1680
1672
|
return toReturn;
|
|
1681
1673
|
}
|
|
1682
1674
|
}
|
|
1683
|
-
class
|
|
1675
|
+
class EditMultilocationPostRequest {
|
|
1684
1676
|
static fromProto(proto) {
|
|
1685
|
-
let m = new
|
|
1677
|
+
let m = new EditMultilocationPostRequest();
|
|
1686
1678
|
m = Object.assign(m, proto);
|
|
1679
|
+
if (proto.scheduledDate) {
|
|
1680
|
+
m.scheduledDate = new Date(proto.scheduledDate);
|
|
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);
|
|
1687
|
+
}
|
|
1687
1688
|
return m;
|
|
1688
1689
|
}
|
|
1689
1690
|
constructor(kwargs) {
|
|
@@ -1700,15 +1701,39 @@ class GetMultilocationPostRequest {
|
|
|
1700
1701
|
if (typeof this.multilocationId !== 'undefined') {
|
|
1701
1702
|
toReturn['multilocationId'] = this.multilocationId;
|
|
1702
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;
|
|
1724
|
+
}
|
|
1703
1725
|
return toReturn;
|
|
1704
1726
|
}
|
|
1705
1727
|
}
|
|
1706
|
-
class
|
|
1728
|
+
class EditMultilocationPostResponse {
|
|
1707
1729
|
static fromProto(proto) {
|
|
1708
|
-
let m = new
|
|
1730
|
+
let m = new EditMultilocationPostResponse();
|
|
1709
1731
|
m = Object.assign(m, proto);
|
|
1710
|
-
if (proto.
|
|
1711
|
-
m.
|
|
1732
|
+
if (proto.post) {
|
|
1733
|
+
m.post = MultilocationPost.fromProto(proto.post);
|
|
1734
|
+
}
|
|
1735
|
+
if (proto.errors) {
|
|
1736
|
+
m.errors = proto.errors.map(MultilocationPostError.fromProto);
|
|
1712
1737
|
}
|
|
1713
1738
|
return m;
|
|
1714
1739
|
}
|
|
@@ -1720,16 +1745,22 @@ class GetMultilocationPostResponse {
|
|
|
1720
1745
|
}
|
|
1721
1746
|
toApiJson() {
|
|
1722
1747
|
const toReturn = {};
|
|
1723
|
-
if (typeof this.
|
|
1724
|
-
toReturn['
|
|
1748
|
+
if (typeof this.post !== 'undefined' && this.post !== null) {
|
|
1749
|
+
toReturn['post'] = 'toApiJson' in this.post ? this.post.toApiJson() : this.post;
|
|
1750
|
+
}
|
|
1751
|
+
if (typeof this.errors !== 'undefined' && this.errors !== null) {
|
|
1752
|
+
toReturn['errors'] = 'toApiJson' in this.errors ? this.errors.toApiJson() : this.errors;
|
|
1725
1753
|
}
|
|
1726
1754
|
return toReturn;
|
|
1727
1755
|
}
|
|
1728
1756
|
}
|
|
1729
|
-
class
|
|
1757
|
+
class PartnerListScheduledSocialPostsRequestFilters {
|
|
1730
1758
|
static fromProto(proto) {
|
|
1731
|
-
let m = new
|
|
1759
|
+
let m = new PartnerListScheduledSocialPostsRequestFilters();
|
|
1732
1760
|
m = Object.assign(m, proto);
|
|
1761
|
+
if (proto.dateRange) {
|
|
1762
|
+
m.dateRange = DateRangeFilter.fromProto(proto.dateRange);
|
|
1763
|
+
}
|
|
1733
1764
|
return m;
|
|
1734
1765
|
}
|
|
1735
1766
|
constructor(kwargs) {
|
|
@@ -1740,21 +1771,21 @@ class GetPostTemplateRequest {
|
|
|
1740
1771
|
}
|
|
1741
1772
|
toApiJson() {
|
|
1742
1773
|
const toReturn = {};
|
|
1743
|
-
if (typeof this.
|
|
1744
|
-
toReturn['
|
|
1774
|
+
if (typeof this.dateRange !== 'undefined' && this.dateRange !== null) {
|
|
1775
|
+
toReturn['dateRange'] = 'toApiJson' in this.dateRange ? this.dateRange.toApiJson() : this.dateRange;
|
|
1745
1776
|
}
|
|
1746
|
-
if (typeof this.
|
|
1747
|
-
toReturn['
|
|
1777
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
1778
|
+
toReturn['partnerId'] = this.partnerId;
|
|
1748
1779
|
}
|
|
1749
1780
|
return toReturn;
|
|
1750
1781
|
}
|
|
1751
1782
|
}
|
|
1752
|
-
class
|
|
1783
|
+
class GenerateCSVForPerformanceStatsRequest {
|
|
1753
1784
|
static fromProto(proto) {
|
|
1754
|
-
let m = new
|
|
1785
|
+
let m = new GenerateCSVForPerformanceStatsRequest();
|
|
1755
1786
|
m = Object.assign(m, proto);
|
|
1756
|
-
if (proto.
|
|
1757
|
-
m.
|
|
1787
|
+
if (proto.postData) {
|
|
1788
|
+
m.postData = proto.postData.map(PostData.fromProto);
|
|
1758
1789
|
}
|
|
1759
1790
|
return m;
|
|
1760
1791
|
}
|
|
@@ -1766,11 +1797,264 @@ class GetPostTemplateResponse {
|
|
|
1766
1797
|
}
|
|
1767
1798
|
toApiJson() {
|
|
1768
1799
|
const toReturn = {};
|
|
1769
|
-
if (typeof this.
|
|
1770
|
-
toReturn['
|
|
1800
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1801
|
+
toReturn['businessId'] = this.businessId;
|
|
1771
1802
|
}
|
|
1772
|
-
|
|
1773
|
-
|
|
1803
|
+
if (typeof this.postData !== 'undefined' && this.postData !== null) {
|
|
1804
|
+
toReturn['postData'] = 'toApiJson' in this.postData ? this.postData.toApiJson() : this.postData;
|
|
1805
|
+
}
|
|
1806
|
+
if (typeof this.includeHeaders !== 'undefined') {
|
|
1807
|
+
toReturn['includeHeaders'] = this.includeHeaders;
|
|
1808
|
+
}
|
|
1809
|
+
return toReturn;
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1812
|
+
class GenerateCSVForPerformanceStatsResponse {
|
|
1813
|
+
static fromProto(proto) {
|
|
1814
|
+
let m = new GenerateCSVForPerformanceStatsResponse();
|
|
1815
|
+
m = Object.assign(m, proto);
|
|
1816
|
+
return m;
|
|
1817
|
+
}
|
|
1818
|
+
constructor(kwargs) {
|
|
1819
|
+
if (!kwargs) {
|
|
1820
|
+
return;
|
|
1821
|
+
}
|
|
1822
|
+
Object.assign(this, kwargs);
|
|
1823
|
+
}
|
|
1824
|
+
toApiJson() {
|
|
1825
|
+
const toReturn = {};
|
|
1826
|
+
if (typeof this.generatedId !== 'undefined') {
|
|
1827
|
+
toReturn['generatedId'] = this.generatedId;
|
|
1828
|
+
}
|
|
1829
|
+
return toReturn;
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
class GetGeneratedCSVForPerformanceStatsRequest {
|
|
1833
|
+
static fromProto(proto) {
|
|
1834
|
+
let m = new GetGeneratedCSVForPerformanceStatsRequest();
|
|
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
|
+
}
|
|
1774
2058
|
}
|
|
1775
2059
|
class GetScheduledPostCountRequest {
|
|
1776
2060
|
static fromProto(proto) {
|
|
@@ -1907,7 +2191,7 @@ class ListMultilocationPostsForBrandResponse {
|
|
|
1907
2191
|
m.multilocationPosts = proto.multilocationPosts.map(MultilocationPost.fromProto);
|
|
1908
2192
|
}
|
|
1909
2193
|
if (proto.failedSocialPosts) {
|
|
1910
|
-
m.failedSocialPosts = proto.failedSocialPosts.map(SocialPost
|
|
2194
|
+
m.failedSocialPosts = proto.failedSocialPosts.map(SocialPost.fromProto);
|
|
1911
2195
|
}
|
|
1912
2196
|
return m;
|
|
1913
2197
|
}
|
|
@@ -2111,7 +2395,7 @@ class ListSocialPostsResponse {
|
|
|
2111
2395
|
let m = new ListSocialPostsResponse();
|
|
2112
2396
|
m = Object.assign(m, proto);
|
|
2113
2397
|
if (proto.socialPosts) {
|
|
2114
|
-
m.socialPosts = proto.socialPosts.map(SocialPost
|
|
2398
|
+
m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
|
|
2115
2399
|
}
|
|
2116
2400
|
return m;
|
|
2117
2401
|
}
|
|
@@ -2210,7 +2494,7 @@ class PartnerListScheduledPostsResponse {
|
|
|
2210
2494
|
let m = new PartnerListScheduledPostsResponse();
|
|
2211
2495
|
m = Object.assign(m, proto);
|
|
2212
2496
|
if (proto.socialPosts) {
|
|
2213
|
-
m.socialPosts = proto.socialPosts.map(SocialPost
|
|
2497
|
+
m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
|
|
2214
2498
|
}
|
|
2215
2499
|
return m;
|
|
2216
2500
|
}
|
|
@@ -2378,7 +2662,7 @@ class RemoveFromMultilocationPostRequest {
|
|
|
2378
2662
|
let m = new RemoveFromMultilocationPostRequest();
|
|
2379
2663
|
m = Object.assign(m, proto);
|
|
2380
2664
|
if (proto.reason) {
|
|
2381
|
-
m.reason = enumStringToValue$
|
|
2665
|
+
m.reason = enumStringToValue$2(RemoveReason, proto.reason);
|
|
2382
2666
|
}
|
|
2383
2667
|
if (proto.locations) {
|
|
2384
2668
|
m.locations = proto.locations.map(Location.fromProto);
|
|
@@ -2520,280 +2804,11 @@ class ScheduleToAllPagesRequest {
|
|
|
2520
2804
|
}
|
|
2521
2805
|
class ScheduleToAllPagesResponse {
|
|
2522
2806
|
static fromProto(proto) {
|
|
2523
|
-
let m = new ScheduleToAllPagesResponse();
|
|
2524
|
-
m = Object.assign(m, proto);
|
|
2525
|
-
if (proto.statuses) {
|
|
2526
|
-
m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
|
|
2527
|
-
}
|
|
2528
|
-
return m;
|
|
2529
|
-
}
|
|
2530
|
-
constructor(kwargs) {
|
|
2531
|
-
if (!kwargs) {
|
|
2532
|
-
return;
|
|
2533
|
-
}
|
|
2534
|
-
Object.assign(this, kwargs);
|
|
2535
|
-
}
|
|
2536
|
-
toApiJson() {
|
|
2537
|
-
const toReturn = {};
|
|
2538
|
-
if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
|
|
2539
|
-
toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
|
|
2540
|
-
}
|
|
2541
|
-
return toReturn;
|
|
2542
|
-
}
|
|
2543
|
-
}
|
|
2544
|
-
class SearchHashtagRequest {
|
|
2545
|
-
static fromProto(proto) {
|
|
2546
|
-
let m = new SearchHashtagRequest();
|
|
2547
|
-
m = Object.assign(m, proto);
|
|
2548
|
-
if (proto.limit) {
|
|
2549
|
-
m.limit = parseInt(proto.limit, 10);
|
|
2550
|
-
}
|
|
2551
|
-
return m;
|
|
2552
|
-
}
|
|
2553
|
-
constructor(kwargs) {
|
|
2554
|
-
if (!kwargs) {
|
|
2555
|
-
return;
|
|
2556
|
-
}
|
|
2557
|
-
Object.assign(this, kwargs);
|
|
2558
|
-
}
|
|
2559
|
-
toApiJson() {
|
|
2560
|
-
const toReturn = {};
|
|
2561
|
-
if (typeof this.searchTerm !== 'undefined') {
|
|
2562
|
-
toReturn['searchTerm'] = this.searchTerm;
|
|
2563
|
-
}
|
|
2564
|
-
if (typeof this.limit !== 'undefined') {
|
|
2565
|
-
toReturn['limit'] = this.limit;
|
|
2566
|
-
}
|
|
2567
|
-
if (typeof this.businessId !== 'undefined') {
|
|
2568
|
-
toReturn['businessId'] = this.businessId;
|
|
2569
|
-
}
|
|
2570
|
-
if (typeof this.partnerId !== 'undefined') {
|
|
2571
|
-
toReturn['partnerId'] = this.partnerId;
|
|
2572
|
-
}
|
|
2573
|
-
return toReturn;
|
|
2574
|
-
}
|
|
2575
|
-
}
|
|
2576
|
-
class SearchHashtagResponse {
|
|
2577
|
-
static fromProto(proto) {
|
|
2578
|
-
let m = new SearchHashtagResponse();
|
|
2579
|
-
m = Object.assign(m, proto);
|
|
2580
|
-
if (proto.hashtags) {
|
|
2581
|
-
m.hashtags = proto.hashtags.map(Hashtag.fromProto);
|
|
2582
|
-
}
|
|
2583
|
-
return m;
|
|
2584
|
-
}
|
|
2585
|
-
constructor(kwargs) {
|
|
2586
|
-
if (!kwargs) {
|
|
2587
|
-
return;
|
|
2588
|
-
}
|
|
2589
|
-
Object.assign(this, kwargs);
|
|
2590
|
-
}
|
|
2591
|
-
toApiJson() {
|
|
2592
|
-
const toReturn = {};
|
|
2593
|
-
if (typeof this.hashtags !== 'undefined' && this.hashtags !== null) {
|
|
2594
|
-
toReturn['hashtags'] = 'toApiJson' in this.hashtags ? this.hashtags.toApiJson() : this.hashtags;
|
|
2595
|
-
}
|
|
2596
|
-
return toReturn;
|
|
2597
|
-
}
|
|
2598
|
-
}
|
|
2599
|
-
class SuggestMessageRequest {
|
|
2600
|
-
static fromProto(proto) {
|
|
2601
|
-
let m = new SuggestMessageRequest();
|
|
2602
|
-
m = Object.assign(m, proto);
|
|
2603
|
-
if (proto.length) {
|
|
2604
|
-
m.length = enumStringToValue$3(MessageLength, proto.length);
|
|
2605
|
-
}
|
|
2606
|
-
if (proto.type) {
|
|
2607
|
-
m.type = enumStringToValue$3(TemplateType, proto.type);
|
|
2608
|
-
}
|
|
2609
|
-
return m;
|
|
2610
|
-
}
|
|
2611
|
-
constructor(kwargs) {
|
|
2612
|
-
if (!kwargs) {
|
|
2613
|
-
return;
|
|
2614
|
-
}
|
|
2615
|
-
Object.assign(this, kwargs);
|
|
2616
|
-
}
|
|
2617
|
-
toApiJson() {
|
|
2618
|
-
const toReturn = {};
|
|
2619
|
-
if (typeof this.prompt !== 'undefined') {
|
|
2620
|
-
toReturn['prompt'] = this.prompt;
|
|
2621
|
-
}
|
|
2622
|
-
if (typeof this.businessId !== 'undefined') {
|
|
2623
|
-
toReturn['businessId'] = this.businessId;
|
|
2624
|
-
}
|
|
2625
|
-
if (typeof this.length !== 'undefined') {
|
|
2626
|
-
toReturn['length'] = this.length;
|
|
2627
|
-
}
|
|
2628
|
-
if (typeof this.type !== 'undefined') {
|
|
2629
|
-
toReturn['type'] = this.type;
|
|
2630
|
-
}
|
|
2631
|
-
return toReturn;
|
|
2632
|
-
}
|
|
2633
|
-
}
|
|
2634
|
-
class SuggestMessageResponse {
|
|
2635
|
-
static fromProto(proto) {
|
|
2636
|
-
let m = new SuggestMessageResponse();
|
|
2637
|
-
m = Object.assign(m, proto);
|
|
2638
|
-
return m;
|
|
2639
|
-
}
|
|
2640
|
-
constructor(kwargs) {
|
|
2641
|
-
if (!kwargs) {
|
|
2642
|
-
return;
|
|
2643
|
-
}
|
|
2644
|
-
Object.assign(this, kwargs);
|
|
2645
|
-
}
|
|
2646
|
-
toApiJson() {
|
|
2647
|
-
const toReturn = {};
|
|
2648
|
-
if (typeof this.message !== 'undefined') {
|
|
2649
|
-
toReturn['message'] = this.message;
|
|
2650
|
-
}
|
|
2651
|
-
return toReturn;
|
|
2652
|
-
}
|
|
2653
|
-
}
|
|
2654
|
-
class UpdatePostTemplateRequest {
|
|
2655
|
-
static fromProto(proto) {
|
|
2656
|
-
let m = new UpdatePostTemplateRequest();
|
|
2657
|
-
m = Object.assign(m, proto);
|
|
2658
|
-
if (proto.postDateTime) {
|
|
2659
|
-
m.postDateTime = new Date(proto.postDateTime);
|
|
2660
|
-
}
|
|
2661
|
-
if (proto.mediaEntries) {
|
|
2662
|
-
m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
|
|
2663
|
-
}
|
|
2664
|
-
if (proto.metaData) {
|
|
2665
|
-
m.metaData = proto.metaData.map(MetaData.fromProto);
|
|
2666
|
-
}
|
|
2667
|
-
if (proto.postType) {
|
|
2668
|
-
m.postType = enumStringToValue$3(PostType$1, proto.postType);
|
|
2669
|
-
}
|
|
2670
|
-
return m;
|
|
2671
|
-
}
|
|
2672
|
-
constructor(kwargs) {
|
|
2673
|
-
if (!kwargs) {
|
|
2674
|
-
return;
|
|
2675
|
-
}
|
|
2676
|
-
Object.assign(this, kwargs);
|
|
2677
|
-
}
|
|
2678
|
-
toApiJson() {
|
|
2679
|
-
const toReturn = {};
|
|
2680
|
-
if (typeof this.accountGroupId !== 'undefined') {
|
|
2681
|
-
toReturn['accountGroupId'] = this.accountGroupId;
|
|
2682
|
-
}
|
|
2683
|
-
if (typeof this.templateId !== 'undefined') {
|
|
2684
|
-
toReturn['templateId'] = this.templateId;
|
|
2685
|
-
}
|
|
2686
|
-
if (typeof this.title !== 'undefined') {
|
|
2687
|
-
toReturn['title'] = this.title;
|
|
2688
|
-
}
|
|
2689
|
-
if (typeof this.postText !== 'undefined') {
|
|
2690
|
-
toReturn['postText'] = this.postText;
|
|
2691
|
-
}
|
|
2692
|
-
if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
|
|
2693
|
-
toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
|
|
2694
|
-
}
|
|
2695
|
-
if (typeof this.gmbPostCustomization !== 'undefined') {
|
|
2696
|
-
toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
|
|
2697
|
-
}
|
|
2698
|
-
if (typeof this.imageUrl !== 'undefined') {
|
|
2699
|
-
toReturn['imageUrl'] = this.imageUrl;
|
|
2700
|
-
}
|
|
2701
|
-
if (typeof this.imagePath !== 'undefined') {
|
|
2702
|
-
toReturn['imagePath'] = this.imagePath;
|
|
2703
|
-
}
|
|
2704
|
-
if (typeof this.imageSize !== 'undefined') {
|
|
2705
|
-
toReturn['imageSize'] = this.imageSize;
|
|
2706
|
-
}
|
|
2707
|
-
if (typeof this.previews !== 'undefined') {
|
|
2708
|
-
toReturn['previews'] = this.previews;
|
|
2709
|
-
}
|
|
2710
|
-
if (typeof this.options !== 'undefined') {
|
|
2711
|
-
toReturn['options'] = this.options;
|
|
2712
|
-
}
|
|
2713
|
-
if (typeof this.videoUrl !== 'undefined') {
|
|
2714
|
-
toReturn['videoUrl'] = this.videoUrl;
|
|
2715
|
-
}
|
|
2716
|
-
if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
|
|
2717
|
-
toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
|
|
2718
|
-
}
|
|
2719
|
-
if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
|
|
2720
|
-
toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
|
|
2721
|
-
}
|
|
2722
|
-
if (typeof this.postType !== 'undefined') {
|
|
2723
|
-
toReturn['postType'] = this.postType;
|
|
2724
|
-
}
|
|
2725
|
-
return toReturn;
|
|
2726
|
-
}
|
|
2727
|
-
}
|
|
2728
|
-
|
|
2729
|
-
function enumStringToValue$2(enumRef, value) {
|
|
2730
|
-
if (typeof value === 'number') {
|
|
2731
|
-
return value;
|
|
2732
|
-
}
|
|
2733
|
-
return enumRef[value];
|
|
2734
|
-
}
|
|
2735
|
-
class Link {
|
|
2736
|
-
static fromProto(proto) {
|
|
2737
|
-
let m = new Link();
|
|
2738
|
-
m = Object.assign(m, proto);
|
|
2739
|
-
return m;
|
|
2740
|
-
}
|
|
2741
|
-
constructor(kwargs) {
|
|
2742
|
-
if (!kwargs) {
|
|
2743
|
-
return;
|
|
2744
|
-
}
|
|
2745
|
-
Object.assign(this, kwargs);
|
|
2746
|
-
}
|
|
2747
|
-
toApiJson() {
|
|
2748
|
-
const toReturn = {};
|
|
2749
|
-
if (typeof this.name !== 'undefined') {
|
|
2750
|
-
toReturn['name'] = this.name;
|
|
2751
|
-
}
|
|
2752
|
-
if (typeof this.picture !== 'undefined') {
|
|
2753
|
-
toReturn['picture'] = this.picture;
|
|
2754
|
-
}
|
|
2755
|
-
if (typeof this.description !== 'undefined') {
|
|
2756
|
-
toReturn['description'] = this.description;
|
|
2757
|
-
}
|
|
2758
|
-
if (typeof this.title !== 'undefined') {
|
|
2759
|
-
toReturn['title'] = this.title;
|
|
2760
|
-
}
|
|
2761
|
-
if (typeof this.url !== 'undefined') {
|
|
2762
|
-
toReturn['url'] = this.url;
|
|
2763
|
-
}
|
|
2764
|
-
if (typeof this.shortcode !== 'undefined') {
|
|
2765
|
-
toReturn['shortcode'] = this.shortcode;
|
|
2766
|
-
}
|
|
2767
|
-
return toReturn;
|
|
2768
|
-
}
|
|
2769
|
-
}
|
|
2770
|
-
class Metadata {
|
|
2771
|
-
static fromProto(proto) {
|
|
2772
|
-
let m = new Metadata();
|
|
2773
|
-
m = Object.assign(m, proto);
|
|
2774
|
-
return m;
|
|
2775
|
-
}
|
|
2776
|
-
constructor(kwargs) {
|
|
2777
|
-
if (!kwargs) {
|
|
2778
|
-
return;
|
|
2779
|
-
}
|
|
2780
|
-
Object.assign(this, kwargs);
|
|
2781
|
-
}
|
|
2782
|
-
toApiJson() {
|
|
2783
|
-
const toReturn = {};
|
|
2784
|
-
if (typeof this.name !== 'undefined') {
|
|
2785
|
-
toReturn['name'] = this.name;
|
|
2786
|
-
}
|
|
2787
|
-
if (typeof this.value !== 'undefined') {
|
|
2788
|
-
toReturn['value'] = this.value;
|
|
2789
|
-
}
|
|
2790
|
-
return toReturn;
|
|
2791
|
-
}
|
|
2792
|
-
}
|
|
2793
|
-
class PostAction {
|
|
2794
|
-
static fromProto(proto) {
|
|
2795
|
-
let m = new PostAction();
|
|
2807
|
+
let m = new ScheduleToAllPagesResponse();
|
|
2796
2808
|
m = Object.assign(m, proto);
|
|
2809
|
+
if (proto.statuses) {
|
|
2810
|
+
m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
|
|
2811
|
+
}
|
|
2797
2812
|
return m;
|
|
2798
2813
|
}
|
|
2799
2814
|
constructor(kwargs) {
|
|
@@ -2804,24 +2819,18 @@ class PostAction {
|
|
|
2804
2819
|
}
|
|
2805
2820
|
toApiJson() {
|
|
2806
2821
|
const toReturn = {};
|
|
2807
|
-
if (typeof this.
|
|
2808
|
-
toReturn['
|
|
2809
|
-
}
|
|
2810
|
-
if (typeof this.linkUrl !== 'undefined') {
|
|
2811
|
-
toReturn['linkUrl'] = this.linkUrl;
|
|
2822
|
+
if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
|
|
2823
|
+
toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
|
|
2812
2824
|
}
|
|
2813
2825
|
return toReturn;
|
|
2814
2826
|
}
|
|
2815
2827
|
}
|
|
2816
|
-
class
|
|
2828
|
+
class SearchHashtagRequest {
|
|
2817
2829
|
static fromProto(proto) {
|
|
2818
|
-
let m = new
|
|
2830
|
+
let m = new SearchHashtagRequest();
|
|
2819
2831
|
m = Object.assign(m, proto);
|
|
2820
|
-
if (proto.
|
|
2821
|
-
m.
|
|
2822
|
-
}
|
|
2823
|
-
if (proto.link) {
|
|
2824
|
-
m.link = proto.link.map(Link.fromProto);
|
|
2832
|
+
if (proto.limit) {
|
|
2833
|
+
m.limit = parseInt(proto.limit, 10);
|
|
2825
2834
|
}
|
|
2826
2835
|
return m;
|
|
2827
2836
|
}
|
|
@@ -2833,27 +2842,27 @@ class PostContent {
|
|
|
2833
2842
|
}
|
|
2834
2843
|
toApiJson() {
|
|
2835
2844
|
const toReturn = {};
|
|
2836
|
-
if (typeof this.
|
|
2837
|
-
toReturn['
|
|
2845
|
+
if (typeof this.searchTerm !== 'undefined') {
|
|
2846
|
+
toReturn['searchTerm'] = this.searchTerm;
|
|
2838
2847
|
}
|
|
2839
|
-
if (typeof this.
|
|
2840
|
-
toReturn['
|
|
2848
|
+
if (typeof this.limit !== 'undefined') {
|
|
2849
|
+
toReturn['limit'] = this.limit;
|
|
2841
2850
|
}
|
|
2842
|
-
if (typeof this.
|
|
2843
|
-
toReturn['
|
|
2851
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2852
|
+
toReturn['businessId'] = this.businessId;
|
|
2853
|
+
}
|
|
2854
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
2855
|
+
toReturn['partnerId'] = this.partnerId;
|
|
2844
2856
|
}
|
|
2845
2857
|
return toReturn;
|
|
2846
2858
|
}
|
|
2847
2859
|
}
|
|
2848
|
-
class
|
|
2860
|
+
class SearchHashtagResponse {
|
|
2849
2861
|
static fromProto(proto) {
|
|
2850
|
-
let m = new
|
|
2862
|
+
let m = new SearchHashtagResponse();
|
|
2851
2863
|
m = Object.assign(m, proto);
|
|
2852
|
-
if (proto.
|
|
2853
|
-
m.
|
|
2854
|
-
}
|
|
2855
|
-
if (proto.action) {
|
|
2856
|
-
m.action = PostAction.fromProto(proto.action);
|
|
2864
|
+
if (proto.hashtags) {
|
|
2865
|
+
m.hashtags = proto.hashtags.map(Hashtag.fromProto);
|
|
2857
2866
|
}
|
|
2858
2867
|
return m;
|
|
2859
2868
|
}
|
|
@@ -2865,24 +2874,21 @@ class PostCustomization {
|
|
|
2865
2874
|
}
|
|
2866
2875
|
toApiJson() {
|
|
2867
2876
|
const toReturn = {};
|
|
2868
|
-
if (typeof this.
|
|
2869
|
-
toReturn['
|
|
2870
|
-
}
|
|
2871
|
-
if (typeof this.action !== 'undefined' && this.action !== null) {
|
|
2872
|
-
toReturn['action'] = 'toApiJson' in this.action ? this.action.toApiJson() : this.action;
|
|
2877
|
+
if (typeof this.hashtags !== 'undefined' && this.hashtags !== null) {
|
|
2878
|
+
toReturn['hashtags'] = 'toApiJson' in this.hashtags ? this.hashtags.toApiJson() : this.hashtags;
|
|
2873
2879
|
}
|
|
2874
2880
|
return toReturn;
|
|
2875
2881
|
}
|
|
2876
2882
|
}
|
|
2877
|
-
class
|
|
2883
|
+
class SuggestMessageRequest {
|
|
2878
2884
|
static fromProto(proto) {
|
|
2879
|
-
let m = new
|
|
2885
|
+
let m = new SuggestMessageRequest();
|
|
2880
2886
|
m = Object.assign(m, proto);
|
|
2881
|
-
if (proto.
|
|
2882
|
-
m.
|
|
2887
|
+
if (proto.length) {
|
|
2888
|
+
m.length = enumStringToValue$2(MessageLength, proto.length);
|
|
2883
2889
|
}
|
|
2884
|
-
if (proto.
|
|
2885
|
-
m.
|
|
2890
|
+
if (proto.type) {
|
|
2891
|
+
m.type = enumStringToValue$2(TemplateType, proto.type);
|
|
2886
2892
|
}
|
|
2887
2893
|
return m;
|
|
2888
2894
|
}
|
|
@@ -2894,25 +2900,25 @@ class PostEvent {
|
|
|
2894
2900
|
}
|
|
2895
2901
|
toApiJson() {
|
|
2896
2902
|
const toReturn = {};
|
|
2897
|
-
if (typeof this.
|
|
2898
|
-
toReturn['
|
|
2903
|
+
if (typeof this.prompt !== 'undefined') {
|
|
2904
|
+
toReturn['prompt'] = this.prompt;
|
|
2899
2905
|
}
|
|
2900
|
-
if (typeof this.
|
|
2901
|
-
toReturn['
|
|
2906
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2907
|
+
toReturn['businessId'] = this.businessId;
|
|
2902
2908
|
}
|
|
2903
|
-
if (typeof this.
|
|
2904
|
-
toReturn['
|
|
2909
|
+
if (typeof this.length !== 'undefined') {
|
|
2910
|
+
toReturn['length'] = this.length;
|
|
2911
|
+
}
|
|
2912
|
+
if (typeof this.type !== 'undefined') {
|
|
2913
|
+
toReturn['type'] = this.type;
|
|
2905
2914
|
}
|
|
2906
2915
|
return toReturn;
|
|
2907
2916
|
}
|
|
2908
2917
|
}
|
|
2909
|
-
class
|
|
2918
|
+
class SuggestMessageResponse {
|
|
2910
2919
|
static fromProto(proto) {
|
|
2911
|
-
let m = new
|
|
2920
|
+
let m = new SuggestMessageResponse();
|
|
2912
2921
|
m = Object.assign(m, proto);
|
|
2913
|
-
if (proto.metadata) {
|
|
2914
|
-
m.metadata = proto.metadata.map(Metadata.fromProto);
|
|
2915
|
-
}
|
|
2916
2922
|
return m;
|
|
2917
2923
|
}
|
|
2918
2924
|
constructor(kwargs) {
|
|
@@ -2923,43 +2929,28 @@ class PostMedia {
|
|
|
2923
2929
|
}
|
|
2924
2930
|
toApiJson() {
|
|
2925
2931
|
const toReturn = {};
|
|
2926
|
-
if (typeof this.
|
|
2927
|
-
toReturn['
|
|
2928
|
-
}
|
|
2929
|
-
if (typeof this.mediaUrl !== 'undefined') {
|
|
2930
|
-
toReturn['mediaUrl'] = this.mediaUrl;
|
|
2931
|
-
}
|
|
2932
|
-
if (typeof this.mediaType !== 'undefined') {
|
|
2933
|
-
toReturn['mediaType'] = this.mediaType;
|
|
2934
|
-
}
|
|
2935
|
-
if (typeof this.containerId !== 'undefined') {
|
|
2936
|
-
toReturn['containerId'] = this.containerId;
|
|
2937
|
-
}
|
|
2938
|
-
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
2939
|
-
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
2932
|
+
if (typeof this.message !== 'undefined') {
|
|
2933
|
+
toReturn['message'] = this.message;
|
|
2940
2934
|
}
|
|
2941
2935
|
return toReturn;
|
|
2942
2936
|
}
|
|
2943
2937
|
}
|
|
2944
|
-
class
|
|
2938
|
+
class UpdatePostTemplateRequest {
|
|
2945
2939
|
static fromProto(proto) {
|
|
2946
|
-
let m = new
|
|
2940
|
+
let m = new UpdatePostTemplateRequest();
|
|
2947
2941
|
m = Object.assign(m, proto);
|
|
2948
|
-
if (proto.
|
|
2949
|
-
m.
|
|
2942
|
+
if (proto.postDateTime) {
|
|
2943
|
+
m.postDateTime = new Date(proto.postDateTime);
|
|
2950
2944
|
}
|
|
2951
|
-
if (proto.
|
|
2952
|
-
m.
|
|
2945
|
+
if (proto.mediaEntries) {
|
|
2946
|
+
m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
|
|
2953
2947
|
}
|
|
2954
|
-
if (proto.
|
|
2955
|
-
m.
|
|
2948
|
+
if (proto.metaData) {
|
|
2949
|
+
m.metaData = proto.metaData.map(MetaData.fromProto);
|
|
2956
2950
|
}
|
|
2957
2951
|
if (proto.postType) {
|
|
2958
2952
|
m.postType = enumStringToValue$2(PostType$1, proto.postType);
|
|
2959
2953
|
}
|
|
2960
|
-
if (proto.metadata) {
|
|
2961
|
-
m.metadata = proto.metadata.map(Metadata.fromProto);
|
|
2962
|
-
}
|
|
2963
2954
|
return m;
|
|
2964
2955
|
}
|
|
2965
2956
|
constructor(kwargs) {
|
|
@@ -2970,29 +2961,50 @@ class SocialPost {
|
|
|
2970
2961
|
}
|
|
2971
2962
|
toApiJson() {
|
|
2972
2963
|
const toReturn = {};
|
|
2973
|
-
if (typeof this.
|
|
2974
|
-
toReturn['
|
|
2964
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
2965
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
2975
2966
|
}
|
|
2976
|
-
if (typeof this.
|
|
2977
|
-
toReturn['
|
|
2967
|
+
if (typeof this.templateId !== 'undefined') {
|
|
2968
|
+
toReturn['templateId'] = this.templateId;
|
|
2978
2969
|
}
|
|
2979
|
-
if (typeof this.
|
|
2980
|
-
toReturn['
|
|
2970
|
+
if (typeof this.title !== 'undefined') {
|
|
2971
|
+
toReturn['title'] = this.title;
|
|
2981
2972
|
}
|
|
2982
|
-
if (typeof this.
|
|
2983
|
-
toReturn['
|
|
2973
|
+
if (typeof this.postText !== 'undefined') {
|
|
2974
|
+
toReturn['postText'] = this.postText;
|
|
2984
2975
|
}
|
|
2985
|
-
if (typeof this.
|
|
2986
|
-
toReturn['
|
|
2976
|
+
if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
|
|
2977
|
+
toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
|
|
2987
2978
|
}
|
|
2988
|
-
if (typeof this.
|
|
2989
|
-
toReturn['
|
|
2979
|
+
if (typeof this.gmbPostCustomization !== 'undefined') {
|
|
2980
|
+
toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
|
|
2990
2981
|
}
|
|
2991
|
-
if (typeof this.
|
|
2992
|
-
toReturn['
|
|
2982
|
+
if (typeof this.imageUrl !== 'undefined') {
|
|
2983
|
+
toReturn['imageUrl'] = this.imageUrl;
|
|
2993
2984
|
}
|
|
2994
|
-
if (typeof this.
|
|
2995
|
-
toReturn['
|
|
2985
|
+
if (typeof this.imagePath !== 'undefined') {
|
|
2986
|
+
toReturn['imagePath'] = this.imagePath;
|
|
2987
|
+
}
|
|
2988
|
+
if (typeof this.imageSize !== 'undefined') {
|
|
2989
|
+
toReturn['imageSize'] = this.imageSize;
|
|
2990
|
+
}
|
|
2991
|
+
if (typeof this.previews !== 'undefined') {
|
|
2992
|
+
toReturn['previews'] = this.previews;
|
|
2993
|
+
}
|
|
2994
|
+
if (typeof this.options !== 'undefined') {
|
|
2995
|
+
toReturn['options'] = this.options;
|
|
2996
|
+
}
|
|
2997
|
+
if (typeof this.videoUrl !== 'undefined') {
|
|
2998
|
+
toReturn['videoUrl'] = this.videoUrl;
|
|
2999
|
+
}
|
|
3000
|
+
if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
|
|
3001
|
+
toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
|
|
3002
|
+
}
|
|
3003
|
+
if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
|
|
3004
|
+
toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
|
|
3005
|
+
}
|
|
3006
|
+
if (typeof this.postType !== 'undefined') {
|
|
3007
|
+
toReturn['postType'] = this.postType;
|
|
2996
3008
|
}
|
|
2997
3009
|
return toReturn;
|
|
2998
3010
|
}
|
|
@@ -3243,6 +3255,9 @@ class SocialPostOutput {
|
|
|
3243
3255
|
if (proto.metadata) {
|
|
3244
3256
|
m.metadata = proto.metadata.map(Metadata.fromProto);
|
|
3245
3257
|
}
|
|
3258
|
+
if (proto.status) {
|
|
3259
|
+
m.status = enumStringToValue(PostStatus, proto.status);
|
|
3260
|
+
}
|
|
3246
3261
|
return m;
|
|
3247
3262
|
}
|
|
3248
3263
|
constructor(kwargs) {
|
|
@@ -3262,6 +3277,12 @@ class SocialPostOutput {
|
|
|
3262
3277
|
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
3263
3278
|
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
3264
3279
|
}
|
|
3280
|
+
if (typeof this.status !== 'undefined') {
|
|
3281
|
+
toReturn['status'] = this.status;
|
|
3282
|
+
}
|
|
3283
|
+
if (typeof this.statusMessage !== 'undefined') {
|
|
3284
|
+
toReturn['statusMessage'] = this.statusMessage;
|
|
3285
|
+
}
|
|
3265
3286
|
return toReturn;
|
|
3266
3287
|
}
|
|
3267
3288
|
}
|
|
@@ -3311,6 +3332,91 @@ class SocialPostResponse {
|
|
|
3311
3332
|
return toReturn;
|
|
3312
3333
|
}
|
|
3313
3334
|
}
|
|
3335
|
+
class UpdateSocialPostRequest {
|
|
3336
|
+
static fromProto(proto) {
|
|
3337
|
+
let m = new UpdateSocialPostRequest();
|
|
3338
|
+
m = Object.assign(m, proto);
|
|
3339
|
+
if (proto.socialPost) {
|
|
3340
|
+
m.socialPost = SocialPost.fromProto(proto.socialPost);
|
|
3341
|
+
}
|
|
3342
|
+
if (proto.metadata) {
|
|
3343
|
+
m.metadata = proto.metadata.map(Metadata.fromProto);
|
|
3344
|
+
}
|
|
3345
|
+
return m;
|
|
3346
|
+
}
|
|
3347
|
+
constructor(kwargs) {
|
|
3348
|
+
if (!kwargs) {
|
|
3349
|
+
return;
|
|
3350
|
+
}
|
|
3351
|
+
Object.assign(this, kwargs);
|
|
3352
|
+
}
|
|
3353
|
+
toApiJson() {
|
|
3354
|
+
const toReturn = {};
|
|
3355
|
+
if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
|
|
3356
|
+
toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
|
|
3357
|
+
}
|
|
3358
|
+
if (typeof this.isError !== 'undefined') {
|
|
3359
|
+
toReturn['isError'] = this.isError;
|
|
3360
|
+
}
|
|
3361
|
+
if (typeof this.errors !== 'undefined') {
|
|
3362
|
+
toReturn['errors'] = this.errors;
|
|
3363
|
+
}
|
|
3364
|
+
if (typeof this.errorCategory !== 'undefined') {
|
|
3365
|
+
toReturn['errorCategory'] = this.errorCategory;
|
|
3366
|
+
}
|
|
3367
|
+
if (typeof this.postId !== 'undefined') {
|
|
3368
|
+
toReturn['postId'] = this.postId;
|
|
3369
|
+
}
|
|
3370
|
+
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
3371
|
+
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
3372
|
+
}
|
|
3373
|
+
if (typeof this.permalink !== 'undefined') {
|
|
3374
|
+
toReturn['permalink'] = this.permalink;
|
|
3375
|
+
}
|
|
3376
|
+
return toReturn;
|
|
3377
|
+
}
|
|
3378
|
+
}
|
|
3379
|
+
class UpdateSocialPostResponse {
|
|
3380
|
+
static fromProto(proto) {
|
|
3381
|
+
let m = new UpdateSocialPostResponse();
|
|
3382
|
+
m = Object.assign(m, proto);
|
|
3383
|
+
if (proto.socialPost) {
|
|
3384
|
+
m.socialPost = SocialPost.fromProto(proto.socialPost);
|
|
3385
|
+
}
|
|
3386
|
+
if (proto.metadata) {
|
|
3387
|
+
m.metadata = proto.metadata.map(Metadata.fromProto);
|
|
3388
|
+
}
|
|
3389
|
+
return m;
|
|
3390
|
+
}
|
|
3391
|
+
constructor(kwargs) {
|
|
3392
|
+
if (!kwargs) {
|
|
3393
|
+
return;
|
|
3394
|
+
}
|
|
3395
|
+
Object.assign(this, kwargs);
|
|
3396
|
+
}
|
|
3397
|
+
toApiJson() {
|
|
3398
|
+
const toReturn = {};
|
|
3399
|
+
if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
|
|
3400
|
+
toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
|
|
3401
|
+
}
|
|
3402
|
+
if (typeof this.isError !== 'undefined') {
|
|
3403
|
+
toReturn['isError'] = this.isError;
|
|
3404
|
+
}
|
|
3405
|
+
if (typeof this.errors !== 'undefined') {
|
|
3406
|
+
toReturn['errors'] = this.errors;
|
|
3407
|
+
}
|
|
3408
|
+
if (typeof this.errorCategory !== 'undefined') {
|
|
3409
|
+
toReturn['errorCategory'] = this.errorCategory;
|
|
3410
|
+
}
|
|
3411
|
+
if (typeof this.postId !== 'undefined') {
|
|
3412
|
+
toReturn['postId'] = this.postId;
|
|
3413
|
+
}
|
|
3414
|
+
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
3415
|
+
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
3416
|
+
}
|
|
3417
|
+
return toReturn;
|
|
3418
|
+
}
|
|
3419
|
+
}
|
|
3314
3420
|
|
|
3315
3421
|
// *********************************
|
|
3316
3422
|
|
|
@@ -3720,6 +3826,11 @@ class SocialPostsV2ApiService {
|
|
|
3720
3826
|
return this.http.post(this._host + "/socialposts.v2.SocialPostsV2/ScheduleSocialPosts", request.toApiJson(), this.apiOptions())
|
|
3721
3827
|
.pipe(map(resp => SocialPostResponse.fromProto(resp)));
|
|
3722
3828
|
}
|
|
3829
|
+
updateSocialPosts(r) {
|
|
3830
|
+
const request = (r.toApiJson) ? r : new UpdateSocialPostRequest(r);
|
|
3831
|
+
return this.http.post(this._host + "/socialposts.v2.SocialPostsV2/UpdateSocialPosts", request.toApiJson(), this.apiOptions())
|
|
3832
|
+
.pipe(map(resp => UpdateSocialPostResponse.fromProto(resp)));
|
|
3833
|
+
}
|
|
3723
3834
|
createImages(r) {
|
|
3724
3835
|
const request = (r.toApiJson) ? r : new CreateImageRequest(r);
|
|
3725
3836
|
return this.http.post(this._host + "/socialposts.v2.SocialPostsV2/CreateImages", request.toApiJson(), this.apiOptions())
|