@go-avro/avro-js 0.1.4 → 0.1.6

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.
@@ -63,7 +63,13 @@ export function defaultKeyValueStore() {
63
63
  return IndexedDBStore.isSupported() ? new IndexedDBStore() : new MemoryKeyValueStore();
64
64
  }
65
65
  /** Namespaces worth keeping across reloads: big, or needed at boot. */
66
- export const PERSISTED_NAMESPACES = ['jobs', 'routes', 'users', 'teams'];
66
+ export const PERSISTED_NAMESPACES = [
67
+ 'jobs',
68
+ 'routes',
69
+ 'users',
70
+ 'teams',
71
+ 'health',
72
+ ];
67
73
  /** JSON loses class instances; restore the ones hooks hand out. */
68
74
  const REVIVERS = {
69
75
  jobs: (data) => (Array.isArray(data) ? data.map((raw) => constructJob(raw)) : data),
@@ -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 { constructEvent, Job, Route, Session } from '../types/api';
7
+ import { Bill, constructEvent, Job, Route, Session } from '../types/api';
8
8
  export const keys = {
9
9
  detail: (ns, id) => [ns, id],
10
10
  list: (ns, scope, filters = {}) => [ns, 'list', scope ?? '', filters],
@@ -204,7 +204,12 @@ export const REGISTRY = {
204
204
  fetchMany: bulk('fetchPrepayments'),
205
205
  listMatch: matchLineItems,
206
206
  },
207
- bill: { ns: 'bills', fetchMany: bulk('fetchBills'), listMatch: matchBills },
207
+ bill: {
208
+ ns: 'bills',
209
+ construct: (d) => new Bill(d),
210
+ fetchMany: bulk('fetchBills'),
211
+ listMatch: matchBills,
212
+ },
208
213
  session: {
209
214
  ns: 'sessions',
210
215
  construct: (raw) => new Session(raw),
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const AVRO_JS_VERSION = "0.1.4";
1
+ export declare const AVRO_JS_VERSION = "0.1.6";
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.4';
3
+ export const AVRO_JS_VERSION = '0.1.6';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",