@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,4 +1,4 @@
1
- import { LineItem } from "../../types/api/LineItem";
1
+ import { LineItem } from '../../types/api/LineItem';
2
2
  export class _Event extends LineItem {
3
3
  constructor(init) {
4
4
  super(init);
@@ -1,44 +1,44 @@
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/EmailNotification";
15
- export * from "../types/api/Friendship";
16
- export * from "../types/api/Group";
17
- export * from "../types/api/Job";
18
- export * from "../types/api/Label";
19
- export * from "../types/api/LineItem";
20
- export * from "../types/api/MemberState";
21
- export * from "../types/api/Message";
22
- export * from "../types/api/PaymentMethod";
23
- export * from "../types/api/PaymentOption";
24
- export * from "../types/api/PaymentType";
25
- export * from "../types/api/Plan";
26
- export * from "../types/api/PlanPayment";
27
- export * from "../types/api/Prepayment";
28
- export * from "../types/api/Reaction";
29
- export * from "../types/api/Route";
30
- export * from "../types/api/RouteJob";
31
- export * from "../types/api/ServiceMonth";
32
- export * from "../types/api/Session";
33
- export * from "../types/api/Skill";
34
- export * from "../types/api/Subscription";
35
- export * from "../types/api/Task";
36
- export * from "../types/api/Timecard";
37
- export * from "../types/api/TimecardAction";
38
- export * from "../types/api/User";
39
- export * from "../types/api/UserCompanyAssociation";
40
- export * from "../types/api/UserEvent";
41
- export * from "../types/api/Waiver";
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/EmailNotification';
15
+ export * from '../types/api/Friendship';
16
+ export * from '../types/api/Group';
17
+ export * from '../types/api/Job';
18
+ export * from '../types/api/Label';
19
+ export * from '../types/api/LineItem';
20
+ export * from '../types/api/MemberState';
21
+ export * from '../types/api/Message';
22
+ export * from '../types/api/PaymentMethod';
23
+ export * from '../types/api/PaymentOption';
24
+ export * from '../types/api/PaymentType';
25
+ export * from '../types/api/Plan';
26
+ export * from '../types/api/PlanPayment';
27
+ export * from '../types/api/Prepayment';
28
+ export * from '../types/api/Reaction';
29
+ export * from '../types/api/Route';
30
+ export * from '../types/api/RouteJob';
31
+ export * from '../types/api/ServiceMonth';
32
+ export * from '../types/api/Session';
33
+ export * from '../types/api/Skill';
34
+ export * from '../types/api/Subscription';
35
+ export * from '../types/api/Task';
36
+ export * from '../types/api/Timecard';
37
+ export * from '../types/api/TimecardAction';
38
+ export * from '../types/api/User';
39
+ export * from '../types/api/UserCompanyAssociation';
40
+ export * from '../types/api/UserEvent';
41
+ export * from '../types/api/Waiver';
42
42
  export declare const LoginResponse: {
43
43
  readonly SUCCESS: "SUCCESS";
44
44
  readonly NEEDS_TOTP: "NEEDS_TOTP";
@@ -57,15 +57,15 @@ export interface ApiInfo {
57
57
  vroom_status: string;
58
58
  }
59
59
  export type ScheduleItem = {
60
- type: "location";
60
+ type: 'location';
61
61
  location: [number, number];
62
62
  time_window: [number, number];
63
63
  } | {
64
- type: "break";
64
+ type: 'break';
65
65
  start: [number, number];
66
66
  time_window: [number, number];
67
67
  } | {
68
- type: "job";
68
+ type: 'job';
69
69
  job_id: string;
70
70
  task_ids: string[];
71
71
  location: [number, number];
package/dist/types/api.js CHANGED
@@ -1,44 +1,44 @@
1
- export * from "../types/api/_Event";
2
- export * from "../types/api/AdditionalCharge";
3
- export * from "../types/api/Avro";
4
- export * from "../types/api/Bill";
5
- export * from "../types/api/BillPayment";
6
- export * from "../types/api/BillUser";
7
- export * from "../types/api/Break";
8
- export * from "../types/api/CatalogItem";
9
- export * from "../types/api/Chat";
10
- export * from "../types/api/Company";
11
- export * from "../types/api/CustomLineItem";
12
- export * from "../types/api/Email";
13
- export * from "../types/api/EmailNotification";
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/Timecard";
36
- export * from "../types/api/TimecardAction";
37
- export * from "../types/api/User";
38
- export * from "../types/api/UserCompanyAssociation";
39
- export * from "../types/api/UserEvent";
40
- export * from "../types/api/Waiver";
1
+ export * from '../types/api/_Event';
2
+ export * from '../types/api/AdditionalCharge';
3
+ export * from '../types/api/Avro';
4
+ export * from '../types/api/Bill';
5
+ export * from '../types/api/BillPayment';
6
+ export * from '../types/api/BillUser';
7
+ export * from '../types/api/Break';
8
+ export * from '../types/api/CatalogItem';
9
+ export * from '../types/api/Chat';
10
+ export * from '../types/api/Company';
11
+ export * from '../types/api/CustomLineItem';
12
+ export * from '../types/api/Email';
13
+ export * from '../types/api/EmailNotification';
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/Timecard';
36
+ export * from '../types/api/TimecardAction';
37
+ export * from '../types/api/User';
38
+ export * from '../types/api/UserCompanyAssociation';
39
+ export * from '../types/api/UserEvent';
40
+ export * from '../types/api/Waiver';
41
41
  export const LoginResponse = {
42
- SUCCESS: "SUCCESS",
43
- NEEDS_TOTP: "NEEDS_TOTP",
42
+ SUCCESS: 'SUCCESS',
43
+ NEEDS_TOTP: 'NEEDS_TOTP',
44
44
  };
@@ -1,4 +1,4 @@
1
- import { Tokens } from "../types/auth";
1
+ import { Tokens } from '../types/auth';
2
2
  export interface CacheData extends Tokens {
3
3
  companyId: string;
4
4
  }
@@ -1,4 +1,4 @@
1
- export type RetryStrategy = "fixed" | "exponential" | ((attempt: number) => number);
1
+ export type RetryStrategy = 'fixed' | 'exponential' | ((attempt: number) => number);
2
2
  export interface CancelToken {
3
3
  isCancelled(): boolean;
4
4
  }
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "0.0.42",
3
+ "version": "0.0.44",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "tsc && tsc-alias",
9
+ "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,yaml,yml}\"",
9
10
  "lint": "eslint src && prettier --check \"src/**/*.{ts,tsx,js,jsx,json,md,yaml,yml}\" && tsc --noEmit",
10
11
  "test": "jest",
11
12
  "prepublishOnly": "npm run lint && npm run build"