@natsuneko-laboratory/catalyst-sdk 0.2.2 → 0.3.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
@@ -298,6 +298,117 @@ interface CatalystFleetRing {
298
298
  fleetCount: number;
299
299
  }
300
300
 
301
+ interface CatalystCreateContestRequest {
302
+ title: string;
303
+ description: string;
304
+ theme: string;
305
+ }
306
+ interface CatalystEditContestRequest {
307
+ title?: string;
308
+ description?: string;
309
+ theme?: string;
310
+ terms?: string;
311
+ headerUrl?: string;
312
+ bannerUrl?: string;
313
+ winnersOpenAt?: string;
314
+ winnersMessageSendAt?: string;
315
+ publishedAt?: string;
316
+ application?: {
317
+ since?: string;
318
+ until?: string;
319
+ allowSensitive: boolean;
320
+ };
321
+ voting?: {
322
+ since?: string;
323
+ until?: string;
324
+ maxVotes?: number;
325
+ isEnableVoting?: boolean;
326
+ };
327
+ ranks?: Omit<CatalystContestRank, "id" | "winners">[];
328
+ }
329
+ interface CatalystContestRank {
330
+ id: string;
331
+ name: string;
332
+ description?: string;
333
+ count: number;
334
+ prize: string;
335
+ winners: EgeriaUser[];
336
+ }
337
+ interface CatalystContest {
338
+ slug: string;
339
+ draft: boolean;
340
+ state: string;
341
+ title: string;
342
+ description: string;
343
+ theme: string;
344
+ terms: string;
345
+ headerUrl: string;
346
+ bannerUrl: string;
347
+ winnersOpenAt: string;
348
+ winnersMessageSendAt: string;
349
+ publishedAt: string;
350
+ application: {
351
+ since: string;
352
+ until: string;
353
+ allowSensitive: boolean;
354
+ };
355
+ voting: {
356
+ since: string;
357
+ until: string;
358
+ maxVotes: number;
359
+ isEnable: boolean;
360
+ };
361
+ winners: {
362
+ since: string;
363
+ until: string;
364
+ };
365
+ ranks: CatalystContestRank[];
366
+ }
367
+ interface CatalystContestAward {
368
+ id: string;
369
+ name: string;
370
+ winners: CatalystStatus & {
371
+ message?: string | null;
372
+ commentary?: string | null;
373
+ attachment?: {
374
+ name: string;
375
+ id: string;
376
+ } | null;
377
+ }[];
378
+ order: number;
379
+ count: number;
380
+ remaining: number;
381
+ }
382
+ interface CatalystSetContestAwardRequest {
383
+ status: string;
384
+ message?: string;
385
+ commentary?: string;
386
+ }
387
+ interface CatalystUnsetContestAwardRequest {
388
+ status: string;
389
+ message?: string;
390
+ commentary?: string;
391
+ }
392
+ interface CatalystContestCollaborator {
393
+ user: Omit<EgeriaUser, "profile">;
394
+ role: "admin" | "collaborator" | "contributor";
395
+ }
396
+ interface CatalystContestAddCollaboratorRequest {
397
+ userId: string;
398
+ role: "collaborator" | "contributor";
399
+ }
400
+ interface CatalystContestRemoveCollaboratorRequest {
401
+ userId: string;
402
+ }
403
+ interface CatalystContestPolls {
404
+ status: CatalystStatus;
405
+ count: number;
406
+ }
407
+ interface CatalystUserVoteRights {
408
+ remaining: number;
409
+ statuses: string[];
410
+ }
411
+
301
412
  declare class CatalystClient {
302
413
  private readonly http;
303
414
  constructor(http: HttpClient);
@@ -381,6 +492,33 @@ declare class CatalystClient {
381
492
  unreactFleet(id: string, symbol: string): Promise<void>;
382
493
  fleets(): Promise<CatalystFleetRing[]>;
383
494
  fleetByUsername(username: string): Promise<CatalystFleet[]>;
495
+ createContest(data: CatalystCreateContestRequest): Promise<Identity>;
496
+ getContestsByMe(): Promise<CatalystContest[]>;
497
+ getContestBySlug(slug: string): Promise<{
498
+ contest: CatalystContest;
499
+ }>;
500
+ editContest(slug: string, data: CatalystEditContestRequest): Promise<void>;
501
+ getContestAwards(slug: string): Promise<{
502
+ awards: CatalystContestAward[];
503
+ }>;
504
+ setContestAward(slug: string, id: string, data: CatalystSetContestAwardRequest): Promise<void>;
505
+ unsetContestAward(slug: string, id: string, data: CatalystUnsetContestAwardRequest): Promise<void>;
506
+ getContestCollaborators(slug: string): Promise<{
507
+ collaborators: string[];
508
+ }>;
509
+ addContestCollaborator(slug: string, data: CatalystContestAddCollaboratorRequest): Promise<void>;
510
+ removeContestCollaborator(slug: string, data: CatalystContestRemoveCollaboratorRequest): Promise<void>;
511
+ copyContest(slug: string): Promise<Identity>;
512
+ getAccessPermissionOfContest(slug: string): Promise<{
513
+ result: "admin" | "collaborator" | "contributor" | "guest";
514
+ }>;
515
+ publishContest(slug: string): Promise<Identity>;
516
+ addContestVoteToStatus(slug: string, id: string): Promise<void>;
517
+ removeContestVoteFromStatus(slug: string, id: string): Promise<void>;
518
+ getContestVotes(slug: string): Promise<CatalystUserVoteRights>;
519
+ searchContest(state: string, q?: string): Promise<{
520
+ contests: CatalystContest[];
521
+ }>;
384
522
  }
385
523
 
386
524
  declare class EgeriaClient {
@@ -607,6 +745,24 @@ declare const CatalystEndpoint: {
607
745
  readonly unreactFleet: (id: string, symbol: string) => Endpoint;
608
746
  readonly fleets: () => Endpoint;
609
747
  readonly fleetByUsername: (username: string) => Endpoint;
748
+ readonly createContest: (data: CatalystCreateContestRequest) => Endpoint;
749
+ readonly getContestsByMe: () => Endpoint;
750
+ readonly getContestBySlug: (slug: string) => Endpoint;
751
+ readonly editContest: (slug: string, data: CatalystEditContestRequest) => Endpoint;
752
+ readonly getContestAwards: (slug: string) => Endpoint;
753
+ readonly setContestAward: (slug: string, id: string, data: CatalystSetContestAwardRequest) => Endpoint;
754
+ readonly unsetContestAward: (slug: string, id: string, data: CatalystUnsetContestAwardRequest) => Endpoint;
755
+ readonly getContestCollaborators: (slug: string) => Endpoint;
756
+ readonly addContestCollaborator: (slug: string, data: CatalystContestAddCollaboratorRequest) => Endpoint;
757
+ readonly removeContestCollaborator: (slug: string, data: CatalystContestRemoveCollaboratorRequest) => Endpoint;
758
+ readonly copyContest: (slug: string) => Endpoint;
759
+ readonly getAccessPermissionOfContest: (slug: string) => Endpoint;
760
+ readonly getContestPolls: (slug: string) => Endpoint;
761
+ readonly publishContest: (slug: string) => Endpoint;
762
+ readonly addContestVoteToStatus: (slug: string, id: string) => Endpoint;
763
+ readonly removeContestVoteFromStatus: (slug: string, id: string) => Endpoint;
764
+ readonly getContestVotes: (slug: string) => Endpoint;
765
+ readonly searchContest: (state: string, q?: string) => Endpoint;
610
766
  };
611
767
 
612
768
  declare const EgeriaEndpoint: {
@@ -655,4 +811,4 @@ declare class LoggingInterceptor implements RequestInterceptor {
655
811
  retry(request: Request, error: unknown): Promise<boolean>;
656
812
  }
657
813
 
658
- export { ApiError, AuthInterceptor, type CatalystAlbum, type CatalystAlbumDisplayMode, CatalystClient, type CatalystCreateAlbumRequest, type CatalystCreateFleetMedia, type CatalystCreateFleetRequest, type CatalystCreateFleetSticker, type CatalystCreateFleetText, type CatalystCreateSmartAlbumRequest, type CatalystCreateStatusRequest, type CatalystCustomReaction, type CatalystEditAlbumRequest, 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 CatalystSmartAlbum, type CatalystSmartAlbums, type CatalystStatus, type CatalystStatusPrivacy, type CatalystStatusWrapper, type CatalystStatuses, CatalystTS, type CatalystTSOptions, 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 };
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 };
package/dist/index.d.ts CHANGED
@@ -298,6 +298,117 @@ interface CatalystFleetRing {
298
298
  fleetCount: number;
299
299
  }
300
300
 
301
+ interface CatalystCreateContestRequest {
302
+ title: string;
303
+ description: string;
304
+ theme: string;
305
+ }
306
+ interface CatalystEditContestRequest {
307
+ title?: string;
308
+ description?: string;
309
+ theme?: string;
310
+ terms?: string;
311
+ headerUrl?: string;
312
+ bannerUrl?: string;
313
+ winnersOpenAt?: string;
314
+ winnersMessageSendAt?: string;
315
+ publishedAt?: string;
316
+ application?: {
317
+ since?: string;
318
+ until?: string;
319
+ allowSensitive: boolean;
320
+ };
321
+ voting?: {
322
+ since?: string;
323
+ until?: string;
324
+ maxVotes?: number;
325
+ isEnableVoting?: boolean;
326
+ };
327
+ ranks?: Omit<CatalystContestRank, "id" | "winners">[];
328
+ }
329
+ interface CatalystContestRank {
330
+ id: string;
331
+ name: string;
332
+ description?: string;
333
+ count: number;
334
+ prize: string;
335
+ winners: EgeriaUser[];
336
+ }
337
+ interface CatalystContest {
338
+ slug: string;
339
+ draft: boolean;
340
+ state: string;
341
+ title: string;
342
+ description: string;
343
+ theme: string;
344
+ terms: string;
345
+ headerUrl: string;
346
+ bannerUrl: string;
347
+ winnersOpenAt: string;
348
+ winnersMessageSendAt: string;
349
+ publishedAt: string;
350
+ application: {
351
+ since: string;
352
+ until: string;
353
+ allowSensitive: boolean;
354
+ };
355
+ voting: {
356
+ since: string;
357
+ until: string;
358
+ maxVotes: number;
359
+ isEnable: boolean;
360
+ };
361
+ winners: {
362
+ since: string;
363
+ until: string;
364
+ };
365
+ ranks: CatalystContestRank[];
366
+ }
367
+ interface CatalystContestAward {
368
+ id: string;
369
+ name: string;
370
+ winners: CatalystStatus & {
371
+ message?: string | null;
372
+ commentary?: string | null;
373
+ attachment?: {
374
+ name: string;
375
+ id: string;
376
+ } | null;
377
+ }[];
378
+ order: number;
379
+ count: number;
380
+ remaining: number;
381
+ }
382
+ interface CatalystSetContestAwardRequest {
383
+ status: string;
384
+ message?: string;
385
+ commentary?: string;
386
+ }
387
+ interface CatalystUnsetContestAwardRequest {
388
+ status: string;
389
+ message?: string;
390
+ commentary?: string;
391
+ }
392
+ interface CatalystContestCollaborator {
393
+ user: Omit<EgeriaUser, "profile">;
394
+ role: "admin" | "collaborator" | "contributor";
395
+ }
396
+ interface CatalystContestAddCollaboratorRequest {
397
+ userId: string;
398
+ role: "collaborator" | "contributor";
399
+ }
400
+ interface CatalystContestRemoveCollaboratorRequest {
401
+ userId: string;
402
+ }
403
+ interface CatalystContestPolls {
404
+ status: CatalystStatus;
405
+ count: number;
406
+ }
407
+ interface CatalystUserVoteRights {
408
+ remaining: number;
409
+ statuses: string[];
410
+ }
411
+
301
412
  declare class CatalystClient {
302
413
  private readonly http;
303
414
  constructor(http: HttpClient);
@@ -381,6 +492,33 @@ declare class CatalystClient {
381
492
  unreactFleet(id: string, symbol: string): Promise<void>;
382
493
  fleets(): Promise<CatalystFleetRing[]>;
383
494
  fleetByUsername(username: string): Promise<CatalystFleet[]>;
495
+ createContest(data: CatalystCreateContestRequest): Promise<Identity>;
496
+ getContestsByMe(): Promise<CatalystContest[]>;
497
+ getContestBySlug(slug: string): Promise<{
498
+ contest: CatalystContest;
499
+ }>;
500
+ editContest(slug: string, data: CatalystEditContestRequest): Promise<void>;
501
+ getContestAwards(slug: string): Promise<{
502
+ awards: CatalystContestAward[];
503
+ }>;
504
+ setContestAward(slug: string, id: string, data: CatalystSetContestAwardRequest): Promise<void>;
505
+ unsetContestAward(slug: string, id: string, data: CatalystUnsetContestAwardRequest): Promise<void>;
506
+ getContestCollaborators(slug: string): Promise<{
507
+ collaborators: string[];
508
+ }>;
509
+ addContestCollaborator(slug: string, data: CatalystContestAddCollaboratorRequest): Promise<void>;
510
+ removeContestCollaborator(slug: string, data: CatalystContestRemoveCollaboratorRequest): Promise<void>;
511
+ copyContest(slug: string): Promise<Identity>;
512
+ getAccessPermissionOfContest(slug: string): Promise<{
513
+ result: "admin" | "collaborator" | "contributor" | "guest";
514
+ }>;
515
+ publishContest(slug: string): Promise<Identity>;
516
+ addContestVoteToStatus(slug: string, id: string): Promise<void>;
517
+ removeContestVoteFromStatus(slug: string, id: string): Promise<void>;
518
+ getContestVotes(slug: string): Promise<CatalystUserVoteRights>;
519
+ searchContest(state: string, q?: string): Promise<{
520
+ contests: CatalystContest[];
521
+ }>;
384
522
  }
385
523
 
386
524
  declare class EgeriaClient {
@@ -607,6 +745,24 @@ declare const CatalystEndpoint: {
607
745
  readonly unreactFleet: (id: string, symbol: string) => Endpoint;
608
746
  readonly fleets: () => Endpoint;
609
747
  readonly fleetByUsername: (username: string) => Endpoint;
748
+ readonly createContest: (data: CatalystCreateContestRequest) => Endpoint;
749
+ readonly getContestsByMe: () => Endpoint;
750
+ readonly getContestBySlug: (slug: string) => Endpoint;
751
+ readonly editContest: (slug: string, data: CatalystEditContestRequest) => Endpoint;
752
+ readonly getContestAwards: (slug: string) => Endpoint;
753
+ readonly setContestAward: (slug: string, id: string, data: CatalystSetContestAwardRequest) => Endpoint;
754
+ readonly unsetContestAward: (slug: string, id: string, data: CatalystUnsetContestAwardRequest) => Endpoint;
755
+ readonly getContestCollaborators: (slug: string) => Endpoint;
756
+ readonly addContestCollaborator: (slug: string, data: CatalystContestAddCollaboratorRequest) => Endpoint;
757
+ readonly removeContestCollaborator: (slug: string, data: CatalystContestRemoveCollaboratorRequest) => Endpoint;
758
+ readonly copyContest: (slug: string) => Endpoint;
759
+ readonly getAccessPermissionOfContest: (slug: string) => Endpoint;
760
+ readonly getContestPolls: (slug: string) => Endpoint;
761
+ readonly publishContest: (slug: string) => Endpoint;
762
+ readonly addContestVoteToStatus: (slug: string, id: string) => Endpoint;
763
+ readonly removeContestVoteFromStatus: (slug: string, id: string) => Endpoint;
764
+ readonly getContestVotes: (slug: string) => Endpoint;
765
+ readonly searchContest: (state: string, q?: string) => Endpoint;
610
766
  };
611
767
 
612
768
  declare const EgeriaEndpoint: {
@@ -655,4 +811,4 @@ declare class LoggingInterceptor implements RequestInterceptor {
655
811
  retry(request: Request, error: unknown): Promise<boolean>;
656
812
  }
657
813
 
658
- export { ApiError, AuthInterceptor, type CatalystAlbum, type CatalystAlbumDisplayMode, CatalystClient, type CatalystCreateAlbumRequest, type CatalystCreateFleetMedia, type CatalystCreateFleetRequest, type CatalystCreateFleetSticker, type CatalystCreateFleetText, type CatalystCreateSmartAlbumRequest, type CatalystCreateStatusRequest, type CatalystCustomReaction, type CatalystEditAlbumRequest, 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 CatalystSmartAlbum, type CatalystSmartAlbums, type CatalystStatus, type CatalystStatusPrivacy, type CatalystStatusWrapper, type CatalystStatuses, CatalystTS, type CatalystTSOptions, 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 };
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 };
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;
@@ -408,6 +412,121 @@ var CatalystEndpoint = {
408
412
  path: `/catalyst/v1/fleet/by/user/${username}`,
409
413
  method: "GET"
410
414
  };
415
+ },
416
+ createContest(data) {
417
+ return {
418
+ path: "/catalyst/v1/contest",
419
+ method: "POST",
420
+ body: data
421
+ };
422
+ },
423
+ getContestsByMe() {
424
+ return {
425
+ path: "/catalyst/v1/contest/by/me",
426
+ method: "GET"
427
+ };
428
+ },
429
+ getContestBySlug(slug) {
430
+ return {
431
+ path: `/catalyst/v1/contest/by/slug/${slug}`,
432
+ method: "GET"
433
+ };
434
+ },
435
+ editContest(slug, data) {
436
+ return {
437
+ path: `/catalyst/v1/contest/by/slug/${slug}`,
438
+ method: "PATCH",
439
+ body: data
440
+ };
441
+ },
442
+ getContestAwards(slug) {
443
+ return {
444
+ path: `/catalyst/v1/contest/by/slug/${slug}/awards`,
445
+ method: "GET"
446
+ };
447
+ },
448
+ setContestAward(slug, id, data) {
449
+ return {
450
+ path: `/catalyst/v1/contest/by/slug/${slug}/awards/${id}`,
451
+ method: "POST",
452
+ body: data
453
+ };
454
+ },
455
+ unsetContestAward(slug, id, data) {
456
+ return {
457
+ path: `/catalyst/v1/contest/by/slug/${slug}/awards/${id}`,
458
+ method: "DELETE",
459
+ body: data
460
+ };
461
+ },
462
+ getContestCollaborators(slug) {
463
+ return {
464
+ path: `/catalyst/v1/contest/by/slug/${slug}/collaborators`,
465
+ method: "GET"
466
+ };
467
+ },
468
+ addContestCollaborator(slug, data) {
469
+ return {
470
+ path: `/catalyst/v1/contest/by/slug/${slug}/collaborators`,
471
+ method: "POST",
472
+ body: data
473
+ };
474
+ },
475
+ removeContestCollaborator(slug, data) {
476
+ return {
477
+ path: `/catalyst/v1/contest/by/slug/${slug}/collaborators`,
478
+ method: "DELETE",
479
+ body: data
480
+ };
481
+ },
482
+ copyContest(slug) {
483
+ return {
484
+ path: `/catalyst/v1/contest/by/slug/${slug}/copy`,
485
+ method: "POST"
486
+ };
487
+ },
488
+ getAccessPermissionOfContest(slug) {
489
+ return {
490
+ path: `/catalyst/v1/contest/by/slug/${slug}/dashboard`,
491
+ method: "GET"
492
+ };
493
+ },
494
+ getContestPolls(slug) {
495
+ return {
496
+ path: `/catalyst/v1/contest/by/slug/${slug}/polls`,
497
+ method: "GET"
498
+ };
499
+ },
500
+ publishContest(slug) {
501
+ return {
502
+ path: `/catalyst/v1/contest/by/slug/${slug}/publish`,
503
+ method: "POST"
504
+ };
505
+ },
506
+ addContestVoteToStatus(slug, id) {
507
+ return {
508
+ path: `/catalyst/v1/contest/by/slug/${slug}/vote/${id}`,
509
+ method: "POST"
510
+ };
511
+ },
512
+ removeContestVoteFromStatus(slug, id) {
513
+ return {
514
+ path: `/catalyst/v1/contest/by/slug/${slug}/vote/${id}`,
515
+ method: "DELETE"
516
+ };
517
+ },
518
+ getContestVotes(slug) {
519
+ return {
520
+ path: `/catalyst/v1/contest/by/slug/${slug}/votes`,
521
+ method: "GET"
522
+ };
523
+ },
524
+ searchContest(state, q) {
525
+ return {
526
+ path: "/catalyst/v1/contest/search",
527
+ method: "GET",
528
+ queryParameters: { state, q: q ?? "" }
529
+ };
411
530
  }
412
531
  };
413
532
 
@@ -566,6 +685,71 @@ var CatalystClient = class {
566
685
  fleetByUsername(username) {
567
686
  return this.http.request(CatalystEndpoint.fleetByUsername(username));
568
687
  }
688
+ createContest(data) {
689
+ return this.http.request(CatalystEndpoint.createContest(data));
690
+ }
691
+ getContestsByMe() {
692
+ return this.http.request(CatalystEndpoint.getContestsByMe());
693
+ }
694
+ getContestBySlug(slug) {
695
+ return this.http.request(CatalystEndpoint.getContestBySlug(slug));
696
+ }
697
+ editContest(slug, data) {
698
+ return this.http.requestVoid(CatalystEndpoint.editContest(slug, data));
699
+ }
700
+ getContestAwards(slug) {
701
+ return this.http.request(CatalystEndpoint.getContestAwards(slug));
702
+ }
703
+ setContestAward(slug, id, data) {
704
+ return this.http.requestVoid(
705
+ CatalystEndpoint.setContestAward(slug, id, data)
706
+ );
707
+ }
708
+ unsetContestAward(slug, id, data) {
709
+ return this.http.requestVoid(
710
+ CatalystEndpoint.unsetContestAward(slug, id, data)
711
+ );
712
+ }
713
+ getContestCollaborators(slug) {
714
+ return this.http.request(CatalystEndpoint.getContestCollaborators(slug));
715
+ }
716
+ addContestCollaborator(slug, data) {
717
+ return this.http.requestVoid(
718
+ CatalystEndpoint.addContestCollaborator(slug, data)
719
+ );
720
+ }
721
+ removeContestCollaborator(slug, data) {
722
+ return this.http.requestVoid(
723
+ CatalystEndpoint.removeContestCollaborator(slug, data)
724
+ );
725
+ }
726
+ copyContest(slug) {
727
+ return this.http.request(CatalystEndpoint.copyContest(slug));
728
+ }
729
+ getAccessPermissionOfContest(slug) {
730
+ return this.http.request(
731
+ CatalystEndpoint.getAccessPermissionOfContest(slug)
732
+ );
733
+ }
734
+ publishContest(slug) {
735
+ return this.http.request(CatalystEndpoint.publishContest(slug));
736
+ }
737
+ addContestVoteToStatus(slug, id) {
738
+ return this.http.requestVoid(
739
+ CatalystEndpoint.addContestVoteToStatus(slug, id)
740
+ );
741
+ }
742
+ removeContestVoteFromStatus(slug, id) {
743
+ return this.http.requestVoid(
744
+ CatalystEndpoint.removeContestVoteFromStatus(slug, id)
745
+ );
746
+ }
747
+ getContestVotes(slug) {
748
+ return this.http.request(CatalystEndpoint.getContestVotes(slug));
749
+ }
750
+ searchContest(state, q) {
751
+ return this.http.request(CatalystEndpoint.searchContest(state, q));
752
+ }
569
753
  };
570
754
 
571
755
  // 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;
@@ -359,6 +363,121 @@ var CatalystEndpoint = {
359
363
  path: `/catalyst/v1/fleet/by/user/${username}`,
360
364
  method: "GET"
361
365
  };
366
+ },
367
+ createContest(data) {
368
+ return {
369
+ path: "/catalyst/v1/contest",
370
+ method: "POST",
371
+ body: data
372
+ };
373
+ },
374
+ getContestsByMe() {
375
+ return {
376
+ path: "/catalyst/v1/contest/by/me",
377
+ method: "GET"
378
+ };
379
+ },
380
+ getContestBySlug(slug) {
381
+ return {
382
+ path: `/catalyst/v1/contest/by/slug/${slug}`,
383
+ method: "GET"
384
+ };
385
+ },
386
+ editContest(slug, data) {
387
+ return {
388
+ path: `/catalyst/v1/contest/by/slug/${slug}`,
389
+ method: "PATCH",
390
+ body: data
391
+ };
392
+ },
393
+ getContestAwards(slug) {
394
+ return {
395
+ path: `/catalyst/v1/contest/by/slug/${slug}/awards`,
396
+ method: "GET"
397
+ };
398
+ },
399
+ setContestAward(slug, id, data) {
400
+ return {
401
+ path: `/catalyst/v1/contest/by/slug/${slug}/awards/${id}`,
402
+ method: "POST",
403
+ body: data
404
+ };
405
+ },
406
+ unsetContestAward(slug, id, data) {
407
+ return {
408
+ path: `/catalyst/v1/contest/by/slug/${slug}/awards/${id}`,
409
+ method: "DELETE",
410
+ body: data
411
+ };
412
+ },
413
+ getContestCollaborators(slug) {
414
+ return {
415
+ path: `/catalyst/v1/contest/by/slug/${slug}/collaborators`,
416
+ method: "GET"
417
+ };
418
+ },
419
+ addContestCollaborator(slug, data) {
420
+ return {
421
+ path: `/catalyst/v1/contest/by/slug/${slug}/collaborators`,
422
+ method: "POST",
423
+ body: data
424
+ };
425
+ },
426
+ removeContestCollaborator(slug, data) {
427
+ return {
428
+ path: `/catalyst/v1/contest/by/slug/${slug}/collaborators`,
429
+ method: "DELETE",
430
+ body: data
431
+ };
432
+ },
433
+ copyContest(slug) {
434
+ return {
435
+ path: `/catalyst/v1/contest/by/slug/${slug}/copy`,
436
+ method: "POST"
437
+ };
438
+ },
439
+ getAccessPermissionOfContest(slug) {
440
+ return {
441
+ path: `/catalyst/v1/contest/by/slug/${slug}/dashboard`,
442
+ method: "GET"
443
+ };
444
+ },
445
+ getContestPolls(slug) {
446
+ return {
447
+ path: `/catalyst/v1/contest/by/slug/${slug}/polls`,
448
+ method: "GET"
449
+ };
450
+ },
451
+ publishContest(slug) {
452
+ return {
453
+ path: `/catalyst/v1/contest/by/slug/${slug}/publish`,
454
+ method: "POST"
455
+ };
456
+ },
457
+ addContestVoteToStatus(slug, id) {
458
+ return {
459
+ path: `/catalyst/v1/contest/by/slug/${slug}/vote/${id}`,
460
+ method: "POST"
461
+ };
462
+ },
463
+ removeContestVoteFromStatus(slug, id) {
464
+ return {
465
+ path: `/catalyst/v1/contest/by/slug/${slug}/vote/${id}`,
466
+ method: "DELETE"
467
+ };
468
+ },
469
+ getContestVotes(slug) {
470
+ return {
471
+ path: `/catalyst/v1/contest/by/slug/${slug}/votes`,
472
+ method: "GET"
473
+ };
474
+ },
475
+ searchContest(state, q) {
476
+ return {
477
+ path: "/catalyst/v1/contest/search",
478
+ method: "GET",
479
+ queryParameters: { state, q: q ?? "" }
480
+ };
362
481
  }
363
482
  };
