@go-avro/avro-js 0.0.2-beta.5 → 0.0.2-beta.50

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,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;
@@ -68,12 +77,16 @@ export interface MemberState {
68
77
  }
69
78
  export interface LineItem {
70
79
  id: string;
80
+ line_item_type: "CUSTOM" | "ADDITIONAL_CHARGE" | "EVENT" | "SERVICE_MONTH";
71
81
  name: string;
72
82
  description: string;
73
83
  cost: number | null;
74
84
  amount: number | null;
75
85
  time_created: number;
76
86
  }
87
+ export interface CustomLineItem extends LineItem {
88
+ line_item_type: "CUSTOM";
89
+ }
77
90
  export interface Reaction {
78
91
  id: string;
79
92
  message_id: string;
@@ -193,8 +206,8 @@ export interface User {
193
206
  companies: UserCompanyAssociation[] | null;
194
207
  email: string | null;
195
208
  phone_number: string | null;
196
- time_created: string | null;
197
- time_updated: string | null;
209
+ time_created: number;
210
+ time_updated: number | null;
198
211
  can_send_emails: boolean | null;
199
212
  payment_methods: PaymentMethod[];
200
213
  autopay_payment_types: string[];
@@ -209,20 +222,20 @@ export interface Break {
209
222
  company_billable: boolean;
210
223
  client_billable: boolean;
211
224
  }
212
- export interface ServiceMonth {
213
- id: string;
225
+ export interface ServiceMonth extends LineItem {
226
+ line_item_type: "SERVICE_MONTH";
214
227
  job_name: string;
215
228
  job_id: string | null;
229
+ job_address: string;
230
+ job_labels: string[];
216
231
  bill_id: string | null;
217
- cost: number;
218
232
  billed: boolean;
219
233
  paid: boolean;
220
- amount: number;
221
- time_created: number;
234
+ tasks: string[];
222
235
  time_updated: number | null;
223
236
  }
224
237
  export interface Session {
225
- session_id: string;
238
+ id: string;
226
239
  user_id: string;
227
240
  company_id: string;
228
241
  time_started: number;
@@ -230,7 +243,7 @@ export interface Session {
230
243
  break_id: string;
231
244
  is_paused: boolean;
232
245
  team_id: string;
233
- current_route_id: string;
246
+ route_id: string;
234
247
  breaks: Break[];
235
248
  }
236
249
  export interface Group {
@@ -294,6 +307,7 @@ export interface Bill {
294
307
  customer_email: string | null;
295
308
  manual_emails: string[][];
296
309
  users: BillUser[];
310
+ paid: boolean;
297
311
  paid_at: number;
298
312
  time_created: number;
299
313
  time_updated: number;
@@ -301,7 +315,7 @@ export interface Bill {
301
315
  intent_created_at: number;
302
316
  intent_last_created_at: number;
303
317
  payment: BillPayment | null;
304
- line_items: LineItem[];
318
+ line_items: CustomLineItem[];
305
319
  months: string[];
306
320
  due_date: number;
307
321
  }
@@ -333,8 +347,8 @@ export interface Company {
333
347
  teams: Team[];
334
348
  emails: Email[];
335
349
  skills: Skill[];
336
- time_created: string;
337
- time_updated: string | null;
350
+ time_created: number;
351
+ time_updated: number | null;
338
352
  users: UserCompanyAssociation[];
339
353
  use_client_side_customer_start_billing: boolean;
340
354
  use_client_side_customer_stop_billing: boolean;
@@ -416,6 +430,7 @@ export interface Job {
416
430
  routes: RouteJob[];
417
431
  subscribers: Subscription[];
418
432
  manual_emails: string[][];
433
+ overdue_time: number;
419
434
  last_completed_event: _Event | null;
420
435
  last_event: _Event | null;
421
436
  labels: string[];
@@ -438,6 +453,7 @@ export interface Task {
438
453
  created_by: UserCompanyAssociation | null;
439
454
  overdueness: number | null;
440
455
  overdue_time: number;
456
+ last_completed_event: _Event | null;
441
457
  last_event: _Event | null;
442
458
  delay: number;
443
459
  skills: string[];
@@ -471,22 +487,17 @@ export interface taskEndInfo {
471
487
  internal_notes: string;
472
488
  external_notes: string;
473
489
  }
474
- export interface AdditionalCharge {
475
- id: string;
476
- time_created: number;
490
+ export interface AdditionalCharge extends LineItem {
491
+ line_item_type: "ADDITIONAL_CHARGE";
477
492
  time_updated: number | null;
478
- name: string;
479
- amount: number;
480
493
  }
481
- export interface _Event {
494
+ export interface _Event extends LineItem {
482
495
  breaks: string[];
483
- id: string;
484
- name: string;
496
+ line_item_type: "EVENT";
485
497
  internal_notes: string;
486
498
  external_notes: string;
487
499
  proofs: string[];
488
500
  tasks: string[];
489
- time_created: number;
490
501
  time_ended: number;
491
502
  time_started: number;
492
503
  time_updated: number | null;
@@ -498,9 +509,75 @@ export interface _Event {
498
509
  additional_charges: AdditionalCharge[];
499
510
  user_id: string;
500
511
  team_id: string;
501
- cost: number;
502
512
  billed: boolean;
503
513
  paid: boolean;
504
514
  autostart: boolean;
505
515
  job_labels: string[];
506
516
  }
517
+ export interface FinancialInsightData {
518
+ start: number;
519
+ end: number;
520
+ unbilled: {
521
+ events: {
522
+ count: number;
523
+ amount: number;
524
+ };
525
+ service_months: {
526
+ count: number;
527
+ amount: number;
528
+ };
529
+ total: number;
530
+ };
531
+ billed_unbilled: {
532
+ events: {
533
+ count: number;
534
+ amount: number;
535
+ };
536
+ service_months: {
537
+ count: number;
538
+ amount: number;
539
+ };
540
+ total: number;
541
+ };
542
+ paid_unbilled: {
543
+ events: {
544
+ count: number;
545
+ amount: number;
546
+ };
547
+ service_months: {
548
+ count: number;
549
+ amount: number;
550
+ };
551
+ total: number;
552
+ };
553
+ prepaid: {
554
+ events: {
555
+ count: number;
556
+ amount: number;
557
+ };
558
+ service_months: {
559
+ count: number;
560
+ amount: number;
561
+ };
562
+ total: number;
563
+ };
564
+ accounts_receivable: {
565
+ overdue: number;
566
+ not_overdue: number;
567
+ };
568
+ cash: number;
569
+ }
570
+ export interface EventInsightData {
571
+ start: number;
572
+ end: number;
573
+ events_per_job: {
574
+ id: string;
575
+ name: string;
576
+ event_count: number;
577
+ }[];
578
+ events_per_team: {
579
+ team_id: string;
580
+ event_count: number;
581
+ }[];
582
+ total_events: number;
583
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "0.0.2-beta.5",
3
+ "version": "0.0.2-beta.50",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -33,6 +33,7 @@
33
33
  "license": "CC-BY-SA-4.0",
34
34
  "devDependencies": {
35
35
  "@types/jest": "^29.0.0",
36
+ "@types/react": "^19.2.2",
36
37
  "@typescript-eslint/eslint-plugin": "^8.38.0",
37
38
  "@typescript-eslint/parser": "^8.38.0",
38
39
  "eslint": "^8.57.1",
@@ -50,5 +51,8 @@
50
51
  ],
51
52
  "publishConfig": {
52
53
  "access": "public"
54
+ },
55
+ "dependencies": {
56
+ "@tanstack/react-query": "^5.90.2"
53
57
  }
54
58
  }