@vendasta/social-posts 5.8.0 → 5.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/_internal/enums/index.mjs +1 -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 +41 -1
- package/esm2020/lib/_internal/objects/api.mjs +2 -2
- package/esm2020/lib/_internal/objects/index.mjs +2 -2
- package/esm2020/lib/_internal/objects/social-post-v2.mjs +4 -1
- package/esm2020/lib/_internal/social-posts-v2.api.service.mjs +7 -2
- package/esm2020/lib/index.mjs +2 -1
- package/esm2020/lib/social-post-v2.service.mjs +25 -0
- package/esm2020/public_api.mjs +1 -1
- package/fesm2015/vendasta-social-posts.mjs +810 -742
- package/fesm2015/vendasta-social-posts.mjs.map +1 -1
- package/fesm2020/vendasta-social-posts.mjs +810 -742
- package/fesm2020/vendasta-social-posts.mjs.map +1 -1
- package/lib/_internal/interfaces/api-v2.interface.d.ts +6 -0
- package/lib/_internal/interfaces/index.d.ts +1 -1
- package/lib/_internal/interfaces/social-post-v2.interface.d.ts +1 -0
- package/lib/_internal/objects/api-v2.d.ts +12 -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 +1 -0
- package/lib/_internal/social-posts-v2.api.service.d.ts +3 -2
- package/lib/index.d.ts +1 -0
- package/lib/social-post-v2.service.d.ts +12 -0
- package/package.json +1 -1
|
@@ -867,7 +867,7 @@ function enumStringToValue$5(enumRef, value) {
|
|
|
867
867
|
}
|
|
868
868
|
return enumRef[value];
|
|
869
869
|
}
|
|
870
|
-
class
|
|
870
|
+
class Link {
|
|
871
871
|
constructor(kwargs) {
|
|
872
872
|
if (!kwargs) {
|
|
873
873
|
return;
|
|
@@ -875,52 +875,34 @@ class FacebookPostStats {
|
|
|
875
875
|
Object.assign(this, kwargs);
|
|
876
876
|
}
|
|
877
877
|
static fromProto(proto) {
|
|
878
|
-
let m = new
|
|
878
|
+
let m = new Link();
|
|
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
|
-
}
|
|
895
880
|
return m;
|
|
896
881
|
}
|
|
897
882
|
toApiJson() {
|
|
898
883
|
const toReturn = {};
|
|
899
|
-
if (typeof this.
|
|
900
|
-
toReturn['
|
|
901
|
-
}
|
|
902
|
-
if (typeof this.shareCount !== 'undefined') {
|
|
903
|
-
toReturn['shareCount'] = this.shareCount;
|
|
884
|
+
if (typeof this.name !== 'undefined') {
|
|
885
|
+
toReturn['name'] = this.name;
|
|
904
886
|
}
|
|
905
|
-
if (typeof this.
|
|
906
|
-
toReturn['
|
|
887
|
+
if (typeof this.picture !== 'undefined') {
|
|
888
|
+
toReturn['picture'] = this.picture;
|
|
907
889
|
}
|
|
908
|
-
if (typeof this.
|
|
909
|
-
toReturn['
|
|
890
|
+
if (typeof this.description !== 'undefined') {
|
|
891
|
+
toReturn['description'] = this.description;
|
|
910
892
|
}
|
|
911
|
-
if (typeof this.
|
|
912
|
-
toReturn['
|
|
893
|
+
if (typeof this.title !== 'undefined') {
|
|
894
|
+
toReturn['title'] = this.title;
|
|
913
895
|
}
|
|
914
|
-
if (typeof this.
|
|
915
|
-
toReturn['
|
|
896
|
+
if (typeof this.url !== 'undefined') {
|
|
897
|
+
toReturn['url'] = this.url;
|
|
916
898
|
}
|
|
917
|
-
if (typeof this.
|
|
918
|
-
toReturn['
|
|
899
|
+
if (typeof this.shortcode !== 'undefined') {
|
|
900
|
+
toReturn['shortcode'] = this.shortcode;
|
|
919
901
|
}
|
|
920
902
|
return toReturn;
|
|
921
903
|
}
|
|
922
904
|
}
|
|
923
|
-
class
|
|
905
|
+
class Metadata {
|
|
924
906
|
constructor(kwargs) {
|
|
925
907
|
if (!kwargs) {
|
|
926
908
|
return;
|
|
@@ -928,31 +910,22 @@ class SocialPostStats {
|
|
|
928
910
|
Object.assign(this, kwargs);
|
|
929
911
|
}
|
|
930
912
|
static fromProto(proto) {
|
|
931
|
-
let m = new
|
|
913
|
+
let m = new Metadata();
|
|
932
914
|
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
|
-
}
|
|
939
915
|
return m;
|
|
940
916
|
}
|
|
941
917
|
toApiJson() {
|
|
942
918
|
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;
|
|
919
|
+
if (typeof this.name !== 'undefined') {
|
|
920
|
+
toReturn['name'] = this.name;
|
|
948
921
|
}
|
|
949
|
-
if (typeof this.
|
|
950
|
-
toReturn['
|
|
922
|
+
if (typeof this.value !== 'undefined') {
|
|
923
|
+
toReturn['value'] = this.value;
|
|
951
924
|
}
|
|
952
925
|
return toReturn;
|
|
953
926
|
}
|
|
954
927
|
}
|
|
955
|
-
class
|
|
928
|
+
class PostAction {
|
|
956
929
|
constructor(kwargs) {
|
|
957
930
|
if (!kwargs) {
|
|
958
931
|
return;
|
|
@@ -960,41 +933,22 @@ class TwitterPostStats {
|
|
|
960
933
|
Object.assign(this, kwargs);
|
|
961
934
|
}
|
|
962
935
|
static fromProto(proto) {
|
|
963
|
-
let m = new
|
|
936
|
+
let m = new PostAction();
|
|
964
937
|
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
|
-
}
|
|
971
938
|
return m;
|
|
972
939
|
}
|
|
973
940
|
toApiJson() {
|
|
974
941
|
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;
|
|
942
|
+
if (typeof this.type !== 'undefined') {
|
|
943
|
+
toReturn['type'] = this.type;
|
|
983
944
|
}
|
|
984
|
-
if (typeof this.
|
|
985
|
-
toReturn['
|
|
945
|
+
if (typeof this.linkUrl !== 'undefined') {
|
|
946
|
+
toReturn['linkUrl'] = this.linkUrl;
|
|
986
947
|
}
|
|
987
948
|
return toReturn;
|
|
988
949
|
}
|
|
989
950
|
}
|
|
990
|
-
|
|
991
|
-
function enumStringToValue$4(enumRef, value) {
|
|
992
|
-
if (typeof value === 'number') {
|
|
993
|
-
return value;
|
|
994
|
-
}
|
|
995
|
-
return enumRef[value];
|
|
996
|
-
}
|
|
997
|
-
class TenorGifMediaEntry {
|
|
951
|
+
class PostContent {
|
|
998
952
|
constructor(kwargs) {
|
|
999
953
|
if (!kwargs) {
|
|
1000
954
|
return;
|
|
@@ -1002,25 +956,31 @@ class TenorGifMediaEntry {
|
|
|
1002
956
|
Object.assign(this, kwargs);
|
|
1003
957
|
}
|
|
1004
958
|
static fromProto(proto) {
|
|
1005
|
-
let m = new
|
|
959
|
+
let m = new PostContent();
|
|
1006
960
|
m = Object.assign(m, proto);
|
|
1007
|
-
if (proto.
|
|
1008
|
-
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);
|
|
1009
966
|
}
|
|
1010
967
|
return m;
|
|
1011
968
|
}
|
|
1012
969
|
toApiJson() {
|
|
1013
970
|
const toReturn = {};
|
|
1014
|
-
if (typeof this.
|
|
1015
|
-
toReturn['
|
|
971
|
+
if (typeof this.postText !== 'undefined') {
|
|
972
|
+
toReturn['postText'] = this.postText;
|
|
1016
973
|
}
|
|
1017
|
-
if (typeof this.
|
|
1018
|
-
toReturn['
|
|
974
|
+
if (typeof this.media !== 'undefined' && this.media !== null) {
|
|
975
|
+
toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
|
|
976
|
+
}
|
|
977
|
+
if (typeof this.link !== 'undefined' && this.link !== null) {
|
|
978
|
+
toReturn['link'] = 'toApiJson' in this.link ? this.link.toApiJson() : this.link;
|
|
1019
979
|
}
|
|
1020
980
|
return toReturn;
|
|
1021
981
|
}
|
|
1022
982
|
}
|
|
1023
|
-
class
|
|
983
|
+
class PostCustomization {
|
|
1024
984
|
constructor(kwargs) {
|
|
1025
985
|
if (!kwargs) {
|
|
1026
986
|
return;
|
|
@@ -1028,37 +988,28 @@ class TenorGif {
|
|
|
1028
988
|
Object.assign(this, kwargs);
|
|
1029
989
|
}
|
|
1030
990
|
static fromProto(proto) {
|
|
1031
|
-
let m = new
|
|
991
|
+
let m = new PostCustomization();
|
|
1032
992
|
m = Object.assign(m, proto);
|
|
1033
|
-
if (proto.
|
|
1034
|
-
m.
|
|
993
|
+
if (proto.event) {
|
|
994
|
+
m.event = PostEvent.fromProto(proto.event);
|
|
995
|
+
}
|
|
996
|
+
if (proto.action) {
|
|
997
|
+
m.action = PostAction.fromProto(proto.action);
|
|
1035
998
|
}
|
|
1036
999
|
return m;
|
|
1037
1000
|
}
|
|
1038
1001
|
toApiJson() {
|
|
1039
1002
|
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;
|
|
1003
|
+
if (typeof this.event !== 'undefined' && this.event !== null) {
|
|
1004
|
+
toReturn['event'] = 'toApiJson' in this.event ? this.event.toApiJson() : this.event;
|
|
1054
1005
|
}
|
|
1055
|
-
if (typeof this.
|
|
1056
|
-
toReturn['
|
|
1006
|
+
if (typeof this.action !== 'undefined' && this.action !== null) {
|
|
1007
|
+
toReturn['action'] = 'toApiJson' in this.action ? this.action.toApiJson() : this.action;
|
|
1057
1008
|
}
|
|
1058
1009
|
return toReturn;
|
|
1059
1010
|
}
|
|
1060
1011
|
}
|
|
1061
|
-
class
|
|
1012
|
+
class PostEvent {
|
|
1062
1013
|
constructor(kwargs) {
|
|
1063
1014
|
if (!kwargs) {
|
|
1064
1015
|
return;
|
|
@@ -1066,41 +1017,31 @@ class TenorMediaObject {
|
|
|
1066
1017
|
Object.assign(this, kwargs);
|
|
1067
1018
|
}
|
|
1068
1019
|
static fromProto(proto) {
|
|
1069
|
-
let m = new
|
|
1020
|
+
let m = new PostEvent();
|
|
1070
1021
|
m = Object.assign(m, proto);
|
|
1071
|
-
if (proto.
|
|
1072
|
-
m.
|
|
1022
|
+
if (proto.start) {
|
|
1023
|
+
m.start = new Date(proto.start);
|
|
1073
1024
|
}
|
|
1074
|
-
if (proto.
|
|
1075
|
-
m.
|
|
1025
|
+
if (proto.end) {
|
|
1026
|
+
m.end = new Date(proto.end);
|
|
1076
1027
|
}
|
|
1077
1028
|
return m;
|
|
1078
1029
|
}
|
|
1079
1030
|
toApiJson() {
|
|
1080
1031
|
const toReturn = {};
|
|
1081
|
-
if (typeof this.
|
|
1082
|
-
toReturn['
|
|
1083
|
-
}
|
|
1084
|
-
if (typeof this.url !== 'undefined') {
|
|
1085
|
-
toReturn['url'] = this.url;
|
|
1032
|
+
if (typeof this.title !== 'undefined') {
|
|
1033
|
+
toReturn['title'] = this.title;
|
|
1086
1034
|
}
|
|
1087
|
-
if (typeof this.
|
|
1088
|
-
toReturn['
|
|
1035
|
+
if (typeof this.start !== 'undefined' && this.start !== null) {
|
|
1036
|
+
toReturn['start'] = 'toApiJson' in this.start ? this.start.toApiJson() : this.start;
|
|
1089
1037
|
}
|
|
1090
|
-
if (typeof this.
|
|
1091
|
-
toReturn['
|
|
1038
|
+
if (typeof this.end !== 'undefined' && this.end !== null) {
|
|
1039
|
+
toReturn['end'] = 'toApiJson' in this.end ? this.end.toApiJson() : this.end;
|
|
1092
1040
|
}
|
|
1093
1041
|
return toReturn;
|
|
1094
1042
|
}
|
|
1095
1043
|
}
|
|
1096
|
-
|
|
1097
|
-
function enumStringToValue$3(enumRef, value) {
|
|
1098
|
-
if (typeof value === 'number') {
|
|
1099
|
-
return value;
|
|
1100
|
-
}
|
|
1101
|
-
return enumRef[value];
|
|
1102
|
-
}
|
|
1103
|
-
class CreateMultilocationPostRequest {
|
|
1044
|
+
class PostMedia {
|
|
1104
1045
|
constructor(kwargs) {
|
|
1105
1046
|
if (!kwargs) {
|
|
1106
1047
|
return;
|
|
@@ -1108,43 +1049,34 @@ class CreateMultilocationPostRequest {
|
|
|
1108
1049
|
Object.assign(this, kwargs);
|
|
1109
1050
|
}
|
|
1110
1051
|
static fromProto(proto) {
|
|
1111
|
-
let m = new
|
|
1052
|
+
let m = new PostMedia();
|
|
1112
1053
|
m = Object.assign(m, proto);
|
|
1113
|
-
if (proto.
|
|
1114
|
-
m.
|
|
1115
|
-
}
|
|
1116
|
-
if (proto.locations) {
|
|
1117
|
-
m.locations = proto.locations.map(Location.fromProto);
|
|
1054
|
+
if (proto.metadata) {
|
|
1055
|
+
m.metadata = proto.metadata.map(Metadata.fromProto);
|
|
1118
1056
|
}
|
|
1119
1057
|
return m;
|
|
1120
1058
|
}
|
|
1121
1059
|
toApiJson() {
|
|
1122
1060
|
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;
|
|
1061
|
+
if (typeof this.mediaId !== 'undefined') {
|
|
1062
|
+
toReturn['mediaId'] = this.mediaId;
|
|
1131
1063
|
}
|
|
1132
|
-
if (typeof this.
|
|
1133
|
-
toReturn['
|
|
1064
|
+
if (typeof this.mediaUrl !== 'undefined') {
|
|
1065
|
+
toReturn['mediaUrl'] = this.mediaUrl;
|
|
1134
1066
|
}
|
|
1135
|
-
if (typeof this.
|
|
1136
|
-
toReturn['
|
|
1067
|
+
if (typeof this.mediaType !== 'undefined') {
|
|
1068
|
+
toReturn['mediaType'] = this.mediaType;
|
|
1137
1069
|
}
|
|
1138
|
-
if (typeof this.
|
|
1139
|
-
toReturn['
|
|
1070
|
+
if (typeof this.containerId !== 'undefined') {
|
|
1071
|
+
toReturn['containerId'] = this.containerId;
|
|
1140
1072
|
}
|
|
1141
|
-
if (typeof this.
|
|
1142
|
-
toReturn['
|
|
1073
|
+
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
1074
|
+
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
1143
1075
|
}
|
|
1144
1076
|
return toReturn;
|
|
1145
1077
|
}
|
|
1146
1078
|
}
|
|
1147
|
-
class
|
|
1079
|
+
class SocialPost {
|
|
1148
1080
|
constructor(kwargs) {
|
|
1149
1081
|
if (!kwargs) {
|
|
1150
1082
|
return;
|
|
@@ -1152,99 +1084,56 @@ class CreateMultilocationPostResponse {
|
|
|
1152
1084
|
Object.assign(this, kwargs);
|
|
1153
1085
|
}
|
|
1154
1086
|
static fromProto(proto) {
|
|
1155
|
-
let m = new
|
|
1087
|
+
let m = new SocialPost();
|
|
1156
1088
|
m = Object.assign(m, proto);
|
|
1157
|
-
if (proto.
|
|
1158
|
-
m.
|
|
1089
|
+
if (proto.postContent) {
|
|
1090
|
+
m.postContent = PostContent.fromProto(proto.postContent);
|
|
1159
1091
|
}
|
|
1160
|
-
if (proto.
|
|
1161
|
-
m.
|
|
1092
|
+
if (proto.scheduled) {
|
|
1093
|
+
m.scheduled = new Date(proto.scheduled);
|
|
1094
|
+
}
|
|
1095
|
+
if (proto.customization) {
|
|
1096
|
+
m.customization = PostCustomization.fromProto(proto.customization);
|
|
1097
|
+
}
|
|
1098
|
+
if (proto.postType) {
|
|
1099
|
+
m.postType = enumStringToValue$5(PostType$1, proto.postType);
|
|
1162
1100
|
}
|
|
1163
1101
|
return m;
|
|
1164
1102
|
}
|
|
1165
1103
|
toApiJson() {
|
|
1166
1104
|
const toReturn = {};
|
|
1167
|
-
if (typeof this.
|
|
1168
|
-
toReturn['
|
|
1105
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1106
|
+
toReturn['businessId'] = this.businessId;
|
|
1169
1107
|
}
|
|
1170
|
-
if (typeof this.
|
|
1171
|
-
toReturn['
|
|
1108
|
+
if (typeof this.socialServiceId !== 'undefined') {
|
|
1109
|
+
toReturn['socialServiceId'] = this.socialServiceId;
|
|
1172
1110
|
}
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
}
|
|
1176
|
-
class CreatePostTemplateRequest {
|
|
1177
|
-
constructor(kwargs) {
|
|
1178
|
-
if (!kwargs) {
|
|
1179
|
-
return;
|
|
1111
|
+
if (typeof this.postContent !== 'undefined' && this.postContent !== null) {
|
|
1112
|
+
toReturn['postContent'] = 'toApiJson' in this.postContent ? this.postContent.toApiJson() : this.postContent;
|
|
1180
1113
|
}
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
static fromProto(proto) {
|
|
1184
|
-
let m = new CreatePostTemplateRequest();
|
|
1185
|
-
m = Object.assign(m, proto);
|
|
1186
|
-
if (proto.postDateTime) {
|
|
1187
|
-
m.postDateTime = new Date(proto.postDateTime);
|
|
1188
|
-
}
|
|
1189
|
-
if (proto.mediaEntries) {
|
|
1190
|
-
m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
|
|
1191
|
-
}
|
|
1192
|
-
if (proto.metaData) {
|
|
1193
|
-
m.metaData = proto.metaData.map(MetaData.fromProto);
|
|
1194
|
-
}
|
|
1195
|
-
if (proto.postType) {
|
|
1196
|
-
m.postType = enumStringToValue$3(PostType$1, proto.postType);
|
|
1197
|
-
}
|
|
1198
|
-
return m;
|
|
1199
|
-
}
|
|
1200
|
-
toApiJson() {
|
|
1201
|
-
const toReturn = {};
|
|
1202
|
-
if (typeof this.accountGroupId !== 'undefined') {
|
|
1203
|
-
toReturn['accountGroupId'] = this.accountGroupId;
|
|
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;
|
|
1225
|
-
}
|
|
1226
|
-
if (typeof this.previews !== 'undefined') {
|
|
1227
|
-
toReturn['previews'] = this.previews;
|
|
1228
|
-
}
|
|
1229
|
-
if (typeof this.options !== 'undefined') {
|
|
1230
|
-
toReturn['options'] = this.options;
|
|
1231
|
-
}
|
|
1232
|
-
if (typeof this.videoUrl !== 'undefined') {
|
|
1233
|
-
toReturn['videoUrl'] = this.videoUrl;
|
|
1234
|
-
}
|
|
1235
|
-
if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
|
|
1236
|
-
toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
|
|
1114
|
+
if (typeof this.scheduled !== 'undefined' && this.scheduled !== null) {
|
|
1115
|
+
toReturn['scheduled'] = 'toApiJson' in this.scheduled ? this.scheduled.toApiJson() : this.scheduled;
|
|
1237
1116
|
}
|
|
1238
|
-
if (typeof this.
|
|
1239
|
-
toReturn['
|
|
1117
|
+
if (typeof this.customization !== 'undefined' && this.customization !== null) {
|
|
1118
|
+
toReturn['customization'] = 'toApiJson' in this.customization ? this.customization.toApiJson() : this.customization;
|
|
1240
1119
|
}
|
|
1241
1120
|
if (typeof this.postType !== 'undefined') {
|
|
1242
1121
|
toReturn['postType'] = this.postType;
|
|
1243
1122
|
}
|
|
1123
|
+
if (typeof this.internalPostId !== 'undefined') {
|
|
1124
|
+
toReturn['internalPostId'] = this.internalPostId;
|
|
1125
|
+
}
|
|
1244
1126
|
return toReturn;
|
|
1245
1127
|
}
|
|
1246
1128
|
}
|
|
1247
|
-
|
|
1129
|
+
|
|
1130
|
+
function enumStringToValue$4(enumRef, value) {
|
|
1131
|
+
if (typeof value === 'number') {
|
|
1132
|
+
return value;
|
|
1133
|
+
}
|
|
1134
|
+
return enumRef[value];
|
|
1135
|
+
}
|
|
1136
|
+
class FacebookPostStats {
|
|
1248
1137
|
constructor(kwargs) {
|
|
1249
1138
|
if (!kwargs) {
|
|
1250
1139
|
return;
|
|
@@ -1252,19 +1141,52 @@ class CreatePostTemplateResponse {
|
|
|
1252
1141
|
Object.assign(this, kwargs);
|
|
1253
1142
|
}
|
|
1254
1143
|
static fromProto(proto) {
|
|
1255
|
-
let m = new
|
|
1144
|
+
let m = new FacebookPostStats();
|
|
1256
1145
|
m = Object.assign(m, proto);
|
|
1146
|
+
if (proto.commentCount) {
|
|
1147
|
+
m.commentCount = parseInt(proto.commentCount, 10);
|
|
1148
|
+
}
|
|
1149
|
+
if (proto.shareCount) {
|
|
1150
|
+
m.shareCount = parseInt(proto.shareCount, 10);
|
|
1151
|
+
}
|
|
1152
|
+
if (proto.likeCount) {
|
|
1153
|
+
m.likeCount = parseInt(proto.likeCount, 10);
|
|
1154
|
+
}
|
|
1155
|
+
if (proto.reactions) {
|
|
1156
|
+
m.reactions = parseInt(proto.reactions, 10);
|
|
1157
|
+
}
|
|
1158
|
+
if (proto.peopleReached) {
|
|
1159
|
+
m.peopleReached = parseInt(proto.peopleReached, 10);
|
|
1160
|
+
}
|
|
1257
1161
|
return m;
|
|
1258
1162
|
}
|
|
1259
1163
|
toApiJson() {
|
|
1260
1164
|
const toReturn = {};
|
|
1261
|
-
if (typeof this.
|
|
1262
|
-
toReturn['
|
|
1165
|
+
if (typeof this.commentCount !== 'undefined') {
|
|
1166
|
+
toReturn['commentCount'] = this.commentCount;
|
|
1167
|
+
}
|
|
1168
|
+
if (typeof this.shareCount !== 'undefined') {
|
|
1169
|
+
toReturn['shareCount'] = this.shareCount;
|
|
1170
|
+
}
|
|
1171
|
+
if (typeof this.likeCount !== 'undefined') {
|
|
1172
|
+
toReturn['likeCount'] = this.likeCount;
|
|
1173
|
+
}
|
|
1174
|
+
if (typeof this.hasLike !== 'undefined') {
|
|
1175
|
+
toReturn['hasLike'] = this.hasLike;
|
|
1176
|
+
}
|
|
1177
|
+
if (typeof this.canLike !== 'undefined') {
|
|
1178
|
+
toReturn['canLike'] = this.canLike;
|
|
1179
|
+
}
|
|
1180
|
+
if (typeof this.reactions !== 'undefined') {
|
|
1181
|
+
toReturn['reactions'] = this.reactions;
|
|
1182
|
+
}
|
|
1183
|
+
if (typeof this.peopleReached !== 'undefined') {
|
|
1184
|
+
toReturn['peopleReached'] = this.peopleReached;
|
|
1263
1185
|
}
|
|
1264
1186
|
return toReturn;
|
|
1265
1187
|
}
|
|
1266
1188
|
}
|
|
1267
|
-
class
|
|
1189
|
+
class SocialPostStats {
|
|
1268
1190
|
constructor(kwargs) {
|
|
1269
1191
|
if (!kwargs) {
|
|
1270
1192
|
return;
|
|
@@ -1272,28 +1194,31 @@ class DateRangeFilter {
|
|
|
1272
1194
|
Object.assign(this, kwargs);
|
|
1273
1195
|
}
|
|
1274
1196
|
static fromProto(proto) {
|
|
1275
|
-
let m = new
|
|
1197
|
+
let m = new SocialPostStats();
|
|
1276
1198
|
m = Object.assign(m, proto);
|
|
1277
|
-
if (proto.
|
|
1278
|
-
m.
|
|
1199
|
+
if (proto.facebookPostStats) {
|
|
1200
|
+
m.facebookPostStats = FacebookPostStats.fromProto(proto.facebookPostStats);
|
|
1279
1201
|
}
|
|
1280
|
-
if (proto.
|
|
1281
|
-
m.
|
|
1202
|
+
if (proto.twitterPostStats) {
|
|
1203
|
+
m.twitterPostStats = TwitterPostStats.fromProto(proto.twitterPostStats);
|
|
1282
1204
|
}
|
|
1283
1205
|
return m;
|
|
1284
1206
|
}
|
|
1285
1207
|
toApiJson() {
|
|
1286
1208
|
const toReturn = {};
|
|
1287
|
-
if (typeof this.
|
|
1288
|
-
toReturn['
|
|
1209
|
+
if (typeof this.internalPostId !== 'undefined') {
|
|
1210
|
+
toReturn['internalPostId'] = this.internalPostId;
|
|
1289
1211
|
}
|
|
1290
|
-
if (typeof this.
|
|
1291
|
-
toReturn['
|
|
1212
|
+
if (typeof this.facebookPostStats !== 'undefined' && this.facebookPostStats !== null) {
|
|
1213
|
+
toReturn['facebookPostStats'] = 'toApiJson' in this.facebookPostStats ? this.facebookPostStats.toApiJson() : this.facebookPostStats;
|
|
1214
|
+
}
|
|
1215
|
+
if (typeof this.twitterPostStats !== 'undefined' && this.twitterPostStats !== null) {
|
|
1216
|
+
toReturn['twitterPostStats'] = 'toApiJson' in this.twitterPostStats ? this.twitterPostStats.toApiJson() : this.twitterPostStats;
|
|
1292
1217
|
}
|
|
1293
1218
|
return toReturn;
|
|
1294
1219
|
}
|
|
1295
1220
|
}
|
|
1296
|
-
class
|
|
1221
|
+
class TwitterPostStats {
|
|
1297
1222
|
constructor(kwargs) {
|
|
1298
1223
|
if (!kwargs) {
|
|
1299
1224
|
return;
|
|
@@ -1301,25 +1226,41 @@ class DeleteHashtagsRequest {
|
|
|
1301
1226
|
Object.assign(this, kwargs);
|
|
1302
1227
|
}
|
|
1303
1228
|
static fromProto(proto) {
|
|
1304
|
-
let m = new
|
|
1229
|
+
let m = new TwitterPostStats();
|
|
1305
1230
|
m = Object.assign(m, proto);
|
|
1231
|
+
if (proto.favourites) {
|
|
1232
|
+
m.favourites = parseInt(proto.favourites, 10);
|
|
1233
|
+
}
|
|
1234
|
+
if (proto.retweets) {
|
|
1235
|
+
m.retweets = parseInt(proto.retweets, 10);
|
|
1236
|
+
}
|
|
1306
1237
|
return m;
|
|
1307
1238
|
}
|
|
1308
1239
|
toApiJson() {
|
|
1309
1240
|
const toReturn = {};
|
|
1310
|
-
if (typeof this.
|
|
1311
|
-
toReturn['
|
|
1241
|
+
if (typeof this.favourites !== 'undefined') {
|
|
1242
|
+
toReturn['favourites'] = this.favourites;
|
|
1312
1243
|
}
|
|
1313
|
-
if (typeof this.
|
|
1314
|
-
toReturn['
|
|
1244
|
+
if (typeof this.hasFavourited !== 'undefined') {
|
|
1245
|
+
toReturn['hasFavourited'] = this.hasFavourited;
|
|
1315
1246
|
}
|
|
1316
|
-
if (typeof this.
|
|
1317
|
-
toReturn['
|
|
1247
|
+
if (typeof this.retweets !== 'undefined') {
|
|
1248
|
+
toReturn['retweets'] = this.retweets;
|
|
1249
|
+
}
|
|
1250
|
+
if (typeof this.hasRetweeted !== 'undefined') {
|
|
1251
|
+
toReturn['hasRetweeted'] = this.hasRetweeted;
|
|
1318
1252
|
}
|
|
1319
1253
|
return toReturn;
|
|
1320
1254
|
}
|
|
1321
1255
|
}
|
|
1322
|
-
|
|
1256
|
+
|
|
1257
|
+
function enumStringToValue$3(enumRef, value) {
|
|
1258
|
+
if (typeof value === 'number') {
|
|
1259
|
+
return value;
|
|
1260
|
+
}
|
|
1261
|
+
return enumRef[value];
|
|
1262
|
+
}
|
|
1263
|
+
class TenorGifMediaEntry {
|
|
1323
1264
|
constructor(kwargs) {
|
|
1324
1265
|
if (!kwargs) {
|
|
1325
1266
|
return;
|
|
@@ -1327,22 +1268,25 @@ class DeleteMultilocationPostRequest {
|
|
|
1327
1268
|
Object.assign(this, kwargs);
|
|
1328
1269
|
}
|
|
1329
1270
|
static fromProto(proto) {
|
|
1330
|
-
let m = new
|
|
1271
|
+
let m = new TenorGifMediaEntry();
|
|
1331
1272
|
m = Object.assign(m, proto);
|
|
1273
|
+
if (proto.value) {
|
|
1274
|
+
m.value = TenorMediaObject.fromProto(proto.value);
|
|
1275
|
+
}
|
|
1332
1276
|
return m;
|
|
1333
1277
|
}
|
|
1334
1278
|
toApiJson() {
|
|
1335
1279
|
const toReturn = {};
|
|
1336
|
-
if (typeof this.
|
|
1337
|
-
toReturn['
|
|
1280
|
+
if (typeof this.key !== 'undefined') {
|
|
1281
|
+
toReturn['key'] = this.key;
|
|
1338
1282
|
}
|
|
1339
|
-
if (typeof this.
|
|
1340
|
-
toReturn['
|
|
1283
|
+
if (typeof this.value !== 'undefined' && this.value !== null) {
|
|
1284
|
+
toReturn['value'] = 'toApiJson' in this.value ? this.value.toApiJson() : this.value;
|
|
1341
1285
|
}
|
|
1342
1286
|
return toReturn;
|
|
1343
1287
|
}
|
|
1344
1288
|
}
|
|
1345
|
-
class
|
|
1289
|
+
class TenorGif {
|
|
1346
1290
|
constructor(kwargs) {
|
|
1347
1291
|
if (!kwargs) {
|
|
1348
1292
|
return;
|
|
@@ -1350,22 +1294,37 @@ class DeletePostTemplateRequest {
|
|
|
1350
1294
|
Object.assign(this, kwargs);
|
|
1351
1295
|
}
|
|
1352
1296
|
static fromProto(proto) {
|
|
1353
|
-
let m = new
|
|
1297
|
+
let m = new TenorGif();
|
|
1354
1298
|
m = Object.assign(m, proto);
|
|
1299
|
+
if (proto.media) {
|
|
1300
|
+
m.media = Object.keys(proto.media).reduce((obj, k) => { obj[k] = TenorMediaObject.fromProto(proto.media[k]); return obj; }, {});
|
|
1301
|
+
}
|
|
1355
1302
|
return m;
|
|
1356
1303
|
}
|
|
1357
1304
|
toApiJson() {
|
|
1358
1305
|
const toReturn = {};
|
|
1359
|
-
if (typeof this.
|
|
1360
|
-
toReturn['
|
|
1306
|
+
if (typeof this.media !== 'undefined' && this.media !== null) {
|
|
1307
|
+
toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
|
|
1361
1308
|
}
|
|
1362
|
-
if (typeof this.
|
|
1363
|
-
toReturn['
|
|
1309
|
+
if (typeof this.tags !== 'undefined') {
|
|
1310
|
+
toReturn['tags'] = this.tags;
|
|
1311
|
+
}
|
|
1312
|
+
if (typeof this.hasAudio !== 'undefined') {
|
|
1313
|
+
toReturn['hasAudio'] = this.hasAudio;
|
|
1314
|
+
}
|
|
1315
|
+
if (typeof this.title !== 'undefined') {
|
|
1316
|
+
toReturn['title'] = this.title;
|
|
1317
|
+
}
|
|
1318
|
+
if (typeof this.id !== 'undefined') {
|
|
1319
|
+
toReturn['id'] = this.id;
|
|
1320
|
+
}
|
|
1321
|
+
if (typeof this.created !== 'undefined') {
|
|
1322
|
+
toReturn['created'] = this.created;
|
|
1364
1323
|
}
|
|
1365
1324
|
return toReturn;
|
|
1366
1325
|
}
|
|
1367
1326
|
}
|
|
1368
|
-
class
|
|
1327
|
+
class TenorMediaObject {
|
|
1369
1328
|
constructor(kwargs) {
|
|
1370
1329
|
if (!kwargs) {
|
|
1371
1330
|
return;
|
|
@@ -1373,22 +1332,41 @@ class DeleteSocialPostRequest {
|
|
|
1373
1332
|
Object.assign(this, kwargs);
|
|
1374
1333
|
}
|
|
1375
1334
|
static fromProto(proto) {
|
|
1376
|
-
let m = new
|
|
1335
|
+
let m = new TenorMediaObject();
|
|
1377
1336
|
m = Object.assign(m, proto);
|
|
1337
|
+
if (proto.dimensions) {
|
|
1338
|
+
m.dimensions = proto.dimensions.map((i) => parseInt(i, 10));
|
|
1339
|
+
}
|
|
1340
|
+
if (proto.size) {
|
|
1341
|
+
m.size = parseInt(proto.size, 10);
|
|
1342
|
+
}
|
|
1378
1343
|
return m;
|
|
1379
1344
|
}
|
|
1380
1345
|
toApiJson() {
|
|
1381
1346
|
const toReturn = {};
|
|
1382
|
-
if (typeof this.
|
|
1383
|
-
toReturn['
|
|
1347
|
+
if (typeof this.preview !== 'undefined') {
|
|
1348
|
+
toReturn['preview'] = this.preview;
|
|
1384
1349
|
}
|
|
1385
|
-
if (typeof this.
|
|
1386
|
-
toReturn['
|
|
1350
|
+
if (typeof this.url !== 'undefined') {
|
|
1351
|
+
toReturn['url'] = this.url;
|
|
1352
|
+
}
|
|
1353
|
+
if (typeof this.dimensions !== 'undefined') {
|
|
1354
|
+
toReturn['dimensions'] = this.dimensions;
|
|
1355
|
+
}
|
|
1356
|
+
if (typeof this.size !== 'undefined') {
|
|
1357
|
+
toReturn['size'] = this.size;
|
|
1387
1358
|
}
|
|
1388
1359
|
return toReturn;
|
|
1389
1360
|
}
|
|
1390
1361
|
}
|
|
1391
|
-
|
|
1362
|
+
|
|
1363
|
+
function enumStringToValue$2(enumRef, value) {
|
|
1364
|
+
if (typeof value === 'number') {
|
|
1365
|
+
return value;
|
|
1366
|
+
}
|
|
1367
|
+
return enumRef[value];
|
|
1368
|
+
}
|
|
1369
|
+
class CreateMultilocationPostRequest {
|
|
1392
1370
|
constructor(kwargs) {
|
|
1393
1371
|
if (!kwargs) {
|
|
1394
1372
|
return;
|
|
@@ -1396,14 +1374,11 @@ class EditMultilocationPostRequest {
|
|
|
1396
1374
|
Object.assign(this, kwargs);
|
|
1397
1375
|
}
|
|
1398
1376
|
static fromProto(proto) {
|
|
1399
|
-
let m = new
|
|
1377
|
+
let m = new CreateMultilocationPostRequest();
|
|
1400
1378
|
m = Object.assign(m, proto);
|
|
1401
1379
|
if (proto.scheduledDate) {
|
|
1402
1380
|
m.scheduledDate = new Date(proto.scheduledDate);
|
|
1403
1381
|
}
|
|
1404
|
-
if (proto.fieldMask) {
|
|
1405
|
-
m.fieldMask = FieldMask.fromProto(proto.fieldMask);
|
|
1406
|
-
}
|
|
1407
1382
|
if (proto.locations) {
|
|
1408
1383
|
m.locations = proto.locations.map(Location.fromProto);
|
|
1409
1384
|
}
|
|
@@ -1414,9 +1389,6 @@ class EditMultilocationPostRequest {
|
|
|
1414
1389
|
if (typeof this.brandId !== 'undefined') {
|
|
1415
1390
|
toReturn['brandId'] = this.brandId;
|
|
1416
1391
|
}
|
|
1417
|
-
if (typeof this.multilocationId !== 'undefined') {
|
|
1418
|
-
toReturn['multilocationId'] = this.multilocationId;
|
|
1419
|
-
}
|
|
1420
1392
|
if (typeof this.text !== 'undefined') {
|
|
1421
1393
|
toReturn['text'] = this.text;
|
|
1422
1394
|
}
|
|
@@ -1426,8 +1398,8 @@ class EditMultilocationPostRequest {
|
|
|
1426
1398
|
if (typeof this.scheduledDate !== 'undefined' && this.scheduledDate !== null) {
|
|
1427
1399
|
toReturn['scheduledDate'] = 'toApiJson' in this.scheduledDate ? this.scheduledDate.toApiJson() : this.scheduledDate;
|
|
1428
1400
|
}
|
|
1429
|
-
if (typeof this.
|
|
1430
|
-
toReturn['
|
|
1401
|
+
if (typeof this.locations !== 'undefined' && this.locations !== null) {
|
|
1402
|
+
toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
|
|
1431
1403
|
}
|
|
1432
1404
|
if (typeof this.gifs !== 'undefined') {
|
|
1433
1405
|
toReturn['gifs'] = this.gifs;
|
|
@@ -1435,13 +1407,10 @@ class EditMultilocationPostRequest {
|
|
|
1435
1407
|
if (typeof this.videos !== 'undefined') {
|
|
1436
1408
|
toReturn['videos'] = this.videos;
|
|
1437
1409
|
}
|
|
1438
|
-
if (typeof this.locations !== 'undefined' && this.locations !== null) {
|
|
1439
|
-
toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
|
|
1440
|
-
}
|
|
1441
1410
|
return toReturn;
|
|
1442
1411
|
}
|
|
1443
1412
|
}
|
|
1444
|
-
class
|
|
1413
|
+
class CreateMultilocationPostResponse {
|
|
1445
1414
|
constructor(kwargs) {
|
|
1446
1415
|
if (!kwargs) {
|
|
1447
1416
|
return;
|
|
@@ -1449,7 +1418,7 @@ class EditMultilocationPostResponse {
|
|
|
1449
1418
|
Object.assign(this, kwargs);
|
|
1450
1419
|
}
|
|
1451
1420
|
static fromProto(proto) {
|
|
1452
|
-
let m = new
|
|
1421
|
+
let m = new CreateMultilocationPostResponse();
|
|
1453
1422
|
m = Object.assign(m, proto);
|
|
1454
1423
|
if (proto.post) {
|
|
1455
1424
|
m.post = MultilocationPost.fromProto(proto.post);
|
|
@@ -1470,7 +1439,7 @@ class EditMultilocationPostResponse {
|
|
|
1470
1439
|
return toReturn;
|
|
1471
1440
|
}
|
|
1472
1441
|
}
|
|
1473
|
-
class
|
|
1442
|
+
class CreatePostTemplateRequest {
|
|
1474
1443
|
constructor(kwargs) {
|
|
1475
1444
|
if (!kwargs) {
|
|
1476
1445
|
return;
|
|
@@ -1478,54 +1447,70 @@ class PartnerListScheduledSocialPostsRequestFilters {
|
|
|
1478
1447
|
Object.assign(this, kwargs);
|
|
1479
1448
|
}
|
|
1480
1449
|
static fromProto(proto) {
|
|
1481
|
-
let m = new
|
|
1450
|
+
let m = new CreatePostTemplateRequest();
|
|
1482
1451
|
m = Object.assign(m, proto);
|
|
1483
|
-
if (proto.
|
|
1484
|
-
m.
|
|
1452
|
+
if (proto.postDateTime) {
|
|
1453
|
+
m.postDateTime = new Date(proto.postDateTime);
|
|
1454
|
+
}
|
|
1455
|
+
if (proto.mediaEntries) {
|
|
1456
|
+
m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
|
|
1457
|
+
}
|
|
1458
|
+
if (proto.metaData) {
|
|
1459
|
+
m.metaData = proto.metaData.map(MetaData.fromProto);
|
|
1460
|
+
}
|
|
1461
|
+
if (proto.postType) {
|
|
1462
|
+
m.postType = enumStringToValue$2(PostType$1, proto.postType);
|
|
1485
1463
|
}
|
|
1486
1464
|
return m;
|
|
1487
1465
|
}
|
|
1488
1466
|
toApiJson() {
|
|
1489
1467
|
const toReturn = {};
|
|
1490
|
-
if (typeof this.
|
|
1491
|
-
toReturn['
|
|
1468
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
1469
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
1492
1470
|
}
|
|
1493
|
-
if (typeof this.
|
|
1494
|
-
toReturn['
|
|
1471
|
+
if (typeof this.title !== 'undefined') {
|
|
1472
|
+
toReturn['title'] = this.title;
|
|
1495
1473
|
}
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
}
|
|
1499
|
-
class GenerateCSVForPerformanceStatsRequest {
|
|
1500
|
-
constructor(kwargs) {
|
|
1501
|
-
if (!kwargs) {
|
|
1502
|
-
return;
|
|
1474
|
+
if (typeof this.postText !== 'undefined') {
|
|
1475
|
+
toReturn['postText'] = this.postText;
|
|
1503
1476
|
}
|
|
1504
|
-
|
|
1505
|
-
|
|
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);
|
|
1477
|
+
if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
|
|
1478
|
+
toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
|
|
1511
1479
|
}
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
toApiJson() {
|
|
1515
|
-
const toReturn = {};
|
|
1516
|
-
if (typeof this.businessId !== 'undefined') {
|
|
1517
|
-
toReturn['businessId'] = this.businessId;
|
|
1480
|
+
if (typeof this.gmbPostCustomization !== 'undefined') {
|
|
1481
|
+
toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
|
|
1518
1482
|
}
|
|
1519
|
-
if (typeof this.
|
|
1520
|
-
toReturn['
|
|
1483
|
+
if (typeof this.imageUrl !== 'undefined') {
|
|
1484
|
+
toReturn['imageUrl'] = this.imageUrl;
|
|
1521
1485
|
}
|
|
1522
|
-
if (typeof this.
|
|
1523
|
-
toReturn['
|
|
1486
|
+
if (typeof this.imagePath !== 'undefined') {
|
|
1487
|
+
toReturn['imagePath'] = this.imagePath;
|
|
1488
|
+
}
|
|
1489
|
+
if (typeof this.imageSize !== 'undefined') {
|
|
1490
|
+
toReturn['imageSize'] = this.imageSize;
|
|
1491
|
+
}
|
|
1492
|
+
if (typeof this.previews !== 'undefined') {
|
|
1493
|
+
toReturn['previews'] = this.previews;
|
|
1494
|
+
}
|
|
1495
|
+
if (typeof this.options !== 'undefined') {
|
|
1496
|
+
toReturn['options'] = this.options;
|
|
1497
|
+
}
|
|
1498
|
+
if (typeof this.videoUrl !== 'undefined') {
|
|
1499
|
+
toReturn['videoUrl'] = this.videoUrl;
|
|
1500
|
+
}
|
|
1501
|
+
if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
|
|
1502
|
+
toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
|
|
1503
|
+
}
|
|
1504
|
+
if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
|
|
1505
|
+
toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
|
|
1506
|
+
}
|
|
1507
|
+
if (typeof this.postType !== 'undefined') {
|
|
1508
|
+
toReturn['postType'] = this.postType;
|
|
1524
1509
|
}
|
|
1525
1510
|
return toReturn;
|
|
1526
1511
|
}
|
|
1527
1512
|
}
|
|
1528
|
-
class
|
|
1513
|
+
class CreatePostTemplateResponse {
|
|
1529
1514
|
constructor(kwargs) {
|
|
1530
1515
|
if (!kwargs) {
|
|
1531
1516
|
return;
|
|
@@ -1533,19 +1518,19 @@ class GenerateCSVForPerformanceStatsResponse {
|
|
|
1533
1518
|
Object.assign(this, kwargs);
|
|
1534
1519
|
}
|
|
1535
1520
|
static fromProto(proto) {
|
|
1536
|
-
let m = new
|
|
1521
|
+
let m = new CreatePostTemplateResponse();
|
|
1537
1522
|
m = Object.assign(m, proto);
|
|
1538
1523
|
return m;
|
|
1539
1524
|
}
|
|
1540
1525
|
toApiJson() {
|
|
1541
1526
|
const toReturn = {};
|
|
1542
|
-
if (typeof this.
|
|
1543
|
-
toReturn['
|
|
1527
|
+
if (typeof this.templateId !== 'undefined') {
|
|
1528
|
+
toReturn['templateId'] = this.templateId;
|
|
1544
1529
|
}
|
|
1545
1530
|
return toReturn;
|
|
1546
1531
|
}
|
|
1547
1532
|
}
|
|
1548
|
-
class
|
|
1533
|
+
class DateRangeFilter {
|
|
1549
1534
|
constructor(kwargs) {
|
|
1550
1535
|
if (!kwargs) {
|
|
1551
1536
|
return;
|
|
@@ -1553,19 +1538,28 @@ class GetGeneratedCSVForPerformanceStatsRequest {
|
|
|
1553
1538
|
Object.assign(this, kwargs);
|
|
1554
1539
|
}
|
|
1555
1540
|
static fromProto(proto) {
|
|
1556
|
-
let m = new
|
|
1541
|
+
let m = new DateRangeFilter();
|
|
1557
1542
|
m = Object.assign(m, proto);
|
|
1543
|
+
if (proto.beginRange) {
|
|
1544
|
+
m.beginRange = new Date(proto.beginRange);
|
|
1545
|
+
}
|
|
1546
|
+
if (proto.endRange) {
|
|
1547
|
+
m.endRange = new Date(proto.endRange);
|
|
1548
|
+
}
|
|
1558
1549
|
return m;
|
|
1559
1550
|
}
|
|
1560
1551
|
toApiJson() {
|
|
1561
1552
|
const toReturn = {};
|
|
1562
|
-
if (typeof this.
|
|
1563
|
-
toReturn['
|
|
1553
|
+
if (typeof this.beginRange !== 'undefined' && this.beginRange !== null) {
|
|
1554
|
+
toReturn['beginRange'] = 'toApiJson' in this.beginRange ? this.beginRange.toApiJson() : this.beginRange;
|
|
1555
|
+
}
|
|
1556
|
+
if (typeof this.endRange !== 'undefined' && this.endRange !== null) {
|
|
1557
|
+
toReturn['endRange'] = 'toApiJson' in this.endRange ? this.endRange.toApiJson() : this.endRange;
|
|
1564
1558
|
}
|
|
1565
1559
|
return toReturn;
|
|
1566
1560
|
}
|
|
1567
1561
|
}
|
|
1568
|
-
class
|
|
1562
|
+
class DeleteHashtagsRequest {
|
|
1569
1563
|
constructor(kwargs) {
|
|
1570
1564
|
if (!kwargs) {
|
|
1571
1565
|
return;
|
|
@@ -1573,19 +1567,25 @@ class GetGeneratedCSVForPerformanceStatsResponse {
|
|
|
1573
1567
|
Object.assign(this, kwargs);
|
|
1574
1568
|
}
|
|
1575
1569
|
static fromProto(proto) {
|
|
1576
|
-
let m = new
|
|
1570
|
+
let m = new DeleteHashtagsRequest();
|
|
1577
1571
|
m = Object.assign(m, proto);
|
|
1578
1572
|
return m;
|
|
1579
1573
|
}
|
|
1580
1574
|
toApiJson() {
|
|
1581
1575
|
const toReturn = {};
|
|
1582
|
-
if (typeof this.
|
|
1583
|
-
toReturn['
|
|
1576
|
+
if (typeof this.keyword !== 'undefined') {
|
|
1577
|
+
toReturn['keyword'] = this.keyword;
|
|
1578
|
+
}
|
|
1579
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1580
|
+
toReturn['businessId'] = this.businessId;
|
|
1581
|
+
}
|
|
1582
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
1583
|
+
toReturn['partnerId'] = this.partnerId;
|
|
1584
1584
|
}
|
|
1585
1585
|
return toReturn;
|
|
1586
1586
|
}
|
|
1587
1587
|
}
|
|
1588
|
-
class
|
|
1588
|
+
class DeleteMultilocationPostRequest {
|
|
1589
1589
|
constructor(kwargs) {
|
|
1590
1590
|
if (!kwargs) {
|
|
1591
1591
|
return;
|
|
@@ -1593,25 +1593,22 @@ class GetMultiSocialPostStatsRequest {
|
|
|
1593
1593
|
Object.assign(this, kwargs);
|
|
1594
1594
|
}
|
|
1595
1595
|
static fromProto(proto) {
|
|
1596
|
-
let m = new
|
|
1596
|
+
let m = new DeleteMultilocationPostRequest();
|
|
1597
1597
|
m = Object.assign(m, proto);
|
|
1598
1598
|
return m;
|
|
1599
1599
|
}
|
|
1600
1600
|
toApiJson() {
|
|
1601
1601
|
const toReturn = {};
|
|
1602
|
-
if (typeof this.
|
|
1603
|
-
toReturn['
|
|
1604
|
-
}
|
|
1605
|
-
if (typeof this.businessId !== 'undefined') {
|
|
1606
|
-
toReturn['businessId'] = this.businessId;
|
|
1602
|
+
if (typeof this.brandId !== 'undefined') {
|
|
1603
|
+
toReturn['brandId'] = this.brandId;
|
|
1607
1604
|
}
|
|
1608
|
-
if (typeof this.
|
|
1609
|
-
toReturn['
|
|
1605
|
+
if (typeof this.multilocationId !== 'undefined') {
|
|
1606
|
+
toReturn['multilocationId'] = this.multilocationId;
|
|
1610
1607
|
}
|
|
1611
1608
|
return toReturn;
|
|
1612
1609
|
}
|
|
1613
1610
|
}
|
|
1614
|
-
class
|
|
1611
|
+
class DeletePostTemplateRequest {
|
|
1615
1612
|
constructor(kwargs) {
|
|
1616
1613
|
if (!kwargs) {
|
|
1617
1614
|
return;
|
|
@@ -1619,22 +1616,22 @@ class GetMultiSocialPostStatsResponse {
|
|
|
1619
1616
|
Object.assign(this, kwargs);
|
|
1620
1617
|
}
|
|
1621
1618
|
static fromProto(proto) {
|
|
1622
|
-
let m = new
|
|
1619
|
+
let m = new DeletePostTemplateRequest();
|
|
1623
1620
|
m = Object.assign(m, proto);
|
|
1624
|
-
if (proto.socialPostStats) {
|
|
1625
|
-
m.socialPostStats = proto.socialPostStats.map(SocialPostStats.fromProto);
|
|
1626
|
-
}
|
|
1627
1621
|
return m;
|
|
1628
1622
|
}
|
|
1629
1623
|
toApiJson() {
|
|
1630
1624
|
const toReturn = {};
|
|
1631
|
-
if (typeof this.
|
|
1632
|
-
toReturn['
|
|
1625
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
1626
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
1627
|
+
}
|
|
1628
|
+
if (typeof this.templateId !== 'undefined') {
|
|
1629
|
+
toReturn['templateId'] = this.templateId;
|
|
1633
1630
|
}
|
|
1634
1631
|
return toReturn;
|
|
1635
1632
|
}
|
|
1636
1633
|
}
|
|
1637
|
-
class
|
|
1634
|
+
class DeleteSocialPostRequest {
|
|
1638
1635
|
constructor(kwargs) {
|
|
1639
1636
|
if (!kwargs) {
|
|
1640
1637
|
return;
|
|
@@ -1642,7 +1639,7 @@ class GetMultiSocialPostsRequest {
|
|
|
1642
1639
|
Object.assign(this, kwargs);
|
|
1643
1640
|
}
|
|
1644
1641
|
static fromProto(proto) {
|
|
1645
|
-
let m = new
|
|
1642
|
+
let m = new DeleteSocialPostRequest();
|
|
1646
1643
|
m = Object.assign(m, proto);
|
|
1647
1644
|
return m;
|
|
1648
1645
|
}
|
|
@@ -1651,13 +1648,13 @@ class GetMultiSocialPostsRequest {
|
|
|
1651
1648
|
if (typeof this.businessId !== 'undefined') {
|
|
1652
1649
|
toReturn['businessId'] = this.businessId;
|
|
1653
1650
|
}
|
|
1654
|
-
if (typeof this.
|
|
1655
|
-
toReturn['
|
|
1651
|
+
if (typeof this.socialPostId !== 'undefined') {
|
|
1652
|
+
toReturn['socialPostId'] = this.socialPostId;
|
|
1656
1653
|
}
|
|
1657
1654
|
return toReturn;
|
|
1658
1655
|
}
|
|
1659
1656
|
}
|
|
1660
|
-
class
|
|
1657
|
+
class EditMultilocationPostRequest {
|
|
1661
1658
|
constructor(kwargs) {
|
|
1662
1659
|
if (!kwargs) {
|
|
1663
1660
|
return;
|
|
@@ -1665,22 +1662,52 @@ class GetMultiSocialPostsResponse {
|
|
|
1665
1662
|
Object.assign(this, kwargs);
|
|
1666
1663
|
}
|
|
1667
1664
|
static fromProto(proto) {
|
|
1668
|
-
let m = new
|
|
1665
|
+
let m = new EditMultilocationPostRequest();
|
|
1669
1666
|
m = Object.assign(m, proto);
|
|
1670
|
-
if (proto.
|
|
1671
|
-
m.
|
|
1667
|
+
if (proto.scheduledDate) {
|
|
1668
|
+
m.scheduledDate = new Date(proto.scheduledDate);
|
|
1669
|
+
}
|
|
1670
|
+
if (proto.fieldMask) {
|
|
1671
|
+
m.fieldMask = FieldMask.fromProto(proto.fieldMask);
|
|
1672
|
+
}
|
|
1673
|
+
if (proto.locations) {
|
|
1674
|
+
m.locations = proto.locations.map(Location.fromProto);
|
|
1672
1675
|
}
|
|
1673
1676
|
return m;
|
|
1674
1677
|
}
|
|
1675
1678
|
toApiJson() {
|
|
1676
1679
|
const toReturn = {};
|
|
1677
|
-
if (typeof this.
|
|
1678
|
-
toReturn['
|
|
1680
|
+
if (typeof this.brandId !== 'undefined') {
|
|
1681
|
+
toReturn['brandId'] = this.brandId;
|
|
1682
|
+
}
|
|
1683
|
+
if (typeof this.multilocationId !== 'undefined') {
|
|
1684
|
+
toReturn['multilocationId'] = this.multilocationId;
|
|
1685
|
+
}
|
|
1686
|
+
if (typeof this.text !== 'undefined') {
|
|
1687
|
+
toReturn['text'] = this.text;
|
|
1688
|
+
}
|
|
1689
|
+
if (typeof this.media !== 'undefined') {
|
|
1690
|
+
toReturn['media'] = this.media;
|
|
1691
|
+
}
|
|
1692
|
+
if (typeof this.scheduledDate !== 'undefined' && this.scheduledDate !== null) {
|
|
1693
|
+
toReturn['scheduledDate'] = 'toApiJson' in this.scheduledDate ? this.scheduledDate.toApiJson() : this.scheduledDate;
|
|
1694
|
+
}
|
|
1695
|
+
if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
|
|
1696
|
+
toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
|
|
1697
|
+
}
|
|
1698
|
+
if (typeof this.gifs !== 'undefined') {
|
|
1699
|
+
toReturn['gifs'] = this.gifs;
|
|
1700
|
+
}
|
|
1701
|
+
if (typeof this.videos !== 'undefined') {
|
|
1702
|
+
toReturn['videos'] = this.videos;
|
|
1703
|
+
}
|
|
1704
|
+
if (typeof this.locations !== 'undefined' && this.locations !== null) {
|
|
1705
|
+
toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
|
|
1679
1706
|
}
|
|
1680
1707
|
return toReturn;
|
|
1681
1708
|
}
|
|
1682
1709
|
}
|
|
1683
|
-
class
|
|
1710
|
+
class EditMultilocationPostResponse {
|
|
1684
1711
|
constructor(kwargs) {
|
|
1685
1712
|
if (!kwargs) {
|
|
1686
1713
|
return;
|
|
@@ -1688,22 +1715,28 @@ class GetMultilocationPostRequest {
|
|
|
1688
1715
|
Object.assign(this, kwargs);
|
|
1689
1716
|
}
|
|
1690
1717
|
static fromProto(proto) {
|
|
1691
|
-
let m = new
|
|
1718
|
+
let m = new EditMultilocationPostResponse();
|
|
1692
1719
|
m = Object.assign(m, proto);
|
|
1720
|
+
if (proto.post) {
|
|
1721
|
+
m.post = MultilocationPost.fromProto(proto.post);
|
|
1722
|
+
}
|
|
1723
|
+
if (proto.errors) {
|
|
1724
|
+
m.errors = proto.errors.map(MultilocationPostError.fromProto);
|
|
1725
|
+
}
|
|
1693
1726
|
return m;
|
|
1694
1727
|
}
|
|
1695
1728
|
toApiJson() {
|
|
1696
1729
|
const toReturn = {};
|
|
1697
|
-
if (typeof this.
|
|
1698
|
-
toReturn['
|
|
1730
|
+
if (typeof this.post !== 'undefined' && this.post !== null) {
|
|
1731
|
+
toReturn['post'] = 'toApiJson' in this.post ? this.post.toApiJson() : this.post;
|
|
1699
1732
|
}
|
|
1700
|
-
if (typeof this.
|
|
1701
|
-
toReturn['
|
|
1733
|
+
if (typeof this.errors !== 'undefined' && this.errors !== null) {
|
|
1734
|
+
toReturn['errors'] = 'toApiJson' in this.errors ? this.errors.toApiJson() : this.errors;
|
|
1702
1735
|
}
|
|
1703
1736
|
return toReturn;
|
|
1704
1737
|
}
|
|
1705
1738
|
}
|
|
1706
|
-
class
|
|
1739
|
+
class PartnerListScheduledSocialPostsRequestFilters {
|
|
1707
1740
|
constructor(kwargs) {
|
|
1708
1741
|
if (!kwargs) {
|
|
1709
1742
|
return;
|
|
@@ -1711,22 +1744,25 @@ class GetMultilocationPostResponse {
|
|
|
1711
1744
|
Object.assign(this, kwargs);
|
|
1712
1745
|
}
|
|
1713
1746
|
static fromProto(proto) {
|
|
1714
|
-
let m = new
|
|
1747
|
+
let m = new PartnerListScheduledSocialPostsRequestFilters();
|
|
1715
1748
|
m = Object.assign(m, proto);
|
|
1716
|
-
if (proto.
|
|
1717
|
-
m.
|
|
1749
|
+
if (proto.dateRange) {
|
|
1750
|
+
m.dateRange = DateRangeFilter.fromProto(proto.dateRange);
|
|
1718
1751
|
}
|
|
1719
1752
|
return m;
|
|
1720
1753
|
}
|
|
1721
1754
|
toApiJson() {
|
|
1722
1755
|
const toReturn = {};
|
|
1723
|
-
if (typeof this.
|
|
1724
|
-
toReturn['
|
|
1756
|
+
if (typeof this.dateRange !== 'undefined' && this.dateRange !== null) {
|
|
1757
|
+
toReturn['dateRange'] = 'toApiJson' in this.dateRange ? this.dateRange.toApiJson() : this.dateRange;
|
|
1758
|
+
}
|
|
1759
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
1760
|
+
toReturn['partnerId'] = this.partnerId;
|
|
1725
1761
|
}
|
|
1726
1762
|
return toReturn;
|
|
1727
1763
|
}
|
|
1728
1764
|
}
|
|
1729
|
-
class
|
|
1765
|
+
class GenerateCSVForPerformanceStatsRequest {
|
|
1730
1766
|
constructor(kwargs) {
|
|
1731
1767
|
if (!kwargs) {
|
|
1732
1768
|
return;
|
|
@@ -1734,22 +1770,28 @@ class GetPostTemplateRequest {
|
|
|
1734
1770
|
Object.assign(this, kwargs);
|
|
1735
1771
|
}
|
|
1736
1772
|
static fromProto(proto) {
|
|
1737
|
-
let m = new
|
|
1773
|
+
let m = new GenerateCSVForPerformanceStatsRequest();
|
|
1738
1774
|
m = Object.assign(m, proto);
|
|
1775
|
+
if (proto.postData) {
|
|
1776
|
+
m.postData = proto.postData.map(PostData.fromProto);
|
|
1777
|
+
}
|
|
1739
1778
|
return m;
|
|
1740
1779
|
}
|
|
1741
1780
|
toApiJson() {
|
|
1742
1781
|
const toReturn = {};
|
|
1743
|
-
if (typeof this.
|
|
1744
|
-
toReturn['
|
|
1782
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1783
|
+
toReturn['businessId'] = this.businessId;
|
|
1745
1784
|
}
|
|
1746
|
-
if (typeof this.
|
|
1747
|
-
toReturn['
|
|
1785
|
+
if (typeof this.postData !== 'undefined' && this.postData !== null) {
|
|
1786
|
+
toReturn['postData'] = 'toApiJson' in this.postData ? this.postData.toApiJson() : this.postData;
|
|
1787
|
+
}
|
|
1788
|
+
if (typeof this.includeHeaders !== 'undefined') {
|
|
1789
|
+
toReturn['includeHeaders'] = this.includeHeaders;
|
|
1748
1790
|
}
|
|
1749
1791
|
return toReturn;
|
|
1750
1792
|
}
|
|
1751
1793
|
}
|
|
1752
|
-
class
|
|
1794
|
+
class GenerateCSVForPerformanceStatsResponse {
|
|
1753
1795
|
constructor(kwargs) {
|
|
1754
1796
|
if (!kwargs) {
|
|
1755
1797
|
return;
|
|
@@ -1757,7 +1799,231 @@ class GetPostTemplateResponse {
|
|
|
1757
1799
|
Object.assign(this, kwargs);
|
|
1758
1800
|
}
|
|
1759
1801
|
static fromProto(proto) {
|
|
1760
|
-
let m = new
|
|
1802
|
+
let m = new GenerateCSVForPerformanceStatsResponse();
|
|
1803
|
+
m = Object.assign(m, proto);
|
|
1804
|
+
return m;
|
|
1805
|
+
}
|
|
1806
|
+
toApiJson() {
|
|
1807
|
+
const toReturn = {};
|
|
1808
|
+
if (typeof this.generatedId !== 'undefined') {
|
|
1809
|
+
toReturn['generatedId'] = this.generatedId;
|
|
1810
|
+
}
|
|
1811
|
+
return toReturn;
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
class GetGeneratedCSVForPerformanceStatsRequest {
|
|
1815
|
+
constructor(kwargs) {
|
|
1816
|
+
if (!kwargs) {
|
|
1817
|
+
return;
|
|
1818
|
+
}
|
|
1819
|
+
Object.assign(this, kwargs);
|
|
1820
|
+
}
|
|
1821
|
+
static fromProto(proto) {
|
|
1822
|
+
let m = new GetGeneratedCSVForPerformanceStatsRequest();
|
|
1823
|
+
m = Object.assign(m, proto);
|
|
1824
|
+
return m;
|
|
1825
|
+
}
|
|
1826
|
+
toApiJson() {
|
|
1827
|
+
const toReturn = {};
|
|
1828
|
+
if (typeof this.generatedId !== 'undefined') {
|
|
1829
|
+
toReturn['generatedId'] = this.generatedId;
|
|
1830
|
+
}
|
|
1831
|
+
return toReturn;
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
class GetGeneratedCSVForPerformanceStatsResponse {
|
|
1835
|
+
constructor(kwargs) {
|
|
1836
|
+
if (!kwargs) {
|
|
1837
|
+
return;
|
|
1838
|
+
}
|
|
1839
|
+
Object.assign(this, kwargs);
|
|
1840
|
+
}
|
|
1841
|
+
static fromProto(proto) {
|
|
1842
|
+
let m = new GetGeneratedCSVForPerformanceStatsResponse();
|
|
1843
|
+
m = Object.assign(m, proto);
|
|
1844
|
+
return m;
|
|
1845
|
+
}
|
|
1846
|
+
toApiJson() {
|
|
1847
|
+
const toReturn = {};
|
|
1848
|
+
if (typeof this.url !== 'undefined') {
|
|
1849
|
+
toReturn['url'] = this.url;
|
|
1850
|
+
}
|
|
1851
|
+
return toReturn;
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1854
|
+
class GetMultiSocialPostStatsRequest {
|
|
1855
|
+
constructor(kwargs) {
|
|
1856
|
+
if (!kwargs) {
|
|
1857
|
+
return;
|
|
1858
|
+
}
|
|
1859
|
+
Object.assign(this, kwargs);
|
|
1860
|
+
}
|
|
1861
|
+
static fromProto(proto) {
|
|
1862
|
+
let m = new GetMultiSocialPostStatsRequest();
|
|
1863
|
+
m = Object.assign(m, proto);
|
|
1864
|
+
return m;
|
|
1865
|
+
}
|
|
1866
|
+
toApiJson() {
|
|
1867
|
+
const toReturn = {};
|
|
1868
|
+
if (typeof this.internalPostIds !== 'undefined') {
|
|
1869
|
+
toReturn['internalPostIds'] = this.internalPostIds;
|
|
1870
|
+
}
|
|
1871
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1872
|
+
toReturn['businessId'] = this.businessId;
|
|
1873
|
+
}
|
|
1874
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
1875
|
+
toReturn['partnerId'] = this.partnerId;
|
|
1876
|
+
}
|
|
1877
|
+
return toReturn;
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
class GetMultiSocialPostStatsResponse {
|
|
1881
|
+
constructor(kwargs) {
|
|
1882
|
+
if (!kwargs) {
|
|
1883
|
+
return;
|
|
1884
|
+
}
|
|
1885
|
+
Object.assign(this, kwargs);
|
|
1886
|
+
}
|
|
1887
|
+
static fromProto(proto) {
|
|
1888
|
+
let m = new GetMultiSocialPostStatsResponse();
|
|
1889
|
+
m = Object.assign(m, proto);
|
|
1890
|
+
if (proto.socialPostStats) {
|
|
1891
|
+
m.socialPostStats = proto.socialPostStats.map(SocialPostStats.fromProto);
|
|
1892
|
+
}
|
|
1893
|
+
return m;
|
|
1894
|
+
}
|
|
1895
|
+
toApiJson() {
|
|
1896
|
+
const toReturn = {};
|
|
1897
|
+
if (typeof this.socialPostStats !== 'undefined' && this.socialPostStats !== null) {
|
|
1898
|
+
toReturn['socialPostStats'] = 'toApiJson' in this.socialPostStats ? this.socialPostStats.toApiJson() : this.socialPostStats;
|
|
1899
|
+
}
|
|
1900
|
+
return toReturn;
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
class GetMultiSocialPostsRequest {
|
|
1904
|
+
constructor(kwargs) {
|
|
1905
|
+
if (!kwargs) {
|
|
1906
|
+
return;
|
|
1907
|
+
}
|
|
1908
|
+
Object.assign(this, kwargs);
|
|
1909
|
+
}
|
|
1910
|
+
static fromProto(proto) {
|
|
1911
|
+
let m = new GetMultiSocialPostsRequest();
|
|
1912
|
+
m = Object.assign(m, proto);
|
|
1913
|
+
return m;
|
|
1914
|
+
}
|
|
1915
|
+
toApiJson() {
|
|
1916
|
+
const toReturn = {};
|
|
1917
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1918
|
+
toReturn['businessId'] = this.businessId;
|
|
1919
|
+
}
|
|
1920
|
+
if (typeof this.internalPostIds !== 'undefined') {
|
|
1921
|
+
toReturn['internalPostIds'] = this.internalPostIds;
|
|
1922
|
+
}
|
|
1923
|
+
return toReturn;
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
class GetMultiSocialPostsResponse {
|
|
1927
|
+
constructor(kwargs) {
|
|
1928
|
+
if (!kwargs) {
|
|
1929
|
+
return;
|
|
1930
|
+
}
|
|
1931
|
+
Object.assign(this, kwargs);
|
|
1932
|
+
}
|
|
1933
|
+
static fromProto(proto) {
|
|
1934
|
+
let m = new GetMultiSocialPostsResponse();
|
|
1935
|
+
m = Object.assign(m, proto);
|
|
1936
|
+
if (proto.socialPosts) {
|
|
1937
|
+
m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
|
|
1938
|
+
}
|
|
1939
|
+
return m;
|
|
1940
|
+
}
|
|
1941
|
+
toApiJson() {
|
|
1942
|
+
const toReturn = {};
|
|
1943
|
+
if (typeof this.socialPosts !== 'undefined' && this.socialPosts !== null) {
|
|
1944
|
+
toReturn['socialPosts'] = 'toApiJson' in this.socialPosts ? this.socialPosts.toApiJson() : this.socialPosts;
|
|
1945
|
+
}
|
|
1946
|
+
return toReturn;
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
class GetMultilocationPostRequest {
|
|
1950
|
+
constructor(kwargs) {
|
|
1951
|
+
if (!kwargs) {
|
|
1952
|
+
return;
|
|
1953
|
+
}
|
|
1954
|
+
Object.assign(this, kwargs);
|
|
1955
|
+
}
|
|
1956
|
+
static fromProto(proto) {
|
|
1957
|
+
let m = new GetMultilocationPostRequest();
|
|
1958
|
+
m = Object.assign(m, proto);
|
|
1959
|
+
return m;
|
|
1960
|
+
}
|
|
1961
|
+
toApiJson() {
|
|
1962
|
+
const toReturn = {};
|
|
1963
|
+
if (typeof this.brandId !== 'undefined') {
|
|
1964
|
+
toReturn['brandId'] = this.brandId;
|
|
1965
|
+
}
|
|
1966
|
+
if (typeof this.multilocationId !== 'undefined') {
|
|
1967
|
+
toReturn['multilocationId'] = this.multilocationId;
|
|
1968
|
+
}
|
|
1969
|
+
return toReturn;
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
class GetMultilocationPostResponse {
|
|
1973
|
+
constructor(kwargs) {
|
|
1974
|
+
if (!kwargs) {
|
|
1975
|
+
return;
|
|
1976
|
+
}
|
|
1977
|
+
Object.assign(this, kwargs);
|
|
1978
|
+
}
|
|
1979
|
+
static fromProto(proto) {
|
|
1980
|
+
let m = new GetMultilocationPostResponse();
|
|
1981
|
+
m = Object.assign(m, proto);
|
|
1982
|
+
if (proto.multilocationPost) {
|
|
1983
|
+
m.multilocationPost = MultilocationPost.fromProto(proto.multilocationPost);
|
|
1984
|
+
}
|
|
1985
|
+
return m;
|
|
1986
|
+
}
|
|
1987
|
+
toApiJson() {
|
|
1988
|
+
const toReturn = {};
|
|
1989
|
+
if (typeof this.multilocationPost !== 'undefined' && this.multilocationPost !== null) {
|
|
1990
|
+
toReturn['multilocationPost'] = 'toApiJson' in this.multilocationPost ? this.multilocationPost.toApiJson() : this.multilocationPost;
|
|
1991
|
+
}
|
|
1992
|
+
return toReturn;
|
|
1993
|
+
}
|
|
1994
|
+
}
|
|
1995
|
+
class GetPostTemplateRequest {
|
|
1996
|
+
constructor(kwargs) {
|
|
1997
|
+
if (!kwargs) {
|
|
1998
|
+
return;
|
|
1999
|
+
}
|
|
2000
|
+
Object.assign(this, kwargs);
|
|
2001
|
+
}
|
|
2002
|
+
static fromProto(proto) {
|
|
2003
|
+
let m = new GetPostTemplateRequest();
|
|
2004
|
+
m = Object.assign(m, proto);
|
|
2005
|
+
return m;
|
|
2006
|
+
}
|
|
2007
|
+
toApiJson() {
|
|
2008
|
+
const toReturn = {};
|
|
2009
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
2010
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
2011
|
+
}
|
|
2012
|
+
if (typeof this.templateId !== 'undefined') {
|
|
2013
|
+
toReturn['templateId'] = this.templateId;
|
|
2014
|
+
}
|
|
2015
|
+
return toReturn;
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
class GetPostTemplateResponse {
|
|
2019
|
+
constructor(kwargs) {
|
|
2020
|
+
if (!kwargs) {
|
|
2021
|
+
return;
|
|
2022
|
+
}
|
|
2023
|
+
Object.assign(this, kwargs);
|
|
2024
|
+
}
|
|
2025
|
+
static fromProto(proto) {
|
|
2026
|
+
let m = new GetPostTemplateResponse();
|
|
1761
2027
|
m = Object.assign(m, proto);
|
|
1762
2028
|
if (proto.postTemplate) {
|
|
1763
2029
|
m.postTemplate = PostTemplate.fromProto(proto.postTemplate);
|
|
@@ -1913,7 +2179,7 @@ class ListMultilocationPostsForBrandResponse {
|
|
|
1913
2179
|
m.multilocationPosts = proto.multilocationPosts.map(MultilocationPost.fromProto);
|
|
1914
2180
|
}
|
|
1915
2181
|
if (proto.failedSocialPosts) {
|
|
1916
|
-
m.failedSocialPosts = proto.failedSocialPosts.map(SocialPost
|
|
2182
|
+
m.failedSocialPosts = proto.failedSocialPosts.map(SocialPost.fromProto);
|
|
1917
2183
|
}
|
|
1918
2184
|
return m;
|
|
1919
2185
|
}
|
|
@@ -2117,7 +2383,7 @@ class ListSocialPostsResponse {
|
|
|
2117
2383
|
let m = new ListSocialPostsResponse();
|
|
2118
2384
|
m = Object.assign(m, proto);
|
|
2119
2385
|
if (proto.socialPosts) {
|
|
2120
|
-
m.socialPosts = proto.socialPosts.map(SocialPost
|
|
2386
|
+
m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
|
|
2121
2387
|
}
|
|
2122
2388
|
return m;
|
|
2123
2389
|
}
|
|
@@ -2216,7 +2482,7 @@ class PartnerListScheduledPostsResponse {
|
|
|
2216
2482
|
let m = new PartnerListScheduledPostsResponse();
|
|
2217
2483
|
m = Object.assign(m, proto);
|
|
2218
2484
|
if (proto.socialPosts) {
|
|
2219
|
-
m.socialPosts = proto.socialPosts.map(SocialPost
|
|
2485
|
+
m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
|
|
2220
2486
|
}
|
|
2221
2487
|
return m;
|
|
2222
2488
|
}
|
|
@@ -2384,7 +2650,7 @@ class RemoveFromMultilocationPostRequest {
|
|
|
2384
2650
|
let m = new RemoveFromMultilocationPostRequest();
|
|
2385
2651
|
m = Object.assign(m, proto);
|
|
2386
2652
|
if (proto.reason) {
|
|
2387
|
-
m.reason = enumStringToValue$
|
|
2653
|
+
m.reason = enumStringToValue$2(RemoveReason, proto.reason);
|
|
2388
2654
|
}
|
|
2389
2655
|
if (proto.locations) {
|
|
2390
2656
|
m.locations = proto.locations.map(Location.fromProto);
|
|
@@ -2466,273 +2732,7 @@ class SchedulePostRequest {
|
|
|
2466
2732
|
return toReturn;
|
|
2467
2733
|
}
|
|
2468
2734
|
}
|
|
2469
|
-
class SchedulePostResponse {
|
|
2470
|
-
constructor(kwargs) {
|
|
2471
|
-
if (!kwargs) {
|
|
2472
|
-
return;
|
|
2473
|
-
}
|
|
2474
|
-
Object.assign(this, kwargs);
|
|
2475
|
-
}
|
|
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
|
-
toApiJson() {
|
|
2485
|
-
const toReturn = {};
|
|
2486
|
-
if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
|
|
2487
|
-
toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
|
|
2488
|
-
}
|
|
2489
|
-
return toReturn;
|
|
2490
|
-
}
|
|
2491
|
-
}
|
|
2492
|
-
class ScheduleToAllPagesRequest {
|
|
2493
|
-
constructor(kwargs) {
|
|
2494
|
-
if (!kwargs) {
|
|
2495
|
-
return;
|
|
2496
|
-
}
|
|
2497
|
-
Object.assign(this, kwargs);
|
|
2498
|
-
}
|
|
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
|
-
toApiJson() {
|
|
2508
|
-
const toReturn = {};
|
|
2509
|
-
if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
|
|
2510
|
-
toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
|
|
2511
|
-
}
|
|
2512
|
-
if (typeof this.partnerId !== 'undefined') {
|
|
2513
|
-
toReturn['partnerId'] = this.partnerId;
|
|
2514
|
-
}
|
|
2515
|
-
if (typeof this.businessId !== 'undefined') {
|
|
2516
|
-
toReturn['businessId'] = this.businessId;
|
|
2517
|
-
}
|
|
2518
|
-
return toReturn;
|
|
2519
|
-
}
|
|
2520
|
-
}
|
|
2521
|
-
class ScheduleToAllPagesResponse {
|
|
2522
|
-
constructor(kwargs) {
|
|
2523
|
-
if (!kwargs) {
|
|
2524
|
-
return;
|
|
2525
|
-
}
|
|
2526
|
-
Object.assign(this, kwargs);
|
|
2527
|
-
}
|
|
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
|
-
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
|
-
constructor(kwargs) {
|
|
2546
|
-
if (!kwargs) {
|
|
2547
|
-
return;
|
|
2548
|
-
}
|
|
2549
|
-
Object.assign(this, kwargs);
|
|
2550
|
-
}
|
|
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
|
-
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
|
-
constructor(kwargs) {
|
|
2578
|
-
if (!kwargs) {
|
|
2579
|
-
return;
|
|
2580
|
-
}
|
|
2581
|
-
Object.assign(this, kwargs);
|
|
2582
|
-
}
|
|
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
|
-
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
|
-
constructor(kwargs) {
|
|
2601
|
-
if (!kwargs) {
|
|
2602
|
-
return;
|
|
2603
|
-
}
|
|
2604
|
-
Object.assign(this, kwargs);
|
|
2605
|
-
}
|
|
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
|
-
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
|
-
constructor(kwargs) {
|
|
2636
|
-
if (!kwargs) {
|
|
2637
|
-
return;
|
|
2638
|
-
}
|
|
2639
|
-
Object.assign(this, kwargs);
|
|
2640
|
-
}
|
|
2641
|
-
static fromProto(proto) {
|
|
2642
|
-
let m = new SuggestMessageResponse();
|
|
2643
|
-
m = Object.assign(m, proto);
|
|
2644
|
-
return m;
|
|
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
|
-
constructor(kwargs) {
|
|
2656
|
-
if (!kwargs) {
|
|
2657
|
-
return;
|
|
2658
|
-
}
|
|
2659
|
-
Object.assign(this, kwargs);
|
|
2660
|
-
}
|
|
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$1, proto.postType);
|
|
2675
|
-
}
|
|
2676
|
-
return m;
|
|
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 {
|
|
2735
|
+
class SchedulePostResponse {
|
|
2736
2736
|
constructor(kwargs) {
|
|
2737
2737
|
if (!kwargs) {
|
|
2738
2738
|
return;
|
|
@@ -2740,34 +2740,22 @@ class Link {
|
|
|
2740
2740
|
Object.assign(this, kwargs);
|
|
2741
2741
|
}
|
|
2742
2742
|
static fromProto(proto) {
|
|
2743
|
-
let m = new
|
|
2743
|
+
let m = new SchedulePostResponse();
|
|
2744
2744
|
m = Object.assign(m, proto);
|
|
2745
|
+
if (proto.statuses) {
|
|
2746
|
+
m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
|
|
2747
|
+
}
|
|
2745
2748
|
return m;
|
|
2746
2749
|
}
|
|
2747
2750
|
toApiJson() {
|
|
2748
2751
|
const toReturn = {};
|
|
2749
|
-
if (typeof this.
|
|
2750
|
-
toReturn['
|
|
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;
|
|
2752
|
+
if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
|
|
2753
|
+
toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
|
|
2766
2754
|
}
|
|
2767
2755
|
return toReturn;
|
|
2768
2756
|
}
|
|
2769
2757
|
}
|
|
2770
|
-
class
|
|
2758
|
+
class ScheduleToAllPagesRequest {
|
|
2771
2759
|
constructor(kwargs) {
|
|
2772
2760
|
if (!kwargs) {
|
|
2773
2761
|
return;
|
|
@@ -2775,22 +2763,28 @@ class Metadata {
|
|
|
2775
2763
|
Object.assign(this, kwargs);
|
|
2776
2764
|
}
|
|
2777
2765
|
static fromProto(proto) {
|
|
2778
|
-
let m = new
|
|
2766
|
+
let m = new ScheduleToAllPagesRequest();
|
|
2779
2767
|
m = Object.assign(m, proto);
|
|
2768
|
+
if (proto.socialPost) {
|
|
2769
|
+
m.socialPost = SocialPostData.fromProto(proto.socialPost);
|
|
2770
|
+
}
|
|
2780
2771
|
return m;
|
|
2781
2772
|
}
|
|
2782
2773
|
toApiJson() {
|
|
2783
2774
|
const toReturn = {};
|
|
2784
|
-
if (typeof this.
|
|
2785
|
-
toReturn['
|
|
2775
|
+
if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
|
|
2776
|
+
toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
|
|
2786
2777
|
}
|
|
2787
|
-
if (typeof this.
|
|
2788
|
-
toReturn['
|
|
2778
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
2779
|
+
toReturn['partnerId'] = this.partnerId;
|
|
2780
|
+
}
|
|
2781
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2782
|
+
toReturn['businessId'] = this.businessId;
|
|
2789
2783
|
}
|
|
2790
2784
|
return toReturn;
|
|
2791
2785
|
}
|
|
2792
2786
|
}
|
|
2793
|
-
class
|
|
2787
|
+
class ScheduleToAllPagesResponse {
|
|
2794
2788
|
constructor(kwargs) {
|
|
2795
2789
|
if (!kwargs) {
|
|
2796
2790
|
return;
|
|
@@ -2798,22 +2792,22 @@ class PostAction {
|
|
|
2798
2792
|
Object.assign(this, kwargs);
|
|
2799
2793
|
}
|
|
2800
2794
|
static fromProto(proto) {
|
|
2801
|
-
let m = new
|
|
2795
|
+
let m = new ScheduleToAllPagesResponse();
|
|
2802
2796
|
m = Object.assign(m, proto);
|
|
2797
|
+
if (proto.statuses) {
|
|
2798
|
+
m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
|
|
2799
|
+
}
|
|
2803
2800
|
return m;
|
|
2804
2801
|
}
|
|
2805
2802
|
toApiJson() {
|
|
2806
2803
|
const toReturn = {};
|
|
2807
|
-
if (typeof this.
|
|
2808
|
-
toReturn['
|
|
2809
|
-
}
|
|
2810
|
-
if (typeof this.linkUrl !== 'undefined') {
|
|
2811
|
-
toReturn['linkUrl'] = this.linkUrl;
|
|
2804
|
+
if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
|
|
2805
|
+
toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
|
|
2812
2806
|
}
|
|
2813
2807
|
return toReturn;
|
|
2814
2808
|
}
|
|
2815
2809
|
}
|
|
2816
|
-
class
|
|
2810
|
+
class SearchHashtagRequest {
|
|
2817
2811
|
constructor(kwargs) {
|
|
2818
2812
|
if (!kwargs) {
|
|
2819
2813
|
return;
|
|
@@ -2821,31 +2815,31 @@ class PostContent {
|
|
|
2821
2815
|
Object.assign(this, kwargs);
|
|
2822
2816
|
}
|
|
2823
2817
|
static fromProto(proto) {
|
|
2824
|
-
let m = new
|
|
2818
|
+
let m = new SearchHashtagRequest();
|
|
2825
2819
|
m = Object.assign(m, proto);
|
|
2826
|
-
if (proto.
|
|
2827
|
-
m.
|
|
2828
|
-
}
|
|
2829
|
-
if (proto.link) {
|
|
2830
|
-
m.link = proto.link.map(Link.fromProto);
|
|
2820
|
+
if (proto.limit) {
|
|
2821
|
+
m.limit = parseInt(proto.limit, 10);
|
|
2831
2822
|
}
|
|
2832
2823
|
return m;
|
|
2833
2824
|
}
|
|
2834
2825
|
toApiJson() {
|
|
2835
2826
|
const toReturn = {};
|
|
2836
|
-
if (typeof this.
|
|
2837
|
-
toReturn['
|
|
2827
|
+
if (typeof this.searchTerm !== 'undefined') {
|
|
2828
|
+
toReturn['searchTerm'] = this.searchTerm;
|
|
2838
2829
|
}
|
|
2839
|
-
if (typeof this.
|
|
2840
|
-
toReturn['
|
|
2830
|
+
if (typeof this.limit !== 'undefined') {
|
|
2831
|
+
toReturn['limit'] = this.limit;
|
|
2841
2832
|
}
|
|
2842
|
-
if (typeof this.
|
|
2843
|
-
toReturn['
|
|
2833
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2834
|
+
toReturn['businessId'] = this.businessId;
|
|
2835
|
+
}
|
|
2836
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
2837
|
+
toReturn['partnerId'] = this.partnerId;
|
|
2844
2838
|
}
|
|
2845
2839
|
return toReturn;
|
|
2846
2840
|
}
|
|
2847
2841
|
}
|
|
2848
|
-
class
|
|
2842
|
+
class SearchHashtagResponse {
|
|
2849
2843
|
constructor(kwargs) {
|
|
2850
2844
|
if (!kwargs) {
|
|
2851
2845
|
return;
|
|
@@ -2853,28 +2847,22 @@ class PostCustomization {
|
|
|
2853
2847
|
Object.assign(this, kwargs);
|
|
2854
2848
|
}
|
|
2855
2849
|
static fromProto(proto) {
|
|
2856
|
-
let m = new
|
|
2850
|
+
let m = new SearchHashtagResponse();
|
|
2857
2851
|
m = Object.assign(m, proto);
|
|
2858
|
-
if (proto.
|
|
2859
|
-
m.
|
|
2860
|
-
}
|
|
2861
|
-
if (proto.action) {
|
|
2862
|
-
m.action = PostAction.fromProto(proto.action);
|
|
2852
|
+
if (proto.hashtags) {
|
|
2853
|
+
m.hashtags = proto.hashtags.map(Hashtag.fromProto);
|
|
2863
2854
|
}
|
|
2864
2855
|
return m;
|
|
2865
2856
|
}
|
|
2866
2857
|
toApiJson() {
|
|
2867
2858
|
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;
|
|
2859
|
+
if (typeof this.hashtags !== 'undefined' && this.hashtags !== null) {
|
|
2860
|
+
toReturn['hashtags'] = 'toApiJson' in this.hashtags ? this.hashtags.toApiJson() : this.hashtags;
|
|
2873
2861
|
}
|
|
2874
2862
|
return toReturn;
|
|
2875
2863
|
}
|
|
2876
2864
|
}
|
|
2877
|
-
class
|
|
2865
|
+
class SuggestMessageRequest {
|
|
2878
2866
|
constructor(kwargs) {
|
|
2879
2867
|
if (!kwargs) {
|
|
2880
2868
|
return;
|
|
@@ -2882,31 +2870,34 @@ class PostEvent {
|
|
|
2882
2870
|
Object.assign(this, kwargs);
|
|
2883
2871
|
}
|
|
2884
2872
|
static fromProto(proto) {
|
|
2885
|
-
let m = new
|
|
2873
|
+
let m = new SuggestMessageRequest();
|
|
2886
2874
|
m = Object.assign(m, proto);
|
|
2887
|
-
if (proto.
|
|
2888
|
-
m.
|
|
2875
|
+
if (proto.length) {
|
|
2876
|
+
m.length = enumStringToValue$2(MessageLength, proto.length);
|
|
2889
2877
|
}
|
|
2890
|
-
if (proto.
|
|
2891
|
-
m.
|
|
2878
|
+
if (proto.type) {
|
|
2879
|
+
m.type = enumStringToValue$2(TemplateType, proto.type);
|
|
2892
2880
|
}
|
|
2893
2881
|
return m;
|
|
2894
2882
|
}
|
|
2895
2883
|
toApiJson() {
|
|
2896
2884
|
const toReturn = {};
|
|
2897
|
-
if (typeof this.
|
|
2898
|
-
toReturn['
|
|
2885
|
+
if (typeof this.prompt !== 'undefined') {
|
|
2886
|
+
toReturn['prompt'] = this.prompt;
|
|
2899
2887
|
}
|
|
2900
|
-
if (typeof this.
|
|
2901
|
-
toReturn['
|
|
2888
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2889
|
+
toReturn['businessId'] = this.businessId;
|
|
2902
2890
|
}
|
|
2903
|
-
if (typeof this.
|
|
2904
|
-
toReturn['
|
|
2891
|
+
if (typeof this.length !== 'undefined') {
|
|
2892
|
+
toReturn['length'] = this.length;
|
|
2893
|
+
}
|
|
2894
|
+
if (typeof this.type !== 'undefined') {
|
|
2895
|
+
toReturn['type'] = this.type;
|
|
2905
2896
|
}
|
|
2906
2897
|
return toReturn;
|
|
2907
2898
|
}
|
|
2908
2899
|
}
|
|
2909
|
-
class
|
|
2900
|
+
class SuggestMessageResponse {
|
|
2910
2901
|
constructor(kwargs) {
|
|
2911
2902
|
if (!kwargs) {
|
|
2912
2903
|
return;
|
|
@@ -2914,34 +2905,19 @@ class PostMedia {
|
|
|
2914
2905
|
Object.assign(this, kwargs);
|
|
2915
2906
|
}
|
|
2916
2907
|
static fromProto(proto) {
|
|
2917
|
-
let m = new
|
|
2908
|
+
let m = new SuggestMessageResponse();
|
|
2918
2909
|
m = Object.assign(m, proto);
|
|
2919
|
-
if (proto.metadata) {
|
|
2920
|
-
m.metadata = proto.metadata.map(Metadata.fromProto);
|
|
2921
|
-
}
|
|
2922
2910
|
return m;
|
|
2923
2911
|
}
|
|
2924
2912
|
toApiJson() {
|
|
2925
2913
|
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;
|
|
2914
|
+
if (typeof this.message !== 'undefined') {
|
|
2915
|
+
toReturn['message'] = this.message;
|
|
2940
2916
|
}
|
|
2941
2917
|
return toReturn;
|
|
2942
2918
|
}
|
|
2943
2919
|
}
|
|
2944
|
-
class
|
|
2920
|
+
class UpdatePostTemplateRequest {
|
|
2945
2921
|
constructor(kwargs) {
|
|
2946
2922
|
if (!kwargs) {
|
|
2947
2923
|
return;
|
|
@@ -2949,16 +2925,16 @@ class SocialPost {
|
|
|
2949
2925
|
Object.assign(this, kwargs);
|
|
2950
2926
|
}
|
|
2951
2927
|
static fromProto(proto) {
|
|
2952
|
-
let m = new
|
|
2928
|
+
let m = new UpdatePostTemplateRequest();
|
|
2953
2929
|
m = Object.assign(m, proto);
|
|
2954
|
-
if (proto.
|
|
2955
|
-
m.
|
|
2930
|
+
if (proto.postDateTime) {
|
|
2931
|
+
m.postDateTime = new Date(proto.postDateTime);
|
|
2956
2932
|
}
|
|
2957
|
-
if (proto.
|
|
2958
|
-
m.
|
|
2933
|
+
if (proto.mediaEntries) {
|
|
2934
|
+
m.mediaEntries = proto.mediaEntries.map(MediaEntry.fromProto);
|
|
2959
2935
|
}
|
|
2960
|
-
if (proto.
|
|
2961
|
-
m.
|
|
2936
|
+
if (proto.metaData) {
|
|
2937
|
+
m.metaData = proto.metaData.map(MetaData.fromProto);
|
|
2962
2938
|
}
|
|
2963
2939
|
if (proto.postType) {
|
|
2964
2940
|
m.postType = enumStringToValue$2(PostType$1, proto.postType);
|
|
@@ -2967,20 +2943,47 @@ class SocialPost {
|
|
|
2967
2943
|
}
|
|
2968
2944
|
toApiJson() {
|
|
2969
2945
|
const toReturn = {};
|
|
2970
|
-
if (typeof this.
|
|
2971
|
-
toReturn['
|
|
2946
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
2947
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
2972
2948
|
}
|
|
2973
|
-
if (typeof this.
|
|
2974
|
-
toReturn['
|
|
2949
|
+
if (typeof this.templateId !== 'undefined') {
|
|
2950
|
+
toReturn['templateId'] = this.templateId;
|
|
2975
2951
|
}
|
|
2976
|
-
if (typeof this.
|
|
2977
|
-
toReturn['
|
|
2952
|
+
if (typeof this.title !== 'undefined') {
|
|
2953
|
+
toReturn['title'] = this.title;
|
|
2978
2954
|
}
|
|
2979
|
-
if (typeof this.
|
|
2980
|
-
toReturn['
|
|
2955
|
+
if (typeof this.postText !== 'undefined') {
|
|
2956
|
+
toReturn['postText'] = this.postText;
|
|
2981
2957
|
}
|
|
2982
|
-
if (typeof this.
|
|
2983
|
-
toReturn['
|
|
2958
|
+
if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
|
|
2959
|
+
toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
|
|
2960
|
+
}
|
|
2961
|
+
if (typeof this.gmbPostCustomization !== 'undefined') {
|
|
2962
|
+
toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
|
|
2963
|
+
}
|
|
2964
|
+
if (typeof this.imageUrl !== 'undefined') {
|
|
2965
|
+
toReturn['imageUrl'] = this.imageUrl;
|
|
2966
|
+
}
|
|
2967
|
+
if (typeof this.imagePath !== 'undefined') {
|
|
2968
|
+
toReturn['imagePath'] = this.imagePath;
|
|
2969
|
+
}
|
|
2970
|
+
if (typeof this.imageSize !== 'undefined') {
|
|
2971
|
+
toReturn['imageSize'] = this.imageSize;
|
|
2972
|
+
}
|
|
2973
|
+
if (typeof this.previews !== 'undefined') {
|
|
2974
|
+
toReturn['previews'] = this.previews;
|
|
2975
|
+
}
|
|
2976
|
+
if (typeof this.options !== 'undefined') {
|
|
2977
|
+
toReturn['options'] = this.options;
|
|
2978
|
+
}
|
|
2979
|
+
if (typeof this.videoUrl !== 'undefined') {
|
|
2980
|
+
toReturn['videoUrl'] = this.videoUrl;
|
|
2981
|
+
}
|
|
2982
|
+
if (typeof this.mediaEntries !== 'undefined' && this.mediaEntries !== null) {
|
|
2983
|
+
toReturn['mediaEntries'] = 'toApiJson' in this.mediaEntries ? this.mediaEntries.toApiJson() : this.mediaEntries;
|
|
2984
|
+
}
|
|
2985
|
+
if (typeof this.metaData !== 'undefined' && this.metaData !== null) {
|
|
2986
|
+
toReturn['metaData'] = 'toApiJson' in this.metaData ? this.metaData.toApiJson() : this.metaData;
|
|
2984
2987
|
}
|
|
2985
2988
|
if (typeof this.postType !== 'undefined') {
|
|
2986
2989
|
toReturn['postType'] = this.postType;
|
|
@@ -3112,6 +3115,26 @@ class DeletePostRequest {
|
|
|
3112
3115
|
return toReturn;
|
|
3113
3116
|
}
|
|
3114
3117
|
}
|
|
3118
|
+
class ImageBlob {
|
|
3119
|
+
constructor(kwargs) {
|
|
3120
|
+
if (!kwargs) {
|
|
3121
|
+
return;
|
|
3122
|
+
}
|
|
3123
|
+
Object.assign(this, kwargs);
|
|
3124
|
+
}
|
|
3125
|
+
static fromProto(proto) {
|
|
3126
|
+
let m = new ImageBlob();
|
|
3127
|
+
m = Object.assign(m, proto);
|
|
3128
|
+
return m;
|
|
3129
|
+
}
|
|
3130
|
+
toApiJson() {
|
|
3131
|
+
const toReturn = {};
|
|
3132
|
+
if (typeof this.blob !== 'undefined') {
|
|
3133
|
+
toReturn['blob'] = this.blob;
|
|
3134
|
+
}
|
|
3135
|
+
return toReturn;
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3115
3138
|
class ImageCreated {
|
|
3116
3139
|
constructor(kwargs) {
|
|
3117
3140
|
if (!kwargs) {
|
|
@@ -3135,6 +3158,26 @@ class ImageCreated {
|
|
|
3135
3158
|
return toReturn;
|
|
3136
3159
|
}
|
|
3137
3160
|
}
|
|
3161
|
+
class ImageUrl {
|
|
3162
|
+
constructor(kwargs) {
|
|
3163
|
+
if (!kwargs) {
|
|
3164
|
+
return;
|
|
3165
|
+
}
|
|
3166
|
+
Object.assign(this, kwargs);
|
|
3167
|
+
}
|
|
3168
|
+
static fromProto(proto) {
|
|
3169
|
+
let m = new ImageUrl();
|
|
3170
|
+
m = Object.assign(m, proto);
|
|
3171
|
+
return m;
|
|
3172
|
+
}
|
|
3173
|
+
toApiJson() {
|
|
3174
|
+
const toReturn = {};
|
|
3175
|
+
if (typeof this.url !== 'undefined') {
|
|
3176
|
+
toReturn['url'] = this.url;
|
|
3177
|
+
}
|
|
3178
|
+
return toReturn;
|
|
3179
|
+
}
|
|
3180
|
+
}
|
|
3138
3181
|
class MediaUploadRequest {
|
|
3139
3182
|
constructor(kwargs) {
|
|
3140
3183
|
if (!kwargs) {
|
|
@@ -3676,6 +3719,11 @@ class SocialPostsV2ApiService {
|
|
|
3676
3719
|
return this.http.post(this._host + "/socialposts.v2.SocialPostsV2/CreateImages", request.toApiJson(), this.apiOptions())
|
|
3677
3720
|
.pipe(map(resp => CreateImageResponse.fromProto(resp)));
|
|
3678
3721
|
}
|
|
3722
|
+
getImageByUrl(r) {
|
|
3723
|
+
const request = (r.toApiJson) ? r : new ImageUrl(r);
|
|
3724
|
+
return this.http.post(this._host + "/socialposts.v2.SocialPostsV2/GetImageByUrl", request.toApiJson(), this.apiOptions())
|
|
3725
|
+
.pipe(map(resp => ImageBlob.fromProto(resp)));
|
|
3726
|
+
}
|
|
3679
3727
|
}
|
|
3680
3728
|
SocialPostsV2ApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2ApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3681
3729
|
SocialPostsV2ApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2ApiService, providedIn: 'root' });
|
|
@@ -3967,9 +4015,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImpo
|
|
|
3967
4015
|
args: [{ providedIn: 'root' }]
|
|
3968
4016
|
}], ctorParameters: function () { return [{ type: PostPerformanceApiService }]; } });
|
|
3969
4017
|
|
|
4018
|
+
class SocialPostsV2Service {
|
|
4019
|
+
constructor(socialpostV2ApiService) {
|
|
4020
|
+
this.socialpostV2ApiService = socialpostV2ApiService;
|
|
4021
|
+
}
|
|
4022
|
+
createImage(businessId, prompt, imageAmount = 3, size = '1024x1024') {
|
|
4023
|
+
const req = new CreateImageRequest({ businessId: businessId, prompt: prompt, imageAmount: imageAmount, size: size, responseFormat: 'url' });
|
|
4024
|
+
return this.socialpostV2ApiService.createImages(req);
|
|
4025
|
+
}
|
|
4026
|
+
getImageByUrl(url) {
|
|
4027
|
+
const urlRequest = new ImageUrl({ url: url });
|
|
4028
|
+
return this.socialpostV2ApiService.getImageByUrl(urlRequest);
|
|
4029
|
+
}
|
|
4030
|
+
}
|
|
4031
|
+
SocialPostsV2Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2Service, deps: [{ token: SocialPostsV2ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4032
|
+
SocialPostsV2Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2Service, providedIn: 'root' });
|
|
4033
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2Service, decorators: [{
|
|
4034
|
+
type: Injectable,
|
|
4035
|
+
args: [{ providedIn: 'root' }]
|
|
4036
|
+
}], ctorParameters: function () { return [{ type: SocialPostsV2ApiService }]; } });
|
|
4037
|
+
|
|
3970
4038
|
/**
|
|
3971
4039
|
* Generated bundle index. Do not edit.
|
|
3972
4040
|
*/
|
|
3973
4041
|
|
|
3974
|
-
export { DeleteMultilocationPostRequest, FieldMask, GetMultilocationPostRequest, HashTagsService, ListMultilocationPostsForBrandRequest, Location, MessageLength, MultilocationPost, MultilocationPostApiService, MultilocationPostsService, PixabayImageService, PostPerformanceApiService, PostPerformanceService, PostTemplatesService, PostingStatus, RemoveReason, SocialPostsService, TemplateType, TenorGifsService };
|
|
4042
|
+
export { DeleteMultilocationPostRequest, FieldMask, GetMultilocationPostRequest, HashTagsService, ListMultilocationPostsForBrandRequest, Location, MessageLength, MultilocationPost, MultilocationPostApiService, MultilocationPostsService, PixabayImageService, PostPerformanceApiService, PostPerformanceService, PostTemplatesService, PostingStatus, RemoveReason, SocialPostsService, SocialPostsV2Service, TemplateType, TenorGifsService };
|
|
3975
4043
|
//# sourceMappingURL=vendasta-social-posts.mjs.map
|