@natsuneko-laboratory/catalyst-sdk 0.2.1 → 0.3.1

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 CatalystCreateSmartAlbumRequest, type CatalystCreateStatusRequest, type CatalystCustomReaction, type CatalystEditAlbumRequest, type CatalystEditSmartAlbumRequest, type CatalystEditStatusRequest, CatalystEndpoint, CatalystError, 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 CatalystCreateSmartAlbumRequest, type CatalystCreateStatusRequest, type CatalystCustomReaction, type CatalystEditAlbumRequest, type CatalystEditSmartAlbumRequest, type CatalystEditStatusRequest, CatalystEndpoint, CatalystError, 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
@@ -408,6 +408,121 @@ var CatalystEndpoint = {
408
408
  path: `/catalyst/v1/fleet/by/user/${username}`,
409
409
  method: "GET"
410
410
  };
411
+ },
412
+ createContest(data) {
413
+ return {
414
+ path: "/catalyst/v1/contest",
415
+ method: "POST",
416
+ body: data
417
+ };
418
+ },
419
+ getContestsByMe() {
420
+ return {
421
+ path: "/catalyst/v1/contest/by/me",
422
+ method: "GET"
423
+ };
424
+ },
425
+ getContestBySlug(slug) {
426
+ return {
427
+ path: `/catalyst/v1/contest/by/slug/${slug}`,
428
+ method: "GET"
429
+ };
430
+ },
431
+ editContest(slug, data) {
432
+ return {
433
+ path: `/catalyst/v1/contest/by/slug/${slug}`,
434
+ method: "PATCH",
435
+ body: data
436
+ };
437
+ },
438
+ getContestAwards(slug) {
439
+ return {
440
+ path: `/catalyst/v1/contest/by/slug/${slug}/awards`,
441
+ method: "GET"
442
+ };
443
+ },
444
+ setContestAward(slug, id, data) {
445
+ return {
446
+ path: `/catalyst/v1/contest/by/slug/${slug}/awards/${id}`,
447
+ method: "POST",
448
+ body: data
449
+ };
450
+ },
451
+ unsetContestAward(slug, id, data) {
452
+ return {
453
+ path: `/catalyst/v1/contest/by/slug/${slug}/awards/${id}`,
454
+ method: "DELETE",
455
+ body: data
456
+ };
457
+ },
458
+ getContestCollaborators(slug) {
459
+ return {
460
+ path: `/catalyst/v1/contest/by/slug/${slug}/collaborators`,
461
+ method: "GET"
462
+ };
463
+ },
464
+ addContestCollaborator(slug, data) {
465
+ return {
466
+ path: `/catalyst/v1/contest/by/slug/${slug}/collaborators`,
467
+ method: "POST",
468
+ body: data
469
+ };
470
+ },
471
+ removeContestCollaborator(slug, data) {
472
+ return {
473
+ path: `/catalyst/v1/contest/by/slug/${slug}/collaborators`,
474
+ method: "DELETE",
475
+ body: data
476
+ };
477
+ },
478
+ copyContest(slug) {
479
+ return {
480
+ path: `/catalyst/v1/contest/by/slug/${slug}/copy`,
481
+ method: "POST"
482
+ };
483
+ },
484
+ getAccessPermissionOfContest(slug) {
485
+ return {
486
+ path: `/catalyst/v1/contest/by/slug/${slug}/dashboard`,
487
+ method: "GET"
488
+ };
489
+ },
490
+ getContestPolls(slug) {
491
+ return {
492
+ path: `/catalyst/v1/contest/by/slug/${slug}/polls`,
493
+ method: "GET"
494
+ };
495
+ },
496
+ publishContest(slug) {
497
+ return {
498
+ path: `/catalyst/v1/contest/by/slug/${slug}/publish`,
499
+ method: "POST"
500
+ };
501
+ },
502
+ addContestVoteToStatus(slug, id) {
503
+ return {
504
+ path: `/catalyst/v1/contest/by/slug/${slug}/vote/${id}`,
505
+ method: "POST"
506
+ };
507
+ },
508
+ removeContestVoteFromStatus(slug, id) {
509
+ return {
510
+ path: `/catalyst/v1/contest/by/slug/${slug}/vote/${id}`,
511
+ method: "DELETE"
512
+ };
513
+ },
514
+ getContestVotes(slug) {
515
+ return {
516
+ path: `/catalyst/v1/contest/by/slug/${slug}/votes`,
517
+ method: "GET"
518
+ };
519
+ },
520
+ searchContest(state, q) {
521
+ return {
522
+ path: "/catalyst/v1/contest/search",
523
+ method: "GET",
524
+ queryParameters: { state, q: q ?? "" }
525
+ };
411
526
  }
412
527
  };
413
528
 
