supaapps-api-kit-client 0.2.0 → 0.3.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/ApiKitClient.d.ts +2 -2
- package/package.json +1 -1
- package/src/ApiKitClient.ts +3 -3
package/dist/ApiKitClient.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ export declare class ApiKitClient {
|
|
|
13
13
|
static getOne<T>(endpoint: string, params?: URLSearchParams): Promise<AxiosResponse<T>>;
|
|
14
14
|
static getPaginated<T>(endpoint: string, params?: URLSearchParams): Promise<AxiosResponse<PaginatedResponse<T>>>;
|
|
15
15
|
static post<T>(endpoint: string, data: T): Promise<AxiosResponse<T>>;
|
|
16
|
-
static put<T>(endpoint: string, data: T): Promise<AxiosResponse<T>>;
|
|
17
|
-
static patch<T>(endpoint: string, data: T): Promise<AxiosResponse<T>>;
|
|
16
|
+
static put<T>(endpoint: string, data: Partial<T>): Promise<AxiosResponse<T>>;
|
|
17
|
+
static patch<T>(endpoint: string, data: Partial<T>): Promise<AxiosResponse<T>>;
|
|
18
18
|
static delete<T>(endpoint: string): Promise<AxiosResponse<T>>;
|
|
19
19
|
}
|
|
20
20
|
export {};
|
package/package.json
CHANGED
package/src/ApiKitClient.ts
CHANGED
|
@@ -45,7 +45,7 @@ export class ApiKitClient {
|
|
|
45
45
|
this.checkInitialization();
|
|
46
46
|
return this.instance!.get<T>(endpoint, { params });
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
public static async getOne<T>(endpoint: string, params?: URLSearchParams): Promise<AxiosResponse<T>> {
|
|
50
50
|
this.checkInitialization();
|
|
51
51
|
return this.instance!.get<T>(endpoint, { params });
|
|
@@ -61,12 +61,12 @@ export class ApiKitClient {
|
|
|
61
61
|
return this.instance!.post<T>(endpoint, data);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
public static async put<T>(endpoint: string, data: T): Promise<AxiosResponse<T>> {
|
|
64
|
+
public static async put<T>(endpoint: string, data: Partial<T>): Promise<AxiosResponse<T>> {
|
|
65
65
|
this.checkInitialization();
|
|
66
66
|
return this.instance!.put<T>(endpoint, data);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
public static async patch<T>(endpoint: string, data: T): Promise<AxiosResponse<T>> {
|
|
69
|
+
public static async patch<T>(endpoint: string, data: Partial<T>): Promise<AxiosResponse<T>> {
|
|
70
70
|
this.checkInitialization();
|
|
71
71
|
return this.instance!.patch<T>(endpoint, data);
|
|
72
72
|
}
|