@ventlio/tanstack-query 0.2.79 → 0.2.80

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.
@@ -30,7 +30,7 @@ export declare const usePostRequest: <TResponse>({ path, isFormData, baseUrl, he
30
30
  data: any;
31
31
  requestConfig?: Omit<IMakeRequest, "body"> | undefined;
32
32
  }, unknown>;
33
- post: <T>(data: T, options?: MutateOptions<IRequestSuccess<TResponse>, IRequestError, {
33
+ post: <T>(data?: T | undefined, options?: MutateOptions<IRequestSuccess<TResponse>, IRequestError, {
34
34
  data: T;
35
35
  requestConfig?: Omit<IMakeRequest, "body"> | undefined;
36
36
  }, unknown> | undefined, requestConfig?: Omit<IMakeRequest, 'body'>) => Promise<IRequestSuccess<TResponse>>;
@@ -60,7 +60,7 @@ export declare const usePostRequest: <TResponse>({ path, isFormData, baseUrl, he
60
60
  data: any;
61
61
  requestConfig?: Omit<IMakeRequest, "body"> | undefined;
62
62
  }, unknown>;
63
- post: <T>(data: T, options?: MutateOptions<IRequestSuccess<TResponse>, IRequestError, {
63
+ post: <T>(data?: T | undefined, options?: MutateOptions<IRequestSuccess<TResponse>, IRequestError, {
64
64
  data: T;
65
65
  requestConfig?: Omit<IMakeRequest, "body"> | undefined;
66
66
  }, unknown> | undefined, requestConfig?: Omit<IMakeRequest, 'body'>) => Promise<IRequestSuccess<TResponse>>;
@@ -90,7 +90,7 @@ export declare const usePostRequest: <TResponse>({ path, isFormData, baseUrl, he
90
90
  data: any;
91
91
  requestConfig?: Omit<IMakeRequest, "body"> | undefined;
92
92
  }, unknown>;
93
- post: <T>(data: T, options?: MutateOptions<IRequestSuccess<TResponse>, IRequestError, {
93
+ post: <T>(data?: T | undefined, options?: MutateOptions<IRequestSuccess<TResponse>, IRequestError, {
94
94
  data: T;
95
95
  requestConfig?: Omit<IMakeRequest, "body"> | undefined;
96
96
  }, unknown> | undefined, requestConfig?: Omit<IMakeRequest, 'body'>) => Promise<IRequestSuccess<TResponse>>;
@@ -120,7 +120,7 @@ export declare const usePostRequest: <TResponse>({ path, isFormData, baseUrl, he
120
120
  data: any;
121
121
  requestConfig?: Omit<IMakeRequest, "body"> | undefined;
122
122
  }, unknown>;
123
- post: <T>(data: T, options?: MutateOptions<IRequestSuccess<TResponse>, IRequestError, {
123
+ post: <T>(data?: T | undefined, options?: MutateOptions<IRequestSuccess<TResponse>, IRequestError, {
124
124
  data: T;
125
125
  requestConfig?: Omit<IMakeRequest, "body"> | undefined;
126
126
  }, unknown> | undefined, requestConfig?: Omit<IMakeRequest, 'body'>) => Promise<IRequestSuccess<TResponse>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ventlio/tanstack-query",
3
- "version": "0.2.79",
3
+ "version": "0.2.80",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "contributors": [
@@ -79,7 +79,7 @@ export const usePostRequest = <TResponse>({
79
79
  >(async (postData) => new Promise<IRequestSuccess<TResponse>>((res, rej) => sendRequest(res, rej, postData)));
80
80
 
81
81
  const post = async <T>(
82
- data: T,
82
+ data?: T,
83
83
  options?:
84
84
  | MutateOptions<
85
85
  IRequestSuccess<TResponse>,