@go-avro/avro-js 0.0.8-beta.0 → 0.0.8-beta.1

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.
@@ -164,10 +164,7 @@ declare module '../client/QueryClient' {
164
164
  payment_option_id: string;
165
165
  }[];
166
166
  }>>;
167
- useCreateMessage(chatId: string, body: {
168
- content: string;
169
- sent_at?: number;
170
- }): ReturnType<typeof useMutation<{
167
+ useCreateMessage(chatId: string): ReturnType<typeof useMutation<{
171
168
  id: string;
172
169
  }, StandardError, {
173
170
  content: string;
@@ -28,14 +28,15 @@ AvroQueryClient.prototype.useGetMessages = function (chatId, body) {
28
28
  }
29
29
  return result;
30
30
  };
31
- AvroQueryClient.prototype.useCreateMessage = function (chatId, body) {
31
+ AvroQueryClient.prototype.useCreateMessage = function (chatId) {
32
32
  const queryClient = this.getQueryClient();
33
33
  return useMutation({
34
- mutationFn: async ({ content, sent_at } = body) => {
34
+ mutationFn: async ({ content, sent_at, id }) => {
35
35
  const message = await this.post(`/chat/${chatId}/message`, {
36
36
  message: {
37
37
  content,
38
38
  sent_at: sent_at ?? Math.floor(Date.now() / 1000),
39
+ id,
39
40
  },
40
41
  });
41
42
  return message;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "0.0.8-beta.0",
3
+ "version": "0.0.8-beta.1",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",