@natsuneko-laboratory/catalyst-sdk 0.5.6 → 0.7.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/dist/index.d.mts +154 -4
- package/dist/index.d.ts +154 -4
- package/dist/index.js +178 -0
- package/dist/index.mjs +178 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -193,10 +193,31 @@ interface CatalystReaction {
|
|
|
193
193
|
interface CatalystReactions {
|
|
194
194
|
reactions: Record<string, CatalystReaction>;
|
|
195
195
|
}
|
|
196
|
+
type CatalystCustomReactionStatus = "active" | "moderated" | "hidden" | "disabled";
|
|
197
|
+
type SupporterTier = "none" | "tier_0" | "tier_1" | "tier_2" | "tier_3" | "tier_4" | "tier_5";
|
|
196
198
|
interface CatalystCustomReaction {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
199
|
+
id: string;
|
|
200
|
+
shortcode: string;
|
|
201
|
+
displayName: string;
|
|
202
|
+
imageUrl: string;
|
|
203
|
+
mimeType: string;
|
|
204
|
+
sortOrder: number;
|
|
205
|
+
status: CatalystCustomReactionStatus;
|
|
206
|
+
createdAt: string;
|
|
207
|
+
}
|
|
208
|
+
interface CatalystCustomReactionList {
|
|
209
|
+
plan: SupporterTier;
|
|
210
|
+
limit: number;
|
|
211
|
+
used: number;
|
|
212
|
+
items: CatalystCustomReaction[];
|
|
213
|
+
}
|
|
214
|
+
interface CreateCustomReactionRequest {
|
|
215
|
+
shortcode: string;
|
|
216
|
+
displayName: string;
|
|
217
|
+
}
|
|
218
|
+
interface UpdateCustomReactionRequest {
|
|
219
|
+
displayName?: string;
|
|
220
|
+
sortOrder?: number;
|
|
200
221
|
}
|
|
201
222
|
|
|
202
223
|
interface CatalystRelationships {
|
|
@@ -424,6 +445,33 @@ interface CatalystPrivacySettings {
|
|
|
424
445
|
followerListVisibility: "public" | "private";
|
|
425
446
|
}
|
|
426
447
|
|
|
448
|
+
interface CatalystAnnouncement {
|
|
449
|
+
id: string;
|
|
450
|
+
title: string;
|
|
451
|
+
body: string;
|
|
452
|
+
category: string;
|
|
453
|
+
since: string;
|
|
454
|
+
until: string;
|
|
455
|
+
url: string | null;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
interface ProfileTag {
|
|
459
|
+
id: string;
|
|
460
|
+
name: string;
|
|
461
|
+
normalizedName: string;
|
|
462
|
+
}
|
|
463
|
+
interface ProfileTagSuggestion {
|
|
464
|
+
id: string;
|
|
465
|
+
name: string;
|
|
466
|
+
usageCount: number;
|
|
467
|
+
}
|
|
468
|
+
interface ProfileTagUser extends EgeriaUser {
|
|
469
|
+
matchedTags: string[];
|
|
470
|
+
}
|
|
471
|
+
interface UpdateProfileTagsRequest {
|
|
472
|
+
tags: string[];
|
|
473
|
+
}
|
|
474
|
+
|
|
427
475
|
declare class CatalystClient {
|
|
428
476
|
private readonly http;
|
|
429
477
|
constructor(http: HttpClient);
|
|
@@ -439,6 +487,10 @@ declare class CatalystClient {
|
|
|
439
487
|
listAlbums(username: string, includeSmartAlbums?: boolean): Promise<CatalystSmartAlbums>;
|
|
440
488
|
searchAlbums(q: string, includeSmartAlbums?: boolean): Promise<CatalystSmartAlbums>;
|
|
441
489
|
customReactions(): Promise<CatalystCustomReaction[]>;
|
|
490
|
+
customUserReactions(): Promise<CatalystCustomReactionList>;
|
|
491
|
+
createCustomReaction(data: CreateCustomReactionRequest): Promise<CatalystCustomReaction>;
|
|
492
|
+
updateCustomReaction(id: string, data: UpdateCustomReactionRequest): Promise<void>;
|
|
493
|
+
deleteCustomReaction(id: string): Promise<void>;
|
|
442
494
|
block(data: CatalystRelationshipRequest): Promise<void>;
|
|
443
495
|
unblock(data: CatalystRelationshipRequest): Promise<void>;
|
|
444
496
|
relationships(id: string): Promise<CatalystRelationships>;
|
|
@@ -575,6 +627,69 @@ declare class CatalystClient {
|
|
|
575
627
|
reportStatus(id: string, data: ReportRequest): Promise<void>;
|
|
576
628
|
getPrivacySettings(): Promise<CatalystPrivacySettings>;
|
|
577
629
|
updatePrivacySettings(data: CatalystPrivacySettingsRequest): Promise<CatalystPrivacySettings>;
|
|
630
|
+
announcements(): Promise<{
|
|
631
|
+
announcements: CatalystAnnouncement[];
|
|
632
|
+
}>;
|
|
633
|
+
updateProfileTags(data: UpdateProfileTagsRequest): Promise<{
|
|
634
|
+
tags: ProfileTag[];
|
|
635
|
+
}>;
|
|
636
|
+
profileTagSuggestions(q: string): Promise<{
|
|
637
|
+
tags: ProfileTagSuggestion[];
|
|
638
|
+
}>;
|
|
639
|
+
getUsersByProfileTag(name: string, cursor?: string): Promise<{
|
|
640
|
+
items: ProfileTagUser[];
|
|
641
|
+
cursor: string | null;
|
|
642
|
+
}>;
|
|
643
|
+
getProfileTagsByUser(id: string): Promise<{
|
|
644
|
+
tags: ProfileTag[];
|
|
645
|
+
}>;
|
|
646
|
+
randomStatus(): Promise<{
|
|
647
|
+
status: CatalystStatus | null;
|
|
648
|
+
}>;
|
|
649
|
+
randomStatusByHashtag(q: string): Promise<{
|
|
650
|
+
status: CatalystStatus | null;
|
|
651
|
+
}>;
|
|
652
|
+
bulkStatusReactions(ids: string[]): Promise<{
|
|
653
|
+
reactions: Record<string, CatalystReactions>;
|
|
654
|
+
}>;
|
|
655
|
+
archiveTimeline(opts: {
|
|
656
|
+
year: number;
|
|
657
|
+
month: number;
|
|
658
|
+
day?: number;
|
|
659
|
+
since?: string;
|
|
660
|
+
until?: string;
|
|
661
|
+
userId?: string;
|
|
662
|
+
limit?: number;
|
|
663
|
+
trimUser?: boolean;
|
|
664
|
+
excludeSensitive?: boolean;
|
|
665
|
+
}): Promise<{
|
|
666
|
+
statuses: CatalystStatus[];
|
|
667
|
+
}>;
|
|
668
|
+
archiveMonths(): Promise<{
|
|
669
|
+
months: {
|
|
670
|
+
year: number;
|
|
671
|
+
month: number;
|
|
672
|
+
count: number;
|
|
673
|
+
}[];
|
|
674
|
+
}>;
|
|
675
|
+
currentContests(): Promise<{
|
|
676
|
+
contests: CatalystContest[];
|
|
677
|
+
}>;
|
|
678
|
+
getContestsByUser(username: string): Promise<{
|
|
679
|
+
contests: CatalystContest[];
|
|
680
|
+
}>;
|
|
681
|
+
getContestPolls(slug: string): Promise<{
|
|
682
|
+
polls: {
|
|
683
|
+
status: CatalystStatus;
|
|
684
|
+
count: number;
|
|
685
|
+
}[];
|
|
686
|
+
}>;
|
|
687
|
+
getAlbumsByMe(includeSmartAlbums?: boolean): Promise<{
|
|
688
|
+
albums: CatalystAlbum[];
|
|
689
|
+
}>;
|
|
690
|
+
listSmartAlbumsByUser(username: string): Promise<{
|
|
691
|
+
albums: CatalystSmartAlbum[];
|
|
692
|
+
}>;
|
|
578
693
|
}
|
|
579
694
|
|
|
580
695
|
declare class EgeriaClient {
|
|
@@ -595,11 +710,18 @@ declare class MediaClient {
|
|
|
595
710
|
upload(): Promise<MediaUploadUrls>;
|
|
596
711
|
}
|
|
597
712
|
|
|
713
|
+
interface NotificationAdditionalContext {
|
|
714
|
+
type: "custom-reaction";
|
|
715
|
+
url: string;
|
|
716
|
+
format: string;
|
|
717
|
+
}
|
|
598
718
|
interface NotificationGroup {
|
|
599
719
|
id: string;
|
|
600
720
|
body: string;
|
|
601
721
|
occurredBy: EgeriaUser;
|
|
602
722
|
isRead: boolean;
|
|
723
|
+
createdAt: string;
|
|
724
|
+
additionalContexts?: NotificationAdditionalContext | null;
|
|
603
725
|
}
|
|
604
726
|
interface Notification {
|
|
605
727
|
id: string;
|
|
@@ -733,6 +855,10 @@ declare const CatalystEndpoint: {
|
|
|
733
855
|
readonly listAlbums: (username: string, includeSmartAlbums?: boolean) => Endpoint;
|
|
734
856
|
readonly searchAlbum: (q: string, includeSmartAlbums?: boolean) => Endpoint;
|
|
735
857
|
readonly customReactions: () => Endpoint;
|
|
858
|
+
readonly customUserReactions: () => Endpoint;
|
|
859
|
+
readonly createCustomReaction: (data: CreateCustomReactionRequest) => Endpoint;
|
|
860
|
+
readonly updateCustomReaction: (id: string, data: UpdateCustomReactionRequest) => Endpoint;
|
|
861
|
+
readonly deleteCustomReaction: (id: string) => Endpoint;
|
|
736
862
|
readonly block: (data: CatalystRelationshipRequest) => Endpoint;
|
|
737
863
|
readonly unblock: (data: CatalystRelationshipRequest) => Endpoint;
|
|
738
864
|
readonly relationships: (id: string) => Endpoint;
|
|
@@ -831,6 +957,30 @@ declare const CatalystEndpoint: {
|
|
|
831
957
|
readonly reportStatus: (id: string, data: ReportRequest) => Endpoint;
|
|
832
958
|
readonly getPrivacySettings: () => Endpoint;
|
|
833
959
|
readonly updatePrivacySettings: (data: CatalystPrivacySettingsRequest) => Endpoint;
|
|
960
|
+
readonly announcements: () => Endpoint;
|
|
961
|
+
readonly updateProfileTags: (data: UpdateProfileTagsRequest) => Endpoint;
|
|
962
|
+
readonly profileTagSuggestions: (q: string) => Endpoint;
|
|
963
|
+
readonly getUsersByProfileTag: (name: string, cursor?: string) => Endpoint;
|
|
964
|
+
readonly getProfileTagsByUser: (id: string) => Endpoint;
|
|
965
|
+
readonly randomStatus: () => Endpoint;
|
|
966
|
+
readonly randomStatusByHashtag: (q: string) => Endpoint;
|
|
967
|
+
readonly bulkStatusReactions: (ids: string[]) => Endpoint;
|
|
968
|
+
readonly archiveTimeline: (opts: {
|
|
969
|
+
year: number;
|
|
970
|
+
month: number;
|
|
971
|
+
day?: number;
|
|
972
|
+
since?: string;
|
|
973
|
+
until?: string;
|
|
974
|
+
userId?: string;
|
|
975
|
+
limit?: number;
|
|
976
|
+
trimUser?: boolean;
|
|
977
|
+
excludeSensitive?: boolean;
|
|
978
|
+
}) => Endpoint;
|
|
979
|
+
readonly archiveMonths: () => Endpoint;
|
|
980
|
+
readonly currentContests: () => Endpoint;
|
|
981
|
+
readonly getContestsByUser: (username: string) => Endpoint;
|
|
982
|
+
readonly getAlbumsByMe: (includeSmartAlbums?: boolean) => Endpoint;
|
|
983
|
+
readonly listSmartAlbumsByUser: (username: string) => Endpoint;
|
|
834
984
|
};
|
|
835
985
|
|
|
836
986
|
declare const EgeriaEndpoint: {
|
|
@@ -879,4 +1029,4 @@ declare class LoggingInterceptor implements RequestInterceptor {
|
|
|
879
1029
|
retry(request: Request, error: unknown): Promise<boolean>;
|
|
880
1030
|
}
|
|
881
1031
|
|
|
882
|
-
export { ApiError, AuthInterceptor, type CatalystAlbum, type CatalystAlbumDisplayMode, CatalystClient, type CatalystContest, type CatalystContestAddCollaboratorRequest, type CatalystContestAward, type CatalystContestCollaborator, type CatalystContestPolls, type CatalystContestRank, type CatalystContestRemoveCollaboratorRequest, type CatalystCreateAlbumRequest, type CatalystCreateContestRequest, type CatalystCreateFleetMedia, type CatalystCreateFleetRequest, type CatalystCreateFleetSticker, type CatalystCreateFleetText, type CatalystCreateSmartAlbumRequest, type CatalystCreateStatusRequest, type CatalystCustomReaction, type CatalystEditAlbumRequest, type CatalystEditContestRequest, type CatalystEditSmartAlbumRequest, type CatalystEditStatusRequest, CatalystEndpoint, CatalystError, type CatalystFleet, type CatalystFleetMedia, type CatalystFleetRing, type CatalystFleetSticker, type CatalystFleetText, type CatalystFleetViewer, type CatalystInsertToAlbumRequest, type CatalystMediaWithMetadata, type CatalystPrivacySettings, type CatalystPrivacySettingsRequest, type CatalystReaction, type CatalystReactions, type CatalystRelationshipRequest, type CatalystRelationships, type CatalystRemoveFromAlbumRequest, type CatalystSetContestAwardRequest, type CatalystSmartAlbum, type CatalystSmartAlbums, type CatalystStatus, type CatalystStatusPrivacy, type CatalystStatusWrapper, type CatalystStatuses, CatalystTS, type CatalystTSOptions, type CatalystUnsetContestAwardRequest, type CatalystUserVoteRights, EgeriaClient, EgeriaEndpoint, type EgeriaUpdateProfileRequest, type EgeriaUser, type EgeriaUserProfile, type EgeriaUserWrapper, type EgeriaUsers, type Endpoint, HttpClient, type HttpMethod, ISSUER_CATALYST_SYSTEM_MESSAGE, ISSUER_CATALYST_USER_MESSAGE, ISSUER_EGERIA_SYSTEM_MESSAGE, type Identity, LoggingInterceptor, type Media, MediaClient, type MediaDeleteRequest, type MediaDownloadRequest, MediaEndpoint, type MediaMetadata, type MediaUploadUrls, type Notification, type NotificationGroup, type NotificationUnreadCount, type Notifications, OAuth, OAuthError, PKCE, PUBLIC_API_ENDPOINT, PUBLIC_AUTHORIZE_ENDPOINT, PUBLIC_GRAPHQL_ENDPOINT, type ReportRequest, type RequestInterceptor, SteambirdClient, SteambirdEndpoint, type Token, UserAgentInterceptor };
|
|
1032
|
+
export { ApiError, AuthInterceptor, type CatalystAlbum, type CatalystAlbumDisplayMode, type CatalystAnnouncement, CatalystClient, type CatalystContest, type CatalystContestAddCollaboratorRequest, type CatalystContestAward, type CatalystContestCollaborator, type CatalystContestPolls, type CatalystContestRank, type CatalystContestRemoveCollaboratorRequest, type CatalystCreateAlbumRequest, type CatalystCreateContestRequest, type CatalystCreateFleetMedia, type CatalystCreateFleetRequest, type CatalystCreateFleetSticker, type CatalystCreateFleetText, type CatalystCreateSmartAlbumRequest, type CatalystCreateStatusRequest, type CatalystCustomReaction, type CatalystCustomReactionList, type CatalystCustomReactionStatus, type CatalystEditAlbumRequest, type CatalystEditContestRequest, type CatalystEditSmartAlbumRequest, type CatalystEditStatusRequest, CatalystEndpoint, CatalystError, type CatalystFleet, type CatalystFleetMedia, type CatalystFleetRing, type CatalystFleetSticker, type CatalystFleetText, type CatalystFleetViewer, type CatalystInsertToAlbumRequest, type CatalystMediaWithMetadata, type CatalystPrivacySettings, type CatalystPrivacySettingsRequest, type CatalystReaction, type CatalystReactions, type CatalystRelationshipRequest, type CatalystRelationships, type CatalystRemoveFromAlbumRequest, type CatalystSetContestAwardRequest, type CatalystSmartAlbum, type CatalystSmartAlbums, type CatalystStatus, type CatalystStatusPrivacy, type CatalystStatusWrapper, type CatalystStatuses, CatalystTS, type CatalystTSOptions, type CatalystUnsetContestAwardRequest, type CatalystUserVoteRights, type CreateCustomReactionRequest, EgeriaClient, EgeriaEndpoint, type EgeriaUpdateProfileRequest, type EgeriaUser, type EgeriaUserProfile, type EgeriaUserWrapper, type EgeriaUsers, type Endpoint, HttpClient, type HttpMethod, ISSUER_CATALYST_SYSTEM_MESSAGE, ISSUER_CATALYST_USER_MESSAGE, ISSUER_EGERIA_SYSTEM_MESSAGE, type Identity, LoggingInterceptor, type Media, MediaClient, type MediaDeleteRequest, type MediaDownloadRequest, MediaEndpoint, type MediaMetadata, type MediaUploadUrls, type Notification, type NotificationAdditionalContext, type NotificationGroup, type NotificationUnreadCount, type Notifications, OAuth, OAuthError, PKCE, PUBLIC_API_ENDPOINT, PUBLIC_AUTHORIZE_ENDPOINT, PUBLIC_GRAPHQL_ENDPOINT, type ProfileTag, type ProfileTagSuggestion, type ProfileTagUser, type ReportRequest, type RequestInterceptor, SteambirdClient, SteambirdEndpoint, type SupporterTier, type Token, type UpdateCustomReactionRequest, type UpdateProfileTagsRequest, UserAgentInterceptor };
|
package/dist/index.d.ts
CHANGED
|
@@ -193,10 +193,31 @@ interface CatalystReaction {
|
|
|
193
193
|
interface CatalystReactions {
|
|
194
194
|
reactions: Record<string, CatalystReaction>;
|
|
195
195
|
}
|
|
196
|
+
type CatalystCustomReactionStatus = "active" | "moderated" | "hidden" | "disabled";
|
|
197
|
+
type SupporterTier = "none" | "tier_0" | "tier_1" | "tier_2" | "tier_3" | "tier_4" | "tier_5";
|
|
196
198
|
interface CatalystCustomReaction {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
199
|
+
id: string;
|
|
200
|
+
shortcode: string;
|
|
201
|
+
displayName: string;
|
|
202
|
+
imageUrl: string;
|
|
203
|
+
mimeType: string;
|
|
204
|
+
sortOrder: number;
|
|
205
|
+
status: CatalystCustomReactionStatus;
|
|
206
|
+
createdAt: string;
|
|
207
|
+
}
|
|
208
|
+
interface CatalystCustomReactionList {
|
|
209
|
+
plan: SupporterTier;
|
|
210
|
+
limit: number;
|
|
211
|
+
used: number;
|
|
212
|
+
items: CatalystCustomReaction[];
|
|
213
|
+
}
|
|
214
|
+
interface CreateCustomReactionRequest {
|
|
215
|
+
shortcode: string;
|
|
216
|
+
displayName: string;
|
|
217
|
+
}
|
|
218
|
+
interface UpdateCustomReactionRequest {
|
|
219
|
+
displayName?: string;
|
|
220
|
+
sortOrder?: number;
|
|
200
221
|
}
|
|
201
222
|
|
|
202
223
|
interface CatalystRelationships {
|
|
@@ -424,6 +445,33 @@ interface CatalystPrivacySettings {
|
|
|
424
445
|
followerListVisibility: "public" | "private";
|
|
425
446
|
}
|
|
426
447
|
|
|
448
|
+
interface CatalystAnnouncement {
|
|
449
|
+
id: string;
|
|
450
|
+
title: string;
|
|
451
|
+
body: string;
|
|
452
|
+
category: string;
|
|
453
|
+
since: string;
|
|
454
|
+
until: string;
|
|
455
|
+
url: string | null;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
interface ProfileTag {
|
|
459
|
+
id: string;
|
|
460
|
+
name: string;
|
|
461
|
+
normalizedName: string;
|
|
462
|
+
}
|
|
463
|
+
interface ProfileTagSuggestion {
|
|
464
|
+
id: string;
|
|
465
|
+
name: string;
|
|
466
|
+
usageCount: number;
|
|
467
|
+
}
|
|
468
|
+
interface ProfileTagUser extends EgeriaUser {
|
|
469
|
+
matchedTags: string[];
|
|
470
|
+
}
|
|
471
|
+
interface UpdateProfileTagsRequest {
|
|
472
|
+
tags: string[];
|
|
473
|
+
}
|
|
474
|
+
|
|
427
475
|
declare class CatalystClient {
|
|
428
476
|
private readonly http;
|
|
429
477
|
constructor(http: HttpClient);
|
|
@@ -439,6 +487,10 @@ declare class CatalystClient {
|
|
|
439
487
|
listAlbums(username: string, includeSmartAlbums?: boolean): Promise<CatalystSmartAlbums>;
|
|
440
488
|
searchAlbums(q: string, includeSmartAlbums?: boolean): Promise<CatalystSmartAlbums>;
|
|
441
489
|
customReactions(): Promise<CatalystCustomReaction[]>;
|
|
490
|
+
customUserReactions(): Promise<CatalystCustomReactionList>;
|
|
491
|
+
createCustomReaction(data: CreateCustomReactionRequest): Promise<CatalystCustomReaction>;
|
|
492
|
+
updateCustomReaction(id: string, data: UpdateCustomReactionRequest): Promise<void>;
|
|
493
|
+
deleteCustomReaction(id: string): Promise<void>;
|
|
442
494
|
block(data: CatalystRelationshipRequest): Promise<void>;
|
|
443
495
|
unblock(data: CatalystRelationshipRequest): Promise<void>;
|
|
444
496
|
relationships(id: string): Promise<CatalystRelationships>;
|
|
@@ -575,6 +627,69 @@ declare class CatalystClient {
|
|
|
575
627
|
reportStatus(id: string, data: ReportRequest): Promise<void>;
|
|
576
628
|
getPrivacySettings(): Promise<CatalystPrivacySettings>;
|
|
577
629
|
updatePrivacySettings(data: CatalystPrivacySettingsRequest): Promise<CatalystPrivacySettings>;
|
|
630
|
+
announcements(): Promise<{
|
|
631
|
+
announcements: CatalystAnnouncement[];
|
|
632
|
+
}>;
|
|
633
|
+
updateProfileTags(data: UpdateProfileTagsRequest): Promise<{
|
|
634
|
+
tags: ProfileTag[];
|
|
635
|
+
}>;
|
|
636
|
+
profileTagSuggestions(q: string): Promise<{
|
|
637
|
+
tags: ProfileTagSuggestion[];
|
|
638
|
+
}>;
|
|
639
|
+
getUsersByProfileTag(name: string, cursor?: string): Promise<{
|
|
640
|
+
items: ProfileTagUser[];
|
|
641
|
+
cursor: string | null;
|
|
642
|
+
}>;
|
|
643
|
+
getProfileTagsByUser(id: string): Promise<{
|
|
644
|
+
tags: ProfileTag[];
|
|
645
|
+
}>;
|
|
646
|
+
randomStatus(): Promise<{
|
|
647
|
+
status: CatalystStatus | null;
|
|
648
|
+
}>;
|
|
649
|
+
randomStatusByHashtag(q: string): Promise<{
|
|
650
|
+
status: CatalystStatus | null;
|
|
651
|
+
}>;
|
|
652
|
+
bulkStatusReactions(ids: string[]): Promise<{
|
|
653
|
+
reactions: Record<string, CatalystReactions>;
|
|
654
|
+
}>;
|
|
655
|
+
archiveTimeline(opts: {
|
|
656
|
+
year: number;
|
|
657
|
+
month: number;
|
|
658
|
+
day?: number;
|
|
659
|
+
since?: string;
|
|
660
|
+
until?: string;
|
|
661
|
+
userId?: string;
|
|
662
|
+
limit?: number;
|
|
663
|
+
trimUser?: boolean;
|
|
664
|
+
excludeSensitive?: boolean;
|
|
665
|
+
}): Promise<{
|
|
666
|
+
statuses: CatalystStatus[];
|
|
667
|
+
}>;
|
|
668
|
+
archiveMonths(): Promise<{
|
|
669
|
+
months: {
|
|
670
|
+
year: number;
|
|
671
|
+
month: number;
|
|
672
|
+
count: number;
|
|
673
|
+
}[];
|
|
674
|
+
}>;
|
|
675
|
+
currentContests(): Promise<{
|
|
676
|
+
contests: CatalystContest[];
|
|
677
|
+
}>;
|
|
678
|
+
getContestsByUser(username: string): Promise<{
|
|
679
|
+
contests: CatalystContest[];
|
|
680
|
+
}>;
|
|
681
|
+
getContestPolls(slug: string): Promise<{
|
|
682
|
+
polls: {
|
|
683
|
+
status: CatalystStatus;
|
|
684
|
+
count: number;
|
|
685
|
+
}[];
|
|
686
|
+
}>;
|
|
687
|
+
getAlbumsByMe(includeSmartAlbums?: boolean): Promise<{
|
|
688
|
+
albums: CatalystAlbum[];
|
|
689
|
+
}>;
|
|
690
|
+
listSmartAlbumsByUser(username: string): Promise<{
|
|
691
|
+
albums: CatalystSmartAlbum[];
|
|
692
|
+
}>;
|
|
578
693
|
}
|
|
579
694
|
|
|
580
695
|
declare class EgeriaClient {
|
|
@@ -595,11 +710,18 @@ declare class MediaClient {
|
|
|
595
710
|
upload(): Promise<MediaUploadUrls>;
|
|
596
711
|
}
|
|
597
712
|
|
|
713
|
+
interface NotificationAdditionalContext {
|
|
714
|
+
type: "custom-reaction";
|
|
715
|
+
url: string;
|
|
716
|
+
format: string;
|
|
717
|
+
}
|
|
598
718
|
interface NotificationGroup {
|
|
599
719
|
id: string;
|
|
600
720
|
body: string;
|
|
601
721
|
occurredBy: EgeriaUser;
|
|
602
722
|
isRead: boolean;
|
|
723
|
+
createdAt: string;
|
|
724
|
+
additionalContexts?: NotificationAdditionalContext | null;
|
|
603
725
|
}
|
|
604
726
|
interface Notification {
|
|
605
727
|
id: string;
|
|
@@ -733,6 +855,10 @@ declare const CatalystEndpoint: {
|
|
|
733
855
|
readonly listAlbums: (username: string, includeSmartAlbums?: boolean) => Endpoint;
|
|
734
856
|
readonly searchAlbum: (q: string, includeSmartAlbums?: boolean) => Endpoint;
|
|
735
857
|
readonly customReactions: () => Endpoint;
|
|
858
|
+
readonly customUserReactions: () => Endpoint;
|
|
859
|
+
readonly createCustomReaction: (data: CreateCustomReactionRequest) => Endpoint;
|
|
860
|
+
readonly updateCustomReaction: (id: string, data: UpdateCustomReactionRequest) => Endpoint;
|
|
861
|
+
readonly deleteCustomReaction: (id: string) => Endpoint;
|
|
736
862
|
readonly block: (data: CatalystRelationshipRequest) => Endpoint;
|
|
737
863
|
readonly unblock: (data: CatalystRelationshipRequest) => Endpoint;
|
|
738
864
|
readonly relationships: (id: string) => Endpoint;
|
|
@@ -831,6 +957,30 @@ declare const CatalystEndpoint: {
|
|
|
831
957
|
readonly reportStatus: (id: string, data: ReportRequest) => Endpoint;
|
|
832
958
|
readonly getPrivacySettings: () => Endpoint;
|
|
833
959
|
readonly updatePrivacySettings: (data: CatalystPrivacySettingsRequest) => Endpoint;
|
|
960
|
+
readonly announcements: () => Endpoint;
|
|
961
|
+
readonly updateProfileTags: (data: UpdateProfileTagsRequest) => Endpoint;
|
|
962
|
+
readonly profileTagSuggestions: (q: string) => Endpoint;
|
|
963
|
+
readonly getUsersByProfileTag: (name: string, cursor?: string) => Endpoint;
|
|
964
|
+
readonly getProfileTagsByUser: (id: string) => Endpoint;
|
|
965
|
+
readonly randomStatus: () => Endpoint;
|
|
966
|
+
readonly randomStatusByHashtag: (q: string) => Endpoint;
|
|
967
|
+
readonly bulkStatusReactions: (ids: string[]) => Endpoint;
|
|
968
|
+
readonly archiveTimeline: (opts: {
|
|
969
|
+
year: number;
|
|
970
|
+
month: number;
|
|
971
|
+
day?: number;
|
|
972
|
+
since?: string;
|
|
973
|
+
until?: string;
|
|
974
|
+
userId?: string;
|
|
975
|
+
limit?: number;
|
|
976
|
+
trimUser?: boolean;
|
|
977
|
+
excludeSensitive?: boolean;
|
|
978
|
+
}) => Endpoint;
|
|
979
|
+
readonly archiveMonths: () => Endpoint;
|
|
980
|
+
readonly currentContests: () => Endpoint;
|
|
981
|
+
readonly getContestsByUser: (username: string) => Endpoint;
|
|
982
|
+
readonly getAlbumsByMe: (includeSmartAlbums?: boolean) => Endpoint;
|
|
983
|
+
readonly listSmartAlbumsByUser: (username: string) => Endpoint;
|
|
834
984
|
};
|
|
835
985
|
|
|
836
986
|
declare const EgeriaEndpoint: {
|
|
@@ -879,4 +1029,4 @@ declare class LoggingInterceptor implements RequestInterceptor {
|
|
|
879
1029
|
retry(request: Request, error: unknown): Promise<boolean>;
|
|
880
1030
|
}
|
|
881
1031
|
|
|
882
|
-
export { ApiError, AuthInterceptor, type CatalystAlbum, type CatalystAlbumDisplayMode, CatalystClient, type CatalystContest, type CatalystContestAddCollaboratorRequest, type CatalystContestAward, type CatalystContestCollaborator, type CatalystContestPolls, type CatalystContestRank, type CatalystContestRemoveCollaboratorRequest, type CatalystCreateAlbumRequest, type CatalystCreateContestRequest, type CatalystCreateFleetMedia, type CatalystCreateFleetRequest, type CatalystCreateFleetSticker, type CatalystCreateFleetText, type CatalystCreateSmartAlbumRequest, type CatalystCreateStatusRequest, type CatalystCustomReaction, type CatalystEditAlbumRequest, type CatalystEditContestRequest, type CatalystEditSmartAlbumRequest, type CatalystEditStatusRequest, CatalystEndpoint, CatalystError, type CatalystFleet, type CatalystFleetMedia, type CatalystFleetRing, type CatalystFleetSticker, type CatalystFleetText, type CatalystFleetViewer, type CatalystInsertToAlbumRequest, type CatalystMediaWithMetadata, type CatalystPrivacySettings, type CatalystPrivacySettingsRequest, type CatalystReaction, type CatalystReactions, type CatalystRelationshipRequest, type CatalystRelationships, type CatalystRemoveFromAlbumRequest, type CatalystSetContestAwardRequest, type CatalystSmartAlbum, type CatalystSmartAlbums, type CatalystStatus, type CatalystStatusPrivacy, type CatalystStatusWrapper, type CatalystStatuses, CatalystTS, type CatalystTSOptions, type CatalystUnsetContestAwardRequest, type CatalystUserVoteRights, EgeriaClient, EgeriaEndpoint, type EgeriaUpdateProfileRequest, type EgeriaUser, type EgeriaUserProfile, type EgeriaUserWrapper, type EgeriaUsers, type Endpoint, HttpClient, type HttpMethod, ISSUER_CATALYST_SYSTEM_MESSAGE, ISSUER_CATALYST_USER_MESSAGE, ISSUER_EGERIA_SYSTEM_MESSAGE, type Identity, LoggingInterceptor, type Media, MediaClient, type MediaDeleteRequest, type MediaDownloadRequest, MediaEndpoint, type MediaMetadata, type MediaUploadUrls, type Notification, type NotificationGroup, type NotificationUnreadCount, type Notifications, OAuth, OAuthError, PKCE, PUBLIC_API_ENDPOINT, PUBLIC_AUTHORIZE_ENDPOINT, PUBLIC_GRAPHQL_ENDPOINT, type ReportRequest, type RequestInterceptor, SteambirdClient, SteambirdEndpoint, type Token, UserAgentInterceptor };
|
|
1032
|
+
export { ApiError, AuthInterceptor, type CatalystAlbum, type CatalystAlbumDisplayMode, type CatalystAnnouncement, CatalystClient, type CatalystContest, type CatalystContestAddCollaboratorRequest, type CatalystContestAward, type CatalystContestCollaborator, type CatalystContestPolls, type CatalystContestRank, type CatalystContestRemoveCollaboratorRequest, type CatalystCreateAlbumRequest, type CatalystCreateContestRequest, type CatalystCreateFleetMedia, type CatalystCreateFleetRequest, type CatalystCreateFleetSticker, type CatalystCreateFleetText, type CatalystCreateSmartAlbumRequest, type CatalystCreateStatusRequest, type CatalystCustomReaction, type CatalystCustomReactionList, type CatalystCustomReactionStatus, type CatalystEditAlbumRequest, type CatalystEditContestRequest, type CatalystEditSmartAlbumRequest, type CatalystEditStatusRequest, CatalystEndpoint, CatalystError, type CatalystFleet, type CatalystFleetMedia, type CatalystFleetRing, type CatalystFleetSticker, type CatalystFleetText, type CatalystFleetViewer, type CatalystInsertToAlbumRequest, type CatalystMediaWithMetadata, type CatalystPrivacySettings, type CatalystPrivacySettingsRequest, type CatalystReaction, type CatalystReactions, type CatalystRelationshipRequest, type CatalystRelationships, type CatalystRemoveFromAlbumRequest, type CatalystSetContestAwardRequest, type CatalystSmartAlbum, type CatalystSmartAlbums, type CatalystStatus, type CatalystStatusPrivacy, type CatalystStatusWrapper, type CatalystStatuses, CatalystTS, type CatalystTSOptions, type CatalystUnsetContestAwardRequest, type CatalystUserVoteRights, type CreateCustomReactionRequest, EgeriaClient, EgeriaEndpoint, type EgeriaUpdateProfileRequest, type EgeriaUser, type EgeriaUserProfile, type EgeriaUserWrapper, type EgeriaUsers, type Endpoint, HttpClient, type HttpMethod, ISSUER_CATALYST_SYSTEM_MESSAGE, ISSUER_CATALYST_USER_MESSAGE, ISSUER_EGERIA_SYSTEM_MESSAGE, type Identity, LoggingInterceptor, type Media, MediaClient, type MediaDeleteRequest, type MediaDownloadRequest, MediaEndpoint, type MediaMetadata, type MediaUploadUrls, type Notification, type NotificationAdditionalContext, type NotificationGroup, type NotificationUnreadCount, type Notifications, OAuth, OAuthError, PKCE, PUBLIC_API_ENDPOINT, PUBLIC_AUTHORIZE_ENDPOINT, PUBLIC_GRAPHQL_ENDPOINT, type ProfileTag, type ProfileTagSuggestion, type ProfileTagUser, type ReportRequest, type RequestInterceptor, SteambirdClient, SteambirdEndpoint, type SupporterTier, type Token, type UpdateCustomReactionRequest, type UpdateProfileTagsRequest, UserAgentInterceptor };
|
package/dist/index.js
CHANGED
|
@@ -213,6 +213,22 @@ var CatalystEndpoint = {
|
|
|
213
213
|
customReactions() {
|
|
214
214
|
return { path: "/catalyst/v1/reactions", method: "GET" };
|
|
215
215
|
},
|
|
216
|
+
customUserReactions() {
|
|
217
|
+
return { path: "/catalyst/v1/custom-reactions", method: "GET" };
|
|
218
|
+
},
|
|
219
|
+
createCustomReaction(data) {
|
|
220
|
+
return { path: "/catalyst/v1/custom-reactions", method: "POST", body: data };
|
|
221
|
+
},
|
|
222
|
+
updateCustomReaction(id, data) {
|
|
223
|
+
return {
|
|
224
|
+
path: `/catalyst/v1/custom-reactions/${id}`,
|
|
225
|
+
method: "PATCH",
|
|
226
|
+
body: data
|
|
227
|
+
};
|
|
228
|
+
},
|
|
229
|
+
deleteCustomReaction(id) {
|
|
230
|
+
return { path: `/catalyst/v1/custom-reactions/${id}`, method: "DELETE" };
|
|
231
|
+
},
|
|
216
232
|
block(data) {
|
|
217
233
|
return {
|
|
218
234
|
path: "/catalyst/v1/blocks",
|
|
@@ -581,6 +597,101 @@ var CatalystEndpoint = {
|
|
|
581
597
|
method: "PATCH",
|
|
582
598
|
body: data
|
|
583
599
|
};
|
|
600
|
+
},
|
|
601
|
+
// Announcements
|
|
602
|
+
announcements() {
|
|
603
|
+
return { path: "/catalyst/v1/announcements", method: "GET" };
|
|
604
|
+
},
|
|
605
|
+
// Profile Tags
|
|
606
|
+
updateProfileTags(data) {
|
|
607
|
+
return { path: "/catalyst/v1/profile-tags", method: "PUT", body: data };
|
|
608
|
+
},
|
|
609
|
+
profileTagSuggestions(q) {
|
|
610
|
+
return {
|
|
611
|
+
path: "/catalyst/v1/profile-tags/suggestions",
|
|
612
|
+
method: "GET",
|
|
613
|
+
queryParameters: { q }
|
|
614
|
+
};
|
|
615
|
+
},
|
|
616
|
+
getUsersByProfileTag(name, cursor) {
|
|
617
|
+
return {
|
|
618
|
+
path: `/catalyst/v1/profile-tags/by/name/${name}/users`,
|
|
619
|
+
method: "GET",
|
|
620
|
+
queryParameters: cursor != null ? { cursor } : void 0
|
|
621
|
+
};
|
|
622
|
+
},
|
|
623
|
+
getProfileTagsByUser(id) {
|
|
624
|
+
return {
|
|
625
|
+
path: `/catalyst/v1/profile-tags/by/user/${id}`,
|
|
626
|
+
method: "GET"
|
|
627
|
+
};
|
|
628
|
+
},
|
|
629
|
+
// Random
|
|
630
|
+
randomStatus() {
|
|
631
|
+
return { path: "/catalyst/v1/random", method: "GET" };
|
|
632
|
+
},
|
|
633
|
+
randomStatusByHashtag(q) {
|
|
634
|
+
return {
|
|
635
|
+
path: "/catalyst/v1/random/by/hashtag",
|
|
636
|
+
method: "GET",
|
|
637
|
+
queryParameters: { q }
|
|
638
|
+
};
|
|
639
|
+
},
|
|
640
|
+
// Bulk reactions
|
|
641
|
+
bulkStatusReactions(ids) {
|
|
642
|
+
return {
|
|
643
|
+
path: "/catalyst/v1/statuses/reactions",
|
|
644
|
+
method: "POST",
|
|
645
|
+
body: { ids }
|
|
646
|
+
};
|
|
647
|
+
},
|
|
648
|
+
// Archive timeline
|
|
649
|
+
archiveTimeline(opts) {
|
|
650
|
+
const params = {
|
|
651
|
+
year: String(opts.year),
|
|
652
|
+
month: String(opts.month)
|
|
653
|
+
};
|
|
654
|
+
if (opts.day != null) params["day"] = String(opts.day);
|
|
655
|
+
if (opts.since != null) params["since"] = opts.since;
|
|
656
|
+
if (opts.until != null) params["until"] = opts.until;
|
|
657
|
+
if (opts.userId != null) params["userId"] = opts.userId;
|
|
658
|
+
if (opts.limit != null) params["limit"] = String(opts.limit);
|
|
659
|
+
if (opts.trimUser != null) params["trimUser"] = String(opts.trimUser);
|
|
660
|
+
if (opts.excludeSensitive != null)
|
|
661
|
+
params["excludeSensitive"] = String(opts.excludeSensitive);
|
|
662
|
+
return {
|
|
663
|
+
path: "/catalyst/v1/timeline/archive",
|
|
664
|
+
method: "GET",
|
|
665
|
+
queryParameters: params
|
|
666
|
+
};
|
|
667
|
+
},
|
|
668
|
+
archiveMonths() {
|
|
669
|
+
return { path: "/catalyst/v1/timeline/archive/months", method: "GET" };
|
|
670
|
+
},
|
|
671
|
+
// Contests
|
|
672
|
+
currentContests() {
|
|
673
|
+
return { path: "/catalyst/v1/contest/current", method: "GET" };
|
|
674
|
+
},
|
|
675
|
+
getContestsByUser(username) {
|
|
676
|
+
return {
|
|
677
|
+
path: `/catalyst/v1/contest/by/user/${username}`,
|
|
678
|
+
method: "GET"
|
|
679
|
+
};
|
|
680
|
+
},
|
|
681
|
+
// Album by me
|
|
682
|
+
getAlbumsByMe(includeSmartAlbums = false) {
|
|
683
|
+
return {
|
|
684
|
+
path: "/catalyst/v1/album/by/me",
|
|
685
|
+
method: "GET",
|
|
686
|
+
queryParameters: { include_smart_albums: String(includeSmartAlbums) }
|
|
687
|
+
};
|
|
688
|
+
},
|
|
689
|
+
// Smart album by user
|
|
690
|
+
listSmartAlbumsByUser(username) {
|
|
691
|
+
return {
|
|
692
|
+
path: `/catalyst/v1/smart-album/by/user/${username}`,
|
|
693
|
+
method: "GET"
|
|
694
|
+
};
|
|
584
695
|
}
|
|
585
696
|
};
|
|
586
697
|
|
|
@@ -622,6 +733,18 @@ var CatalystClient = class {
|
|
|
622
733
|
customReactions() {
|
|
623
734
|
return this.http.request(CatalystEndpoint.customReactions());
|
|
624
735
|
}
|
|
736
|
+
customUserReactions() {
|
|
737
|
+
return this.http.request(CatalystEndpoint.customUserReactions());
|
|
738
|
+
}
|
|
739
|
+
createCustomReaction(data) {
|
|
740
|
+
return this.http.request(CatalystEndpoint.createCustomReaction(data));
|
|
741
|
+
}
|
|
742
|
+
updateCustomReaction(id, data) {
|
|
743
|
+
return this.http.requestVoid(CatalystEndpoint.updateCustomReaction(id, data));
|
|
744
|
+
}
|
|
745
|
+
deleteCustomReaction(id) {
|
|
746
|
+
return this.http.requestVoid(CatalystEndpoint.deleteCustomReaction(id));
|
|
747
|
+
}
|
|
625
748
|
// Relationships
|
|
626
749
|
block(data) {
|
|
627
750
|
return this.http.requestVoid(CatalystEndpoint.block(data));
|
|
@@ -830,6 +953,61 @@ var CatalystClient = class {
|
|
|
830
953
|
updatePrivacySettings(data) {
|
|
831
954
|
return this.http.request(CatalystEndpoint.updatePrivacySettings(data));
|
|
832
955
|
}
|
|
956
|
+
// announcements
|
|
957
|
+
announcements() {
|
|
958
|
+
return this.http.request(CatalystEndpoint.announcements());
|
|
959
|
+
}
|
|
960
|
+
// profile tags
|
|
961
|
+
updateProfileTags(data) {
|
|
962
|
+
return this.http.request(CatalystEndpoint.updateProfileTags(data));
|
|
963
|
+
}
|
|
964
|
+
profileTagSuggestions(q) {
|
|
965
|
+
return this.http.request(CatalystEndpoint.profileTagSuggestions(q));
|
|
966
|
+
}
|
|
967
|
+
getUsersByProfileTag(name, cursor) {
|
|
968
|
+
return this.http.request(
|
|
969
|
+
CatalystEndpoint.getUsersByProfileTag(name, cursor)
|
|
970
|
+
);
|
|
971
|
+
}
|
|
972
|
+
getProfileTagsByUser(id) {
|
|
973
|
+
return this.http.request(CatalystEndpoint.getProfileTagsByUser(id));
|
|
974
|
+
}
|
|
975
|
+
// random
|
|
976
|
+
randomStatus() {
|
|
977
|
+
return this.http.request(CatalystEndpoint.randomStatus());
|
|
978
|
+
}
|
|
979
|
+
randomStatusByHashtag(q) {
|
|
980
|
+
return this.http.request(CatalystEndpoint.randomStatusByHashtag(q));
|
|
981
|
+
}
|
|
982
|
+
// bulk reactions
|
|
983
|
+
bulkStatusReactions(ids) {
|
|
984
|
+
return this.http.request(CatalystEndpoint.bulkStatusReactions(ids));
|
|
985
|
+
}
|
|
986
|
+
// archive timeline
|
|
987
|
+
archiveTimeline(opts) {
|
|
988
|
+
return this.http.request(CatalystEndpoint.archiveTimeline(opts));
|
|
989
|
+
}
|
|
990
|
+
archiveMonths() {
|
|
991
|
+
return this.http.request(CatalystEndpoint.archiveMonths());
|
|
992
|
+
}
|
|
993
|
+
// contests
|
|
994
|
+
currentContests() {
|
|
995
|
+
return this.http.request(CatalystEndpoint.currentContests());
|
|
996
|
+
}
|
|
997
|
+
getContestsByUser(username) {
|
|
998
|
+
return this.http.request(CatalystEndpoint.getContestsByUser(username));
|
|
999
|
+
}
|
|
1000
|
+
getContestPolls(slug) {
|
|
1001
|
+
return this.http.request(CatalystEndpoint.getContestPolls(slug));
|
|
1002
|
+
}
|
|
1003
|
+
// album by me
|
|
1004
|
+
getAlbumsByMe(includeSmartAlbums = false) {
|
|
1005
|
+
return this.http.request(CatalystEndpoint.getAlbumsByMe(includeSmartAlbums));
|
|
1006
|
+
}
|
|
1007
|
+
// smart album by user
|
|
1008
|
+
listSmartAlbumsByUser(username) {
|
|
1009
|
+
return this.http.request(CatalystEndpoint.listSmartAlbumsByUser(username));
|
|
1010
|
+
}
|
|
833
1011
|
};
|
|
834
1012
|
|
|
835
1013
|
// src/endpoints/egeriaEndpoint.ts
|
package/dist/index.mjs
CHANGED
|
@@ -164,6 +164,22 @@ var CatalystEndpoint = {
|
|
|
164
164
|
customReactions() {
|
|
165
165
|
return { path: "/catalyst/v1/reactions", method: "GET" };
|
|
166
166
|
},
|
|
167
|
+
customUserReactions() {
|
|
168
|
+
return { path: "/catalyst/v1/custom-reactions", method: "GET" };
|
|
169
|
+
},
|
|
170
|
+
createCustomReaction(data) {
|
|
171
|
+
return { path: "/catalyst/v1/custom-reactions", method: "POST", body: data };
|
|
172
|
+
},
|
|
173
|
+
updateCustomReaction(id, data) {
|
|
174
|
+
return {
|
|
175
|
+
path: `/catalyst/v1/custom-reactions/${id}`,
|
|
176
|
+
method: "PATCH",
|
|
177
|
+
body: data
|
|
178
|
+
};
|
|
179
|
+
},
|
|
180
|
+
deleteCustomReaction(id) {
|
|
181
|
+
return { path: `/catalyst/v1/custom-reactions/${id}`, method: "DELETE" };
|
|
182
|
+
},
|
|
167
183
|
block(data) {
|
|
168
184
|
return {
|
|
169
185
|
path: "/catalyst/v1/blocks",
|
|
@@ -532,6 +548,101 @@ var CatalystEndpoint = {
|
|
|
532
548
|
method: "PATCH",
|
|
533
549
|
body: data
|
|
534
550
|
};
|
|
551
|
+
},
|
|
552
|
+
// Announcements
|
|
553
|
+
announcements() {
|
|
554
|
+
return { path: "/catalyst/v1/announcements", method: "GET" };
|
|
555
|
+
},
|
|
556
|
+
// Profile Tags
|
|
557
|
+
updateProfileTags(data) {
|
|
558
|
+
return { path: "/catalyst/v1/profile-tags", method: "PUT", body: data };
|
|
559
|
+
},
|
|
560
|
+
profileTagSuggestions(q) {
|
|
561
|
+
return {
|
|
562
|
+
path: "/catalyst/v1/profile-tags/suggestions",
|
|
563
|
+
method: "GET",
|
|
564
|
+
queryParameters: { q }
|
|
565
|
+
};
|
|
566
|
+
},
|
|
567
|
+
getUsersByProfileTag(name, cursor) {
|
|
568
|
+
return {
|
|
569
|
+
path: `/catalyst/v1/profile-tags/by/name/${name}/users`,
|
|
570
|
+
method: "GET",
|
|
571
|
+
queryParameters: cursor != null ? { cursor } : void 0
|
|
572
|
+
};
|
|
573
|
+
},
|
|
574
|
+
getProfileTagsByUser(id) {
|
|
575
|
+
return {
|
|
576
|
+
path: `/catalyst/v1/profile-tags/by/user/${id}`,
|
|
577
|
+
method: "GET"
|
|
578
|
+
};
|
|
579
|
+
},
|
|
580
|
+
// Random
|
|
581
|
+
randomStatus() {
|
|
582
|
+
return { path: "/catalyst/v1/random", method: "GET" };
|
|
583
|
+
},
|
|
584
|
+
randomStatusByHashtag(q) {
|
|
585
|
+
return {
|
|
586
|
+
path: "/catalyst/v1/random/by/hashtag",
|
|
587
|
+
method: "GET",
|
|
588
|
+
queryParameters: { q }
|
|
589
|
+
};
|
|
590
|
+
},
|
|
591
|
+
// Bulk reactions
|
|
592
|
+
bulkStatusReactions(ids) {
|
|
593
|
+
return {
|
|
594
|
+
path: "/catalyst/v1/statuses/reactions",
|
|
595
|
+
method: "POST",
|
|
596
|
+
body: { ids }
|
|
597
|
+
};
|
|
598
|
+
},
|
|
599
|
+
// Archive timeline
|
|
600
|
+
archiveTimeline(opts) {
|
|
601
|
+
const params = {
|
|
602
|
+
year: String(opts.year),
|
|
603
|
+
month: String(opts.month)
|
|
604
|
+
};
|
|
605
|
+
if (opts.day != null) params["day"] = String(opts.day);
|
|
606
|
+
if (opts.since != null) params["since"] = opts.since;
|
|
607
|
+
if (opts.until != null) params["until"] = opts.until;
|
|
608
|
+
if (opts.userId != null) params["userId"] = opts.userId;
|
|
609
|
+
if (opts.limit != null) params["limit"] = String(opts.limit);
|
|
610
|
+
if (opts.trimUser != null) params["trimUser"] = String(opts.trimUser);
|
|
611
|
+
if (opts.excludeSensitive != null)
|
|
612
|
+
params["excludeSensitive"] = String(opts.excludeSensitive);
|
|
613
|
+
return {
|
|
614
|
+
path: "/catalyst/v1/timeline/archive",
|
|
615
|
+
method: "GET",
|
|
616
|
+
queryParameters: params
|
|
617
|
+
};
|
|
618
|
+
},
|
|
619
|
+
archiveMonths() {
|
|
620
|
+
return { path: "/catalyst/v1/timeline/archive/months", method: "GET" };
|
|
621
|
+
},
|
|
622
|
+
// Contests
|
|
623
|
+
currentContests() {
|
|
624
|
+
return { path: "/catalyst/v1/contest/current", method: "GET" };
|
|
625
|
+
},
|
|
626
|
+
getContestsByUser(username) {
|
|
627
|
+
return {
|
|
628
|
+
path: `/catalyst/v1/contest/by/user/${username}`,
|
|
629
|
+
method: "GET"
|
|
630
|
+
};
|
|
631
|
+
},
|
|
632
|
+
// Album by me
|
|
633
|
+
getAlbumsByMe(includeSmartAlbums = false) {
|
|
634
|
+
return {
|
|
635
|
+
path: "/catalyst/v1/album/by/me",
|
|
636
|
+
method: "GET",
|
|
637
|
+
queryParameters: { include_smart_albums: String(includeSmartAlbums) }
|
|
638
|
+
};
|
|
639
|
+
},
|
|
640
|
+
// Smart album by user
|
|
641
|
+
listSmartAlbumsByUser(username) {
|
|
642
|
+
return {
|
|
643
|
+
path: `/catalyst/v1/smart-album/by/user/${username}`,
|
|
644
|
+
method: "GET"
|
|
645
|
+
};
|
|
535
646
|
}
|
|
536
647
|
};
|
|
537
648
|
|
|
@@ -573,6 +684,18 @@ var CatalystClient = class {
|
|
|
573
684
|
customReactions() {
|
|
574
685
|
return this.http.request(CatalystEndpoint.customReactions());
|
|
575
686
|
}
|
|
687
|
+
customUserReactions() {
|
|
688
|
+
return this.http.request(CatalystEndpoint.customUserReactions());
|
|
689
|
+
}
|
|
690
|
+
createCustomReaction(data) {
|
|
691
|
+
return this.http.request(CatalystEndpoint.createCustomReaction(data));
|
|
692
|
+
}
|
|
693
|
+
updateCustomReaction(id, data) {
|
|
694
|
+
return this.http.requestVoid(CatalystEndpoint.updateCustomReaction(id, data));
|
|
695
|
+
}
|
|
696
|
+
deleteCustomReaction(id) {
|
|
697
|
+
return this.http.requestVoid(CatalystEndpoint.deleteCustomReaction(id));
|
|
698
|
+
}
|
|
576
699
|
// Relationships
|
|
577
700
|
block(data) {
|
|
578
701
|
return this.http.requestVoid(CatalystEndpoint.block(data));
|
|
@@ -781,6 +904,61 @@ var CatalystClient = class {
|
|
|
781
904
|
updatePrivacySettings(data) {
|
|
782
905
|
return this.http.request(CatalystEndpoint.updatePrivacySettings(data));
|
|
783
906
|
}
|
|
907
|
+
// announcements
|
|
908
|
+
announcements() {
|
|
909
|
+
return this.http.request(CatalystEndpoint.announcements());
|
|
910
|
+
}
|
|
911
|
+
// profile tags
|
|
912
|
+
updateProfileTags(data) {
|
|
913
|
+
return this.http.request(CatalystEndpoint.updateProfileTags(data));
|
|
914
|
+
}
|
|
915
|
+
profileTagSuggestions(q) {
|
|
916
|
+
return this.http.request(CatalystEndpoint.profileTagSuggestions(q));
|
|
917
|
+
}
|
|
918
|
+
getUsersByProfileTag(name, cursor) {
|
|
919
|
+
return this.http.request(
|
|
920
|
+
CatalystEndpoint.getUsersByProfileTag(name, cursor)
|
|
921
|
+
);
|
|
922
|
+
}
|
|
923
|
+
getProfileTagsByUser(id) {
|
|
924
|
+
return this.http.request(CatalystEndpoint.getProfileTagsByUser(id));
|
|
925
|
+
}
|
|
926
|
+
// random
|
|
927
|
+
randomStatus() {
|
|
928
|
+
return this.http.request(CatalystEndpoint.randomStatus());
|
|
929
|
+
}
|
|
930
|
+
randomStatusByHashtag(q) {
|
|
931
|
+
return this.http.request(CatalystEndpoint.randomStatusByHashtag(q));
|
|
932
|
+
}
|
|
933
|
+
// bulk reactions
|
|
934
|
+
bulkStatusReactions(ids) {
|
|
935
|
+
return this.http.request(CatalystEndpoint.bulkStatusReactions(ids));
|
|
936
|
+
}
|
|
937
|
+
// archive timeline
|
|
938
|
+
archiveTimeline(opts) {
|
|
939
|
+
return this.http.request(CatalystEndpoint.archiveTimeline(opts));
|
|
940
|
+
}
|
|
941
|
+
archiveMonths() {
|
|
942
|
+
return this.http.request(CatalystEndpoint.archiveMonths());
|
|
943
|
+
}
|
|
944
|
+
// contests
|
|
945
|
+
currentContests() {
|
|
946
|
+
return this.http.request(CatalystEndpoint.currentContests());
|
|
947
|
+
}
|
|
948
|
+
getContestsByUser(username) {
|
|
949
|
+
return this.http.request(CatalystEndpoint.getContestsByUser(username));
|
|
950
|
+
}
|
|
951
|
+
getContestPolls(slug) {
|
|
952
|
+
return this.http.request(CatalystEndpoint.getContestPolls(slug));
|
|
953
|
+
}
|
|
954
|
+
// album by me
|
|
955
|
+
getAlbumsByMe(includeSmartAlbums = false) {
|
|
956
|
+
return this.http.request(CatalystEndpoint.getAlbumsByMe(includeSmartAlbums));
|
|
957
|
+
}
|
|
958
|
+
// smart album by user
|
|
959
|
+
listSmartAlbumsByUser(username) {
|
|
960
|
+
return this.http.request(CatalystEndpoint.listSmartAlbumsByUser(username));
|
|
961
|
+
}
|
|
784
962
|
};
|
|
785
963
|
|
|
786
964
|
// src/endpoints/egeriaEndpoint.ts
|