@natsuneko-laboratory/catalyst-sdk 0.6.0 → 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 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
- name: string;
198
- symbol: string;
199
- url: string;
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 {
@@ -466,6 +487,10 @@ declare class CatalystClient {
466
487
  listAlbums(username: string, includeSmartAlbums?: boolean): Promise<CatalystSmartAlbums>;
467
488
  searchAlbums(q: string, includeSmartAlbums?: boolean): Promise<CatalystSmartAlbums>;
468
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>;
469
494
  block(data: CatalystRelationshipRequest): Promise<void>;
470
495
  unblock(data: CatalystRelationshipRequest): Promise<void>;
471
496
  relationships(id: string): Promise<CatalystRelationships>;
@@ -685,11 +710,18 @@ declare class MediaClient {
685
710
  upload(): Promise<MediaUploadUrls>;
686
711
  }
687
712
 
713
+ interface NotificationAdditionalContext {
714
+ type: "custom-reaction";
715
+ url: string;
716
+ format: string;
717
+ }
688
718
  interface NotificationGroup {
689
719
  id: string;
690
720
  body: string;
691
721
  occurredBy: EgeriaUser;
692
722
  isRead: boolean;
723
+ createdAt: string;
724
+ additionalContexts?: NotificationAdditionalContext | null;
693
725
  }
694
726
  interface Notification {
695
727
  id: string;
@@ -823,6 +855,10 @@ declare const CatalystEndpoint: {
823
855
  readonly listAlbums: (username: string, includeSmartAlbums?: boolean) => Endpoint;
824
856
  readonly searchAlbum: (q: string, includeSmartAlbums?: boolean) => Endpoint;
825
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;
826
862
  readonly block: (data: CatalystRelationshipRequest) => Endpoint;
827
863
  readonly unblock: (data: CatalystRelationshipRequest) => Endpoint;
828
864
  readonly relationships: (id: string) => Endpoint;
@@ -993,4 +1029,4 @@ declare class LoggingInterceptor implements RequestInterceptor {
993
1029
  retry(request: Request, error: unknown): Promise<boolean>;
994
1030
  }
995
1031
 
996
- 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 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 ProfileTag, type ProfileTagSuggestion, type ProfileTagUser, type ReportRequest, type RequestInterceptor, SteambirdClient, SteambirdEndpoint, type Token, type UpdateProfileTagsRequest, 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
- name: string;
198
- symbol: string;
199
- url: string;
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 {
@@ -466,6 +487,10 @@ declare class CatalystClient {
466
487
  listAlbums(username: string, includeSmartAlbums?: boolean): Promise<CatalystSmartAlbums>;
467
488
  searchAlbums(q: string, includeSmartAlbums?: boolean): Promise<CatalystSmartAlbums>;
468
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>;
469
494
  block(data: CatalystRelationshipRequest): Promise<void>;
470
495
  unblock(data: CatalystRelationshipRequest): Promise<void>;
471
496
  relationships(id: string): Promise<CatalystRelationships>;
@@ -685,11 +710,18 @@ declare class MediaClient {
685
710
  upload(): Promise<MediaUploadUrls>;
686
711
  }
687
712
 
713
+ interface NotificationAdditionalContext {
714
+ type: "custom-reaction";
715
+ url: string;
716
+ format: string;
717
+ }
688
718
  interface NotificationGroup {
689
719
  id: string;
690
720
  body: string;
691
721
  occurredBy: EgeriaUser;
692
722
  isRead: boolean;
723
+ createdAt: string;
724
+ additionalContexts?: NotificationAdditionalContext | null;
693
725
  }
694
726
  interface Notification {
695
727
  id: string;
@@ -823,6 +855,10 @@ declare const CatalystEndpoint: {
823
855
  readonly listAlbums: (username: string, includeSmartAlbums?: boolean) => Endpoint;
824
856
  readonly searchAlbum: (q: string, includeSmartAlbums?: boolean) => Endpoint;
825
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;
826
862
  readonly block: (data: CatalystRelationshipRequest) => Endpoint;
827
863
  readonly unblock: (data: CatalystRelationshipRequest) => Endpoint;
828
864
  readonly relationships: (id: string) => Endpoint;
@@ -993,4 +1029,4 @@ declare class LoggingInterceptor implements RequestInterceptor {
993
1029
  retry(request: Request, error: unknown): Promise<boolean>;
994
1030
  }
995
1031
 
996
- 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 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 ProfileTag, type ProfileTagSuggestion, type ProfileTagUser, type ReportRequest, type RequestInterceptor, SteambirdClient, SteambirdEndpoint, type Token, type UpdateProfileTagsRequest, 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",
@@ -717,6 +733,18 @@ var CatalystClient = class {
717
733
  customReactions() {
718
734
  return this.http.request(CatalystEndpoint.customReactions());
719
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
+ }
720
748
  // Relationships
721
749
  block(data) {
722
750
  return this.http.requestVoid(CatalystEndpoint.block(data));
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",
@@ -668,6 +684,18 @@ var CatalystClient = class {
668
684
  customReactions() {
669
685
  return this.http.request(CatalystEndpoint.customReactions());
670
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
+ }
671
699
  // Relationships
672
700
  block(data) {
673
701
  return this.http.requestVoid(CatalystEndpoint.block(data));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natsuneko-laboratory/catalyst-sdk",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "TypeScript/JavaScript SDK for the Natsuneko Laboratory platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",