@opengeni/react 6.1.0-canary.0 → 6.1.0-canary.2

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.
@@ -8,6 +8,8 @@ export type UseWorkspaceSessionsOptions = ClientOverride & {
8
8
  /** Return only the complete personal pinned projection. */
9
9
  pinsOnly?: boolean | undefined;
10
10
  archivedOnly?: boolean | undefined;
11
+ sortBy?: "updatedAt" | "createdAt" | "name" | undefined;
12
+ archiveStatus?: "active" | "archived" | "all" | undefined;
11
13
  /** Refresh interval (ms) for fleet/manager views. Off by default. */
12
14
  pollIntervalMs?: number | undefined;
13
15
  enabled?: boolean | undefined;
package/dist/index.js CHANGED
@@ -415,6 +415,8 @@ function useWorkspaceSessions(options = {}) {
415
415
  const search = options.search;
416
416
  const pinsOnly = options.pinsOnly;
417
417
  const archivedOnly = options.archivedOnly;
418
+ const sortBy = options.sortBy;
419
+ const archiveStatus = options.archiveStatus;
418
420
  const enabled = options.enabled ?? true;
419
421
  const nextReadRevision = useRef(0);
420
422
  const nextReadGeneration = useRef(0);
@@ -426,7 +428,9 @@ function useWorkspaceSessions(options = {}) {
426
428
  cursor ?? "",
427
429
  search ?? "",
428
430
  pinsOnly ? "1" : "",
429
- archivedOnly ? "archived" : "active"
431
+ archivedOnly ? "archived" : "active",
432
+ sortBy ?? "",
433
+ archiveStatus ?? ""
430
434
  ].join("\0");
431
435
  const previousQueryKey = useRef(queryKey);
432
436
  const queryKeyTransition = previousQueryKey.current !== queryKey;
@@ -443,6 +447,8 @@ function useWorkspaceSessions(options = {}) {
443
447
  ...search !== void 0 ? { search } : {},
444
448
  ...pinsOnly ? { pinsOnly: true } : {},
445
449
  ...archivedOnly ? { archivedOnly: true } : {},
450
+ ...sortBy ? { sortBy } : {},
451
+ ...archiveStatus ? { archiveStatus } : {},
446
452
  signal
447
453
  });
448
454
  return {
@@ -462,6 +468,8 @@ function useWorkspaceSessions(options = {}) {
462
468
  search,
463
469
  pinsOnly,
464
470
  archivedOnly,
471
+ sortBy,
472
+ archiveStatus,
465
473
  queryKey
466
474
  ]
467
475
  );