@vendasta/social-posts 4.0.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/_generated/host.service.mjs +25 -0
- package/esm2020/lib/_internal/enums/index.mjs +9 -0
- package/esm2020/lib/_internal/enums/multilocation-post.enum.mjs +12 -0
- package/esm2020/lib/_internal/enums/social-posts.enum.mjs +39 -0
- package/esm2020/lib/_internal/hash-tags.api.service.mjs +49 -0
- package/esm2020/lib/_internal/index.mjs +17 -0
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +2 -0
- package/esm2020/lib/_internal/interfaces/field-mask.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/hashtag.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/index.mjs +2 -0
- package/esm2020/lib/_internal/interfaces/multilocation-post.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/pixabay-image.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/post-templates.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/social-post-stats.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/social-posts.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/tenor-gif.interface.mjs +8 -0
- package/esm2020/lib/_internal/multilocation-post.api.service.mjs +64 -0
- package/esm2020/lib/_internal/objects/api.mjs +1354 -0
- package/esm2020/lib/_internal/objects/field-mask.mjs +27 -0
- package/esm2020/lib/_internal/objects/hashtag.mjs +39 -0
- package/esm2020/lib/_internal/objects/index.mjs +16 -0
- package/esm2020/lib/_internal/objects/multilocation-post.mjs +115 -0
- package/esm2020/lib/_internal/objects/pixabay-image.mjs +138 -0
- package/esm2020/lib/_internal/objects/post-templates.mjs +75 -0
- package/esm2020/lib/_internal/objects/social-post-stats.mjs +127 -0
- package/esm2020/lib/_internal/objects/social-posts.mjs +272 -0
- package/esm2020/lib/_internal/objects/tenor-gif.mjs +106 -0
- package/esm2020/lib/_internal/partner-social-posts.api.service.mjs +46 -0
- package/esm2020/lib/_internal/pixabay-images.api.service.mjs +41 -0
- package/esm2020/lib/_internal/post-templates.api.service.mjs +59 -0
- package/esm2020/lib/_internal/social-posts.api.service.mjs +70 -0
- package/esm2020/lib/_internal/tenor-gifs.api.service.mjs +46 -0
- package/esm2020/lib/hashtag.service.mjs +42 -0
- package/esm2020/lib/index.mjs +8 -0
- package/esm2020/lib/multilocation-posts.service.mjs +76 -0
- package/esm2020/lib/pixabay-image.service.mjs +23 -0
- package/esm2020/lib/post-templates.service.mjs +72 -0
- package/esm2020/lib/social-posts.service.mjs +43 -0
- package/esm2020/lib/tenor-gifs.service.mjs +34 -0
- package/esm2020/public_api.mjs +5 -0
- package/esm2020/vendasta-social-posts.mjs +5 -0
- package/fesm2015/vendasta-social-posts.mjs +2884 -0
- package/fesm2015/vendasta-social-posts.mjs.map +1 -0
- package/fesm2020/vendasta-social-posts.mjs +2883 -0
- package/fesm2020/vendasta-social-posts.mjs.map +1 -0
- package/lib/_generated/host.service.d.ts +5 -9
- package/lib/_internal/hash-tags.api.service.d.ts +18 -0
- package/lib/_internal/index.d.ts +3 -0
- package/lib/_internal/interfaces/api.interface.d.ts +51 -0
- package/lib/_internal/interfaces/hashtag.interface.d.ts +6 -0
- package/lib/_internal/interfaces/index.d.ts +4 -1
- package/lib/_internal/interfaces/pixabay-image.interface.d.ts +26 -0
- package/lib/_internal/interfaces/tenor-gif.interface.d.ts +20 -0
- package/lib/_internal/multilocation-post.api.service.d.ts +4 -0
- package/lib/_internal/objects/api.d.ts +81 -0
- package/lib/_internal/objects/hashtag.d.ts +11 -0
- package/lib/_internal/objects/index.d.ts +4 -1
- package/lib/_internal/objects/pixabay-image.d.ts +31 -0
- package/lib/_internal/objects/tenor-gif.d.ts +31 -0
- package/lib/_internal/partner-social-posts.api.service.d.ts +4 -0
- package/lib/_internal/pixabay-images.api.service.d.ts +16 -0
- package/lib/_internal/post-templates.api.service.d.ts +4 -0
- package/lib/_internal/social-posts.api.service.d.ts +4 -0
- package/lib/_internal/tenor-gifs.api.service.d.ts +17 -0
- package/lib/hashtag.service.d.ts +13 -0
- package/lib/index.d.ts +3 -0
- package/lib/multilocation-posts.service.d.ts +3 -0
- package/lib/pixabay-image.service.d.ts +11 -0
- package/lib/post-templates.service.d.ts +3 -0
- package/lib/social-posts.service.d.ts +3 -0
- package/lib/tenor-gifs.service.d.ts +12 -0
- package/package.json +24 -16
- package/src/README.md +1 -0
- package/vendasta-social-posts.d.ts +1 -4
- package/bundles/vendasta-social-posts.umd.js +0 -3709
- package/bundles/vendasta-social-posts.umd.js.map +0 -1
- package/bundles/vendasta-social-posts.umd.min.js +0 -2
- package/bundles/vendasta-social-posts.umd.min.js.map +0 -1
- package/esm2015/lib/_generated/host.service.js +0 -104
- package/esm2015/lib/_internal/enums/index.js +0 -13
- package/esm2015/lib/_internal/enums/multilocation-post.enum.js +0 -19
- package/esm2015/lib/_internal/enums/social-posts.enum.js +0 -67
- package/esm2015/lib/_internal/index.js +0 -18
- package/esm2015/lib/_internal/interfaces/api.interface.js +0 -447
- package/esm2015/lib/_internal/interfaces/field-mask.interface.js +0 -19
- package/esm2015/lib/_internal/interfaces/index.js +0 -5
- package/esm2015/lib/_internal/interfaces/multilocation-post.interface.js +0 -59
- package/esm2015/lib/_internal/interfaces/post-templates.interface.js +0 -45
- package/esm2015/lib/_internal/interfaces/social-post-stats.interface.js +0 -57
- package/esm2015/lib/_internal/interfaces/social-posts.interface.js +0 -127
- package/esm2015/lib/_internal/multilocation-post.api.service.js +0 -136
- package/esm2015/lib/_internal/objects/api.js +0 -1805
- package/esm2015/lib/_internal/objects/field-mask.js +0 -53
- package/esm2015/lib/_internal/objects/index.js +0 -17
- package/esm2015/lib/_internal/objects/multilocation-post.js +0 -197
- package/esm2015/lib/_internal/objects/post-templates.js +0 -127
- package/esm2015/lib/_internal/objects/social-post-stats.js +0 -207
- package/esm2015/lib/_internal/objects/social-posts.js +0 -446
- package/esm2015/lib/_internal/partner-social-posts.api.service.js +0 -90
- package/esm2015/lib/_internal/post-templates.api.service.js +0 -122
- package/esm2015/lib/_internal/social-posts.api.service.js +0 -155
- package/esm2015/lib/index.js +0 -9
- package/esm2015/lib/multilocation-posts.service.js +0 -145
- package/esm2015/lib/post-templates.service.js +0 -138
- package/esm2015/lib/social-posts.service.js +0 -85
- package/esm2015/public_api.js +0 -9
- package/esm2015/vendasta-social-posts.js +0 -13
- package/esm5/lib/_generated/host.service.js +0 -115
- package/esm5/lib/_internal/enums/index.js +0 -13
- package/esm5/lib/_internal/enums/multilocation-post.enum.js +0 -19
- package/esm5/lib/_internal/enums/social-posts.enum.js +0 -67
- package/esm5/lib/_internal/index.js +0 -18
- package/esm5/lib/_internal/interfaces/api.interface.js +0 -447
- package/esm5/lib/_internal/interfaces/field-mask.interface.js +0 -19
- package/esm5/lib/_internal/interfaces/index.js +0 -5
- package/esm5/lib/_internal/interfaces/multilocation-post.interface.js +0 -59
- package/esm5/lib/_internal/interfaces/post-templates.interface.js +0 -45
- package/esm5/lib/_internal/interfaces/social-post-stats.interface.js +0 -57
- package/esm5/lib/_internal/interfaces/social-posts.interface.js +0 -127
- package/esm5/lib/_internal/multilocation-post.api.service.js +0 -163
- package/esm5/lib/_internal/objects/api.js +0 -2015
- package/esm5/lib/_internal/objects/field-mask.js +0 -59
- package/esm5/lib/_internal/objects/index.js +0 -17
- package/esm5/lib/_internal/objects/multilocation-post.js +0 -215
- package/esm5/lib/_internal/objects/post-templates.js +0 -133
- package/esm5/lib/_internal/objects/social-post-stats.js +0 -225
- package/esm5/lib/_internal/objects/social-posts.js +0 -482
- package/esm5/lib/_internal/partner-social-posts.api.service.js +0 -100
- package/esm5/lib/_internal/post-templates.api.service.js +0 -145
- package/esm5/lib/_internal/social-posts.api.service.js +0 -186
- package/esm5/lib/index.js +0 -9
- package/esm5/lib/multilocation-posts.service.js +0 -191
- package/esm5/lib/post-templates.service.js +0 -182
- package/esm5/lib/social-posts.service.js +0 -106
- package/esm5/public_api.js +0 -9
- package/esm5/vendasta-social-posts.js +0 -13
- package/fesm2015/vendasta-social-posts.js +0 -3220
- package/fesm2015/vendasta-social-posts.js.map +0 -1
- package/fesm5/vendasta-social-posts.js +0 -3668
- package/fesm5/vendasta-social-posts.js.map +0 -1
- package/vendasta-social-posts.metadata.json +0 -1
|
@@ -0,0 +1,2884 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import { of } from 'rxjs';
|
|
4
|
+
import * as i1 from '@angular/common/http';
|
|
5
|
+
import { HttpHeaders } from '@angular/common/http';
|
|
6
|
+
import { map } from 'rxjs/operators';
|
|
7
|
+
|
|
8
|
+
function enumStringToValue$8(enumRef, value) {
|
|
9
|
+
if (typeof value === 'number') {
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
return enumRef[value];
|
|
13
|
+
}
|
|
14
|
+
class FieldMask {
|
|
15
|
+
constructor(kwargs) {
|
|
16
|
+
if (!kwargs) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
Object.assign(this, kwargs);
|
|
20
|
+
}
|
|
21
|
+
static fromProto(proto) {
|
|
22
|
+
let m = new FieldMask();
|
|
23
|
+
m = Object.assign(m, proto);
|
|
24
|
+
return m;
|
|
25
|
+
}
|
|
26
|
+
toApiJson() {
|
|
27
|
+
const toReturn = {};
|
|
28
|
+
if (typeof this.paths !== 'undefined') {
|
|
29
|
+
toReturn['paths'] = this.paths;
|
|
30
|
+
}
|
|
31
|
+
return toReturn;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function enumStringToValue$7(enumRef, value) {
|
|
36
|
+
if (typeof value === 'number') {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
return enumRef[value];
|
|
40
|
+
}
|
|
41
|
+
class Hashtag {
|
|
42
|
+
constructor(kwargs) {
|
|
43
|
+
if (!kwargs) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
Object.assign(this, kwargs);
|
|
47
|
+
}
|
|
48
|
+
static fromProto(proto) {
|
|
49
|
+
let m = new Hashtag();
|
|
50
|
+
m = Object.assign(m, proto);
|
|
51
|
+
if (proto.usedCount) {
|
|
52
|
+
m.usedCount = parseInt(proto.usedCount, 10);
|
|
53
|
+
}
|
|
54
|
+
return m;
|
|
55
|
+
}
|
|
56
|
+
toApiJson() {
|
|
57
|
+
const toReturn = {};
|
|
58
|
+
if (typeof this.keyword !== 'undefined') {
|
|
59
|
+
toReturn['keyword'] = this.keyword;
|
|
60
|
+
}
|
|
61
|
+
if (typeof this.usedCount !== 'undefined') {
|
|
62
|
+
toReturn['usedCount'] = this.usedCount;
|
|
63
|
+
}
|
|
64
|
+
if (typeof this.businessId !== 'undefined') {
|
|
65
|
+
toReturn['businessId'] = this.businessId;
|
|
66
|
+
}
|
|
67
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
68
|
+
toReturn['partnerId'] = this.partnerId;
|
|
69
|
+
}
|
|
70
|
+
return toReturn;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function enumStringToValue$6(enumRef, value) {
|
|
75
|
+
if (typeof value === 'number') {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
return enumRef[value];
|
|
79
|
+
}
|
|
80
|
+
class Location {
|
|
81
|
+
constructor(kwargs) {
|
|
82
|
+
if (!kwargs) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
Object.assign(this, kwargs);
|
|
86
|
+
}
|
|
87
|
+
static fromProto(proto) {
|
|
88
|
+
let m = new Location();
|
|
89
|
+
m = Object.assign(m, proto);
|
|
90
|
+
return m;
|
|
91
|
+
}
|
|
92
|
+
toApiJson() {
|
|
93
|
+
const toReturn = {};
|
|
94
|
+
if (typeof this.socialServiceIds !== 'undefined') {
|
|
95
|
+
toReturn['socialServiceIds'] = this.socialServiceIds;
|
|
96
|
+
}
|
|
97
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
98
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
99
|
+
}
|
|
100
|
+
return toReturn;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
class MultilocationPost {
|
|
104
|
+
constructor(kwargs) {
|
|
105
|
+
if (!kwargs) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
Object.assign(this, kwargs);
|
|
109
|
+
}
|
|
110
|
+
static fromProto(proto) {
|
|
111
|
+
let m = new MultilocationPost();
|
|
112
|
+
m = Object.assign(m, proto);
|
|
113
|
+
if (proto.originalScheduledDate) {
|
|
114
|
+
m.originalScheduledDate = new Date(proto.originalScheduledDate);
|
|
115
|
+
}
|
|
116
|
+
if (proto.originalLocations) {
|
|
117
|
+
m.originalLocations = proto.originalLocations.map(Location.fromProto);
|
|
118
|
+
}
|
|
119
|
+
if (proto.editedLocations) {
|
|
120
|
+
m.editedLocations = proto.editedLocations.map(Location.fromProto);
|
|
121
|
+
}
|
|
122
|
+
if (proto.deletedLocations) {
|
|
123
|
+
m.deletedLocations = proto.deletedLocations.map(Location.fromProto);
|
|
124
|
+
}
|
|
125
|
+
return m;
|
|
126
|
+
}
|
|
127
|
+
toApiJson() {
|
|
128
|
+
const toReturn = {};
|
|
129
|
+
if (typeof this.brandId !== 'undefined') {
|
|
130
|
+
toReturn['brandId'] = this.brandId;
|
|
131
|
+
}
|
|
132
|
+
if (typeof this.multilocationId !== 'undefined') {
|
|
133
|
+
toReturn['multilocationId'] = this.multilocationId;
|
|
134
|
+
}
|
|
135
|
+
if (typeof this.originalText !== 'undefined') {
|
|
136
|
+
toReturn['originalText'] = this.originalText;
|
|
137
|
+
}
|
|
138
|
+
if (typeof this.originalScheduledDate !== 'undefined' && this.originalScheduledDate !== null) {
|
|
139
|
+
toReturn['originalScheduledDate'] = 'toApiJson' in this.originalScheduledDate ? this.originalScheduledDate.toApiJson() : this.originalScheduledDate;
|
|
140
|
+
}
|
|
141
|
+
if (typeof this.originalMedia !== 'undefined') {
|
|
142
|
+
toReturn['originalMedia'] = this.originalMedia;
|
|
143
|
+
}
|
|
144
|
+
if (typeof this.originalLocations !== 'undefined' && this.originalLocations !== null) {
|
|
145
|
+
toReturn['originalLocations'] = 'toApiJson' in this.originalLocations ? this.originalLocations.toApiJson() : this.originalLocations;
|
|
146
|
+
}
|
|
147
|
+
if (typeof this.editedLocations !== 'undefined' && this.editedLocations !== null) {
|
|
148
|
+
toReturn['editedLocations'] = 'toApiJson' in this.editedLocations ? this.editedLocations.toApiJson() : this.editedLocations;
|
|
149
|
+
}
|
|
150
|
+
if (typeof this.deletedLocations !== 'undefined' && this.deletedLocations !== null) {
|
|
151
|
+
toReturn['deletedLocations'] = 'toApiJson' in this.deletedLocations ? this.deletedLocations.toApiJson() : this.deletedLocations;
|
|
152
|
+
}
|
|
153
|
+
if (typeof this.originalGifs !== 'undefined') {
|
|
154
|
+
toReturn['originalGifs'] = this.originalGifs;
|
|
155
|
+
}
|
|
156
|
+
if (typeof this.originalVideos !== 'undefined') {
|
|
157
|
+
toReturn['originalVideos'] = this.originalVideos;
|
|
158
|
+
}
|
|
159
|
+
return toReturn;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
class MultilocationPostError {
|
|
163
|
+
constructor(kwargs) {
|
|
164
|
+
if (!kwargs) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
Object.assign(this, kwargs);
|
|
168
|
+
}
|
|
169
|
+
static fromProto(proto) {
|
|
170
|
+
let m = new MultilocationPostError();
|
|
171
|
+
m = Object.assign(m, proto);
|
|
172
|
+
return m;
|
|
173
|
+
}
|
|
174
|
+
toApiJson() {
|
|
175
|
+
const toReturn = {};
|
|
176
|
+
if (typeof this.socialServiceId !== 'undefined') {
|
|
177
|
+
toReturn['socialServiceId'] = this.socialServiceId;
|
|
178
|
+
}
|
|
179
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
180
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
181
|
+
}
|
|
182
|
+
if (typeof this.errorReason !== 'undefined') {
|
|
183
|
+
toReturn['errorReason'] = this.errorReason;
|
|
184
|
+
}
|
|
185
|
+
return toReturn;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function enumStringToValue$5(enumRef, value) {
|
|
190
|
+
if (typeof value === 'number') {
|
|
191
|
+
return value;
|
|
192
|
+
}
|
|
193
|
+
return enumRef[value];
|
|
194
|
+
}
|
|
195
|
+
class PixabayImage {
|
|
196
|
+
constructor(kwargs) {
|
|
197
|
+
if (!kwargs) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
Object.assign(this, kwargs);
|
|
201
|
+
}
|
|
202
|
+
static fromProto(proto) {
|
|
203
|
+
let m = new PixabayImage();
|
|
204
|
+
m = Object.assign(m, proto);
|
|
205
|
+
if (proto.id) {
|
|
206
|
+
m.id = parseInt(proto.id, 10);
|
|
207
|
+
}
|
|
208
|
+
if (proto.previewWidth) {
|
|
209
|
+
m.previewWidth = parseInt(proto.previewWidth, 10);
|
|
210
|
+
}
|
|
211
|
+
if (proto.previewHeight) {
|
|
212
|
+
m.previewHeight = parseInt(proto.previewHeight, 10);
|
|
213
|
+
}
|
|
214
|
+
if (proto.webformatWidth) {
|
|
215
|
+
m.webformatWidth = parseInt(proto.webformatWidth, 10);
|
|
216
|
+
}
|
|
217
|
+
if (proto.webformatHeight) {
|
|
218
|
+
m.webformatHeight = parseInt(proto.webformatHeight, 10);
|
|
219
|
+
}
|
|
220
|
+
if (proto.imageWidth) {
|
|
221
|
+
m.imageWidth = parseInt(proto.imageWidth, 10);
|
|
222
|
+
}
|
|
223
|
+
if (proto.imageHeight) {
|
|
224
|
+
m.imageHeight = parseInt(proto.imageHeight, 10);
|
|
225
|
+
}
|
|
226
|
+
if (proto.imageSize) {
|
|
227
|
+
m.imageSize = parseInt(proto.imageSize, 10);
|
|
228
|
+
}
|
|
229
|
+
if (proto.views) {
|
|
230
|
+
m.views = parseInt(proto.views, 10);
|
|
231
|
+
}
|
|
232
|
+
if (proto.downloads) {
|
|
233
|
+
m.downloads = parseInt(proto.downloads, 10);
|
|
234
|
+
}
|
|
235
|
+
if (proto.favorites) {
|
|
236
|
+
m.favorites = parseInt(proto.favorites, 10);
|
|
237
|
+
}
|
|
238
|
+
if (proto.likes) {
|
|
239
|
+
m.likes = parseInt(proto.likes, 10);
|
|
240
|
+
}
|
|
241
|
+
if (proto.comments) {
|
|
242
|
+
m.comments = parseInt(proto.comments, 10);
|
|
243
|
+
}
|
|
244
|
+
if (proto.userId) {
|
|
245
|
+
m.userId = parseInt(proto.userId, 10);
|
|
246
|
+
}
|
|
247
|
+
return m;
|
|
248
|
+
}
|
|
249
|
+
toApiJson() {
|
|
250
|
+
const toReturn = {};
|
|
251
|
+
if (typeof this.id !== 'undefined') {
|
|
252
|
+
toReturn['id'] = this.id;
|
|
253
|
+
}
|
|
254
|
+
if (typeof this.pageUrl !== 'undefined') {
|
|
255
|
+
toReturn['pageUrl'] = this.pageUrl;
|
|
256
|
+
}
|
|
257
|
+
if (typeof this.type !== 'undefined') {
|
|
258
|
+
toReturn['type'] = this.type;
|
|
259
|
+
}
|
|
260
|
+
if (typeof this.tags !== 'undefined') {
|
|
261
|
+
toReturn['tags'] = this.tags;
|
|
262
|
+
}
|
|
263
|
+
if (typeof this.previewUrl !== 'undefined') {
|
|
264
|
+
toReturn['previewUrl'] = this.previewUrl;
|
|
265
|
+
}
|
|
266
|
+
if (typeof this.previewWidth !== 'undefined') {
|
|
267
|
+
toReturn['previewWidth'] = this.previewWidth;
|
|
268
|
+
}
|
|
269
|
+
if (typeof this.previewHeight !== 'undefined') {
|
|
270
|
+
toReturn['previewHeight'] = this.previewHeight;
|
|
271
|
+
}
|
|
272
|
+
if (typeof this.webformatUrl !== 'undefined') {
|
|
273
|
+
toReturn['webformatUrl'] = this.webformatUrl;
|
|
274
|
+
}
|
|
275
|
+
if (typeof this.webformatWidth !== 'undefined') {
|
|
276
|
+
toReturn['webformatWidth'] = this.webformatWidth;
|
|
277
|
+
}
|
|
278
|
+
if (typeof this.webformatHeight !== 'undefined') {
|
|
279
|
+
toReturn['webformatHeight'] = this.webformatHeight;
|
|
280
|
+
}
|
|
281
|
+
if (typeof this.largeImageUrl !== 'undefined') {
|
|
282
|
+
toReturn['largeImageUrl'] = this.largeImageUrl;
|
|
283
|
+
}
|
|
284
|
+
if (typeof this.fullHdUrl !== 'undefined') {
|
|
285
|
+
toReturn['fullHdUrl'] = this.fullHdUrl;
|
|
286
|
+
}
|
|
287
|
+
if (typeof this.imageUrl !== 'undefined') {
|
|
288
|
+
toReturn['imageUrl'] = this.imageUrl;
|
|
289
|
+
}
|
|
290
|
+
if (typeof this.imageWidth !== 'undefined') {
|
|
291
|
+
toReturn['imageWidth'] = this.imageWidth;
|
|
292
|
+
}
|
|
293
|
+
if (typeof this.imageHeight !== 'undefined') {
|
|
294
|
+
toReturn['imageHeight'] = this.imageHeight;
|
|
295
|
+
}
|
|
296
|
+
if (typeof this.imageSize !== 'undefined') {
|
|
297
|
+
toReturn['imageSize'] = this.imageSize;
|
|
298
|
+
}
|
|
299
|
+
if (typeof this.views !== 'undefined') {
|
|
300
|
+
toReturn['views'] = this.views;
|
|
301
|
+
}
|
|
302
|
+
if (typeof this.downloads !== 'undefined') {
|
|
303
|
+
toReturn['downloads'] = this.downloads;
|
|
304
|
+
}
|
|
305
|
+
if (typeof this.favorites !== 'undefined') {
|
|
306
|
+
toReturn['favorites'] = this.favorites;
|
|
307
|
+
}
|
|
308
|
+
if (typeof this.likes !== 'undefined') {
|
|
309
|
+
toReturn['likes'] = this.likes;
|
|
310
|
+
}
|
|
311
|
+
if (typeof this.comments !== 'undefined') {
|
|
312
|
+
toReturn['comments'] = this.comments;
|
|
313
|
+
}
|
|
314
|
+
if (typeof this.userId !== 'undefined') {
|
|
315
|
+
toReturn['userId'] = this.userId;
|
|
316
|
+
}
|
|
317
|
+
if (typeof this.user !== 'undefined') {
|
|
318
|
+
toReturn['user'] = this.user;
|
|
319
|
+
}
|
|
320
|
+
if (typeof this.userImageUrl !== 'undefined') {
|
|
321
|
+
toReturn['userImageUrl'] = this.userImageUrl;
|
|
322
|
+
}
|
|
323
|
+
return toReturn;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
function enumStringToValue$4(enumRef, value) {
|
|
328
|
+
if (typeof value === 'number') {
|
|
329
|
+
return value;
|
|
330
|
+
}
|
|
331
|
+
return enumRef[value];
|
|
332
|
+
}
|
|
333
|
+
class PostTemplate {
|
|
334
|
+
constructor(kwargs) {
|
|
335
|
+
if (!kwargs) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
Object.assign(this, kwargs);
|
|
339
|
+
}
|
|
340
|
+
static fromProto(proto) {
|
|
341
|
+
let m = new PostTemplate();
|
|
342
|
+
m = Object.assign(m, proto);
|
|
343
|
+
if (proto.created) {
|
|
344
|
+
m.created = new Date(proto.created);
|
|
345
|
+
}
|
|
346
|
+
if (proto.updated) {
|
|
347
|
+
m.updated = new Date(proto.updated);
|
|
348
|
+
}
|
|
349
|
+
if (proto.postDateTime) {
|
|
350
|
+
m.postDateTime = new Date(proto.postDateTime);
|
|
351
|
+
}
|
|
352
|
+
return m;
|
|
353
|
+
}
|
|
354
|
+
toApiJson() {
|
|
355
|
+
const toReturn = {};
|
|
356
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
357
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
358
|
+
}
|
|
359
|
+
if (typeof this.templateId !== 'undefined') {
|
|
360
|
+
toReturn['templateId'] = this.templateId;
|
|
361
|
+
}
|
|
362
|
+
if (typeof this.title !== 'undefined') {
|
|
363
|
+
toReturn['title'] = this.title;
|
|
364
|
+
}
|
|
365
|
+
if (typeof this.created !== 'undefined' && this.created !== null) {
|
|
366
|
+
toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
|
|
367
|
+
}
|
|
368
|
+
if (typeof this.updated !== 'undefined' && this.updated !== null) {
|
|
369
|
+
toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;
|
|
370
|
+
}
|
|
371
|
+
if (typeof this.postText !== 'undefined') {
|
|
372
|
+
toReturn['postText'] = this.postText;
|
|
373
|
+
}
|
|
374
|
+
if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
|
|
375
|
+
toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
|
|
376
|
+
}
|
|
377
|
+
if (typeof this.gmbPostCustomization !== 'undefined') {
|
|
378
|
+
toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
|
|
379
|
+
}
|
|
380
|
+
if (typeof this.imageUrl !== 'undefined') {
|
|
381
|
+
toReturn['imageUrl'] = this.imageUrl;
|
|
382
|
+
}
|
|
383
|
+
if (typeof this.imagePath !== 'undefined') {
|
|
384
|
+
toReturn['imagePath'] = this.imagePath;
|
|
385
|
+
}
|
|
386
|
+
if (typeof this.imageSize !== 'undefined') {
|
|
387
|
+
toReturn['imageSize'] = this.imageSize;
|
|
388
|
+
}
|
|
389
|
+
if (typeof this.previews !== 'undefined') {
|
|
390
|
+
toReturn['previews'] = this.previews;
|
|
391
|
+
}
|
|
392
|
+
if (typeof this.options !== 'undefined') {
|
|
393
|
+
toReturn['options'] = this.options;
|
|
394
|
+
}
|
|
395
|
+
if (typeof this.videoUrl !== 'undefined') {
|
|
396
|
+
toReturn['videoUrl'] = this.videoUrl;
|
|
397
|
+
}
|
|
398
|
+
return toReturn;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// *********************************
|
|
403
|
+
// Code generated by sdkgen
|
|
404
|
+
// DO NOT EDIT!.
|
|
405
|
+
//
|
|
406
|
+
// Enums.
|
|
407
|
+
// *********************************
|
|
408
|
+
var CallToActionCallToActionType;
|
|
409
|
+
(function (CallToActionCallToActionType) {
|
|
410
|
+
CallToActionCallToActionType[CallToActionCallToActionType["LEARN_MORE"] = 0] = "LEARN_MORE";
|
|
411
|
+
CallToActionCallToActionType[CallToActionCallToActionType["BOOK"] = 1] = "BOOK";
|
|
412
|
+
CallToActionCallToActionType[CallToActionCallToActionType["ORDER"] = 2] = "ORDER";
|
|
413
|
+
CallToActionCallToActionType[CallToActionCallToActionType["SHOP"] = 3] = "SHOP";
|
|
414
|
+
CallToActionCallToActionType[CallToActionCallToActionType["SIGN_UP"] = 4] = "SIGN_UP";
|
|
415
|
+
CallToActionCallToActionType[CallToActionCallToActionType["GET_OFFER"] = 5] = "GET_OFFER";
|
|
416
|
+
CallToActionCallToActionType[CallToActionCallToActionType["CALL"] = 6] = "CALL";
|
|
417
|
+
})(CallToActionCallToActionType || (CallToActionCallToActionType = {}));
|
|
418
|
+
var SocialPostDeletionStatus;
|
|
419
|
+
(function (SocialPostDeletionStatus) {
|
|
420
|
+
SocialPostDeletionStatus[SocialPostDeletionStatus["NONE"] = 0] = "NONE";
|
|
421
|
+
SocialPostDeletionStatus[SocialPostDeletionStatus["FAILED"] = 1] = "FAILED";
|
|
422
|
+
SocialPostDeletionStatus[SocialPostDeletionStatus["IN_PROGRESS"] = 2] = "IN_PROGRESS";
|
|
423
|
+
})(SocialPostDeletionStatus || (SocialPostDeletionStatus = {}));
|
|
424
|
+
var PostingStatus;
|
|
425
|
+
(function (PostingStatus) {
|
|
426
|
+
PostingStatus[PostingStatus["POSTING_IN_PROGRESS"] = 0] = "POSTING_IN_PROGRESS";
|
|
427
|
+
PostingStatus[PostingStatus["POSTING_FAILED"] = 1] = "POSTING_FAILED";
|
|
428
|
+
PostingStatus[PostingStatus["POSTING_COMPLETED"] = 2] = "POSTING_COMPLETED";
|
|
429
|
+
})(PostingStatus || (PostingStatus = {}));
|
|
430
|
+
var SocialPostService;
|
|
431
|
+
(function (SocialPostService) {
|
|
432
|
+
SocialPostService[SocialPostService["TWITTER"] = 0] = "TWITTER";
|
|
433
|
+
SocialPostService[SocialPostService["FACEBOOK"] = 1] = "FACEBOOK";
|
|
434
|
+
SocialPostService[SocialPostService["LINKED_IN"] = 2] = "LINKED_IN";
|
|
435
|
+
SocialPostService[SocialPostService["GOOGLE_PLUS"] = 3] = "GOOGLE_PLUS";
|
|
436
|
+
SocialPostService[SocialPostService["GOOGLE_MY_BUSINESS"] = 4] = "GOOGLE_MY_BUSINESS";
|
|
437
|
+
SocialPostService[SocialPostService["UNKNOWN"] = 5] = "UNKNOWN";
|
|
438
|
+
SocialPostService[SocialPostService["INSTAGRAM"] = 6] = "INSTAGRAM";
|
|
439
|
+
})(SocialPostService || (SocialPostService = {}));
|
|
440
|
+
|
|
441
|
+
// *********************************
|
|
442
|
+
// Code generated by sdkgen
|
|
443
|
+
// DO NOT EDIT!.
|
|
444
|
+
//
|
|
445
|
+
// Enums.
|
|
446
|
+
// *********************************
|
|
447
|
+
var RemoveReason;
|
|
448
|
+
(function (RemoveReason) {
|
|
449
|
+
RemoveReason[RemoveReason["REMOVE_REASON_EDIT"] = 0] = "REMOVE_REASON_EDIT";
|
|
450
|
+
RemoveReason[RemoveReason["REMOVE_REASON_DELETE"] = 1] = "REMOVE_REASON_DELETE";
|
|
451
|
+
})(RemoveReason || (RemoveReason = {}));
|
|
452
|
+
|
|
453
|
+
// *********************************
|
|
454
|
+
|
|
455
|
+
function enumStringToValue$3(enumRef, value) {
|
|
456
|
+
if (typeof value === 'number') {
|
|
457
|
+
return value;
|
|
458
|
+
}
|
|
459
|
+
return enumRef[value];
|
|
460
|
+
}
|
|
461
|
+
class CallToAction {
|
|
462
|
+
constructor(kwargs) {
|
|
463
|
+
if (!kwargs) {
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
Object.assign(this, kwargs);
|
|
467
|
+
}
|
|
468
|
+
static fromProto(proto) {
|
|
469
|
+
let m = new CallToAction();
|
|
470
|
+
m = Object.assign(m, proto);
|
|
471
|
+
if (proto.actionType) {
|
|
472
|
+
m.actionType = enumStringToValue$3(CallToActionCallToActionType, proto.actionType);
|
|
473
|
+
}
|
|
474
|
+
return m;
|
|
475
|
+
}
|
|
476
|
+
toApiJson() {
|
|
477
|
+
const toReturn = {};
|
|
478
|
+
if (typeof this.url !== 'undefined') {
|
|
479
|
+
toReturn['url'] = this.url;
|
|
480
|
+
}
|
|
481
|
+
if (typeof this.actionType !== 'undefined') {
|
|
482
|
+
toReturn['actionType'] = this.actionType;
|
|
483
|
+
}
|
|
484
|
+
return toReturn;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
class Error {
|
|
488
|
+
constructor(kwargs) {
|
|
489
|
+
if (!kwargs) {
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
Object.assign(this, kwargs);
|
|
493
|
+
}
|
|
494
|
+
static fromProto(proto) {
|
|
495
|
+
let m = new Error();
|
|
496
|
+
m = Object.assign(m, proto);
|
|
497
|
+
return m;
|
|
498
|
+
}
|
|
499
|
+
toApiJson() {
|
|
500
|
+
const toReturn = {};
|
|
501
|
+
if (typeof this.reason !== 'undefined') {
|
|
502
|
+
toReturn['reason'] = this.reason;
|
|
503
|
+
}
|
|
504
|
+
if (typeof this.category !== 'undefined') {
|
|
505
|
+
toReturn['category'] = this.category;
|
|
506
|
+
}
|
|
507
|
+
return toReturn;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
class Event {
|
|
511
|
+
constructor(kwargs) {
|
|
512
|
+
if (!kwargs) {
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
Object.assign(this, kwargs);
|
|
516
|
+
}
|
|
517
|
+
static fromProto(proto) {
|
|
518
|
+
let m = new Event();
|
|
519
|
+
m = Object.assign(m, proto);
|
|
520
|
+
if (proto.startDatetime) {
|
|
521
|
+
m.startDatetime = new Date(proto.startDatetime);
|
|
522
|
+
}
|
|
523
|
+
if (proto.endDatetime) {
|
|
524
|
+
m.endDatetime = new Date(proto.endDatetime);
|
|
525
|
+
}
|
|
526
|
+
return m;
|
|
527
|
+
}
|
|
528
|
+
toApiJson() {
|
|
529
|
+
const toReturn = {};
|
|
530
|
+
if (typeof this.title !== 'undefined') {
|
|
531
|
+
toReturn['title'] = this.title;
|
|
532
|
+
}
|
|
533
|
+
if (typeof this.startDatetime !== 'undefined' && this.startDatetime !== null) {
|
|
534
|
+
toReturn['startDatetime'] = 'toApiJson' in this.startDatetime ? this.startDatetime.toApiJson() : this.startDatetime;
|
|
535
|
+
}
|
|
536
|
+
if (typeof this.endDatetime !== 'undefined' && this.endDatetime !== null) {
|
|
537
|
+
toReturn['endDatetime'] = 'toApiJson' in this.endDatetime ? this.endDatetime.toApiJson() : this.endDatetime;
|
|
538
|
+
}
|
|
539
|
+
return toReturn;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
class SchedulePostStatus {
|
|
543
|
+
constructor(kwargs) {
|
|
544
|
+
if (!kwargs) {
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
Object.assign(this, kwargs);
|
|
548
|
+
}
|
|
549
|
+
static fromProto(proto) {
|
|
550
|
+
let m = new SchedulePostStatus();
|
|
551
|
+
m = Object.assign(m, proto);
|
|
552
|
+
if (proto.error) {
|
|
553
|
+
m.error = Error.fromProto(proto.error);
|
|
554
|
+
}
|
|
555
|
+
return m;
|
|
556
|
+
}
|
|
557
|
+
toApiJson() {
|
|
558
|
+
const toReturn = {};
|
|
559
|
+
if (typeof this.socialPostId !== 'undefined') {
|
|
560
|
+
toReturn['socialPostId'] = this.socialPostId;
|
|
561
|
+
}
|
|
562
|
+
if (typeof this.socialServiceId !== 'undefined') {
|
|
563
|
+
toReturn['socialServiceId'] = this.socialServiceId;
|
|
564
|
+
}
|
|
565
|
+
if (typeof this.socialServiceLabel !== 'undefined') {
|
|
566
|
+
toReturn['socialServiceLabel'] = this.socialServiceLabel;
|
|
567
|
+
}
|
|
568
|
+
if (typeof this.error !== 'undefined' && this.error !== null) {
|
|
569
|
+
toReturn['error'] = 'toApiJson' in this.error ? this.error.toApiJson() : this.error;
|
|
570
|
+
}
|
|
571
|
+
return toReturn;
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
class SocialPost {
|
|
575
|
+
constructor(kwargs) {
|
|
576
|
+
if (!kwargs) {
|
|
577
|
+
return;
|
|
578
|
+
}
|
|
579
|
+
Object.assign(this, kwargs);
|
|
580
|
+
}
|
|
581
|
+
static fromProto(proto) {
|
|
582
|
+
let m = new SocialPost();
|
|
583
|
+
m = Object.assign(m, proto);
|
|
584
|
+
if (proto.posted) {
|
|
585
|
+
m.posted = new Date(proto.posted);
|
|
586
|
+
}
|
|
587
|
+
if (proto.deletionStatus) {
|
|
588
|
+
m.deletionStatus = enumStringToValue$3(SocialPostDeletionStatus, proto.deletionStatus);
|
|
589
|
+
}
|
|
590
|
+
if (proto.service) {
|
|
591
|
+
m.service = enumStringToValue$3(SocialPostService, proto.service);
|
|
592
|
+
}
|
|
593
|
+
if (proto.created) {
|
|
594
|
+
m.created = new Date(proto.created);
|
|
595
|
+
}
|
|
596
|
+
if (proto.scheduled) {
|
|
597
|
+
m.scheduled = new Date(proto.scheduled);
|
|
598
|
+
}
|
|
599
|
+
if (proto.status) {
|
|
600
|
+
m.status = enumStringToValue$3(PostingStatus, proto.status);
|
|
601
|
+
}
|
|
602
|
+
if (proto.event) {
|
|
603
|
+
m.event = Event.fromProto(proto.event);
|
|
604
|
+
}
|
|
605
|
+
if (proto.callToAction) {
|
|
606
|
+
m.callToAction = CallToAction.fromProto(proto.callToAction);
|
|
607
|
+
}
|
|
608
|
+
if (proto.error) {
|
|
609
|
+
m.error = Error.fromProto(proto.error);
|
|
610
|
+
}
|
|
611
|
+
return m;
|
|
612
|
+
}
|
|
613
|
+
toApiJson() {
|
|
614
|
+
const toReturn = {};
|
|
615
|
+
if (typeof this.businessId !== 'undefined') {
|
|
616
|
+
toReturn['businessId'] = this.businessId;
|
|
617
|
+
}
|
|
618
|
+
if (typeof this.socialPostId !== 'undefined') {
|
|
619
|
+
toReturn['socialPostId'] = this.socialPostId;
|
|
620
|
+
}
|
|
621
|
+
if (typeof this.postText !== 'undefined') {
|
|
622
|
+
toReturn['postText'] = this.postText;
|
|
623
|
+
}
|
|
624
|
+
if (typeof this.posted !== 'undefined' && this.posted !== null) {
|
|
625
|
+
toReturn['posted'] = 'toApiJson' in this.posted ? this.posted.toApiJson() : this.posted;
|
|
626
|
+
}
|
|
627
|
+
if (typeof this.isError !== 'undefined') {
|
|
628
|
+
toReturn['isError'] = this.isError;
|
|
629
|
+
}
|
|
630
|
+
if (typeof this.deletionStatus !== 'undefined') {
|
|
631
|
+
toReturn['deletionStatus'] = this.deletionStatus;
|
|
632
|
+
}
|
|
633
|
+
if (typeof this.service !== 'undefined') {
|
|
634
|
+
toReturn['service'] = this.service;
|
|
635
|
+
}
|
|
636
|
+
if (typeof this.permalink !== 'undefined') {
|
|
637
|
+
toReturn['permalink'] = this.permalink;
|
|
638
|
+
}
|
|
639
|
+
if (typeof this.created !== 'undefined' && this.created !== null) {
|
|
640
|
+
toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
|
|
641
|
+
}
|
|
642
|
+
if (typeof this.profileUrl !== 'undefined') {
|
|
643
|
+
toReturn['profileUrl'] = this.profileUrl;
|
|
644
|
+
}
|
|
645
|
+
if (typeof this.profileImageUrl !== 'undefined') {
|
|
646
|
+
toReturn['profileImageUrl'] = this.profileImageUrl;
|
|
647
|
+
}
|
|
648
|
+
if (typeof this.scheduled !== 'undefined' && this.scheduled !== null) {
|
|
649
|
+
toReturn['scheduled'] = 'toApiJson' in this.scheduled ? this.scheduled.toApiJson() : this.scheduled;
|
|
650
|
+
}
|
|
651
|
+
if (typeof this.status !== 'undefined') {
|
|
652
|
+
toReturn['status'] = this.status;
|
|
653
|
+
}
|
|
654
|
+
if (typeof this.imageUrl !== 'undefined') {
|
|
655
|
+
toReturn['imageUrl'] = this.imageUrl;
|
|
656
|
+
}
|
|
657
|
+
if (typeof this.name !== 'undefined') {
|
|
658
|
+
toReturn['name'] = this.name;
|
|
659
|
+
}
|
|
660
|
+
if (typeof this.username !== 'undefined') {
|
|
661
|
+
toReturn['username'] = this.username;
|
|
662
|
+
}
|
|
663
|
+
if (typeof this.parentId !== 'undefined') {
|
|
664
|
+
toReturn['parentId'] = this.parentId;
|
|
665
|
+
}
|
|
666
|
+
if (typeof this.socialServiceId !== 'undefined') {
|
|
667
|
+
toReturn['socialServiceId'] = this.socialServiceId;
|
|
668
|
+
}
|
|
669
|
+
if (typeof this.event !== 'undefined' && this.event !== null) {
|
|
670
|
+
toReturn['event'] = 'toApiJson' in this.event ? this.event.toApiJson() : this.event;
|
|
671
|
+
}
|
|
672
|
+
if (typeof this.callToAction !== 'undefined' && this.callToAction !== null) {
|
|
673
|
+
toReturn['callToAction'] = 'toApiJson' in this.callToAction ? this.callToAction.toApiJson() : this.callToAction;
|
|
674
|
+
}
|
|
675
|
+
if (typeof this.videoUrl !== 'undefined') {
|
|
676
|
+
toReturn['videoUrl'] = this.videoUrl;
|
|
677
|
+
}
|
|
678
|
+
if (typeof this.error !== 'undefined' && this.error !== null) {
|
|
679
|
+
toReturn['error'] = 'toApiJson' in this.error ? this.error.toApiJson() : this.error;
|
|
680
|
+
}
|
|
681
|
+
if (typeof this.imageUrls !== 'undefined') {
|
|
682
|
+
toReturn['imageUrls'] = this.imageUrls;
|
|
683
|
+
}
|
|
684
|
+
if (typeof this.linkPreviewImageUrl !== 'undefined') {
|
|
685
|
+
toReturn['linkPreviewImageUrl'] = this.linkPreviewImageUrl;
|
|
686
|
+
}
|
|
687
|
+
if (typeof this.brandId !== 'undefined') {
|
|
688
|
+
toReturn['brandId'] = this.brandId;
|
|
689
|
+
}
|
|
690
|
+
if (typeof this.multilocationPostId !== 'undefined') {
|
|
691
|
+
toReturn['multilocationPostId'] = this.multilocationPostId;
|
|
692
|
+
}
|
|
693
|
+
return toReturn;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
class SocialPostData {
|
|
697
|
+
constructor(kwargs) {
|
|
698
|
+
if (!kwargs) {
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
701
|
+
Object.assign(this, kwargs);
|
|
702
|
+
}
|
|
703
|
+
static fromProto(proto) {
|
|
704
|
+
let m = new SocialPostData();
|
|
705
|
+
m = Object.assign(m, proto);
|
|
706
|
+
if (proto.scheduleFor) {
|
|
707
|
+
m.scheduleFor = new Date(proto.scheduleFor);
|
|
708
|
+
}
|
|
709
|
+
return m;
|
|
710
|
+
}
|
|
711
|
+
toApiJson() {
|
|
712
|
+
const toReturn = {};
|
|
713
|
+
if (typeof this.postText !== 'undefined') {
|
|
714
|
+
toReturn['postText'] = this.postText;
|
|
715
|
+
}
|
|
716
|
+
if (typeof this.imageUrl !== 'undefined') {
|
|
717
|
+
toReturn['imageUrl'] = this.imageUrl;
|
|
718
|
+
}
|
|
719
|
+
if (typeof this.scheduleFor !== 'undefined' && this.scheduleFor !== null) {
|
|
720
|
+
toReturn['scheduleFor'] = 'toApiJson' in this.scheduleFor ? this.scheduleFor.toApiJson() : this.scheduleFor;
|
|
721
|
+
}
|
|
722
|
+
return toReturn;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
function enumStringToValue$2(enumRef, value) {
|
|
727
|
+
if (typeof value === 'number') {
|
|
728
|
+
return value;
|
|
729
|
+
}
|
|
730
|
+
return enumRef[value];
|
|
731
|
+
}
|
|
732
|
+
class FacebookPostStats {
|
|
733
|
+
constructor(kwargs) {
|
|
734
|
+
if (!kwargs) {
|
|
735
|
+
return;
|
|
736
|
+
}
|
|
737
|
+
Object.assign(this, kwargs);
|
|
738
|
+
}
|
|
739
|
+
static fromProto(proto) {
|
|
740
|
+
let m = new FacebookPostStats();
|
|
741
|
+
m = Object.assign(m, proto);
|
|
742
|
+
if (proto.commentCount) {
|
|
743
|
+
m.commentCount = parseInt(proto.commentCount, 10);
|
|
744
|
+
}
|
|
745
|
+
if (proto.shareCount) {
|
|
746
|
+
m.shareCount = parseInt(proto.shareCount, 10);
|
|
747
|
+
}
|
|
748
|
+
if (proto.likeCount) {
|
|
749
|
+
m.likeCount = parseInt(proto.likeCount, 10);
|
|
750
|
+
}
|
|
751
|
+
if (proto.reactions) {
|
|
752
|
+
m.reactions = parseInt(proto.reactions, 10);
|
|
753
|
+
}
|
|
754
|
+
if (proto.peopleReached) {
|
|
755
|
+
m.peopleReached = parseInt(proto.peopleReached, 10);
|
|
756
|
+
}
|
|
757
|
+
return m;
|
|
758
|
+
}
|
|
759
|
+
toApiJson() {
|
|
760
|
+
const toReturn = {};
|
|
761
|
+
if (typeof this.commentCount !== 'undefined') {
|
|
762
|
+
toReturn['commentCount'] = this.commentCount;
|
|
763
|
+
}
|
|
764
|
+
if (typeof this.shareCount !== 'undefined') {
|
|
765
|
+
toReturn['shareCount'] = this.shareCount;
|
|
766
|
+
}
|
|
767
|
+
if (typeof this.likeCount !== 'undefined') {
|
|
768
|
+
toReturn['likeCount'] = this.likeCount;
|
|
769
|
+
}
|
|
770
|
+
if (typeof this.hasLike !== 'undefined') {
|
|
771
|
+
toReturn['hasLike'] = this.hasLike;
|
|
772
|
+
}
|
|
773
|
+
if (typeof this.canLike !== 'undefined') {
|
|
774
|
+
toReturn['canLike'] = this.canLike;
|
|
775
|
+
}
|
|
776
|
+
if (typeof this.reactions !== 'undefined') {
|
|
777
|
+
toReturn['reactions'] = this.reactions;
|
|
778
|
+
}
|
|
779
|
+
if (typeof this.peopleReached !== 'undefined') {
|
|
780
|
+
toReturn['peopleReached'] = this.peopleReached;
|
|
781
|
+
}
|
|
782
|
+
return toReturn;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
class SocialPostStats {
|
|
786
|
+
constructor(kwargs) {
|
|
787
|
+
if (!kwargs) {
|
|
788
|
+
return;
|
|
789
|
+
}
|
|
790
|
+
Object.assign(this, kwargs);
|
|
791
|
+
}
|
|
792
|
+
static fromProto(proto) {
|
|
793
|
+
let m = new SocialPostStats();
|
|
794
|
+
m = Object.assign(m, proto);
|
|
795
|
+
if (proto.facebookPostStats) {
|
|
796
|
+
m.facebookPostStats = FacebookPostStats.fromProto(proto.facebookPostStats);
|
|
797
|
+
}
|
|
798
|
+
if (proto.twitterPostStats) {
|
|
799
|
+
m.twitterPostStats = TwitterPostStats.fromProto(proto.twitterPostStats);
|
|
800
|
+
}
|
|
801
|
+
return m;
|
|
802
|
+
}
|
|
803
|
+
toApiJson() {
|
|
804
|
+
const toReturn = {};
|
|
805
|
+
if (typeof this.internalPostId !== 'undefined') {
|
|
806
|
+
toReturn['internalPostId'] = this.internalPostId;
|
|
807
|
+
}
|
|
808
|
+
if (typeof this.facebookPostStats !== 'undefined' && this.facebookPostStats !== null) {
|
|
809
|
+
toReturn['facebookPostStats'] = 'toApiJson' in this.facebookPostStats ? this.facebookPostStats.toApiJson() : this.facebookPostStats;
|
|
810
|
+
}
|
|
811
|
+
if (typeof this.twitterPostStats !== 'undefined' && this.twitterPostStats !== null) {
|
|
812
|
+
toReturn['twitterPostStats'] = 'toApiJson' in this.twitterPostStats ? this.twitterPostStats.toApiJson() : this.twitterPostStats;
|
|
813
|
+
}
|
|
814
|
+
return toReturn;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
class TwitterPostStats {
|
|
818
|
+
constructor(kwargs) {
|
|
819
|
+
if (!kwargs) {
|
|
820
|
+
return;
|
|
821
|
+
}
|
|
822
|
+
Object.assign(this, kwargs);
|
|
823
|
+
}
|
|
824
|
+
static fromProto(proto) {
|
|
825
|
+
let m = new TwitterPostStats();
|
|
826
|
+
m = Object.assign(m, proto);
|
|
827
|
+
if (proto.favourites) {
|
|
828
|
+
m.favourites = parseInt(proto.favourites, 10);
|
|
829
|
+
}
|
|
830
|
+
if (proto.retweets) {
|
|
831
|
+
m.retweets = parseInt(proto.retweets, 10);
|
|
832
|
+
}
|
|
833
|
+
return m;
|
|
834
|
+
}
|
|
835
|
+
toApiJson() {
|
|
836
|
+
const toReturn = {};
|
|
837
|
+
if (typeof this.favourites !== 'undefined') {
|
|
838
|
+
toReturn['favourites'] = this.favourites;
|
|
839
|
+
}
|
|
840
|
+
if (typeof this.hasFavourited !== 'undefined') {
|
|
841
|
+
toReturn['hasFavourited'] = this.hasFavourited;
|
|
842
|
+
}
|
|
843
|
+
if (typeof this.retweets !== 'undefined') {
|
|
844
|
+
toReturn['retweets'] = this.retweets;
|
|
845
|
+
}
|
|
846
|
+
if (typeof this.hasRetweeted !== 'undefined') {
|
|
847
|
+
toReturn['hasRetweeted'] = this.hasRetweeted;
|
|
848
|
+
}
|
|
849
|
+
return toReturn;
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
function enumStringToValue$1(enumRef, value) {
|
|
854
|
+
if (typeof value === 'number') {
|
|
855
|
+
return value;
|
|
856
|
+
}
|
|
857
|
+
return enumRef[value];
|
|
858
|
+
}
|
|
859
|
+
class TenorGifMediaEntry {
|
|
860
|
+
constructor(kwargs) {
|
|
861
|
+
if (!kwargs) {
|
|
862
|
+
return;
|
|
863
|
+
}
|
|
864
|
+
Object.assign(this, kwargs);
|
|
865
|
+
}
|
|
866
|
+
static fromProto(proto) {
|
|
867
|
+
let m = new TenorGifMediaEntry();
|
|
868
|
+
m = Object.assign(m, proto);
|
|
869
|
+
if (proto.value) {
|
|
870
|
+
m.value = TenorMediaObject.fromProto(proto.value);
|
|
871
|
+
}
|
|
872
|
+
return m;
|
|
873
|
+
}
|
|
874
|
+
toApiJson() {
|
|
875
|
+
const toReturn = {};
|
|
876
|
+
if (typeof this.key !== 'undefined') {
|
|
877
|
+
toReturn['key'] = this.key;
|
|
878
|
+
}
|
|
879
|
+
if (typeof this.value !== 'undefined' && this.value !== null) {
|
|
880
|
+
toReturn['value'] = 'toApiJson' in this.value ? this.value.toApiJson() : this.value;
|
|
881
|
+
}
|
|
882
|
+
return toReturn;
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
class TenorGif {
|
|
886
|
+
constructor(kwargs) {
|
|
887
|
+
if (!kwargs) {
|
|
888
|
+
return;
|
|
889
|
+
}
|
|
890
|
+
Object.assign(this, kwargs);
|
|
891
|
+
}
|
|
892
|
+
static fromProto(proto) {
|
|
893
|
+
let m = new TenorGif();
|
|
894
|
+
m = Object.assign(m, proto);
|
|
895
|
+
if (proto.media) {
|
|
896
|
+
m.media = Object.keys(proto.media).reduce((obj, k) => { obj[k] = TenorMediaObject.fromProto(proto.media[k]); return obj; }, {});
|
|
897
|
+
}
|
|
898
|
+
return m;
|
|
899
|
+
}
|
|
900
|
+
toApiJson() {
|
|
901
|
+
const toReturn = {};
|
|
902
|
+
if (typeof this.media !== 'undefined' && this.media !== null) {
|
|
903
|
+
toReturn['media'] = 'toApiJson' in this.media ? this.media.toApiJson() : this.media;
|
|
904
|
+
}
|
|
905
|
+
if (typeof this.tags !== 'undefined') {
|
|
906
|
+
toReturn['tags'] = this.tags;
|
|
907
|
+
}
|
|
908
|
+
if (typeof this.hasAudio !== 'undefined') {
|
|
909
|
+
toReturn['hasAudio'] = this.hasAudio;
|
|
910
|
+
}
|
|
911
|
+
if (typeof this.title !== 'undefined') {
|
|
912
|
+
toReturn['title'] = this.title;
|
|
913
|
+
}
|
|
914
|
+
if (typeof this.id !== 'undefined') {
|
|
915
|
+
toReturn['id'] = this.id;
|
|
916
|
+
}
|
|
917
|
+
if (typeof this.created !== 'undefined') {
|
|
918
|
+
toReturn['created'] = this.created;
|
|
919
|
+
}
|
|
920
|
+
return toReturn;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
class TenorMediaObject {
|
|
924
|
+
constructor(kwargs) {
|
|
925
|
+
if (!kwargs) {
|
|
926
|
+
return;
|
|
927
|
+
}
|
|
928
|
+
Object.assign(this, kwargs);
|
|
929
|
+
}
|
|
930
|
+
static fromProto(proto) {
|
|
931
|
+
let m = new TenorMediaObject();
|
|
932
|
+
m = Object.assign(m, proto);
|
|
933
|
+
if (proto.dimensions) {
|
|
934
|
+
m.dimensions = proto.dimensions.map((i) => parseInt(i, 10));
|
|
935
|
+
}
|
|
936
|
+
if (proto.size) {
|
|
937
|
+
m.size = parseInt(proto.size, 10);
|
|
938
|
+
}
|
|
939
|
+
return m;
|
|
940
|
+
}
|
|
941
|
+
toApiJson() {
|
|
942
|
+
const toReturn = {};
|
|
943
|
+
if (typeof this.preview !== 'undefined') {
|
|
944
|
+
toReturn['preview'] = this.preview;
|
|
945
|
+
}
|
|
946
|
+
if (typeof this.url !== 'undefined') {
|
|
947
|
+
toReturn['url'] = this.url;
|
|
948
|
+
}
|
|
949
|
+
if (typeof this.dimensions !== 'undefined') {
|
|
950
|
+
toReturn['dimensions'] = this.dimensions;
|
|
951
|
+
}
|
|
952
|
+
if (typeof this.size !== 'undefined') {
|
|
953
|
+
toReturn['size'] = this.size;
|
|
954
|
+
}
|
|
955
|
+
return toReturn;
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
function enumStringToValue(enumRef, value) {
|
|
960
|
+
if (typeof value === 'number') {
|
|
961
|
+
return value;
|
|
962
|
+
}
|
|
963
|
+
return enumRef[value];
|
|
964
|
+
}
|
|
965
|
+
class CreateMultilocationPostRequest {
|
|
966
|
+
constructor(kwargs) {
|
|
967
|
+
if (!kwargs) {
|
|
968
|
+
return;
|
|
969
|
+
}
|
|
970
|
+
Object.assign(this, kwargs);
|
|
971
|
+
}
|
|
972
|
+
static fromProto(proto) {
|
|
973
|
+
let m = new CreateMultilocationPostRequest();
|
|
974
|
+
m = Object.assign(m, proto);
|
|
975
|
+
if (proto.scheduledDate) {
|
|
976
|
+
m.scheduledDate = new Date(proto.scheduledDate);
|
|
977
|
+
}
|
|
978
|
+
if (proto.locations) {
|
|
979
|
+
m.locations = proto.locations.map(Location.fromProto);
|
|
980
|
+
}
|
|
981
|
+
return m;
|
|
982
|
+
}
|
|
983
|
+
toApiJson() {
|
|
984
|
+
const toReturn = {};
|
|
985
|
+
if (typeof this.brandId !== 'undefined') {
|
|
986
|
+
toReturn['brandId'] = this.brandId;
|
|
987
|
+
}
|
|
988
|
+
if (typeof this.text !== 'undefined') {
|
|
989
|
+
toReturn['text'] = this.text;
|
|
990
|
+
}
|
|
991
|
+
if (typeof this.media !== 'undefined') {
|
|
992
|
+
toReturn['media'] = this.media;
|
|
993
|
+
}
|
|
994
|
+
if (typeof this.scheduledDate !== 'undefined' && this.scheduledDate !== null) {
|
|
995
|
+
toReturn['scheduledDate'] = 'toApiJson' in this.scheduledDate ? this.scheduledDate.toApiJson() : this.scheduledDate;
|
|
996
|
+
}
|
|
997
|
+
if (typeof this.locations !== 'undefined' && this.locations !== null) {
|
|
998
|
+
toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
|
|
999
|
+
}
|
|
1000
|
+
if (typeof this.gifs !== 'undefined') {
|
|
1001
|
+
toReturn['gifs'] = this.gifs;
|
|
1002
|
+
}
|
|
1003
|
+
if (typeof this.videos !== 'undefined') {
|
|
1004
|
+
toReturn['videos'] = this.videos;
|
|
1005
|
+
}
|
|
1006
|
+
return toReturn;
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
class CreateMultilocationPostResponse {
|
|
1010
|
+
constructor(kwargs) {
|
|
1011
|
+
if (!kwargs) {
|
|
1012
|
+
return;
|
|
1013
|
+
}
|
|
1014
|
+
Object.assign(this, kwargs);
|
|
1015
|
+
}
|
|
1016
|
+
static fromProto(proto) {
|
|
1017
|
+
let m = new CreateMultilocationPostResponse();
|
|
1018
|
+
m = Object.assign(m, proto);
|
|
1019
|
+
if (proto.post) {
|
|
1020
|
+
m.post = MultilocationPost.fromProto(proto.post);
|
|
1021
|
+
}
|
|
1022
|
+
if (proto.errors) {
|
|
1023
|
+
m.errors = proto.errors.map(MultilocationPostError.fromProto);
|
|
1024
|
+
}
|
|
1025
|
+
return m;
|
|
1026
|
+
}
|
|
1027
|
+
toApiJson() {
|
|
1028
|
+
const toReturn = {};
|
|
1029
|
+
if (typeof this.post !== 'undefined' && this.post !== null) {
|
|
1030
|
+
toReturn['post'] = 'toApiJson' in this.post ? this.post.toApiJson() : this.post;
|
|
1031
|
+
}
|
|
1032
|
+
if (typeof this.errors !== 'undefined' && this.errors !== null) {
|
|
1033
|
+
toReturn['errors'] = 'toApiJson' in this.errors ? this.errors.toApiJson() : this.errors;
|
|
1034
|
+
}
|
|
1035
|
+
return toReturn;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
class CreatePostTemplateRequest {
|
|
1039
|
+
constructor(kwargs) {
|
|
1040
|
+
if (!kwargs) {
|
|
1041
|
+
return;
|
|
1042
|
+
}
|
|
1043
|
+
Object.assign(this, kwargs);
|
|
1044
|
+
}
|
|
1045
|
+
static fromProto(proto) {
|
|
1046
|
+
let m = new CreatePostTemplateRequest();
|
|
1047
|
+
m = Object.assign(m, proto);
|
|
1048
|
+
if (proto.postDateTime) {
|
|
1049
|
+
m.postDateTime = new Date(proto.postDateTime);
|
|
1050
|
+
}
|
|
1051
|
+
return m;
|
|
1052
|
+
}
|
|
1053
|
+
toApiJson() {
|
|
1054
|
+
const toReturn = {};
|
|
1055
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
1056
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
1057
|
+
}
|
|
1058
|
+
if (typeof this.title !== 'undefined') {
|
|
1059
|
+
toReturn['title'] = this.title;
|
|
1060
|
+
}
|
|
1061
|
+
if (typeof this.postText !== 'undefined') {
|
|
1062
|
+
toReturn['postText'] = this.postText;
|
|
1063
|
+
}
|
|
1064
|
+
if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
|
|
1065
|
+
toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
|
|
1066
|
+
}
|
|
1067
|
+
if (typeof this.gmbPostCustomization !== 'undefined') {
|
|
1068
|
+
toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
|
|
1069
|
+
}
|
|
1070
|
+
if (typeof this.imageUrl !== 'undefined') {
|
|
1071
|
+
toReturn['imageUrl'] = this.imageUrl;
|
|
1072
|
+
}
|
|
1073
|
+
if (typeof this.imagePath !== 'undefined') {
|
|
1074
|
+
toReturn['imagePath'] = this.imagePath;
|
|
1075
|
+
}
|
|
1076
|
+
if (typeof this.imageSize !== 'undefined') {
|
|
1077
|
+
toReturn['imageSize'] = this.imageSize;
|
|
1078
|
+
}
|
|
1079
|
+
if (typeof this.previews !== 'undefined') {
|
|
1080
|
+
toReturn['previews'] = this.previews;
|
|
1081
|
+
}
|
|
1082
|
+
if (typeof this.options !== 'undefined') {
|
|
1083
|
+
toReturn['options'] = this.options;
|
|
1084
|
+
}
|
|
1085
|
+
if (typeof this.videoUrl !== 'undefined') {
|
|
1086
|
+
toReturn['videoUrl'] = this.videoUrl;
|
|
1087
|
+
}
|
|
1088
|
+
return toReturn;
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
class CreatePostTemplateResponse {
|
|
1092
|
+
constructor(kwargs) {
|
|
1093
|
+
if (!kwargs) {
|
|
1094
|
+
return;
|
|
1095
|
+
}
|
|
1096
|
+
Object.assign(this, kwargs);
|
|
1097
|
+
}
|
|
1098
|
+
static fromProto(proto) {
|
|
1099
|
+
let m = new CreatePostTemplateResponse();
|
|
1100
|
+
m = Object.assign(m, proto);
|
|
1101
|
+
return m;
|
|
1102
|
+
}
|
|
1103
|
+
toApiJson() {
|
|
1104
|
+
const toReturn = {};
|
|
1105
|
+
if (typeof this.templateId !== 'undefined') {
|
|
1106
|
+
toReturn['templateId'] = this.templateId;
|
|
1107
|
+
}
|
|
1108
|
+
return toReturn;
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
class DateRangeFilter {
|
|
1112
|
+
constructor(kwargs) {
|
|
1113
|
+
if (!kwargs) {
|
|
1114
|
+
return;
|
|
1115
|
+
}
|
|
1116
|
+
Object.assign(this, kwargs);
|
|
1117
|
+
}
|
|
1118
|
+
static fromProto(proto) {
|
|
1119
|
+
let m = new DateRangeFilter();
|
|
1120
|
+
m = Object.assign(m, proto);
|
|
1121
|
+
if (proto.beginRange) {
|
|
1122
|
+
m.beginRange = new Date(proto.beginRange);
|
|
1123
|
+
}
|
|
1124
|
+
if (proto.endRange) {
|
|
1125
|
+
m.endRange = new Date(proto.endRange);
|
|
1126
|
+
}
|
|
1127
|
+
return m;
|
|
1128
|
+
}
|
|
1129
|
+
toApiJson() {
|
|
1130
|
+
const toReturn = {};
|
|
1131
|
+
if (typeof this.beginRange !== 'undefined' && this.beginRange !== null) {
|
|
1132
|
+
toReturn['beginRange'] = 'toApiJson' in this.beginRange ? this.beginRange.toApiJson() : this.beginRange;
|
|
1133
|
+
}
|
|
1134
|
+
if (typeof this.endRange !== 'undefined' && this.endRange !== null) {
|
|
1135
|
+
toReturn['endRange'] = 'toApiJson' in this.endRange ? this.endRange.toApiJson() : this.endRange;
|
|
1136
|
+
}
|
|
1137
|
+
return toReturn;
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
class DeleteHashtagsRequest {
|
|
1141
|
+
constructor(kwargs) {
|
|
1142
|
+
if (!kwargs) {
|
|
1143
|
+
return;
|
|
1144
|
+
}
|
|
1145
|
+
Object.assign(this, kwargs);
|
|
1146
|
+
}
|
|
1147
|
+
static fromProto(proto) {
|
|
1148
|
+
let m = new DeleteHashtagsRequest();
|
|
1149
|
+
m = Object.assign(m, proto);
|
|
1150
|
+
return m;
|
|
1151
|
+
}
|
|
1152
|
+
toApiJson() {
|
|
1153
|
+
const toReturn = {};
|
|
1154
|
+
if (typeof this.keyword !== 'undefined') {
|
|
1155
|
+
toReturn['keyword'] = this.keyword;
|
|
1156
|
+
}
|
|
1157
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1158
|
+
toReturn['businessId'] = this.businessId;
|
|
1159
|
+
}
|
|
1160
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
1161
|
+
toReturn['partnerId'] = this.partnerId;
|
|
1162
|
+
}
|
|
1163
|
+
return toReturn;
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
class DeleteMultilocationPostRequest {
|
|
1167
|
+
constructor(kwargs) {
|
|
1168
|
+
if (!kwargs) {
|
|
1169
|
+
return;
|
|
1170
|
+
}
|
|
1171
|
+
Object.assign(this, kwargs);
|
|
1172
|
+
}
|
|
1173
|
+
static fromProto(proto) {
|
|
1174
|
+
let m = new DeleteMultilocationPostRequest();
|
|
1175
|
+
m = Object.assign(m, proto);
|
|
1176
|
+
return m;
|
|
1177
|
+
}
|
|
1178
|
+
toApiJson() {
|
|
1179
|
+
const toReturn = {};
|
|
1180
|
+
if (typeof this.brandId !== 'undefined') {
|
|
1181
|
+
toReturn['brandId'] = this.brandId;
|
|
1182
|
+
}
|
|
1183
|
+
if (typeof this.multilocationId !== 'undefined') {
|
|
1184
|
+
toReturn['multilocationId'] = this.multilocationId;
|
|
1185
|
+
}
|
|
1186
|
+
return toReturn;
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
class DeletePostTemplateRequest {
|
|
1190
|
+
constructor(kwargs) {
|
|
1191
|
+
if (!kwargs) {
|
|
1192
|
+
return;
|
|
1193
|
+
}
|
|
1194
|
+
Object.assign(this, kwargs);
|
|
1195
|
+
}
|
|
1196
|
+
static fromProto(proto) {
|
|
1197
|
+
let m = new DeletePostTemplateRequest();
|
|
1198
|
+
m = Object.assign(m, proto);
|
|
1199
|
+
return m;
|
|
1200
|
+
}
|
|
1201
|
+
toApiJson() {
|
|
1202
|
+
const toReturn = {};
|
|
1203
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
1204
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
1205
|
+
}
|
|
1206
|
+
if (typeof this.templateId !== 'undefined') {
|
|
1207
|
+
toReturn['templateId'] = this.templateId;
|
|
1208
|
+
}
|
|
1209
|
+
return toReturn;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
class DeleteSocialPostRequest {
|
|
1213
|
+
constructor(kwargs) {
|
|
1214
|
+
if (!kwargs) {
|
|
1215
|
+
return;
|
|
1216
|
+
}
|
|
1217
|
+
Object.assign(this, kwargs);
|
|
1218
|
+
}
|
|
1219
|
+
static fromProto(proto) {
|
|
1220
|
+
let m = new DeleteSocialPostRequest();
|
|
1221
|
+
m = Object.assign(m, proto);
|
|
1222
|
+
return m;
|
|
1223
|
+
}
|
|
1224
|
+
toApiJson() {
|
|
1225
|
+
const toReturn = {};
|
|
1226
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1227
|
+
toReturn['businessId'] = this.businessId;
|
|
1228
|
+
}
|
|
1229
|
+
if (typeof this.socialPostId !== 'undefined') {
|
|
1230
|
+
toReturn['socialPostId'] = this.socialPostId;
|
|
1231
|
+
}
|
|
1232
|
+
return toReturn;
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
class EditMultilocationPostRequest {
|
|
1236
|
+
constructor(kwargs) {
|
|
1237
|
+
if (!kwargs) {
|
|
1238
|
+
return;
|
|
1239
|
+
}
|
|
1240
|
+
Object.assign(this, kwargs);
|
|
1241
|
+
}
|
|
1242
|
+
static fromProto(proto) {
|
|
1243
|
+
let m = new EditMultilocationPostRequest();
|
|
1244
|
+
m = Object.assign(m, proto);
|
|
1245
|
+
if (proto.scheduledDate) {
|
|
1246
|
+
m.scheduledDate = new Date(proto.scheduledDate);
|
|
1247
|
+
}
|
|
1248
|
+
if (proto.fieldMask) {
|
|
1249
|
+
m.fieldMask = FieldMask.fromProto(proto.fieldMask);
|
|
1250
|
+
}
|
|
1251
|
+
if (proto.locations) {
|
|
1252
|
+
m.locations = proto.locations.map(Location.fromProto);
|
|
1253
|
+
}
|
|
1254
|
+
return m;
|
|
1255
|
+
}
|
|
1256
|
+
toApiJson() {
|
|
1257
|
+
const toReturn = {};
|
|
1258
|
+
if (typeof this.brandId !== 'undefined') {
|
|
1259
|
+
toReturn['brandId'] = this.brandId;
|
|
1260
|
+
}
|
|
1261
|
+
if (typeof this.multilocationId !== 'undefined') {
|
|
1262
|
+
toReturn['multilocationId'] = this.multilocationId;
|
|
1263
|
+
}
|
|
1264
|
+
if (typeof this.text !== 'undefined') {
|
|
1265
|
+
toReturn['text'] = this.text;
|
|
1266
|
+
}
|
|
1267
|
+
if (typeof this.media !== 'undefined') {
|
|
1268
|
+
toReturn['media'] = this.media;
|
|
1269
|
+
}
|
|
1270
|
+
if (typeof this.scheduledDate !== 'undefined' && this.scheduledDate !== null) {
|
|
1271
|
+
toReturn['scheduledDate'] = 'toApiJson' in this.scheduledDate ? this.scheduledDate.toApiJson() : this.scheduledDate;
|
|
1272
|
+
}
|
|
1273
|
+
if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
|
|
1274
|
+
toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
|
|
1275
|
+
}
|
|
1276
|
+
if (typeof this.gifs !== 'undefined') {
|
|
1277
|
+
toReturn['gifs'] = this.gifs;
|
|
1278
|
+
}
|
|
1279
|
+
if (typeof this.videos !== 'undefined') {
|
|
1280
|
+
toReturn['videos'] = this.videos;
|
|
1281
|
+
}
|
|
1282
|
+
if (typeof this.locations !== 'undefined' && this.locations !== null) {
|
|
1283
|
+
toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
|
|
1284
|
+
}
|
|
1285
|
+
return toReturn;
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
class EditMultilocationPostResponse {
|
|
1289
|
+
constructor(kwargs) {
|
|
1290
|
+
if (!kwargs) {
|
|
1291
|
+
return;
|
|
1292
|
+
}
|
|
1293
|
+
Object.assign(this, kwargs);
|
|
1294
|
+
}
|
|
1295
|
+
static fromProto(proto) {
|
|
1296
|
+
let m = new EditMultilocationPostResponse();
|
|
1297
|
+
m = Object.assign(m, proto);
|
|
1298
|
+
if (proto.post) {
|
|
1299
|
+
m.post = MultilocationPost.fromProto(proto.post);
|
|
1300
|
+
}
|
|
1301
|
+
if (proto.errors) {
|
|
1302
|
+
m.errors = proto.errors.map(MultilocationPostError.fromProto);
|
|
1303
|
+
}
|
|
1304
|
+
return m;
|
|
1305
|
+
}
|
|
1306
|
+
toApiJson() {
|
|
1307
|
+
const toReturn = {};
|
|
1308
|
+
if (typeof this.post !== 'undefined' && this.post !== null) {
|
|
1309
|
+
toReturn['post'] = 'toApiJson' in this.post ? this.post.toApiJson() : this.post;
|
|
1310
|
+
}
|
|
1311
|
+
if (typeof this.errors !== 'undefined' && this.errors !== null) {
|
|
1312
|
+
toReturn['errors'] = 'toApiJson' in this.errors ? this.errors.toApiJson() : this.errors;
|
|
1313
|
+
}
|
|
1314
|
+
return toReturn;
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
class PartnerListScheduledSocialPostsRequestFilters {
|
|
1318
|
+
constructor(kwargs) {
|
|
1319
|
+
if (!kwargs) {
|
|
1320
|
+
return;
|
|
1321
|
+
}
|
|
1322
|
+
Object.assign(this, kwargs);
|
|
1323
|
+
}
|
|
1324
|
+
static fromProto(proto) {
|
|
1325
|
+
let m = new PartnerListScheduledSocialPostsRequestFilters();
|
|
1326
|
+
m = Object.assign(m, proto);
|
|
1327
|
+
if (proto.dateRange) {
|
|
1328
|
+
m.dateRange = DateRangeFilter.fromProto(proto.dateRange);
|
|
1329
|
+
}
|
|
1330
|
+
return m;
|
|
1331
|
+
}
|
|
1332
|
+
toApiJson() {
|
|
1333
|
+
const toReturn = {};
|
|
1334
|
+
if (typeof this.dateRange !== 'undefined' && this.dateRange !== null) {
|
|
1335
|
+
toReturn['dateRange'] = 'toApiJson' in this.dateRange ? this.dateRange.toApiJson() : this.dateRange;
|
|
1336
|
+
}
|
|
1337
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
1338
|
+
toReturn['partnerId'] = this.partnerId;
|
|
1339
|
+
}
|
|
1340
|
+
return toReturn;
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
class GetMultiSocialPostStatsRequest {
|
|
1344
|
+
constructor(kwargs) {
|
|
1345
|
+
if (!kwargs) {
|
|
1346
|
+
return;
|
|
1347
|
+
}
|
|
1348
|
+
Object.assign(this, kwargs);
|
|
1349
|
+
}
|
|
1350
|
+
static fromProto(proto) {
|
|
1351
|
+
let m = new GetMultiSocialPostStatsRequest();
|
|
1352
|
+
m = Object.assign(m, proto);
|
|
1353
|
+
return m;
|
|
1354
|
+
}
|
|
1355
|
+
toApiJson() {
|
|
1356
|
+
const toReturn = {};
|
|
1357
|
+
if (typeof this.internalPostIds !== 'undefined') {
|
|
1358
|
+
toReturn['internalPostIds'] = this.internalPostIds;
|
|
1359
|
+
}
|
|
1360
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1361
|
+
toReturn['businessId'] = this.businessId;
|
|
1362
|
+
}
|
|
1363
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
1364
|
+
toReturn['partnerId'] = this.partnerId;
|
|
1365
|
+
}
|
|
1366
|
+
return toReturn;
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
class GetMultiSocialPostStatsResponse {
|
|
1370
|
+
constructor(kwargs) {
|
|
1371
|
+
if (!kwargs) {
|
|
1372
|
+
return;
|
|
1373
|
+
}
|
|
1374
|
+
Object.assign(this, kwargs);
|
|
1375
|
+
}
|
|
1376
|
+
static fromProto(proto) {
|
|
1377
|
+
let m = new GetMultiSocialPostStatsResponse();
|
|
1378
|
+
m = Object.assign(m, proto);
|
|
1379
|
+
if (proto.socialPostStats) {
|
|
1380
|
+
m.socialPostStats = proto.socialPostStats.map(SocialPostStats.fromProto);
|
|
1381
|
+
}
|
|
1382
|
+
return m;
|
|
1383
|
+
}
|
|
1384
|
+
toApiJson() {
|
|
1385
|
+
const toReturn = {};
|
|
1386
|
+
if (typeof this.socialPostStats !== 'undefined' && this.socialPostStats !== null) {
|
|
1387
|
+
toReturn['socialPostStats'] = 'toApiJson' in this.socialPostStats ? this.socialPostStats.toApiJson() : this.socialPostStats;
|
|
1388
|
+
}
|
|
1389
|
+
return toReturn;
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
class GetMultiSocialPostsRequest {
|
|
1393
|
+
constructor(kwargs) {
|
|
1394
|
+
if (!kwargs) {
|
|
1395
|
+
return;
|
|
1396
|
+
}
|
|
1397
|
+
Object.assign(this, kwargs);
|
|
1398
|
+
}
|
|
1399
|
+
static fromProto(proto) {
|
|
1400
|
+
let m = new GetMultiSocialPostsRequest();
|
|
1401
|
+
m = Object.assign(m, proto);
|
|
1402
|
+
return m;
|
|
1403
|
+
}
|
|
1404
|
+
toApiJson() {
|
|
1405
|
+
const toReturn = {};
|
|
1406
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1407
|
+
toReturn['businessId'] = this.businessId;
|
|
1408
|
+
}
|
|
1409
|
+
if (typeof this.internalPostIds !== 'undefined') {
|
|
1410
|
+
toReturn['internalPostIds'] = this.internalPostIds;
|
|
1411
|
+
}
|
|
1412
|
+
return toReturn;
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
class GetMultiSocialPostsResponse {
|
|
1416
|
+
constructor(kwargs) {
|
|
1417
|
+
if (!kwargs) {
|
|
1418
|
+
return;
|
|
1419
|
+
}
|
|
1420
|
+
Object.assign(this, kwargs);
|
|
1421
|
+
}
|
|
1422
|
+
static fromProto(proto) {
|
|
1423
|
+
let m = new GetMultiSocialPostsResponse();
|
|
1424
|
+
m = Object.assign(m, proto);
|
|
1425
|
+
if (proto.socialPosts) {
|
|
1426
|
+
m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
|
|
1427
|
+
}
|
|
1428
|
+
return m;
|
|
1429
|
+
}
|
|
1430
|
+
toApiJson() {
|
|
1431
|
+
const toReturn = {};
|
|
1432
|
+
if (typeof this.socialPosts !== 'undefined' && this.socialPosts !== null) {
|
|
1433
|
+
toReturn['socialPosts'] = 'toApiJson' in this.socialPosts ? this.socialPosts.toApiJson() : this.socialPosts;
|
|
1434
|
+
}
|
|
1435
|
+
return toReturn;
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
class GetMultilocationPostRequest {
|
|
1439
|
+
constructor(kwargs) {
|
|
1440
|
+
if (!kwargs) {
|
|
1441
|
+
return;
|
|
1442
|
+
}
|
|
1443
|
+
Object.assign(this, kwargs);
|
|
1444
|
+
}
|
|
1445
|
+
static fromProto(proto) {
|
|
1446
|
+
let m = new GetMultilocationPostRequest();
|
|
1447
|
+
m = Object.assign(m, proto);
|
|
1448
|
+
return m;
|
|
1449
|
+
}
|
|
1450
|
+
toApiJson() {
|
|
1451
|
+
const toReturn = {};
|
|
1452
|
+
if (typeof this.brandId !== 'undefined') {
|
|
1453
|
+
toReturn['brandId'] = this.brandId;
|
|
1454
|
+
}
|
|
1455
|
+
if (typeof this.multilocationId !== 'undefined') {
|
|
1456
|
+
toReturn['multilocationId'] = this.multilocationId;
|
|
1457
|
+
}
|
|
1458
|
+
return toReturn;
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
class GetMultilocationPostResponse {
|
|
1462
|
+
constructor(kwargs) {
|
|
1463
|
+
if (!kwargs) {
|
|
1464
|
+
return;
|
|
1465
|
+
}
|
|
1466
|
+
Object.assign(this, kwargs);
|
|
1467
|
+
}
|
|
1468
|
+
static fromProto(proto) {
|
|
1469
|
+
let m = new GetMultilocationPostResponse();
|
|
1470
|
+
m = Object.assign(m, proto);
|
|
1471
|
+
if (proto.multilocationPost) {
|
|
1472
|
+
m.multilocationPost = MultilocationPost.fromProto(proto.multilocationPost);
|
|
1473
|
+
}
|
|
1474
|
+
return m;
|
|
1475
|
+
}
|
|
1476
|
+
toApiJson() {
|
|
1477
|
+
const toReturn = {};
|
|
1478
|
+
if (typeof this.multilocationPost !== 'undefined' && this.multilocationPost !== null) {
|
|
1479
|
+
toReturn['multilocationPost'] = 'toApiJson' in this.multilocationPost ? this.multilocationPost.toApiJson() : this.multilocationPost;
|
|
1480
|
+
}
|
|
1481
|
+
return toReturn;
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
class GetPostTemplateRequest {
|
|
1485
|
+
constructor(kwargs) {
|
|
1486
|
+
if (!kwargs) {
|
|
1487
|
+
return;
|
|
1488
|
+
}
|
|
1489
|
+
Object.assign(this, kwargs);
|
|
1490
|
+
}
|
|
1491
|
+
static fromProto(proto) {
|
|
1492
|
+
let m = new GetPostTemplateRequest();
|
|
1493
|
+
m = Object.assign(m, proto);
|
|
1494
|
+
return m;
|
|
1495
|
+
}
|
|
1496
|
+
toApiJson() {
|
|
1497
|
+
const toReturn = {};
|
|
1498
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
1499
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
1500
|
+
}
|
|
1501
|
+
if (typeof this.templateId !== 'undefined') {
|
|
1502
|
+
toReturn['templateId'] = this.templateId;
|
|
1503
|
+
}
|
|
1504
|
+
return toReturn;
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
class GetPostTemplateResponse {
|
|
1508
|
+
constructor(kwargs) {
|
|
1509
|
+
if (!kwargs) {
|
|
1510
|
+
return;
|
|
1511
|
+
}
|
|
1512
|
+
Object.assign(this, kwargs);
|
|
1513
|
+
}
|
|
1514
|
+
static fromProto(proto) {
|
|
1515
|
+
let m = new GetPostTemplateResponse();
|
|
1516
|
+
m = Object.assign(m, proto);
|
|
1517
|
+
if (proto.postTemplate) {
|
|
1518
|
+
m.postTemplate = PostTemplate.fromProto(proto.postTemplate);
|
|
1519
|
+
}
|
|
1520
|
+
return m;
|
|
1521
|
+
}
|
|
1522
|
+
toApiJson() {
|
|
1523
|
+
const toReturn = {};
|
|
1524
|
+
if (typeof this.postTemplate !== 'undefined' && this.postTemplate !== null) {
|
|
1525
|
+
toReturn['postTemplate'] = 'toApiJson' in this.postTemplate ? this.postTemplate.toApiJson() : this.postTemplate;
|
|
1526
|
+
}
|
|
1527
|
+
return toReturn;
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
class GetScheduledPostCountRequest {
|
|
1531
|
+
constructor(kwargs) {
|
|
1532
|
+
if (!kwargs) {
|
|
1533
|
+
return;
|
|
1534
|
+
}
|
|
1535
|
+
Object.assign(this, kwargs);
|
|
1536
|
+
}
|
|
1537
|
+
static fromProto(proto) {
|
|
1538
|
+
let m = new GetScheduledPostCountRequest();
|
|
1539
|
+
m = Object.assign(m, proto);
|
|
1540
|
+
return m;
|
|
1541
|
+
}
|
|
1542
|
+
toApiJson() {
|
|
1543
|
+
const toReturn = {};
|
|
1544
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
1545
|
+
toReturn['partnerId'] = this.partnerId;
|
|
1546
|
+
}
|
|
1547
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1548
|
+
toReturn['businessId'] = this.businessId;
|
|
1549
|
+
}
|
|
1550
|
+
if (typeof this.socialServiceIds !== 'undefined') {
|
|
1551
|
+
toReturn['socialServiceIds'] = this.socialServiceIds;
|
|
1552
|
+
}
|
|
1553
|
+
return toReturn;
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
class GetScheduledPostCountResponse {
|
|
1557
|
+
constructor(kwargs) {
|
|
1558
|
+
if (!kwargs) {
|
|
1559
|
+
return;
|
|
1560
|
+
}
|
|
1561
|
+
Object.assign(this, kwargs);
|
|
1562
|
+
}
|
|
1563
|
+
static fromProto(proto) {
|
|
1564
|
+
let m = new GetScheduledPostCountResponse();
|
|
1565
|
+
m = Object.assign(m, proto);
|
|
1566
|
+
if (proto.count) {
|
|
1567
|
+
m.count = parseInt(proto.count, 10);
|
|
1568
|
+
}
|
|
1569
|
+
return m;
|
|
1570
|
+
}
|
|
1571
|
+
toApiJson() {
|
|
1572
|
+
const toReturn = {};
|
|
1573
|
+
if (typeof this.count !== 'undefined') {
|
|
1574
|
+
toReturn['count'] = this.count;
|
|
1575
|
+
}
|
|
1576
|
+
return toReturn;
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
class GetTenorAnonymousIdRequest {
|
|
1580
|
+
static fromProto(proto) {
|
|
1581
|
+
let m = new GetTenorAnonymousIdRequest();
|
|
1582
|
+
m = Object.assign(m, proto);
|
|
1583
|
+
return m;
|
|
1584
|
+
}
|
|
1585
|
+
constructor(kwargs) {
|
|
1586
|
+
if (!kwargs) {
|
|
1587
|
+
return;
|
|
1588
|
+
}
|
|
1589
|
+
Object.assign(this, kwargs);
|
|
1590
|
+
}
|
|
1591
|
+
toApiJson() {
|
|
1592
|
+
const toReturn = {};
|
|
1593
|
+
return toReturn;
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
class GetTenorAnonymousIdResponse {
|
|
1597
|
+
constructor(kwargs) {
|
|
1598
|
+
if (!kwargs) {
|
|
1599
|
+
return;
|
|
1600
|
+
}
|
|
1601
|
+
Object.assign(this, kwargs);
|
|
1602
|
+
}
|
|
1603
|
+
static fromProto(proto) {
|
|
1604
|
+
let m = new GetTenorAnonymousIdResponse();
|
|
1605
|
+
m = Object.assign(m, proto);
|
|
1606
|
+
return m;
|
|
1607
|
+
}
|
|
1608
|
+
toApiJson() {
|
|
1609
|
+
const toReturn = {};
|
|
1610
|
+
if (typeof this.anonymousId !== 'undefined') {
|
|
1611
|
+
toReturn['anonymousId'] = this.anonymousId;
|
|
1612
|
+
}
|
|
1613
|
+
return toReturn;
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
class ListMultilocationPostsForBrandRequest {
|
|
1617
|
+
constructor(kwargs) {
|
|
1618
|
+
if (!kwargs) {
|
|
1619
|
+
return;
|
|
1620
|
+
}
|
|
1621
|
+
Object.assign(this, kwargs);
|
|
1622
|
+
}
|
|
1623
|
+
static fromProto(proto) {
|
|
1624
|
+
let m = new ListMultilocationPostsForBrandRequest();
|
|
1625
|
+
m = Object.assign(m, proto);
|
|
1626
|
+
if (proto.startDate) {
|
|
1627
|
+
m.startDate = new Date(proto.startDate);
|
|
1628
|
+
}
|
|
1629
|
+
if (proto.endDate) {
|
|
1630
|
+
m.endDate = new Date(proto.endDate);
|
|
1631
|
+
}
|
|
1632
|
+
if (proto.pageSize) {
|
|
1633
|
+
m.pageSize = parseInt(proto.pageSize, 10);
|
|
1634
|
+
}
|
|
1635
|
+
return m;
|
|
1636
|
+
}
|
|
1637
|
+
toApiJson() {
|
|
1638
|
+
const toReturn = {};
|
|
1639
|
+
if (typeof this.brandId !== 'undefined') {
|
|
1640
|
+
toReturn['brandId'] = this.brandId;
|
|
1641
|
+
}
|
|
1642
|
+
if (typeof this.startDate !== 'undefined' && this.startDate !== null) {
|
|
1643
|
+
toReturn['startDate'] = 'toApiJson' in this.startDate ? this.startDate.toApiJson() : this.startDate;
|
|
1644
|
+
}
|
|
1645
|
+
if (typeof this.endDate !== 'undefined' && this.endDate !== null) {
|
|
1646
|
+
toReturn['endDate'] = 'toApiJson' in this.endDate ? this.endDate.toApiJson() : this.endDate;
|
|
1647
|
+
}
|
|
1648
|
+
if (typeof this.cursor !== 'undefined') {
|
|
1649
|
+
toReturn['cursor'] = this.cursor;
|
|
1650
|
+
}
|
|
1651
|
+
if (typeof this.pageSize !== 'undefined') {
|
|
1652
|
+
toReturn['pageSize'] = this.pageSize;
|
|
1653
|
+
}
|
|
1654
|
+
return toReturn;
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
class ListMultilocationPostsForBrandResponse {
|
|
1658
|
+
constructor(kwargs) {
|
|
1659
|
+
if (!kwargs) {
|
|
1660
|
+
return;
|
|
1661
|
+
}
|
|
1662
|
+
Object.assign(this, kwargs);
|
|
1663
|
+
}
|
|
1664
|
+
static fromProto(proto) {
|
|
1665
|
+
let m = new ListMultilocationPostsForBrandResponse();
|
|
1666
|
+
m = Object.assign(m, proto);
|
|
1667
|
+
if (proto.multilocationPosts) {
|
|
1668
|
+
m.multilocationPosts = proto.multilocationPosts.map(MultilocationPost.fromProto);
|
|
1669
|
+
}
|
|
1670
|
+
if (proto.failedSocialPosts) {
|
|
1671
|
+
m.failedSocialPosts = proto.failedSocialPosts.map(SocialPost.fromProto);
|
|
1672
|
+
}
|
|
1673
|
+
return m;
|
|
1674
|
+
}
|
|
1675
|
+
toApiJson() {
|
|
1676
|
+
const toReturn = {};
|
|
1677
|
+
if (typeof this.multilocationPosts !== 'undefined' && this.multilocationPosts !== null) {
|
|
1678
|
+
toReturn['multilocationPosts'] = 'toApiJson' in this.multilocationPosts ? this.multilocationPosts.toApiJson() : this.multilocationPosts;
|
|
1679
|
+
}
|
|
1680
|
+
if (typeof this.nextCursor !== 'undefined') {
|
|
1681
|
+
toReturn['nextCursor'] = this.nextCursor;
|
|
1682
|
+
}
|
|
1683
|
+
if (typeof this.hasMore !== 'undefined') {
|
|
1684
|
+
toReturn['hasMore'] = this.hasMore;
|
|
1685
|
+
}
|
|
1686
|
+
if (typeof this.failedSocialPosts !== 'undefined' && this.failedSocialPosts !== null) {
|
|
1687
|
+
toReturn['failedSocialPosts'] = 'toApiJson' in this.failedSocialPosts ? this.failedSocialPosts.toApiJson() : this.failedSocialPosts;
|
|
1688
|
+
}
|
|
1689
|
+
return toReturn;
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
class ListPixabayImagesRequest {
|
|
1693
|
+
constructor(kwargs) {
|
|
1694
|
+
if (!kwargs) {
|
|
1695
|
+
return;
|
|
1696
|
+
}
|
|
1697
|
+
Object.assign(this, kwargs);
|
|
1698
|
+
}
|
|
1699
|
+
static fromProto(proto) {
|
|
1700
|
+
let m = new ListPixabayImagesRequest();
|
|
1701
|
+
m = Object.assign(m, proto);
|
|
1702
|
+
if (proto.pageSize) {
|
|
1703
|
+
m.pageSize = parseInt(proto.pageSize, 10);
|
|
1704
|
+
}
|
|
1705
|
+
return m;
|
|
1706
|
+
}
|
|
1707
|
+
toApiJson() {
|
|
1708
|
+
const toReturn = {};
|
|
1709
|
+
if (typeof this.query !== 'undefined') {
|
|
1710
|
+
toReturn['query'] = this.query;
|
|
1711
|
+
}
|
|
1712
|
+
if (typeof this.cursor !== 'undefined') {
|
|
1713
|
+
toReturn['cursor'] = this.cursor;
|
|
1714
|
+
}
|
|
1715
|
+
if (typeof this.pageSize !== 'undefined') {
|
|
1716
|
+
toReturn['pageSize'] = this.pageSize;
|
|
1717
|
+
}
|
|
1718
|
+
return toReturn;
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
class ListPixabayImagesResponse {
|
|
1722
|
+
constructor(kwargs) {
|
|
1723
|
+
if (!kwargs) {
|
|
1724
|
+
return;
|
|
1725
|
+
}
|
|
1726
|
+
Object.assign(this, kwargs);
|
|
1727
|
+
}
|
|
1728
|
+
static fromProto(proto) {
|
|
1729
|
+
let m = new ListPixabayImagesResponse();
|
|
1730
|
+
m = Object.assign(m, proto);
|
|
1731
|
+
if (proto.total) {
|
|
1732
|
+
m.total = parseInt(proto.total, 10);
|
|
1733
|
+
}
|
|
1734
|
+
if (proto.totalHits) {
|
|
1735
|
+
m.totalHits = parseInt(proto.totalHits, 10);
|
|
1736
|
+
}
|
|
1737
|
+
if (proto.hits) {
|
|
1738
|
+
m.hits = proto.hits.map(PixabayImage.fromProto);
|
|
1739
|
+
}
|
|
1740
|
+
return m;
|
|
1741
|
+
}
|
|
1742
|
+
toApiJson() {
|
|
1743
|
+
const toReturn = {};
|
|
1744
|
+
if (typeof this.total !== 'undefined') {
|
|
1745
|
+
toReturn['total'] = this.total;
|
|
1746
|
+
}
|
|
1747
|
+
if (typeof this.totalHits !== 'undefined') {
|
|
1748
|
+
toReturn['totalHits'] = this.totalHits;
|
|
1749
|
+
}
|
|
1750
|
+
if (typeof this.hits !== 'undefined' && this.hits !== null) {
|
|
1751
|
+
toReturn['hits'] = 'toApiJson' in this.hits ? this.hits.toApiJson() : this.hits;
|
|
1752
|
+
}
|
|
1753
|
+
return toReturn;
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
class ListPostTemplatesRequest {
|
|
1757
|
+
constructor(kwargs) {
|
|
1758
|
+
if (!kwargs) {
|
|
1759
|
+
return;
|
|
1760
|
+
}
|
|
1761
|
+
Object.assign(this, kwargs);
|
|
1762
|
+
}
|
|
1763
|
+
static fromProto(proto) {
|
|
1764
|
+
let m = new ListPostTemplatesRequest();
|
|
1765
|
+
m = Object.assign(m, proto);
|
|
1766
|
+
if (proto.pageSize) {
|
|
1767
|
+
m.pageSize = parseInt(proto.pageSize, 10);
|
|
1768
|
+
}
|
|
1769
|
+
return m;
|
|
1770
|
+
}
|
|
1771
|
+
toApiJson() {
|
|
1772
|
+
const toReturn = {};
|
|
1773
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
1774
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
1775
|
+
}
|
|
1776
|
+
if (typeof this.cursor !== 'undefined') {
|
|
1777
|
+
toReturn['cursor'] = this.cursor;
|
|
1778
|
+
}
|
|
1779
|
+
if (typeof this.pageSize !== 'undefined') {
|
|
1780
|
+
toReturn['pageSize'] = this.pageSize;
|
|
1781
|
+
}
|
|
1782
|
+
return toReturn;
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
class ListPostTemplatesResponse {
|
|
1786
|
+
constructor(kwargs) {
|
|
1787
|
+
if (!kwargs) {
|
|
1788
|
+
return;
|
|
1789
|
+
}
|
|
1790
|
+
Object.assign(this, kwargs);
|
|
1791
|
+
}
|
|
1792
|
+
static fromProto(proto) {
|
|
1793
|
+
let m = new ListPostTemplatesResponse();
|
|
1794
|
+
m = Object.assign(m, proto);
|
|
1795
|
+
if (proto.postTemplate) {
|
|
1796
|
+
m.postTemplate = proto.postTemplate.map(PostTemplate.fromProto);
|
|
1797
|
+
}
|
|
1798
|
+
return m;
|
|
1799
|
+
}
|
|
1800
|
+
toApiJson() {
|
|
1801
|
+
const toReturn = {};
|
|
1802
|
+
if (typeof this.postTemplate !== 'undefined' && this.postTemplate !== null) {
|
|
1803
|
+
toReturn['postTemplate'] = 'toApiJson' in this.postTemplate ? this.postTemplate.toApiJson() : this.postTemplate;
|
|
1804
|
+
}
|
|
1805
|
+
if (typeof this.nextCursor !== 'undefined') {
|
|
1806
|
+
toReturn['nextCursor'] = this.nextCursor;
|
|
1807
|
+
}
|
|
1808
|
+
if (typeof this.hasMore !== 'undefined') {
|
|
1809
|
+
toReturn['hasMore'] = this.hasMore;
|
|
1810
|
+
}
|
|
1811
|
+
return toReturn;
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
class ListSocialPostsRequest {
|
|
1815
|
+
constructor(kwargs) {
|
|
1816
|
+
if (!kwargs) {
|
|
1817
|
+
return;
|
|
1818
|
+
}
|
|
1819
|
+
Object.assign(this, kwargs);
|
|
1820
|
+
}
|
|
1821
|
+
static fromProto(proto) {
|
|
1822
|
+
let m = new ListSocialPostsRequest();
|
|
1823
|
+
m = Object.assign(m, proto);
|
|
1824
|
+
if (proto.start) {
|
|
1825
|
+
m.start = new Date(proto.start);
|
|
1826
|
+
}
|
|
1827
|
+
if (proto.end) {
|
|
1828
|
+
m.end = new Date(proto.end);
|
|
1829
|
+
}
|
|
1830
|
+
if (proto.pageSize) {
|
|
1831
|
+
m.pageSize = parseInt(proto.pageSize, 10);
|
|
1832
|
+
}
|
|
1833
|
+
return m;
|
|
1834
|
+
}
|
|
1835
|
+
toApiJson() {
|
|
1836
|
+
const toReturn = {};
|
|
1837
|
+
if (typeof this.start !== 'undefined' && this.start !== null) {
|
|
1838
|
+
toReturn['start'] = 'toApiJson' in this.start ? this.start.toApiJson() : this.start;
|
|
1839
|
+
}
|
|
1840
|
+
if (typeof this.end !== 'undefined' && this.end !== null) {
|
|
1841
|
+
toReturn['end'] = 'toApiJson' in this.end ? this.end.toApiJson() : this.end;
|
|
1842
|
+
}
|
|
1843
|
+
if (typeof this.businessId !== 'undefined') {
|
|
1844
|
+
toReturn['businessId'] = this.businessId;
|
|
1845
|
+
}
|
|
1846
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
1847
|
+
toReturn['partnerId'] = this.partnerId;
|
|
1848
|
+
}
|
|
1849
|
+
if (typeof this.cursor !== 'undefined') {
|
|
1850
|
+
toReturn['cursor'] = this.cursor;
|
|
1851
|
+
}
|
|
1852
|
+
if (typeof this.socialServiceIds !== 'undefined') {
|
|
1853
|
+
toReturn['socialServiceIds'] = this.socialServiceIds;
|
|
1854
|
+
}
|
|
1855
|
+
if (typeof this.tags !== 'undefined') {
|
|
1856
|
+
toReturn['tags'] = this.tags;
|
|
1857
|
+
}
|
|
1858
|
+
if (typeof this.pageSize !== 'undefined') {
|
|
1859
|
+
toReturn['pageSize'] = this.pageSize;
|
|
1860
|
+
}
|
|
1861
|
+
return toReturn;
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
class ListSocialPostsResponse {
|
|
1865
|
+
constructor(kwargs) {
|
|
1866
|
+
if (!kwargs) {
|
|
1867
|
+
return;
|
|
1868
|
+
}
|
|
1869
|
+
Object.assign(this, kwargs);
|
|
1870
|
+
}
|
|
1871
|
+
static fromProto(proto) {
|
|
1872
|
+
let m = new ListSocialPostsResponse();
|
|
1873
|
+
m = Object.assign(m, proto);
|
|
1874
|
+
if (proto.socialPosts) {
|
|
1875
|
+
m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
|
|
1876
|
+
}
|
|
1877
|
+
return m;
|
|
1878
|
+
}
|
|
1879
|
+
toApiJson() {
|
|
1880
|
+
const toReturn = {};
|
|
1881
|
+
if (typeof this.socialPosts !== 'undefined' && this.socialPosts !== null) {
|
|
1882
|
+
toReturn['socialPosts'] = 'toApiJson' in this.socialPosts ? this.socialPosts.toApiJson() : this.socialPosts;
|
|
1883
|
+
}
|
|
1884
|
+
if (typeof this.nextCursor !== 'undefined') {
|
|
1885
|
+
toReturn['nextCursor'] = this.nextCursor;
|
|
1886
|
+
}
|
|
1887
|
+
if (typeof this.hasMore !== 'undefined') {
|
|
1888
|
+
toReturn['hasMore'] = this.hasMore;
|
|
1889
|
+
}
|
|
1890
|
+
return toReturn;
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
class ListTenorGifsRequest {
|
|
1894
|
+
constructor(kwargs) {
|
|
1895
|
+
if (!kwargs) {
|
|
1896
|
+
return;
|
|
1897
|
+
}
|
|
1898
|
+
Object.assign(this, kwargs);
|
|
1899
|
+
}
|
|
1900
|
+
static fromProto(proto) {
|
|
1901
|
+
let m = new ListTenorGifsRequest();
|
|
1902
|
+
m = Object.assign(m, proto);
|
|
1903
|
+
if (proto.pageSize) {
|
|
1904
|
+
m.pageSize = parseInt(proto.pageSize, 10);
|
|
1905
|
+
}
|
|
1906
|
+
return m;
|
|
1907
|
+
}
|
|
1908
|
+
toApiJson() {
|
|
1909
|
+
const toReturn = {};
|
|
1910
|
+
if (typeof this.query !== 'undefined') {
|
|
1911
|
+
toReturn['query'] = this.query;
|
|
1912
|
+
}
|
|
1913
|
+
if (typeof this.cursor !== 'undefined') {
|
|
1914
|
+
toReturn['cursor'] = this.cursor;
|
|
1915
|
+
}
|
|
1916
|
+
if (typeof this.pageSize !== 'undefined') {
|
|
1917
|
+
toReturn['pageSize'] = this.pageSize;
|
|
1918
|
+
}
|
|
1919
|
+
if (typeof this.locale !== 'undefined') {
|
|
1920
|
+
toReturn['locale'] = this.locale;
|
|
1921
|
+
}
|
|
1922
|
+
if (typeof this.anonymousId !== 'undefined') {
|
|
1923
|
+
toReturn['anonymousId'] = this.anonymousId;
|
|
1924
|
+
}
|
|
1925
|
+
if (typeof this.mediaFilter !== 'undefined') {
|
|
1926
|
+
toReturn['mediaFilter'] = this.mediaFilter;
|
|
1927
|
+
}
|
|
1928
|
+
if (typeof this.aspectRatioRange !== 'undefined') {
|
|
1929
|
+
toReturn['aspectRatioRange'] = this.aspectRatioRange;
|
|
1930
|
+
}
|
|
1931
|
+
if (typeof this.contentFilter !== 'undefined') {
|
|
1932
|
+
toReturn['contentFilter'] = this.contentFilter;
|
|
1933
|
+
}
|
|
1934
|
+
return toReturn;
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
class ListTenorGifsResponse {
|
|
1938
|
+
constructor(kwargs) {
|
|
1939
|
+
if (!kwargs) {
|
|
1940
|
+
return;
|
|
1941
|
+
}
|
|
1942
|
+
Object.assign(this, kwargs);
|
|
1943
|
+
}
|
|
1944
|
+
static fromProto(proto) {
|
|
1945
|
+
let m = new ListTenorGifsResponse();
|
|
1946
|
+
m = Object.assign(m, proto);
|
|
1947
|
+
if (proto.results) {
|
|
1948
|
+
m.results = proto.results.map(TenorGif.fromProto);
|
|
1949
|
+
}
|
|
1950
|
+
return m;
|
|
1951
|
+
}
|
|
1952
|
+
toApiJson() {
|
|
1953
|
+
const toReturn = {};
|
|
1954
|
+
if (typeof this.next !== 'undefined') {
|
|
1955
|
+
toReturn['next'] = this.next;
|
|
1956
|
+
}
|
|
1957
|
+
if (typeof this.results !== 'undefined' && this.results !== null) {
|
|
1958
|
+
toReturn['results'] = 'toApiJson' in this.results ? this.results.toApiJson() : this.results;
|
|
1959
|
+
}
|
|
1960
|
+
return toReturn;
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
class PartnerListScheduledPostsResponse {
|
|
1964
|
+
constructor(kwargs) {
|
|
1965
|
+
if (!kwargs) {
|
|
1966
|
+
return;
|
|
1967
|
+
}
|
|
1968
|
+
Object.assign(this, kwargs);
|
|
1969
|
+
}
|
|
1970
|
+
static fromProto(proto) {
|
|
1971
|
+
let m = new PartnerListScheduledPostsResponse();
|
|
1972
|
+
m = Object.assign(m, proto);
|
|
1973
|
+
if (proto.socialPosts) {
|
|
1974
|
+
m.socialPosts = proto.socialPosts.map(SocialPost.fromProto);
|
|
1975
|
+
}
|
|
1976
|
+
return m;
|
|
1977
|
+
}
|
|
1978
|
+
toApiJson() {
|
|
1979
|
+
const toReturn = {};
|
|
1980
|
+
if (typeof this.socialPosts !== 'undefined' && this.socialPosts !== null) {
|
|
1981
|
+
toReturn['socialPosts'] = 'toApiJson' in this.socialPosts ? this.socialPosts.toApiJson() : this.socialPosts;
|
|
1982
|
+
}
|
|
1983
|
+
if (typeof this.nextCursor !== 'undefined') {
|
|
1984
|
+
toReturn['nextCursor'] = this.nextCursor;
|
|
1985
|
+
}
|
|
1986
|
+
if (typeof this.hasMore !== 'undefined') {
|
|
1987
|
+
toReturn['hasMore'] = this.hasMore;
|
|
1988
|
+
}
|
|
1989
|
+
return toReturn;
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
class PartnerListScheduledSocialPostsRequest {
|
|
1993
|
+
constructor(kwargs) {
|
|
1994
|
+
if (!kwargs) {
|
|
1995
|
+
return;
|
|
1996
|
+
}
|
|
1997
|
+
Object.assign(this, kwargs);
|
|
1998
|
+
}
|
|
1999
|
+
static fromProto(proto) {
|
|
2000
|
+
let m = new PartnerListScheduledSocialPostsRequest();
|
|
2001
|
+
m = Object.assign(m, proto);
|
|
2002
|
+
if (proto.filters) {
|
|
2003
|
+
m.filters = PartnerListScheduledSocialPostsRequestFilters.fromProto(proto.filters);
|
|
2004
|
+
}
|
|
2005
|
+
if (proto.pageSize) {
|
|
2006
|
+
m.pageSize = parseInt(proto.pageSize, 10);
|
|
2007
|
+
}
|
|
2008
|
+
return m;
|
|
2009
|
+
}
|
|
2010
|
+
toApiJson() {
|
|
2011
|
+
const toReturn = {};
|
|
2012
|
+
if (typeof this.cursor !== 'undefined') {
|
|
2013
|
+
toReturn['cursor'] = this.cursor;
|
|
2014
|
+
}
|
|
2015
|
+
if (typeof this.filters !== 'undefined' && this.filters !== null) {
|
|
2016
|
+
toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;
|
|
2017
|
+
}
|
|
2018
|
+
if (typeof this.pageSize !== 'undefined') {
|
|
2019
|
+
toReturn['pageSize'] = this.pageSize;
|
|
2020
|
+
}
|
|
2021
|
+
return toReturn;
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
class RemoveFromMultilocationPostRequest {
|
|
2025
|
+
constructor(kwargs) {
|
|
2026
|
+
if (!kwargs) {
|
|
2027
|
+
return;
|
|
2028
|
+
}
|
|
2029
|
+
Object.assign(this, kwargs);
|
|
2030
|
+
}
|
|
2031
|
+
static fromProto(proto) {
|
|
2032
|
+
let m = new RemoveFromMultilocationPostRequest();
|
|
2033
|
+
m = Object.assign(m, proto);
|
|
2034
|
+
if (proto.reason) {
|
|
2035
|
+
m.reason = enumStringToValue(RemoveReason, proto.reason);
|
|
2036
|
+
}
|
|
2037
|
+
if (proto.locations) {
|
|
2038
|
+
m.locations = proto.locations.map(Location.fromProto);
|
|
2039
|
+
}
|
|
2040
|
+
return m;
|
|
2041
|
+
}
|
|
2042
|
+
toApiJson() {
|
|
2043
|
+
const toReturn = {};
|
|
2044
|
+
if (typeof this.reason !== 'undefined') {
|
|
2045
|
+
toReturn['reason'] = this.reason;
|
|
2046
|
+
}
|
|
2047
|
+
if (typeof this.brandId !== 'undefined') {
|
|
2048
|
+
toReturn['brandId'] = this.brandId;
|
|
2049
|
+
}
|
|
2050
|
+
if (typeof this.multilocationId !== 'undefined') {
|
|
2051
|
+
toReturn['multilocationId'] = this.multilocationId;
|
|
2052
|
+
}
|
|
2053
|
+
if (typeof this.locations !== 'undefined' && this.locations !== null) {
|
|
2054
|
+
toReturn['locations'] = 'toApiJson' in this.locations ? this.locations.toApiJson() : this.locations;
|
|
2055
|
+
}
|
|
2056
|
+
return toReturn;
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
class ReplaceHashtagsRequest {
|
|
2060
|
+
constructor(kwargs) {
|
|
2061
|
+
if (!kwargs) {
|
|
2062
|
+
return;
|
|
2063
|
+
}
|
|
2064
|
+
Object.assign(this, kwargs);
|
|
2065
|
+
}
|
|
2066
|
+
static fromProto(proto) {
|
|
2067
|
+
let m = new ReplaceHashtagsRequest();
|
|
2068
|
+
m = Object.assign(m, proto);
|
|
2069
|
+
return m;
|
|
2070
|
+
}
|
|
2071
|
+
toApiJson() {
|
|
2072
|
+
const toReturn = {};
|
|
2073
|
+
if (typeof this.keyword !== 'undefined') {
|
|
2074
|
+
toReturn['keyword'] = this.keyword;
|
|
2075
|
+
}
|
|
2076
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2077
|
+
toReturn['businessId'] = this.businessId;
|
|
2078
|
+
}
|
|
2079
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
2080
|
+
toReturn['partnerId'] = this.partnerId;
|
|
2081
|
+
}
|
|
2082
|
+
return toReturn;
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
class SchedulePostRequest {
|
|
2086
|
+
constructor(kwargs) {
|
|
2087
|
+
if (!kwargs) {
|
|
2088
|
+
return;
|
|
2089
|
+
}
|
|
2090
|
+
Object.assign(this, kwargs);
|
|
2091
|
+
}
|
|
2092
|
+
static fromProto(proto) {
|
|
2093
|
+
let m = new SchedulePostRequest();
|
|
2094
|
+
m = Object.assign(m, proto);
|
|
2095
|
+
if (proto.socialPost) {
|
|
2096
|
+
m.socialPost = SocialPostData.fromProto(proto.socialPost);
|
|
2097
|
+
}
|
|
2098
|
+
return m;
|
|
2099
|
+
}
|
|
2100
|
+
toApiJson() {
|
|
2101
|
+
const toReturn = {};
|
|
2102
|
+
if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
|
|
2103
|
+
toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
|
|
2104
|
+
}
|
|
2105
|
+
if (typeof this.socialServiceIds !== 'undefined') {
|
|
2106
|
+
toReturn['socialServiceIds'] = this.socialServiceIds;
|
|
2107
|
+
}
|
|
2108
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
2109
|
+
toReturn['partnerId'] = this.partnerId;
|
|
2110
|
+
}
|
|
2111
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2112
|
+
toReturn['businessId'] = this.businessId;
|
|
2113
|
+
}
|
|
2114
|
+
return toReturn;
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
class SchedulePostResponse {
|
|
2118
|
+
constructor(kwargs) {
|
|
2119
|
+
if (!kwargs) {
|
|
2120
|
+
return;
|
|
2121
|
+
}
|
|
2122
|
+
Object.assign(this, kwargs);
|
|
2123
|
+
}
|
|
2124
|
+
static fromProto(proto) {
|
|
2125
|
+
let m = new SchedulePostResponse();
|
|
2126
|
+
m = Object.assign(m, proto);
|
|
2127
|
+
if (proto.statuses) {
|
|
2128
|
+
m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
|
|
2129
|
+
}
|
|
2130
|
+
return m;
|
|
2131
|
+
}
|
|
2132
|
+
toApiJson() {
|
|
2133
|
+
const toReturn = {};
|
|
2134
|
+
if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
|
|
2135
|
+
toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
|
|
2136
|
+
}
|
|
2137
|
+
return toReturn;
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
class ScheduleToAllPagesRequest {
|
|
2141
|
+
constructor(kwargs) {
|
|
2142
|
+
if (!kwargs) {
|
|
2143
|
+
return;
|
|
2144
|
+
}
|
|
2145
|
+
Object.assign(this, kwargs);
|
|
2146
|
+
}
|
|
2147
|
+
static fromProto(proto) {
|
|
2148
|
+
let m = new ScheduleToAllPagesRequest();
|
|
2149
|
+
m = Object.assign(m, proto);
|
|
2150
|
+
if (proto.socialPost) {
|
|
2151
|
+
m.socialPost = SocialPostData.fromProto(proto.socialPost);
|
|
2152
|
+
}
|
|
2153
|
+
return m;
|
|
2154
|
+
}
|
|
2155
|
+
toApiJson() {
|
|
2156
|
+
const toReturn = {};
|
|
2157
|
+
if (typeof this.socialPost !== 'undefined' && this.socialPost !== null) {
|
|
2158
|
+
toReturn['socialPost'] = 'toApiJson' in this.socialPost ? this.socialPost.toApiJson() : this.socialPost;
|
|
2159
|
+
}
|
|
2160
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
2161
|
+
toReturn['partnerId'] = this.partnerId;
|
|
2162
|
+
}
|
|
2163
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2164
|
+
toReturn['businessId'] = this.businessId;
|
|
2165
|
+
}
|
|
2166
|
+
return toReturn;
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
class ScheduleToAllPagesResponse {
|
|
2170
|
+
constructor(kwargs) {
|
|
2171
|
+
if (!kwargs) {
|
|
2172
|
+
return;
|
|
2173
|
+
}
|
|
2174
|
+
Object.assign(this, kwargs);
|
|
2175
|
+
}
|
|
2176
|
+
static fromProto(proto) {
|
|
2177
|
+
let m = new ScheduleToAllPagesResponse();
|
|
2178
|
+
m = Object.assign(m, proto);
|
|
2179
|
+
if (proto.statuses) {
|
|
2180
|
+
m.statuses = proto.statuses.map(SchedulePostStatus.fromProto);
|
|
2181
|
+
}
|
|
2182
|
+
return m;
|
|
2183
|
+
}
|
|
2184
|
+
toApiJson() {
|
|
2185
|
+
const toReturn = {};
|
|
2186
|
+
if (typeof this.statuses !== 'undefined' && this.statuses !== null) {
|
|
2187
|
+
toReturn['statuses'] = 'toApiJson' in this.statuses ? this.statuses.toApiJson() : this.statuses;
|
|
2188
|
+
}
|
|
2189
|
+
return toReturn;
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
class SearchHashtagRequest {
|
|
2193
|
+
constructor(kwargs) {
|
|
2194
|
+
if (!kwargs) {
|
|
2195
|
+
return;
|
|
2196
|
+
}
|
|
2197
|
+
Object.assign(this, kwargs);
|
|
2198
|
+
}
|
|
2199
|
+
static fromProto(proto) {
|
|
2200
|
+
let m = new SearchHashtagRequest();
|
|
2201
|
+
m = Object.assign(m, proto);
|
|
2202
|
+
if (proto.limit) {
|
|
2203
|
+
m.limit = parseInt(proto.limit, 10);
|
|
2204
|
+
}
|
|
2205
|
+
return m;
|
|
2206
|
+
}
|
|
2207
|
+
toApiJson() {
|
|
2208
|
+
const toReturn = {};
|
|
2209
|
+
if (typeof this.searchTerm !== 'undefined') {
|
|
2210
|
+
toReturn['searchTerm'] = this.searchTerm;
|
|
2211
|
+
}
|
|
2212
|
+
if (typeof this.limit !== 'undefined') {
|
|
2213
|
+
toReturn['limit'] = this.limit;
|
|
2214
|
+
}
|
|
2215
|
+
if (typeof this.businessId !== 'undefined') {
|
|
2216
|
+
toReturn['businessId'] = this.businessId;
|
|
2217
|
+
}
|
|
2218
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
2219
|
+
toReturn['partnerId'] = this.partnerId;
|
|
2220
|
+
}
|
|
2221
|
+
return toReturn;
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
class SearchHashtagResponse {
|
|
2225
|
+
constructor(kwargs) {
|
|
2226
|
+
if (!kwargs) {
|
|
2227
|
+
return;
|
|
2228
|
+
}
|
|
2229
|
+
Object.assign(this, kwargs);
|
|
2230
|
+
}
|
|
2231
|
+
static fromProto(proto) {
|
|
2232
|
+
let m = new SearchHashtagResponse();
|
|
2233
|
+
m = Object.assign(m, proto);
|
|
2234
|
+
if (proto.hashtags) {
|
|
2235
|
+
m.hashtags = proto.hashtags.map(Hashtag.fromProto);
|
|
2236
|
+
}
|
|
2237
|
+
return m;
|
|
2238
|
+
}
|
|
2239
|
+
toApiJson() {
|
|
2240
|
+
const toReturn = {};
|
|
2241
|
+
if (typeof this.hashtags !== 'undefined' && this.hashtags !== null) {
|
|
2242
|
+
toReturn['hashtags'] = 'toApiJson' in this.hashtags ? this.hashtags.toApiJson() : this.hashtags;
|
|
2243
|
+
}
|
|
2244
|
+
return toReturn;
|
|
2245
|
+
}
|
|
2246
|
+
}
|
|
2247
|
+
class UpdatePostTemplateRequest {
|
|
2248
|
+
constructor(kwargs) {
|
|
2249
|
+
if (!kwargs) {
|
|
2250
|
+
return;
|
|
2251
|
+
}
|
|
2252
|
+
Object.assign(this, kwargs);
|
|
2253
|
+
}
|
|
2254
|
+
static fromProto(proto) {
|
|
2255
|
+
let m = new UpdatePostTemplateRequest();
|
|
2256
|
+
m = Object.assign(m, proto);
|
|
2257
|
+
if (proto.postDateTime) {
|
|
2258
|
+
m.postDateTime = new Date(proto.postDateTime);
|
|
2259
|
+
}
|
|
2260
|
+
return m;
|
|
2261
|
+
}
|
|
2262
|
+
toApiJson() {
|
|
2263
|
+
const toReturn = {};
|
|
2264
|
+
if (typeof this.accountGroupId !== 'undefined') {
|
|
2265
|
+
toReturn['accountGroupId'] = this.accountGroupId;
|
|
2266
|
+
}
|
|
2267
|
+
if (typeof this.templateId !== 'undefined') {
|
|
2268
|
+
toReturn['templateId'] = this.templateId;
|
|
2269
|
+
}
|
|
2270
|
+
if (typeof this.title !== 'undefined') {
|
|
2271
|
+
toReturn['title'] = this.title;
|
|
2272
|
+
}
|
|
2273
|
+
if (typeof this.postText !== 'undefined') {
|
|
2274
|
+
toReturn['postText'] = this.postText;
|
|
2275
|
+
}
|
|
2276
|
+
if (typeof this.postDateTime !== 'undefined' && this.postDateTime !== null) {
|
|
2277
|
+
toReturn['postDateTime'] = 'toApiJson' in this.postDateTime ? this.postDateTime.toApiJson() : this.postDateTime;
|
|
2278
|
+
}
|
|
2279
|
+
if (typeof this.gmbPostCustomization !== 'undefined') {
|
|
2280
|
+
toReturn['gmbPostCustomization'] = this.gmbPostCustomization;
|
|
2281
|
+
}
|
|
2282
|
+
if (typeof this.imageUrl !== 'undefined') {
|
|
2283
|
+
toReturn['imageUrl'] = this.imageUrl;
|
|
2284
|
+
}
|
|
2285
|
+
if (typeof this.imagePath !== 'undefined') {
|
|
2286
|
+
toReturn['imagePath'] = this.imagePath;
|
|
2287
|
+
}
|
|
2288
|
+
if (typeof this.imageSize !== 'undefined') {
|
|
2289
|
+
toReturn['imageSize'] = this.imageSize;
|
|
2290
|
+
}
|
|
2291
|
+
if (typeof this.previews !== 'undefined') {
|
|
2292
|
+
toReturn['previews'] = this.previews;
|
|
2293
|
+
}
|
|
2294
|
+
if (typeof this.options !== 'undefined') {
|
|
2295
|
+
toReturn['options'] = this.options;
|
|
2296
|
+
}
|
|
2297
|
+
if (typeof this.videoUrl !== 'undefined') {
|
|
2298
|
+
toReturn['videoUrl'] = this.videoUrl;
|
|
2299
|
+
}
|
|
2300
|
+
return toReturn;
|
|
2301
|
+
}
|
|
2302
|
+
}
|
|
2303
|
+
|
|
2304
|
+
// *********************************
|
|
2305
|
+
|
|
2306
|
+
var _a;
|
|
2307
|
+
const environment = (_a = (window ? window['environment'] : 'prod')) !== null && _a !== void 0 ? _a : 'prod';
|
|
2308
|
+
const hostMap = {
|
|
2309
|
+
'local': 'social-post.vendasta-local.com',
|
|
2310
|
+
'test': '',
|
|
2311
|
+
'demo': 'social-posts-demo.apigateway.co',
|
|
2312
|
+
'prod': 'social-posts-prod.apigateway.co',
|
|
2313
|
+
'production': 'social-posts-prod.apigateway.co',
|
|
2314
|
+
};
|
|
2315
|
+
class HostService {
|
|
2316
|
+
get host() {
|
|
2317
|
+
return hostMap[environment.toLowerCase()];
|
|
2318
|
+
}
|
|
2319
|
+
get hostWithScheme() {
|
|
2320
|
+
return 'https://' + this.host;
|
|
2321
|
+
}
|
|
2322
|
+
}
|
|
2323
|
+
HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2324
|
+
HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HostService, providedIn: 'root' });
|
|
2325
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HostService, decorators: [{
|
|
2326
|
+
type: Injectable,
|
|
2327
|
+
args: [{ providedIn: 'root' }]
|
|
2328
|
+
}] });
|
|
2329
|
+
|
|
2330
|
+
// *********************************
|
|
2331
|
+
class SocialPostsApiService {
|
|
2332
|
+
constructor(http, hostService) {
|
|
2333
|
+
this.http = http;
|
|
2334
|
+
this.hostService = hostService;
|
|
2335
|
+
this._host = this.hostService.hostWithScheme;
|
|
2336
|
+
}
|
|
2337
|
+
apiOptions() {
|
|
2338
|
+
return {
|
|
2339
|
+
headers: new HttpHeaders({
|
|
2340
|
+
'Content-Type': 'application/json'
|
|
2341
|
+
}),
|
|
2342
|
+
withCredentials: true
|
|
2343
|
+
};
|
|
2344
|
+
}
|
|
2345
|
+
list(r) {
|
|
2346
|
+
const request = (r.toApiJson) ? r : new ListSocialPostsRequest(r);
|
|
2347
|
+
return this.http.post(this._host + "/socialposts.v1.SocialPosts/List", request.toApiJson(), this.apiOptions())
|
|
2348
|
+
.pipe(map(resp => ListSocialPostsResponse.fromProto(resp)));
|
|
2349
|
+
}
|
|
2350
|
+
deleteSocialPost(r) {
|
|
2351
|
+
const request = (r.toApiJson) ? r : new DeleteSocialPostRequest(r);
|
|
2352
|
+
return this.http.post(this._host + "/socialposts.v1.SocialPosts/DeleteSocialPost", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
2353
|
+
}
|
|
2354
|
+
scheduleToAllPages(r) {
|
|
2355
|
+
const request = (r.toApiJson) ? r : new ScheduleToAllPagesRequest(r);
|
|
2356
|
+
return this.http.post(this._host + "/socialposts.v1.SocialPosts/ScheduleToAllPages", request.toApiJson(), this.apiOptions())
|
|
2357
|
+
.pipe(map(resp => ScheduleToAllPagesResponse.fromProto(resp)));
|
|
2358
|
+
}
|
|
2359
|
+
schedule(r) {
|
|
2360
|
+
const request = (r.toApiJson) ? r : new SchedulePostRequest(r);
|
|
2361
|
+
return this.http.post(this._host + "/socialposts.v1.SocialPosts/Schedule", request.toApiJson(), this.apiOptions())
|
|
2362
|
+
.pipe(map(resp => SchedulePostResponse.fromProto(resp)));
|
|
2363
|
+
}
|
|
2364
|
+
getMultiSocialPosts(r) {
|
|
2365
|
+
const request = (r.toApiJson) ? r : new GetMultiSocialPostsRequest(r);
|
|
2366
|
+
return this.http.post(this._host + "/socialposts.v1.SocialPosts/GetMultiSocialPosts", request.toApiJson(), this.apiOptions())
|
|
2367
|
+
.pipe(map(resp => GetMultiSocialPostsResponse.fromProto(resp)));
|
|
2368
|
+
}
|
|
2369
|
+
getMultiSocialPostStats(r) {
|
|
2370
|
+
const request = (r.toApiJson) ? r : new GetMultiSocialPostStatsRequest(r);
|
|
2371
|
+
return this.http.post(this._host + "/socialposts.v1.SocialPosts/GetMultiSocialPostStats", request.toApiJson(), this.apiOptions())
|
|
2372
|
+
.pipe(map(resp => GetMultiSocialPostStatsResponse.fromProto(resp)));
|
|
2373
|
+
}
|
|
2374
|
+
getScheduledPostCount(r) {
|
|
2375
|
+
const request = (r.toApiJson) ? r : new GetScheduledPostCountRequest(r);
|
|
2376
|
+
return this.http.post(this._host + "/socialposts.v1.SocialPosts/GetScheduledPostCount", request.toApiJson(), this.apiOptions())
|
|
2377
|
+
.pipe(map(resp => GetScheduledPostCountResponse.fromProto(resp)));
|
|
2378
|
+
}
|
|
2379
|
+
}
|
|
2380
|
+
SocialPostsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SocialPostsApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2381
|
+
SocialPostsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SocialPostsApiService, providedIn: 'root' });
|
|
2382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SocialPostsApiService, decorators: [{
|
|
2383
|
+
type: Injectable,
|
|
2384
|
+
args: [{ providedIn: 'root' }]
|
|
2385
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
2386
|
+
|
|
2387
|
+
class SocialPostsService {
|
|
2388
|
+
constructor(socialPostsApiService) {
|
|
2389
|
+
this.socialPostsApiService = socialPostsApiService;
|
|
2390
|
+
}
|
|
2391
|
+
list(start, end, socialServiceIds, businessId, partnerId, cursor, tags, pageSize) {
|
|
2392
|
+
const req = new ListSocialPostsRequest({
|
|
2393
|
+
start: start,
|
|
2394
|
+
end: end,
|
|
2395
|
+
businessId: businessId,
|
|
2396
|
+
partnerId: partnerId,
|
|
2397
|
+
cursor: cursor,
|
|
2398
|
+
socialServiceIds: socialServiceIds,
|
|
2399
|
+
tags: tags,
|
|
2400
|
+
pageSize: pageSize,
|
|
2401
|
+
});
|
|
2402
|
+
return this.socialPostsApiService.list(req);
|
|
2403
|
+
}
|
|
2404
|
+
getMultiSocialPosts(businessId, internalPostIds) {
|
|
2405
|
+
if (!internalPostIds || internalPostIds.length === 0) {
|
|
2406
|
+
const res = new GetMultiSocialPostsResponse();
|
|
2407
|
+
return of(res);
|
|
2408
|
+
}
|
|
2409
|
+
const req = new GetMultiSocialPostsRequest({ businessId: businessId, internalPostIds: internalPostIds });
|
|
2410
|
+
return this.socialPostsApiService.getMultiSocialPosts(req);
|
|
2411
|
+
}
|
|
2412
|
+
getScheduledPostCount(partnerId, businessId, socialServiceIds) {
|
|
2413
|
+
const req = new GetScheduledPostCountRequest({ partnerId: partnerId, businessId: businessId, socialServiceIds: socialServiceIds });
|
|
2414
|
+
return this.socialPostsApiService.getScheduledPostCount(req);
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
SocialPostsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SocialPostsService, deps: [{ token: SocialPostsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2418
|
+
SocialPostsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SocialPostsService, providedIn: 'root' });
|
|
2419
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SocialPostsService, decorators: [{
|
|
2420
|
+
type: Injectable,
|
|
2421
|
+
args: [{ providedIn: 'root' }]
|
|
2422
|
+
}], ctorParameters: function () { return [{ type: SocialPostsApiService }]; } });
|
|
2423
|
+
|
|
2424
|
+
// *********************************
|
|
2425
|
+
class PostTemplatesApiService {
|
|
2426
|
+
constructor(http, hostService) {
|
|
2427
|
+
this.http = http;
|
|
2428
|
+
this.hostService = hostService;
|
|
2429
|
+
this._host = this.hostService.hostWithScheme;
|
|
2430
|
+
}
|
|
2431
|
+
apiOptions() {
|
|
2432
|
+
return {
|
|
2433
|
+
headers: new HttpHeaders({
|
|
2434
|
+
'Content-Type': 'application/json'
|
|
2435
|
+
}),
|
|
2436
|
+
withCredentials: true
|
|
2437
|
+
};
|
|
2438
|
+
}
|
|
2439
|
+
updatePostTemplate(r) {
|
|
2440
|
+
const request = (r.toApiJson) ? r : new UpdatePostTemplateRequest(r);
|
|
2441
|
+
return this.http.post(this._host + "/socialposts.v1.PostTemplates/UpdatePostTemplate", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
2442
|
+
}
|
|
2443
|
+
createPostTemplate(r) {
|
|
2444
|
+
const request = (r.toApiJson) ? r : new CreatePostTemplateRequest(r);
|
|
2445
|
+
return this.http.post(this._host + "/socialposts.v1.PostTemplates/CreatePostTemplate", request.toApiJson(), this.apiOptions())
|
|
2446
|
+
.pipe(map(resp => CreatePostTemplateResponse.fromProto(resp)));
|
|
2447
|
+
}
|
|
2448
|
+
getPostTemplate(r) {
|
|
2449
|
+
const request = (r.toApiJson) ? r : new GetPostTemplateRequest(r);
|
|
2450
|
+
return this.http.post(this._host + "/socialposts.v1.PostTemplates/GetPostTemplate", request.toApiJson(), this.apiOptions())
|
|
2451
|
+
.pipe(map(resp => GetPostTemplateResponse.fromProto(resp)));
|
|
2452
|
+
}
|
|
2453
|
+
listPostTemplates(r) {
|
|
2454
|
+
const request = (r.toApiJson) ? r : new ListPostTemplatesRequest(r);
|
|
2455
|
+
return this.http.post(this._host + "/socialposts.v1.PostTemplates/ListPostTemplates", request.toApiJson(), this.apiOptions())
|
|
2456
|
+
.pipe(map(resp => ListPostTemplatesResponse.fromProto(resp)));
|
|
2457
|
+
}
|
|
2458
|
+
deletePostTemplate(r) {
|
|
2459
|
+
const request = (r.toApiJson) ? r : new DeletePostTemplateRequest(r);
|
|
2460
|
+
return this.http.post(this._host + "/socialposts.v1.PostTemplates/DeletePostTemplate", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2463
|
+
PostTemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PostTemplatesApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2464
|
+
PostTemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PostTemplatesApiService, providedIn: 'root' });
|
|
2465
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PostTemplatesApiService, decorators: [{
|
|
2466
|
+
type: Injectable,
|
|
2467
|
+
args: [{ providedIn: 'root' }]
|
|
2468
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
2469
|
+
|
|
2470
|
+
class PostTemplatesService {
|
|
2471
|
+
constructor(socialPostsApiService) {
|
|
2472
|
+
this.socialPostsApiService = socialPostsApiService;
|
|
2473
|
+
}
|
|
2474
|
+
updatePostTemplate(accountGroupId, templateId, title, postText, postDateTime, gmbPostCustomization, imageUrl, imagePath, imageSize, previews, options, videoUrl) {
|
|
2475
|
+
const req = new UpdatePostTemplateRequest({
|
|
2476
|
+
accountGroupId: accountGroupId,
|
|
2477
|
+
templateId: templateId,
|
|
2478
|
+
title: title,
|
|
2479
|
+
postText: postText,
|
|
2480
|
+
postDateTime: postDateTime,
|
|
2481
|
+
gmbPostCustomization: gmbPostCustomization,
|
|
2482
|
+
imageUrl: imageUrl,
|
|
2483
|
+
imagePath: imagePath,
|
|
2484
|
+
imageSize: imageSize,
|
|
2485
|
+
previews: previews,
|
|
2486
|
+
options: options,
|
|
2487
|
+
videoUrl: videoUrl
|
|
2488
|
+
});
|
|
2489
|
+
return this.socialPostsApiService.updatePostTemplate(req);
|
|
2490
|
+
}
|
|
2491
|
+
createPostTemplate(accountGroupId, title, postText, postDateTime, gmbPostCustomization, imageUrl, imagePath, imageSize, previews, options, videoUrl) {
|
|
2492
|
+
const req = new CreatePostTemplateRequest({
|
|
2493
|
+
accountGroupId: accountGroupId,
|
|
2494
|
+
title: title,
|
|
2495
|
+
postText: postText,
|
|
2496
|
+
postDateTime: postDateTime,
|
|
2497
|
+
gmbPostCustomization: gmbPostCustomization,
|
|
2498
|
+
imageUrl: imageUrl,
|
|
2499
|
+
imagePath: imagePath,
|
|
2500
|
+
imageSize: imageSize,
|
|
2501
|
+
previews: previews,
|
|
2502
|
+
options: options,
|
|
2503
|
+
videoUrl: videoUrl
|
|
2504
|
+
});
|
|
2505
|
+
return this.socialPostsApiService.createPostTemplate(req);
|
|
2506
|
+
}
|
|
2507
|
+
getPostTemplate(accountGroupId, templateId) {
|
|
2508
|
+
const req = new GetPostTemplateRequest({
|
|
2509
|
+
accountGroupId: accountGroupId,
|
|
2510
|
+
templateId: templateId
|
|
2511
|
+
});
|
|
2512
|
+
return this.socialPostsApiService.getPostTemplate(req);
|
|
2513
|
+
}
|
|
2514
|
+
listPostTemplates(accountGroupId, cursor, pageSize) {
|
|
2515
|
+
const req = new ListPostTemplatesRequest({
|
|
2516
|
+
accountGroupId: accountGroupId,
|
|
2517
|
+
cursor: cursor,
|
|
2518
|
+
pageSize: pageSize
|
|
2519
|
+
});
|
|
2520
|
+
return this.socialPostsApiService.listPostTemplates(req);
|
|
2521
|
+
}
|
|
2522
|
+
deletePostTemplate(accountGroupId, templateId) {
|
|
2523
|
+
const req = new DeletePostTemplateRequest({
|
|
2524
|
+
accountGroupId: accountGroupId,
|
|
2525
|
+
templateId: templateId
|
|
2526
|
+
});
|
|
2527
|
+
return this.socialPostsApiService.deletePostTemplate(req);
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
PostTemplatesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PostTemplatesService, deps: [{ token: PostTemplatesApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2531
|
+
PostTemplatesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PostTemplatesService, providedIn: 'root' });
|
|
2532
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PostTemplatesService, decorators: [{
|
|
2533
|
+
type: Injectable,
|
|
2534
|
+
args: [{ providedIn: 'root' }]
|
|
2535
|
+
}], ctorParameters: function () { return [{ type: PostTemplatesApiService }]; } });
|
|
2536
|
+
|
|
2537
|
+
// *********************************
|
|
2538
|
+
class MultilocationPostApiService {
|
|
2539
|
+
constructor(http, hostService) {
|
|
2540
|
+
this.http = http;
|
|
2541
|
+
this.hostService = hostService;
|
|
2542
|
+
this._host = this.hostService.hostWithScheme;
|
|
2543
|
+
}
|
|
2544
|
+
apiOptions() {
|
|
2545
|
+
return {
|
|
2546
|
+
headers: new HttpHeaders({
|
|
2547
|
+
'Content-Type': 'application/json'
|
|
2548
|
+
}),
|
|
2549
|
+
withCredentials: true
|
|
2550
|
+
};
|
|
2551
|
+
}
|
|
2552
|
+
createMultilocationPost(r) {
|
|
2553
|
+
const request = (r.toApiJson) ? r : new CreateMultilocationPostRequest(r);
|
|
2554
|
+
return this.http.post(this._host + "/socialposts.v1.MultilocationPostService/CreateMultilocationPost", request.toApiJson(), this.apiOptions())
|
|
2555
|
+
.pipe(map(resp => CreateMultilocationPostResponse.fromProto(resp)));
|
|
2556
|
+
}
|
|
2557
|
+
editMultilocationPost(r) {
|
|
2558
|
+
const request = (r.toApiJson) ? r : new EditMultilocationPostRequest(r);
|
|
2559
|
+
return this.http.post(this._host + "/socialposts.v1.MultilocationPostService/EditMultilocationPost", request.toApiJson(), this.apiOptions())
|
|
2560
|
+
.pipe(map(resp => EditMultilocationPostResponse.fromProto(resp)));
|
|
2561
|
+
}
|
|
2562
|
+
removeFromMultilocationPost(r) {
|
|
2563
|
+
const request = (r.toApiJson) ? r : new RemoveFromMultilocationPostRequest(r);
|
|
2564
|
+
return this.http.post(this._host + "/socialposts.v1.MultilocationPostService/RemoveFromMultilocationPost", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
2565
|
+
}
|
|
2566
|
+
listMultilocationPostsForBrand(r) {
|
|
2567
|
+
const request = (r.toApiJson) ? r : new ListMultilocationPostsForBrandRequest(r);
|
|
2568
|
+
return this.http.post(this._host + "/socialposts.v1.MultilocationPostService/ListMultilocationPostsForBrand", request.toApiJson(), this.apiOptions())
|
|
2569
|
+
.pipe(map(resp => ListMultilocationPostsForBrandResponse.fromProto(resp)));
|
|
2570
|
+
}
|
|
2571
|
+
deleteMultilocationPost(r) {
|
|
2572
|
+
const request = (r.toApiJson) ? r : new DeleteMultilocationPostRequest(r);
|
|
2573
|
+
return this.http.post(this._host + "/socialposts.v1.MultilocationPostService/DeleteMultilocationPost", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
2574
|
+
}
|
|
2575
|
+
getMultilocationPost(r) {
|
|
2576
|
+
const request = (r.toApiJson) ? r : new GetMultilocationPostRequest(r);
|
|
2577
|
+
return this.http.post(this._host + "/socialposts.v1.MultilocationPostService/GetMultilocationPost", request.toApiJson(), this.apiOptions())
|
|
2578
|
+
.pipe(map(resp => GetMultilocationPostResponse.fromProto(resp)));
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2581
|
+
MultilocationPostApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: MultilocationPostApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2582
|
+
MultilocationPostApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: MultilocationPostApiService, providedIn: 'root' });
|
|
2583
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: MultilocationPostApiService, decorators: [{
|
|
2584
|
+
type: Injectable,
|
|
2585
|
+
args: [{ providedIn: 'root' }]
|
|
2586
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
2587
|
+
|
|
2588
|
+
class MultilocationPostsService {
|
|
2589
|
+
constructor(multilocationApiService) {
|
|
2590
|
+
this.multilocationApiService = multilocationApiService;
|
|
2591
|
+
}
|
|
2592
|
+
createMultilocationPost(brandId, text, media, gifs, videos, scheduledDate, locations) {
|
|
2593
|
+
const req = new CreateMultilocationPostRequest({
|
|
2594
|
+
brandId: brandId,
|
|
2595
|
+
text: text,
|
|
2596
|
+
media: media,
|
|
2597
|
+
gifs: gifs,
|
|
2598
|
+
videos: videos,
|
|
2599
|
+
scheduledDate: scheduledDate,
|
|
2600
|
+
locations: locations
|
|
2601
|
+
});
|
|
2602
|
+
return this.multilocationApiService.createMultilocationPost(req);
|
|
2603
|
+
}
|
|
2604
|
+
editMultilocationPost(brandId, multilocationId, text, media, gifs, videos, scheduledDate, locations, fieldMask) {
|
|
2605
|
+
const req = new EditMultilocationPostRequest({
|
|
2606
|
+
brandId: brandId,
|
|
2607
|
+
multilocationId: multilocationId,
|
|
2608
|
+
text: text,
|
|
2609
|
+
media: media,
|
|
2610
|
+
gifs: gifs,
|
|
2611
|
+
videos: videos,
|
|
2612
|
+
scheduledDate: scheduledDate,
|
|
2613
|
+
locations: locations,
|
|
2614
|
+
fieldMask: fieldMask
|
|
2615
|
+
});
|
|
2616
|
+
return this.multilocationApiService.editMultilocationPost(req);
|
|
2617
|
+
}
|
|
2618
|
+
removeFromMultilocationPost(reason, brandId, multilocationId, locations) {
|
|
2619
|
+
const req = new RemoveFromMultilocationPostRequest({
|
|
2620
|
+
reason: reason,
|
|
2621
|
+
brandId: brandId,
|
|
2622
|
+
multilocationId: multilocationId,
|
|
2623
|
+
locations: locations
|
|
2624
|
+
});
|
|
2625
|
+
return this.multilocationApiService.removeFromMultilocationPost(req);
|
|
2626
|
+
}
|
|
2627
|
+
listMultilocationPostsForBrand(brandId, startDate, endDate, cursor, pageSize) {
|
|
2628
|
+
const req = new ListMultilocationPostsForBrandRequest({
|
|
2629
|
+
brandId: brandId,
|
|
2630
|
+
startDate: startDate,
|
|
2631
|
+
endDate: endDate,
|
|
2632
|
+
cursor: cursor,
|
|
2633
|
+
pageSize: pageSize
|
|
2634
|
+
});
|
|
2635
|
+
return this.multilocationApiService.listMultilocationPostsForBrand(req);
|
|
2636
|
+
}
|
|
2637
|
+
deleteMultilocationPost(brandId, multilocationId) {
|
|
2638
|
+
const req = new DeleteMultilocationPostRequest({
|
|
2639
|
+
brandId: brandId,
|
|
2640
|
+
multilocationId: multilocationId
|
|
2641
|
+
});
|
|
2642
|
+
return this.multilocationApiService.deleteMultilocationPost(req);
|
|
2643
|
+
}
|
|
2644
|
+
getMultilocationPost(brandId, multilocationId) {
|
|
2645
|
+
const req = new GetMultilocationPostRequest({
|
|
2646
|
+
brandId: brandId,
|
|
2647
|
+
multilocationId: multilocationId
|
|
2648
|
+
});
|
|
2649
|
+
return this.multilocationApiService.getMultilocationPost(req);
|
|
2650
|
+
}
|
|
2651
|
+
}
|
|
2652
|
+
MultilocationPostsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: MultilocationPostsService, deps: [{ token: MultilocationPostApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2653
|
+
MultilocationPostsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: MultilocationPostsService, providedIn: 'root' });
|
|
2654
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: MultilocationPostsService, decorators: [{
|
|
2655
|
+
type: Injectable,
|
|
2656
|
+
args: [{ providedIn: 'root' }]
|
|
2657
|
+
}], ctorParameters: function () { return [{ type: MultilocationPostApiService }]; } });
|
|
2658
|
+
|
|
2659
|
+
// *********************************
|
|
2660
|
+
class TenorGifsApiService {
|
|
2661
|
+
constructor(http, hostService) {
|
|
2662
|
+
this.http = http;
|
|
2663
|
+
this.hostService = hostService;
|
|
2664
|
+
this._host = this.hostService.hostWithScheme;
|
|
2665
|
+
}
|
|
2666
|
+
apiOptions() {
|
|
2667
|
+
return {
|
|
2668
|
+
headers: new HttpHeaders({
|
|
2669
|
+
'Content-Type': 'application/json'
|
|
2670
|
+
}),
|
|
2671
|
+
withCredentials: true
|
|
2672
|
+
};
|
|
2673
|
+
}
|
|
2674
|
+
getTenorAnonymousId(r) {
|
|
2675
|
+
const request = (r.toApiJson) ? r : new GetTenorAnonymousIdRequest(r);
|
|
2676
|
+
return this.http.post(this._host + "/socialposts.v1.TenorGifs/GetTenorAnonymousId", request.toApiJson(), this.apiOptions())
|
|
2677
|
+
.pipe(map(resp => GetTenorAnonymousIdResponse.fromProto(resp)));
|
|
2678
|
+
}
|
|
2679
|
+
listTenorGifs(r) {
|
|
2680
|
+
const request = (r.toApiJson) ? r : new ListTenorGifsRequest(r);
|
|
2681
|
+
return this.http.post(this._host + "/socialposts.v1.TenorGifs/ListTenorGifs", request.toApiJson(), this.apiOptions())
|
|
2682
|
+
.pipe(map(resp => ListTenorGifsResponse.fromProto(resp)));
|
|
2683
|
+
}
|
|
2684
|
+
}
|
|
2685
|
+
TenorGifsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TenorGifsApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2686
|
+
TenorGifsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TenorGifsApiService, providedIn: 'root' });
|
|
2687
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TenorGifsApiService, decorators: [{
|
|
2688
|
+
type: Injectable,
|
|
2689
|
+
args: [{ providedIn: 'root' }]
|
|
2690
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
2691
|
+
|
|
2692
|
+
class TenorGifsService {
|
|
2693
|
+
constructor(tenorGifsApiService) {
|
|
2694
|
+
this.tenorGifsApiService = tenorGifsApiService;
|
|
2695
|
+
}
|
|
2696
|
+
listTenorGifs(query, cursor, pageSize, locale, anonymousId, mediaFilter, aspectRatioRange, contentFilter) {
|
|
2697
|
+
const request = new ListTenorGifsRequest({
|
|
2698
|
+
query: query,
|
|
2699
|
+
cursor: cursor,
|
|
2700
|
+
pageSize: pageSize,
|
|
2701
|
+
locale: locale,
|
|
2702
|
+
anonymousId: anonymousId,
|
|
2703
|
+
mediaFilter: mediaFilter,
|
|
2704
|
+
aspectRatioRange: aspectRatioRange,
|
|
2705
|
+
contentFilter: contentFilter
|
|
2706
|
+
});
|
|
2707
|
+
return this.tenorGifsApiService.listTenorGifs(request);
|
|
2708
|
+
}
|
|
2709
|
+
getAnonymousId() {
|
|
2710
|
+
const request = new GetTenorAnonymousIdRequest({});
|
|
2711
|
+
return this.tenorGifsApiService.getTenorAnonymousId(request);
|
|
2712
|
+
}
|
|
2713
|
+
}
|
|
2714
|
+
TenorGifsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TenorGifsService, deps: [{ token: TenorGifsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2715
|
+
TenorGifsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TenorGifsService, providedIn: 'root' });
|
|
2716
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TenorGifsService, decorators: [{
|
|
2717
|
+
type: Injectable,
|
|
2718
|
+
args: [{ providedIn: 'root' }]
|
|
2719
|
+
}], ctorParameters: function () { return [{ type: TenorGifsApiService }]; } });
|
|
2720
|
+
|
|
2721
|
+
// *********************************
|
|
2722
|
+
class PixabayImagesApiService {
|
|
2723
|
+
constructor(http, hostService) {
|
|
2724
|
+
this.http = http;
|
|
2725
|
+
this.hostService = hostService;
|
|
2726
|
+
this._host = this.hostService.hostWithScheme;
|
|
2727
|
+
}
|
|
2728
|
+
apiOptions() {
|
|
2729
|
+
return {
|
|
2730
|
+
headers: new HttpHeaders({
|
|
2731
|
+
'Content-Type': 'application/json'
|
|
2732
|
+
}),
|
|
2733
|
+
withCredentials: true
|
|
2734
|
+
};
|
|
2735
|
+
}
|
|
2736
|
+
listPixabayImages(r) {
|
|
2737
|
+
const request = (r.toApiJson) ? r : new ListPixabayImagesRequest(r);
|
|
2738
|
+
return this.http.post(this._host + "/socialposts.v1.PixabayImages/ListPixabayImages", request.toApiJson(), this.apiOptions())
|
|
2739
|
+
.pipe(map(resp => ListPixabayImagesResponse.fromProto(resp)));
|
|
2740
|
+
}
|
|
2741
|
+
}
|
|
2742
|
+
PixabayImagesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PixabayImagesApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2743
|
+
PixabayImagesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PixabayImagesApiService, providedIn: 'root' });
|
|
2744
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PixabayImagesApiService, decorators: [{
|
|
2745
|
+
type: Injectable,
|
|
2746
|
+
args: [{ providedIn: 'root' }]
|
|
2747
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
2748
|
+
|
|
2749
|
+
class PixabayImageService {
|
|
2750
|
+
constructor(pixabayApiService) {
|
|
2751
|
+
this.pixabayApiService = pixabayApiService;
|
|
2752
|
+
}
|
|
2753
|
+
listPixabayImages(query, cursor, pageSize) {
|
|
2754
|
+
const request = new ListPixabayImagesRequest({
|
|
2755
|
+
query: query, cursor: cursor, pageSize: pageSize
|
|
2756
|
+
});
|
|
2757
|
+
return this.pixabayApiService.listPixabayImages(request);
|
|
2758
|
+
}
|
|
2759
|
+
}
|
|
2760
|
+
PixabayImageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PixabayImageService, deps: [{ token: PixabayImagesApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2761
|
+
PixabayImageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PixabayImageService, providedIn: 'root' });
|
|
2762
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PixabayImageService, decorators: [{
|
|
2763
|
+
type: Injectable,
|
|
2764
|
+
args: [{ providedIn: 'root' }]
|
|
2765
|
+
}], ctorParameters: function () { return [{ type: PixabayImagesApiService }]; } });
|
|
2766
|
+
|
|
2767
|
+
// *********************************
|
|
2768
|
+
class HashTagsApiService {
|
|
2769
|
+
constructor(http, hostService) {
|
|
2770
|
+
this.http = http;
|
|
2771
|
+
this.hostService = hostService;
|
|
2772
|
+
this._host = this.hostService.hostWithScheme;
|
|
2773
|
+
}
|
|
2774
|
+
apiOptions() {
|
|
2775
|
+
return {
|
|
2776
|
+
headers: new HttpHeaders({
|
|
2777
|
+
'Content-Type': 'application/json'
|
|
2778
|
+
}),
|
|
2779
|
+
withCredentials: true
|
|
2780
|
+
};
|
|
2781
|
+
}
|
|
2782
|
+
replaceHashtags(r) {
|
|
2783
|
+
const request = (r.toApiJson) ? r : new ReplaceHashtagsRequest(r);
|
|
2784
|
+
return this.http.post(this._host + "/socialposts.v1.HashTags/ReplaceHashtags", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
2785
|
+
}
|
|
2786
|
+
deleteHashtags(r) {
|
|
2787
|
+
const request = (r.toApiJson) ? r : new DeleteHashtagsRequest(r);
|
|
2788
|
+
return this.http.post(this._host + "/socialposts.v1.HashTags/DeleteHashtags", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
2789
|
+
}
|
|
2790
|
+
searchHashtag(r) {
|
|
2791
|
+
const request = (r.toApiJson) ? r : new SearchHashtagRequest(r);
|
|
2792
|
+
return this.http.post(this._host + "/socialposts.v1.HashTags/SearchHashtag", request.toApiJson(), this.apiOptions())
|
|
2793
|
+
.pipe(map(resp => SearchHashtagResponse.fromProto(resp)));
|
|
2794
|
+
}
|
|
2795
|
+
}
|
|
2796
|
+
HashTagsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HashTagsApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2797
|
+
HashTagsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HashTagsApiService, providedIn: 'root' });
|
|
2798
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HashTagsApiService, decorators: [{
|
|
2799
|
+
type: Injectable,
|
|
2800
|
+
args: [{ providedIn: 'root' }]
|
|
2801
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
2802
|
+
|
|
2803
|
+
class HashTagsService {
|
|
2804
|
+
constructor(hashTagsApiService) {
|
|
2805
|
+
this.hashTagsApiService = hashTagsApiService;
|
|
2806
|
+
}
|
|
2807
|
+
replaceHashtags(keyword, businessId, partnerId) {
|
|
2808
|
+
const request = new ReplaceHashtagsRequest({
|
|
2809
|
+
keyword: keyword,
|
|
2810
|
+
businessId: businessId,
|
|
2811
|
+
partnerId: partnerId
|
|
2812
|
+
});
|
|
2813
|
+
return this.hashTagsApiService.replaceHashtags(request);
|
|
2814
|
+
}
|
|
2815
|
+
deleteHashtags(keyword, businessId, partnerId) {
|
|
2816
|
+
const request = new DeleteHashtagsRequest({
|
|
2817
|
+
keyword: keyword,
|
|
2818
|
+
businessId: businessId,
|
|
2819
|
+
partnerId: partnerId
|
|
2820
|
+
});
|
|
2821
|
+
return this.hashTagsApiService.deleteHashtags(request);
|
|
2822
|
+
}
|
|
2823
|
+
searchHashtag(searchTerm, businessId, limit, partnerId) {
|
|
2824
|
+
const request = new SearchHashtagRequest({
|
|
2825
|
+
searchTerm: searchTerm,
|
|
2826
|
+
businessId: businessId,
|
|
2827
|
+
limit: limit,
|
|
2828
|
+
partnerId: partnerId
|
|
2829
|
+
});
|
|
2830
|
+
return this.hashTagsApiService.searchHashtag(request);
|
|
2831
|
+
}
|
|
2832
|
+
}
|
|
2833
|
+
HashTagsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HashTagsService, deps: [{ token: HashTagsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2834
|
+
HashTagsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HashTagsService, providedIn: 'root' });
|
|
2835
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HashTagsService, decorators: [{
|
|
2836
|
+
type: Injectable,
|
|
2837
|
+
args: [{ providedIn: 'root' }]
|
|
2838
|
+
}], ctorParameters: function () { return [{ type: HashTagsApiService }]; } });
|
|
2839
|
+
|
|
2840
|
+
// *********************************
|
|
2841
|
+
class PartnerSocialPostsApiService {
|
|
2842
|
+
constructor(http, hostService) {
|
|
2843
|
+
this.http = http;
|
|
2844
|
+
this.hostService = hostService;
|
|
2845
|
+
this._host = this.hostService.hostWithScheme;
|
|
2846
|
+
}
|
|
2847
|
+
apiOptions() {
|
|
2848
|
+
return {
|
|
2849
|
+
headers: new HttpHeaders({
|
|
2850
|
+
'Content-Type': 'application/json'
|
|
2851
|
+
}),
|
|
2852
|
+
withCredentials: true
|
|
2853
|
+
};
|
|
2854
|
+
}
|
|
2855
|
+
listScheduled(r) {
|
|
2856
|
+
const request = (r.toApiJson) ? r : new PartnerListScheduledSocialPostsRequest(r);
|
|
2857
|
+
return this.http.post(this._host + "/socialposts.v1.PartnerSocialPosts/ListScheduled", request.toApiJson(), this.apiOptions())
|
|
2858
|
+
.pipe(map(resp => PartnerListScheduledPostsResponse.fromProto(resp)));
|
|
2859
|
+
}
|
|
2860
|
+
listScheduledByCreated(r) {
|
|
2861
|
+
const request = (r.toApiJson) ? r : new PartnerListScheduledSocialPostsRequest(r);
|
|
2862
|
+
return this.http.post(this._host + "/socialposts.v1.PartnerSocialPosts/ListScheduledByCreated", request.toApiJson(), this.apiOptions())
|
|
2863
|
+
.pipe(map(resp => PartnerListScheduledPostsResponse.fromProto(resp)));
|
|
2864
|
+
}
|
|
2865
|
+
}
|
|
2866
|
+
PartnerSocialPostsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PartnerSocialPostsApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2867
|
+
PartnerSocialPostsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PartnerSocialPostsApiService, providedIn: 'root' });
|
|
2868
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PartnerSocialPostsApiService, decorators: [{
|
|
2869
|
+
type: Injectable,
|
|
2870
|
+
args: [{ providedIn: 'root' }]
|
|
2871
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
2872
|
+
|
|
2873
|
+
// *********************************
|
|
2874
|
+
|
|
2875
|
+
/*
|
|
2876
|
+
* Public API Surface of social-posts
|
|
2877
|
+
*/
|
|
2878
|
+
|
|
2879
|
+
/**
|
|
2880
|
+
* Generated bundle index. Do not edit.
|
|
2881
|
+
*/
|
|
2882
|
+
|
|
2883
|
+
export { DeleteMultilocationPostRequest, FieldMask, GetMultilocationPostRequest, HashTagsService, ListMultilocationPostsForBrandRequest, Location, MultilocationPost, MultilocationPostApiService, MultilocationPostsService, PixabayImageService, PostTemplatesService, PostingStatus, RemoveReason, SocialPostsService, TenorGifsService };
|
|
2884
|
+
//# sourceMappingURL=vendasta-social-posts.mjs.map
|