@redseat/api 0.4.5 → 0.4.6

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/library.d.ts CHANGED
@@ -127,6 +127,8 @@ export declare class LibraryApi {
127
127
  tagMerge(fromId: string, intoId: string): Promise<ITag>;
128
128
  tagAddAlt(tagId: string, alt: string): Promise<ITag>;
129
129
  tagRemoveAlt(tagId: string, alt: string): Promise<ITag>;
130
+ tagAddOtherId(tagId: string, otherId: string): Promise<ITag>;
131
+ tagRemoveOtherId(tagId: string, otherId: string): Promise<ITag>;
130
132
  mediaTransfer(formData: FormData): Promise<void>;
131
133
  mediaTransferMany(medias: string[], deleteOriginal: boolean, toLibraryId: string): Promise<void>;
132
134
  mediaTransferSingle(mediaId: string, toLibraryId: string, formData: FormData, params?: Map<string, string>): Promise<void>;
@@ -287,6 +289,14 @@ export declare class LibraryApi {
287
289
  * @returns Raw axios response with stream data - use response.data for the stream
288
290
  */
289
291
  processRequestStream(request: RsRequest): Promise<AxiosResponse>;
292
+ /**
293
+ * Process a request and return the response as a Blob.
294
+ * Use this in environments where ReadableStream is not supported (e.g. React Native).
295
+ * Same endpoint as processRequestStream but with responseType 'blob'.
296
+ * @param request - The request to process and retrieve as a blob
297
+ * @returns The response blob (e.g. image data)
298
+ */
299
+ processRequestBlob(request: RsRequest): Promise<Blob>;
290
300
  /**
291
301
  * Add a request to the processing queue.
292
302
  * @param request - The request to add for processing
package/dist/library.js CHANGED
@@ -295,6 +295,14 @@ export class LibraryApi {
295
295
  const res = await this.client.patch(this.getUrl(`/tags/${tagId}`), { removeAlts: [alt] });
296
296
  return res.data;
297
297
  }
298
+ async tagAddOtherId(tagId, otherId) {
299
+ const res = await this.client.patch(this.getUrl(`/tags/${tagId}`), { addOtherids: [otherId] });
300
+ return res.data;
301
+ }
302
+ async tagRemoveOtherId(tagId, otherId) {
303
+ const res = await this.client.patch(this.getUrl(`/tags/${tagId}`), { removeOtherids: [otherId] });
304
+ return res.data;
305
+ }
298
306
  async mediaTransfer(formData) {
299
307
  await this.client.put(this.getUrl('/medias/transfert'), formData);
300
308
  }
@@ -708,6 +716,17 @@ export class LibraryApi {
708
716
  async processRequestStream(request) {
709
717
  return this.client.post(this.getUrl('/plugins/requests/process/stream'), request, { responseType: 'stream' });
710
718
  }
719
+ /**
720
+ * Process a request and return the response as a Blob.
721
+ * Use this in environments where ReadableStream is not supported (e.g. React Native).
722
+ * Same endpoint as processRequestStream but with responseType 'blob'.
723
+ * @param request - The request to process and retrieve as a blob
724
+ * @returns The response blob (e.g. image data)
725
+ */
726
+ async processRequestBlob(request) {
727
+ const res = await this.client.post(this.getUrl('/plugins/requests/process/stream'), request, { responseType: 'blob' });
728
+ return res.data;
729
+ }
711
730
  /**
712
731
  * Add a request to the processing queue.
713
732
  * @param request - The request to add for processing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redseat/api",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "description": "TypeScript API client library for interacting with Redseat servers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",