@go-avro/avro-js 0.1.6 → 0.1.7

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 (90) hide show
  1. package/dist/auth/AuthManager.d.ts +2 -2
  2. package/dist/auth/AuthManager.js +2 -2
  3. package/dist/auth/storage.d.ts +1 -1
  4. package/dist/billing/fees.d.ts +1 -1
  5. package/dist/billing/fees.js +1 -1
  6. package/dist/census.d.ts +1 -1
  7. package/dist/client/AvroQueryClientProvider.d.ts +1 -1
  8. package/dist/client/QueryClient.d.ts +17 -11
  9. package/dist/client/QueryClient.js +57 -26
  10. package/dist/client/core/fetch.js +4 -4
  11. package/dist/client/core/utils.js +1 -1
  12. package/dist/client/core/xhr.js +4 -4
  13. package/dist/client/hooks/address.js +1 -1
  14. package/dist/client/hooks/analytics.js +1 -1
  15. package/dist/client/hooks/audit.js +1 -1
  16. package/dist/client/hooks/avro.js +9 -1
  17. package/dist/client/hooks/bills.js +3 -3
  18. package/dist/client/hooks/catalog_items.js +1 -1
  19. package/dist/client/hooks/chats.js +2 -2
  20. package/dist/client/hooks/checkins.js +1 -1
  21. package/dist/client/hooks/companies.js +3 -3
  22. package/dist/client/hooks/devices.js +1 -1
  23. package/dist/client/hooks/email.d.ts +1 -1
  24. package/dist/client/hooks/email.js +1 -1
  25. package/dist/client/hooks/events.js +3 -3
  26. package/dist/client/hooks/groups.js +2 -2
  27. package/dist/client/hooks/jobs.js +3 -3
  28. package/dist/client/hooks/labels.js +2 -2
  29. package/dist/client/hooks/messages.js +2 -2
  30. package/dist/client/hooks/months.js +3 -3
  31. package/dist/client/hooks/payouts.js +2 -2
  32. package/dist/client/hooks/plans.js +1 -1
  33. package/dist/client/hooks/prepayments.js +3 -3
  34. package/dist/client/hooks/proposal.js +2 -2
  35. package/dist/client/hooks/root.js +1 -1
  36. package/dist/client/hooks/routes.js +3 -3
  37. package/dist/client/hooks/sessions.js +3 -3
  38. package/dist/client/hooks/skills.js +2 -2
  39. package/dist/client/hooks/teams.js +2 -2
  40. package/dist/client/hooks/timecards.js +1 -1
  41. package/dist/client/hooks/users.js +7 -3
  42. package/dist/client/hooks/waivers.js +2 -2
  43. package/dist/client/persist.js +2 -2
  44. package/dist/client/realtime.d.ts +2 -2
  45. package/dist/client/realtime.js +4 -2
  46. package/dist/index.d.ts +52 -52
  47. package/dist/index.js +47 -47
  48. package/dist/presence.d.ts +1 -1
  49. package/dist/types/api/AdditionalCharge.d.ts +1 -1
  50. package/dist/types/api/Avro.d.ts +72 -1
  51. package/dist/types/api/Bill.d.ts +8 -8
  52. package/dist/types/api/Bill.js +1 -1
  53. package/dist/types/api/BillUser.d.ts +1 -1
  54. package/dist/types/api/CatalogItem.d.ts +1 -1
  55. package/dist/types/api/Chat.d.ts +2 -2
  56. package/dist/types/api/Company.d.ts +11 -11
  57. package/dist/types/api/CustomLineItem.d.ts +1 -1
  58. package/dist/types/api/DelayEvent.d.ts +2 -2
  59. package/dist/types/api/DelayEvent.js +1 -1
  60. package/dist/types/api/Device.d.ts +2 -2
  61. package/dist/types/api/Email.d.ts +1 -1
  62. package/dist/types/api/Group.d.ts +1 -1
  63. package/dist/types/api/Job.d.ts +7 -7
  64. package/dist/types/api/Job.js +2 -2
  65. package/dist/types/api/LineItem.d.ts +1 -1
  66. package/dist/types/api/MemberState.d.ts +1 -1
  67. package/dist/types/api/Message.d.ts +1 -1
  68. package/dist/types/api/PaymentMethod.d.ts +1 -1
  69. package/dist/types/api/Payout.d.ts +1 -1
  70. package/dist/types/api/Prepayment.d.ts +2 -2
  71. package/dist/types/api/Prepayment.js +1 -1
  72. package/dist/types/api/ProcessingFeeLineItem.d.ts +1 -1
  73. package/dist/types/api/Route.d.ts +3 -3
  74. package/dist/types/api/Route.js +1 -1
  75. package/dist/types/api/RouteJob.d.ts +1 -1
  76. package/dist/types/api/ServiceMonth.d.ts +1 -1
  77. package/dist/types/api/Session.d.ts +2 -2
  78. package/dist/types/api/Task.d.ts +6 -6
  79. package/dist/types/api/Task.js +1 -1
  80. package/dist/types/api/Timecard.d.ts +1 -1
  81. package/dist/types/api/User.d.ts +6 -6
  82. package/dist/types/api/UserCompanyAssociation.d.ts +2 -2
  83. package/dist/types/api/_Event.d.ts +4 -4
  84. package/dist/types/api/_Event.js +1 -1
  85. package/dist/types/api.d.ts +49 -49
  86. package/dist/types/api.js +47 -47
  87. package/dist/types/cache.d.ts +1 -1
  88. package/dist/version.d.ts +1 -1
  89. package/dist/version.js +1 -1
  90. package/package.json +1 -1
