@redseat/api 0.0.14 → 0.0.15

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/client.d.ts CHANGED
@@ -25,6 +25,7 @@ export declare class RedseatClient {
25
25
  setToken(token: string | IToken): void;
26
26
  get<T = unknown>(url: string, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<T, any>>;
27
27
  post<T = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<T, any>>;
28
+ postForm<T = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<T, any>>;
28
29
  put<T = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<T, any>>;
29
30
  patch<T = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<T, any>>;
30
31
  delete<T = unknown>(url: string, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<T, any>>;
package/dist/client.js CHANGED
@@ -137,6 +137,9 @@ export class RedseatClient {
137
137
  async post(url, data, config) {
138
138
  return this.axios.post(url, data, config);
139
139
  }
140
+ async postForm(url, data, config) {
141
+ return this.axios.postForm(url, data, config);
142
+ }
140
143
  async put(url, data, config) {
141
144
  return this.axios.put(url, data, config);
142
145
  }
package/dist/library.d.ts CHANGED
@@ -60,6 +60,9 @@ export interface LibraryHttpClient {
60
60
  post<T = unknown>(url: string, data?: unknown, config?: any): Promise<{
61
61
  data: T;
62
62
  }>;
63
+ postForm<T = unknown>(url: string, data?: unknown, config?: any): Promise<{
64
+ data: T;
65
+ }>;
63
66
  put<T = unknown>(url: string, data?: unknown, config?: any): Promise<{
64
67
  data: T;
65
68
  }>;
package/dist/library.js CHANGED
@@ -605,7 +605,7 @@ export class LibraryApi {
605
605
  }
606
606
  };
607
607
  }
608
- const res = await this.client.post(this.getUrl('/medias'), formData, config);
608
+ const res = await this.client.postForm(this.getUrl('/medias'), formData, config);
609
609
  return res.data;
610
610
  }
611
611
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redseat/api",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "description": "TypeScript API client library for interacting with Redseat servers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",