@propriety/court-calendar 1.0.190 → 1.0.192

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;
@@ -13,9 +24,12 @@ export declare function clearCaseDeterminations(cases: {
13
24
  }[], apiKey: string): Promise<boolean>;
14
25
  export declare function fetchFoilClerkEmails(parcelIds: string[], year: number, apiKey: string): Promise<string[]>;
15
26
  export interface FoilAffidavitResult {
16
- affidavit_key: string;
17
27
  sent: string[];
18
28
  skipped: string[];
29
+ errors: {
30
+ pid: string;
31
+ reason: string;
32
+ }[];
19
33
  }
20
34
  export declare function prepareFoilAffidavit(parcelIds: string[], date: Date, year: number, apiKey: string, negotiatorId?: number, testing?: boolean): Promise<FoilAffidavitResult | null>;
21
35
  /**
@@ -0,0 +1,13 @@
1
+ import { FoilAffidavitResult } from './api/cases';
2
+ export interface FoilSendOutcome {
3
+ severity: 'success' | 'warning' | 'error';
4
+ text: string;
5
+ }
6
+ /**
7
+ * What a FOIL send actually did, one group per POST. A parcel the server neither created nor
8
+ * skipped counts as not sent, so nothing it left out of its answer can read as sent.
9
+ */
10
+ export declare function summarizeFoilResults(groups: {
11
+ requested: number;
12
+ result: FoilAffidavitResult | null;
13
+ }[]): FoilSendOutcome;
@@ -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
  };