@natsuneko-laboratory/catalyst-sdk 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -203,6 +203,7 @@ interface CatalystRelationships {
203
203
  isMyself: boolean;
204
204
  isFollowing: boolean;
205
205
  isFollowed: boolean;
206
+ isBlocking: boolean;
206
207
  }
207
208
  interface CatalystRelationshipRequest {
208
209
  userId: string;
@@ -438,6 +439,8 @@ declare class CatalystClient {
438
439
  listAlbums(username: string, includeSmartAlbums?: boolean): Promise<CatalystSmartAlbums>;
439
440
  searchAlbums(q: string, includeSmartAlbums?: boolean): Promise<CatalystSmartAlbums>;
440
441
  customReactions(): Promise<CatalystCustomReaction[]>;
442
+ block(data: CatalystRelationshipRequest): Promise<void>;
443
+ unblock(data: CatalystRelationshipRequest): Promise<void>;
441
444
  relationships(id: string): Promise<CatalystRelationships>;
442
445
  follow(data: CatalystRelationshipRequest): Promise<void>;
443
446
  remove(data: CatalystRelationshipRequest): Promise<void>;
@@ -570,7 +573,8 @@ declare class CatalystClient {
570
573
  contests: CatalystContest[];
571
574
  }>;
572
575
  reportStatus(id: string, data: ReportRequest): Promise<void>;
573
- privacySettings(data: CatalystPrivacySettingsRequest): Promise<CatalystPrivacySettings>;
576
+ getPrivacySettings(): Promise<CatalystPrivacySettings>;
577
+ updatePrivacySettings(data: CatalystPrivacySettingsRequest): Promise<CatalystPrivacySettings>;
574
578
  }
575
579
 
576
580
  declare class EgeriaClient {
@@ -729,6 +733,8 @@ declare const CatalystEndpoint: {
729
733
  readonly listAlbums: (username: string, includeSmartAlbums?: boolean) => Endpoint;
730
734
  readonly searchAlbum: (q: string, includeSmartAlbums?: boolean) => Endpoint;
731
735
  readonly customReactions: () => Endpoint;
736
+ readonly block: (data: CatalystRelationshipRequest) => Endpoint;
737
+ readonly unblock: (data: CatalystRelationshipRequest) => Endpoint;
732
738
  readonly relationships: (id: string) => Endpoint;
733
739
  readonly follow: (data: CatalystRelationshipRequest) => Endpoint;
734
740
  readonly remove: (data: CatalystRelationshipRequest) => Endpoint;
@@ -823,7 +829,8 @@ declare const CatalystEndpoint: {
823
829
  readonly getContestVotes: (slug: string) => Endpoint;
824
830
  readonly searchContest: (state: string, q?: string) => Endpoint;
825
831
  readonly reportStatus: (id: string, data: ReportRequest) => Endpoint;
826
- readonly privacySettings: (data: CatalystPrivacySettingsRequest) => Endpoint;
832
+ readonly getPrivacySettings: () => Endpoint;
833
+ readonly updatePrivacySettings: (data: CatalystPrivacySettingsRequest) => Endpoint;
827
834
  };
828
835
 
829
836
  declare const EgeriaEndpoint: {
package/dist/index.d.ts CHANGED
@@ -203,6 +203,7 @@ interface CatalystRelationships {
203
203
  isMyself: boolean;
204
204
  isFollowing: boolean;
205
205
  isFollowed: boolean;
206
+ isBlocking: boolean;
206
207
  }
207
208
  interface CatalystRelationshipRequest {
208
209
  userId: string;
@@ -438,6 +439,8 @@ declare class CatalystClient {
438
439
  listAlbums(username: string, includeSmartAlbums?: boolean): Promise<CatalystSmartAlbums>;
439
440
  searchAlbums(q: string, includeSmartAlbums?: boolean): Promise<CatalystSmartAlbums>;
440
441
  customReactions(): Promise<CatalystCustomReaction[]>;
442
+ block(data: CatalystRelationshipRequest): Promise<void>;
443
+ unblock(data: CatalystRelationshipRequest): Promise<void>;
441
444
  relationships(id: string): Promise<CatalystRelationships>;
442
445
  follow(data: CatalystRelationshipRequest): Promise<void>;
443
446
  remove(data: CatalystRelationshipRequest): Promise<void>;
@@ -570,7 +573,8 @@ declare class CatalystClient {
570
573
  contests: CatalystContest[];
571
574
  }>;
572
575
  reportStatus(id: string, data: ReportRequest): Promise<void>;
573
- privacySettings(data: CatalystPrivacySettingsRequest): Promise<CatalystPrivacySettings>;
576
+ getPrivacySettings(): Promise<CatalystPrivacySettings>;
577
+ updatePrivacySettings(data: CatalystPrivacySettingsRequest): Promise<CatalystPrivacySettings>;
574
578
  }
575
579
 
576
580
  declare class EgeriaClient {
@@ -729,6 +733,8 @@ declare const CatalystEndpoint: {
729
733
  readonly listAlbums: (username: string, includeSmartAlbums?: boolean) => Endpoint;
730
734
  readonly searchAlbum: (q: string, includeSmartAlbums?: boolean) => Endpoint;
731
735
  readonly customReactions: () => Endpoint;
736
+ readonly block: (data: CatalystRelationshipRequest) => Endpoint;
737
+ readonly unblock: (data: CatalystRelationshipRequest) => Endpoint;
732
738
  readonly relationships: (id: string) => Endpoint;
733
739
  readonly follow: (data: CatalystRelationshipRequest) => Endpoint;
734
740
  readonly remove: (data: CatalystRelationshipRequest) => Endpoint;
@@ -823,7 +829,8 @@ declare const CatalystEndpoint: {
823
829
  readonly getContestVotes: (slug: string) => Endpoint;
824
830
  readonly searchContest: (state: string, q?: string) => Endpoint;
825
831
  readonly reportStatus: (id: string, data: ReportRequest) => Endpoint;
826
- readonly privacySettings: (data: CatalystPrivacySettingsRequest) => Endpoint;
832
+ readonly getPrivacySettings: () => Endpoint;
833
+ readonly updatePrivacySettings: (data: CatalystPrivacySettingsRequest) => Endpoint;
827
834
  };
828
835
 
829
836
  declare const EgeriaEndpoint: {
package/dist/index.js CHANGED
@@ -213,6 +213,20 @@ var CatalystEndpoint = {
213
213
  customReactions() {
214
214
  return { path: "/catalyst/v1/reactions", method: "GET" };
215
215
  },
216
+ block(data) {
217
+ return {
218
+ path: "/catalyst/v1/blocks",
219
+ method: "POST",
220
+ body: data
221
+ };
222
+ },
223
+ unblock(data) {
224
+ return {
225
+ path: "/catalyst/v1/blocks",
226
+ method: "DELETE",
227
+ body: data
228
+ };
229
+ },
216
230
  relationships(id) {
217
231
  return { path: `/catalyst/v1/relationships/${id}`, method: "GET" };
218
232
  },
@@ -555,10 +569,16 @@ var CatalystEndpoint = {
555
569
  body: data
556
570
  };
557
571
  },
558
- privacySettings(data) {
572
+ getPrivacySettings() {
559
573
  return {
560
574
  path: "/catalyst/v1/privacy/settings",
561
- method: "POST",
575
+ method: "GET"
576
+ };
577
+ },
578
+ updatePrivacySettings(data) {
579
+ return {
580
+ path: "/catalyst/v1/privacy/settings",
581
+ method: "PATCH",
562
582
  body: data
563
583
  };
564
584
  }
@@ -603,6 +623,12 @@ var CatalystClient = class {
603
623
  return this.http.request(CatalystEndpoint.customReactions());
604
624
  }
605
625
  // Relationships
626
+ block(data) {
627
+ return this.http.requestVoid(CatalystEndpoint.block(data));
628
+ }
629
+ unblock(data) {
630
+ return this.http.requestVoid(CatalystEndpoint.unblock(data));
631
+ }
606
632
  relationships(id) {
607
633
  return this.http.request(CatalystEndpoint.relationships(id));
608
634
  }
@@ -798,8 +824,11 @@ var CatalystClient = class {
798
824
  return this.http.requestVoid(CatalystEndpoint.reportStatus(id, data));
799
825
  }
800
826
  // privacy
801
- privacySettings(data) {
802
- return this.http.request(CatalystEndpoint.privacySettings(data));
827
+ getPrivacySettings() {
828
+ return this.http.request(CatalystEndpoint.getPrivacySettings());
829
+ }
830
+ updatePrivacySettings(data) {
831
+ return this.http.request(CatalystEndpoint.updatePrivacySettings(data));
803
832
  }
804
833
  };
805
834
 
package/dist/index.mjs CHANGED
@@ -164,6 +164,20 @@ var CatalystEndpoint = {
164
164
  customReactions() {
165
165
  return { path: "/catalyst/v1/reactions", method: "GET" };
166
166
  },
167
+ block(data) {
168
+ return {
169
+ path: "/catalyst/v1/blocks",
170
+ method: "POST",
171
+ body: data
172
+ };
173
+ },
174
+ unblock(data) {
175
+ return {
176
+ path: "/catalyst/v1/blocks",
177
+ method: "DELETE",
178
+ body: data
179
+ };
180
+ },
167
181
  relationships(id) {
168
182
  return { path: `/catalyst/v1/relationships/${id}`, method: "GET" };
169
183
  },
@@ -506,10 +520,16 @@ var CatalystEndpoint = {
506
520
  body: data
507
521
  };
508
522
  },
509
- privacySettings(data) {
523
+ getPrivacySettings() {
510
524
  return {
511
525
  path: "/catalyst/v1/privacy/settings",
512
- method: "POST",
526
+ method: "GET"
527
+ };
528
+ },
529
+ updatePrivacySettings(data) {
530
+ return {
531
+ path: "/catalyst/v1/privacy/settings",
532
+ method: "PATCH",
513
533
  body: data
514
534
  };
515
535
  }
@@ -554,6 +574,12 @@ var CatalystClient = class {
554
574
  return this.http.request(CatalystEndpoint.customReactions());
555
575
  }
556
576
  // Relationships
577
+ block(data) {
578
+ return this.http.requestVoid(CatalystEndpoint.block(data));
579
+ }
580
+ unblock(data) {
581
+ return this.http.requestVoid(CatalystEndpoint.unblock(data));
582
+ }
557
583
  relationships(id) {
558
584
  return this.http.request(CatalystEndpoint.relationships(id));
559
585
  }
@@ -749,8 +775,11 @@ var CatalystClient = class {
749
775
  return this.http.requestVoid(CatalystEndpoint.reportStatus(id, data));
750
776
  }
751
777
  // privacy
752
- privacySettings(data) {
753
- return this.http.request(CatalystEndpoint.privacySettings(data));
778
+ getPrivacySettings() {
779
+ return this.http.request(CatalystEndpoint.getPrivacySettings());
780
+ }
781
+ updatePrivacySettings(data) {
782
+ return this.http.request(CatalystEndpoint.updatePrivacySettings(data));
754
783
  }
755
784
  };
756
785
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natsuneko-laboratory/catalyst-sdk",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "TypeScript/JavaScript SDK for the Natsuneko Laboratory platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",