@go-avro/avro-js 0.0.4-beta.3 → 0.0.4-beta.31

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 (91) hide show
  1. package/dist/auth/AuthManager.d.ts +2 -2
  2. package/dist/client/QueryClient.d.ts +55 -2
  3. package/dist/client/QueryClient.js +29 -7
  4. package/dist/client/hooks/catalog_items.js +8 -1
  5. package/dist/client/hooks/jobs.js +7 -3
  6. package/dist/client/hooks/prepayments.js +60 -1
  7. package/dist/client/hooks/proposal.js +8 -1
  8. package/dist/client/hooks/routes.js +13 -8
  9. package/dist/client/hooks/users.js +15 -1
  10. package/dist/client/hooks/waivers.d.ts +1 -0
  11. package/dist/client/hooks/waivers.js +123 -0
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.js +1 -0
  14. package/dist/types/api/AdditionalCharge.d.ts +5 -0
  15. package/dist/types/api/AdditionalCharge.js +1 -0
  16. package/dist/types/api/Avro.d.ts +11 -0
  17. package/dist/types/api/Avro.js +1 -0
  18. package/dist/types/api/Bill.d.ts +27 -0
  19. package/dist/types/api/Bill.js +1 -0
  20. package/dist/types/api/BillPayment.d.ts +13 -0
  21. package/dist/types/api/BillPayment.js +1 -0
  22. package/dist/types/api/BillUser.d.ts +11 -0
  23. package/dist/types/api/BillUser.js +1 -0
  24. package/dist/types/api/Break.d.ts +7 -0
  25. package/dist/types/api/Break.js +1 -0
  26. package/dist/types/api/CatalogItem.d.ts +16 -0
  27. package/dist/types/api/CatalogItem.js +1 -0
  28. package/dist/types/api/Chat.d.ts +12 -0
  29. package/dist/types/api/Chat.js +1 -0
  30. package/dist/types/api/Company.d.ts +58 -0
  31. package/dist/types/api/Company.js +1 -0
  32. package/dist/types/api/CustomLineItem.d.ts +4 -0
  33. package/dist/types/api/CustomLineItem.js +1 -0
  34. package/dist/types/api/Email.d.ts +21 -0
  35. package/dist/types/api/Email.js +1 -0
  36. package/dist/types/api/Friendship.d.ts +2 -0
  37. package/dist/types/api/Friendship.js +1 -0
  38. package/dist/types/api/Group.d.ts +12 -0
  39. package/dist/types/api/Group.js +1 -0
  40. package/dist/types/api/Job.d.ts +36 -0
  41. package/dist/types/api/Job.js +22 -0
  42. package/dist/types/api/Label.d.ts +7 -0
  43. package/dist/types/api/Label.js +1 -0
  44. package/dist/types/api/LineItem.d.ts +41 -0
  45. package/dist/types/api/LineItem.js +30 -0
  46. package/dist/types/api/MemberState.d.ts +7 -0
  47. package/dist/types/api/MemberState.js +1 -0
  48. package/dist/types/api/Message.d.ts +13 -0
  49. package/dist/types/api/Message.js +1 -0
  50. package/dist/types/api/PaymentMethod.d.ts +51 -0
  51. package/dist/types/api/PaymentMethod.js +1 -0
  52. package/dist/types/api/PaymentOption.d.ts +9 -0
  53. package/dist/types/api/PaymentOption.js +1 -0
  54. package/dist/types/api/PaymentType.d.ts +5 -0
  55. package/dist/types/api/PaymentType.js +5 -0
  56. package/dist/types/api/Plan.d.ts +13 -0
  57. package/dist/types/api/Plan.js +1 -0
  58. package/dist/types/api/PlanPayment.d.ts +10 -0
  59. package/dist/types/api/PlanPayment.js +1 -0
  60. package/dist/types/api/Prepayment.d.ts +15 -0
  61. package/dist/types/api/Prepayment.js +7 -0
  62. package/dist/types/api/Reaction.d.ts +8 -0
  63. package/dist/types/api/Reaction.js +1 -0
  64. package/dist/types/api/Route.d.ts +37 -0
  65. package/dist/types/api/Route.js +82 -0
  66. package/dist/types/api/RouteJob.d.ts +15 -0
  67. package/dist/types/api/RouteJob.js +5 -0
  68. package/dist/types/api/ServiceMonth.d.ts +7 -0
  69. package/dist/types/api/ServiceMonth.js +1 -0
  70. package/dist/types/api/Session.d.ts +13 -0
  71. package/dist/types/api/Session.js +1 -0
  72. package/dist/types/api/Skill.d.ts +7 -0
  73. package/dist/types/api/Skill.js +1 -0
  74. package/dist/types/api/Subscription.d.ts +8 -0
  75. package/dist/types/api/Subscription.js +1 -0
  76. package/dist/types/api/Task.d.ts +57 -0
  77. package/dist/types/api/Task.js +74 -0
  78. package/dist/types/api/User.d.ts +23 -0
  79. package/dist/types/api/User.js +1 -0
  80. package/dist/types/api/UserCompanyAssociation.d.ts +71 -0
  81. package/dist/types/api/UserCompanyAssociation.js +53 -0
  82. package/dist/types/api/UserEvent.d.ts +13 -0
  83. package/dist/types/api/UserEvent.js +1 -0
  84. package/dist/types/api/Waiver.d.ts +9 -0
  85. package/dist/types/api/Waiver.js +1 -0
  86. package/dist/types/api/_Event.d.ts +19 -0
  87. package/dist/types/api/_Event.js +1 -0
  88. package/dist/types/api.d.ts +43 -587
  89. package/dist/types/api.js +37 -74
  90. package/dist/types/cache.d.ts +2 -2
  91. package/package.json +1 -1
