@go-avro/avro-js 0.0.2-beta.68 → 0.0.2-beta.69
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/QueryClient.d.ts +3 -1
- package/dist/client/hooks/analytics.d.ts +1 -0
- package/dist/client/hooks/analytics.js +10 -0
- package/dist/client/hooks/avro.d.ts +1 -0
- package/dist/client/hooks/avro.js +9 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Socket } from 'socket.io-client';
|
|
2
2
|
import { InfiniteData, UseInfiniteQueryResult, useMutation, UseQueryResult } from '@tanstack/react-query';
|
|
3
3
|
import { AuthManager } from '../auth/AuthManager';
|
|
4
|
-
import { _Event, ApiInfo, Bill, Break, Chat, Company, Job, LineItem, LoginResponse, Message, Plan, Route, ServiceMonth, Session, User, UserCompanyAssociation } from '../types/api';
|
|
4
|
+
import { _Event, ApiInfo, Avro, Bill, Break, Chat, Company, Job, LineItem, LoginResponse, Message, Plan, Route, ServiceMonth, Session, User, UserCompanyAssociation } from '../types/api';
|
|
5
5
|
import { Tokens } from '../types/auth';
|
|
6
6
|
import { CancelToken, RetryStrategy } from '../types/client';
|
|
7
7
|
import { StandardError } from '../types/error';
|
|
@@ -74,6 +74,7 @@ declare module '../client/QueryClient' {
|
|
|
74
74
|
name: string;
|
|
75
75
|
id: string;
|
|
76
76
|
}[], StandardError>;
|
|
77
|
+
useGetAnalytics(): UseQueryResult<any, StandardError>;
|
|
77
78
|
useGetCompany(companyId: string): UseQueryResult<Company, StandardError>;
|
|
78
79
|
useGetJob(jobId: string): UseQueryResult<Job, StandardError>;
|
|
79
80
|
useGetEvent(eventId: string): UseQueryResult<_Event, StandardError>;
|
|
@@ -83,6 +84,7 @@ declare module '../client/QueryClient' {
|
|
|
83
84
|
useGetRoute(routeId: string): UseQueryResult<Route, StandardError>;
|
|
84
85
|
useGetChat(chatId: string): UseQueryResult<Chat, StandardError>;
|
|
85
86
|
useGetUserSessions(): UseQueryResult<Session[], StandardError>;
|
|
87
|
+
useGetAvro(): UseQueryResult<Avro, StandardError>;
|
|
86
88
|
useSearchUsers(searchUsername: string): UseQueryResult<User[], StandardError>;
|
|
87
89
|
useCreateEvent(): ReturnType<typeof useMutation<{
|
|
88
90
|
id: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
2
|
+
import { AvroQueryClient } from "../../client/QueryClient";
|
|
3
|
+
AvroQueryClient.prototype.useGetAnalytics = function () {
|
|
4
|
+
const queryClient = useQueryClient();
|
|
5
|
+
return useQuery({
|
|
6
|
+
queryKey: ['analytics'],
|
|
7
|
+
queryFn: () => this.post('/avro/analytics', null),
|
|
8
|
+
enabled: true,
|
|
9
|
+
});
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useQuery } from "@tanstack/react-query";
|
|
2
|
+
import { AvroQueryClient } from "../../client/QueryClient";
|
|
3
|
+
AvroQueryClient.prototype.useGetAvro = function () {
|
|
4
|
+
return useQuery({
|
|
5
|
+
queryKey: ['avro'],
|
|
6
|
+
queryFn: () => this.get('/avro'),
|
|
7
|
+
enabled: true,
|
|
8
|
+
});
|
|
9
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ import './client/hooks/sessions';
|
|
|
16
16
|
import './client/hooks/chats';
|
|
17
17
|
import './client/hooks/messages';
|
|
18
18
|
import './client/hooks/plans';
|
|
19
|
+
import './client/hooks/analytics';
|
|
20
|
+
import './client/hooks/avro';
|
|
19
21
|
export * from './types/api';
|
|
20
22
|
export * from './types/auth';
|
|
21
23
|
export * from './types/error';
|
package/dist/index.js
CHANGED
|
@@ -16,6 +16,8 @@ import './client/hooks/sessions';
|
|
|
16
16
|
import './client/hooks/chats';
|
|
17
17
|
import './client/hooks/messages';
|
|
18
18
|
import './client/hooks/plans';
|
|
19
|
+
import './client/hooks/analytics';
|
|
20
|
+
import './client/hooks/avro';
|
|
19
21
|
export * from './types/api';
|
|
20
22
|
export * from './types/auth';
|
|
21
23
|
export * from './types/error';
|