@propriety/court-calendar 1.0.191 → 1.0.193

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.
@@ -1,4 +1,5 @@
1
1
  import { Case } from '../../../types';
2
+ import { AdjournResult } from '../../../helpers/api/cases';
2
3
  declare const CaseViewer: import('react').NamedExoticComponent<{
3
4
  cases: Case[];
4
5
  isFetchingCases: boolean;
@@ -7,7 +8,7 @@ declare const CaseViewer: import('react').NamedExoticComponent<{
7
8
  isVillage: boolean;
8
9
  csvFileName?: string;
9
10
  canEdit?: boolean;
10
- onSelectedCasesAdjournmentChange?: (cases: Case[], date: Date | null) => Promise<boolean>;
11
+ onSelectedCasesAdjournmentChange?: (cases: Case[], date: Date | null) => Promise<AdjournResult>;
11
12
  onSelectedCasesClearDetermination?: (cases: Case[]) => Promise<boolean>;
12
13
  firstChair?: number | null;
13
14
  }>;
@@ -1,4 +1,5 @@
1
1
  import { Case, CourtDate } from '../../../types';
2
+ import { AdjournResult } from '../../../helpers/api/cases';
2
3
  export default function DateTabs({ cases, isFetchingCases, setClickedCase, selectedDate, isVillage, csvFileName, canEdit, onSelectedCasesAdjournmentChange, onSelectedCasesClearDetermination, selectedCourtDate, }: {
3
4
  cases: Case[];
4
5
  isFetchingCases: boolean;
@@ -7,7 +8,7 @@ export default function DateTabs({ cases, isFetchingCases, setClickedCase, selec
7
8
  isVillage: boolean;
8
9
  csvFileName?: string;
9
10
  canEdit?: boolean;
10
- onSelectedCasesAdjournmentChange?: (cases: Case[], date: Date | null) => Promise<boolean>;
11
+ onSelectedCasesAdjournmentChange?: (cases: Case[], date: Date | null) => Promise<AdjournResult>;
11
12
  onSelectedCasesClearDetermination?: (cases: Case[]) => Promise<boolean>;
12
13
  selectedCourtDate: CourtDate | null;
13
14
  }): import("react/jsx-runtime").JSX.Element;
@@ -2,10 +2,21 @@ import { DateType, Case } from '../../types';
2
2
  export declare function searchByCaseTerm(term: string, apiKey: string): AsyncGenerator<any, void, unknown>;
3
3
  export declare function fetchCasesByCourtDate(id: string, apiKey: string, type?: DateType): Promise<Case[]>;
4
4
  export declare function fetchAllCasesPaginated(apiKey: string, pageSize?: number, dateFrom?: string): AsyncGenerator<Record<string, Case[]>, void, unknown>;
5
+ export interface SkippedAdjournment {
6
+ index_number: string | null;
7
+ /** `ambiguous`, `not_found`, `no_index_number`, or `settled:<determination>` / `settled:SettleDate`. */
8
+ reason: string;
9
+ }
10
+ /** `ok` is whether the request succeeded; a 200 still leaves every case in `skipped` unadjourned. */
11
+ export interface AdjournResult {
12
+ ok: boolean;
13
+ skipped: SkippedAdjournment[];
14
+ }
5
15
  export declare function adjournCases(cases: {
6
16
  indexNumber: string;
7
17
  year: number;
8
- }[], adjournedDate: Date | null, apiKey: string, editUser?: number): Promise<boolean>;
18
+ parcelId?: string;
19
+ }[], adjournedDate: Date | null, apiKey: string, editUser?: number): Promise<AdjournResult>;
9
20
  export declare function clearCaseDeterminations(cases: {
10
21
  indexNumber: string;
11
22
  action: string;
@@ -57,9 +57,8 @@ export declare function canMarkComplete(date: Pick<CourtDate, 'DateType'>): bool
57
57
  /**
58
58
  * A negotiation or collections date marked finished by hand.
59
59
  *
60
- * Neither carries linked cases, so nothing about one can be *derived* as done. A negotiation
61
- * shares the `showPastNegotiations` filter with its date passing; a collection shares
62
- * `showCompletedUploads`.
60
+ * Neither carries linked cases, so only this or its date passing can retire one. A negotiation
61
+ * comes back with `showPastNegotiations`, a collection with `showCompletedUploads`.
63
62
  *
64
63
  * SCAR dates are excluded because Court.HearingDates.Status holds unrelated values. The column
65
64
  * is free text shared with other writers, so this compares case-insensitively.
@@ -1,5 +1,6 @@
1
1
  import { Case, CourtDate } from '../types';
2
2
  import { ModalMode } from '../_components/Modal/types';
3
+ import { AdjournResult } from '../helpers/api/cases';
3
4
  /**
4
5
  * Provides save, delete, chair-update, and adjournment actions for the court-date modal.
5
6
  *
@@ -39,6 +40,6 @@ export declare function useModalActions({ modalMode, selectedCourtDate, selected
39
40
  handleDelete: () => Promise<boolean>;
40
41
  handleViewUpdateChair: (position: "first" | "second", userId: number | null) => void;
41
42
  handleToggleComplete: (complete: boolean) => void;
42
- handleSelectedCasesAdjournmentChange: (casesToUpdate: Case[], date: Date | null) => Promise<boolean>;
43
+ handleSelectedCasesAdjournmentChange: (casesToUpdate: Case[], date: Date | null) => Promise<AdjournResult>;
43
44
  handleSelectedCasesClearDetermination: (casesToUpdate: Case[]) => Promise<boolean>;
44
45
  };