glitchgrab 1.61.2 → 1.62.1

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.
package/dist/server.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as ReportType, m as ReportSeverity, l as ReportResult } from './types-BlMF6wzX.mjs';
1
+ import { n as ReportType, m as ReportSeverity, l as ReportResult } from './types-Dp5Sh_hd.mjs';
2
2
  import 'react';
3
3
 
4
4
  /** Who to attribute the report to. A server has no signed-in user, so this is the job or service. */
@@ -634,5 +634,246 @@ interface ListLeadsOptions extends CallsOptions {
634
634
  * ```
635
635
  */
636
636
  declare function listLeads(options?: ListLeadsOptions): Promise<Lead[]>;
637
+ /** How a next call reads on a list: grey, amber, red. */
638
+ type FollowUpDue = "none" | "upcoming" | "today" | "overdue";
639
+ interface FollowUp {
640
+ /** Glitchgrab's id; null for an externalId Glitchgrab has never seen. */
641
+ id: string | null;
642
+ externalId: string | null;
643
+ /** Digits, `91` + 10. */
644
+ phone: string | null;
645
+ name: string | null;
646
+ /** ISO. The booked next call. */
647
+ nextCallAt: string | null;
648
+ nextCallBookedBy: string | null;
649
+ due: FollowUpDue;
650
+ /** ISO. Read from the last call's transcript — shown as a suggestion, never booked by itself. */
651
+ suggestedNextCallAt: string | null;
652
+ suggestedNextCallReason: string | null;
653
+ lastNote: string | null;
654
+ lastNoteAt: string | null;
655
+ lastNoteBy: string | null;
656
+ noteCount: number;
657
+ lastCall: {
658
+ id: string;
659
+ status: string | null;
660
+ at: string;
661
+ durationSec: number | null;
662
+ /** Which of the operator's phones the call is on: 0 = the one picked, 1+ = a backup (#654). */
663
+ ringingIndex: number | null;
664
+ /** That phone. While `status` is "DIALING" it is the one ringing right now. */
665
+ ringingPhone: string | null;
666
+ } | null;
667
+ }
668
+ interface FollowUpNote {
669
+ id: string;
670
+ body: string;
671
+ /** "manual" (Glitchgrab), "api" (your app), "auto" (written from a call). */
672
+ source: string;
673
+ author: string | null;
674
+ callId: string | null;
675
+ editedAt: string | null;
676
+ createdAt: string;
677
+ }
678
+ interface FollowUpCall {
679
+ id: string;
680
+ status: string | null;
681
+ direction: string | null;
682
+ at: string;
683
+ durationSec: number | null;
684
+ /** Which of the operator's phones the call is on: 0 = the one picked, 1+ = a backup (#654). */
685
+ ringingIndex: number | null;
686
+ /** That phone. While `status` is "DIALING" it is the one ringing right now. */
687
+ ringingPhone: string | null;
688
+ /** Shared with you — calls dialled from a follow-up are; an inbound call is once the owner shares it. */
689
+ shared: boolean;
690
+ overview: string | null;
691
+ /** Presigned; expires after `linksExpireInSeconds`. Null when not shared. */
692
+ recordingUrl: string | null;
693
+ }
694
+ interface FollowUpDetail extends FollowUp {
695
+ notes: FollowUpNote[];
696
+ calls: FollowUpCall[];
697
+ linksExpireInSeconds: number;
698
+ }
699
+ /** Someone on the project's Glitchgrab phone line — rung first on a dial, reminded on a booking. */
700
+ type FollowUpOperator = {
701
+ email: string;
702
+ } | {
703
+ phone: string;
704
+ };
705
+ /**
706
+ * Why a dial was refused, so your screen can say exactly what is missing (#654):
707
+ * - `NOT_ON_LINE` — the operator isn't one of the people on the project's phone line.
708
+ * - `NO_VERIFIED_NUMBER` — they are, but have no phone Glitchgrab may ring.
709
+ * - `RING_PHONE_NOT_YOURS` — `ringPhone` isn't one of their verified numbers.
710
+ */
711
+ type RingErrorCode = "NOT_ON_LINE" | "NO_VERIFIED_NUMBER" | "RING_PHONE_NOT_YOURS";
712
+ type FollowUpWriteResult<T = Record<string, never>> = ({
713
+ ok: true;
714
+ followUpId: string;
715
+ } & T) | {
716
+ ok: false;
717
+ error: string;
718
+ code?: string;
719
+ };
720
+ /**
721
+ * Follow-ups for a whole list page in one request — one entry per id, in the
722
+ * order asked (≤500). An id Glitchgrab has never seen comes back empty, so
723
+ * every row can render.
724
+ *
725
+ * ```ts
726
+ * const followUps = await listFollowUps(owners.map((o) => o.id)); // GLITCHGRAB_CALLS_KEY=ggc_…
727
+ * ```
728
+ *
729
+ * Returns `[]` on any failure. Never throws.
730
+ */
731
+ declare function listFollowUps(externalIds: string[], options?: CallsOptions): Promise<FollowUp[]>;
732
+ /**
733
+ * One customer's follow-up: booking, every note, their calls (recording links
734
+ * for shared calls only, presigned). Null on failure. Never throws.
735
+ */
736
+ declare function getFollowUp(externalId: string, options?: CallsOptions): Promise<FollowUpDetail | null>;
737
+ /**
738
+ * Add a note from your own screen. `phone` is needed the first time Glitchgrab
739
+ * sees this externalId. Never throws.
740
+ */
741
+ declare function addFollowUpNote(externalId: string, note: {
742
+ body: string;
743
+ author?: string;
744
+ phone?: string;
745
+ name?: string;
746
+ }, options?: CallsOptions): Promise<FollowUpWriteResult<{
747
+ id: string;
748
+ }>>;
749
+ /**
750
+ * Book, move (`Date`/ISO) or clear (`null`) the next call. The reminder
751
+ * WhatsApp goes to `operator`, else the project owner. Never throws.
752
+ */
753
+ declare function setFollowUpBooking(externalId: string, booking: {
754
+ nextCallAt: Date | string | null;
755
+ operator?: FollowUpOperator;
756
+ author?: string;
757
+ phone?: string;
758
+ name?: string;
759
+ }, options?: CallsOptions): Promise<FollowUpWriteResult<{
760
+ nextCallAt: string | null;
761
+ }>>;
762
+ /**
763
+ * Start a recorded call: Glitchgrab rings `operator`'s phone, then the
764
+ * customer, from the project's line. The operator must be on that line. A note
765
+ * and a suggested next call follow once the call is transcribed. Never throws.
766
+ *
767
+ * `ringPhone` picks which of the operator's verified phones rings first (list
768
+ * them with {@link getOperatorRingNumbers}); omitted = their Default. If that
769
+ * phone isn't picked up, their backups ring in order (`ringNumbers`). A
770
+ * refusal carries `code` — see {@link RingErrorCode}.
771
+ */
772
+ declare function dialFollowUp(externalId: string, call: {
773
+ operator: FollowUpOperator;
774
+ phone?: string;
775
+ name?: string;
776
+ lineId?: string;
777
+ ringPhone?: string;
778
+ }, options?: CallsOptions): Promise<FollowUpWriteResult<{
779
+ callId: string;
780
+ ringing: string;
781
+ ringNumbers: string[];
782
+ }>>;
783
+ /** One phone Glitchgrab may ring for an operator — what `ringPhone` accepts (#654). */
784
+ interface OperatorRingNumber {
785
+ /** E.164, `+91…`. Pass it back as `ringPhone`. */
786
+ phone: string;
787
+ label: string | null;
788
+ isDefault: boolean;
789
+ /** 0 = Default, then backups in the order they ring. */
790
+ order: number;
791
+ }
792
+ type OperatorRingNumbersResult = {
793
+ ok: true;
794
+ operator: {
795
+ name: string | null;
796
+ };
797
+ numbers: OperatorRingNumber[];
798
+ } | {
799
+ ok: false;
800
+ error: string;
801
+ code?: string;
802
+ };
803
+ /**
804
+ * The phones Glitchgrab can ring for one person on the project's phone line —
805
+ * for a "Ring me on: [Default ▾]" picker beside your Call button. Verified
806
+ * numbers only. `numbers: []` = dial will refuse with `NO_VERIFIED_NUMBER`;
807
+ * not on the line = `{ ok: false, code: "NOT_ON_LINE" }`. Never throws.
808
+ *
809
+ * ```ts
810
+ * const r = await getOperatorRingNumbers({ email: admin.email }); // GLITCHGRAB_CALLS_KEY=ggc_…
811
+ * if (r.ok) render(r.numbers); // pass the chosen phone to dialFollowUp(…, { ringPhone })
812
+ * ```
813
+ */
814
+ declare function getOperatorRingNumbers(operator: FollowUpOperator, options?: CallsOptions): Promise<OperatorRingNumbersResult>;
815
+ /** One saved ring number, verified or not — the management view (#654). */
816
+ interface RingNumber {
817
+ id: string;
818
+ /** E.164, `+91…`. */
819
+ phone: string;
820
+ label: string | null;
821
+ position: number;
822
+ /** Only verified numbers are ever rung. */
823
+ verified: boolean;
824
+ /** A test ring is out right now — poll until `verified`. */
825
+ verifying: boolean;
826
+ isDefault: boolean;
827
+ }
828
+ interface RingNumberList {
829
+ operator: {
830
+ name: string | null;
831
+ };
832
+ /** Their account mobile — still what rings while nothing here is verified. */
833
+ accountPhone: string | null;
834
+ usingAccount: boolean;
835
+ numbers: RingNumber[];
836
+ }
837
+ type RingNumberWriteResult<T = object> = ({
838
+ ok: true;
839
+ } & T) | {
840
+ ok: false;
841
+ error: string;
842
+ code?: string;
843
+ };
844
+ /**
845
+ * Every phone saved for one person on the project's line, unverified included
846
+ * — for your "manage my phones" screen. Ring numbers are managed only from
847
+ * your product; Glitchgrab shows them read-only. A refusal carries `code`
848
+ * (`NOT_ON_LINE`), so "not on the line" reads differently from "network down".
849
+ * Never throws.
850
+ */
851
+ declare function listRingNumbers(operator: FollowUpOperator, options?: CallsOptions): Promise<RingNumberWriteResult<RingNumberList>>;
852
+ /**
853
+ * Save a phone for `operator` and place its test ring at once: the project's
854
+ * line calls it and whoever holds it presses 1. Never rung for a call until
855
+ * then; the line's owner is alerted when it is verified. Max 5 per person.
856
+ * `testRing: "failed"` = saved but not rung — retry with {@link testRingNumber}.
857
+ */
858
+ declare function addRingNumber(operator: FollowUpOperator, number: {
859
+ phone: string;
860
+ label?: string;
861
+ }, options?: CallsOptions): Promise<RingNumberWriteResult<{
862
+ id: string;
863
+ testRing: "ringing" | "failed";
864
+ verifyError: string | null;
865
+ }>>;
866
+ /** Rename, make Default (verified only) or move one place up/down. Never throws. */
867
+ declare function updateRingNumber(id: string, change: {
868
+ label?: string | null;
869
+ makeDefault?: true;
870
+ move?: "up" | "down";
871
+ }, options?: CallsOptions): Promise<RingNumberWriteResult>;
872
+ /** Remove one; the next verified number becomes Default. Never throws. */
873
+ declare function removeRingNumber(id: string, options?: CallsOptions): Promise<RingNumberWriteResult>;
874
+ /** Place the test ring again (6 per person, 30 per project an hour). Never throws. */
875
+ declare function testRingNumber(id: string, options?: CallsOptions): Promise<RingNumberWriteResult<{
876
+ verified: boolean;
877
+ }>>;
637
878
 
638
- export { type Booking, type BookingAnswer, type BookingClientNotice, type BookingMutationResult, type BookingNotifyRecipient, type BookingQuestion, type BookingQuestionInput, type BookingSettings, type BookingSettingsChanges, type BookingSettingsResult, type BookingSettingsState, type BookingWorkingHours, type Call, type CallAudio, type CallListItem, type CallMoment, type CallParticipant, type CallsOptions, type CaptureServerErrorsOptions, type DeleteCallResult, type GetCallOptions, type Guide, type GuideReadOptions, type GuideSummary, type Lead, type ListBookingsOptions, type ListCallsOptions, type ListLeadsOptions, ReportResult, ReportSeverity, ReportType, type ServerReportOptions, type ServerReporterConfig, type ServerReporterIdentity, type SignSessionOptions, cancelBooking, captureServerErrors, configureServerReporter, deleteCall, discardBookingQuestionsDraft, escapeJsonForScript, getBookingSettings, getCall, getGuide, listBookings, listCalls, listGuides, listLeads, publishBookingQuestions, reportServerError, rescheduleBooking, resetServerReporter, signSession, updateBookingSettings };
879
+ export { type Booking, type BookingAnswer, type BookingClientNotice, type BookingMutationResult, type BookingNotifyRecipient, type BookingQuestion, type BookingQuestionInput, type BookingSettings, type BookingSettingsChanges, type BookingSettingsResult, type BookingSettingsState, type BookingWorkingHours, type Call, type CallAudio, type CallListItem, type CallMoment, type CallParticipant, type CallsOptions, type CaptureServerErrorsOptions, type DeleteCallResult, type FollowUp, type FollowUpCall, type FollowUpDetail, type FollowUpDue, type FollowUpNote, type FollowUpOperator, type FollowUpWriteResult, type GetCallOptions, type Guide, type GuideReadOptions, type GuideSummary, type Lead, type ListBookingsOptions, type ListCallsOptions, type ListLeadsOptions, type OperatorRingNumber, type OperatorRingNumbersResult, ReportResult, ReportSeverity, ReportType, type RingErrorCode, type RingNumber, type RingNumberList, type RingNumberWriteResult, type ServerReportOptions, type ServerReporterConfig, type ServerReporterIdentity, type SignSessionOptions, addFollowUpNote, addRingNumber, cancelBooking, captureServerErrors, configureServerReporter, deleteCall, dialFollowUp, discardBookingQuestionsDraft, escapeJsonForScript, getBookingSettings, getCall, getFollowUp, getGuide, getOperatorRingNumbers, listBookings, listCalls, listFollowUps, listGuides, listLeads, listRingNumbers, publishBookingQuestions, removeRingNumber, reportServerError, rescheduleBooking, resetServerReporter, setFollowUpBooking, signSession, testRingNumber, updateBookingSettings, updateRingNumber };
package/dist/server.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as ReportType, m as ReportSeverity, l as ReportResult } from './types-BlMF6wzX.js';
1
+ import { n as ReportType, m as ReportSeverity, l as ReportResult } from './types-Dp5Sh_hd.js';
2
2
  import 'react';
3
3
 
4
4
  /** Who to attribute the report to. A server has no signed-in user, so this is the job or service. */
@@ -634,5 +634,246 @@ interface ListLeadsOptions extends CallsOptions {
634
634
  * ```
635
635
  */
636
636
  declare function listLeads(options?: ListLeadsOptions): Promise<Lead[]>;
637
+ /** How a next call reads on a list: grey, amber, red. */
638
+ type FollowUpDue = "none" | "upcoming" | "today" | "overdue";
639
+ interface FollowUp {
640
+ /** Glitchgrab's id; null for an externalId Glitchgrab has never seen. */
641
+ id: string | null;
642
+ externalId: string | null;
643
+ /** Digits, `91` + 10. */
644
+ phone: string | null;
645
+ name: string | null;
646
+ /** ISO. The booked next call. */
647
+ nextCallAt: string | null;
648
+ nextCallBookedBy: string | null;
649
+ due: FollowUpDue;
650
+ /** ISO. Read from the last call's transcript — shown as a suggestion, never booked by itself. */
651
+ suggestedNextCallAt: string | null;
652
+ suggestedNextCallReason: string | null;
653
+ lastNote: string | null;
654
+ lastNoteAt: string | null;
655
+ lastNoteBy: string | null;
656
+ noteCount: number;
657
+ lastCall: {
658
+ id: string;
659
+ status: string | null;
660
+ at: string;
661
+ durationSec: number | null;
662
+ /** Which of the operator's phones the call is on: 0 = the one picked, 1+ = a backup (#654). */
663
+ ringingIndex: number | null;
664
+ /** That phone. While `status` is "DIALING" it is the one ringing right now. */
665
+ ringingPhone: string | null;
666
+ } | null;
667
+ }
668
+ interface FollowUpNote {
669
+ id: string;
670
+ body: string;
671
+ /** "manual" (Glitchgrab), "api" (your app), "auto" (written from a call). */
672
+ source: string;
673
+ author: string | null;
674
+ callId: string | null;
675
+ editedAt: string | null;
676
+ createdAt: string;
677
+ }
678
+ interface FollowUpCall {
679
+ id: string;
680
+ status: string | null;
681
+ direction: string | null;
682
+ at: string;
683
+ durationSec: number | null;
684
+ /** Which of the operator's phones the call is on: 0 = the one picked, 1+ = a backup (#654). */
685
+ ringingIndex: number | null;
686
+ /** That phone. While `status` is "DIALING" it is the one ringing right now. */
687
+ ringingPhone: string | null;
688
+ /** Shared with you — calls dialled from a follow-up are; an inbound call is once the owner shares it. */
689
+ shared: boolean;
690
+ overview: string | null;
691
+ /** Presigned; expires after `linksExpireInSeconds`. Null when not shared. */
692
+ recordingUrl: string | null;
693
+ }
694
+ interface FollowUpDetail extends FollowUp {
695
+ notes: FollowUpNote[];
696
+ calls: FollowUpCall[];
697
+ linksExpireInSeconds: number;
698
+ }
699
+ /** Someone on the project's Glitchgrab phone line — rung first on a dial, reminded on a booking. */
700
+ type FollowUpOperator = {
701
+ email: string;
702
+ } | {
703
+ phone: string;
704
+ };
705
+ /**
706
+ * Why a dial was refused, so your screen can say exactly what is missing (#654):
707
+ * - `NOT_ON_LINE` — the operator isn't one of the people on the project's phone line.
708
+ * - `NO_VERIFIED_NUMBER` — they are, but have no phone Glitchgrab may ring.
709
+ * - `RING_PHONE_NOT_YOURS` — `ringPhone` isn't one of their verified numbers.
710
+ */
711
+ type RingErrorCode = "NOT_ON_LINE" | "NO_VERIFIED_NUMBER" | "RING_PHONE_NOT_YOURS";
712
+ type FollowUpWriteResult<T = Record<string, never>> = ({
713
+ ok: true;
714
+ followUpId: string;
715
+ } & T) | {
716
+ ok: false;
717
+ error: string;
718
+ code?: string;
719
+ };
720
+ /**
721
+ * Follow-ups for a whole list page in one request — one entry per id, in the
722
+ * order asked (≤500). An id Glitchgrab has never seen comes back empty, so
723
+ * every row can render.
724
+ *
725
+ * ```ts
726
+ * const followUps = await listFollowUps(owners.map((o) => o.id)); // GLITCHGRAB_CALLS_KEY=ggc_…
727
+ * ```
728
+ *
729
+ * Returns `[]` on any failure. Never throws.
730
+ */
731
+ declare function listFollowUps(externalIds: string[], options?: CallsOptions): Promise<FollowUp[]>;
732
+ /**
733
+ * One customer's follow-up: booking, every note, their calls (recording links
734
+ * for shared calls only, presigned). Null on failure. Never throws.
735
+ */
736
+ declare function getFollowUp(externalId: string, options?: CallsOptions): Promise<FollowUpDetail | null>;
737
+ /**
738
+ * Add a note from your own screen. `phone` is needed the first time Glitchgrab
739
+ * sees this externalId. Never throws.
740
+ */
741
+ declare function addFollowUpNote(externalId: string, note: {
742
+ body: string;
743
+ author?: string;
744
+ phone?: string;
745
+ name?: string;
746
+ }, options?: CallsOptions): Promise<FollowUpWriteResult<{
747
+ id: string;
748
+ }>>;
749
+ /**
750
+ * Book, move (`Date`/ISO) or clear (`null`) the next call. The reminder
751
+ * WhatsApp goes to `operator`, else the project owner. Never throws.
752
+ */
753
+ declare function setFollowUpBooking(externalId: string, booking: {
754
+ nextCallAt: Date | string | null;
755
+ operator?: FollowUpOperator;
756
+ author?: string;
757
+ phone?: string;
758
+ name?: string;
759
+ }, options?: CallsOptions): Promise<FollowUpWriteResult<{
760
+ nextCallAt: string | null;
761
+ }>>;
762
+ /**
763
+ * Start a recorded call: Glitchgrab rings `operator`'s phone, then the
764
+ * customer, from the project's line. The operator must be on that line. A note
765
+ * and a suggested next call follow once the call is transcribed. Never throws.
766
+ *
767
+ * `ringPhone` picks which of the operator's verified phones rings first (list
768
+ * them with {@link getOperatorRingNumbers}); omitted = their Default. If that
769
+ * phone isn't picked up, their backups ring in order (`ringNumbers`). A
770
+ * refusal carries `code` — see {@link RingErrorCode}.
771
+ */
772
+ declare function dialFollowUp(externalId: string, call: {
773
+ operator: FollowUpOperator;
774
+ phone?: string;
775
+ name?: string;
776
+ lineId?: string;
777
+ ringPhone?: string;
778
+ }, options?: CallsOptions): Promise<FollowUpWriteResult<{
779
+ callId: string;
780
+ ringing: string;
781
+ ringNumbers: string[];
782
+ }>>;
783
+ /** One phone Glitchgrab may ring for an operator — what `ringPhone` accepts (#654). */
784
+ interface OperatorRingNumber {
785
+ /** E.164, `+91…`. Pass it back as `ringPhone`. */
786
+ phone: string;
787
+ label: string | null;
788
+ isDefault: boolean;
789
+ /** 0 = Default, then backups in the order they ring. */
790
+ order: number;
791
+ }
792
+ type OperatorRingNumbersResult = {
793
+ ok: true;
794
+ operator: {
795
+ name: string | null;
796
+ };
797
+ numbers: OperatorRingNumber[];
798
+ } | {
799
+ ok: false;
800
+ error: string;
801
+ code?: string;
802
+ };
803
+ /**
804
+ * The phones Glitchgrab can ring for one person on the project's phone line —
805
+ * for a "Ring me on: [Default ▾]" picker beside your Call button. Verified
806
+ * numbers only. `numbers: []` = dial will refuse with `NO_VERIFIED_NUMBER`;
807
+ * not on the line = `{ ok: false, code: "NOT_ON_LINE" }`. Never throws.
808
+ *
809
+ * ```ts
810
+ * const r = await getOperatorRingNumbers({ email: admin.email }); // GLITCHGRAB_CALLS_KEY=ggc_…
811
+ * if (r.ok) render(r.numbers); // pass the chosen phone to dialFollowUp(…, { ringPhone })
812
+ * ```
813
+ */
814
+ declare function getOperatorRingNumbers(operator: FollowUpOperator, options?: CallsOptions): Promise<OperatorRingNumbersResult>;
815
+ /** One saved ring number, verified or not — the management view (#654). */
816
+ interface RingNumber {
817
+ id: string;
818
+ /** E.164, `+91…`. */
819
+ phone: string;
820
+ label: string | null;
821
+ position: number;
822
+ /** Only verified numbers are ever rung. */
823
+ verified: boolean;
824
+ /** A test ring is out right now — poll until `verified`. */
825
+ verifying: boolean;
826
+ isDefault: boolean;
827
+ }
828
+ interface RingNumberList {
829
+ operator: {
830
+ name: string | null;
831
+ };
832
+ /** Their account mobile — still what rings while nothing here is verified. */
833
+ accountPhone: string | null;
834
+ usingAccount: boolean;
835
+ numbers: RingNumber[];
836
+ }
837
+ type RingNumberWriteResult<T = object> = ({
838
+ ok: true;
839
+ } & T) | {
840
+ ok: false;
841
+ error: string;
842
+ code?: string;
843
+ };
844
+ /**
845
+ * Every phone saved for one person on the project's line, unverified included
846
+ * — for your "manage my phones" screen. Ring numbers are managed only from
847
+ * your product; Glitchgrab shows them read-only. A refusal carries `code`
848
+ * (`NOT_ON_LINE`), so "not on the line" reads differently from "network down".
849
+ * Never throws.
850
+ */
851
+ declare function listRingNumbers(operator: FollowUpOperator, options?: CallsOptions): Promise<RingNumberWriteResult<RingNumberList>>;
852
+ /**
853
+ * Save a phone for `operator` and place its test ring at once: the project's
854
+ * line calls it and whoever holds it presses 1. Never rung for a call until
855
+ * then; the line's owner is alerted when it is verified. Max 5 per person.
856
+ * `testRing: "failed"` = saved but not rung — retry with {@link testRingNumber}.
857
+ */
858
+ declare function addRingNumber(operator: FollowUpOperator, number: {
859
+ phone: string;
860
+ label?: string;
861
+ }, options?: CallsOptions): Promise<RingNumberWriteResult<{
862
+ id: string;
863
+ testRing: "ringing" | "failed";
864
+ verifyError: string | null;
865
+ }>>;
866
+ /** Rename, make Default (verified only) or move one place up/down. Never throws. */
867
+ declare function updateRingNumber(id: string, change: {
868
+ label?: string | null;
869
+ makeDefault?: true;
870
+ move?: "up" | "down";
871
+ }, options?: CallsOptions): Promise<RingNumberWriteResult>;
872
+ /** Remove one; the next verified number becomes Default. Never throws. */
873
+ declare function removeRingNumber(id: string, options?: CallsOptions): Promise<RingNumberWriteResult>;
874
+ /** Place the test ring again (6 per person, 30 per project an hour). Never throws. */
875
+ declare function testRingNumber(id: string, options?: CallsOptions): Promise<RingNumberWriteResult<{
876
+ verified: boolean;
877
+ }>>;
637
878
 
638
- export { type Booking, type BookingAnswer, type BookingClientNotice, type BookingMutationResult, type BookingNotifyRecipient, type BookingQuestion, type BookingQuestionInput, type BookingSettings, type BookingSettingsChanges, type BookingSettingsResult, type BookingSettingsState, type BookingWorkingHours, type Call, type CallAudio, type CallListItem, type CallMoment, type CallParticipant, type CallsOptions, type CaptureServerErrorsOptions, type DeleteCallResult, type GetCallOptions, type Guide, type GuideReadOptions, type GuideSummary, type Lead, type ListBookingsOptions, type ListCallsOptions, type ListLeadsOptions, ReportResult, ReportSeverity, ReportType, type ServerReportOptions, type ServerReporterConfig, type ServerReporterIdentity, type SignSessionOptions, cancelBooking, captureServerErrors, configureServerReporter, deleteCall, discardBookingQuestionsDraft, escapeJsonForScript, getBookingSettings, getCall, getGuide, listBookings, listCalls, listGuides, listLeads, publishBookingQuestions, reportServerError, rescheduleBooking, resetServerReporter, signSession, updateBookingSettings };
879
+ export { type Booking, type BookingAnswer, type BookingClientNotice, type BookingMutationResult, type BookingNotifyRecipient, type BookingQuestion, type BookingQuestionInput, type BookingSettings, type BookingSettingsChanges, type BookingSettingsResult, type BookingSettingsState, type BookingWorkingHours, type Call, type CallAudio, type CallListItem, type CallMoment, type CallParticipant, type CallsOptions, type CaptureServerErrorsOptions, type DeleteCallResult, type FollowUp, type FollowUpCall, type FollowUpDetail, type FollowUpDue, type FollowUpNote, type FollowUpOperator, type FollowUpWriteResult, type GetCallOptions, type Guide, type GuideReadOptions, type GuideSummary, type Lead, type ListBookingsOptions, type ListCallsOptions, type ListLeadsOptions, type OperatorRingNumber, type OperatorRingNumbersResult, ReportResult, ReportSeverity, ReportType, type RingErrorCode, type RingNumber, type RingNumberList, type RingNumberWriteResult, type ServerReportOptions, type ServerReporterConfig, type ServerReporterIdentity, type SignSessionOptions, addFollowUpNote, addRingNumber, cancelBooking, captureServerErrors, configureServerReporter, deleteCall, dialFollowUp, discardBookingQuestionsDraft, escapeJsonForScript, getBookingSettings, getCall, getFollowUp, getGuide, getOperatorRingNumbers, listBookings, listCalls, listFollowUps, listGuides, listLeads, listRingNumbers, publishBookingQuestions, removeRingNumber, reportServerError, rescheduleBooking, resetServerReporter, setFollowUpBooking, signSession, testRingNumber, updateBookingSettings, updateRingNumber };