@natsuneko-laboratory/catalyst-sdk 0.7.0 → 0.7.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 CHANGED
@@ -193,9 +193,15 @@ interface CatalystReaction {
193
193
  interface CatalystReactions {
194
194
  reactions: Record<string, CatalystReaction>;
195
195
  }
196
+ interface CatalystCustomReaction {
197
+ id: string;
198
+ name: string;
199
+ symbol: string;
200
+ url: string;
201
+ }
196
202
  type CatalystCustomReactionStatus = "active" | "moderated" | "hidden" | "disabled";
197
203
  type SupporterTier = "none" | "tier_0" | "tier_1" | "tier_2" | "tier_3" | "tier_4" | "tier_5";
198
- interface CatalystCustomReaction {
204
+ interface CatalystUserCustomReaction {
199
205
  id: string;
200
206
  shortcode: string;
201
207
  displayName: string;
@@ -209,11 +215,7 @@ interface CatalystCustomReactionList {
209
215
  plan: SupporterTier;
210
216
  limit: number;
211
217
  used: number;
212
- items: CatalystCustomReaction[];
213
- }
214
- interface CreateCustomReactionRequest {
215
- shortcode: string;
216
- displayName: string;
218
+ items: CatalystUserCustomReaction[];
217
219
  }
218
220
  interface UpdateCustomReactionRequest {
219
221
  displayName?: string;
@@ -488,7 +490,7 @@ declare class CatalystClient {
488
490
  searchAlbums(q: string, includeSmartAlbums?: boolean): Promise<CatalystSmartAlbums>;
489
491
  customReactions(): Promise<CatalystCustomReaction[]>;
490
492
  customUserReactions(): Promise<CatalystCustomReactionList>;
491
- createCustomReaction(data: CreateCustomReactionRequest): Promise<CatalystCustomReaction>;
493
+ createCustomReaction(data: FormData): Promise<CatalystUserCustomReaction>;
492
494
  updateCustomReaction(id: string, data: UpdateCustomReactionRequest): Promise<void>;
493
495
  deleteCustomReaction(id: string): Promise<void>;
494
496
  block(data: CatalystRelationshipRequest): Promise<void>;
@@ -856,7 +858,7 @@ declare const CatalystEndpoint: {
856
858
  readonly searchAlbum: (q: string, includeSmartAlbums?: boolean) => Endpoint;
857
859
  readonly customReactions: () => Endpoint;
858
860
  readonly customUserReactions: () => Endpoint;
859
- readonly createCustomReaction: (data: CreateCustomReactionRequest) => Endpoint;
861
+ readonly createCustomReaction: (data: FormData) => Endpoint;
860
862
  readonly updateCustomReaction: (id: string, data: UpdateCustomReactionRequest) => Endpoint;
861
863
  readonly deleteCustomReaction: (id: string) => Endpoint;
862
864
  readonly block: (data: CatalystRelationshipRequest) => Endpoint;
@@ -1029,4 +1031,4 @@ declare class LoggingInterceptor implements RequestInterceptor {
1029
1031
  retry(request: Request, error: unknown): Promise<boolean>;
1030
1032
  }
1031
1033
 
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 };
1034
+ 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 CatalystUserCustomReaction, 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 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,9 +193,15 @@ interface CatalystReaction {
193
193
  interface CatalystReactions {
194
194
  reactions: Record<string, CatalystReaction>;
195
195
  }
196
+ interface CatalystCustomReaction {
197
+ id: string;
198
+ name: string;
199
+ symbol: string;
200
+ url: string;
201
+ }
196
202
  type CatalystCustomReactionStatus = "active" | "moderated" | "hidden" | "disabled";
197
203
  type SupporterTier = "none" | "tier_0" | "tier_1" | "tier_2" | "tier_3" | "tier_4" | "tier_5";
198
- interface CatalystCustomReaction {
204
+ interface CatalystUserCustomReaction {
199
205
  id: string;
200
206
  shortcode: string;
201
207
  displayName: string;
@@ -209,11 +215,7 @@ interface CatalystCustomReactionList {
209
215
  plan: SupporterTier;
210
216
  limit: number;
211
217
  used: number;
212
- items: CatalystCustomReaction[];
213
- }
214
- interface CreateCustomReactionRequest {
215
- shortcode: string;
216
- displayName: string;
218
+ items: CatalystUserCustomReaction[];
217
219
  }
218
220
  interface UpdateCustomReactionRequest {
219
221
  displayName?: string;
@@ -488,7 +490,7 @@ declare class CatalystClient {
488
490
  searchAlbums(q: string, includeSmartAlbums?: boolean): Promise<CatalystSmartAlbums>;
489
491
  customReactions(): Promise<CatalystCustomReaction[]>;
490
492
  customUserReactions(): Promise<CatalystCustomReactionList>;
491
- createCustomReaction(data: CreateCustomReactionRequest): Promise<CatalystCustomReaction>;
493
+ createCustomReaction(data: FormData): Promise<CatalystUserCustomReaction>;
492
494
  updateCustomReaction(id: string, data: UpdateCustomReactionRequest): Promise<void>;
493
495
  deleteCustomReaction(id: string): Promise<void>;
494
496
  block(data: CatalystRelationshipRequest): Promise<void>;
@@ -856,7 +858,7 @@ declare const CatalystEndpoint: {
856
858
  readonly searchAlbum: (q: string, includeSmartAlbums?: boolean) => Endpoint;
857
859
  readonly customReactions: () => Endpoint;
858
860
  readonly customUserReactions: () => Endpoint;
859
- readonly createCustomReaction: (data: CreateCustomReactionRequest) => Endpoint;
861
+ readonly createCustomReaction: (data: FormData) => Endpoint;
860
862
  readonly updateCustomReaction: (id: string, data: UpdateCustomReactionRequest) => Endpoint;
861
863
  readonly deleteCustomReaction: (id: string) => Endpoint;
862
864
  readonly block: (data: CatalystRelationshipRequest) => Endpoint;
@@ -1029,4 +1031,4 @@ declare class LoggingInterceptor implements RequestInterceptor {
1029
1031
  retry(request: Request, error: unknown): Promise<boolean>;
1030
1032
  }
1031
1033
 
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 };
1034
+ 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 CatalystUserCustomReaction, 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 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
@@ -96,8 +96,12 @@ var HttpClient = class {
96
96
  const headers = new Headers(endpoint.headers);
97
97
  let body;
98
98
  if (endpoint.body != null) {
99
- body = JSON.stringify(endpoint.body);
100
- headers.set("Content-Type", "application/json");
99
+ if (endpoint.body instanceof FormData) {
100
+ body = endpoint.body;
101
+ } else {
102
+ body = JSON.stringify(endpoint.body);
103
+ headers.set("Content-Type", "application/json");
104
+ }
101
105
  }
102
106
  return new Request(url.toString(), {
103
107
  method: endpoint.method,
@@ -217,7 +221,11 @@ var CatalystEndpoint = {
217
221
  return { path: "/catalyst/v1/custom-reactions", method: "GET" };
218
222
  },
219
223
  createCustomReaction(data) {
220
- return { path: "/catalyst/v1/custom-reactions", method: "POST", body: data };
224
+ return {
225
+ path: "/catalyst/v1/custom-reactions",
226
+ method: "POST",
227
+ body: data
228
+ };
221
229
  },
222
230
  updateCustomReaction(id, data) {
223
231
  return {
@@ -567,7 +575,7 @@ var CatalystEndpoint = {
567
575
  },
568
576
  getContestVotes(slug) {
569
577
  return {
570
- path: `/catalyst/v1/contest/by/slug/${slug}/votes`,
578
+ path: `/catalyst/v1/contest/by/slug/${slug}/vote`,
571
579
  method: "GET"
572
580
  };
573
581
  },
package/dist/index.mjs CHANGED
@@ -47,8 +47,12 @@ var HttpClient = class {
47
47
  const headers = new Headers(endpoint.headers);
48
48
  let body;
49
49
  if (endpoint.body != null) {
50
- body = JSON.stringify(endpoint.body);
51
- headers.set("Content-Type", "application/json");
50
+ if (endpoint.body instanceof FormData) {
51
+ body = endpoint.body;
52
+ } else {
53
+ body = JSON.stringify(endpoint.body);
54
+ headers.set("Content-Type", "application/json");
55
+ }
52
56
  }
53
57
  return new Request(url.toString(), {
54
58
  method: endpoint.method,
@@ -168,7 +172,11 @@ var CatalystEndpoint = {
168
172
  return { path: "/catalyst/v1/custom-reactions", method: "GET" };
169
173
  },
170
174
  createCustomReaction(data) {
171
- return { path: "/catalyst/v1/custom-reactions", method: "POST", body: data };
175
+ return {
176
+ path: "/catalyst/v1/custom-reactions",
177
+ method: "POST",
178
+ body: data
179
+ };
172
180
  },
173
181
  updateCustomReaction(id, data) {
174
182
  return {
@@ -518,7 +526,7 @@ var CatalystEndpoint = {
518
526
  },
519
527
  getContestVotes(slug) {
520
528
  return {
521
- path: `/catalyst/v1/contest/by/slug/${slug}/votes`,
529
+ path: `/catalyst/v1/contest/by/slug/${slug}/vote`,
522
530
  method: "GET"
523
531
  };
524
532
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natsuneko-laboratory/catalyst-sdk",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "TypeScript/JavaScript SDK for the Natsuneko Laboratory platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",