@@ -566,6 +681,71 @@ var CatalystClient = class {
566
681
  fleetByUsername(username) {
567
682
  return this.http.request(CatalystEndpoint.fleetByUsername(username));
568
683
  }
684
+ createContest(data) {
685
+ return this.http.request(CatalystEndpoint.createContest(data));
686
+ }
687
+ getContestsByMe() {
688
+ return this.http.request(CatalystEndpoint.getContestsByMe());
689
+ }
690
+ getContestBySlug(slug) {
691
+ return this.http.request(CatalystEndpoint.getContestBySlug(slug));
692
+ }
693
+ editContest(slug, data) {
694
+ return this.http.requestVoid(CatalystEndpoint.editContest(slug, data));
695
+ }
696
+ getContestAwards(slug) {
697
+ return this.http.request(CatalystEndpoint.getContestAwards(slug));
698
+ }
699
+ setContestAward(slug, id, data) {
700
+ return this.http.requestVoid(
701
+ CatalystEndpoint.setContestAward(slug, id, data)
702
+ );
703
+ }
704
+ unsetContestAward(slug, id, data) {
705
+ return this.http.requestVoid(
706
+ CatalystEndpoint.unsetContestAward(slug, id, data)
707
+ );
708
+ }
709
+ getContestCollaborators(slug) {
710
+ return this.http.request(CatalystEndpoint.getContestCollaborators(slug));
711
+ }
712
+ addContestCollaborator(slug, data) {
713
+ return this.http.requestVoid(
714
+ CatalystEndpoint.addContestCollaborator(slug, data)
715
+ );
716
+ }
717
+ removeContestCollaborator(slug, data) {
718
+ return this.http.requestVoid(
719
+ CatalystEndpoint.removeContestCollaborator(slug, data)
720
+ );
721
+ }
722
+ copyContest(slug) {
723
+ return this.http.request(CatalystEndpoint.copyContest(slug));
724
+ }
725
+ getAccessPermissionOfContest(slug) {
726
+ return this.http.request(
727
+ CatalystEndpoint.getAccessPermissionOfContest(slug)
728
+ );
729
+ }
730
+ publishContest(slug) {
731
+ return this.http.request(CatalystEndpoint.publishContest(slug));
732
+ }
733
+ addContestVoteToStatus(slug, id) {
734
+ return this.http.requestVoid(
735
+ CatalystEndpoint.addContestVoteToStatus(slug, id)
736
+ );
737
+ }
738
+ removeContestVoteFromStatus(slug, id) {
739
+ return this.http.requestVoid(
740
+ CatalystEndpoint.removeContestVoteFromStatus(slug, id)
741
+ );
742
+ }
743
+ getContestVotes(slug) {
744
+ return this.http.request(CatalystEndpoint.getContestVotes(slug));
745
+ }
746
+ searchContest(state, q) {
747
+ return this.http.request(CatalystEndpoint.searchContest(state, q));
748
+ }
569
749
  };
570
750
 
571
751
  // src/endpoints/egeriaEndpoint.ts
package/dist/index.mjs CHANGED
@@ -359,6 +359,121 @@ var CatalystEndpoint = {
359
359
  path: `/catalyst/v1/fleet/by/user/${username}`,
360
360
  method: "GET"
361
361
  };
362
+ },
363
+ createContest(data) {
364
+ return {
365
+ path: "/catalyst/v1/contest",
366
+ method: "POST",
367
+ body: data
368
+ };
369
+ },
370
+ getContestsByMe() {
371
+ return {
372
+ path: "/catalyst/v1/contest/by/me",
373
+ method: "GET"
374
+ };
375
+ },
376
+ getContestBySlug(slug) {
377
+ return {
378
+ path: `/catalyst/v1/contest/by/slug/${slug}`,
379
+ method: "GET"
380
+ };
381
+ },
382
+ editContest(slug, data) {
383
+ return {
384
+ path: `/catalyst/v1/contest/by/slug/${slug}`,
385
+ method: "PATCH",
386
+ body: data
387
+ };
388
+ },
389
+ getContestAwards(slug) {
390
+ return {
391
+ path: `/catalyst/v1/contest/by/slug/${slug}/awards`,
392
+ method: "GET"
393
+ };
394
+ },
395
+ setContestAward(slug, id, data) {
396
+ return {
397
+ path: `/catalyst/v1/contest/by/slug/${slug}/awards/${id}`,
398
+ method: "POST",
399
+ body: data
400
+ };
401
+ },
402
+ unsetContestAward(slug, id, data) {
403
+ return {
404
+ path: `/catalyst/v1/contest/by/slug/${slug}/awards/${id}`,
405
+ method: "DELETE",
406
+ body: data
407
+ };
408
+ },
409
+ getContestCollaborators(slug) {
410
+ return {
411
+ path: `/catalyst/v1/contest/by/slug/${slug}/collaborators`,
412
+ method: "GET"
413
+ };
414
+ },
415
+ addContestCollaborator(slug, data) {
416
+ return {
417
+ path: `/catalyst/v1/contest/by/slug/${slug}/collaborators`,
418
+ method: "POST",
419
+ body: data
420
+ };
421
+ },
422
+ removeContestCollaborator(slug, data) {
423
+ return {
424
+ path: `/catalyst/v1/contest/by/slug/${slug}/collaborators`,
425
+ method: "DELETE",
426
+ body: data
427
+ };
428
+ },
429
+ copyContest(slug) {
430
+ return {
431
+ path: `/catalyst/v1/contest/by/slug/${slug}/copy`,
432
+ method: "POST"
433
+ };
434
+ },
435
+ getAccessPermissionOfContest(slug) {
436
+ return {
437
+ path: `/catalyst/v1/contest/by/slug/${slug}/dashboard`,
438
+ method: "GET"
439
+ };
440
+ },
441
+ getContestPolls(slug) {
442
+ return {
443
+ path: `/catalyst/v1/contest/by/slug/${slug}/polls`,
444
+ method: "GET"
445
+ };
446
+ },
447
+ publishContest(slug) {
448
+ return {
449
+ path: `/catalyst/v1/contest/by/slug/${slug}/publish`,
450
+ method: "POST"
451
+ };
452
+ },
453
+ addContestVoteToStatus(slug, id) {
454
+ return {
455
+ path: `/catalyst/v1/contest/by/slug/${slug}/vote/${id}`,
456
+ method: "POST"
457
+ };
458
+ },
459
+ removeContestVoteFromStatus(slug, id) {
460
+ return {
461
+ path: `/catalyst/v1/contest/by/slug/${slug}/vote/${id}`,
462
+ method: "DELETE"
463
+ };
464
+ },
465
+ getContestVotes(slug) {
466
+ return {
467
+ path: `/catalyst/v1/contest/by/slug/${slug}/votes`,
468
+ method: "GET"
469
+ };
470
+ },
471
+ searchContest(state, q) {
472
+ return {
473
+ path: "/catalyst/v1/contest/search",
474
+ method: "GET",
475
+ queryParameters: { state, q: q ?? "" }
476
+ };
362
477
  }
