@go-avro/avro-js 0.0.2-beta.16 → 0.0.2-beta.161
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/README.md +1 -0
- package/dist/auth/AuthManager.d.ts +14 -5
- package/dist/auth/AuthManager.js +59 -23
- package/dist/auth/storage.d.ts +8 -8
- package/dist/auth/storage.js +19 -14
- package/dist/client/AvroQueryClientProvider.d.ts +14 -0
- package/dist/client/AvroQueryClientProvider.js +32 -0
- package/dist/client/QueryClient.d.ts +500 -16
- package/dist/client/QueryClient.js +396 -214
- package/dist/client/core/fetch.d.ts +1 -0
- package/dist/client/core/fetch.js +64 -0
- package/dist/client/core/utils.d.ts +1 -0
- package/dist/client/core/utils.js +14 -0
- package/dist/client/core/xhr.d.ts +1 -0
- package/dist/client/core/xhr.js +90 -0
- package/dist/client/hooks/analytics.d.ts +1 -0
- package/dist/client/hooks/analytics.js +26 -0
- package/dist/client/hooks/avro.d.ts +1 -0
- package/dist/client/hooks/avro.js +9 -0
- package/dist/client/hooks/bills.d.ts +1 -0
- package/dist/client/hooks/bills.js +165 -0
- package/dist/client/hooks/chats.d.ts +1 -0
- package/dist/client/hooks/chats.js +37 -0
- package/dist/client/hooks/companies.d.ts +1 -0
- package/dist/client/hooks/companies.js +185 -0
- package/dist/client/hooks/events.d.ts +1 -0
- package/dist/client/hooks/events.js +308 -0
- package/dist/client/hooks/groups.d.ts +1 -0
- package/dist/client/hooks/groups.js +130 -0
- package/dist/client/hooks/jobs.d.ts +1 -0
- package/dist/client/hooks/jobs.js +213 -0
- package/dist/client/hooks/labels.d.ts +1 -0
- package/dist/client/hooks/labels.js +130 -0
- package/dist/client/hooks/messages.d.ts +1 -0
- package/dist/client/hooks/messages.js +30 -0
- package/dist/client/hooks/months.d.ts +1 -0
- package/dist/client/hooks/months.js +93 -0
- package/dist/client/hooks/plans.d.ts +1 -0
- package/dist/client/hooks/plans.js +8 -0
- package/dist/client/hooks/proposal.d.ts +1 -0
- package/dist/client/hooks/proposal.js +22 -0
- package/dist/client/hooks/root.d.ts +1 -0
- package/dist/client/hooks/root.js +8 -0
- package/dist/client/hooks/routes.d.ts +1 -0
- package/dist/client/hooks/routes.js +174 -0
- package/dist/client/hooks/sessions.d.ts +1 -0
- package/dist/client/hooks/sessions.js +175 -0
- package/dist/client/hooks/skills.d.ts +1 -0
- package/dist/client/hooks/skills.js +123 -0
- package/dist/client/hooks/teams.d.ts +1 -0
- package/dist/client/hooks/teams.js +128 -0
- package/dist/client/hooks/users.d.ts +1 -0
- package/dist/client/hooks/users.js +118 -0
- package/dist/index.d.ts +26 -1
- package/dist/index.js +26 -1
- package/dist/types/api.d.ts +221 -44
- package/dist/types/api.js +57 -1
- package/dist/types/auth.d.ts +6 -5
- package/dist/types/auth.js +5 -1
- package/dist/types/cache.d.ts +9 -0
- package/dist/types/cache.js +1 -0
- package/package.json +6 -4
package/dist/types/api.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
export interface ApiInfo {
|
|
2
|
+
app_semver: string;
|
|
3
|
+
db_healthy: boolean;
|
|
4
|
+
logged_in_as: string;
|
|
5
|
+
ors_healthy: string;
|
|
6
|
+
pelias_healthy: boolean;
|
|
7
|
+
version: string;
|
|
8
|
+
vroom_healthy: boolean;
|
|
9
|
+
}
|
|
1
10
|
export interface PaymentMethod {
|
|
2
11
|
allow_redisplay: string;
|
|
3
12
|
autopay: boolean;
|
|
@@ -48,6 +57,33 @@ export interface PaymentMethod {
|
|
|
48
57
|
} | null;
|
|
49
58
|
} | null;
|
|
50
59
|
}
|
|
60
|
+
export type ScheduleItem = {
|
|
61
|
+
type: "location";
|
|
62
|
+
location: [number, number];
|
|
63
|
+
time_window: [number, number];
|
|
64
|
+
} | {
|
|
65
|
+
type: "break";
|
|
66
|
+
start: [number, number];
|
|
67
|
+
time_window: [number, number];
|
|
68
|
+
} | {
|
|
69
|
+
type: "job";
|
|
70
|
+
job_id: string;
|
|
71
|
+
task_ids: string[];
|
|
72
|
+
location: [number, number];
|
|
73
|
+
time_window: [number, number];
|
|
74
|
+
};
|
|
75
|
+
export type TeamSchedule = {
|
|
76
|
+
team_id: string;
|
|
77
|
+
schedule: ScheduleItem[];
|
|
78
|
+
name: string;
|
|
79
|
+
optimize: boolean;
|
|
80
|
+
};
|
|
81
|
+
export type RouteScheduleConfig = {
|
|
82
|
+
schedules: TeamSchedule[];
|
|
83
|
+
whitelist: string[];
|
|
84
|
+
blacklist: string[];
|
|
85
|
+
tasks: string[];
|
|
86
|
+
};
|
|
51
87
|
export interface Avro {
|
|
52
88
|
id: string;
|
|
53
89
|
name: string;
|
|
@@ -68,13 +104,16 @@ export interface MemberState {
|
|
|
68
104
|
}
|
|
69
105
|
export interface LineItem {
|
|
70
106
|
id: string;
|
|
71
|
-
line_item_type: "CUSTOM";
|
|
107
|
+
line_item_type: "CUSTOM" | "ADDITIONAL_CHARGE" | "EVENT" | "SERVICE_MONTH";
|
|
72
108
|
name: string;
|
|
73
109
|
description: string;
|
|
74
110
|
cost: number | null;
|
|
75
111
|
amount: number | null;
|
|
76
112
|
time_created: number;
|
|
77
113
|
}
|
|
114
|
+
export interface CustomLineItem extends LineItem {
|
|
115
|
+
line_item_type: "CUSTOM";
|
|
116
|
+
}
|
|
78
117
|
export interface Reaction {
|
|
79
118
|
id: string;
|
|
80
119
|
message_id: string;
|
|
@@ -105,10 +144,13 @@ export interface Chat {
|
|
|
105
144
|
user_state: MemberState[];
|
|
106
145
|
messages: Message[];
|
|
107
146
|
}
|
|
108
|
-
export interface
|
|
147
|
+
export interface Location {
|
|
109
148
|
accuracy: number;
|
|
110
149
|
heading: number;
|
|
111
150
|
id: string;
|
|
151
|
+
team_id: string | null;
|
|
152
|
+
user_company_id: string;
|
|
153
|
+
user_id: string;
|
|
112
154
|
latitude: number;
|
|
113
155
|
longitude: number;
|
|
114
156
|
time_collected: number;
|
|
@@ -141,14 +183,13 @@ export interface Team {
|
|
|
141
183
|
end_longitude: number;
|
|
142
184
|
start_time: number;
|
|
143
185
|
users: string[];
|
|
144
|
-
current_location:
|
|
186
|
+
current_location: Location | null;
|
|
145
187
|
start_address: string;
|
|
146
188
|
end_address: string;
|
|
147
189
|
}
|
|
148
190
|
export interface Subscription {
|
|
149
191
|
time_created: number;
|
|
150
192
|
time_updated: string;
|
|
151
|
-
user: User;
|
|
152
193
|
user_company_id: string;
|
|
153
194
|
job_id: string;
|
|
154
195
|
id: string;
|
|
@@ -164,10 +205,14 @@ export interface Plan {
|
|
|
164
205
|
trial_period_days: number;
|
|
165
206
|
time_created: number;
|
|
166
207
|
time_updated: number;
|
|
208
|
+
available_to_new_companies?: boolean;
|
|
209
|
+
available_to?: string[];
|
|
167
210
|
}
|
|
168
211
|
export interface BillPayment {
|
|
169
212
|
id: string;
|
|
170
213
|
amount: number;
|
|
214
|
+
avro_fees: number;
|
|
215
|
+
stripe_fees: number;
|
|
171
216
|
stripe_pi_id: string;
|
|
172
217
|
bill_user_id: string;
|
|
173
218
|
status: "created" | "processing" | "succeeded" | "failed" | "canceled" | "requires_action";
|
|
@@ -189,19 +234,21 @@ export interface BillUser {
|
|
|
189
234
|
export interface User {
|
|
190
235
|
id: string;
|
|
191
236
|
username: string;
|
|
192
|
-
|
|
237
|
+
first_name: string;
|
|
238
|
+
last_name: string;
|
|
193
239
|
verified: boolean;
|
|
194
|
-
companies: UserCompanyAssociation[] | null;
|
|
195
240
|
email: string | null;
|
|
196
241
|
phone_number: string | null;
|
|
197
|
-
time_created:
|
|
198
|
-
time_updated:
|
|
242
|
+
time_created: number;
|
|
243
|
+
time_updated: number | null;
|
|
244
|
+
share_location: boolean;
|
|
199
245
|
can_send_emails: boolean | null;
|
|
200
246
|
payment_methods: PaymentMethod[];
|
|
201
247
|
autopay_payment_types: string[];
|
|
202
248
|
autopay: boolean | null;
|
|
203
249
|
chats: Chat[];
|
|
204
250
|
bills: BillUser[];
|
|
251
|
+
is_root: boolean;
|
|
205
252
|
}
|
|
206
253
|
export interface Break {
|
|
207
254
|
id: string;
|
|
@@ -210,24 +257,20 @@ export interface Break {
|
|
|
210
257
|
company_billable: boolean;
|
|
211
258
|
client_billable: boolean;
|
|
212
259
|
}
|
|
213
|
-
export interface ServiceMonth {
|
|
214
|
-
id: string;
|
|
260
|
+
export interface ServiceMonth extends LineItem {
|
|
215
261
|
line_item_type: "SERVICE_MONTH";
|
|
216
262
|
job_name: string;
|
|
217
263
|
job_id: string | null;
|
|
218
264
|
job_address: string;
|
|
219
265
|
job_labels: string[];
|
|
220
266
|
bill_id: string | null;
|
|
221
|
-
cost: number;
|
|
222
267
|
billed: boolean;
|
|
223
268
|
paid: boolean;
|
|
224
|
-
amount: number;
|
|
225
269
|
tasks: string[];
|
|
226
|
-
time_created: number;
|
|
227
270
|
time_updated: number | null;
|
|
228
271
|
}
|
|
229
272
|
export interface Session {
|
|
230
|
-
|
|
273
|
+
id: string;
|
|
231
274
|
user_id: string;
|
|
232
275
|
company_id: string;
|
|
233
276
|
time_started: number;
|
|
@@ -235,7 +278,7 @@ export interface Session {
|
|
|
235
278
|
break_id: string;
|
|
236
279
|
is_paused: boolean;
|
|
237
280
|
team_id: string;
|
|
238
|
-
|
|
281
|
+
route_id: string;
|
|
239
282
|
breaks: Break[];
|
|
240
283
|
}
|
|
241
284
|
export interface Group {
|
|
@@ -244,23 +287,84 @@ export interface Group {
|
|
|
244
287
|
is_active: boolean;
|
|
245
288
|
is_user_type: boolean;
|
|
246
289
|
users: string[];
|
|
247
|
-
permissions:
|
|
290
|
+
permissions: Permission[];
|
|
248
291
|
company_id: string;
|
|
249
292
|
time_created: number;
|
|
250
293
|
time_updated: number;
|
|
251
294
|
}
|
|
295
|
+
export declare const NotificationLevel: {
|
|
296
|
+
readonly IN_APP: 0;
|
|
297
|
+
readonly EMAIL: 1;
|
|
298
|
+
readonly SMS: 2;
|
|
299
|
+
readonly PUSH: 3;
|
|
300
|
+
};
|
|
301
|
+
export type NotificationLevel = typeof NotificationLevel[keyof typeof NotificationLevel];
|
|
302
|
+
export declare const LoginResponse: {
|
|
303
|
+
readonly SUCCESS: "SUCCESS";
|
|
304
|
+
readonly NEEDS_TOTP: "NEEDS_TOTP";
|
|
305
|
+
};
|
|
306
|
+
export type LoginResponse = typeof LoginResponse[keyof typeof LoginResponse];
|
|
307
|
+
export declare const Permission: {
|
|
308
|
+
readonly CAN_WRITE_COMPANY: "can_write_company";
|
|
309
|
+
readonly CAN_READ_GROUPS: "can_read_groups";
|
|
310
|
+
readonly CAN_WRITE_PROPOSALS: "can_write_proposals";
|
|
311
|
+
readonly CAN_READ_PROPOSALS: "can_read_proposals";
|
|
312
|
+
readonly CAN_WRITE_GROUPS: "can_write_groups";
|
|
313
|
+
readonly CAN_WRITE_ROUTES: "can_write_routes";
|
|
314
|
+
readonly CAN_WRITE_SUBSCRIPTIONS: "can_write_subscriptions";
|
|
315
|
+
readonly CAN_READ_SUBSCRIPTIONS: "can_read_subscriptions";
|
|
316
|
+
readonly CAN_WRITE_TEAMS: "can_write_teams";
|
|
317
|
+
readonly CAN_WRITE_JOBS: "can_write_jobs";
|
|
318
|
+
readonly CAN_WRITE_TASKS: "can_write_tasks";
|
|
319
|
+
readonly CAN_WRITE_ITEMS: "can_write_items";
|
|
320
|
+
readonly CAN_WRITE_SKILLS: "can_write_skills";
|
|
321
|
+
readonly CAN_WRITE_EMAILS: "can_write_emails";
|
|
322
|
+
readonly CAN_WRITE_OTHERS_SESSIONS: "can_write_others_sessions";
|
|
323
|
+
readonly CAN_READ_OTHERS_SESSIONS: "can_read_others_sessions";
|
|
324
|
+
readonly CAN_READ_SESSIONS: "can_read_sessions";
|
|
325
|
+
readonly CAN_WRITE_LABELS: "can_write_labels";
|
|
326
|
+
readonly CAN_READ_LABELS: "can_read_labels";
|
|
327
|
+
readonly CAN_READ_ROUTES: "can_read_routes";
|
|
328
|
+
readonly CAN_READ_TEAMS: "can_read_teams";
|
|
329
|
+
readonly CAN_READ_JOBS: "can_read_jobs";
|
|
330
|
+
readonly CAN_WRITE_EVENTS: "can_write_events";
|
|
331
|
+
readonly CAN_READ_TASKS: "can_read_tasks";
|
|
332
|
+
readonly CAN_READ_ITEMS: "can_read_items";
|
|
333
|
+
readonly CAN_READ_SKILLS: "can_read_skills";
|
|
334
|
+
readonly CAN_WRITE_SESSIONS: "can_write_sessions";
|
|
335
|
+
readonly CAN_READ_EMAILS: "can_read_emails";
|
|
336
|
+
readonly CAN_WRITE_SMS: "can_write_sms";
|
|
337
|
+
readonly CAN_READ_SMS: "can_read_sms";
|
|
338
|
+
readonly CAN_WRITE_NOTIFICATIONS: "can_write_notifications";
|
|
339
|
+
readonly CAN_READ_EVENTS: "can_read_events";
|
|
340
|
+
readonly CAN_READ_MONTHS: "can_read_months";
|
|
341
|
+
readonly CAN_WRITE_MONTHS: "can_write_months";
|
|
342
|
+
readonly CAN_WRITE_BILLS: "can_write_bills";
|
|
343
|
+
readonly CAN_READ_BILLS: "can_read_bills";
|
|
344
|
+
readonly CAN_OPTIMIZE: "can_optimize";
|
|
345
|
+
readonly CAN_READ_COMPANY: "can_read_company";
|
|
346
|
+
readonly CAN_WRITE_OTHERS_TIMECARDS: "can_write_others_timecards";
|
|
347
|
+
readonly CAN_READ_OTHERS_TIMECARDS: "can_read_others_timecards";
|
|
348
|
+
readonly CAN_WRITE_TIMECARDS: "can_write_timecards";
|
|
349
|
+
readonly CAN_READ_TIMECARDS: "can_read_timecards";
|
|
350
|
+
readonly CAN_APPROVE_TIME_OFF: "can_approve_time_off";
|
|
351
|
+
readonly IS_ROOT: "is_root";
|
|
352
|
+
readonly IS_CUSTOMER: "is_customer";
|
|
353
|
+
};
|
|
354
|
+
export type Permission = typeof Permission[keyof typeof Permission];
|
|
252
355
|
export interface UserCompanyAssociation {
|
|
253
356
|
id: string;
|
|
254
357
|
user: User;
|
|
255
358
|
company: string;
|
|
256
|
-
permissions:
|
|
257
|
-
effective_permissions:
|
|
359
|
+
permissions: Permission[];
|
|
360
|
+
effective_permissions: Permission[];
|
|
258
361
|
time_created: number | null;
|
|
259
362
|
time_updated: number | null;
|
|
260
|
-
notification_setting:
|
|
363
|
+
notification_setting: NotificationLevel[];
|
|
261
364
|
share_email_company_wide: boolean;
|
|
262
|
-
notifications:
|
|
365
|
+
notifications: Notification[];
|
|
263
366
|
groups: string[];
|
|
367
|
+
last_location: Location | null;
|
|
264
368
|
}
|
|
265
369
|
export interface Email {
|
|
266
370
|
id: string;
|
|
@@ -299,6 +403,7 @@ export interface Bill {
|
|
|
299
403
|
customer_email: string | null;
|
|
300
404
|
manual_emails: string[][];
|
|
301
405
|
users: BillUser[];
|
|
406
|
+
paid: boolean;
|
|
302
407
|
paid_at: number;
|
|
303
408
|
time_created: number;
|
|
304
409
|
time_updated: number;
|
|
@@ -306,7 +411,7 @@ export interface Bill {
|
|
|
306
411
|
intent_created_at: number;
|
|
307
412
|
intent_last_created_at: number;
|
|
308
413
|
payment: BillPayment | null;
|
|
309
|
-
line_items:
|
|
414
|
+
line_items: CustomLineItem[];
|
|
310
415
|
months: string[];
|
|
311
416
|
due_date: number;
|
|
312
417
|
}
|
|
@@ -328,18 +433,13 @@ export interface PlanPayment {
|
|
|
328
433
|
time_updated: number;
|
|
329
434
|
}
|
|
330
435
|
export interface Company {
|
|
331
|
-
events: _Event[];
|
|
332
|
-
months: ServiceMonth[];
|
|
333
436
|
id: string;
|
|
334
|
-
jobs: Job[];
|
|
335
437
|
name: string;
|
|
336
438
|
email: string;
|
|
337
|
-
routes: Route[];
|
|
338
|
-
teams: Team[];
|
|
339
439
|
emails: Email[];
|
|
340
440
|
skills: Skill[];
|
|
341
|
-
time_created:
|
|
342
|
-
time_updated:
|
|
441
|
+
time_created: number;
|
|
442
|
+
time_updated: number | null;
|
|
343
443
|
users: UserCompanyAssociation[];
|
|
344
444
|
use_client_side_customer_start_billing: boolean;
|
|
345
445
|
use_client_side_customer_stop_billing: boolean;
|
|
@@ -350,7 +450,7 @@ export interface Company {
|
|
|
350
450
|
incomplete_payments: PlanPayment[];
|
|
351
451
|
overdue_threshold: number;
|
|
352
452
|
stripe_account_id: string;
|
|
353
|
-
is_restricted:
|
|
453
|
+
is_restricted: boolean;
|
|
354
454
|
disabled_reason: string;
|
|
355
455
|
completed_onboarding: boolean;
|
|
356
456
|
restricted_soon: boolean;
|
|
@@ -358,6 +458,9 @@ export interface Company {
|
|
|
358
458
|
billing_email_id: string;
|
|
359
459
|
num_events: number;
|
|
360
460
|
num_jobs: number;
|
|
461
|
+
num_routes: number;
|
|
462
|
+
num_teams: number;
|
|
463
|
+
num_skills: number;
|
|
361
464
|
bills: Bill[];
|
|
362
465
|
enabled_payment_methods: string[];
|
|
363
466
|
sessions: Session[];
|
|
@@ -421,8 +524,9 @@ export interface Job {
|
|
|
421
524
|
routes: RouteJob[];
|
|
422
525
|
subscribers: Subscription[];
|
|
423
526
|
manual_emails: string[][];
|
|
527
|
+
overdue_time: number;
|
|
424
528
|
last_completed_event: _Event | null;
|
|
425
|
-
|
|
529
|
+
current_event: _Event | null;
|
|
426
530
|
labels: string[];
|
|
427
531
|
owner: string;
|
|
428
532
|
}
|
|
@@ -443,7 +547,8 @@ export interface Task {
|
|
|
443
547
|
created_by: UserCompanyAssociation | null;
|
|
444
548
|
overdueness: number | null;
|
|
445
549
|
overdue_time: number;
|
|
446
|
-
|
|
550
|
+
last_completed_event: _Event | null;
|
|
551
|
+
current_event: _Event | null;
|
|
447
552
|
delay: number;
|
|
448
553
|
skills: string[];
|
|
449
554
|
service: number;
|
|
@@ -455,6 +560,7 @@ export interface Task {
|
|
|
455
560
|
services_prepaid: number;
|
|
456
561
|
months_prepaid: number;
|
|
457
562
|
priority: boolean;
|
|
563
|
+
route_ids: string[];
|
|
458
564
|
}
|
|
459
565
|
export interface TaskWrapper {
|
|
460
566
|
latestEvent: number;
|
|
@@ -476,25 +582,31 @@ export interface taskEndInfo {
|
|
|
476
582
|
internal_notes: string;
|
|
477
583
|
external_notes: string;
|
|
478
584
|
}
|
|
479
|
-
export interface AdditionalCharge {
|
|
480
|
-
id: string;
|
|
585
|
+
export interface AdditionalCharge extends LineItem {
|
|
481
586
|
line_item_type: "ADDITIONAL_CHARGE";
|
|
482
|
-
time_created: number;
|
|
483
587
|
time_updated: number | null;
|
|
484
|
-
name: string;
|
|
485
|
-
amount: number;
|
|
486
588
|
}
|
|
487
|
-
export interface
|
|
488
|
-
breaks: string[];
|
|
589
|
+
export interface UserEvent {
|
|
489
590
|
id: string;
|
|
591
|
+
session_id: string;
|
|
592
|
+
event_id: string;
|
|
593
|
+
user_id: string | null;
|
|
594
|
+
team_id: string | null;
|
|
595
|
+
user_name: string | null;
|
|
596
|
+
team_name: string | null;
|
|
597
|
+
time_started: number | null;
|
|
598
|
+
time_ended: number | null;
|
|
599
|
+
time_created: number | null;
|
|
600
|
+
time_updated: number | null;
|
|
601
|
+
}
|
|
602
|
+
export interface _Event extends LineItem {
|
|
603
|
+
breaks: string[];
|
|
490
604
|
line_item_type: "EVENT";
|
|
491
|
-
name: string;
|
|
492
605
|
internal_notes: string;
|
|
493
606
|
external_notes: string;
|
|
494
607
|
proofs: string[];
|
|
495
608
|
tasks: string[];
|
|
496
|
-
|
|
497
|
-
time_ended: number;
|
|
609
|
+
time_ended: number | null;
|
|
498
610
|
time_started: number;
|
|
499
611
|
time_updated: number | null;
|
|
500
612
|
job_id: string;
|
|
@@ -503,11 +615,76 @@ export interface _Event {
|
|
|
503
615
|
bill_id: string;
|
|
504
616
|
billed_amount: number;
|
|
505
617
|
additional_charges: AdditionalCharge[];
|
|
506
|
-
|
|
507
|
-
team_id: string;
|
|
508
|
-
cost: number;
|
|
618
|
+
users: UserEvent[];
|
|
509
619
|
billed: boolean;
|
|
510
620
|
paid: boolean;
|
|
511
621
|
autostart: boolean;
|
|
512
622
|
job_labels: string[];
|
|
513
623
|
}
|
|
624
|
+
export interface FinancialInsightData {
|
|
625
|
+
start: number;
|
|
626
|
+
end: number;
|
|
627
|
+
unbilled: {
|
|
628
|
+
events: {
|
|
629
|
+
count: number;
|
|
630
|
+
amount: number;
|
|
631
|
+
};
|
|
632
|
+
service_months: {
|
|
633
|
+
count: number;
|
|
634
|
+
amount: number;
|
|
635
|
+
};
|
|
636
|
+
total: number;
|
|
637
|
+
};
|
|
638
|
+
billed_unbilled: {
|
|
639
|
+
events: {
|
|
640
|
+
count: number;
|
|
641
|
+
amount: number;
|
|
642
|
+
};
|
|
643
|
+
service_months: {
|
|
644
|
+
count: number;
|
|
645
|
+
amount: number;
|
|
646
|
+
};
|
|
647
|
+
total: number;
|
|
648
|
+
};
|
|
649
|
+
paid_unbilled: {
|
|
650
|
+
events: {
|
|
651
|
+
count: number;
|
|
652
|
+
amount: number;
|
|
653
|
+
};
|
|
654
|
+
service_months: {
|
|
655
|
+
count: number;
|
|
656
|
+
amount: number;
|
|
657
|
+
};
|
|
658
|
+
total: number;
|
|
659
|
+
};
|
|
660
|
+
prepaid: {
|
|
661
|
+
events: {
|
|
662
|
+
count: number;
|
|
663
|
+
amount: number;
|
|
664
|
+
};
|
|
665
|
+
service_months: {
|
|
666
|
+
count: number;
|
|
667
|
+
amount: number;
|
|
668
|
+
};
|
|
669
|
+
total: number;
|
|
670
|
+
};
|
|
671
|
+
accounts_receivable: {
|
|
672
|
+
overdue: number;
|
|
673
|
+
not_overdue: number;
|
|
674
|
+
};
|
|
675
|
+
cash: number;
|
|
676
|
+
}
|
|
677
|
+
export interface EventInsightData {
|
|
678
|
+
start: number;
|
|
679
|
+
end: number;
|
|
680
|
+
events_per_job: {
|
|
681
|
+
id: string;
|
|
682
|
+
name: string;
|
|
683
|
+
event_count: number;
|
|
684
|
+
}[];
|
|
685
|
+
events_per_team: {
|
|
686
|
+
team_id: string;
|
|
687
|
+
event_count: number;
|
|
688
|
+
}[];
|
|
689
|
+
total_events: number;
|
|
690
|
+
}
|
package/dist/types/api.js
CHANGED
|
@@ -1 +1,57 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export const NotificationLevel = {
|
|
2
|
+
IN_APP: 0,
|
|
3
|
+
EMAIL: 1,
|
|
4
|
+
SMS: 2,
|
|
5
|
+
PUSH: 3
|
|
6
|
+
};
|
|
7
|
+
export const LoginResponse = {
|
|
8
|
+
SUCCESS: "SUCCESS",
|
|
9
|
+
NEEDS_TOTP: "NEEDS_TOTP",
|
|
10
|
+
};
|
|
11
|
+
export const Permission = {
|
|
12
|
+
CAN_WRITE_COMPANY: "can_write_company",
|
|
13
|
+
CAN_READ_GROUPS: "can_read_groups",
|
|
14
|
+
CAN_WRITE_PROPOSALS: "can_write_proposals",
|
|
15
|
+
CAN_READ_PROPOSALS: "can_read_proposals",
|
|
16
|
+
CAN_WRITE_GROUPS: "can_write_groups",
|
|
17
|
+
CAN_WRITE_ROUTES: "can_write_routes",
|
|
18
|
+
CAN_WRITE_SUBSCRIPTIONS: "can_write_subscriptions",
|
|
19
|
+
CAN_READ_SUBSCRIPTIONS: "can_read_subscriptions",
|
|
20
|
+
CAN_WRITE_TEAMS: "can_write_teams",
|
|
21
|
+
CAN_WRITE_JOBS: "can_write_jobs",
|
|
22
|
+
CAN_WRITE_TASKS: "can_write_tasks",
|
|
23
|
+
CAN_WRITE_ITEMS: "can_write_items",
|
|
24
|
+
CAN_WRITE_SKILLS: "can_write_skills",
|
|
25
|
+
CAN_WRITE_EMAILS: "can_write_emails",
|
|
26
|
+
CAN_WRITE_OTHERS_SESSIONS: "can_write_others_sessions",
|
|
27
|
+
CAN_READ_OTHERS_SESSIONS: "can_read_others_sessions",
|
|
28
|
+
CAN_READ_SESSIONS: "can_read_sessions",
|
|
29
|
+
CAN_WRITE_LABELS: "can_write_labels",
|
|
30
|
+
CAN_READ_LABELS: "can_read_labels",
|
|
31
|
+
CAN_READ_ROUTES: "can_read_routes",
|
|
32
|
+
CAN_READ_TEAMS: "can_read_teams",
|
|
33
|
+
CAN_READ_JOBS: "can_read_jobs",
|
|
34
|
+
CAN_WRITE_EVENTS: "can_write_events",
|
|
35
|
+
CAN_READ_TASKS: "can_read_tasks",
|
|
36
|
+
CAN_READ_ITEMS: "can_read_items",
|
|
37
|
+
CAN_READ_SKILLS: "can_read_skills",
|
|
38
|
+
CAN_WRITE_SESSIONS: "can_write_sessions",
|
|
39
|
+
CAN_READ_EMAILS: "can_read_emails",
|
|
40
|
+
CAN_WRITE_SMS: "can_write_sms",
|
|
41
|
+
CAN_READ_SMS: "can_read_sms",
|
|
42
|
+
CAN_WRITE_NOTIFICATIONS: "can_write_notifications",
|
|
43
|
+
CAN_READ_EVENTS: "can_read_events",
|
|
44
|
+
CAN_READ_MONTHS: "can_read_months",
|
|
45
|
+
CAN_WRITE_MONTHS: "can_write_months",
|
|
46
|
+
CAN_WRITE_BILLS: "can_write_bills",
|
|
47
|
+
CAN_READ_BILLS: "can_read_bills",
|
|
48
|
+
CAN_OPTIMIZE: "can_optimize",
|
|
49
|
+
CAN_READ_COMPANY: "can_read_company",
|
|
50
|
+
CAN_WRITE_OTHERS_TIMECARDS: "can_write_others_timecards",
|
|
51
|
+
CAN_READ_OTHERS_TIMECARDS: "can_read_others_timecards",
|
|
52
|
+
CAN_WRITE_TIMECARDS: "can_write_timecards",
|
|
53
|
+
CAN_READ_TIMECARDS: "can_read_timecards",
|
|
54
|
+
CAN_APPROVE_TIME_OFF: "can_approve_time_off",
|
|
55
|
+
IS_ROOT: "is_root",
|
|
56
|
+
IS_CUSTOMER: "is_customer",
|
|
57
|
+
};
|
package/dist/types/auth.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ export interface Tokens {
|
|
|
2
2
|
access_token: string;
|
|
3
3
|
refresh_token: string;
|
|
4
4
|
}
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
5
|
+
export declare const AuthState: {
|
|
6
|
+
readonly AUTHENTICATED: 1;
|
|
7
|
+
readonly UNAUTHENTICATED: 2;
|
|
8
|
+
readonly UNKNOWN: 3;
|
|
9
|
+
};
|
|
10
|
+
export type AuthState = typeof AuthState[keyof typeof AuthState];
|
package/dist/types/auth.js
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Tokens } from "../types/auth";
|
|
2
|
+
export interface CacheData extends Tokens {
|
|
3
|
+
companyId: string;
|
|
4
|
+
}
|
|
5
|
+
export interface Cache {
|
|
6
|
+
get(key?: keyof CacheData): Promise<CacheData | string | null>;
|
|
7
|
+
set(data: Partial<CacheData>): Promise<void>;
|
|
8
|
+
clear(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@go-avro/avro-js",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.161",
|
|
4
4
|
"description": "JS client for Avro backend integration.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -32,15 +32,13 @@
|
|
|
32
32
|
"author": "Avro <info@goavro.com>",
|
|
33
33
|
"license": "CC-BY-SA-4.0",
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@types/
|
|
35
|
+
"@types/react": "^19.2.2",
|
|
36
36
|
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
37
37
|
"@typescript-eslint/parser": "^8.38.0",
|
|
38
38
|
"eslint": "^8.57.1",
|
|
39
39
|
"eslint-plugin-import": "^2.32.0",
|
|
40
40
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
41
41
|
"eslint-plugin-react": "^7.37.5",
|
|
42
|
-
"jest": "^29.0.0",
|
|
43
|
-
"ts-jest": "^29.0.0",
|
|
44
42
|
"tsc-alias": "^1.8.16",
|
|
45
43
|
"typescript": "^5.8.3",
|
|
46
44
|
"typescript-eslint": "^8.38.0"
|
|
@@ -50,5 +48,9 @@
|
|
|
50
48
|
],
|
|
51
49
|
"publishConfig": {
|
|
52
50
|
"access": "public"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@tanstack/react-query": "^5.90.2",
|
|
54
|
+
"socket.io-client": "^4.8.1"
|
|
53
55
|
}
|
|
54
56
|
}
|