364
483
 
@@ -517,6 +636,71 @@ var CatalystClient = class {
517
636
  fleetByUsername(username) {
518
637
  return this.http.request(CatalystEndpoint.fleetByUsername(username));
519
638
  }
639
+ createContest(data) {
640
+ return this.http.request(CatalystEndpoint.createContest(data));
641
+ }
642
+ getContestsByMe() {
643
+ return this.http.request(CatalystEndpoint.getContestsByMe());
644
+ }
645
+ getContestBySlug(slug) {
646
+ return this.http.request(CatalystEndpoint.getContestBySlug(slug));
647
+ }
648
+ editContest(slug, data) {
649
+ return this.http.requestVoid(CatalystEndpoint.editContest(slug, data));
650
+ }
651
+ getContestAwards(slug) {
652
+ return this.http.request(CatalystEndpoint.getContestAwards(slug));
653
+ }
654
+ setContestAward(slug, id, data) {
655
+ return this.http.requestVoid(
656
+ CatalystEndpoint.setContestAward(slug, id, data)
657
+ );
658
+ }
659
+ unsetContestAward(slug, id, data) {
660
+ return this.http.requestVoid(
661
+ CatalystEndpoint.unsetContestAward(slug, id, data)
662
+ );
663
+ }
664
+ getContestCollaborators(slug) {
665
+ return this.http.request(CatalystEndpoint.getContestCollaborators(slug));
666
+ }
667
+ addContestCollaborator(slug, data) {
668
+ return this.http.requestVoid(
669
+ CatalystEndpoint.addContestCollaborator(slug, data)
670
+ );
671
+ }
672
+ removeContestCollaborator(slug, data) {
673
+ return this.http.requestVoid(
674
+ CatalystEndpoint.removeContestCollaborator(slug, data)
675
+ );
676
+ }
677
+ copyContest(slug) {
678
+ return this.http.request(CatalystEndpoint.copyContest(slug));
679
+ }
680
+ getAccessPermissionOfContest(slug) {
681
+ return this.http.request(
682
+ CatalystEndpoint.getAccessPermissionOfContest(slug)
683
+ );
684
+ }
685
+ publishContest(slug) {
686
+ return this.http.request(CatalystEndpoint.publishContest(slug));
687
+ }
688
+ addContestVoteToStatus(slug, id) {
689
+ return this.http.requestVoid(
690
+ CatalystEndpoint.addContestVoteToStatus(slug, id)
691
+ );
692
+ }
693
+ removeContestVoteFromStatus(slug, id) {
694
+ return this.http.requestVoid(
695
+ CatalystEndpoint.removeContestVoteFromStatus(slug, id)
696
+ );
697
+ }
698
+ getContestVotes(slug) {
699
+ return this.http.request(CatalystEndpoint.getContestVotes(slug));
700
+ }
701
+ searchContest(state, q) {
702
+ return this.http.request(CatalystEndpoint.searchContest(state, q));
703
+ }
520
704
  };
521
705
 
522
706
  // src/endpoints/egeriaEndpoint.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natsuneko-laboratory/catalyst-sdk",
3
- "version": "0.2.2",
3
+ "version": "0.3.2",
4
4
  "description": "TypeScript/JavaScript SDK for the Natsuneko Laboratory platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -26,6 +26,9 @@
26
26
  "sdk",
27
27
  "api"
28
28
  ],
29
+ "repository": {
30
+ "url": "https://github.com/mika-f/CatalystSDK/"
31
+ },
29
32
  "license": "MIT",
30
33
  "devDependencies": {
31
34
  "@types/node": "^22.0.0",