@natsuneko-laboratory/catalyst-sdk 0.3.1 → 0.3.4

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
@@ -409,6 +409,11 @@ interface CatalystUserVoteRights {
409
409
  statuses: string[];
410
410
  }
411
411
 
412
+ interface ReportRequest {
413
+ type: "nsfw" | "tos_violation" | "harassment" | "spam" | "other";
414
+ description?: string;
415
+ }
416
+
412
417
  declare class CatalystClient {
413
418
  private readonly http;
414
419
  constructor(http: HttpClient);
@@ -519,6 +524,7 @@ declare class CatalystClient {
519
524
  searchContest(state: string, q?: string): Promise<{
520
525
  contests: CatalystContest[];
521
526
  }>;
527
+ reportStatus(id: string, data: ReportRequest): Promise<void>;
522
528
  }
523
529
 
524
530
  declare class EgeriaClient {
@@ -763,6 +769,7 @@ declare const CatalystEndpoint: {
763
769
  readonly removeContestVoteFromStatus: (slug: string, id: string) => Endpoint;
764
770
  readonly getContestVotes: (slug: string) => Endpoint;
765
771
  readonly searchContest: (state: string, q?: string) => Endpoint;
772
+ readonly reportStatus: (id: string, data: ReportRequest) => Endpoint;
766
773
  };
767
774
 
768
775
  declare const EgeriaEndpoint: {
@@ -811,4 +818,4 @@ declare class LoggingInterceptor implements RequestInterceptor {
811
818
  retry(request: Request, error: unknown): Promise<boolean>;
812
819
  }
813
820
 
814
- 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 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 RequestInterceptor, SteambirdClient, SteambirdEndpoint, type Token, UserAgentInterceptor };
821
+ 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 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 };
package/dist/index.d.ts CHANGED
@@ -409,6 +409,11 @@ interface CatalystUserVoteRights {
409
409
  statuses: string[];
410
410
  }
411
411
 
412
+ interface ReportRequest {
413
+ type: "nsfw" | "tos_violation" | "harassment" | "spam" | "other";
414
+ description?: string;
415
+ }
416
+
412
417
  declare class CatalystClient {
413
418
  private readonly http;
414
419
  constructor(http: HttpClient);
@@ -519,6 +524,7 @@ declare class CatalystClient {
519
524
  searchContest(state: string, q?: string): Promise<{
520
525
  contests: CatalystContest[];
521
526
  }>;
527
+ reportStatus(id: string, data: ReportRequest): Promise<void>;
522
528
  }
523
529
 
524
530
  declare class EgeriaClient {
@@ -763,6 +769,7 @@ declare const CatalystEndpoint: {
763
769
  readonly removeContestVoteFromStatus: (slug: string, id: string) => Endpoint;
764
770
  readonly getContestVotes: (slug: string) => Endpoint;
765
771
  readonly searchContest: (state: string, q?: string) => Endpoint;
772
+ readonly reportStatus: (id: string, data: ReportRequest) => Endpoint;
766
773
  };
767
774
 
768
775
  declare const EgeriaEndpoint: {
@@ -811,4 +818,4 @@ declare class LoggingInterceptor implements RequestInterceptor {
811
818
  retry(request: Request, error: unknown): Promise<boolean>;
812
819
  }
813
820
 
814
- 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 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 RequestInterceptor, SteambirdClient, SteambirdEndpoint, type Token, UserAgentInterceptor };
821
+ 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 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 };
package/dist/index.js CHANGED
@@ -141,7 +141,11 @@ var HttpClient = class {
141
141
  for (const interceptor of this.interceptors) {
142
142
  const shouldRetry = await interceptor.retry(req, error);
143
143
  if (shouldRetry) {
144
- return this.executeWithRetry(req, endpoint);
144
+ let retryReq = this.buildRequest(endpoint);
145
+ for (const adaptInterceptor of this.interceptors) {
146
+ retryReq = await adaptInterceptor.adapt(retryReq);
147
+ }
148
+ return this.executeWithRetry(retryReq, endpoint);
145
149
  }
146
150
  }
147
151
  throw error;
@@ -523,6 +527,13 @@ var CatalystEndpoint = {
523
527
  method: "GET",
524
528
  queryParameters: { state, q: q ?? "" }
525
529
  };
530
+ },
531
+ reportStatus(id, data) {
532
+ return {
533
+ path: `/catalyst/v1/status/${id}/report`,
534
+ method: "POST",
535
+ body: data
536
+ };
526
537
  }
527
538
  };
528
539
 
@@ -746,6 +757,10 @@ var CatalystClient = class {
746
757
  searchContest(state, q) {
747
758
  return this.http.request(CatalystEndpoint.searchContest(state, q));
748
759
  }
760
+ // report
761
+ reportStatus(id, data) {
762
+ return this.http.requestVoid(CatalystEndpoint.reportStatus(id, data));
763
+ }
749
764
  };
750
765
 
751
766
  // src/endpoints/egeriaEndpoint.ts
package/dist/index.mjs CHANGED
@@ -92,7 +92,11 @@ var HttpClient = class {
92
92
  for (const interceptor of this.interceptors) {
93
93
  const shouldRetry = await interceptor.retry(req, error);
94
94
  if (shouldRetry) {
95
- return this.executeWithRetry(req, endpoint);
95
+ let retryReq = this.buildRequest(endpoint);
96
+ for (const adaptInterceptor of this.interceptors) {
97
+ retryReq = await adaptInterceptor.adapt(retryReq);
98
+ }
99
+ return this.executeWithRetry(retryReq, endpoint);
96
100
  }
97
101
  }
98
102
  throw error;
@@ -474,6 +478,13 @@ var CatalystEndpoint = {
474
478
  method: "GET",
475
479
  queryParameters: { state, q: q ?? "" }
476
480
  };
481
+ },
482
+ reportStatus(id, data) {
483
+ return {
484
+ path: `/catalyst/v1/status/${id}/report`,
485
+ method: "POST",
486
+ body: data
487
+ };
477
488
  }
478
489
  };
479
490
 
@@ -697,6 +708,10 @@ var CatalystClient = class {
697
708
  searchContest(state, q) {
698
709
  return this.http.request(CatalystEndpoint.searchContest(state, q));
699
710
  }
711
+ // report
712
+ reportStatus(id, data) {
713
+ return this.http.requestVoid(CatalystEndpoint.reportStatus(id, data));
714
+ }
700
715
  };
701
716
 
702
717
  // src/endpoints/egeriaEndpoint.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natsuneko-laboratory/catalyst-sdk",
3
- "version": "0.3.1",
3
+ "version": "0.3.4",
4
4
  "description": "TypeScript/JavaScript SDK for the Natsuneko Laboratory platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",