363
478
  };
364
479
 
@@ -517,6 +632,71 @@ var CatalystClient = class {
517
632
  fleetByUsername(username) {
518
633
  return this.http.request(CatalystEndpoint.fleetByUsername(username));
519
634
  }
635
+ createContest(data) {
636
+ return this.http.request(CatalystEndpoint.createContest(data));
637
+ }
638
+ getContestsByMe() {
639
+ return this.http.request(CatalystEndpoint.getContestsByMe());
640
+ }
641
+ getContestBySlug(slug) {
642
+ return this.http.request(CatalystEndpoint.getContestBySlug(slug));
643
+ }
644
+ editContest(slug, data) {
645
+ return this.http.requestVoid(CatalystEndpoint.editContest(slug, data));
646
+ }
647
+ getContestAwards(slug) {
648
+ return this.http.request(CatalystEndpoint.getContestAwards(slug));
649
+ }
650
+ setContestAward(slug, id, data) {
651
+ return this.http.requestVoid(
652
+ CatalystEndpoint.setContestAward(slug, id, data)
653
+ );
654
+ }
655
+ unsetContestAward(slug, id, data) {
656
+ return this.http.requestVoid(
657
+ CatalystEndpoint.unsetContestAward(slug, id, data)
658
+ );
659
+ }
660
+ getContestCollaborators(slug) {
661
+ return this.http.request(CatalystEndpoint.getContestCollaborators(slug));
662
+ }
663
+ addContestCollaborator(slug, data) {
664
+ return this.http.requestVoid(
665
+ CatalystEndpoint.addContestCollaborator(slug, data)
666
+ );
667
+ }
668
+ removeContestCollaborator(slug, data) {
669
+ return this.http.requestVoid(
670
+ CatalystEndpoint.removeContestCollaborator(slug, data)
671
+ );
672
+ }
673
+ copyContest(slug) {
674
+ return this.http.request(CatalystEndpoint.copyContest(slug));
675
+ }
676
+ getAccessPermissionOfContest(slug) {
677
+ return this.http.request(
678
+ CatalystEndpoint.getAccessPermissionOfContest(slug)
679
+ );
680
+ }
681
+ publishContest(slug) {
682
+ return this.http.request(CatalystEndpoint.publishContest(slug));
683
+ }
684
+ addContestVoteToStatus(slug, id) {
685
+ return this.http.requestVoid(
686
+ CatalystEndpoint.addContestVoteToStatus(slug, id)
687
+ );
688
+ }
689
+ removeContestVoteFromStatus(slug, id) {
690
+ return this.http.requestVoid(
691
+ CatalystEndpoint.removeContestVoteFromStatus(slug, id)
692
+ );
693
+ }
694
+ getContestVotes(slug) {
695
+ return this.http.request(CatalystEndpoint.getContestVotes(slug));
696
+ }
697
+ searchContest(state, q) {
698
+ return this.http.request(CatalystEndpoint.searchContest(state, q));
699
+ }
520
700
  };
521
701
 
522
702
  // 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.1",
3
+ "version": "0.3.1",
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",