@@ -1,168 +1,54 @@
1
- export type PaymentType = typeof PaymentType[keyof typeof PaymentType];
2
- export declare const PaymentType: {
3
- readonly US_BANK_ACCOUNT: "us_bank_account";
4
- readonly CARD: "card";
5
- };
6
- export declare const LineItemStatus: {
7
- readonly CREATED: "CREATED";
8
- readonly EXTERNALLY_BILLED: "EXTERNALLY_BILLED";
9
- readonly BILLED: "BILLED";
10
- readonly PROCESSING: "PROCESSING";
11
- readonly EXTERNALLY_PAID: "EXTERNALLY_PAID";
12
- readonly PREPAID: "PREPAID";
13
- readonly PAID: "PAID";
14
- };
15
- export type LineItemStatus = typeof LineItemStatus[keyof typeof LineItemStatus];
16
- export declare const LineItemType: {
17
- readonly CUSTOM: "CUSTOM";
18
- readonly ADDITIONAL_CHARGE: "ADDITIONAL_CHARGE";
19
- readonly EVENT: "EVENT";
20
- readonly SERVICE_MONTH: "SERVICE_MONTH";
21
- readonly PREPAYMENT: "PREPAYMENT";
22
- };
23
- export type LineItemType = typeof LineItemType[keyof typeof LineItemType];
24
- export declare const NotificationLevel: {
25
- readonly IN_APP: 0;
26
- readonly EMAIL: 1;
27
- readonly SMS: 2;
28
- readonly PUSH: 3;
29
- };
30
- export type NotificationLevel = typeof NotificationLevel[keyof typeof NotificationLevel];
1
+ import { FrequencyType } from "..";
2
+ export * from "../types/api/_Event";
3
+ export * from "../types/api/AdditionalCharge";
4
+ export * from "../types/api/Avro";
5
+ export * from "../types/api/Bill";
6
+ export * from "../types/api/BillPayment";
7
+ export * from "../types/api/BillUser";
8
+ export * from "../types/api/Break";
9
+ export * from "../types/api/CatalogItem";
10
+ export * from "../types/api/Chat";
11
+ export * from "../types/api/Company";
12
+ export * from "../types/api/CustomLineItem";
13
+ export * from "../types/api/Email";
14
+ export * from "../types/api/Friendship";
15
+ export * from "../types/api/Group";
16
+ export * from "../types/api/Job";
17
+ export * from "../types/api/Label";
18
+ export * from "../types/api/LineItem";
19
+ export * from "../types/api/MemberState";
20
+ export * from "../types/api/Message";
21
+ export * from "../types/api/PaymentMethod";
22
+ export * from "../types/api/PaymentOption";
23
+ export * from "../types/api/PaymentType";
24
+ export * from "../types/api/Plan";
25
+ export * from "../types/api/PlanPayment";
26
+ export * from "../types/api/Prepayment";
27
+ export * from "../types/api/Reaction";
28
+ export * from "../types/api/Route";
29
+ export * from "../types/api/RouteJob";
30
+ export * from "../types/api/ServiceMonth";
31
+ export * from "../types/api/Session";
32
+ export * from "../types/api/Skill";
33
+ export * from "../types/api/Subscription";
34
+ export * from "../types/api/Task";
35
+ export * from "../types/api/User";
36
+ export * from "../types/api/UserCompanyAssociation";
37
+ export * from "../types/api/UserEvent";
38
+ export * from "../types/api/Waiver";
31
39
  export declare const LoginResponse: {
32
40
  readonly SUCCESS: "SUCCESS";
33
41
  readonly NEEDS_TOTP: "NEEDS_TOTP";
34
42
  };
