@natsuneko-laboratory/catalyst-sdk 0.7.2 → 1.0.0-alpha.2
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/dist/index.d.mts +712 -456
- package/dist/index.d.ts +712 -456
- package/dist/index.js +806 -554
- package/dist/index.mjs +802 -554
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28,6 +28,10 @@ __export(index_exports, {
|
|
|
28
28
|
CatalystTS: () => CatalystTS,
|
|
29
29
|
EgeriaClient: () => EgeriaClient,
|
|
30
30
|
EgeriaEndpoint: () => EgeriaEndpoint,
|
|
31
|
+
EpicleseClient: () => EpicleseClient,
|
|
32
|
+
EpicleseEndpoint: () => EpicleseEndpoint,
|
|
33
|
+
FeatureFlagsClient: () => FeatureFlagsClient,
|
|
34
|
+
FeatureFlagsEndpoint: () => FeatureFlagsEndpoint,
|
|
31
35
|
HttpClient: () => HttpClient,
|
|
32
36
|
ISSUER_CATALYST_SYSTEM_MESSAGE: () => ISSUER_CATALYST_SYSTEM_MESSAGE,
|
|
33
37
|
ISSUER_CATALYST_USER_MESSAGE: () => ISSUER_CATALYST_USER_MESSAGE,
|
|
@@ -166,58 +170,160 @@ function buildTimelineParams(opts) {
|
|
|
166
170
|
return Object.keys(params).length > 0 ? params : void 0;
|
|
167
171
|
}
|
|
168
172
|
var CatalystEndpoint = {
|
|
173
|
+
// Album
|
|
169
174
|
createAlbum(data) {
|
|
170
175
|
return { path: "/catalyst/v1/album", method: "POST", body: data };
|
|
171
176
|
},
|
|
172
177
|
getAlbum(id, opts = {}) {
|
|
178
|
+
const params = {};
|
|
179
|
+
if (opts.limit != null) params["limit"] = String(opts.limit);
|
|
180
|
+
if (opts.since != null) params["since"] = opts.since;
|
|
181
|
+
if (opts.until != null) params["until"] = opts.until;
|
|
173
182
|
return {
|
|
174
183
|
path: `/catalyst/v1/album/by/id/${id}`,
|
|
175
184
|
method: "GET",
|
|
176
|
-
queryParameters:
|
|
185
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
177
186
|
};
|
|
178
187
|
},
|
|
179
|
-
|
|
188
|
+
insertToAlbum(id, statusId) {
|
|
180
189
|
return {
|
|
181
190
|
path: `/catalyst/v1/album/by/id/${id}`,
|
|
182
|
-
method: "
|
|
183
|
-
body:
|
|
191
|
+
method: "PUT",
|
|
192
|
+
body: { insert: statusId }
|
|
184
193
|
};
|
|
185
194
|
},
|
|
186
|
-
|
|
195
|
+
removeFromAlbum(id, statusId) {
|
|
187
196
|
return {
|
|
188
197
|
path: `/catalyst/v1/album/by/id/${id}`,
|
|
189
198
|
method: "PUT",
|
|
190
|
-
body:
|
|
199
|
+
body: { remove: statusId }
|
|
191
200
|
};
|
|
192
201
|
},
|
|
193
|
-
|
|
202
|
+
editAlbum(id, data) {
|
|
194
203
|
return {
|
|
195
204
|
path: `/catalyst/v1/album/by/id/${id}`,
|
|
196
|
-
method: "
|
|
205
|
+
method: "PATCH",
|
|
197
206
|
body: data
|
|
198
207
|
};
|
|
199
208
|
},
|
|
200
209
|
deleteAlbum(id) {
|
|
201
210
|
return { path: `/catalyst/v1/album/by/id/${id}`, method: "DELETE" };
|
|
202
211
|
},
|
|
203
|
-
|
|
212
|
+
getAlbumBooks(id) {
|
|
213
|
+
return { path: `/catalyst/v1/album/by/id/${id}/book`, method: "GET" };
|
|
214
|
+
},
|
|
215
|
+
createAlbumBook(id, data) {
|
|
204
216
|
return {
|
|
205
|
-
path: `/catalyst/v1/album/by/
|
|
217
|
+
path: `/catalyst/v1/album/by/id/${id}/book`,
|
|
218
|
+
method: "POST",
|
|
219
|
+
body: data
|
|
220
|
+
};
|
|
221
|
+
},
|
|
222
|
+
getAlbumBook(id, bookId) {
|
|
223
|
+
return {
|
|
224
|
+
path: `/catalyst/v1/album/by/id/${id}/book/${bookId}`,
|
|
225
|
+
method: "GET"
|
|
226
|
+
};
|
|
227
|
+
},
|
|
228
|
+
regenerateAlbumBook(id, bookId) {
|
|
229
|
+
return {
|
|
230
|
+
path: `/catalyst/v1/album/by/id/${id}/book/${bookId}/regenerate`,
|
|
231
|
+
method: "POST"
|
|
232
|
+
};
|
|
233
|
+
},
|
|
234
|
+
getAlbumsByMe(includeSmartAlbums = false) {
|
|
235
|
+
return {
|
|
236
|
+
path: "/catalyst/v1/album/by/me",
|
|
206
237
|
method: "GET",
|
|
207
238
|
queryParameters: { include_smart_albums: String(includeSmartAlbums) }
|
|
208
239
|
};
|
|
209
240
|
},
|
|
210
|
-
|
|
241
|
+
listAlbums(username, includeSmartAlbum = true) {
|
|
242
|
+
return {
|
|
243
|
+
path: `/catalyst/v1/album/by/user/${username}`,
|
|
244
|
+
method: "GET",
|
|
245
|
+
queryParameters: { include_smart_album: String(includeSmartAlbum) }
|
|
246
|
+
};
|
|
247
|
+
},
|
|
248
|
+
searchAlbums(q, includeSmartAlbum = true, until) {
|
|
249
|
+
const params = {
|
|
250
|
+
include_smart_album: String(includeSmartAlbum)
|
|
251
|
+
};
|
|
252
|
+
if (q != null) params["q"] = q;
|
|
253
|
+
if (until != null) params["until"] = until;
|
|
254
|
+
return { path: "/catalyst/v1/album/search", method: "GET", queryParameters: params };
|
|
255
|
+
},
|
|
256
|
+
// Announcements
|
|
257
|
+
announcements() {
|
|
258
|
+
return { path: "/catalyst/v1/announcements", method: "GET" };
|
|
259
|
+
},
|
|
260
|
+
// Blocks
|
|
261
|
+
block(userId) {
|
|
262
|
+
return {
|
|
263
|
+
path: "/catalyst/v1/blocks",
|
|
264
|
+
method: "POST",
|
|
265
|
+
body: { userId }
|
|
266
|
+
};
|
|
267
|
+
},
|
|
268
|
+
unblock(userId) {
|
|
269
|
+
return {
|
|
270
|
+
path: "/catalyst/v1/blocks",
|
|
271
|
+
method: "DELETE",
|
|
272
|
+
body: { userId }
|
|
273
|
+
};
|
|
274
|
+
},
|
|
275
|
+
// Contest
|
|
276
|
+
// NOTE: the spec only exposes read + vote operations for contests; contest management
|
|
277
|
+
// (create/edit/awards/collaborators/copy/dashboard/publish/polls) is no longer part of the API.
|
|
278
|
+
getContestsByMe() {
|
|
279
|
+
return { path: "/catalyst/v1/contest/by/me", method: "GET" };
|
|
280
|
+
},
|
|
281
|
+
getContestBySlug(slug) {
|
|
282
|
+
return { path: `/catalyst/v1/contest/by/slug/${slug}`, method: "GET" };
|
|
283
|
+
},
|
|
284
|
+
contestTimeline(slug) {
|
|
285
|
+
return {
|
|
286
|
+
path: `/catalyst/v1/contest/by/slug/${slug}/timeline`,
|
|
287
|
+
method: "GET"
|
|
288
|
+
};
|
|
289
|
+
},
|
|
290
|
+
getContestVotes(slug) {
|
|
291
|
+
return { path: `/catalyst/v1/contest/by/slug/${slug}/vote`, method: "GET" };
|
|
292
|
+
},
|
|
293
|
+
addContestVote(slug, status) {
|
|
294
|
+
return {
|
|
295
|
+
path: `/catalyst/v1/contest/by/slug/${slug}/vote/${status}`,
|
|
296
|
+
method: "POST"
|
|
297
|
+
};
|
|
298
|
+
},
|
|
299
|
+
removeContestVote(slug, status) {
|
|
300
|
+
return {
|
|
301
|
+
path: `/catalyst/v1/contest/by/slug/${slug}/vote/${status}`,
|
|
302
|
+
method: "DELETE"
|
|
303
|
+
};
|
|
304
|
+
},
|
|
305
|
+
getContestsByUser(userId) {
|
|
306
|
+
return { path: `/catalyst/v1/contest/by/user/${userId}`, method: "GET" };
|
|
307
|
+
},
|
|
308
|
+
currentContests() {
|
|
309
|
+
return { path: "/catalyst/v1/contest/current", method: "GET" };
|
|
310
|
+
},
|
|
311
|
+
searchContests(q, state, id) {
|
|
312
|
+
const params = {};
|
|
313
|
+
if (q != null) params["q"] = q;
|
|
314
|
+
if (state != null) params["state"] = state;
|
|
315
|
+
if (id != null) params["id"] = id;
|
|
211
316
|
return {
|
|
212
|
-
path: "/catalyst/v1/
|
|
317
|
+
path: "/catalyst/v1/contest/search",
|
|
213
318
|
method: "GET",
|
|
214
|
-
queryParameters:
|
|
319
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
215
320
|
};
|
|
216
321
|
},
|
|
322
|
+
// Custom reactions
|
|
217
323
|
customReactions() {
|
|
218
324
|
return { path: "/catalyst/v1/reactions", method: "GET" };
|
|
219
325
|
},
|
|
220
|
-
|
|
326
|
+
getCustomUserReactions() {
|
|
221
327
|
return { path: "/catalyst/v1/custom-reactions", method: "GET" };
|
|
222
328
|
},
|
|
223
329
|
createCustomReaction(data) {
|
|
@@ -237,80 +343,90 @@ var CatalystEndpoint = {
|
|
|
237
343
|
deleteCustomReaction(id) {
|
|
238
344
|
return { path: `/catalyst/v1/custom-reactions/${id}`, method: "DELETE" };
|
|
239
345
|
},
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
method: "POST",
|
|
244
|
-
body: data
|
|
245
|
-
};
|
|
346
|
+
// Fleet
|
|
347
|
+
createFleet(data) {
|
|
348
|
+
return { path: "/catalyst/v1/fleet", method: "POST", body: data };
|
|
246
349
|
},
|
|
247
|
-
|
|
248
|
-
return {
|
|
249
|
-
path: "/catalyst/v1/blocks",
|
|
250
|
-
method: "DELETE",
|
|
251
|
-
body: data
|
|
252
|
-
};
|
|
350
|
+
fleetByUsername(username) {
|
|
351
|
+
return { path: `/catalyst/v1/fleet/by/user/${username}`, method: "GET" };
|
|
253
352
|
},
|
|
254
|
-
|
|
255
|
-
return { path:
|
|
353
|
+
fleets() {
|
|
354
|
+
return { path: "/catalyst/v1/fleet/ring", method: "GET" };
|
|
256
355
|
},
|
|
257
|
-
|
|
258
|
-
return { path:
|
|
356
|
+
fleetById(id) {
|
|
357
|
+
return { path: `/catalyst/v1/fleet/${id}`, method: "GET" };
|
|
259
358
|
},
|
|
260
|
-
|
|
261
|
-
return { path:
|
|
359
|
+
deleteFleet(id) {
|
|
360
|
+
return { path: `/catalyst/v1/fleet/${id}`, method: "DELETE" };
|
|
262
361
|
},
|
|
263
|
-
|
|
362
|
+
reactFleet(id, symbol) {
|
|
264
363
|
return {
|
|
265
|
-
path: `/catalyst/v1/
|
|
266
|
-
method: "
|
|
267
|
-
queryParameters: opts?.page != null ? { page: String(opts.page) } : void 0
|
|
364
|
+
path: `/catalyst/v1/fleet/${id}/reactions/${symbol}`,
|
|
365
|
+
method: "POST"
|
|
268
366
|
};
|
|
269
367
|
},
|
|
270
|
-
|
|
368
|
+
unreactFleet(id, symbol) {
|
|
271
369
|
return {
|
|
272
|
-
path: `/catalyst/v1/
|
|
273
|
-
method: "
|
|
274
|
-
queryParameters: opts?.page != null ? { page: String(opts.page) } : void 0
|
|
370
|
+
path: `/catalyst/v1/fleet/${id}/reactions/${symbol}`,
|
|
371
|
+
method: "DELETE"
|
|
275
372
|
};
|
|
276
373
|
},
|
|
277
|
-
|
|
278
|
-
return {
|
|
279
|
-
path: `/catalyst/v1/relationships/by/username/${username}/counts`,
|
|
280
|
-
method: "GET"
|
|
281
|
-
};
|
|
374
|
+
viewFleet(id) {
|
|
375
|
+
return { path: `/catalyst/v1/fleet/${id}/view`, method: "POST" };
|
|
282
376
|
},
|
|
283
|
-
|
|
284
|
-
return { path:
|
|
377
|
+
fleetViewers(id) {
|
|
378
|
+
return { path: `/catalyst/v1/fleet/${id}/viewers`, method: "GET" };
|
|
285
379
|
},
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
method: "GET",
|
|
290
|
-
queryParameters: buildTimelineParams(opts)
|
|
291
|
-
};
|
|
380
|
+
// Privacy
|
|
381
|
+
getPrivacySettings() {
|
|
382
|
+
return { path: "/catalyst/v1/privacy/settings", method: "GET" };
|
|
292
383
|
},
|
|
293
|
-
|
|
384
|
+
updatePrivacySettings(data) {
|
|
294
385
|
return {
|
|
295
|
-
path:
|
|
386
|
+
path: "/catalyst/v1/privacy/settings",
|
|
296
387
|
method: "PATCH",
|
|
297
388
|
body: data
|
|
298
389
|
};
|
|
299
390
|
},
|
|
300
|
-
|
|
301
|
-
|
|
391
|
+
// Profile tags
|
|
392
|
+
updateProfileTags(data) {
|
|
393
|
+
return { path: "/catalyst/v1/profile-tags", method: "PUT", body: data };
|
|
302
394
|
},
|
|
303
|
-
|
|
395
|
+
profileTagSuggestions(q) {
|
|
304
396
|
return {
|
|
305
|
-
path: "/catalyst/v1/
|
|
397
|
+
path: "/catalyst/v1/profile-tags/suggestions",
|
|
306
398
|
method: "GET",
|
|
307
399
|
queryParameters: { q }
|
|
308
400
|
};
|
|
309
401
|
},
|
|
402
|
+
getUsersByProfileTag(name, cursor) {
|
|
403
|
+
return {
|
|
404
|
+
path: `/catalyst/v1/profile-tags/by/name/${name}/users`,
|
|
405
|
+
method: "GET",
|
|
406
|
+
queryParameters: cursor != null ? { cursor } : void 0
|
|
407
|
+
};
|
|
408
|
+
},
|
|
409
|
+
getProfileTagsByUser(id) {
|
|
410
|
+
return { path: `/catalyst/v1/profile-tags/by/user/${id}`, method: "GET" };
|
|
411
|
+
},
|
|
412
|
+
// Random
|
|
413
|
+
randomStatus() {
|
|
414
|
+
return { path: "/catalyst/v1/random", method: "GET" };
|
|
415
|
+
},
|
|
416
|
+
randomStatusV1_1() {
|
|
417
|
+
return { path: "/catalyst/v1.1/random", method: "GET" };
|
|
418
|
+
},
|
|
419
|
+
onThisDay() {
|
|
420
|
+
return { path: "/catalyst/v1.1/on-this-day", method: "GET" };
|
|
421
|
+
},
|
|
422
|
+
// Status
|
|
310
423
|
createStatus(data) {
|
|
311
424
|
return { path: "/catalyst/v1/status", method: "POST", body: data };
|
|
312
425
|
},
|
|
313
426
|
getStatus(id) {
|
|
427
|
+
return { path: `/catalyst/v1/status/${id}`, method: "GET" };
|
|
428
|
+
},
|
|
429
|
+
getStatusV1_1(id) {
|
|
314
430
|
return { path: `/catalyst/v1.1/status/${id}`, method: "GET" };
|
|
315
431
|
},
|
|
316
432
|
editStatus(id, data) {
|
|
@@ -319,6 +435,9 @@ var CatalystEndpoint = {
|
|
|
319
435
|
deleteStatus(id) {
|
|
320
436
|
return { path: `/catalyst/v1/status/${id}`, method: "DELETE" };
|
|
321
437
|
},
|
|
438
|
+
albumsInStatus(id) {
|
|
439
|
+
return { path: `/catalyst/v1/status/${id}/albums`, method: "GET" };
|
|
440
|
+
},
|
|
322
441
|
isFavorited(id) {
|
|
323
442
|
return { path: `/catalyst/v1/status/${id}/favorite`, method: "GET" };
|
|
324
443
|
},
|
|
@@ -331,690 +450,664 @@ var CatalystEndpoint = {
|
|
|
331
450
|
reactions(id) {
|
|
332
451
|
return { path: `/catalyst/v1/status/${id}/reactions`, method: "GET" };
|
|
333
452
|
},
|
|
334
|
-
|
|
335
|
-
return { path: `/catalyst/v1/status/${id}/albums`, method: "GET" };
|
|
336
|
-
},
|
|
337
|
-
react(id, symbol) {
|
|
453
|
+
reactWithCustomReaction(id, customReactionId) {
|
|
338
454
|
return {
|
|
339
|
-
path: `/catalyst/v1/status/${id}/reactions/${
|
|
455
|
+
path: `/catalyst/v1/status/${id}/reactions/custom/${customReactionId}`,
|
|
340
456
|
method: "POST"
|
|
341
457
|
};
|
|
342
458
|
},
|
|
343
|
-
|
|
459
|
+
unreactWithCustomReaction(id, customReactionId) {
|
|
344
460
|
return {
|
|
345
|
-
path: `/catalyst/v1/status/${id}/reactions/${
|
|
461
|
+
path: `/catalyst/v1/status/${id}/reactions/custom/${customReactionId}`,
|
|
346
462
|
method: "DELETE"
|
|
347
463
|
};
|
|
348
464
|
},
|
|
349
|
-
|
|
350
|
-
return {
|
|
351
|
-
path: `/catalyst/v1/timeline/contest/by/slug/${slug}`,
|
|
352
|
-
method: "GET",
|
|
353
|
-
queryParameters: buildTimelineParams(opts)
|
|
354
|
-
};
|
|
355
|
-
},
|
|
356
|
-
favoriteTimeline(opts = {}) {
|
|
357
|
-
return {
|
|
358
|
-
path: "/catalyst/v1/timeline/favorite",
|
|
359
|
-
method: "GET",
|
|
360
|
-
queryParameters: buildTimelineParams(opts)
|
|
361
|
-
};
|
|
362
|
-
},
|
|
363
|
-
firehoseTimeline(opts = {}) {
|
|
364
|
-
return {
|
|
365
|
-
path: "/catalyst/v1.1/timeline/firehose",
|
|
366
|
-
method: "GET",
|
|
367
|
-
queryParameters: buildTimelineParams(opts)
|
|
368
|
-
};
|
|
369
|
-
},
|
|
370
|
-
galleryTimeline(opts = {}) {
|
|
371
|
-
return {
|
|
372
|
-
path: "/catalyst/v1/timeline/gallery",
|
|
373
|
-
method: "GET",
|
|
374
|
-
queryParameters: buildTimelineParams(opts)
|
|
375
|
-
};
|
|
376
|
-
},
|
|
377
|
-
homeTimeline(opts = {}) {
|
|
378
|
-
return {
|
|
379
|
-
path: "/catalyst/v1.1/timeline/home",
|
|
380
|
-
method: "GET",
|
|
381
|
-
queryParameters: buildTimelineParams(opts)
|
|
382
|
-
};
|
|
383
|
-
},
|
|
384
|
-
searchTimeline(opts = {}) {
|
|
385
|
-
const params = {};
|
|
386
|
-
if (opts.q != null) params["q"] = opts.q;
|
|
387
|
-
if (opts.exact != null) params["exact"] = String(opts.exact);
|
|
388
|
-
if (opts.since != null) params["since"] = opts.since;
|
|
389
|
-
if (opts.until != null) params["until"] = opts.until;
|
|
390
|
-
return {
|
|
391
|
-
path: "/catalyst/v1/timeline/search",
|
|
392
|
-
method: "GET",
|
|
393
|
-
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
394
|
-
};
|
|
395
|
-
},
|
|
396
|
-
userTimeline(username, opts = {}) {
|
|
397
|
-
const params = {};
|
|
398
|
-
if (opts.trimUser != null) params["trim_user"] = String(opts.trimUser);
|
|
399
|
-
if (opts.excludeSensitive != null)
|
|
400
|
-
params["exclude_sensitive"] = String(opts.excludeSensitive);
|
|
401
|
-
if (opts.since != null) params["since"] = opts.since;
|
|
402
|
-
if (opts.until != null) params["until"] = opts.until;
|
|
465
|
+
react(id, symbol) {
|
|
403
466
|
return {
|
|
404
|
-
path: `/catalyst/v1/
|
|
405
|
-
method: "
|
|
406
|
-
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
467
|
+
path: `/catalyst/v1/status/${id}/reactions/${symbol}`,
|
|
468
|
+
method: "POST"
|
|
407
469
|
};
|
|
408
470
|
},
|
|
409
|
-
|
|
471
|
+
unreact(id, symbol) {
|
|
410
472
|
return {
|
|
411
|
-
path: `/catalyst/v1/
|
|
412
|
-
method: "
|
|
413
|
-
queryParameters: buildTimelineParams(opts)
|
|
473
|
+
path: `/catalyst/v1/status/${id}/reactions/${symbol}`,
|
|
474
|
+
method: "DELETE"
|
|
414
475
|
};
|
|
415
476
|
},
|
|
416
|
-
|
|
417
|
-
return { path: "/catalyst/v1/trend", method: "GET" };
|
|
418
|
-
},
|
|
419
|
-
createFleet(data) {
|
|
477
|
+
reportStatus(id, data) {
|
|
420
478
|
return {
|
|
421
|
-
path:
|
|
479
|
+
path: `/catalyst/v1/status/${id}/report`,
|
|
422
480
|
method: "POST",
|
|
423
481
|
body: data
|
|
424
482
|
};
|
|
425
483
|
},
|
|
426
|
-
|
|
484
|
+
// Bulk status reactions
|
|
485
|
+
bulkStatusReactions(ids) {
|
|
427
486
|
return {
|
|
428
|
-
path:
|
|
429
|
-
method: "
|
|
487
|
+
path: "/catalyst/v1/statuses/reactions",
|
|
488
|
+
method: "POST",
|
|
489
|
+
body: { ids }
|
|
430
490
|
};
|
|
431
491
|
},
|
|
432
|
-
|
|
492
|
+
// Relationships
|
|
493
|
+
follow(userId) {
|
|
433
494
|
return {
|
|
434
|
-
path:
|
|
435
|
-
method: "
|
|
495
|
+
path: "/catalyst/v1/relationships",
|
|
496
|
+
method: "POST",
|
|
497
|
+
body: { userId }
|
|
436
498
|
};
|
|
437
499
|
},
|
|
438
|
-
|
|
500
|
+
remove(userId) {
|
|
439
501
|
return {
|
|
440
|
-
path:
|
|
441
|
-
method: "
|
|
502
|
+
path: "/catalyst/v1/relationships",
|
|
503
|
+
method: "DELETE",
|
|
504
|
+
body: { userId }
|
|
442
505
|
};
|
|
443
506
|
},
|
|
444
|
-
|
|
507
|
+
relationshipCounts(username) {
|
|
445
508
|
return {
|
|
446
|
-
path: `/catalyst/v1/
|
|
509
|
+
path: `/catalyst/v1/relationships/by/username/${username}/counts`,
|
|
447
510
|
method: "GET"
|
|
448
511
|
};
|
|
449
512
|
},
|
|
450
|
-
|
|
451
|
-
return {
|
|
452
|
-
path: `/catalyst/v1/fleet/${id}/reactions/${symbol}`,
|
|
453
|
-
method: "POST"
|
|
454
|
-
};
|
|
455
|
-
},
|
|
456
|
-
unreactFleet(id, symbol) {
|
|
457
|
-
return {
|
|
458
|
-
path: `/catalyst/v1/fleet/${id}/reactions/${symbol}`,
|
|
459
|
-
method: "DELETE"
|
|
460
|
-
};
|
|
461
|
-
},
|
|
462
|
-
fleets() {
|
|
513
|
+
followers(username, opts) {
|
|
463
514
|
return {
|
|
464
|
-
path:
|
|
465
|
-
method: "GET"
|
|
515
|
+
path: `/catalyst/v1/relationships/by/username/${username}/followers`,
|
|
516
|
+
method: "GET",
|
|
517
|
+
queryParameters: opts?.page != null ? { page: String(opts.page) } : void 0
|
|
466
518
|
};
|
|
467
519
|
},
|
|
468
|
-
|
|
520
|
+
followings(username, opts) {
|
|
469
521
|
return {
|
|
470
|
-
path: `/catalyst/v1/
|
|
471
|
-
method: "GET"
|
|
522
|
+
path: `/catalyst/v1/relationships/by/username/${username}/followings`,
|
|
523
|
+
method: "GET",
|
|
524
|
+
queryParameters: opts?.page != null ? { page: String(opts.page) } : void 0
|
|
472
525
|
};
|
|
473
526
|
},
|
|
474
|
-
|
|
475
|
-
return {
|
|
476
|
-
path: "/catalyst/v1/contest",
|
|
477
|
-
method: "POST",
|
|
478
|
-
body: data
|
|
479
|
-
};
|
|
527
|
+
relationships(id) {
|
|
528
|
+
return { path: `/catalyst/v1/relationships/${id}`, method: "GET" };
|
|
480
529
|
},
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
method: "GET"
|
|
485
|
-
};
|
|
530
|
+
// Smart album
|
|
531
|
+
createSmartAlbum(data) {
|
|
532
|
+
return { path: "/catalyst/v1/smart-album", method: "POST", body: data };
|
|
486
533
|
},
|
|
487
|
-
|
|
534
|
+
getSmartAlbum(id, opts = {}) {
|
|
535
|
+
const params = {};
|
|
536
|
+
if (opts.limit != null) params["limit"] = String(opts.limit);
|
|
537
|
+
if (opts.since != null) params["since"] = opts.since;
|
|
538
|
+
if (opts.until != null) params["until"] = opts.until;
|
|
488
539
|
return {
|
|
489
|
-
path: `/catalyst/v1/
|
|
490
|
-
method: "GET"
|
|
540
|
+
path: `/catalyst/v1/smart-album/by/id/${id}`,
|
|
541
|
+
method: "GET",
|
|
542
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
491
543
|
};
|
|
492
544
|
},
|
|
493
|
-
|
|
545
|
+
editSmartAlbum(id, data) {
|
|
494
546
|
return {
|
|
495
|
-
path: `/catalyst/v1/
|
|
547
|
+
path: `/catalyst/v1/smart-album/by/id/${id}`,
|
|
496
548
|
method: "PATCH",
|
|
497
549
|
body: data
|
|
498
550
|
};
|
|
499
551
|
},
|
|
500
|
-
|
|
501
|
-
return {
|
|
502
|
-
path: `/catalyst/v1/contest/by/slug/${slug}/awards`,
|
|
503
|
-
method: "GET"
|
|
504
|
-
};
|
|
505
|
-
},
|
|
506
|
-
setContestAward(slug, id, data) {
|
|
507
|
-
return {
|
|
508
|
-
path: `/catalyst/v1/contest/by/slug/${slug}/awards/${id}`,
|
|
509
|
-
method: "POST",
|
|
510
|
-
body: data
|
|
511
|
-
};
|
|
512
|
-
},
|
|
513
|
-
unsetContestAward(slug, id, data) {
|
|
514
|
-
return {
|
|
515
|
-
path: `/catalyst/v1/contest/by/slug/${slug}/awards/${id}`,
|
|
516
|
-
method: "DELETE",
|
|
517
|
-
body: data
|
|
518
|
-
};
|
|
552
|
+
deleteSmartAlbum(id) {
|
|
553
|
+
return { path: `/catalyst/v1/smart-album/by/id/${id}`, method: "DELETE" };
|
|
519
554
|
},
|
|
520
|
-
|
|
521
|
-
return {
|
|
522
|
-
path: `/catalyst/v1/contest/by/slug/${slug}/collaborators`,
|
|
523
|
-
method: "GET"
|
|
524
|
-
};
|
|
555
|
+
getSmartAlbumBooks(id) {
|
|
556
|
+
return { path: `/catalyst/v1/smart-album/by/id/${id}/book`, method: "GET" };
|
|
525
557
|
},
|
|
526
|
-
|
|
558
|
+
createSmartAlbumBook(id, data) {
|
|
527
559
|
return {
|
|
528
|
-
path: `/catalyst/v1/
|
|
560
|
+
path: `/catalyst/v1/smart-album/by/id/${id}/book`,
|
|
529
561
|
method: "POST",
|
|
530
562
|
body: data
|
|
531
563
|
};
|
|
532
564
|
},
|
|
533
|
-
|
|
534
|
-
return {
|
|
535
|
-
path: `/catalyst/v1/contest/by/slug/${slug}/collaborators`,
|
|
536
|
-
method: "DELETE",
|
|
537
|
-
body: data
|
|
538
|
-
};
|
|
539
|
-
},
|
|
540
|
-
copyContest(slug) {
|
|
541
|
-
return {
|
|
542
|
-
path: `/catalyst/v1/contest/by/slug/${slug}/copy`,
|
|
543
|
-
method: "POST"
|
|
544
|
-
};
|
|
545
|
-
},
|
|
546
|
-
getAccessPermissionOfContest(slug) {
|
|
565
|
+
getSmartAlbumBook(id, bookId) {
|
|
547
566
|
return {
|
|
548
|
-
path: `/catalyst/v1/
|
|
567
|
+
path: `/catalyst/v1/smart-album/by/id/${id}/book/${bookId}`,
|
|
549
568
|
method: "GET"
|
|
550
569
|
};
|
|
551
570
|
},
|
|
552
|
-
|
|
571
|
+
regenerateSmartAlbumBook(id, bookId) {
|
|
553
572
|
return {
|
|
554
|
-
path: `/catalyst/v1/
|
|
555
|
-
method: "GET"
|
|
556
|
-
};
|
|
557
|
-
},
|
|
558
|
-
publishContest(slug) {
|
|
559
|
-
return {
|
|
560
|
-
path: `/catalyst/v1/contest/by/slug/${slug}/publish`,
|
|
573
|
+
path: `/catalyst/v1/smart-album/by/id/${id}/book/${bookId}/regenerate`,
|
|
561
574
|
method: "POST"
|
|
562
575
|
};
|
|
563
576
|
},
|
|
564
|
-
|
|
565
|
-
return {
|
|
566
|
-
path: `/catalyst/v1/contest/by/slug/${slug}/vote/${id}`,
|
|
567
|
-
method: "POST"
|
|
568
|
-
};
|
|
577
|
+
listSmartAlbumsByUser(userId) {
|
|
578
|
+
return { path: `/catalyst/v1/smart-album/by/user/${userId}`, method: "GET" };
|
|
569
579
|
},
|
|
570
|
-
|
|
580
|
+
searchSmartAlbums(q) {
|
|
571
581
|
return {
|
|
572
|
-
path:
|
|
573
|
-
method: "
|
|
582
|
+
path: "/catalyst/v1/smart-album/search",
|
|
583
|
+
method: "GET",
|
|
584
|
+
queryParameters: q != null ? { q } : void 0
|
|
574
585
|
};
|
|
575
586
|
},
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
587
|
+
// Timelines
|
|
588
|
+
archiveTimeline(opts) {
|
|
589
|
+
const params = {
|
|
590
|
+
year: String(opts.year),
|
|
591
|
+
month: String(opts.month)
|
|
580
592
|
};
|
|
581
|
-
|
|
582
|
-
|
|
593
|
+
if (opts.day != null) params["day"] = String(opts.day);
|
|
594
|
+
if (opts.since != null) params["since"] = opts.since;
|
|
595
|
+
if (opts.until != null) params["until"] = opts.until;
|
|
596
|
+
if (opts.userId != null) params["userId"] = opts.userId;
|
|
597
|
+
if (opts.limit != null) params["limit"] = String(opts.limit);
|
|
598
|
+
if (opts.excludeSensitive != null)
|
|
599
|
+
params["excludeSensitive"] = String(opts.excludeSensitive);
|
|
583
600
|
return {
|
|
584
|
-
path: "/catalyst/v1/
|
|
601
|
+
path: "/catalyst/v1/timeline/archive",
|
|
585
602
|
method: "GET",
|
|
586
|
-
queryParameters:
|
|
587
|
-
};
|
|
588
|
-
},
|
|
589
|
-
reportStatus(id, data) {
|
|
590
|
-
return {
|
|
591
|
-
path: `/catalyst/v1/status/${id}/report`,
|
|
592
|
-
method: "POST",
|
|
593
|
-
body: data
|
|
603
|
+
queryParameters: params
|
|
594
604
|
};
|
|
595
605
|
},
|
|
596
|
-
|
|
597
|
-
return {
|
|
598
|
-
path: "/catalyst/v1/privacy/settings",
|
|
599
|
-
method: "GET"
|
|
600
|
-
};
|
|
606
|
+
archiveMonths() {
|
|
607
|
+
return { path: "/catalyst/v1/timeline/archive/months", method: "GET" };
|
|
601
608
|
},
|
|
602
|
-
|
|
609
|
+
timelineByContestSlug(slug, opts = {}) {
|
|
603
610
|
return {
|
|
604
|
-
path:
|
|
605
|
-
method: "
|
|
606
|
-
|
|
611
|
+
path: `/catalyst/v1/timeline/contest/by/slug/${slug}`,
|
|
612
|
+
method: "GET",
|
|
613
|
+
queryParameters: buildTimelineParams(opts)
|
|
607
614
|
};
|
|
608
615
|
},
|
|
609
|
-
|
|
610
|
-
announcements() {
|
|
611
|
-
return { path: "/catalyst/v1/announcements", method: "GET" };
|
|
612
|
-
},
|
|
613
|
-
// Profile Tags
|
|
614
|
-
updateProfileTags(data) {
|
|
615
|
-
return { path: "/catalyst/v1/profile-tags", method: "PUT", body: data };
|
|
616
|
-
},
|
|
617
|
-
profileTagSuggestions(q) {
|
|
616
|
+
favoriteTimeline(opts = {}) {
|
|
618
617
|
return {
|
|
619
|
-
path: "/catalyst/v1/
|
|
618
|
+
path: "/catalyst/v1/timeline/favorite",
|
|
620
619
|
method: "GET",
|
|
621
|
-
queryParameters:
|
|
620
|
+
queryParameters: buildTimelineParams(opts)
|
|
622
621
|
};
|
|
623
622
|
},
|
|
624
|
-
|
|
623
|
+
firehoseTimelineV1(opts = {}) {
|
|
625
624
|
return {
|
|
626
|
-
path:
|
|
625
|
+
path: "/catalyst/v1/timeline/firehose",
|
|
627
626
|
method: "GET",
|
|
628
|
-
queryParameters:
|
|
627
|
+
queryParameters: buildTimelineParams(opts)
|
|
629
628
|
};
|
|
630
629
|
},
|
|
631
|
-
|
|
630
|
+
galleryTimeline(opts = {}) {
|
|
632
631
|
return {
|
|
633
|
-
path:
|
|
634
|
-
method: "GET"
|
|
632
|
+
path: "/catalyst/v1/timeline/gallery",
|
|
633
|
+
method: "GET",
|
|
634
|
+
queryParameters: buildTimelineParams(opts)
|
|
635
635
|
};
|
|
636
636
|
},
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
return { path: "/catalyst/v1/random", method: "GET" };
|
|
637
|
+
homeTimelineV1() {
|
|
638
|
+
return { path: "/catalyst/v1/timeline/home", method: "GET" };
|
|
640
639
|
},
|
|
641
|
-
|
|
640
|
+
searchTimeline(opts = {}) {
|
|
641
|
+
const params = {};
|
|
642
|
+
if (opts.q != null) params["q"] = opts.q;
|
|
643
|
+
if (opts.exact != null) params["exact"] = String(opts.exact);
|
|
644
|
+
if (opts.since != null) params["since"] = opts.since;
|
|
645
|
+
if (opts.until != null) params["until"] = opts.until;
|
|
642
646
|
return {
|
|
643
|
-
path: "/catalyst/v1/
|
|
647
|
+
path: "/catalyst/v1/timeline/search",
|
|
644
648
|
method: "GET",
|
|
645
|
-
queryParameters:
|
|
646
|
-
};
|
|
647
|
-
},
|
|
648
|
-
// Bulk reactions
|
|
649
|
-
bulkStatusReactions(ids) {
|
|
650
|
-
return {
|
|
651
|
-
path: "/catalyst/v1/statuses/reactions",
|
|
652
|
-
method: "POST",
|
|
653
|
-
body: { ids }
|
|
649
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
654
650
|
};
|
|
655
651
|
},
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
const params = {
|
|
659
|
-
year: String(opts.year),
|
|
660
|
-
month: String(opts.month)
|
|
661
|
-
};
|
|
662
|
-
if (opts.day != null) params["day"] = String(opts.day);
|
|
652
|
+
userTimeline(username, opts = {}) {
|
|
653
|
+
const params = {};
|
|
663
654
|
if (opts.since != null) params["since"] = opts.since;
|
|
664
655
|
if (opts.until != null) params["until"] = opts.until;
|
|
665
|
-
if (opts.userId != null) params["userId"] = opts.userId;
|
|
666
656
|
if (opts.limit != null) params["limit"] = String(opts.limit);
|
|
667
|
-
if (opts.trimUser != null) params["trimUser"] = String(opts.trimUser);
|
|
668
657
|
if (opts.excludeSensitive != null)
|
|
669
|
-
params["
|
|
658
|
+
params["exclude_sensitive"] = String(opts.excludeSensitive);
|
|
670
659
|
return {
|
|
671
|
-
path:
|
|
660
|
+
path: `/catalyst/v1/timeline/user/by/username/${username}`,
|
|
672
661
|
method: "GET",
|
|
673
|
-
queryParameters: params
|
|
662
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
674
663
|
};
|
|
675
664
|
},
|
|
676
|
-
|
|
677
|
-
return {
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
665
|
+
userGalleryTimeline(username, opts = {}) {
|
|
666
|
+
return {
|
|
667
|
+
path: `/catalyst/v1/timeline/user/by/username/${username}/gallery`,
|
|
668
|
+
method: "GET",
|
|
669
|
+
queryParameters: buildTimelineParams(opts)
|
|
670
|
+
};
|
|
682
671
|
},
|
|
683
|
-
|
|
672
|
+
firehoseTimeline(opts = {}) {
|
|
673
|
+
const params = {};
|
|
674
|
+
if (opts.since != null) params["since"] = opts.since;
|
|
675
|
+
if (opts.until != null) params["until"] = opts.until;
|
|
676
|
+
if (opts.trimVisitor != null) params["trim_visitor"] = String(opts.trimVisitor);
|
|
684
677
|
return {
|
|
685
|
-
path:
|
|
686
|
-
method: "GET"
|
|
678
|
+
path: "/catalyst/v1.1/timeline/firehose",
|
|
679
|
+
method: "GET",
|
|
680
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
687
681
|
};
|
|
688
682
|
},
|
|
689
|
-
|
|
690
|
-
|
|
683
|
+
homeTimeline(opts = {}) {
|
|
684
|
+
const params = {};
|
|
685
|
+
if (opts.since != null) params["since"] = opts.since;
|
|
686
|
+
if (opts.until != null) params["until"] = opts.until;
|
|
687
|
+
if (opts.trimVisitor != null) params["trim_visitor"] = String(opts.trimVisitor);
|
|
691
688
|
return {
|
|
692
|
-
path: "/catalyst/v1/
|
|
689
|
+
path: "/catalyst/v1.1/timeline/home",
|
|
693
690
|
method: "GET",
|
|
694
|
-
queryParameters:
|
|
691
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
695
692
|
};
|
|
696
693
|
},
|
|
697
|
-
//
|
|
698
|
-
|
|
694
|
+
// Trend
|
|
695
|
+
trend() {
|
|
696
|
+
return { path: "/catalyst/v1/trend", method: "GET" };
|
|
697
|
+
},
|
|
698
|
+
richTrend() {
|
|
699
699
|
return {
|
|
700
|
-
path:
|
|
701
|
-
method: "GET"
|
|
700
|
+
path: "/catalyst/v1/trend",
|
|
701
|
+
method: "GET",
|
|
702
|
+
queryParameters: { format: "rich" }
|
|
702
703
|
};
|
|
703
704
|
}
|
|
704
|
-
};
|
|
705
|
-
|
|
706
|
-
// src/clients/catalystClient.ts
|
|
707
|
-
var CatalystClient = class {
|
|
708
|
-
constructor(http) {
|
|
709
|
-
this.http = http;
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
// src/clients/catalystClient.ts
|
|
708
|
+
var CatalystClient = class {
|
|
709
|
+
constructor(http) {
|
|
710
|
+
this.http = http;
|
|
711
|
+
}
|
|
712
|
+
// Albums
|
|
713
|
+
createAlbum(data) {
|
|
714
|
+
return this.http.request(CatalystEndpoint.createAlbum(data));
|
|
715
|
+
}
|
|
716
|
+
getAlbum(id, opts = {}) {
|
|
717
|
+
return this.http.request(CatalystEndpoint.getAlbum(id, opts));
|
|
718
|
+
}
|
|
719
|
+
insertToAlbum(id, statusId) {
|
|
720
|
+
return this.http.request(CatalystEndpoint.insertToAlbum(id, statusId));
|
|
721
|
+
}
|
|
722
|
+
removeFromAlbum(id, statusId) {
|
|
723
|
+
return this.http.request(CatalystEndpoint.removeFromAlbum(id, statusId));
|
|
724
|
+
}
|
|
725
|
+
editAlbum(id, data) {
|
|
726
|
+
return this.http.request(CatalystEndpoint.editAlbum(id, data));
|
|
727
|
+
}
|
|
728
|
+
deleteAlbum(id) {
|
|
729
|
+
return this.http.request(CatalystEndpoint.deleteAlbum(id));
|
|
730
|
+
}
|
|
731
|
+
getAlbumBooks(id) {
|
|
732
|
+
return this.http.request(CatalystEndpoint.getAlbumBooks(id));
|
|
733
|
+
}
|
|
734
|
+
createAlbumBook(id, data) {
|
|
735
|
+
return this.http.request(CatalystEndpoint.createAlbumBook(id, data));
|
|
736
|
+
}
|
|
737
|
+
getAlbumBook(id, bookId) {
|
|
738
|
+
return this.http.request(CatalystEndpoint.getAlbumBook(id, bookId));
|
|
739
|
+
}
|
|
740
|
+
regenerateAlbumBook(id, bookId) {
|
|
741
|
+
return this.http.request(CatalystEndpoint.regenerateAlbumBook(id, bookId));
|
|
742
|
+
}
|
|
743
|
+
async getAlbumsByMe(includeSmartAlbums = false) {
|
|
744
|
+
const response = await this.http.request(
|
|
745
|
+
CatalystEndpoint.getAlbumsByMe(includeSmartAlbums)
|
|
746
|
+
);
|
|
747
|
+
return response.albums;
|
|
748
|
+
}
|
|
749
|
+
async listAlbums(username, includeSmartAlbum = true) {
|
|
750
|
+
const response = await this.http.request(
|
|
751
|
+
CatalystEndpoint.listAlbums(username, includeSmartAlbum)
|
|
752
|
+
);
|
|
753
|
+
return response.albums;
|
|
754
|
+
}
|
|
755
|
+
async searchAlbums(q, includeSmartAlbum = true, until) {
|
|
756
|
+
const response = await this.http.request(
|
|
757
|
+
CatalystEndpoint.searchAlbums(q, includeSmartAlbum, until)
|
|
758
|
+
);
|
|
759
|
+
return response.albums;
|
|
760
|
+
}
|
|
761
|
+
// Announcements
|
|
762
|
+
async announcements() {
|
|
763
|
+
const response = await this.http.request(
|
|
764
|
+
CatalystEndpoint.announcements()
|
|
765
|
+
);
|
|
766
|
+
return response.announcements;
|
|
710
767
|
}
|
|
711
|
-
//
|
|
712
|
-
|
|
713
|
-
return this.http.request(CatalystEndpoint.
|
|
768
|
+
// Blocks
|
|
769
|
+
block(userId) {
|
|
770
|
+
return this.http.request(CatalystEndpoint.block(userId));
|
|
714
771
|
}
|
|
715
|
-
|
|
716
|
-
return this.http.request(CatalystEndpoint.
|
|
772
|
+
unblock(userId) {
|
|
773
|
+
return this.http.request(CatalystEndpoint.unblock(userId));
|
|
717
774
|
}
|
|
718
|
-
|
|
719
|
-
|
|
775
|
+
// Contest
|
|
776
|
+
// NOTE: the spec only exposes read + vote operations for contests; contest management
|
|
777
|
+
// (create/edit/awards/collaborators/copy/dashboard/publish/polls) is no longer part of the API.
|
|
778
|
+
async getContestsByMe() {
|
|
779
|
+
const response = await this.http.request(
|
|
780
|
+
CatalystEndpoint.getContestsByMe()
|
|
781
|
+
);
|
|
782
|
+
return response.contests;
|
|
720
783
|
}
|
|
721
|
-
|
|
722
|
-
|
|
784
|
+
async getContestBySlug(slug) {
|
|
785
|
+
const response = await this.http.request(
|
|
786
|
+
CatalystEndpoint.getContestBySlug(slug)
|
|
787
|
+
);
|
|
788
|
+
return response.contest;
|
|
723
789
|
}
|
|
724
|
-
|
|
725
|
-
|
|
790
|
+
async contestTimeline(slug) {
|
|
791
|
+
const response = await this.http.request(
|
|
792
|
+
CatalystEndpoint.contestTimeline(slug)
|
|
793
|
+
);
|
|
794
|
+
return response.statuses;
|
|
726
795
|
}
|
|
727
|
-
|
|
728
|
-
return this.http.
|
|
796
|
+
getContestVotes(slug) {
|
|
797
|
+
return this.http.request(CatalystEndpoint.getContestVotes(slug));
|
|
729
798
|
}
|
|
730
|
-
|
|
731
|
-
return this.http.request(
|
|
732
|
-
|
|
799
|
+
addContestVote(slug, status) {
|
|
800
|
+
return this.http.request(CatalystEndpoint.addContestVote(slug, status));
|
|
801
|
+
}
|
|
802
|
+
removeContestVote(slug, status) {
|
|
803
|
+
return this.http.request(CatalystEndpoint.removeContestVote(slug, status));
|
|
804
|
+
}
|
|
805
|
+
async getContestsByUser(userId) {
|
|
806
|
+
const response = await this.http.request(
|
|
807
|
+
CatalystEndpoint.getContestsByUser(userId)
|
|
733
808
|
);
|
|
809
|
+
return response.contests;
|
|
734
810
|
}
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
CatalystEndpoint.
|
|
811
|
+
async currentContests() {
|
|
812
|
+
const response = await this.http.request(
|
|
813
|
+
CatalystEndpoint.currentContests()
|
|
814
|
+
);
|
|
815
|
+
return response.contests;
|
|
816
|
+
}
|
|
817
|
+
async searchContests(q, state, id) {
|
|
818
|
+
const response = await this.http.request(
|
|
819
|
+
CatalystEndpoint.searchContests(q, state, id)
|
|
738
820
|
);
|
|
821
|
+
return response.contests;
|
|
739
822
|
}
|
|
740
|
-
//
|
|
823
|
+
// Custom reactions
|
|
741
824
|
customReactions() {
|
|
742
825
|
return this.http.request(CatalystEndpoint.customReactions());
|
|
743
826
|
}
|
|
744
|
-
|
|
745
|
-
return this.http.request(CatalystEndpoint.
|
|
827
|
+
getCustomUserReactions() {
|
|
828
|
+
return this.http.request(CatalystEndpoint.getCustomUserReactions());
|
|
746
829
|
}
|
|
830
|
+
/**
|
|
831
|
+
* Creates a custom reaction. `data` must include the `image`, `shortcode`, `displayName` and
|
|
832
|
+
* `visibility` ("private" | "followers" | "public") fields as multipart form fields.
|
|
833
|
+
*/
|
|
747
834
|
createCustomReaction(data) {
|
|
748
835
|
return this.http.request(CatalystEndpoint.createCustomReaction(data));
|
|
749
836
|
}
|
|
750
837
|
updateCustomReaction(id, data) {
|
|
751
|
-
return this.http.
|
|
838
|
+
return this.http.request(CatalystEndpoint.updateCustomReaction(id, data));
|
|
752
839
|
}
|
|
753
840
|
deleteCustomReaction(id) {
|
|
754
841
|
return this.http.requestVoid(CatalystEndpoint.deleteCustomReaction(id));
|
|
755
842
|
}
|
|
756
|
-
//
|
|
757
|
-
|
|
758
|
-
return this.http.
|
|
843
|
+
// Fleet
|
|
844
|
+
createFleet(data) {
|
|
845
|
+
return this.http.request(CatalystEndpoint.createFleet(data));
|
|
759
846
|
}
|
|
760
|
-
|
|
761
|
-
return this.http.
|
|
847
|
+
fleetByUsername(username) {
|
|
848
|
+
return this.http.request(CatalystEndpoint.fleetByUsername(username));
|
|
762
849
|
}
|
|
763
|
-
|
|
764
|
-
return this.http.request(CatalystEndpoint.
|
|
850
|
+
fleets() {
|
|
851
|
+
return this.http.request(CatalystEndpoint.fleets());
|
|
765
852
|
}
|
|
766
|
-
|
|
767
|
-
return this.http.
|
|
853
|
+
fleetById(id) {
|
|
854
|
+
return this.http.request(CatalystEndpoint.fleetById(id));
|
|
768
855
|
}
|
|
769
|
-
|
|
770
|
-
return this.http.
|
|
856
|
+
deleteFleet(id) {
|
|
857
|
+
return this.http.request(CatalystEndpoint.deleteFleet(id));
|
|
771
858
|
}
|
|
772
|
-
|
|
773
|
-
return this.http.request(CatalystEndpoint.
|
|
859
|
+
reactFleet(id, symbol) {
|
|
860
|
+
return this.http.request(CatalystEndpoint.reactFleet(id, symbol));
|
|
774
861
|
}
|
|
775
|
-
|
|
776
|
-
return this.http.request(CatalystEndpoint.
|
|
862
|
+
unreactFleet(id, symbol) {
|
|
863
|
+
return this.http.request(CatalystEndpoint.unreactFleet(id, symbol));
|
|
777
864
|
}
|
|
778
|
-
|
|
779
|
-
return this.http.request(CatalystEndpoint.
|
|
865
|
+
viewFleet(id) {
|
|
866
|
+
return this.http.request(CatalystEndpoint.viewFleet(id));
|
|
780
867
|
}
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
return this.http.request(CatalystEndpoint.createSmartAlbum(data));
|
|
868
|
+
fleetViewers(id) {
|
|
869
|
+
return this.http.request(CatalystEndpoint.fleetViewers(id));
|
|
784
870
|
}
|
|
785
|
-
|
|
786
|
-
|
|
871
|
+
// Privacy
|
|
872
|
+
getPrivacySettings() {
|
|
873
|
+
return this.http.request(CatalystEndpoint.getPrivacySettings());
|
|
787
874
|
}
|
|
788
|
-
|
|
789
|
-
return this.http.
|
|
875
|
+
updatePrivacySettings(data) {
|
|
876
|
+
return this.http.request(CatalystEndpoint.updatePrivacySettings(data));
|
|
790
877
|
}
|
|
791
|
-
|
|
792
|
-
|
|
878
|
+
// Profile tags
|
|
879
|
+
async updateProfileTags(data) {
|
|
880
|
+
const response = await this.http.request(
|
|
881
|
+
CatalystEndpoint.updateProfileTags(data)
|
|
882
|
+
);
|
|
883
|
+
return response.tags;
|
|
884
|
+
}
|
|
885
|
+
async profileTagSuggestions(q) {
|
|
886
|
+
const response = await this.http.request(
|
|
887
|
+
CatalystEndpoint.profileTagSuggestions(q)
|
|
888
|
+
);
|
|
889
|
+
return response.tags;
|
|
890
|
+
}
|
|
891
|
+
getUsersByProfileTag(name, cursor) {
|
|
892
|
+
return this.http.request(CatalystEndpoint.getUsersByProfileTag(name, cursor));
|
|
893
|
+
}
|
|
894
|
+
async getProfileTagsByUser(id) {
|
|
895
|
+
const response = await this.http.request(
|
|
896
|
+
CatalystEndpoint.getProfileTagsByUser(id)
|
|
897
|
+
);
|
|
898
|
+
return response.tags;
|
|
899
|
+
}
|
|
900
|
+
// Random
|
|
901
|
+
async randomStatus() {
|
|
902
|
+
const response = await this.http.request(
|
|
903
|
+
CatalystEndpoint.randomStatus()
|
|
904
|
+
);
|
|
905
|
+
return response.status;
|
|
906
|
+
}
|
|
907
|
+
randomStatusV1_1() {
|
|
908
|
+
return this.http.request(CatalystEndpoint.randomStatusV1_1());
|
|
793
909
|
}
|
|
794
|
-
|
|
795
|
-
return this.http.request(CatalystEndpoint.
|
|
910
|
+
onThisDay() {
|
|
911
|
+
return this.http.request(CatalystEndpoint.onThisDay());
|
|
796
912
|
}
|
|
797
|
-
//
|
|
913
|
+
// Status
|
|
798
914
|
createStatus(data) {
|
|
799
915
|
return this.http.request(CatalystEndpoint.createStatus(data));
|
|
800
916
|
}
|
|
801
|
-
getStatus(id) {
|
|
802
|
-
|
|
917
|
+
async getStatus(id) {
|
|
918
|
+
const response = await this.http.request(
|
|
919
|
+
CatalystEndpoint.getStatus(id)
|
|
920
|
+
);
|
|
921
|
+
return response.status;
|
|
803
922
|
}
|
|
804
|
-
|
|
805
|
-
|
|
923
|
+
async getStatusV1_1(id) {
|
|
924
|
+
const response = await this.http.request(
|
|
925
|
+
CatalystEndpoint.getStatusV1_1(id)
|
|
926
|
+
);
|
|
927
|
+
return response.status;
|
|
928
|
+
}
|
|
929
|
+
editStatus(id, description) {
|
|
930
|
+
return this.http.request(
|
|
931
|
+
CatalystEndpoint.editStatus(id, { description })
|
|
932
|
+
);
|
|
806
933
|
}
|
|
807
934
|
deleteStatus(id) {
|
|
808
|
-
return this.http.
|
|
935
|
+
return this.http.request(CatalystEndpoint.deleteStatus(id));
|
|
936
|
+
}
|
|
937
|
+
async albumsInStatus(id) {
|
|
938
|
+
const response = await this.http.request(
|
|
939
|
+
CatalystEndpoint.albumsInStatus(id)
|
|
940
|
+
);
|
|
941
|
+
return response.albums;
|
|
809
942
|
}
|
|
810
943
|
isFavorited(id) {
|
|
811
944
|
return this.http.request(CatalystEndpoint.isFavorited(id));
|
|
812
945
|
}
|
|
813
946
|
favorite(id) {
|
|
814
|
-
return this.http.
|
|
947
|
+
return this.http.request(CatalystEndpoint.favorite(id));
|
|
815
948
|
}
|
|
816
949
|
unfavorite(id) {
|
|
817
|
-
return this.http.
|
|
950
|
+
return this.http.request(CatalystEndpoint.unfavorite(id));
|
|
818
951
|
}
|
|
819
|
-
reactions(id) {
|
|
820
|
-
|
|
952
|
+
async reactions(id) {
|
|
953
|
+
const response = await this.http.request(
|
|
954
|
+
CatalystEndpoint.reactions(id)
|
|
955
|
+
);
|
|
956
|
+
return response.reactions;
|
|
821
957
|
}
|
|
822
|
-
|
|
823
|
-
return this.http.
|
|
958
|
+
reactWithCustomReaction(id, customReactionId) {
|
|
959
|
+
return this.http.requestVoid(
|
|
960
|
+
CatalystEndpoint.reactWithCustomReaction(id, customReactionId)
|
|
961
|
+
);
|
|
962
|
+
}
|
|
963
|
+
unreactWithCustomReaction(id, customReactionId) {
|
|
964
|
+
return this.http.requestVoid(
|
|
965
|
+
CatalystEndpoint.unreactWithCustomReaction(id, customReactionId)
|
|
966
|
+
);
|
|
824
967
|
}
|
|
825
968
|
react(id, symbol) {
|
|
826
|
-
return this.http.
|
|
969
|
+
return this.http.request(CatalystEndpoint.react(id, symbol));
|
|
827
970
|
}
|
|
828
971
|
unreact(id, symbol) {
|
|
829
|
-
return this.http.
|
|
830
|
-
}
|
|
831
|
-
// Timelines
|
|
832
|
-
contestTimeline(slug, opts = {}) {
|
|
833
|
-
return this.http.request(CatalystEndpoint.contestTimeline(slug, opts));
|
|
834
|
-
}
|
|
835
|
-
favoriteTimeline(opts = {}) {
|
|
836
|
-
return this.http.request(CatalystEndpoint.favoriteTimeline(opts));
|
|
837
|
-
}
|
|
838
|
-
firehoseTimeline(opts = {}) {
|
|
839
|
-
return this.http.request(CatalystEndpoint.firehoseTimeline(opts));
|
|
840
|
-
}
|
|
841
|
-
galleryTimeline(opts = {}) {
|
|
842
|
-
return this.http.request(CatalystEndpoint.galleryTimeline(opts));
|
|
843
|
-
}
|
|
844
|
-
homeTimeline(opts = {}) {
|
|
845
|
-
return this.http.request(CatalystEndpoint.homeTimeline(opts));
|
|
846
|
-
}
|
|
847
|
-
searchTimeline(opts = {}) {
|
|
848
|
-
return this.http.request(CatalystEndpoint.searchTimeline(opts));
|
|
849
|
-
}
|
|
850
|
-
userTimeline(username, opts = {}) {
|
|
851
|
-
return this.http.request(CatalystEndpoint.userTimeline(username, opts));
|
|
972
|
+
return this.http.request(CatalystEndpoint.unreact(id, symbol));
|
|
852
973
|
}
|
|
853
|
-
|
|
854
|
-
return this.http.request(
|
|
855
|
-
CatalystEndpoint.userGalleryTimeline(username, opts)
|
|
856
|
-
);
|
|
974
|
+
reportStatus(id, data) {
|
|
975
|
+
return this.http.request(CatalystEndpoint.reportStatus(id, data));
|
|
857
976
|
}
|
|
858
|
-
|
|
859
|
-
|
|
977
|
+
// Bulk status reactions
|
|
978
|
+
async bulkStatusReactions(ids) {
|
|
979
|
+
const response = await this.http.request(CatalystEndpoint.bulkStatusReactions(ids));
|
|
980
|
+
return response.reactions;
|
|
860
981
|
}
|
|
861
|
-
|
|
862
|
-
|
|
982
|
+
// Relationships
|
|
983
|
+
follow(userId) {
|
|
984
|
+
return this.http.request(CatalystEndpoint.follow(userId));
|
|
863
985
|
}
|
|
864
|
-
|
|
865
|
-
return this.http.request(CatalystEndpoint.
|
|
986
|
+
remove(userId) {
|
|
987
|
+
return this.http.request(CatalystEndpoint.remove(userId));
|
|
866
988
|
}
|
|
867
|
-
|
|
868
|
-
return this.http.
|
|
989
|
+
relationshipCounts(username) {
|
|
990
|
+
return this.http.request(CatalystEndpoint.relationshipCounts(username));
|
|
869
991
|
}
|
|
870
|
-
|
|
871
|
-
return this.http.
|
|
992
|
+
followers(username, opts) {
|
|
993
|
+
return this.http.request(CatalystEndpoint.followers(username, opts));
|
|
872
994
|
}
|
|
873
|
-
|
|
874
|
-
return this.http.request(CatalystEndpoint.
|
|
995
|
+
followings(username, opts) {
|
|
996
|
+
return this.http.request(CatalystEndpoint.followings(username, opts));
|
|
875
997
|
}
|
|
876
|
-
|
|
877
|
-
return this.http.
|
|
998
|
+
relationships(id) {
|
|
999
|
+
return this.http.request(CatalystEndpoint.relationships(id));
|
|
878
1000
|
}
|
|
879
|
-
|
|
880
|
-
|
|
1001
|
+
// Smart albums
|
|
1002
|
+
createSmartAlbum(data) {
|
|
1003
|
+
return this.http.request(CatalystEndpoint.createSmartAlbum(data));
|
|
881
1004
|
}
|
|
882
|
-
|
|
883
|
-
return this.http.request(CatalystEndpoint.
|
|
1005
|
+
getSmartAlbum(id, opts = {}) {
|
|
1006
|
+
return this.http.request(CatalystEndpoint.getSmartAlbum(id, opts));
|
|
884
1007
|
}
|
|
885
|
-
|
|
886
|
-
return this.http.request(CatalystEndpoint.
|
|
1008
|
+
editSmartAlbum(id, data) {
|
|
1009
|
+
return this.http.request(CatalystEndpoint.editSmartAlbum(id, data));
|
|
887
1010
|
}
|
|
888
|
-
|
|
889
|
-
return this.http.request(CatalystEndpoint.
|
|
1011
|
+
deleteSmartAlbum(id) {
|
|
1012
|
+
return this.http.request(CatalystEndpoint.deleteSmartAlbum(id));
|
|
890
1013
|
}
|
|
891
|
-
|
|
892
|
-
return this.http.request(CatalystEndpoint.
|
|
1014
|
+
getSmartAlbumBooks(id) {
|
|
1015
|
+
return this.http.request(CatalystEndpoint.getSmartAlbumBooks(id));
|
|
893
1016
|
}
|
|
894
|
-
|
|
895
|
-
return this.http.request(CatalystEndpoint.
|
|
1017
|
+
createSmartAlbumBook(id, data) {
|
|
1018
|
+
return this.http.request(CatalystEndpoint.createSmartAlbumBook(id, data));
|
|
896
1019
|
}
|
|
897
|
-
|
|
898
|
-
return this.http.
|
|
1020
|
+
getSmartAlbumBook(id, bookId) {
|
|
1021
|
+
return this.http.request(CatalystEndpoint.getSmartAlbumBook(id, bookId));
|
|
899
1022
|
}
|
|
900
|
-
|
|
901
|
-
return this.http.request(CatalystEndpoint.
|
|
1023
|
+
regenerateSmartAlbumBook(id, bookId) {
|
|
1024
|
+
return this.http.request(CatalystEndpoint.regenerateSmartAlbumBook(id, bookId));
|
|
902
1025
|
}
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
CatalystEndpoint.
|
|
1026
|
+
async listSmartAlbumsByUser(userId) {
|
|
1027
|
+
const response = await this.http.request(
|
|
1028
|
+
CatalystEndpoint.listSmartAlbumsByUser(userId)
|
|
906
1029
|
);
|
|
1030
|
+
return response.albums;
|
|
907
1031
|
}
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
CatalystEndpoint.
|
|
1032
|
+
async searchSmartAlbums(q) {
|
|
1033
|
+
const response = await this.http.request(
|
|
1034
|
+
CatalystEndpoint.searchSmartAlbums(q)
|
|
911
1035
|
);
|
|
1036
|
+
return response.albums;
|
|
912
1037
|
}
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
return this.http.requestVoid(
|
|
918
|
-
CatalystEndpoint.addContestCollaborator(slug, data)
|
|
1038
|
+
// Timelines
|
|
1039
|
+
async archiveTimeline(opts) {
|
|
1040
|
+
const response = await this.http.request(
|
|
1041
|
+
CatalystEndpoint.archiveTimeline(opts)
|
|
919
1042
|
);
|
|
1043
|
+
return response.statuses;
|
|
920
1044
|
}
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
CatalystEndpoint.
|
|
1045
|
+
async archiveMonths() {
|
|
1046
|
+
const response = await this.http.request(
|
|
1047
|
+
CatalystEndpoint.archiveMonths()
|
|
924
1048
|
);
|
|
1049
|
+
return response.months;
|
|
925
1050
|
}
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
getAccessPermissionOfContest(slug) {
|
|
930
|
-
return this.http.request(
|
|
931
|
-
CatalystEndpoint.getAccessPermissionOfContest(slug)
|
|
1051
|
+
async timelineByContestSlug(slug, opts = {}) {
|
|
1052
|
+
const response = await this.http.request(
|
|
1053
|
+
CatalystEndpoint.timelineByContestSlug(slug, opts)
|
|
932
1054
|
);
|
|
1055
|
+
return response.statuses;
|
|
933
1056
|
}
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
addContestVoteToStatus(slug, id) {
|
|
938
|
-
return this.http.requestVoid(
|
|
939
|
-
CatalystEndpoint.addContestVoteToStatus(slug, id)
|
|
1057
|
+
async favoriteTimeline(opts = {}) {
|
|
1058
|
+
const response = await this.http.request(
|
|
1059
|
+
CatalystEndpoint.favoriteTimeline(opts)
|
|
940
1060
|
);
|
|
1061
|
+
return response.statuses;
|
|
941
1062
|
}
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
CatalystEndpoint.
|
|
1063
|
+
async firehoseTimelineV1(opts = {}) {
|
|
1064
|
+
const response = await this.http.request(
|
|
1065
|
+
CatalystEndpoint.firehoseTimelineV1(opts)
|
|
945
1066
|
);
|
|
1067
|
+
return response.statuses;
|
|
946
1068
|
}
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
searchContest(state, q) {
|
|
951
|
-
return this.http.request(CatalystEndpoint.searchContest(state, q));
|
|
952
|
-
}
|
|
953
|
-
// report
|
|
954
|
-
reportStatus(id, data) {
|
|
955
|
-
return this.http.requestVoid(CatalystEndpoint.reportStatus(id, data));
|
|
956
|
-
}
|
|
957
|
-
// privacy
|
|
958
|
-
getPrivacySettings() {
|
|
959
|
-
return this.http.request(CatalystEndpoint.getPrivacySettings());
|
|
960
|
-
}
|
|
961
|
-
updatePrivacySettings(data) {
|
|
962
|
-
return this.http.request(CatalystEndpoint.updatePrivacySettings(data));
|
|
963
|
-
}
|
|
964
|
-
// announcements
|
|
965
|
-
announcements() {
|
|
966
|
-
return this.http.request(CatalystEndpoint.announcements());
|
|
967
|
-
}
|
|
968
|
-
// profile tags
|
|
969
|
-
updateProfileTags(data) {
|
|
970
|
-
return this.http.request(CatalystEndpoint.updateProfileTags(data));
|
|
971
|
-
}
|
|
972
|
-
profileTagSuggestions(q) {
|
|
973
|
-
return this.http.request(CatalystEndpoint.profileTagSuggestions(q));
|
|
974
|
-
}
|
|
975
|
-
getUsersByProfileTag(name, cursor) {
|
|
976
|
-
return this.http.request(
|
|
977
|
-
CatalystEndpoint.getUsersByProfileTag(name, cursor)
|
|
1069
|
+
async galleryTimeline(opts = {}) {
|
|
1070
|
+
const response = await this.http.request(
|
|
1071
|
+
CatalystEndpoint.galleryTimeline(opts)
|
|
978
1072
|
);
|
|
1073
|
+
return response.statuses;
|
|
979
1074
|
}
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
return this.http.request(CatalystEndpoint.randomStatus());
|
|
986
|
-
}
|
|
987
|
-
randomStatusByHashtag(q) {
|
|
988
|
-
return this.http.request(CatalystEndpoint.randomStatusByHashtag(q));
|
|
989
|
-
}
|
|
990
|
-
// bulk reactions
|
|
991
|
-
bulkStatusReactions(ids) {
|
|
992
|
-
return this.http.request(CatalystEndpoint.bulkStatusReactions(ids));
|
|
1075
|
+
async homeTimelineV1() {
|
|
1076
|
+
const response = await this.http.request(
|
|
1077
|
+
CatalystEndpoint.homeTimelineV1()
|
|
1078
|
+
);
|
|
1079
|
+
return response.statuses;
|
|
993
1080
|
}
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
1081
|
+
async searchTimeline(opts = {}) {
|
|
1082
|
+
const response = await this.http.request(
|
|
1083
|
+
CatalystEndpoint.searchTimeline(opts)
|
|
1084
|
+
);
|
|
1085
|
+
return response.statuses;
|
|
997
1086
|
}
|
|
998
|
-
|
|
999
|
-
|
|
1087
|
+
async userTimeline(username, opts = {}) {
|
|
1088
|
+
const response = await this.http.request(
|
|
1089
|
+
CatalystEndpoint.userTimeline(username, opts)
|
|
1090
|
+
);
|
|
1091
|
+
return response.statuses;
|
|
1000
1092
|
}
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1093
|
+
async userGalleryTimeline(username, opts = {}) {
|
|
1094
|
+
const response = await this.http.request(
|
|
1095
|
+
CatalystEndpoint.userGalleryTimeline(username, opts)
|
|
1096
|
+
);
|
|
1097
|
+
return response.statuses;
|
|
1004
1098
|
}
|
|
1005
|
-
|
|
1006
|
-
return this.http.request(CatalystEndpoint.
|
|
1099
|
+
firehoseTimeline(opts = {}) {
|
|
1100
|
+
return this.http.request(CatalystEndpoint.firehoseTimeline(opts));
|
|
1007
1101
|
}
|
|
1008
|
-
|
|
1009
|
-
return this.http.request(CatalystEndpoint.
|
|
1102
|
+
homeTimeline(opts = {}) {
|
|
1103
|
+
return this.http.request(CatalystEndpoint.homeTimeline(opts));
|
|
1010
1104
|
}
|
|
1011
|
-
//
|
|
1012
|
-
|
|
1013
|
-
return this.http.request(CatalystEndpoint.
|
|
1105
|
+
// Trend
|
|
1106
|
+
trend() {
|
|
1107
|
+
return this.http.request(CatalystEndpoint.trend());
|
|
1014
1108
|
}
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
return this.http.request(CatalystEndpoint.listSmartAlbumsByUser(username));
|
|
1109
|
+
richTrend() {
|
|
1110
|
+
return this.http.request(CatalystEndpoint.richTrend());
|
|
1018
1111
|
}
|
|
1019
1112
|
};
|
|
1020
1113
|
|
|
@@ -1059,14 +1152,145 @@ var EgeriaClient = class {
|
|
|
1059
1152
|
}
|
|
1060
1153
|
};
|
|
1061
1154
|
|
|
1155
|
+
// src/endpoints/epicleseEndpoint.ts
|
|
1156
|
+
var EpicleseEndpoint = {
|
|
1157
|
+
getAuthors(q, platform) {
|
|
1158
|
+
const params = {};
|
|
1159
|
+
if (q != null) params["q"] = q;
|
|
1160
|
+
if (platform != null) params["platform"] = platform;
|
|
1161
|
+
return {
|
|
1162
|
+
path: "/epiclese/v1/authors",
|
|
1163
|
+
method: "GET",
|
|
1164
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
1165
|
+
};
|
|
1166
|
+
},
|
|
1167
|
+
createAuthor(data) {
|
|
1168
|
+
return { path: "/epiclese/v1/authors", method: "POST", body: data };
|
|
1169
|
+
},
|
|
1170
|
+
getPlatforms() {
|
|
1171
|
+
return { path: "/epiclese/v1/platforms", method: "GET" };
|
|
1172
|
+
},
|
|
1173
|
+
getPlatform(id) {
|
|
1174
|
+
return { path: `/epiclese/v1/platforms/${id}`, method: "GET" };
|
|
1175
|
+
},
|
|
1176
|
+
getStatusMetadata(statusId) {
|
|
1177
|
+
return { path: `/epiclese/v1/tag/by/status/${statusId}`, method: "GET" };
|
|
1178
|
+
},
|
|
1179
|
+
createStatusMetadata(statusId, data) {
|
|
1180
|
+
return {
|
|
1181
|
+
path: `/epiclese/v1/tag/by/status/${statusId}`,
|
|
1182
|
+
method: "POST",
|
|
1183
|
+
body: data
|
|
1184
|
+
};
|
|
1185
|
+
},
|
|
1186
|
+
getWorlds(q, platform, offset) {
|
|
1187
|
+
const params = {};
|
|
1188
|
+
if (q != null) params["q"] = q;
|
|
1189
|
+
if (platform != null) params["platform"] = platform;
|
|
1190
|
+
if (offset != null) params["offset"] = String(offset);
|
|
1191
|
+
return {
|
|
1192
|
+
path: "/epiclese/v1/worlds",
|
|
1193
|
+
method: "GET",
|
|
1194
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
1195
|
+
};
|
|
1196
|
+
},
|
|
1197
|
+
createWorld(data) {
|
|
1198
|
+
return { path: "/epiclese/v1/worlds", method: "POST", body: data };
|
|
1199
|
+
},
|
|
1200
|
+
resolveWorld(platform, name) {
|
|
1201
|
+
return {
|
|
1202
|
+
path: "/epiclese/v1/worlds/resolve",
|
|
1203
|
+
method: "GET",
|
|
1204
|
+
queryParameters: { platform, name }
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1207
|
+
};
|
|
1208
|
+
|
|
1209
|
+
// src/clients/epicleseClient.ts
|
|
1210
|
+
var EpicleseClient = class {
|
|
1211
|
+
constructor(http) {
|
|
1212
|
+
this.http = http;
|
|
1213
|
+
}
|
|
1214
|
+
getAuthors(q, platform) {
|
|
1215
|
+
return this.http.request(EpicleseEndpoint.getAuthors(q, platform));
|
|
1216
|
+
}
|
|
1217
|
+
async createAuthor(data) {
|
|
1218
|
+
const response = await this.http.request(
|
|
1219
|
+
EpicleseEndpoint.createAuthor(data)
|
|
1220
|
+
);
|
|
1221
|
+
return response.author;
|
|
1222
|
+
}
|
|
1223
|
+
async getPlatforms() {
|
|
1224
|
+
const response = await this.http.request(
|
|
1225
|
+
EpicleseEndpoint.getPlatforms()
|
|
1226
|
+
);
|
|
1227
|
+
return response.platforms;
|
|
1228
|
+
}
|
|
1229
|
+
async getPlatform(id) {
|
|
1230
|
+
const response = await this.http.request(
|
|
1231
|
+
EpicleseEndpoint.getPlatform(id)
|
|
1232
|
+
);
|
|
1233
|
+
return response.platform;
|
|
1234
|
+
}
|
|
1235
|
+
getStatusMetadata(statusId) {
|
|
1236
|
+
return this.http.request(EpicleseEndpoint.getStatusMetadata(statusId));
|
|
1237
|
+
}
|
|
1238
|
+
createStatusMetadata(statusId, tags) {
|
|
1239
|
+
return this.http.request(
|
|
1240
|
+
EpicleseEndpoint.createStatusMetadata(statusId, tags)
|
|
1241
|
+
);
|
|
1242
|
+
}
|
|
1243
|
+
async getWorlds(q, platform, offset) {
|
|
1244
|
+
const response = await this.http.request(
|
|
1245
|
+
EpicleseEndpoint.getWorlds(q, platform, offset)
|
|
1246
|
+
);
|
|
1247
|
+
return response.items;
|
|
1248
|
+
}
|
|
1249
|
+
async createWorld(data) {
|
|
1250
|
+
const response = await this.http.request(
|
|
1251
|
+
EpicleseEndpoint.createWorld(data)
|
|
1252
|
+
);
|
|
1253
|
+
return response.world;
|
|
1254
|
+
}
|
|
1255
|
+
async resolveWorld(platform, name) {
|
|
1256
|
+
const response = await this.http.request(
|
|
1257
|
+
EpicleseEndpoint.resolveWorld(platform, name)
|
|
1258
|
+
);
|
|
1259
|
+
return response.world;
|
|
1260
|
+
}
|
|
1261
|
+
};
|
|
1262
|
+
|
|
1263
|
+
// src/endpoints/featureFlagsEndpoint.ts
|
|
1264
|
+
var FeatureFlagsEndpoint = {
|
|
1265
|
+
me() {
|
|
1266
|
+
return { path: "/feature-flags/v1/me", method: "GET" };
|
|
1267
|
+
}
|
|
1268
|
+
};
|
|
1269
|
+
|
|
1270
|
+
// src/clients/featureFlagsClient.ts
|
|
1271
|
+
var FeatureFlagsClient = class {
|
|
1272
|
+
constructor(http) {
|
|
1273
|
+
this.http = http;
|
|
1274
|
+
}
|
|
1275
|
+
/** Gets the feature flags enabled for the current user. */
|
|
1276
|
+
async me() {
|
|
1277
|
+
const response = await this.http.request(
|
|
1278
|
+
FeatureFlagsEndpoint.me()
|
|
1279
|
+
);
|
|
1280
|
+
return response.flags;
|
|
1281
|
+
}
|
|
1282
|
+
};
|
|
1283
|
+
|
|
1062
1284
|
// src/endpoints/mediaEndpoint.ts
|
|
1063
1285
|
var MediaEndpoint = {
|
|
1064
|
-
|
|
1065
|
-
|
|
1286
|
+
/** Gets a signed URL for uploading media (v1). */
|
|
1287
|
+
uploadV1() {
|
|
1288
|
+
return { path: "/media/v1/upload", method: "POST" };
|
|
1066
1289
|
},
|
|
1067
1290
|
delete(data) {
|
|
1068
1291
|
return { path: "/media/v1/upload", method: "DELETE", body: data };
|
|
1069
1292
|
},
|
|
1293
|
+
/** Gets a signed URL for uploading media (v2). */
|
|
1070
1294
|
upload() {
|
|
1071
1295
|
return { path: "/media/v2/upload", method: "POST" };
|
|
1072
1296
|
}
|
|
@@ -1077,12 +1301,15 @@ var MediaClient = class {
|
|
|
1077
1301
|
constructor(http) {
|
|
1078
1302
|
this.http = http;
|
|
1079
1303
|
}
|
|
1080
|
-
|
|
1081
|
-
|
|
1304
|
+
/** Gets a signed URL for uploading media (v1). */
|
|
1305
|
+
uploadV1() {
|
|
1306
|
+
return this.http.request(MediaEndpoint.uploadV1());
|
|
1082
1307
|
}
|
|
1083
|
-
|
|
1084
|
-
|
|
1308
|
+
/** Deletes media by URL. */
|
|
1309
|
+
delete(url) {
|
|
1310
|
+
return this.http.request(MediaEndpoint.delete({ url }));
|
|
1085
1311
|
}
|
|
1312
|
+
/** Gets a signed URL for uploading media (v2). */
|
|
1086
1313
|
upload() {
|
|
1087
1314
|
return this.http.request(MediaEndpoint.upload());
|
|
1088
1315
|
}
|
|
@@ -1091,10 +1318,15 @@ var MediaClient = class {
|
|
|
1091
1318
|
// src/endpoints/steambirdEndpoint.ts
|
|
1092
1319
|
var SteambirdEndpoint = {
|
|
1093
1320
|
notifications(issuer, opts = {}) {
|
|
1094
|
-
const params = {
|
|
1321
|
+
const params = {};
|
|
1322
|
+
if (issuer != null) params["issuer"] = issuer;
|
|
1095
1323
|
if (opts.since != null) params["since"] = opts.since;
|
|
1096
1324
|
if (opts.until != null) params["until"] = opts.until;
|
|
1097
|
-
return {
|
|
1325
|
+
return {
|
|
1326
|
+
path: "/steambird/v1/notifications",
|
|
1327
|
+
method: "GET",
|
|
1328
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
1329
|
+
};
|
|
1098
1330
|
},
|
|
1099
1331
|
read(id) {
|
|
1100
1332
|
return { path: `/steambird/v1/notifications/${id}`, method: "POST" };
|
|
@@ -1106,11 +1338,14 @@ var SteambirdEndpoint = {
|
|
|
1106
1338
|
queryParameters: issuer != null ? { issuer } : void 0
|
|
1107
1339
|
};
|
|
1108
1340
|
},
|
|
1109
|
-
unreads(issuers = []) {
|
|
1341
|
+
unreads(issuer, issuers = []) {
|
|
1342
|
+
const params = {};
|
|
1343
|
+
if (issuer != null) params["issuer"] = issuer;
|
|
1344
|
+
if (issuers.length > 0) params["issuers"] = issuers.join(",");
|
|
1110
1345
|
return {
|
|
1111
1346
|
path: "/steambird/v1/notifications/unread",
|
|
1112
1347
|
method: "GET",
|
|
1113
|
-
queryParameters:
|
|
1348
|
+
queryParameters: Object.keys(params).length > 0 ? params : void 0
|
|
1114
1349
|
};
|
|
1115
1350
|
}
|
|
1116
1351
|
};
|
|
@@ -1126,17 +1361,21 @@ var SteambirdClient = class {
|
|
|
1126
1361
|
ISSUER_CATALYST_SYSTEM_MESSAGE = ISSUER_CATALYST_SYSTEM_MESSAGE;
|
|
1127
1362
|
ISSUER_CATALYST_USER_MESSAGE = ISSUER_CATALYST_USER_MESSAGE;
|
|
1128
1363
|
ISSUER_EGERIA_SYSTEM_MESSAGE = ISSUER_EGERIA_SYSTEM_MESSAGE;
|
|
1129
|
-
notifications
|
|
1130
|
-
|
|
1364
|
+
/** Gets notifications for a specific issuer, or all issuers if omitted. */
|
|
1365
|
+
async notifications(issuer, opts = {}) {
|
|
1366
|
+
const response = await this.http.request(
|
|
1367
|
+
SteambirdEndpoint.notifications(issuer, opts)
|
|
1368
|
+
);
|
|
1369
|
+
return response.notifications;
|
|
1131
1370
|
}
|
|
1132
1371
|
read(id) {
|
|
1133
|
-
return this.http.
|
|
1372
|
+
return this.http.request(SteambirdEndpoint.read(id));
|
|
1134
1373
|
}
|
|
1135
1374
|
readAll(issuer) {
|
|
1136
|
-
return this.http.
|
|
1375
|
+
return this.http.request(SteambirdEndpoint.readAll(issuer));
|
|
1137
1376
|
}
|
|
1138
|
-
unreads(issuers = []) {
|
|
1139
|
-
return this.http.request(SteambirdEndpoint.unreads(issuers));
|
|
1377
|
+
unreads(issuer, issuers = []) {
|
|
1378
|
+
return this.http.request(SteambirdEndpoint.unreads(issuer, issuers));
|
|
1140
1379
|
}
|
|
1141
1380
|
};
|
|
1142
1381
|
|
|
@@ -1264,7 +1503,10 @@ var OAuth = class {
|
|
|
1264
1503
|
return {
|
|
1265
1504
|
accessToken: json["access_token"],
|
|
1266
1505
|
refreshToken: json["refresh_token"],
|
|
1267
|
-
tokenType: json["token_type"]
|
|
1506
|
+
tokenType: json["token_type"],
|
|
1507
|
+
scope: json["scope"],
|
|
1508
|
+
expiresAt: json["expires_at"],
|
|
1509
|
+
expiresIn: json["expires_in"]
|
|
1268
1510
|
};
|
|
1269
1511
|
}
|
|
1270
1512
|
};
|
|
@@ -1320,6 +1562,12 @@ var CatalystTS = class {
|
|
|
1320
1562
|
get steambird() {
|
|
1321
1563
|
return new SteambirdClient(this.http);
|
|
1322
1564
|
}
|
|
1565
|
+
get epiclese() {
|
|
1566
|
+
return new EpicleseClient(this.http);
|
|
1567
|
+
}
|
|
1568
|
+
get featureFlags() {
|
|
1569
|
+
return new FeatureFlagsClient(this.http);
|
|
1570
|
+
}
|
|
1323
1571
|
};
|
|
1324
1572
|
|
|
1325
1573
|
// src/interceptors/loggingInterceptor.ts
|
|
@@ -1373,6 +1621,10 @@ var PKCE = class _PKCE {
|
|
|
1373
1621
|
CatalystTS,
|
|
1374
1622
|
EgeriaClient,
|
|
1375
1623
|
EgeriaEndpoint,
|
|
1624
|
+
EpicleseClient,
|
|
1625
|
+
EpicleseEndpoint,
|
|
1626
|
+
FeatureFlagsClient,
|
|
1627
|
+
FeatureFlagsEndpoint,
|
|
1376
1628
|
HttpClient,
|
|
1377
1629
|
ISSUER_CATALYST_SYSTEM_MESSAGE,
|
|
1378
1630
|
ISSUER_CATALYST_USER_MESSAGE,
|