@go-avro/avro-js 0.0.42 → 0.0.44

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.
Files changed (83) hide show
  1. package/dist/auth/AuthManager.d.ts +3 -3
  2. package/dist/auth/AuthManager.js +24 -24
  3. package/dist/auth/storage.d.ts +1 -1
  4. package/dist/auth/storage.js +3 -3
  5. package/dist/client/AvroQueryClientProvider.d.ts +4 -4
  6. package/dist/client/AvroQueryClientProvider.js +3 -3
  7. package/dist/client/QueryClient.d.ts +15 -15
  8. package/dist/client/QueryClient.js +239 -259
  9. package/dist/client/core/fetch.js +9 -9
  10. package/dist/client/core/utils.js +4 -4
  11. package/dist/client/core/xhr.js +21 -21
  12. package/dist/client/hooks/analytics.js +12 -12
  13. package/dist/client/hooks/avro.js +4 -4
  14. package/dist/client/hooks/bills.js +36 -39
  15. package/dist/client/hooks/catalog_items.js +25 -31
  16. package/dist/client/hooks/chats.js +6 -6
  17. package/dist/client/hooks/companies.js +45 -57
  18. package/dist/client/hooks/email.d.ts +3 -3
  19. package/dist/client/hooks/email.js +5 -5
  20. package/dist/client/hooks/events.js +71 -81
  21. package/dist/client/hooks/groups.js +25 -31
  22. package/dist/client/hooks/jobs.js +29 -34
  23. package/dist/client/hooks/labels.js +25 -31
  24. package/dist/client/hooks/messages.js +7 -7
  25. package/dist/client/hooks/months.js +21 -21
  26. package/dist/client/hooks/plans.js +4 -4
  27. package/dist/client/hooks/prepayments.js +21 -21
  28. package/dist/client/hooks/proposal.js +11 -11
  29. package/dist/client/hooks/root.js +4 -4
  30. package/dist/client/hooks/routes.js +42 -53
  31. package/dist/client/hooks/sessions.js +33 -45
  32. package/dist/client/hooks/skills.js +22 -28
  33. package/dist/client/hooks/teams.js +26 -32
  34. package/dist/client/hooks/timecards.js +13 -13
  35. package/dist/client/hooks/users.js +39 -42
  36. package/dist/client/hooks/waivers.js +23 -23
  37. package/dist/index.d.ts +38 -38
  38. package/dist/index.js +37 -37
  39. package/dist/types/api/AdditionalCharge.d.ts +2 -2
  40. package/dist/types/api/Avro.d.ts +1 -1
  41. package/dist/types/api/Bill.d.ts +4 -4
  42. package/dist/types/api/Bill.js +4 -4
  43. package/dist/types/api/BillPayment.d.ts +2 -2
  44. package/dist/types/api/BillUser.d.ts +1 -1
  45. package/dist/types/api/CatalogItem.d.ts +1 -1
  46. package/dist/types/api/Chat.d.ts +2 -2
  47. package/dist/types/api/Company.d.ts +12 -12
  48. package/dist/types/api/CustomLineItem.d.ts +2 -2
  49. package/dist/types/api/Email.d.ts +2 -2
  50. package/dist/types/api/EmailNotification.d.ts +2 -2
  51. package/dist/types/api/Group.d.ts +1 -1
  52. package/dist/types/api/Job.d.ts +6 -6
  53. package/dist/types/api/Job.js +12 -12
  54. package/dist/types/api/LineItem.d.ts +1 -1
  55. package/dist/types/api/LineItem.js +12 -12
  56. package/dist/types/api/MemberState.d.ts +1 -1
  57. package/dist/types/api/Message.d.ts +1 -1
  58. package/dist/types/api/PaymentMethod.d.ts +1 -1
  59. package/dist/types/api/PaymentOption.d.ts +1 -1
  60. package/dist/types/api/PaymentType.js +2 -2
  61. package/dist/types/api/PlanPayment.d.ts +1 -1
  62. package/dist/types/api/Prepayment.d.ts +4 -4
  63. package/dist/types/api/Prepayment.js +1 -1
  64. package/dist/types/api/Route.d.ts +2 -2
  65. package/dist/types/api/Route.js +7 -7
  66. package/dist/types/api/RouteJob.d.ts +1 -1
  67. package/dist/types/api/ServiceMonth.d.ts +2 -2
  68. package/dist/types/api/Session.d.ts +2 -2
  69. package/dist/types/api/Task.d.ts +7 -7
  70. package/dist/types/api/Task.js +20 -22
  71. package/dist/types/api/Timecard.d.ts +1 -1
  72. package/dist/types/api/Timecard.js +4 -4
  73. package/dist/types/api/TimecardAction.js +6 -6
  74. package/dist/types/api/User.d.ts +4 -4
  75. package/dist/types/api/UserCompanyAssociation.d.ts +2 -2
  76. package/dist/types/api/UserCompanyAssociation.js +45 -45
  77. package/dist/types/api/_Event.d.ts +5 -5
  78. package/dist/types/api/_Event.js +1 -1
  79. package/dist/types/api.d.ts +44 -44
  80. package/dist/types/api.js +42 -42
  81. package/dist/types/cache.d.ts +1 -1
  82. package/dist/types/client.d.ts +1 -1
  83. package/package.json +2 -1
