@go-avro/avro-js 1.6.6-rc4 → 1.6.6-rc5

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.
@@ -280,6 +280,15 @@ declare module './QueryClient.js' {
280
280
  msg: string;
281
281
  cleared: number;
282
282
  }, StandardError, void>>;
283
+ /**
284
+ * Root only: run scheduled jobs now (all of them when called with no
285
+ * ids). The scheduler starts them within a few seconds; watch their
286
+ * status in `useGetPerformanceMetrics`.
287
+ */
288
+ useRunSchedulerJobs(): ReturnType<typeof useMutation<{
289
+ msg: string;
290
+ jobs: string[];
291
+ }, StandardError, string[] | void>>;
283
292
  useSearchUsers(searchUsername: string): UseQueryResult<User[], StandardError>;
284
293
  useMergeUsersPreview(keepId: string, duplicateId: string): UseQueryResult<UserMergeSummary, StandardError>;
285
294
  useMergeUsers(): ReturnType<typeof useMutation<UserMergeSummary, StandardError, {
@@ -45,3 +45,16 @@ AvroQueryClient.prototype.useClearErrorLog = function () {
45
45
  },
46
46
  });
47
47
  };
48
+ AvroQueryClient.prototype.useRunSchedulerJobs = function () {
49
+ const queryClient = this.getQueryClient();
50
+ return useMutation({
51
+ mutationFn: (jobIds) => this.post({
52
+ path: '/avro/scheduler/run',
53
+ data: JSON.stringify(jobIds ? { job_ids: jobIds } : {}),
54
+ headers: { 'Content-Type': 'application/json' },
55
+ }),
56
+ onSuccess: () => {
57
+ queryClient.invalidateQueries({ queryKey: ['avro', 'performance'] });
58
+ },
59
+ });
60
+ };
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const AVRO_JS_VERSION = "1.6.6-rc4";
1
+ export declare const AVRO_JS_VERSION = "1.6.6-rc5";
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 = '1.6.6-rc4';
3
+ export const AVRO_JS_VERSION = '1.6.6-rc5';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "1.6.6-rc4",
3
+ "version": "1.6.6-rc5",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",