@propriety/court-calendar 1.0.152 → 1.0.154

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ /**
2
+ * End-to-end guard for collections dates reaching the calendar.
3
+ *
4
+ * Collections come back as the raw Court.Collections columns — CollectionID,
5
+ * HearingDate (date-only), HearingTime (HH:mm:ss) — not the CourtDateID/CourtDate
6
+ * shape every other surface reads. A missing mapping is invisible at the API layer
7
+ * and only shows up three stages later as "the date isn't on the calendar":
8
+ *
9
+ * normalizeDateFromApi → CourtDateID undefined, CourtDate undefined
10
+ * filterCourtDates → dropped by the leading `cd.CourtDateID != null`
11
+ * buildCalEvents → dropped by the leading `if (!cd.CourtDate) continue`
12
+ *
13
+ * So this walks the real payload through all three stages rather than asserting on
14
+ * the normalizer alone.
15
+ */
16
+ export {};
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The hearing link as readable text, with separate open and copy buttons.
3
+ *
4
+ * Deliberately not one large click target. The previous "Join Meeting" caption sat under a
5
+ * full-box hover overlay, so operators could not see which meeting a date pointed at and had
6
+ * no way to hand the URL to anyone — clicking anywhere just launched Teams.
7
+ *
8
+ * `link` must already be an absolute http(s) URL; run it through normalizeHearingLink first,
9
+ * or the browser resolves it relative to the origin.
10
+ */
11
+ export default function HearingLinkRow({ link, onCopy }: {
12
+ link: string;
13
+ onCopy?: (ok: boolean) => void;
14
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,8 @@
1
- export default function InfoBox({ label, info, subInfo, subInfoHref, color, dense, labelAsTooltip, tooltipTitle, onOverlayClick, }: {
1
+ import { ReactNode } from 'react';
2
+ export default function InfoBox({ label, info, subInfo, color, dense, labelAsTooltip, tooltipTitle, onOverlayClick, }: {
2
3
  label: string;
3
4
  info: string;
4
- subInfo?: string;
5
- subInfoHref?: string;
5
+ subInfo?: ReactNode;
6
6
  color?: string;
7
7
  dense?: boolean;
8
8
  labelAsTooltip?: boolean;
@@ -1,7 +1,19 @@
1
1
  import { CourtDate } from '../../../types';
2
+ /**
3
+ * Keys of CourtDate that hold a user reference — exactly the fields typed `number | null`.
4
+ *
5
+ * Derived rather than hand-listed so it follows the interface, and mutually-extends rather
6
+ * than one-way so a plain `number` field like CourtDateID doesn't qualify. Typing the prop as
7
+ * the bare `keyof CourtDate` checked assignments against the union of *every* field type,
8
+ * which is how a `''` reached FirstChair and shipped without a compiler error.
9
+ */
10
+ type UserFieldKey = {
11
+ [K in keyof CourtDate]-?: [CourtDate[K]] extends [number | null] ? [number | null] extends [CourtDate[K]] ? K : never : never;
12
+ }[keyof CourtDate];
2
13
  export default function EditUserFieldDropdown({ label, edited, setEdited, userPropertyName, }: {
3
14
  label: string;
4
15
  edited: CourtDate;
5
16
  setEdited: (edited: CourtDate) => void;
6
- userPropertyName: keyof CourtDate;
17
+ userPropertyName: UserFieldKey;
7
18
  }): import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -38,6 +38,14 @@ export interface MotionUploadResult {
38
38
  * Triggers the NYSCEF upload of the Motion to Preclude for every case on a court date.
39
39
  * The backend returns 409 (skipped) when SkipMotion is set for the date — surfaced here as
40
40
  * `{ ok: false, skipped: true }` rather than a hard error. Pass `test` to run without submitting.
41
+ *
42
+ * `userId` is who to attribute the filing to. Every browser shares one API key, so the request
43
+ * itself carries no identity — without this the backend cannot record who filed a motion that
44
+ * "cannot be undone". It goes over the wire as `edit_user`, the name this API uses everywhere
45
+ * else for the acting user, and lands in Court.CourtDateEditLog. Always pass it from the UI.
41
46
  */
42
- export declare function uploadMotionToPreclude(courtDateId: number, apiKey: string, test?: boolean): Promise<MotionUploadResult>;
47
+ export declare function uploadMotionToPreclude(courtDateId: number, apiKey: string, { test, userId }?: {
48
+ test?: boolean;
49
+ userId?: number;
50
+ }): Promise<MotionUploadResult>;
43
51
  export declare function updateCaseAdjournment(parcelId: string, scarIndexNumber: string, adjournedDate: Date | null, apiKey: string): Promise<boolean>;
@@ -33,3 +33,15 @@ export declare function dateKeyOf(dateType: DateType | null | undefined, courtDa
33
33
  * type reads as SCAR — matching how the API omits the field for court dates.
34
34
  */
35
35
  export declare function isScarDate(date: Pick<CourtDate, 'DateType'>): boolean;
36
+ /**
37
+ * A hearing link safe to hand to window.open, or null.
38
+ *
39
+ * Two things make a stored link unusable, and both fail the same way — the browser
40
+ * resolves the value *relative to the origin*, so "null" opens <host>/null and a pasted
41
+ * "teams.microsoft.com/l/…" opens <host>/teams.microsoft.com/l/…. We drop the first and
42
+ * repair the second by assuming https.
43
+ *
44
+ * Non-http(s) schemes are rejected outright: this value is operator-entered and goes
45
+ * straight into window.open, so a javascript: URL would otherwise execute.
46
+ */
47
+ export declare function normalizeHearingLink(link: string | null | undefined): string | null;