@@ -1,10 +1,10 @@
1
- import { useMutation, useQuery } from "@tanstack/react-query";
2
- import { AvroQueryClient } from "../../client/QueryClient";
1
+ import { useMutation, useQuery } from '@tanstack/react-query';
2
+ import { AvroQueryClient } from '../../client/QueryClient';
3
3
  AvroQueryClient.prototype.useGetCompanyTimecards = function (params = {}) {
4
4
  const companyId = params.companyId ?? this.companyId;
5
5
  return useQuery({
6
6
  queryKey: [
7
- "timecards",
7
+ 'timecards',
8
8
  companyId,
9
9
  params.periodStart ?? null,
10
10
  params.userCompanyId ?? null,
@@ -12,18 +12,18 @@ AvroQueryClient.prototype.useGetCompanyTimecards = function (params = {}) {
12
12
  ],
13
13
  queryFn: async () => {
14
14
  const search = new URLSearchParams();
15
- if (typeof params.periodStart === "number") {
16
- search.set("period_start", String(params.periodStart));
15
+ if (typeof params.periodStart === 'number') {
16
+ search.set('period_start', String(params.periodStart));
17
17
  }
18
18
  if (params.userCompanyId) {
19
- search.set("user_company_id", params.userCompanyId);
19
+ search.set('user_company_id', params.userCompanyId);
20
20
  }
21
21
  if (params.status) {
22
- search.set("status", params.status);
22
+ search.set('status', params.status);
23
23
  }
24
24
  const query = search.toString();
25
25
  const rsp = await this.get({
26
- path: `/company/${companyId}/timecards${query ? `?${query}` : ""}`,
26
+ path: `/company/${companyId}/timecards${query ? `?${query}` : ''}`,
27
27
  });
28
28
  return rsp.timecards ?? [];
29
29
  },
@@ -32,7 +32,7 @@ AvroQueryClient.prototype.useGetCompanyTimecards = function (params = {}) {
32
32
  };
33
33
  AvroQueryClient.prototype.useGetTimecard = function (timecardId, enabled = true) {
34
34
  return useQuery({
35
- queryKey: ["timecards", timecardId],
35
+ queryKey: ['timecards', timecardId],
36
36
  queryFn: async () => {
37
37
  const rsp = await this.get({
38
38
  path: `/timecard/${timecardId}`,
@@ -50,11 +50,11 @@ AvroQueryClient.prototype.useCreateTimecard = function () {
50
50
  return this.post({
51
51
  path: `/company/${targetCompanyId}/timecard`,
52
52
  data: JSON.stringify(data),
53
- headers: { "Content-Type": "application/json" },
53
+ headers: { 'Content-Type': 'application/json' },
54
54
  });
55
55
  },
56
56
  onSuccess: () => {
57
- queryClient.invalidateQueries({ queryKey: ["timecards"] });
57
+ queryClient.invalidateQueries({ queryKey: ['timecards'] });
58
58
  },
59
59
  });
60
60
  };
@@ -65,11 +65,11 @@ AvroQueryClient.prototype.useUpdateTimecard = function () {
65
65
  return this.put({
66
66
  path: `/timecard/${timecardId}`,
67
67
  data: JSON.stringify(updates),
68
- headers: { "Content-Type": "application/json" },
68
+ headers: { 'Content-Type': 'application/json' },
69
69
  });
70
70
  },
71
71
  onSuccess: () => {
72
- queryClient.invalidateQueries({ queryKey: ["timecards"] });
72
+ queryClient.invalidateQueries({ queryKey: ['timecards'] });
73
73
  },
74
74
  });
75
75
  };
@@ -1,16 +1,16 @@
1
- import { useMutation, useQuery } from "@tanstack/react-query";
2
- import { AvroQueryClient } from "../../client/QueryClient";
3
- import { AuthState } from "../../types/auth";
1
+ import { useMutation, useQuery } from '@tanstack/react-query';
2
+ import { AvroQueryClient } from '../../client/QueryClient';
3
+ import { AuthState } from '../../types/auth';
4
4
  AvroQueryClient.prototype.useGetUser = function (userId) {
5
5
  return useQuery({
6
- queryKey: ["users", userId],
6
+ queryKey: ['users', userId],
7
7
  queryFn: () => this.get({ path: `/user/${userId}` }),
8
8
  enabled: Boolean(userId),
9
9
  });
10
10
  };
11
11
  AvroQueryClient.prototype.useSearchUsers = function (searchUsername) {
12
12
  return useQuery({
13
- queryKey: ["users", "search", searchUsername],
13
+ queryKey: ['users', 'search', searchUsername],
14
14
  queryFn: () => {
15
15
  if (!searchUsername)
16
16
  return Promise.resolve([]);
@@ -21,7 +21,7 @@ AvroQueryClient.prototype.useSearchUsers = function (searchUsername) {
21
21
  };
22
22
  AvroQueryClient.prototype.useGetSelf = function () {
23
23
  return useQuery({
24
- queryKey: ["user"],
24
+ queryKey: ['user'],
25
25
  queryFn: () => this.get({ path: `/user` }),
26
26
  enabled: this.getAuthState() === AuthState.AUTHENTICATED,
27
27
  });
@@ -31,14 +31,14 @@ AvroQueryClient.prototype.useCreateSelf = function () {
31
31
  return useMutation({
32
32
  mutationFn: async (data) => {
33
33
  return this.post({
34
- path: "/user",
34
+ path: '/user',
35
35
  data: JSON.stringify(data),
36
- headers: { "Content-Type": "application/json" },
36
+ headers: { 'Content-Type': 'application/json' },
37
37
  });
38
38
  },
39
39
  onSuccess: () => {
40
- queryClient.invalidateQueries({ queryKey: ["users"] });
41
- queryClient.invalidateQueries({ queryKey: ["user"] });
40
+ queryClient.invalidateQueries({ queryKey: ['users'] });
41
+ queryClient.invalidateQueries({ queryKey: ['user'] });
42
42
  },
43
43
  });
44
44
  };
@@ -47,14 +47,14 @@ AvroQueryClient.prototype.useCreateUser = function () {
47
47
  return useMutation({
48
48
  mutationFn: async (data) => {
49
49
  return this.post({
50
- path: "/user",
50
+ path: '/user',
51
51
  data: JSON.stringify(data),
52
- headers: { "Content-Type": "application/json" },
52
+ headers: { 'Content-Type': 'application/json' },
53
53
  });
54
54
  },
55
55
  onSuccess: () => {
56
- queryClient.invalidateQueries({ queryKey: ["users"] });
57
- queryClient.invalidateQueries({ queryKey: ["user"] });
56
+ queryClient.invalidateQueries({ queryKey: ['users'] });
57
+ queryClient.invalidateQueries({ queryKey: ['user'] });
58
58
  },
59
59
  });
60
60
  };
@@ -65,22 +65,22 @@ AvroQueryClient.prototype.useUpdateUser = function (userId) {
65
65
  return this.put({
66
66
  path: `/user/${userId}`,
67
67
  data: JSON.stringify(data),
68
- headers: { "Content-Type": "application/json" },
68
+ headers: { 'Content-Type': 'application/json' },
69
69
  });
70
70
  },
71
71
  onMutate: async (data) => {
72
- await queryClient.cancelQueries({ queryKey: ["user"] });
73
- await queryClient.cancelQueries({ queryKey: ["users", userId] });
74
- const previousSelf = queryClient.getQueryData(["user"]);
75
- const previousUser = queryClient.getQueryData(["users", userId]);
72
+ await queryClient.cancelQueries({ queryKey: ['user'] });
73
+ await queryClient.cancelQueries({ queryKey: ['users', userId] });
74
+ const previousSelf = queryClient.getQueryData(['user']);
75
+ const previousUser = queryClient.getQueryData(['users', userId]);
76
76
  if (previousSelf && previousSelf.id === userId) {
77
- queryClient.setQueryData(["user"], {
77
+ queryClient.setQueryData(['user'], {
78
78
  ...previousSelf,
79
79
  ...data,
80
80
  });
81
81
  }
82
82
  if (previousUser) {
83
- queryClient.setQueryData(["users", userId], {
83
+ queryClient.setQueryData(['users', userId], {
84
84
  ...previousUser,
85
85
  ...data,
86
86
  });
@@ -88,15 +88,15 @@ AvroQueryClient.prototype.useUpdateUser = function (userId) {
88
88
  return { previousSelf, previousUser };
89
89
  },
90
90
  onSuccess: () => {
91
- queryClient.invalidateQueries({ queryKey: ["users"] });
92
- queryClient.invalidateQueries({ queryKey: ["user"] });
91
+ queryClient.invalidateQueries({ queryKey: ['users'] });
92
+ queryClient.invalidateQueries({ queryKey: ['user'] });
93
93
  },
94
94
  onError: (err, _, context) => {
95
95
  if (context?.previousSelf) {
96
- queryClient.setQueryData(["user"], context.previousSelf);
96
+ queryClient.setQueryData(['user'], context.previousSelf);
97
97
  }
98
98
  if (context?.previousUser) {
99
- queryClient.setQueryData(["users", userId], context.previousUser);
99
+ queryClient.setQueryData(['users', userId], context.previousUser);
100
100
  }
101
101
  },
102
102
  });
@@ -108,24 +108,21 @@ AvroQueryClient.prototype.useUpdateUserCompany = function () {
108
108
  return this.put({
109
109
  path: `/company/${this.companyId}/user/${user_id}`,
110
110
  data: JSON.stringify(data),
111
- headers: { "Content-Type": "application/json" },
111
+ headers: { 'Content-Type': 'application/json' },
112
112
  });
113
113
  },
114
114
  onMutate: async (data) => {
115
- await queryClient.cancelQueries({ queryKey: ["user"] });
115
+ await queryClient.cancelQueries({ queryKey: ['user'] });
116
116
  await queryClient.cancelQueries({
117
- queryKey: ["companies", this.companyId],
117
+ queryKey: ['companies', this.companyId],
118
118
  });
119
- const previousCompany = queryClient.getQueryData([
120
- "companies",
121
- this.companyId,
122
- ]);
119
+ const previousCompany = queryClient.getQueryData(['companies', this.companyId]);
123
120
  if (previousCompany) {
124
121
  let oldCompanyUser = previousCompany.users?.find((u) => u.user.id === data.user_id);
125
122
  if (oldCompanyUser) {
126
123
  oldCompanyUser = { ...oldCompanyUser, ...data.data };
127
124
  const newUsers = previousCompany.users?.map((u) => u.user.id === data.user_id ? oldCompanyUser : u) ?? [];
128
- queryClient.setQueryData(["companies", this.companyId], {
125
+ queryClient.setQueryData(['companies', this.companyId], {
129
126
  ...previousCompany,
130
127
  users: newUsers,
131
128
  });
@@ -134,12 +131,12 @@ AvroQueryClient.prototype.useUpdateUserCompany = function () {
134
131
  return { previousCompany };
135
132
  },
136
133
  onSuccess: () => {
137
- queryClient.invalidateQueries({ queryKey: ["users"] });
138
- queryClient.invalidateQueries({ queryKey: ["user"] });
134
+ queryClient.invalidateQueries({ queryKey: ['users'] });
135
+ queryClient.invalidateQueries({ queryKey: ['user'] });
139
136
  },
140
137
  onError: (err, _, context) => {
141
138
  if (context?.previousCompany) {
142
- queryClient.setQueryData(["companies", this.companyId], context.previousCompany);
139
+ queryClient.setQueryData(['companies', this.companyId], context.previousCompany);
143
140
  }
144
141
  },
145
142
  });
@@ -151,18 +148,18 @@ AvroQueryClient.prototype.useDeleteSelf = function () {
151
148
  return this.delete({ path: `/user` });
152
149
  },
153
150
  onMutate: async () => {
154
- await queryClient.cancelQueries({ queryKey: ["user"] });
155
- const previousUser = queryClient.getQueryData(["user"]);
156
- queryClient.removeQueries({ queryKey: ["user"] });
151
+ await queryClient.cancelQueries({ queryKey: ['user'] });
152
+ const previousUser = queryClient.getQueryData(['user']);
153
+ queryClient.removeQueries({ queryKey: ['user'] });
157
154
  return { previousUser };
158
155
  },
159
156
  onSuccess: () => {
160
- queryClient.invalidateQueries({ queryKey: ["users"] });
161
- queryClient.invalidateQueries({ queryKey: ["user"] });
157
+ queryClient.invalidateQueries({ queryKey: ['users'] });
158
+ queryClient.invalidateQueries({ queryKey: ['user'] });
162
159
  },
163
160
  onError: (err, _, context) => {
164
161
  if (context?.previousUser) {
165
- queryClient.setQueryData(["user"], context.previousUser);
162
+ queryClient.setQueryData(['user'], context.previousUser);
166
163
  }
167
164
  },
168
165
  });
@@ -1,5 +1,5 @@
1
- import { useMutation, useQuery } from "@tanstack/react-query";
2
- import { AvroQueryClient } from "../../client/QueryClient";
1
+ import { useMutation, useQuery } from '@tanstack/react-query';
2
+ import { AvroQueryClient } from '../../client/QueryClient';
3
3
  AvroQueryClient.prototype.useCreateWaiver = function () {
4
4
  const queryClient = this.getQueryClient();
5
5
  return useMutation({
@@ -7,28 +7,28 @@ AvroQueryClient.prototype.useCreateWaiver = function () {
7
7
  return this.post({
8
8
  path: `/company/${this.companyId}/waiver`,
9
9
  data: JSON.stringify(waiverData),
10
- headers: { "Content-Type": "application/json" },
10
+ headers: { 'Content-Type': 'application/json' },
11
11
  });
12
12
  },
13
13
  onSuccess: () => {
14
- queryClient.invalidateQueries({ queryKey: ["waivers"] });
14
+ queryClient.invalidateQueries({ queryKey: ['waivers'] });
15
15
  },
16
16
  });
17
17
  };
18
18
  AvroQueryClient.prototype.useGetWaivers = function (body, total, onProgress) {
19
19
  return useQuery({
20
20
  queryKey: [
21
- "waivers",
21
+ 'waivers',
22
22
  this.companyId,
23
23
  body.amt ?? 50,
24
24
  body.known_ids ?? [],
25
25
  body.unknown_ids ?? [],
26
26
  body.offset ?? 0,
27
- body.query ?? "",
28
- total ?? "all",
27
+ body.query ?? '',
28
+ total ?? 'all',
29
29
  ],
30
30
  queryFn: async () => {
31
- if (typeof total !== "number") {
31
+ if (typeof total !== 'number') {
32
32
  return this.fetchWaivers({ ...body, offset: 0 });
33
33
  }
34
34
  onProgress?.(0);
@@ -57,22 +57,22 @@ AvroQueryClient.prototype.useUpdateWaiver = function () {
57
57
  return this.put({
58
58
  path: `/waiver/${waiverId}`,
59
59
  data: JSON.stringify(updates),
60
- headers: { "Content-Type": "application/json" },
60
+ headers: { 'Content-Type': 'application/json' },
61
61
  });
62
62
  },
63
63
  onMutate: async ({ waiverId, updates }) => {
64
- await queryClient.cancelQueries({ queryKey: ["waivers"] });
64
+ await queryClient.cancelQueries({ queryKey: ['waivers'] });
65
65
  await queryClient.cancelQueries({
66
- queryKey: ["waivers", waiverId],
66
+ queryKey: ['waivers', waiverId],
67
67
  });
68
- const previousWaivers = queryClient.getQueryData(["waivers"]);
69
- const previousWaiver = queryClient.getQueryData(["waivers", waiverId]);
70
- queryClient.setQueryData(["waivers", waiverId], (oldData) => {
68
+ const previousWaivers = queryClient.getQueryData(['waivers']);
69
+ const previousWaiver = queryClient.getQueryData(['waivers', waiverId]);
70
+ queryClient.setQueryData(['waivers', waiverId], (oldData) => {
71
71
  if (!oldData)
72
72
  return oldData;
73
73
  return { ...oldData, ...updates };
74
74
  });
75
- queryClient.setQueriesData({ queryKey: ["waivers"] }, (oldData) => {
75
+ queryClient.setQueriesData({ queryKey: ['waivers'] }, (oldData) => {
76
76
  if (!oldData)
77
77
  return oldData;
78
78
  if (oldData.pages) {
@@ -87,15 +87,15 @@ AvroQueryClient.prototype.useUpdateWaiver = function () {
87
87
  return { previousWaivers, previousWaiver };
88
88
  },
89
89
  onSuccess: () => {
90
- queryClient.invalidateQueries({ queryKey: ["waivers"] });
90
+ queryClient.invalidateQueries({ queryKey: ['waivers'] });
91
91
  },
92
92
  onError: (_err, variables, context) => {
93
93
  const { waiverId } = variables;
94
94
  if (context?.previousWaivers) {
95
- queryClient.setQueryData(["waivers"], context.previousWaivers);
95
+ queryClient.setQueryData(['waivers'], context.previousWaivers);
96
96
  }
97
97
  if (context?.previousWaiver) {
98
- queryClient.setQueryData(["waivers", waiverId], context.previousWaiver);
98
+ queryClient.setQueryData(['waivers', waiverId], context.previousWaiver);
99
99
  }
100
100
  },
101
101
  });
@@ -109,9 +109,9 @@ AvroQueryClient.prototype.useDeleteWaiver = function () {
109
109
  });
110
110
  },
111
111
  onMutate: async ({ waiverId }) => {
112
- await queryClient.cancelQueries({ queryKey: ["waivers"] });
113
- const previousWaivers = queryClient.getQueryData(["waivers"]);
114
- queryClient.setQueriesData({ queryKey: ["waivers"] }, (oldData) => {
112
+ await queryClient.cancelQueries({ queryKey: ['waivers'] });
113
+ const previousWaivers = queryClient.getQueryData(['waivers']);
114
+ queryClient.setQueriesData({ queryKey: ['waivers'] }, (oldData) => {
115
115
  if (!oldData)
116
116
  return oldData;
117
117
  if (oldData.pages) {
@@ -126,11 +126,11 @@ AvroQueryClient.prototype.useDeleteWaiver = function () {
126
126
  return { previousWaivers };
127
127
  },
128
128
  onSuccess: () => {
129
- queryClient.invalidateQueries({ queryKey: ["waivers"] });
129
+ queryClient.invalidateQueries({ queryKey: ['waivers'] });
130
130
  },
131
131
  onError: (_err, variables, context) => {
132
132
  if (context?.previousWaivers) {
133
- queryClient.setQueryData(["waivers"], context.previousWaivers);
133
+ queryClient.setQueryData(['waivers'], context.previousWaivers);
134
134
  }
135
135
  },
136
136
  });
package/dist/index.d.ts CHANGED
@@ -1,38 +1,38 @@
1
- export { AvroQueryClientConfig, AvroQueryClient } from "./client/QueryClient";
2
- export { AvroQueryClientProvider, useAvroQueryClient, useSocketEvent, } from "./client/AvroQueryClientProvider";
3
- export { useEmailStatus } from "./client/hooks/email";
4
- export type { EmailResult, EmailResultStatus, UseEmailStatusOptions, } from "./client/hooks/email";
5
- export { AuthManager } from "./auth/AuthManager";
6
- export { MemoryStorage, LocalStorage } from "./auth/storage";
7
- import "./client/core/xhr";
8
- import "./client/core/fetch";
9
- import "./client/core/utils";
10
- import "./client/hooks/root";
11
- import "./client/hooks/jobs";
12
- import "./client/hooks/routes";
13
- import "./client/hooks/events";
14
- import "./client/hooks/months";
15
- import "./client/hooks/bills";
16
- import "./client/hooks/companies";
17
- import "./client/hooks/users";
18
- import "./client/hooks/sessions";
19
- import "./client/hooks/chats";
20
- import "./client/hooks/catalog_items";
21
- import "./client/hooks/messages";
22
- import "./client/hooks/plans";
23
- import "./client/hooks/prepayments";
24
- import "./client/hooks/analytics";
25
- import "./client/hooks/avro";
26
- import "./client/hooks/teams";
27
- import "./client/hooks/labels";
28
- import "./client/hooks/groups";
29
- import "./client/hooks/skills";
30
- import "./client/hooks/proposal";
31
- import "./client/hooks/timecards";
32
- import "./client/hooks/waivers";
33
- import "./client/hooks/email";
34
- export * from "./types/api";
35
- export * from "./types/auth";
36
- export * from "./types/cache";
37
- export * from "./types/client";
38
- export * from "./types/error";
1
+ export { AvroQueryClientConfig, AvroQueryClient } from './client/QueryClient';
2
+ export { AvroQueryClientProvider, useAvroQueryClient, useSocketEvent, } from './client/AvroQueryClientProvider';
3
+ export { useEmailStatus } from './client/hooks/email';
4
+ export type { EmailResult, EmailResultStatus, UseEmailStatusOptions } from './client/hooks/email';
5
+ export { AuthManager } from './auth/AuthManager';
6
+ export { MemoryStorage, LocalStorage } from './auth/storage';
7
+ import './client/core/xhr';
8
+ import './client/core/fetch';
9
+ import './client/core/utils';
10
+ import './client/hooks/root';
11
+ import './client/hooks/jobs';
12
+ import './client/hooks/routes';
13
+ import './client/hooks/events';
14
+ import './client/hooks/months';
15
+ import './client/hooks/bills';
16
+ import './client/hooks/companies';
17
+ import './client/hooks/users';
18
+ import './client/hooks/sessions';
19
+ import './client/hooks/chats';
20
+ import './client/hooks/catalog_items';
21
+ import './client/hooks/messages';
22
+ import './client/hooks/plans';
23
+ import './client/hooks/prepayments';
24
+ import './client/hooks/analytics';
25
+ import './client/hooks/avro';
26
+ import './client/hooks/teams';
27
+ import './client/hooks/labels';
28
+ import './client/hooks/groups';
29
+ import './client/hooks/skills';
30
+ import './client/hooks/proposal';
31
+ import './client/hooks/timecards';
32
+ import './client/hooks/waivers';
33
+ import './client/hooks/email';
34
+ export * from './types/api';
35
+ export * from './types/auth';
36
+ export * from './types/cache';
37
+ export * from './types/client';
38
+ export * from './types/error';
package/dist/index.js CHANGED
@@ -1,37 +1,37 @@
1
- export { AvroQueryClient } from "./client/QueryClient";
2
- export { AvroQueryClientProvider, useAvroQueryClient, useSocketEvent, } from "./client/AvroQueryClientProvider";
3
- export { useEmailStatus } from "./client/hooks/email";
4
- export { AuthManager } from "./auth/AuthManager";
5
- export { MemoryStorage, LocalStorage } from "./auth/storage";
6
- import "./client/core/xhr";
7
- import "./client/core/fetch";
8
- import "./client/core/utils";
9
- import "./client/hooks/root";
10
- import "./client/hooks/jobs";
11
- import "./client/hooks/routes";
12
- import "./client/hooks/events";
13
- import "./client/hooks/months";
14
- import "./client/hooks/bills";
15
- import "./client/hooks/companies";
16
- import "./client/hooks/users";
17
- import "./client/hooks/sessions";
18
- import "./client/hooks/chats";
19
- import "./client/hooks/catalog_items";
20
- import "./client/hooks/messages";
21
- import "./client/hooks/plans";
22
- import "./client/hooks/prepayments";
23
- import "./client/hooks/analytics";
24
- import "./client/hooks/avro";
25
- import "./client/hooks/teams";
26
- import "./client/hooks/labels";
27
- import "./client/hooks/groups";
28
- import "./client/hooks/skills";
29
- import "./client/hooks/proposal";
30
- import "./client/hooks/timecards";
31
- import "./client/hooks/waivers";
32
- import "./client/hooks/email";
33
- export * from "./types/api";
34
- export * from "./types/auth";
35
- export * from "./types/cache";
36
- export * from "./types/client";
37
- export * from "./types/error";
1
+ export { AvroQueryClient } from './client/QueryClient';
2
+ export { AvroQueryClientProvider, useAvroQueryClient, useSocketEvent, } from './client/AvroQueryClientProvider';
3
+ export { useEmailStatus } from './client/hooks/email';
4
+ export { AuthManager } from './auth/AuthManager';
5
+ export { MemoryStorage, LocalStorage } from './auth/storage';
6
+ import './client/core/xhr';
7
+ import './client/core/fetch';
8
+ import './client/core/utils';
9
+ import './client/hooks/root';
10
+ import './client/hooks/jobs';
11
+ import './client/hooks/routes';
12
+ import './client/hooks/events';
13
+ import './client/hooks/months';
14
+ import './client/hooks/bills';
15
+ import './client/hooks/companies';
16
+ import './client/hooks/users';
17
+ import './client/hooks/sessions';
18
+ import './client/hooks/chats';
19
+ import './client/hooks/catalog_items';
20
+ import './client/hooks/messages';
21
+ import './client/hooks/plans';
22
+ import './client/hooks/prepayments';
23
+ import './client/hooks/analytics';
24
+ import './client/hooks/avro';
25
+ import './client/hooks/teams';
26
+ import './client/hooks/labels';
27
+ import './client/hooks/groups';
28
+ import './client/hooks/skills';
29
+ import './client/hooks/proposal';
30
+ import './client/hooks/timecards';
31
+ import './client/hooks/waivers';
32
+ import './client/hooks/email';
33
+ export * from './types/api';
34
+ export * from './types/auth';
35
+ export * from './types/cache';
36
+ export * from './types/client';
37
+ export * from './types/error';
@@ -1,5 +1,5 @@
1
- import { LineItem } from "../../types/api/LineItem";
1
+ import { LineItem } from '../../types/api/LineItem';
2
2
  export interface AdditionalCharge extends LineItem {
3
- line_item_type: "ADDITIONAL_CHARGE";
3
+ line_item_type: 'ADDITIONAL_CHARGE';
4
4
  time_updated: number | null;
5
5
  }
@@ -1,4 +1,4 @@
1
- import { Email } from "../../types/api/Email";
1
+ import { Email } from '../../types/api/Email';
2
2
  export interface Avro {
3
3
  id: string;
4
4
  name: string;
@@ -1,7 +1,7 @@
1
- import { BillPayment } from "../../types/api/BillPayment";
2
- import { BillUser } from "../../types/api/BillUser";
3
- import { CustomLineItem } from "../../types/api/CustomLineItem";
4
- import { PaymentType } from "../../types/api/PaymentType";
1
+ import { BillPayment } from '../../types/api/BillPayment';
2
+ import { BillUser } from '../../types/api/BillUser';
3
+ import { CustomLineItem } from '../../types/api/CustomLineItem';
4
+ import { PaymentType } from '../../types/api/PaymentType';
5
5
  export declare const BillStatus: {
6
6
  readonly SENT: "SENT";
7
7
  readonly PAID: "PAID";
@@ -1,6 +1,6 @@
1
1
  export const BillStatus = {
2
- SENT: "SENT",
3
- PAID: "PAID",
4
- PARTIALLY_PAID: "PARTIALLY_PAID",
5
- MANUALLY_PAID: "MANUALLY_PAID",
2
+ SENT: 'SENT',
3
+ PAID: 'PAID',
4
+ PARTIALLY_PAID: 'PARTIALLY_PAID',
5
+ MANUALLY_PAID: 'MANUALLY_PAID',
6
6
  };
@@ -5,8 +5,8 @@ export interface BillPayment {
5
5
  stripe_fees: number;
6
6
  stripe_pi_id: string;
7
7
  bill_user_id: string;
8
- status: "created" | "processing" | "succeeded" | "failed" | "canceled" | "requires_action";
9
- type: "us_bank_account" | "card";
8
+ status: 'created' | 'processing' | 'succeeded' | 'failed' | 'canceled' | 'requires_action';
9
+ type: 'us_bank_account' | 'card';
10
10
  action_required_at: number;
11
11
  time_created: number;
12
12
  time_updated: number | null;
@@ -1,4 +1,4 @@
1
- import { BillPayment } from "../../types/api/BillPayment";
1
+ import { BillPayment } from '../../types/api/BillPayment';
2
2
  export interface BillUser {
3
3
  id: string;
4
4
  user_id: string;
@@ -1,4 +1,4 @@
1
- import { PaymentOption } from "../../types/api/PaymentOption";
1
+ import { PaymentOption } from '../../types/api/PaymentOption';
2
2
  export interface CatalogItem {
3
3
  id: string;
4
4
  name: string;
@@ -1,5 +1,5 @@
1
- import { Message } from "../../types/api/Message";
2
- import { MemberState } from "../../types/api/MemberState";
1
+ import { Message } from '../../types/api/Message';
2
+ import { MemberState } from '../../types/api/MemberState';
3
3
  export interface Chat {
4
4
  id: string;
5
5
  name: string;