@go-avro/avro-js 0.1.15 → 1.6.0

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 (38) hide show
  1. package/dist/auth/AuthManager.d.ts +28 -0
  2. package/dist/auth/AuthManager.js +119 -43
  3. package/dist/client/QueryClient.d.ts +56 -1
  4. package/dist/client/QueryClient.js +260 -79
  5. package/dist/client/cache.d.ts +24 -0
  6. package/dist/client/cache.js +51 -0
  7. package/dist/client/core/fetch.js +58 -49
  8. package/dist/client/core/policy.d.ts +17 -0
  9. package/dist/client/core/policy.js +35 -0
  10. package/dist/client/core/xhr.js +16 -14
  11. package/dist/client/hooks/bills.js +10 -14
  12. package/dist/client/hooks/catalog_items.js +18 -8
  13. package/dist/client/hooks/chats.js +2 -8
  14. package/dist/client/hooks/companies.js +11 -5
  15. package/dist/client/hooks/events.js +36 -30
  16. package/dist/client/hooks/groups.js +11 -26
  17. package/dist/client/hooks/jobs.js +3 -8
  18. package/dist/client/hooks/labels.js +11 -26
  19. package/dist/client/hooks/messages.js +3 -8
  20. package/dist/client/hooks/months.js +28 -22
  21. package/dist/client/hooks/payouts.js +3 -8
  22. package/dist/client/hooks/prepayments.js +28 -22
  23. package/dist/client/hooks/proposal.js +1 -0
  24. package/dist/client/hooks/routes.js +8 -6
  25. package/dist/client/hooks/sessions.js +11 -27
  26. package/dist/client/hooks/skills.js +6 -4
  27. package/dist/client/hooks/teams.js +6 -4
  28. package/dist/client/hooks/timecards.js +7 -7
  29. package/dist/client/hooks/waivers.js +6 -4
  30. package/dist/client/persist.js +21 -2
  31. package/dist/client/realtime.d.ts +12 -0
  32. package/dist/client/realtime.js +160 -46
  33. package/dist/types/api/Company.d.ts +2 -0
  34. package/dist/types/api/LineItem.d.ts +4 -0
  35. package/dist/types/api/LineItem.js +8 -1
  36. package/dist/version.d.ts +1 -1
  37. package/dist/version.js +1 -1
  38. package/package.json +7 -2
@@ -61,4 +61,6 @@ export interface Company {
61
61
  default_pass_on_fees: boolean;
62
62
  require_team_for_clock_in: boolean;
63
63
  accepts_cash_payments: boolean;
64
+ /** IANA zone (e.g. `America/Chicago`) for route recurrence and bill days. */
65
+ timezone: string;
64
66
  }
@@ -1,5 +1,6 @@
1
1
  export declare const LineItemStatus: {
2
2
  readonly CREATED: "CREATED";
3
+ readonly PENDING_AUTOBILL: "PENDING_AUTOBILL";
3
4
  readonly EXTERNALLY_BILLED: "EXTERNALLY_BILLED";
4
5
  readonly BILLED: "BILLED";
5
6
  readonly PROCESSING: "PROCESSING";
@@ -38,5 +39,8 @@ export declare class LineItem {
38
39
  constructor(init?: Partial<LineItem>);
39
40
  isPaid: () => boolean;
40
41
  isBilled: () => boolean;
42
+ /** Matches the backend's "unbilled" bucket: `CREATED` only. */
41
43
  isUnbilled: () => boolean;
44
+ /** In flight: being auto-billed or a payment is processing (in no list bucket). */
45
+ isPending: () => boolean;
42
46
  }
@@ -1,5 +1,6 @@
1
1
  export const LineItemStatus = {
2
2
  CREATED: 'CREATED',
3
+ PENDING_AUTOBILL: 'PENDING_AUTOBILL',
3
4
  EXTERNALLY_BILLED: 'EXTERNALLY_BILLED',
4
5
  BILLED: 'BILLED',
5
6
  PROCESSING: 'PROCESSING',
@@ -27,8 +28,14 @@ export class LineItem {
27
28
  return (this.status === LineItemStatus.BILLED ||
28
29
  this.status === LineItemStatus.EXTERNALLY_BILLED);
29
30
  };
31
+ /** Matches the backend's "unbilled" bucket: `CREATED` only. */
30
32
  this.isUnbilled = () => {
31
- return !this.isBilled() && !this.isPaid();
33
+ return this.status === LineItemStatus.CREATED;
34
+ };
35
+ /** In flight: being auto-billed or a payment is processing (in no list bucket). */
36
+ this.isPending = () => {
37
+ return (this.status === LineItemStatus.PENDING_AUTOBILL ||
38
+ this.status === LineItemStatus.PROCESSING);
32
39
  };
33
40
  Object.assign(this, init);
34
41
  }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const AVRO_JS_VERSION = "0.1.15";
1
+ export declare const AVRO_JS_VERSION = "1.6.0";
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED by scripts/gen-version.js — do not edit by hand.
2
2
  // Regenerated from package.json by the `prebuild` npm hook.
3
- export const AVRO_JS_VERSION = '0.1.15';
3
+ export const AVRO_JS_VERSION = '1.6.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "0.1.15",
3
+ "version": "1.6.0",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -36,6 +36,7 @@
36
36
  "license": "CC-BY-SA-4.0",
37
37
  "devDependencies": {
38
38
  "@eslint/js": "^9.39.4",
39
+ "@tanstack/react-query": "^5.90.2",
39
40
  "@types/react": "^19.2.2",
40
41
  "@types/uuid": "^10.0.0",
41
42
  "@typescript-eslint/eslint-plugin": "^8.38.0",
@@ -46,10 +47,15 @@
46
47
  "eslint-plugin-react": "^7.37.5",
47
48
  "globals": "^17.6.0",
48
49
  "prettier": "^3.8.3",
50
+ "react": "^19.0.0",
49
51
  "tsc-alias": "^1.8.17",
50
52
  "typescript": "^5.8.3",
51
53
  "typescript-eslint": "^8.38.0"
52
54
  },
55
+ "peerDependencies": {
56
+ "@tanstack/react-query": "^5.90.2",
57
+ "react": "^18.0.0 || ^19.0.0"
58
+ },
53
59
  "files": [
54
60
  "dist"
55
61
  ],
@@ -57,7 +63,6 @@
57
63
  "access": "public"
58
64
  },
59
65
  "dependencies": {
60
- "@tanstack/react-query": "^5.90.2",
61
66
  "socket.io-client": "^4.8.1",
62
67
  "uuid": "^14.0.0"
63
68
  }