@@ -4,7 +4,7 @@
4
4
  * `delete` removes, `invalidate` refetches. Query keys: `[ns, id]`
5
5
  * detail, `keys.list/keys.infinite(ns, scope, filters)` for lists.
6
6
  */
7
- import { Bill, constructEvent, Job, Route, Session } from '../types/api';
7
+ import { Bill, constructEvent, Job, Route, Session } from '../types/api.js';
8
8
  export const keys = {
9
9
  detail: (ns, id) => [ns, id],
10
10
  list: (ns, scope, filters = {}) => [ns, 'list', scope ?? '', filters],
@@ -448,7 +448,9 @@ export function fallbackInvalidate(qc, types) {
448
448
  export function patchMemberLocation(qc, data) {
449
449
  const userId = data?.user_id;
450
450
  if (!userId || typeof userId !== 'string' || typeof data?.latitude !== 'number') {
451
- qc.invalidateQueries({ queryKey: ['users', 'company'] });
451
+ // Malformed ping: stale-mark only — an active refetch per bad
452
+ // ping re-downloads the full member list on every client.
453
+ qc.invalidateQueries({ queryKey: ['users', 'company'], refetchType: 'none' });
452
454
  return;
453
455
  }
454
456
  qc.setQueriesData({ queryKey: ['users', 'company'] }, (old) => {
package/dist/index.d.ts CHANGED
@@ -1,52 +1,52 @@
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 type { BulkBillError, BulkDeleteBillsResponse, BulkEmailBillsResponse, } from './client/hooks/bills';
6
- export { AuthManager } from './auth/AuthManager';
7
- export { MemoryStorage, LocalStorage } from './auth/storage';
8
- export { QueryPersister, IndexedDBStore, MemoryKeyValueStore, defaultKeyValueStore, PERSISTED_NAMESPACES, } from './client/persist';
9
- export type { KeyValueStore, QueryPersistOptions } from './client/persist';
10
- import './client/core/xhr';
11
- import './client/core/fetch';
12
- import './client/core/utils';
13
- import './client/hooks/address';
14
- import './client/hooks/root';
15
- import './client/hooks/jobs';
16
- import './client/hooks/audit';
17
- import './client/hooks/routes';
18
- import './client/hooks/events';
19
- import './client/hooks/months';
20
- import './client/hooks/bills';
21
- import './client/hooks/payouts';
22
- import './client/hooks/companies';
23
- import './client/hooks/devices';
24
- import './client/hooks/users';
25
- import './client/hooks/sessions';
26
- import './client/hooks/checkins';
27
- import './client/hooks/chats';
28
- import './client/hooks/catalog_items';
29
- import './client/hooks/messages';
30
- import './client/hooks/plans';
31
- import './client/hooks/prepayments';
32
- import './client/hooks/analytics';
33
- import './client/hooks/avro';
34
- import './client/hooks/teams';
35
- import './client/hooks/labels';
36
- import './client/hooks/groups';
37
- import './client/hooks/skills';
38
- import './client/hooks/proposal';
39
- import './client/hooks/timecards';
40
- import './client/hooks/waivers';
41
- import './client/hooks/email';
42
- export { defaultPassOnFeeMethod } from './billing/fees';
43
- export { reverseGeocode } from './geocode';
44
- export { fetchCensusFeatures } from './census';
45
- export { LOCATION_STALE_MINUTES, LOCATION_RECENT_HOURS, isLocationRecent, REPORTING_STATUSES, locationAgeMinutes, isLocationStale, isReportingStatus, isMobileDevice, mobileDevices, userPresence, } from './presence';
46
- export type { UserPresence } from './presence';
47
- export type { ReverseGeocodeResult } from './geocode';
48
- export * from './types/api';
49
- export * from './types/auth';
50
- export * from './types/cache';
51
- export * from './types/client';
52
- export * from './types/error';
1
+ export { AvroQueryClientConfig, AvroQueryClient } from './client/QueryClient.js';
2
+ export { AvroQueryClientProvider, useAvroQueryClient, useSocketEvent, } from './client/AvroQueryClientProvider.js';
3
+ export { useEmailStatus } from './client/hooks/email.js';
4
+ export type { EmailResult, EmailResultStatus, UseEmailStatusOptions } from './client/hooks/email.js';
5
+ export type { BulkBillError, BulkDeleteBillsResponse, BulkEmailBillsResponse, } from './client/hooks/bills.js';
6
+ export { AuthManager } from './auth/AuthManager.js';
7
+ export { MemoryStorage, LocalStorage } from './auth/storage.js';
8
+ export { QueryPersister, IndexedDBStore, MemoryKeyValueStore, defaultKeyValueStore, PERSISTED_NAMESPACES, } from './client/persist.js';
9
+ export type { KeyValueStore, QueryPersistOptions } from './client/persist.js';
10
+ import './client/core/xhr.js';
11
+ import './client/core/fetch.js';
12
+ import './client/core/utils.js';
13
+ import './client/hooks/address.js';
14
+ import './client/hooks/root.js';
15
+ import './client/hooks/jobs.js';
16
+ import './client/hooks/audit.js';
17
+ import './client/hooks/routes.js';
18
+ import './client/hooks/events.js';
19
+ import './client/hooks/months.js';
20
+ import './client/hooks/bills.js';
21
+ import './client/hooks/payouts.js';
22
+ import './client/hooks/companies.js';
23
+ import './client/hooks/devices.js';
24
+ import './client/hooks/users.js';
25
+ import './client/hooks/sessions.js';
26
+ import './client/hooks/checkins.js';
27
+ import './client/hooks/chats.js';
28
+ import './client/hooks/catalog_items.js';
29
+ import './client/hooks/messages.js';
30
+ import './client/hooks/plans.js';
31
+ import './client/hooks/prepayments.js';
32
+ import './client/hooks/analytics.js';
33
+ import './client/hooks/avro.js';
34
+ import './client/hooks/teams.js';
35
+ import './client/hooks/labels.js';
36
+ import './client/hooks/groups.js';
37
+ import './client/hooks/skills.js';
38
+ import './client/hooks/proposal.js';
39
+ import './client/hooks/timecards.js';
40
+ import './client/hooks/waivers.js';
41
+ import './client/hooks/email.js';
42
+ export { defaultPassOnFeeMethod } from './billing/fees.js';
43
+ export { reverseGeocode } from './geocode.js';
44
+ export { fetchCensusFeatures } from './census.js';
45
+ export { LOCATION_STALE_MINUTES, LOCATION_RECENT_HOURS, isLocationRecent, REPORTING_STATUSES, locationAgeMinutes, isLocationStale, isReportingStatus, isMobileDevice, mobileDevices, userPresence, } from './presence.js';
46
+ export type { UserPresence } from './presence.js';
47
+ export type { ReverseGeocodeResult } from './geocode.js';
48
+ export * from './types/api.js';
49
+ export * from './types/auth.js';
50
+ export * from './types/cache.js';
51
+ export * from './types/client.js';
52
+ export * from './types/error.js';
package/dist/index.js CHANGED
@@ -1,47 +1,47 @@
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
- export { QueryPersister, IndexedDBStore, MemoryKeyValueStore, defaultKeyValueStore, PERSISTED_NAMESPACES, } from './client/persist';
7
- import './client/core/xhr';
8
- import './client/core/fetch';
9
- import './client/core/utils';
10
- import './client/hooks/address';
11
- import './client/hooks/root';
12
- import './client/hooks/jobs';
13
- import './client/hooks/audit';
14
- import './client/hooks/routes';
15
- import './client/hooks/events';
16
- import './client/hooks/months';
17
- import './client/hooks/bills';
18
- import './client/hooks/payouts';
19
- import './client/hooks/companies';
20
- import './client/hooks/devices';
21
- import './client/hooks/users';
22
- import './client/hooks/sessions';
23
- import './client/hooks/checkins';
24
- import './client/hooks/chats';
25
- import './client/hooks/catalog_items';
26
- import './client/hooks/messages';
27
- import './client/hooks/plans';
28
- import './client/hooks/prepayments';
29
- import './client/hooks/analytics';
30
- import './client/hooks/avro';
31
- import './client/hooks/teams';
32
- import './client/hooks/labels';
33
- import './client/hooks/groups';
34
- import './client/hooks/skills';
35
- import './client/hooks/proposal';
36
- import './client/hooks/timecards';
37
- import './client/hooks/waivers';
38
- import './client/hooks/email';
39
- export { defaultPassOnFeeMethod } from './billing/fees';
40
- export { reverseGeocode } from './geocode';
41
- export { fetchCensusFeatures } from './census';
42
- export { LOCATION_STALE_MINUTES, LOCATION_RECENT_HOURS, isLocationRecent, REPORTING_STATUSES, locationAgeMinutes, isLocationStale, isReportingStatus, isMobileDevice, mobileDevices, userPresence, } from './presence';
43
- export * from './types/api';
44
- export * from './types/auth';
45
- export * from './types/cache';
46
- export * from './types/client';
47
- export * from './types/error';
1
+ export { AvroQueryClient } from './client/QueryClient.js';
2
+ export { AvroQueryClientProvider, useAvroQueryClient, useSocketEvent, } from './client/AvroQueryClientProvider.js';
3
+ export { useEmailStatus } from './client/hooks/email.js';
4
+ export { AuthManager } from './auth/AuthManager.js';
5
+ export { MemoryStorage, LocalStorage } from './auth/storage.js';
6
+ export { QueryPersister, IndexedDBStore, MemoryKeyValueStore, defaultKeyValueStore, PERSISTED_NAMESPACES, } from './client/persist.js';
7
+ import './client/core/xhr.js';
8
+ import './client/core/fetch.js';
9
+ import './client/core/utils.js';
10
+ import './client/hooks/address.js';
11
+ import './client/hooks/root.js';
12
+ import './client/hooks/jobs.js';
13
+ import './client/hooks/audit.js';
14
+ import './client/hooks/routes.js';
15
+ import './client/hooks/events.js';
16
+ import './client/hooks/months.js';
17
+ import './client/hooks/bills.js';
18
+ import './client/hooks/payouts.js';
19
+ import './client/hooks/companies.js';
20
+ import './client/hooks/devices.js';
21
+ import './client/hooks/users.js';
22
+ import './client/hooks/sessions.js';
23
+ import './client/hooks/checkins.js';
24
+ import './client/hooks/chats.js';
25
+ import './client/hooks/catalog_items.js';
26
+ import './client/hooks/messages.js';
27
+ import './client/hooks/plans.js';
28
+ import './client/hooks/prepayments.js';
29
+ import './client/hooks/analytics.js';
30
+ import './client/hooks/avro.js';
31
+ import './client/hooks/teams.js';
32
+ import './client/hooks/labels.js';
33
+ import './client/hooks/groups.js';
34
+ import './client/hooks/skills.js';
35
+ import './client/hooks/proposal.js';
36
+ import './client/hooks/timecards.js';
37
+ import './client/hooks/waivers.js';
38
+ import './client/hooks/email.js';
39
+ export { defaultPassOnFeeMethod } from './billing/fees.js';
40
+ export { reverseGeocode } from './geocode.js';
41
+ export { fetchCensusFeatures } from './census.js';
42
+ export { LOCATION_STALE_MINUTES, LOCATION_RECENT_HOURS, isLocationRecent, REPORTING_STATUSES, locationAgeMinutes, isLocationStale, isReportingStatus, isMobileDevice, mobileDevices, userPresence, } from './presence.js';
43
+ export * from './types/api.js';
44
+ export * from './types/auth.js';
45
+ export * from './types/cache.js';
46
+ export * from './types/client.js';
47
+ export * from './types/error.js';
@@ -1,4 +1,4 @@
1
- import type { Device, Location, LocationServicesStatus } from './types/api';
1
+ import type { Device, Location, LocationServicesStatus } from './types/api.js';
2
2
  /**
3
3
  * Statuses under which a device promises to keep pinging. Mirrors the
4
4
  * backend's REPORTING_STATUSES: only these flip to APP_DEAD when the
@@ -1,4 +1,4 @@
1
- import { LineItem } from '../../types/api/LineItem';
1
+ import { LineItem } from './LineItem.js';
2
2
  export interface AdditionalCharge extends LineItem {
3
3
  line_item_type: 'ADDITIONAL_CHARGE';
4
4
  time_updated: number | null;
@@ -1,4 +1,4 @@
1
- import { Email } from '../../types/api/Email';
1
+ import { Email } from './Email.js';
2
2
  export interface Avro {
3
3
  id: string;
4
4
  name: string;
@@ -26,6 +26,77 @@ export interface StorageAnalytics {
26
26
  /** Ordered by bytes, largest first. */
27
27
  by_company: StorageByCompany[];
28
28
  }
29
+ /** One gunicorn worker's SQLAlchemy pool and process stats. */
30
+ export interface PerformanceWorker {
31
+ /** `<hostname>:<pid>` of the worker process. */
32
+ worker: string;
33
+ /** Unix seconds when the worker last reported. */
34
+ time: number;
35
+ pool_size: number;
36
+ max_overflow: number;
37
+ checked_out: number;
38
+ checked_in: number;
39
+ overflow: number;
40
+ rss_bytes: number;
41
+ cpu_percent: number;
42
+ }
43
+ /** CPU/RAM of one machine running backend workers. */
44
+ export interface PerformanceHost {
45
+ host: string;
46
+ /** Unix seconds when the host last reported. */
47
+ time: number;
48
+ cpu_percent: number;
49
+ cpu_count: number;
50
+ load_avg: number;
51
+ memory_total_bytes: number;
52
+ memory_used_bytes: number;
53
+ memory_percent: number;
54
+ }
55
+ /** pg_stat_activity summary for the application database. */
56
+ export interface PerformanceDatabase {
57
+ /** Connection count and oldest age per state ("active", "idle", "idle in transaction", ...). */
58
+ states: Record<string, {
59
+ count: number;
60
+ max_age_seconds: number;
61
+ }>;
62
+ total: number;
63
+ idle_in_transaction: number;
64
+ max_connections: number;
65
+ }
66
+ /** Live per-worker and per-host stats aggregated across the fleet. */
67
+ export interface PerformanceFleet {
68
+ workers: PerformanceWorker[];
69
+ hosts: PerformanceHost[];
70
+ pool_in_use: number;
71
+ pool_capacity: number;
72
+ }
73
+ /** One point of performance history, recorded by the scheduler. */
74
+ export interface PerformanceSample {
75
+ /** Unix seconds when the sample was taken. */
76
+ time: number;
77
+ /** Connection count per pg_stat_activity state. */
78
+ connections: Record<string, number>;
79
+ total_connections: number;
80
+ idle_in_transaction: number;
81
+ max_connections: number;
82
+ pool_in_use: number;
83
+ pool_capacity: number;
84
+ worker_count: number;
85
+ hosts: {
86
+ host: string;
87
+ cpu_percent: number;
88
+ memory_percent: number;
89
+ }[];
90
+ }
91
+ /** Response of GET /avro/performance (root only). */
92
+ export interface PerformanceMetrics {
93
+ current: {
94
+ database: PerformanceDatabase;
95
+ fleet: PerformanceFleet;
96
+ };
97
+ /** Oldest first. */
98
+ samples: PerformanceSample[];
99
+ }
29
100
  /** A crash or error reported by a client (app or web). */
30
101
  export interface ClientErrorReport {
31
102
  message: string;
@@ -1,10 +1,10 @@
1
- import { BillPayment } from '../../types/api/BillPayment';
2
- import { BillUser } from '../../types/api/BillUser';
3
- import { CustomLineItem } from '../../types/api/CustomLineItem';
4
- import { LineItem } from '../../types/api/LineItem';
5
- import { PaymentType } from '../../types/api/PaymentType';
6
- import { Refund } from '../../types/api/Refund';
7
- import { ProcessingFeeLineItem } from '../../types/api/ProcessingFeeLineItem';
1
+ import { BillPayment } from './BillPayment.js';
2
+ import { BillUser } from './BillUser.js';
3
+ import { CustomLineItem } from './CustomLineItem.js';
4
+ import { LineItem } from './LineItem.js';
5
+ import { PaymentType } from './PaymentType.js';
6
+ import { Refund } from './Refund.js';
7
+ import { ProcessingFeeLineItem } from './ProcessingFeeLineItem.js';
8
8
  export type BillLineItem = CustomLineItem | ProcessingFeeLineItem;
9
9
  export declare const BillStatus: {
10
10
  readonly SENT: "SENT";
@@ -13,7 +13,7 @@ export declare const BillStatus: {
13
13
  readonly MANUALLY_PAID: "MANUALLY_PAID";
14
14
  };
15
15
  export type BillStatus = (typeof BillStatus)[keyof typeof BillStatus];
16
- declare module '../../types/api/Bill' {
16
+ declare module './Bill.js' {
17
17
  interface Bill {
18
18
  id: string;
19
19
  invoice_id: number;
@@ -1,4 +1,4 @@
1
- import { LineItem } from '../../types/api/LineItem';
1
+ import { LineItem } from './LineItem.js';
2
2
  export const BillStatus = {
3
3
  SENT: 'SENT',
4
4
  PAID: 'PAID',
@@ -1,4 +1,4 @@
1
- import { BillPayment } from '../../types/api/BillPayment';
1
+ import { BillPayment } from './BillPayment.js';
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 './PaymentOption.js';
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 './Message.js';
2
+ import { MemberState } from './MemberState.js';
3
3
  export interface Chat {
4
4
  id: string;
5
5
  name: string;
@@ -1,14 +1,14 @@
1
- import { Bill } from '../../types/api/Bill';
2
- import { Email } from '../../types/api/Email';
3
- import { Group } from '../../types/api/Group';
4
- import { Label } from '../../types/api/Label';
5
- import { PaymentMethod } from '../../types/api/PaymentMethod';
6
- import { PaymentType } from '../../types/api/PaymentType';
7
- import { Plan } from '../../types/api/Plan';
8
- import { PlanPayment } from '../../types/api/PlanPayment';
9
- import { Session } from '../../types/api/Session';
10
- import { Skill } from '../../types/api/Skill';
11
- import { CatalogItem } from '../../types/api/CatalogItem';
1
+ import { Bill } from './Bill.js';
2
+ import { Email } from './Email.js';
3
+ import { Group } from './Group.js';
4
+ import { Label } from './Label.js';
5
+ import { PaymentMethod } from './PaymentMethod.js';
6
+ import { PaymentType } from './PaymentType.js';
7
+ import { Plan } from './Plan.js';
8
+ import { PlanPayment } from './PlanPayment.js';
9
+ import { Session } from './Session.js';
10
+ import { Skill } from './Skill.js';
11
+ import { CatalogItem } from './CatalogItem.js';
12
12
  export interface Company {
13
13
  id: string;
14
14
  name: string;
@@ -1,4 +1,4 @@
1
- import { LineItem } from '../../types/api/LineItem';
1
+ import { LineItem } from './LineItem.js';
2
2
  export interface CustomLineItem extends LineItem {
3
3
  line_item_type: 'CUSTOM';
4
4
  }
@@ -1,5 +1,5 @@
1
- import { _Event } from '../../types/api/_Event';
2
- declare module '../../types/api/DelayEvent' {
1
+ import { _Event } from './_Event.js';
2
+ declare module './DelayEvent.js' {
3
3
  interface DelayEvent extends _Event {
4
4
  line_item_type: 'DELAY';
5
5
  /** Seconds this delay added to each linked task's delay. */
@@ -1,4 +1,4 @@
1
- import { _Event } from '../../types/api/_Event';
1
+ import { _Event } from './_Event.js';
2
2
  /**
3
3
  * An instantaneous, never-billable record of a schedule delay.
4
4
  *
@@ -1,5 +1,5 @@
1
- import { Location } from '../../types/api';
2
- import { LocationServicesStatus } from '../../types/api/UserCompanyAssociation';
1
+ import { Location } from '../api.js';
2
+ import { LocationServicesStatus } from './UserCompanyAssociation.js';
3
3
  export declare const DevicePlatform: {
4
4
  readonly IOS: "ios";
5
5
  readonly ANDROID: "android";
@@ -1,4 +1,4 @@
1
- import { User } from '../../types/api/User';
1
+ import { User } from './User.js';
2
2
  export interface Email {
3
3
  id: string;
4
4
  company_id: string;
@@ -1,4 +1,4 @@
1
- import { Permission } from '../../types/api/UserCompanyAssociation';
1
+ import { Permission } from './UserCompanyAssociation.js';
2
2
  export interface Group {
3
3
  id: string;
4
4
  name: string;
@@ -1,10 +1,10 @@
1
- import { Task } from '../../types/api/Task';
2
- import { _Event } from '../../types/api/_Event';
3
- import type { CheckIn } from '../../types/api';
4
- import { RouteJob } from '../../types/api/RouteJob';
5
- import { Subscription } from '../../types/api/Subscription';
6
- import { Route } from '../../types/api/Route';
7
- declare module '../../types/api/Job' {
1
+ import { Task } from './Task.js';
2
+ import { _Event } from './_Event.js';
3
+ import type { CheckIn } from '../api.js';
4
+ import { RouteJob } from './RouteJob.js';
5
+ import { Subscription } from './Subscription.js';
6
+ import { Route } from './Route.js';
7
+ declare module './Job.js' {
8
8
  interface Job {
9
9
  address: string;
10
10
  company: string;
@@ -1,5 +1,5 @@
1
- import { Task, TaskStatus } from '../../types/api/Task';
2
- import { RouteJob } from '../../types/api/RouteJob';
1
+ import { Task, TaskStatus } from './Task.js';
2
+ import { RouteJob } from './RouteJob.js';
3
3
  export class Job {
4
4
  constructor(init) {
5
5
  this.isOverdue = () => {
@@ -18,7 +18,7 @@ export declare const LineItemType: {
18
18
  readonly PROCESSING_FEE: "PROCESSING_FEE";
19
19
  };
20
20
  export type LineItemType = (typeof LineItemType)[keyof typeof LineItemType];
21
- declare module '../../types/api/LineItem' {
21
+ declare module './LineItem.js' {
22
22
  interface LineItem {
23
23
  id: string;
24
24
  line_item_type: LineItemType;
@@ -1,4 +1,4 @@
1
- import { Friendship } from '../../types/api/Friendship';
1
+ import { Friendship } from './Friendship.js';
2
2
  export interface MemberState {
3
3
  id: string;
4
4
  state: string;
@@ -1,4 +1,4 @@
1
- import { Reaction } from '../../types/api/Reaction';
1
+ import { Reaction } from './Reaction.js';
2
2
  export interface Message {
3
3
  id: string;
4
4
  chat_id: string;
@@ -1,4 +1,4 @@
1
- import { PaymentType } from '../../types/api/PaymentType';
1
+ import { PaymentType } from './PaymentType.js';
2
2
  export interface PaymentMethod {
3
3
  allow_redisplay: string;
4
4
  autopay: boolean;
@@ -1,4 +1,4 @@
1
- import { BillPayment } from '../../types/api/BillPayment';
1
+ import { BillPayment } from './BillPayment.js';
2
2
  /**
3
3
  * A Stripe payout — one bank deposit that batches many invoice payments
4
4
  * net of fees. `payments` are the BillPayments that settled in this payout,
@@ -1,5 +1,5 @@
1
- import { LineItem } from '../../types/api/LineItem';
2
- declare module '../../types/api/Prepayment' {
1
+ import { LineItem } from './LineItem.js';
2
+ declare module './Prepayment.js' {
3
3
  interface Prepayment extends LineItem {
4
4
  id: string;
5
5
  task_id: string | null;
@@ -1,4 +1,4 @@
1
- import { LineItem } from '../../types/api/LineItem';
1
+ import { LineItem } from './LineItem.js';
2
2
  export class Prepayment extends LineItem {
3
3
  constructor(init) {
4
4
  super(init);
@@ -1,4 +1,4 @@
1
- import { LineItem } from '../../types/api/LineItem';
1
+ import { LineItem } from './LineItem.js';
2
2
  /**
3
3
  * A read-only line item populated by the backend when the bill has
4
4
  * `pass_on_fees` enabled. Represents the Stripe + Avro processing fees being
@@ -1,5 +1,5 @@
1
- import { RouteJob } from '../../types/api/RouteJob';
2
- import type { Job } from '../../types/api/Job';
1
+ import { RouteJob } from './RouteJob.js';
2
+ import type { Job } from './Job.js';
3
3
  export declare const FrequencyType: {
4
4
  readonly ONCE: "ONCE";
5
5
  readonly DAILY: "DAILY";
@@ -9,7 +9,7 @@ export declare const FrequencyType: {
9
9
  readonly YEARLY: "YEARLY";
10
10
  };
11
11
  export type FrequencyType = (typeof FrequencyType)[keyof typeof FrequencyType];
12
- declare module '../../types/api/Route' {
12
+ declare module './Route.js' {
13
13
  interface Route {
14
14
  company: string;
15
15
  id: string;
@@ -1,4 +1,4 @@
1
- import { RouteJob } from '../../types/api/RouteJob';
1
+ import { RouteJob } from './RouteJob.js';
2
2
  export const FrequencyType = {
3
3
  ONCE: 'ONCE',
4
4
  DAILY: 'DAILY',
@@ -1,4 +1,4 @@
1
- declare module '../../types/api/RouteJob' {
1
+ declare module './RouteJob.js' {
2
2
  interface RouteJob {
3
3
  time_created: number;
4
4
  route_id: string;
@@ -1,4 +1,4 @@
1
- import { LineItem } from '../../types/api/LineItem';
1
+ import { LineItem } from './LineItem.js';
2
2
  export interface ServiceMonth extends LineItem {
3
3
  line_item_type: 'SERVICE_MONTH';
4
4
  job_id: string | null;
@@ -1,5 +1,5 @@
1
- import { Break } from '../../types/api/Break';
2
- declare module '../../types/api/Session' {
1
+ import { Break } from './Break.js';
2
+ declare module './Session.js' {
3
3
  interface Session {
4
4
  id: string;
5
5
  user_id: string;
@@ -1,8 +1,8 @@
1
- import { UserCompanyAssociation } from '../../types/api/UserCompanyAssociation';
2
- import { Prepayment } from '../../types/api/Prepayment';
3
- import { PaymentOption } from '../../types/api/PaymentOption';
4
- import { _Event } from '../../types/api/_Event';
5
- import { Route } from '../../types/api/Route';
1
+ import { UserCompanyAssociation } from './UserCompanyAssociation.js';
2
+ import { Prepayment } from './Prepayment.js';
3
+ import { PaymentOption } from './PaymentOption.js';
4
+ import { _Event } from './_Event.js';
5
+ import { Route } from './Route.js';
6
6
  export declare const TaskStatus: {
7
7
  readonly PENDING_CUSTOMER: "PENDING_CUSTOMER";
8
8
  readonly PENDING_COMPANY: "PENDING_COMPANY";
@@ -28,7 +28,7 @@ export declare const UnroutedReason: {
28
28
  };
29
29
  export type UnroutedReason = (typeof UnroutedReason)[keyof typeof UnroutedReason];
30
30
  export declare const UNROUTED_REASON_LABELS: Record<UnroutedReason, string>;
31
- declare module '../../types/api/Task' {
31
+ declare module './Task.js' {
32
32
  interface Task {
33
33
  enforce_image_amount: boolean;
34
34
  events: _Event[];