@go-avro/avro-js 0.0.2-beta.149 → 0.0.2-beta.150
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.
|
@@ -123,6 +123,14 @@ declare module '../client/QueryClient' {
|
|
|
123
123
|
useGetUserSessions(): UseQueryResult<Session[], StandardError>;
|
|
124
124
|
useGetAvro(): UseQueryResult<Avro, StandardError>;
|
|
125
125
|
useSearchUsers(searchUsername: string): UseQueryResult<User[], StandardError>;
|
|
126
|
+
useAcceptProposal(proposal_id: string): ReturnType<typeof useMutation<{
|
|
127
|
+
msg: string;
|
|
128
|
+
}, StandardError, {
|
|
129
|
+
tasks: {
|
|
130
|
+
id: string;
|
|
131
|
+
status: string;
|
|
132
|
+
}[];
|
|
133
|
+
}>>;
|
|
126
134
|
useCreateProposal(): ReturnType<typeof useMutation<{
|
|
127
135
|
id: string;
|
|
128
136
|
}, StandardError, {
|
|
@@ -7,6 +7,13 @@ AvroQueryClient.prototype.useCreateProposal = function () {
|
|
|
7
7
|
},
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
+
AvroQueryClient.prototype.useAcceptProposal = function (proposal_id) {
|
|
11
|
+
return useMutation({
|
|
12
|
+
mutationFn: async (data) => {
|
|
13
|
+
return this.post(`/proposal/${proposal_id}/accept`, JSON.stringify(data), undefined, { "Content-Type": "application/json" });
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
};
|
|
10
17
|
AvroQueryClient.prototype.useGetProposal = function (proposal_id) {
|
|
11
18
|
return useQuery({
|
|
12
19
|
queryKey: ['proposal', proposal_id],
|