@natsuneko-laboratory/catalyst-sdk 0.4.1 → 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>;
@@ -730,6 +733,8 @@ declare const CatalystEndpoint: {
730
733
  readonly listAlbums: (username: string, includeSmartAlbums?: boolean) => Endpoint;
731
734
  readonly searchAlbum: (q: string, includeSmartAlbums?: boolean) => Endpoint;
732
735
  readonly customReactions: () => Endpoint;
736
+ readonly block: (data: CatalystRelationshipRequest) => Endpoint;
737
+ readonly unblock: (data: CatalystRelationshipRequest) => Endpoint;
733
738
  readonly relationships: (id: string) => Endpoint;
734
739
  readonly follow: (data: CatalystRelationshipRequest) => Endpoint;
735
740
  readonly remove: (data: CatalystRelationshipRequest) => Endpoint;
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>;
@@ -730,6 +733,8 @@ declare const CatalystEndpoint: {
730
733
  readonly listAlbums: (username: string, includeSmartAlbums?: boolean) => Endpoint;
731
734
  readonly searchAlbum: (q: string, includeSmartAlbums?: boolean) => Endpoint;
732
735
  readonly customReactions: () => Endpoint;
736
+ readonly block: (data: CatalystRelationshipRequest) => Endpoint;
737
+ readonly unblock: (data: CatalystRelationshipRequest) => Endpoint;
733
738
  readonly relationships: (id: string) => Endpoint;
734
739
  readonly follow: (data: CatalystRelationshipRequest) => Endpoint;
735
740
  readonly remove: (data: CatalystRelationshipRequest) => Endpoint;
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
  },
@@ -609,6 +623,12 @@ var CatalystClient = class {
609
623
  return this.http.request(CatalystEndpoint.customReactions());
610
624
  }
611
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
+ }
612
632
  relationships(id) {
613
633
  return this.http.request(CatalystEndpoint.relationships(id));
614
634
  }
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
  },
@@ -560,6 +574,12 @@ var CatalystClient = class {
560
574
  return this.http.request(CatalystEndpoint.customReactions());
561
575
  }
562
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
+ }
563
583
  relationships(id) {
564
584
  return this.http.request(CatalystEndpoint.relationships(id));
565
585
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natsuneko-laboratory/catalyst-sdk",
3
- "version": "0.4.1",
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",