@go-avro/avro-js 0.0.2-beta.44 → 0.0.2-beta.46

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.
@@ -1,8 +1,8 @@
1
+ import { InfiniteData, UseInfiniteQueryResult, useMutation, useQuery, UseQueryResult } from '@tanstack/react-query';
1
2
  import { AuthManager } from '../auth/AuthManager';
2
3
  import { _Event, Bill, Company, Job, LineItem, ServiceMonth, Session, User } from '../types/api';
3
4
  import { CancelToken, RetryStrategy } from '../types/client';
4
5
  import { StandardError } from '../types/error';
5
- import { InfiniteData, UseInfiniteQueryResult, useMutation, useQuery, UseQueryResult } from '@tanstack/react-query';
6
6
  export interface AvroQueryClientConfig {
7
7
  baseUrl: string;
8
8
  authManager: AuthManager;
@@ -62,9 +62,7 @@ declare module '../client/QueryClient' {
62
62
  useGetSelf(): UseQueryResult<User, StandardError>;
63
63
  useGetBill(billId: string): UseQueryResult<Bill, StandardError>;
64
64
  useGetUserSessions(): UseQueryResult<Session[], StandardError>;
65
- useCreateUserSession(selectedCompany: {
66
- id: string;
67
- } | null, usersTeams: any[]): ReturnType<typeof useMutation<{
65
+ useCreateUserSession(): ReturnType<typeof useMutation<{
68
66
  id: string;
69
67
  }, StandardError, {
70
68
  companyId: string;
@@ -88,7 +86,9 @@ declare module '../client/QueryClient' {
88
86
  companyId: string;
89
87
  jobData: Partial<Job>;
90
88
  }>>;
91
- useUpdateUserSession(): ReturnType<typeof useMutation<void, StandardError, {
89
+ useUpdateUserSession(): ReturnType<typeof useMutation<{
90
+ msg: string;
91
+ }, StandardError, {
92
92
  sessionId: string;
93
93
  updates: Partial<Session>;
94
94
  }>>;
@@ -1,5 +1,5 @@
1
- import { AvroQueryClient } from '../../client/QueryClient';
2
1
  import { useQueryClient, useInfiniteQuery, useQuery, useMutation } from '@tanstack/react-query';
2
+ import { AvroQueryClient } from '../../client/QueryClient';
3
3
  AvroQueryClient.prototype.useGetBills = function (companyGuid, body) {
4
4
  const queryClient = useQueryClient();
5
5
  const result = useInfiniteQuery({
@@ -1,5 +1,5 @@
1
- import { AvroQueryClient } from '../../client/QueryClient';
2
1
  import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
2
+ import { AvroQueryClient } from '../../client/QueryClient';
3
3
  AvroQueryClient.prototype.useGetCompanies = function (options = {}) {
4
4
  return useQuery({
5
5
  queryKey: ['/company/list'],
@@ -1,5 +1,5 @@
1
- import { AvroQueryClient } from '../../client/QueryClient';
2
1
  import { useQueryClient, useInfiniteQuery, useQuery, useMutation } from '@tanstack/react-query';
2
+ import { AvroQueryClient } from '../../client/QueryClient';
3
3
  AvroQueryClient.prototype.useGetEvents = function (companyGuid, body) {
4
4
  const queryClient = useQueryClient();
5
5
  const result = useInfiniteQuery({
@@ -1,5 +1,5 @@
1
- import { AvroQueryClient } from '../../client/QueryClient';
2
1
  import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
2
+ import { AvroQueryClient } from '../../client/QueryClient';
3
3
  AvroQueryClient.prototype.useGetJobs = function (companyGuid, body, total = 0, onProgress, isMainLoad = false) {
4
4
  const queryClient = useQueryClient();
5
5
  return useQuery({
@@ -1,5 +1,5 @@
1
- import { AvroQueryClient } from '../../client/QueryClient';
2
1
  import { useQueryClient, useInfiniteQuery, useMutation } from '@tanstack/react-query';
2
+ import { AvroQueryClient } from '../../client/QueryClient';
3
3
  AvroQueryClient.prototype.useGetMonths = function (companyGuid, body) {
4
4
  const queryClient = useQueryClient();
5
5
  const result = useInfiniteQuery({
@@ -1,5 +1,5 @@
1
- import { AvroQueryClient } from '../../client/QueryClient';
2
1
  import { useQuery } from '@tanstack/react-query';
2
+ import { AvroQueryClient } from '../../client/QueryClient';
3
3
  AvroQueryClient.prototype.useGetRoot = function () {
4
4
  return useQuery({
5
5
  queryKey: ['health'],
@@ -1,5 +1,5 @@
1
- import { AvroQueryClient } from '../../client/QueryClient';
2
1
  import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
2
+ import { AvroQueryClient } from '../../client/QueryClient';
3
3
  AvroQueryClient.prototype.useGetRoutes = function (companyGuid, body, total = 0, onProgress) {
4
4
  const queryClient = useQueryClient();
5
5
  return useQuery({
@@ -1,5 +1,5 @@
1
- import { AvroQueryClient } from "../../client/QueryClient";
2
1
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
2
+ import { AvroQueryClient } from "../../client/QueryClient";
3
3
  AvroQueryClient.prototype.useGetUserSessions = function () {
4
4
  return useQuery({
5
5
  queryKey: ['sessions'],
@@ -1,5 +1,5 @@
1
- import { AvroQueryClient } from "../../client/QueryClient";
2
1
  import { useQuery } from "@tanstack/react-query";
2
+ import { AvroQueryClient } from "../../client/QueryClient";
3
3
  AvroQueryClient.prototype.useGetUser = function (userId) {
4
4
  return useQuery({
5
5
  queryKey: ['user', userId],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "0.0.2-beta.44",
3
+ "version": "0.0.2-beta.46",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",