35
43
  export type LoginResponse = typeof LoginResponse[keyof typeof LoginResponse];
36
- export declare const Permission: {
37
- readonly CAN_WRITE_COMPANY: "can_write_company";
38
- readonly CAN_READ_GROUPS: "can_read_groups";
39
- readonly CAN_WRITE_PROPOSALS: "can_write_proposals";
40
- readonly CAN_READ_PROPOSALS: "can_read_proposals";
41
- readonly CAN_WRITE_GROUPS: "can_write_groups";
42
- readonly CAN_WRITE_ROUTES: "can_write_routes";
43
- readonly CAN_WRITE_SUBSCRIPTIONS: "can_write_subscriptions";
44
- readonly CAN_READ_SUBSCRIPTIONS: "can_read_subscriptions";
45
- readonly CAN_WRITE_TEAMS: "can_write_teams";
46
- readonly CAN_WRITE_JOBS: "can_write_jobs";
47
- readonly CAN_WRITE_TASKS: "can_write_tasks";
48
- readonly CAN_WRITE_ITEMS: "can_write_items";
49
- readonly CAN_WRITE_SKILLS: "can_write_skills";
50
- readonly CAN_WRITE_EMAILS: "can_write_emails";
51
- readonly CAN_WRITE_OTHERS_SESSIONS: "can_write_others_sessions";
52
- readonly CAN_READ_OTHERS_SESSIONS: "can_read_others_sessions";
53
- readonly CAN_READ_SESSIONS: "can_read_sessions";
54
- readonly CAN_WRITE_LABELS: "can_write_labels";
55
- readonly CAN_READ_LABELS: "can_read_labels";
56
- readonly CAN_READ_ROUTES: "can_read_routes";
57
- readonly CAN_READ_TEAMS: "can_read_teams";
58
- readonly CAN_READ_JOBS: "can_read_jobs";
59
- readonly CAN_WRITE_EVENTS: "can_write_events";
60
- readonly CAN_READ_TASKS: "can_read_tasks";
61
- readonly CAN_READ_ITEMS: "can_read_items";
62
- readonly CAN_READ_SKILLS: "can_read_skills";
63
- readonly CAN_WRITE_SESSIONS: "can_write_sessions";
64
- readonly CAN_READ_EMAILS: "can_read_emails";
65
- readonly CAN_WRITE_SMS: "can_write_sms";
66
- readonly CAN_READ_SMS: "can_read_sms";
67
- readonly CAN_WRITE_NOTIFICATIONS: "can_write_notifications";
68
- readonly CAN_READ_EVENTS: "can_read_events";
69
- readonly CAN_READ_MONTHS: "can_read_months";
70
- readonly CAN_WRITE_MONTHS: "can_write_months";
71
- readonly CAN_WRITE_BILLS: "can_write_bills";
72
- readonly CAN_READ_BILLS: "can_read_bills";
73
- readonly CAN_OPTIMIZE: "can_optimize";
74
- readonly CAN_READ_COMPANY: "can_read_company";
75
- readonly CAN_WRITE_OTHERS_TIMECARDS: "can_write_others_timecards";
76
- readonly CAN_READ_OTHERS_TIMECARDS: "can_read_others_timecards";
77
- readonly CAN_WRITE_TIMECARDS: "can_write_timecards";
78
- readonly CAN_READ_TIMECARDS: "can_read_timecards";
79
- readonly CAN_APPROVE_TIME_OFF: "can_approve_time_off";
80
- readonly IS_ROOT: "is_root";
81
- readonly IS_CUSTOMER: "is_customer";
82
- };
83
- export type Permission = typeof Permission[keyof typeof Permission];
84
44
  export interface ApiInfo {
85
45
  app_semver: string;
86
- db_healthy: boolean;
46
+ db_status: string;
87
47
  logged_in_as: string;
88
- ors_healthy: string;
89
- pelias_healthy: boolean;
48
+ ors_status: string;
49
+ pelias_status: string;
90
50
  version: string;
91
- vroom_healthy: boolean;
92
- }
93
- export interface CatalogItem {
94
- id: string;
95
- name: string;
96
- company_id: string;
97
- description: string;
98
- industry: string;
99
- price_format: string;
100
- payment_options: PaymentOption[];
101
- recommended_frequency?: number | null;
102
- recommended_activate_on?: number | null;
103
- recommended_expire_on?: number | null;
104
- time_created: number;
105
- time_updated: number | null;
106
- skills: string[];
107
- }
108
- export interface PaymentOption {
109
- name: string;
110
- id: string;
111
- is_prepay: boolean;
112
- price_under_prepay?: number;
113
- price: number;
114
- recommended_prepay_count?: number;
115
- mode: "MONTH" | "SERVICE";
116
- }
117
- export interface PaymentMethod {
118
- allow_redisplay: string;
119
- autopay: boolean;
120
- billing_details: {
121
- email: string;
122
- name: string;
123
- };
124
- created: number;
125
- customer: string;
126
- id: string;
127
- type: PaymentType;
128
- us_bank_account: {
129
- account_holder_type: string;
130
- account_type: string;
131
- bank_name: string;
132
- financial_connections_account: string;
133
- fingerprint: string;
134
- last4: string;
135
- networks: {
136
- preferred: string;
137
- supported: string[];
138
- };
139
- routing_number: string;
140
- status_details: object;
141
- } | null;
142
- card: {
143
- brand: string;
144
- checks: {
145
- address_line1_check: string;
146
- address_postal_code_check: string;
147
- cvc_check: string;
148
- };
149
- country: string;
150
- exp_month: number;
151
- exp_year: number;
152
- fingerprint: string;
153
- funding: string;
154
- last4: string;
155
- networks: {
156
- preferred: string;
157
- supported: string[];
158
- };
159
- three_d_secure_usage: {
160
- supported: boolean;
161
- };
162
- wallet: {
163
- type: string;
164
- } | null;
165
- } | null;
51
+ vroom_status: string;
166
52
  }
