@go-avro/avro-js 0.0.65 → 0.0.66

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.
@@ -213,9 +213,38 @@ const SOCKET_EVENT_CONFIG = {
213
213
  },
214
214
  delete_bill: { entityKey: 'bills', action: 'delete', fetchPath: null },
215
215
  update_bills: { invalidateKeys: [['bills']] },
216
- // ── Check-ins ──
217
- create_checkin: { invalidateKeys: [['checkins']] },
218
- update_checkin: { invalidateKeys: [['checkins']] },
216
+ // ── Check-ins (also refresh the job — its payload embeds
217
+ // current_checkins for the on-site indicator) ──
218
+ create_checkin: {
219
+ entityKey: 'checkins',
220
+ action: 'create',
221
+ fetchPath: null,
222
+ alsoInvalidate: [['checkins']],
223
+ relatedRefetch: [
224
+ {
225
+ entityKey: 'jobs',
226
+ idField: 'job_id',
227
+ fetchPath: (id) => `/job/${id}`,
228
+ construct: (d) => new Job(d),
229
+ matchesQuery: matchesJobsListQuery,
230
+ },
231
+ ],
232
+ },
233
+ update_checkin: {
234
+ entityKey: 'checkins',
235
+ action: 'update',
236
+ fetchPath: null,
237
+ alsoInvalidate: [['checkins']],
238
+ relatedRefetch: [
239
+ {
240
+ entityKey: 'jobs',
241
+ idField: 'job_id',
242
+ fetchPath: (id) => `/job/${id}`,
243
+ construct: (d) => new Job(d),
244
+ matchesQuery: matchesJobsListQuery,
245
+ },
246
+ ],
247
+ },
219
248
  // ── Sessions ──
220
249
  create_session: {
221
250
  entityKey: 'sessions',
@@ -1,5 +1,6 @@
1
1
  import { Task } from '../../types/api/Task';
2
2
  import { _Event } from '../../types/api/_Event';
3
+ import type { CheckIn } from '../../types/api';
3
4
  import { RouteJob } from '../../types/api/RouteJob';
4
5
  import { Subscription } from '../../types/api/Subscription';
5
6
  import { Route } from '../../types/api/Route';
@@ -25,6 +26,7 @@ declare module '../../types/api/Job' {
25
26
  manual_emails: string[][];
26
27
  last_completed_event: _Event | null;
27
28
  current_event: _Event | null;
29
+ current_checkins: CheckIn[];
28
30
  labels: string[];
29
31
  owner: string | null;
30
32
  }
@@ -229,6 +229,7 @@ export interface CheckIn {
229
229
  session_id: string;
230
230
  team_id: string | null;
231
231
  company_id: string;
232
+ event_id: string | null;
232
233
  time_checked_in: number;
233
234
  time_checked_out: number | null;
234
235
  time_created: number | null;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const AVRO_JS_VERSION = "0.0.65";
1
+ export declare const AVRO_JS_VERSION = "0.0.66";
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.0.65';
3
+ export const AVRO_JS_VERSION = '0.0.66';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "0.0.65",
3
+ "version": "0.0.66",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",