@vendasta/social-posts 5.9.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/social-post-v2.service.mjs +6 -2
- package/esm2020/public_api.mjs +1 -1
- package/fesm2015/vendasta-social-posts.mjs +432 -380
- package/fesm2015/vendasta-social-posts.mjs.map +1 -1
- package/fesm2020/vendasta-social-posts.mjs +432 -380
- 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/social-post-v2.service.d.ts +2 -1
- package/package.json +1 -1
|
@@ -867,6 +867,272 @@ function enumStringToValue$5(enumRef, value) {
|
|
|
867
867
|
}
|
|
868
868
|
return enumRef[value];
|
|
869
869
|
}
|
|
870
|
+
class Link {
|
|
871
|
+
constructor(kwargs) {
|
|
872
|
+
if (!kwargs) {
|
|
873
|
+
return;
|
|
874
|
+
}
|
|
875
|
+
Object.assign(this, kwargs);
|
|
876
|
+
}
|
|
877
|
+
static fromProto(proto) {
|
|
878
|
+
let m = new Link();
|
|
879
|
+
m = Object.assign(m, proto);
|
|
880
|
+
return m;
|
|
881
|
+
}
|
|
882
|
+
toApiJson() {
|
|
883
|
+
const toReturn = {};
|
|
884
|
+
if (typeof this.name !== 'undefined') {
|
|
885
|
+
toReturn['name'] = this.name;
|
|
886
|
+
}
|
|
887
|
+
if (typeof this.picture !== 'undefined') {
|
|
888
|
+
toReturn['picture'] = this.picture;
|
|
889
|
+
}
|
|
890
|
+
if (typeof this.description !== 'undefined') {
|
|
891
|
+
toReturn['description'] = this.description;
|
|
892
|
+
}
|
|
893
|
+
if (typeof this.title !== 'undefined') {
|
|
894
|
+
toReturn['title'] = this.title;
|
|
895
|
+
}
|
|
896
|
+
if (typeof this.url !== 'undefined') {
|
|
897
|
+
toReturn['url'] = this.url;
|
|
898
|
+
}
|
|
899
|
+
if (typeof this.shortcode !== 'undefined') {
|
|
900
|
+
toReturn['shortcode'] = this.shortcode;
|
|
901
|
+
}
|
|
902
|
+
return toReturn;
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
class Metadata {
|
|
906
|
+
constructor(kwargs) {
|
|
907
|
+
if (!kwargs) {
|
|
908
|
+
return;
|
|
909
|
+
}
|
|
910
|
+
Object.assign(this, kwargs);
|
|
911
|
+
}
|
|
912
|
+
static fromProto(proto) {
|
|
913
|
+
let m = new Metadata();
|
|
914
|
+
m = Object.assign(m, proto);
|
|
915
|
+
return m;
|
|
916
|
+
}
|
|
917
|
+
toApiJson() {
|
|
918
|
+
const toReturn = {};
|
|
919
|
+
if (typeof this.name !== 'undefined') {
|
|
920
|
+
toReturn['name'] = this.name;
|
|
921
|
+
}
|
|
922
|
+
if (typeof this.value !== 'undefined') {
|
|
923
|
+
toReturn['value'] = this.value;
|
|
924
|
+
}
|
|
925
|
+
return toReturn;
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
class PostAction {
|
|
929
|
+
constructor(kwargs) {
|
|
930
|
+
if (!kwargs) {
|
|
931
|
+
return;
|
|
932
|
+
}
|
|
933
|
+
Object.assign(this, kwargs);
|
|
934
|
+
}
|
|
935
|
+
static fromProto(proto) {
|
|
936
|
+
let m = new PostAction();
|
|
937
|
+
m = Object.assign(m, proto);
|
|
938
|
+
return m;
|
|
939
|
+
}
|
|
940
|
+
toApiJson() {
|
|
941
|
+
const toReturn = {};
|
|
942
|
+
if (typeof this.type !== 'undefined') {
|
|
943
|
+
toReturn['type'] = this.type;
|
|
944
|
+
}
|
|
945
|
+
if (typeof this.linkUrl !== 'undefined') {
|
|
946
|
+
toReturn['linkUrl'] = this.linkUrl;
|
|
947
|
+
}
|
|
948
|
+
return toReturn;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
class PostContent {
|
|
952
|
+
constructor(kwargs) {
|
|
953
|
+
if (!kwargs) {
|
|
954
|
+
return;
|
|
955
|
+
}
|
|
956
|
+
Object.assign(this, kwargs);
|
|
957
|
+
}
|
|
958
|
+
static fromProto(proto) {
|
|
959
|
+
let m = new PostContent();
|
|
960
|
+
m = Object.assign(m, proto);
|
|
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);
|
|
966
|
+
}
|
|
967
|
+
return m;
|
|
968
|
+
}
|
|
969
|
+
toApiJson() {
|
|
970
|
+
const toReturn = {};
|
|
971
|
+
if (typeof this.postText !== 'undefined') {
|
|
972
|
+
toReturn['postText'] = this.postText;
|
|
973
|
+
}
|
|
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;
|
|
979
|
+
}
|
|
980
|
+
return toReturn;
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
class PostCustomization {
|
|
984
|
+
constructor(kwargs) {
|
|
985
|
+
if (!kwargs) {
|
|
986
|
+
return;
|
|
987
|
+
}
|
|
988
|
+
Object.assign(this, kwargs);
|
|
989
|
+
}
|
|
990
|
+
static fromProto(proto) {
|
|
991
|
+
let m = new PostCustomization();
|
|
992
|
+
m = Object.assign(m, proto);
|
|
993
|
+
if (proto.event) {
|
|
994
|
+
m.event = PostEvent.fromProto(proto.event);
|
|
995
|
+
}
|
|
996
|
+
if (proto.action) {
|
|
997
|
+
m.action = PostAction.fromProto(proto.action);
|
|
998
|
+
}
|
|
999
|
+
return m;
|
|
1000
|
+
}
|
|
1001
|
+
toApiJson() {
|
|
1002
|
+
const toReturn = {};
|
|
1003
|
+
if (typeof this.event !== 'undefined' && this.event !== null) {
|
|
1004
|
+
toReturn['event'] = 'toApiJson' in this.event ? this.event.toApiJson() : this.event;
|
|
1005
|
+
}
|
|
1006
|
+
if (typeof this.action !== 'undefined' && this.action !== null) {
|
|
1007
|
+
toReturn['action'] = 'toApiJson' in this.action ? this.action.toApiJson() : this.action;
|
|
1008
|
+
}
|
|
1009
|
+
return toReturn;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
class PostEvent {
|
|
1013
|
+
constructor(kwargs) {
|
|
1014
|
+
if (!kwargs) {
|
|
1015
|
+
return;
|
|
1016
|
+
}
|
|
1017
|
+
Object.assign(this, kwargs);
|
|
1018
|
+
}
|
|
1019
|
+
static fromProto(proto) {
|
|
1020
|
+
let m = new PostEvent();
|
|
1021
|
+
m = Object.assign(m, proto);
|
|
1022
|
+
if (proto.start) {
|
|
1023
|
+
m.start = new Date(proto.start);
|
|
1024
|
+
}
|
|
1025
|
+
if (proto.end) {
|
|
1026
|
+
m.end = new Date(proto.end);
|
|
1027
|
+
}
|
|
1028
|
+
return m;
|
|
1029
|
+
}
|
|
1030
|
+
toApiJson() {
|
|
1031
|
+
const toReturn = {};
|
|
1032
|
+
if (typeof this.title !== 'undefined') {
|
|
1033
|
+
toReturn['title'] = this.title;
|
|
1034
|
+
}
|
|
1035
|
+
if (typeof this.start !== 'undefined' && this.start !== null) {
|
|
1036
|
+
toReturn['start'] = 'toApiJson' in this.start ? this.start.toApiJson() : this.start;
|
|
1037
|
+
}
|
|
1038
|
+
if (typeof this.end !== 'undefined' && this.end !== null) {
|
|
1039
|
+
toReturn['end'] = 'toApiJson' in this.end ? this.end.toApiJson() : this.end;
|
|
1040
|
+
}
|
|
1041
|
+
return toReturn;
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
class PostMedia {
|
|
1045
|
+
constructor(kwargs) {
|
|
1046
|
+
if (!kwargs) {
|
|
1047
|
+
return;
|
|
1048
|
+
}
|
|
1049
|
+
Object.assign(this, kwargs);
|
|
1050
|
+
}
|
|
1051
|
+
static fromProto(proto) {
|
|
1052
|
+
let m = new PostMedia();
|
|
1053
|
+
m = Object.assign(m, proto);
|
|
1054
|
+
if (proto.metadata) {
|
|
1055
|
+
m.metadata = proto.metadata.map(Metadata.fromProto);
|
|
1056
|
+
}
|
|
1057
|
+
return m;
|
|
1058
|
+
}
|
|
1059
|
+
toApiJson() {
|
|
1060
|
+
const toReturn = {};
|
|
1061
|
+
if (typeof this.mediaId !== 'undefined') {
|
|
1062
|
+
toReturn['mediaId'] = this.mediaId;
|
|
1063
|
+
}
|
|
1064
|
+
if (typeof this.mediaUrl !== 'undefined') {
|
|
1065
|
+
toReturn['mediaUrl'] = this.mediaUrl;
|
|
1066
|
+
}
|
|
1067
|
+
if (typeof this.mediaType !== 'undefined') {
|
|
1068
|
+
toReturn['mediaType'] = this.mediaType;
|
|
1069
|
+
}
|
|
1070
|
+
if (typeof this.containerId !== 'undefined') {
|
|
1071
|
+
toReturn['containerId'] = this.containerId;
|
|
1072
|
+
}
|
|
1073
|
+
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
1074
|
+
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
1075
|
+
}
|
|
1076
|
+
return toReturn;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
class SocialPost {
|
|
1080
|
+
constructor(kwargs) {
|
|
1081
|
+
if (!kwargs) {
|
|
1082
|
+
return;
|
|
1083
|
+
}
|
|
1084
|
+
Object.assign(this, kwargs);
|
|
1085
|
+
}
|
|
1086
|
+
static fromProto(proto) {
|
|
1087
|
+
let m = new SocialPost();
|
|
1088
|
+
m = Object.assign(m, proto);
|
|
1089
|
+
if (proto.postContent) {
|
|
1090
|
+
m.postContent = PostContent.fromProto(proto.postContent);
|
|
1091
|
+
}
|
|
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);
|
|
1100
|
+
}
|
|
1101
|
+
return m;
|
|
1102
|
+
}
|
|
1103
|
+
toApiJson() {
|
|
1104
|
+
const toReturn = {};
|
|
1105
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1106
|
+
toReturn['businessId'] = this.businessId;
|
|
1107
|
+
}
|
|
1108
|
+
if (typeof this.socialServiceId !== 'undefined') {
|
|
1109
|
+
toReturn['socialServiceId'] = this.socialServiceId;
|
|
1110
|
+
}
|
|
1111
|
+
if (typeof this.postContent !== 'undefined' && this.postContent !== null) {
|
|
1112
|
+
toReturn['postContent'] = 'toApiJson' in this.postContent ? this.postContent.toApiJson() : this.postContent;
|
|
1113
|
+
}
|
|
1114
|
+
if (typeof this.scheduled !== 'undefined' && this.scheduled !== null) {
|
|
1115
|
+
toReturn['scheduled'] = 'toApiJson' in this.scheduled ? this.scheduled.toApiJson() : this.scheduled;
|
|
1116
|
+
}
|
|
1117
|
+
if (typeof this.customization !== 'undefined' && this.customization !== null) {
|
|
1118
|
+
toReturn['customization'] = 'toApiJson' in this.customization ? this.customization.toApiJson() : this.customization;
|
|
1119
|
+
}
|
|
1120
|
+
if (typeof this.postType !== 'undefined') {
|
|
1121
|
+
toReturn['postType'] = this.postType;
|
|
1122
|
+
}
|
|
1123
|
+
if (typeof this.internalPostId !== 'undefined') {
|
|
1124
|
+
toReturn['internalPostId'] = this.internalPostId;
|
|
1125
|
+
}
|
|
1126
|
+
return toReturn;
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
function enumStringToValue$4(enumRef, value) {
|
|
1131
|
+
if (typeof value === 'number') {
|
|
1132
|
+
return value;
|
|
1133
|
+
}
|
|
1134
|
+
return enumRef[value];
|
|
1135
|
+
}
|
|
870
1136
|
class FacebookPostStats {
|
|
871
1137
|
constructor(kwargs) {
|
|
872
1138
|
if (!kwargs) {
|
|
@@ -988,7 +1254,7 @@ class TwitterPostStats {
|
|
|
988
1254
|
}
|
|
989
1255
|
}
|
|
990
1256
|
|
|
991
|
-
function enumStringToValue$
|
|
1257
|
+
function enumStringToValue$3(enumRef, value) {
|
|
992
1258
|
if (typeof value === 'number') {
|
|
993
1259
|
return value;
|
|
994
1260
|
}
|
|
@@ -1094,7 +1360,7 @@ class TenorMediaObject {
|
|
|
1094
1360
|
}
|
|
1095
1361
|
}
|
|
1096
1362
|
|
|
1097
|
-
function enumStringToValue$
|
|
1363
|
+
function enumStringToValue$2(enumRef, value) {
|
|
1098
1364
|
if (typeof value === 'number') {
|
|
1099
1365
|
return value;
|
|
1100
1366
|
}
|
|
@@ -1193,7 +1459,7 @@ class CreatePostTemplateRequest {
|
|
|
1193
1459
|
m.metaData = proto.metaData.map(MetaData.fromProto);
|
|
1194
1460
|
}
|
|
1195
1461
|
if (proto.postType) {
|
|
1196
|
-
m.postType = enumStringToValue$
|
|
1462
|
+
m.postType = enumStringToValue$2(PostType$1, proto.postType);
|
|
1197
1463
|
}
|
|
1198
1464
|
return m;
|
|
1199
1465
|
}
|
|
@@ -1668,7 +1934,7 @@ class GetMultiSocialPostsResponse {
|
|
|
1668
1934
|
let m = new GetMultiSocialPostsResponse();
|
|
1669
1935
|
m = Object.assign(m, proto);
|
|
1670
1936
|
if (proto.socialPosts) {
|
|
1671
|
-
m.socialPosts = proto.socialPosts.map(SocialPost
|
|
1937
|
+
m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
|
|
1672
1938
|
}
|
|
1673
1939
|
return m;
|
|
1674
1940
|
}
|
|
@@ -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) {
|
|
@@ -3675,6 +3718,11 @@ class SocialPostsV2ApiService {
|
|
|
3675
3718
|
return this.http.post(this._host + "/socialposts.v2.SocialPostsV2/CreateImages", request.toApiJson(), this.apiOptions())
|
|
3676
3719
|
.pipe(map(resp => CreateImageResponse.fromProto(resp)));
|
|
3677
3720
|
}
|
|
3721
|
+
getImageByUrl(r) {
|
|
3722
|
+
const request = (r.toApiJson) ? r : new ImageUrl(r);
|
|
3723
|
+
return this.http.post(this._host + "/socialposts.v2.SocialPostsV2/GetImageByUrl", request.toApiJson(), this.apiOptions())
|
|
3724
|
+
.pipe(map(resp => ImageBlob.fromProto(resp)));
|
|
3725
|
+
}
|
|
3678
3726
|
}
|
|
3679
3727
|
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 });
|
|
3680
3728
|
SocialPostsV2ApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2ApiService, providedIn: 'root' });
|
|
@@ -3974,6 +4022,10 @@ class SocialPostsV2Service {
|
|
|
3974
4022
|
const req = new CreateImageRequest({ businessId: businessId, prompt: prompt, imageAmount: imageAmount, size: size, responseFormat: 'url' });
|
|
3975
4023
|
return this.socialpostV2ApiService.createImages(req);
|
|
3976
4024
|
}
|
|
4025
|
+
getImageByUrl(url) {
|
|
4026
|
+
const urlRequest = new ImageUrl({ url: url });
|
|
4027
|
+
return this.socialpostV2ApiService.getImageByUrl(urlRequest);
|
|
4028
|
+
}
|
|
3977
4029
|
}
|
|
3978
4030
|
SocialPostsV2Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2Service, deps: [{ token: SocialPostsV2ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3979
4031
|
SocialPostsV2Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2Service, providedIn: 'root' });
|