167
53
  export type ScheduleItem = {
168
54
  type: "location";
@@ -184,6 +70,7 @@ export type TeamSchedule = {
184
70
  schedule: ScheduleItem[];
185
71
  name: string;
186
72
  optimize: boolean;
73
+ frequency: FrequencyType;
187
74
  };
188
75
  export type RouteScheduleConfig = {
189
76
  schedules: TeamSchedule[];
@@ -191,72 +78,6 @@ export type RouteScheduleConfig = {
191
78
  blacklist: string[];
192
79
  tasks: string[];
193
80
  };
194
- export interface Avro {
195
- id: string;
196
- name: string;
197
- time_created: number;
198
- time_updated: number;
199
- emails: Email[];
200
- totp_email_id: string;
201
- billing_email_id: string;
202
- join_email_id: string;
203
- }
204
- export interface Friendship {
205
- }
206
- export interface MemberState {
207
- id: string;
208
- state: string;
209
- friendship: Friendship | null;
210
- last_message_read_at: number | null;
211
- }
212
- export interface LineItem {
213
- id: string;
214
- line_item_type: LineItemType;
215
- name: string;
216
- description: string;
217
- cost: number;
218
- amount: number;
219
- status: LineItemStatus;
220
- job_id: string;
221
- job_name: string;
222
- job_address: string;
223
- job_labels: string[];
224
- company_id: string;
225
- time_created: number;
226
- }
227
- export interface CustomLineItem extends LineItem {
228
- line_item_type: "CUSTOM";
229
- }
230
- export interface Reaction {
231
- id: string;
232
- message_id: string;
233
- sender_id: string;
234
- reaction: string;
235
- time_created: number;
236
- time_updated: number;
237
- }
238
- export interface Message {
239
- id: string;
240
- chat_id: string;
241
- sender_id: string;
242
- reply_to_id: string;
243
- content: string;
244
- reactions: Reaction[];
245
- time_created: number;
246
- time_updated: number;
247
- time_sent: number;
248
- message: string;
249
- }
250
- export interface Chat {
251
- id: string;
252
- name: string;
253
- company_id: string;
254
- time_created: number;
255
- time_updated: number;
256
- last_message: Message;
257
- user_state: MemberState[];
258
- messages: Message[];
259
- }
260
81
  export interface Location {
261
82
  accuracy: number;
262
83
  heading: number;
@@ -300,338 +121,6 @@ export interface Team {
300
121
  start_address: string;
301
122
  end_address: string;
302
123
  }
303
- export interface Subscription {
304
- time_created: number;
305
- time_updated: string;
306
- user_company_id: string;
307
- job_id: string;
308
- id: string;
309
- notifications: number;
310
- }
311
- export interface Plan {
312
- id: string;
313
- name: string;
314
- base_rate: number;
315
- price_per_job: number;
316
- description: string;
317
- referral_codes: string[];
318
- trial_period_days: number;
319
- time_created: number;
320
- time_updated: number;
321
- available_to_new_companies?: boolean;
322
- available_to?: string[];
323
- }
324
- export interface BillPayment {
325
- id: string;
326
- amount: number;
327
- avro_fees: number;
328
- stripe_fees: number;
329
- stripe_pi_id: string;
330
- bill_user_id: string;
331
- status: "created" | "processing" | "succeeded" | "failed" | "canceled" | "requires_action";
332
- type: "us_bank_account" | "card";
333
- action_required_at: number;
334
- time_created: number;
335
- time_updated: number | null;
336
- }
337
- export interface BillUser {
338
- id: string;
339
- user_id: string;
340
- bill_id: string;
341
- invoice_id: string;
342
- payment_attempts: BillPayment[];
343
- time_created: number;
344
- time_updated: number | null;
345
- amount: number;
346
- }
347
- export interface User {
348
- id: string;
349
- username: string;
350
- first_name: string;
351
- last_name: string;
352
- verified: boolean;
353
- email: string | null;
354
- phone_number: string | null;
355
- time_created: number;
356
- time_updated: number | null;
357
- share_location: boolean;
358
- can_send_emails: boolean | null;
359
- payment_methods: PaymentMethod[];
360
- autopay_payment_types: string[];
361
- autopay: boolean | null;
362
- chats: Chat[];
363
- bills: BillUser[];
364
- is_root: boolean;
365
- }
366
- export interface Break {
367
- id: string;
368
- time_started: number;
369
- time_ended: number;
370
- company_billable: boolean;
371
- client_billable: boolean;
372
- }
373
- export interface ServiceMonth extends LineItem {
374
- line_item_type: "SERVICE_MONTH";
375
- bill_id: string | null;
376
- tasks: string[];
377
- time_updated: number | null;
378
- }
379
- export interface Session {
380
- id: string;
381
- user_id: string;
382
- company_id: string;
383
- time_started: number;
384
- time_ended: number;
385
- break_id: string;
386
- is_paused: boolean;
387
- team_id: string;
388
- route_id: string;
389
- breaks: Break[];
390
- }
391
- export interface Group {
392
- id: string;
393
- name: string;
394
- is_active: boolean;
395
- is_user_type: boolean;
396
- users: string[];
397
- permissions: Permission[];
398
- company_id: string;
399
- time_created: number;
400
- time_updated: number;
401
- }
402
- export interface UserCompanyAssociation {
403
- id: string;
404
- user: User;
405
- company: string;
406
- permissions: Permission[];
407
- effective_permissions: Permission[];
408
- time_created: number | null;
409
- time_updated: number | null;
410
- notification_setting: NotificationLevel[];
411
- share_email_company_wide: boolean;
412
- notifications: Notification[];
413
- groups: string[];
414
- last_location: Location | null;
415
- }
416
- export interface Email {
417
- id: string;
418
- company_id: string;
419
- name: string;
420
- mail_server: string;
421
- mail_port: number;
422
- mail_username: string;
423
- mail_password: string | null;
424
- mail_default_sender: string;
425
- mail_use_tls: boolean;
426
- mail_use_ssl: boolean;
427
- mail_api_key: string;
428
- is_company_wide: boolean;
429
- users: User[];
430
- type: "OUTLOOK" | "SMTP" | "GMAIL";
431
- access_token?: string;
432
- access_token_expiry?: number;
433
- refresh_token?: string;
434
- refresh_token_expiry?: number;
435
- }
436
- export interface Label {
437
- name: string;
438
- id: string;
439
- company_id: string;
440
- color: string;
441
- jobs: string[];
442
- }
443
- export interface Bill {
444
- id: string;
445
- invoice_id: number;
446
- intuit_id: string | null;
447
- name: string;
448
- amount: number;
449
- billed_by: string;
450
- customer_email: string | null;
451
- manual_emails: string[][];
452
- users: BillUser[];
453
- status: "SENT" | "PAID" | "PARTIALLY_PAID" | "MANUALLY_PAID";
454
- enabled_payment_methods: PaymentType[];
455
- time_created: number;
456
- time_updated: number;
457
- events: string[];
458
- intent_created_at: number;
459
- intent_last_created_at: number;
460
- payments: BillPayment[];
461
- line_items: CustomLineItem[];
462
- prepayments: string[];
463
- months: string[];
464
- due_date: number;
465
- }
466
- export interface Skill {
467
- id: string;
468
- name: string;
469
- company_id: string;
470
- time_created: number;
471
- time_updated: number;
472
- }
473
- export interface PlanPayment {
474
- id: string;
475
- amount: number;
476
- stripe_pi_id: string;
477
- company_id: string;
478
- plan_id: string;
479
- status: "created" | "processing" | "succeeded" | "failed" | "canceled";
480
- time_created: number;
481
- time_updated: number;
482
- }
483
- export interface Company {
484
- id: string;
485
- name: string;
486
- email: string;
487
- emails: Email[];
488
- skills: Skill[];
489
- catalog_items: CatalogItem[];
490
- time_created: number;
491
- time_updated: number | null;
492
- users: UserCompanyAssociation[];
493
- use_client_side_customer_start_billing: boolean;
494
- use_client_side_customer_stop_billing: boolean;
495
- use_client_side_employee_start_billing: boolean;
496
- use_client_side_employee_stop_billing: boolean;
497
- logo_url: string;
498
- delay_scalar: number;
499
- payments: PlanPayment[];
500
- overdue_threshold: number;
501
- stripe_account_id: string;
502
- is_restricted: boolean;
503
- disabled_reason: string;
504
- completed_onboarding: boolean;
505
- restricted_soon: boolean;
506
- service_email_id: string;
507
- billing_email_id: string;
508
- num_events: number;
509
- num_jobs: number;
510
- num_routes: number;
511
- num_teams: number;
512
- num_skills: number;
513
- bills: Bill[];
514
- enabled_payment_methods: PaymentType[];
515
- sessions: Session[];
516
- num_sessions: number;
517
- labels: Label[];
518
- groups: Group[];
519
- indicator_lifetime: number;
520
- available_plans: Plan[];
521
- last_payment: number;
522
- last_charged: number;
523
- balance: number;
524
- plan_id: string;
525
- payment_methods: PaymentMethod[];
526
- intuit_connected: boolean;
527
- next_payment_due: number | null;
528
- }
529
- export interface RouteJob {
530
- time_created: number;
531
- route_id: string;
532
- job_id: string;
533
- id: string;
534
- order: number;
535
- estimated_arrival_time: number;
536
- scheduled_arrival_time: number;
537
- tasks: string[];
538
- }
539
- export interface Route {
540
- company: string;
541
- id: string;
542
- is_internal: boolean;
543
- jobs: RouteJob[];
544
- name: string;
545
- time_created: number;
546
- time_updated: number | null;
547
- teams: string[];
548
- polyline: string;
549
- is_optimized: boolean;
550
- start_time: number;
551
- end_time: number;
552
- start_latitude: number;
553
- start_longitude: number;
554
- end_latitude: number;
555
- end_longitude: number;
556
- }
557
- export interface Job {
558
- address: string;
559
- company: string;
560
- description: string;
561
- id: string;
562
- is_one_time: boolean;
563
- autostart_radius: number;
564
- latitude: number;
565
- longitude: number;
566
- name: string;
567
- internal_notes: string;
568
- external_notes: string;
569
- priority: number;
570
- tasks: Partial<Task>[];
571
- time_created: number;
572
- time_updated: number | null;
573
- routes: RouteJob[];
574
- subscribers: Subscription[];
575
- manual_emails: string[][];
576
- overdue_time: number;
577
- last_completed_event: _Event | null;
578
- current_event: _Event | null;
579
- labels: string[];
580
- owner: string;
581
- }
582
- export interface Prepayment extends LineItem {
583
- id: string;
584
- task_id: string | null;
585
- line_item_type: "PREPAYMENT";
586
- type: "SERVICE" | "MONTH";
587
- time_updated: number | null;
588
- num_events: number;
589
- num_service_months: number;
590
- }
591
- export interface Task {
592
- enforce_proof_amount: boolean;
593
- events: _Event[];
594
- frequency: number;
595
- id: string;
596
- job_id: string;
597
- name: string;
598
- internal_notes: string;
599
- external_notes: string;
600
- proof_amt: number;
601
- images: string[];
602
- time_created: number;
603
- time_updated: number | null;
604
- status: "PENDING_CUSTOMER" | "PENDING_COMPANY" | "ACTIVE" | "ARCHIVED" | "DRAFT" | "PENDING_PAYMENT" | "PENDING_ACTIVATION";
605
- created_by: UserCompanyAssociation | null;
606
- overdueness: number | null;
607
- overdue_time: number;
608
- last_completed_event: _Event | null;
609
- current_event: _Event | null;
610
- delay: number;
611
- skills: string[];
612
- service: number;
613
- bill_mode: "MONTH" | "SERVICE" | "NONE";
614
- price: number;
615
- services_remaining: number;
616
- activate_on: number | null;
617
- expire_on: number | null;
618
- catalog_item_id: string | null;
619
- bill_day: number | null;
620
- prepayments: Prepayment[];
621
- priority: boolean;
622
- route_ids: string[];
623
- }
624
- export interface TaskWrapper {
625
- latestEvent: number;
626
- task: Task;
627
- }
628
- export interface JobWrapper {
629
- latestEvent: number;
630
- routeIndex: number;
631
- job: Job;
632
- frequency: number;
633
- isOverdue: boolean;
634
- }
635
124
  export interface taskStartInfo {
636
125
  name: string;
637
126
  start: number;
@@ -641,39 +130,6 @@ export interface taskEndInfo {
641
130
  internal_notes: string;
642
131
  external_notes: string;
643
132
  }
644
- export interface AdditionalCharge extends LineItem {
645
- line_item_type: "ADDITIONAL_CHARGE";
646
- time_updated: number | null;
647
- }
648
- export interface UserEvent {
649
- id: string;
650
- session_id: string;
651
- event_id: string;
652
- user_id: string | null;
653
- team_id: string | null;
654
- user_name: string | null;
655
- team_name: string | null;
656
- time_started: number | null;
657
- time_ended: number | null;
658
- time_created: number | null;
659
- time_updated: number | null;
660
- }
661
- export interface _Event extends LineItem {
662
- breaks: string[];
663
- line_item_type: "EVENT";
664
- internal_notes: string;
665
- external_notes: string;
666
- proofs: string[];
667
- tasks: string[];
668
- time_ended: number | null;
669
- time_started: number;
670
- time_updated: number | null;
671
- bill_id: string;
672
- billed_amount: number;
673
- additional_charges: AdditionalCharge[];
674
- users: UserEvent[];
675
- autostart: boolean;
676
- }
677
133
  export interface FinancialInsightData {
678
134
  start: number;
679
135
  end: number;