@ciridae/voice-conversations-react 0.0.0-stage → 0.1.0-nightly.0.bootstrap
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/README.md +30 -2
- package/components/BrowserTalkButton.tsx +96 -0
- package/components/CallBanner.tsx +43 -0
- package/components/CallCaptions.tsx +38 -0
- package/components/CallEntry.tsx +89 -0
- package/components/CallTranscript.tsx +58 -0
- package/components/RecentCallEntries.tsx +211 -0
- package/components/describeBrowserTalkError.ts +39 -0
- package/components/formatCallClock.ts +9 -0
- package/components/useEndPresentCall.ts +45 -0
- package/components/voiceCall.css +225 -0
- package/dist/MalformedVoiceResponseError.d.ts +6 -0
- package/dist/MalformedVoiceResponseError.js +9 -0
- package/dist/NumberToCallQrCode.d.ts +12 -0
- package/dist/NumberToCallQrCode.js +29 -0
- package/dist/PhoneNumberDialog.d.ts +25 -0
- package/dist/PhoneNumberDialog.js +333 -0
- package/dist/PhoneNumbersAdminPanel.d.ts +11 -0
- package/dist/PhoneNumbersAdminPanel.js +85 -0
- package/dist/VoiceApiError.d.ts +18 -0
- package/dist/VoiceApiError.js +19 -0
- package/dist/VoiceRequestTimedOutError.d.ts +6 -0
- package/dist/VoiceRequestTimedOutError.js +9 -0
- package/dist/averageSpeechBinsIntoBands.d.ts +6 -0
- package/dist/averageSpeechBinsIntoBands.js +20 -0
- package/dist/browserApisForBrowserTalk.d.ts +17 -0
- package/dist/browserApisForBrowserTalk.js +42 -0
- package/dist/browserTalkError.d.ts +36 -0
- package/dist/browserTalkError.js +1 -0
- package/dist/chooseCallToShowCaptionsOf.d.ts +22 -0
- package/dist/chooseCallToShowCaptionsOf.js +26 -0
- package/dist/createBrowserTalk.d.ts +56 -0
- package/dist/createBrowserTalk.js +414 -0
- package/dist/createBrowserTalkErrorFollower.d.ts +17 -0
- package/dist/createBrowserTalkErrorFollower.js +76 -0
- package/dist/createCallPresenceWatcher.d.ts +25 -0
- package/dist/createCallPresenceWatcher.js +66 -0
- package/dist/createLiveCallCaptionsPoller.d.ts +24 -0
- package/dist/createLiveCallCaptionsPoller.js +58 -0
- package/dist/createVisibleTabPoller.d.ts +13 -0
- package/dist/createVisibleTabPoller.js +56 -0
- package/dist/deriveCallPresence.d.ts +23 -0
- package/dist/deriveCallPresence.js +58 -0
- package/dist/describePhoneNumberError.d.ts +7 -0
- package/dist/describePhoneNumberError.js +29 -0
- package/dist/entries/index.d.ts +26 -0
- package/dist/entries/index.js +22 -0
- package/dist/followBrowserTalkErrorAgainstPresence.d.ts +23 -0
- package/dist/followBrowserTalkErrorAgainstPresence.js +52 -0
- package/dist/formatPhoneNumberAsTyped.d.ts +31 -0
- package/dist/formatPhoneNumberAsTyped.js +85 -0
- package/dist/generated/index.d.ts +1 -0
- package/dist/generated/index.js +2 -0
- package/dist/generated/types.gen.d.ts +795 -0
- package/dist/generated/types.gen.js +2 -0
- package/dist/getBrowserTalkForThisTab.d.ts +3 -0
- package/dist/getBrowserTalkForThisTab.js +13 -0
- package/dist/getCallPresenceWatcherForThisTab.d.ts +3 -0
- package/dist/getCallPresenceWatcherForThisTab.js +9 -0
- package/dist/mapStartBrowserTalkFailureToBrowserTalkError.d.ts +7 -0
- package/dist/mapStartBrowserTalkFailureToBrowserTalkError.js +60 -0
- package/dist/parseVoiceApiResponses.d.ts +11 -0
- package/dist/parseVoiceApiResponses.js +344 -0
- package/dist/readCallSummaryUntilItHasDuration.d.ts +12 -0
- package/dist/readCallSummaryUntilItHasDuration.js +45 -0
- package/dist/readTheBrowsersTimeZone.d.ts +8 -0
- package/dist/readTheBrowsersTimeZone.js +17 -0
- package/dist/readTimestampMilliseconds.d.ts +8 -0
- package/dist/readTimestampMilliseconds.js +10 -0
- package/dist/requestEndOfCall.d.ts +7 -0
- package/dist/requestEndOfCall.js +11 -0
- package/dist/startBrowserTalkErrorFollowerForThisTab.d.ts +6 -0
- package/dist/startBrowserTalkErrorFollowerForThisTab.js +12 -0
- package/dist/useAdminPhoneNumbers.d.ts +47 -0
- package/dist/useAdminPhoneNumbers.js +76 -0
- package/dist/useBrowserTalk.d.ts +10 -0
- package/dist/useBrowserTalk.js +23 -0
- package/dist/useBrowserTalkErrorWhileItApplies.d.ts +10 -0
- package/dist/useBrowserTalkErrorWhileItApplies.js +13 -0
- package/dist/useCallPresence.d.ts +5 -0
- package/dist/useCallPresence.js +34 -0
- package/dist/useCallSummaries.d.ts +9 -0
- package/dist/useCallSummaries.js +22 -0
- package/dist/useCallSummary.d.ts +15 -0
- package/dist/useCallSummary.js +21 -0
- package/dist/useFinePointerWithHover.d.ts +10 -0
- package/dist/useFinePointerWithHover.js +19 -0
- package/dist/useLiveCallCaptions.d.ts +8 -0
- package/dist/useLiveCallCaptions.js +27 -0
- package/dist/useLiveCallCaptionsOfLatestCall.d.ts +13 -0
- package/dist/useLiveCallCaptionsOfLatestCall.js +23 -0
- package/dist/usePhoneNumber.d.ts +45 -0
- package/dist/usePhoneNumber.js +125 -0
- package/dist/voiceApiModels.d.ts +85 -0
- package/dist/voiceApiModels.js +1 -0
- package/dist/voiceConversationsApi.d.ts +44 -0
- package/dist/voiceConversationsApi.js +227 -0
- package/dist/voiceConversationsSettings.d.ts +20 -0
- package/dist/voiceConversationsSettings.js +26 -0
- package/package.json +41 -4
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
+
import { describePhoneNumberError } from "./describePhoneNumberError.js";
|
|
3
|
+
import { deleteAdminPhoneNumber, getEveryAdminPhoneNumber, postAdminPhoneNumber, postAdminPhoneNumberCsv, } from "./voiceConversationsApi.js";
|
|
4
|
+
/**
|
|
5
|
+
* The admin phone-number routes (`GET`, `POST` and `DELETE {prefix}/admin/phone-numbers`, and the
|
|
6
|
+
* CSV upload), served only when the backend install was given `require_admin`. The app's own admin
|
|
7
|
+
* check answers anyone else, which reads here as a failed request.
|
|
8
|
+
*
|
|
9
|
+
* The list is read on mount, every page, and again after each change that succeeds. A read that
|
|
10
|
+
* fails keeps the last complete list and reports the failure; a partial list is never shown. A
|
|
11
|
+
* read or change that answers after a newer one, or after unmount, is dropped.
|
|
12
|
+
*/
|
|
13
|
+
export function useAdminPhoneNumbers() {
|
|
14
|
+
const [state, setState] = useState({ status: "idle" });
|
|
15
|
+
const [phoneNumbers, setPhoneNumbers] = useState(undefined);
|
|
16
|
+
const [listStatus, setListStatus] = useState("loading");
|
|
17
|
+
const [listError, setListError] = useState(null);
|
|
18
|
+
const latestChange = useRef(0);
|
|
19
|
+
const latestRead = useRef(0);
|
|
20
|
+
const mounted = useRef(true);
|
|
21
|
+
const reloadList = useCallback(() => {
|
|
22
|
+
const read = ++latestRead.current;
|
|
23
|
+
setListStatus("loading");
|
|
24
|
+
getEveryAdminPhoneNumber().then((listed) => {
|
|
25
|
+
if (!mounted.current || read !== latestRead.current)
|
|
26
|
+
return;
|
|
27
|
+
setPhoneNumbers(listed);
|
|
28
|
+
setListStatus("ready");
|
|
29
|
+
setListError(null);
|
|
30
|
+
}, (failure) => {
|
|
31
|
+
if (!mounted.current || read !== latestRead.current)
|
|
32
|
+
return;
|
|
33
|
+
setListStatus("load_failed");
|
|
34
|
+
setListError(describePhoneNumberError(failure));
|
|
35
|
+
});
|
|
36
|
+
}, []);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
mounted.current = true;
|
|
39
|
+
reloadList();
|
|
40
|
+
return () => {
|
|
41
|
+
mounted.current = false;
|
|
42
|
+
};
|
|
43
|
+
}, [reloadList]);
|
|
44
|
+
const sendAdminPhoneNumberChange = useCallback(async (send) => {
|
|
45
|
+
const change = ++latestChange.current;
|
|
46
|
+
setState({ status: "sending" });
|
|
47
|
+
let next;
|
|
48
|
+
try {
|
|
49
|
+
next = await send();
|
|
50
|
+
}
|
|
51
|
+
catch (failure) {
|
|
52
|
+
next = { status: "failed", error: describePhoneNumberError(failure) };
|
|
53
|
+
}
|
|
54
|
+
if (!mounted.current)
|
|
55
|
+
return next.status !== "failed";
|
|
56
|
+
if (change === latestChange.current)
|
|
57
|
+
setState(next);
|
|
58
|
+
if (next.status === "failed")
|
|
59
|
+
return false;
|
|
60
|
+
reloadList();
|
|
61
|
+
return true;
|
|
62
|
+
}, [reloadList]);
|
|
63
|
+
const addOne = useCallback((member, typedPhoneNumber) => sendAdminPhoneNumberChange(async () => ({
|
|
64
|
+
status: "added",
|
|
65
|
+
added: await postAdminPhoneNumber(member.trim(), typedPhoneNumber),
|
|
66
|
+
})), [sendAdminPhoneNumberChange]);
|
|
67
|
+
const uploadCsv = useCallback((csv) => sendAdminPhoneNumberChange(async () => ({
|
|
68
|
+
status: "uploaded",
|
|
69
|
+
report: await postAdminPhoneNumberCsv(csv),
|
|
70
|
+
})), [sendAdminPhoneNumberChange]);
|
|
71
|
+
const removeOne = useCallback((memberUserId) => sendAdminPhoneNumberChange(async () => {
|
|
72
|
+
await deleteAdminPhoneNumber(memberUserId);
|
|
73
|
+
return { status: "removed", memberUserId };
|
|
74
|
+
}), [sendAdminPhoneNumberChange]);
|
|
75
|
+
return { state, phoneNumbers, listStatus, listError, addOne, uploadCsv, removeOne, reloadList };
|
|
76
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BrowserTalk, BrowserTalkState } from "./createBrowserTalk.js";
|
|
2
|
+
export type BrowserTalkControls = Omit<BrowserTalk, "subscribe" | "getState"> & {
|
|
3
|
+
state: BrowserTalkState;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* This tab's browser talk and its actions. Any number of components may call it; there is one browser talk. The
|
|
7
|
+
* first call also starts the tab's browser talk error follower, so `state.error` about another call ("Your
|
|
8
|
+
* phone call took over") clears once that call ends, whichever hook the app reads it through.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useBrowserTalk(): BrowserTalkControls;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useEffect, useSyncExternalStore } from "react";
|
|
2
|
+
import { getBrowserTalkForThisTab } from "./getBrowserTalkForThisTab.js";
|
|
3
|
+
import { startBrowserTalkErrorFollowerForThisTab } from "./startBrowserTalkErrorFollowerForThisTab.js";
|
|
4
|
+
/**
|
|
5
|
+
* This tab's browser talk and its actions. Any number of components may call it; there is one browser talk. The
|
|
6
|
+
* first call also starts the tab's browser talk error follower, so `state.error` about another call ("Your
|
|
7
|
+
* phone call took over") clears once that call ends, whichever hook the app reads it through.
|
|
8
|
+
*/
|
|
9
|
+
export function useBrowserTalk() {
|
|
10
|
+
const session = getBrowserTalkForThisTab();
|
|
11
|
+
useEffect(startBrowserTalkErrorFollowerForThisTab, []);
|
|
12
|
+
const state = useSyncExternalStore(session.subscribe, session.getState, session.getState);
|
|
13
|
+
return {
|
|
14
|
+
state,
|
|
15
|
+
start: session.start,
|
|
16
|
+
cancel: session.cancel,
|
|
17
|
+
end: session.end,
|
|
18
|
+
toggleMute: session.toggleMute,
|
|
19
|
+
dismissError: session.dismissError,
|
|
20
|
+
readVoiceLevels: session.readVoiceLevels,
|
|
21
|
+
browserTalkStartedInThisTab: session.browserTalkStartedInThisTab,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BrowserTalkError } from "./browserTalkError.js";
|
|
2
|
+
/**
|
|
3
|
+
* Why the last browser talk did not start or ended early, for as long as it still applies; null when
|
|
4
|
+
* nothing went wrong. An error about another call ("Your phone call took over", "You're on a phone
|
|
5
|
+
* call", "already talking in another tab") clears once that call has ended, followed for the whole
|
|
6
|
+
* tab from the first `useBrowserTalk` on, so a component that was closed meanwhile does not bring
|
|
7
|
+
* back a stale line. Every error also clears when a new browser talk starts, and the app clears it when
|
|
8
|
+
* the member sends a message (`useBrowserTalk().dismissError()`).
|
|
9
|
+
*/
|
|
10
|
+
export declare function useBrowserTalkErrorWhileItApplies(): BrowserTalkError | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useBrowserTalk } from "./useBrowserTalk.js";
|
|
2
|
+
/**
|
|
3
|
+
* Why the last browser talk did not start or ended early, for as long as it still applies; null when
|
|
4
|
+
* nothing went wrong. An error about another call ("Your phone call took over", "You're on a phone
|
|
5
|
+
* call", "already talking in another tab") clears once that call has ended, followed for the whole
|
|
6
|
+
* tab from the first `useBrowserTalk` on, so a component that was closed meanwhile does not bring
|
|
7
|
+
* back a stale line. Every error also clears when a new browser talk starts, and the app clears it when
|
|
8
|
+
* the member sends a message (`useBrowserTalk().dismissError()`).
|
|
9
|
+
*/
|
|
10
|
+
export function useBrowserTalkErrorWhileItApplies() {
|
|
11
|
+
const { state } = useBrowserTalk();
|
|
12
|
+
return state.status === "idle" ? state.error : null;
|
|
13
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useEffect, useState, useSyncExternalStore } from "react";
|
|
2
|
+
import { deriveCallPresence } from "./deriveCallPresence.js";
|
|
3
|
+
import { getCallPresenceWatcherForThisTab } from "./getCallPresenceWatcherForThisTab.js";
|
|
4
|
+
import { getBrowserTalkForThisTab } from "./getBrowserTalkForThisTab.js";
|
|
5
|
+
const CLOCK_TICK_MS = 1000;
|
|
6
|
+
/** Whether the member is on a call anywhere, with a clock that ticks each second while they are. */
|
|
7
|
+
export function useCallPresence() {
|
|
8
|
+
const watcher = getCallPresenceWatcherForThisTab();
|
|
9
|
+
const browserTalk = getBrowserTalkForThisTab();
|
|
10
|
+
const server = useSyncExternalStore(watcher.subscribe, watcher.getState, watcher.getState);
|
|
11
|
+
const browserTalkState = useSyncExternalStore(browserTalk.subscribe, browserTalk.getState, browserTalk.getState);
|
|
12
|
+
const [clock, setClock] = useState(() => ({
|
|
13
|
+
nowMs: Date.now(),
|
|
14
|
+
readWith: "no_call",
|
|
15
|
+
}));
|
|
16
|
+
const presence = deriveCallPresence(server, browserTalkState, browserTalk.browserTalkStartedInThisTab, clock.nowMs);
|
|
17
|
+
const readWith = presence.presence === "none" ? "no_call" : "a_call";
|
|
18
|
+
if (readWith !== clock.readWith) {
|
|
19
|
+
// No tick runs without a call, so the clock may be minutes old when one appears: read it
|
|
20
|
+
// now. React renders again before painting, so the call's first paint has a current clock.
|
|
21
|
+
setClock({ nowMs: Date.now(), readWith });
|
|
22
|
+
}
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (readWith === "no_call")
|
|
25
|
+
return;
|
|
26
|
+
const tick = setInterval(() => {
|
|
27
|
+
setClock((previous) => ({ ...previous, nowMs: Date.now() }));
|
|
28
|
+
}, CLOCK_TICK_MS);
|
|
29
|
+
return () => {
|
|
30
|
+
clearInterval(tick);
|
|
31
|
+
};
|
|
32
|
+
}, [readWith]);
|
|
33
|
+
return { ...presence, refetch: watcher.refetch };
|
|
34
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CallSummaryState } from "./useCallSummary.js";
|
|
2
|
+
import type { CallId } from "./voiceApiModels.js";
|
|
3
|
+
/**
|
|
4
|
+
* The summaries of several calls, in the order of `callIds`, read as `useCallSummary` reads one:
|
|
5
|
+
* once per call id, again while a summary has no duration yet. Each entry is null until its call's
|
|
6
|
+
* summary is read. For a session made of several calls, such as a browser talk a phone call took over.
|
|
7
|
+
* Pass the same array for as long as the calls are the same: a new array reads them all again.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useCallSummaries(callIds: readonly CallId[]): readonly CallSummaryState[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { readCallSummaryUntilItHasDuration } from "./readCallSummaryUntilItHasDuration.js";
|
|
3
|
+
const NO_SUMMARY = { summary: null, readError: null };
|
|
4
|
+
/**
|
|
5
|
+
* The summaries of several calls, in the order of `callIds`, read as `useCallSummary` reads one:
|
|
6
|
+
* once per call id, again while a summary has no duration yet. Each entry is null until its call's
|
|
7
|
+
* summary is read. For a session made of several calls, such as a browser talk a phone call took over.
|
|
8
|
+
* Pass the same array for as long as the calls are the same: a new array reads them all again.
|
|
9
|
+
*/
|
|
10
|
+
export function useCallSummaries(callIds) {
|
|
11
|
+
const [summariesByCallId, setSummariesByCallId] = useState(new Map());
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
const stops = callIds.map((callId) => readCallSummaryUntilItHasDuration(callId, (read) => {
|
|
14
|
+
setSummariesByCallId((previous) => new Map(previous).set(callId, read));
|
|
15
|
+
}));
|
|
16
|
+
return () => {
|
|
17
|
+
for (const stop of stops)
|
|
18
|
+
stop();
|
|
19
|
+
};
|
|
20
|
+
}, [callIds]);
|
|
21
|
+
return callIds.map((callId) => summariesByCallId.get(callId) ?? NO_SUMMARY);
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CallId, CallSummary } from "./voiceApiModels.js";
|
|
2
|
+
export interface CallSummaryState {
|
|
3
|
+
/** The call's summary once read; null before then, and when the read failed. */
|
|
4
|
+
summary: CallSummary | null;
|
|
5
|
+
/** The read's failure, such as `VoiceApiError` `call_not_found` for a call that is not the member's. */
|
|
6
|
+
readError: unknown;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The summary of `callId` (`GET calls/{id}`): whose call it was, when it connected, how long it
|
|
10
|
+
* lasted and its delegation counts. Read once per call id, for an ended call. A call that ended a
|
|
11
|
+
* moment ago may not have its end recorded yet, so a summary without a duration is read again
|
|
12
|
+
* every 2 s, three reads in all. A summary is only for its own call, so the render after `callId`
|
|
13
|
+
* changes shows none until the new one is read.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useCallSummary(callId: CallId | null): CallSummaryState;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { readCallSummaryUntilItHasDuration } from "./readCallSummaryUntilItHasDuration.js";
|
|
3
|
+
const NO_SUMMARY = { summary: null, readError: null };
|
|
4
|
+
/**
|
|
5
|
+
* The summary of `callId` (`GET calls/{id}`): whose call it was, when it connected, how long it
|
|
6
|
+
* lasted and its delegation counts. Read once per call id, for an ended call. A call that ended a
|
|
7
|
+
* moment ago may not have its end recorded yet, so a summary without a duration is read again
|
|
8
|
+
* every 2 s, three reads in all. A summary is only for its own call, so the render after `callId`
|
|
9
|
+
* changes shows none until the new one is read.
|
|
10
|
+
*/
|
|
11
|
+
export function useCallSummary(callId) {
|
|
12
|
+
const [summaryOfCall, setSummaryOfCall] = useState(null);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (callId === null)
|
|
15
|
+
return;
|
|
16
|
+
return readCallSummaryUntilItHasDuration(callId, (read) => {
|
|
17
|
+
setSummaryOfCall({ callId, ...read });
|
|
18
|
+
});
|
|
19
|
+
}, [callId]);
|
|
20
|
+
return summaryOfCall !== null && summaryOfCall.callId === callId ? summaryOfCall : NO_SUMMARY;
|
|
21
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** The media query a laptop or desktop matches: a mouse or trackpad that can hover. */
|
|
2
|
+
export declare const FINE_POINTER_WITH_HOVER_QUERY = "(hover: hover) and (pointer: fine)";
|
|
3
|
+
/**
|
|
4
|
+
* Whether the main pointer is a mouse or trackpad that can hover (a laptop or desktop), read from
|
|
5
|
+
* `FINE_POINTER_WITH_HOVER_QUERY` and updated when it changes, as when a tablet gets a trackpad.
|
|
6
|
+
* A phone, a tablet, and a device with no pointer read `no_fine_pointer_with_hover`. So does
|
|
7
|
+
* server rendering, and a page without `matchMedia` (jsdom, in an app's own tests), so nothing
|
|
8
|
+
* that needs a second device (a QR code) shows there and the dialog still renders.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useFinePointerWithHover(): "fine_pointer_with_hover" | "no_fine_pointer_with_hover";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useSyncExternalStore } from "react";
|
|
2
|
+
/** The media query a laptop or desktop matches: a mouse or trackpad that can hover. */
|
|
3
|
+
export const FINE_POINTER_WITH_HOVER_QUERY = "(hover: hover) and (pointer: fine)";
|
|
4
|
+
/**
|
|
5
|
+
* Whether the main pointer is a mouse or trackpad that can hover (a laptop or desktop), read from
|
|
6
|
+
* `FINE_POINTER_WITH_HOVER_QUERY` and updated when it changes, as when a tablet gets a trackpad.
|
|
7
|
+
* A phone, a tablet, and a device with no pointer read `no_fine_pointer_with_hover`. So does
|
|
8
|
+
* server rendering, and a page without `matchMedia` (jsdom, in an app's own tests), so nothing
|
|
9
|
+
* that needs a second device (a QR code) shows there and the dialog still renders.
|
|
10
|
+
*/
|
|
11
|
+
export function useFinePointerWithHover() {
|
|
12
|
+
const matchesFinePointerWithHover = useSyncExternalStore(subscribeToFinePointerWithHover, () => globalThis.matchMedia?.(FINE_POINTER_WITH_HOVER_QUERY).matches ?? false, () => false);
|
|
13
|
+
return matchesFinePointerWithHover ? "fine_pointer_with_hover" : "no_fine_pointer_with_hover";
|
|
14
|
+
}
|
|
15
|
+
function subscribeToFinePointerWithHover(onChange) {
|
|
16
|
+
const media = globalThis.matchMedia?.(FINE_POINTER_WITH_HOVER_QUERY);
|
|
17
|
+
media?.addEventListener("change", onChange);
|
|
18
|
+
return () => media?.removeEventListener("change", onChange);
|
|
19
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type LiveCallCaptionsState } from "./createLiveCallCaptionsPoller.js";
|
|
2
|
+
import type { CallId } from "./voiceApiModels.js";
|
|
3
|
+
/**
|
|
4
|
+
* The live transcript of `callId` (phone or browser talk), polled every second while the call lasts. A
|
|
5
|
+
* poller is read only for its own call, so the render after `callId` changes shows no captions rather
|
|
6
|
+
* than the previous call's, until the new call's poller is in place.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useLiveCallCaptions(callId: CallId | null): LiveCallCaptionsState;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useEffect, useState, useSyncExternalStore } from "react";
|
|
2
|
+
import { createLiveCallCaptionsPoller, NO_LIVE_CALL_CAPTIONS, } from "./createLiveCallCaptionsPoller.js";
|
|
3
|
+
import { getCallCaptions } from "./voiceConversationsApi.js";
|
|
4
|
+
const subscribeToNothing = () => () => undefined;
|
|
5
|
+
const readNoCaptions = () => NO_LIVE_CALL_CAPTIONS;
|
|
6
|
+
/**
|
|
7
|
+
* The live transcript of `callId` (phone or browser talk), polled every second while the call lasts. A
|
|
8
|
+
* poller is read only for its own call, so the render after `callId` changes shows no captions rather
|
|
9
|
+
* than the previous call's, until the new call's poller is in place.
|
|
10
|
+
*/
|
|
11
|
+
export function useLiveCallCaptions(callId) {
|
|
12
|
+
const [pollerOfCall, setPollerOfCall] = useState(null);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (callId === null) {
|
|
15
|
+
setPollerOfCall(null);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const callPoller = createLiveCallCaptionsPoller(callId, getCallCaptions);
|
|
19
|
+
setPollerOfCall({ callId, poller: callPoller });
|
|
20
|
+
callPoller.start();
|
|
21
|
+
return () => {
|
|
22
|
+
callPoller.stop();
|
|
23
|
+
};
|
|
24
|
+
}, [callId]);
|
|
25
|
+
const poller = pollerOfCall?.callId === callId ? pollerOfCall.poller : null;
|
|
26
|
+
return useSyncExternalStore(poller?.subscribe ?? subscribeToNothing, poller?.getState ?? readNoCaptions, poller?.getState ?? readNoCaptions);
|
|
27
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { LiveCallCaptionsState } from "./createLiveCallCaptionsPoller.js";
|
|
2
|
+
/**
|
|
3
|
+
* The live transcript of the member's present call, or of the last one this tab saw. Presence
|
|
4
|
+
* turns `none` as soon as a call ends, but the captions poller still owes its final read (words that
|
|
5
|
+
* arrive at the end), so the hook keeps following the ended call until another call appears. A new
|
|
6
|
+
* call that has no id yet (this tab's browser talk while connecting) already replaces it, so the previous
|
|
7
|
+
* transcript is not shown while the new call connects.
|
|
8
|
+
*
|
|
9
|
+
* `signedInUserId` is any stable id of the signed-in member (the app's user id). The ended call
|
|
10
|
+
* is followed only for the member who saw it: when another member signs in while the hook stays
|
|
11
|
+
* mounted, the previous member's transcript is dropped, never shown to them.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useLiveCallCaptionsOfLatestCall(signedInUserId: string): LiveCallCaptionsState;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { chooseCallToShowCaptionsOf } from "./chooseCallToShowCaptionsOf.js";
|
|
3
|
+
import { useCallPresence } from "./useCallPresence.js";
|
|
4
|
+
import { useLiveCallCaptions } from "./useLiveCallCaptions.js";
|
|
5
|
+
/**
|
|
6
|
+
* The live transcript of the member's present call, or of the last one this tab saw. Presence
|
|
7
|
+
* turns `none` as soon as a call ends, but the captions poller still owes its final read (words that
|
|
8
|
+
* arrive at the end), so the hook keeps following the ended call until another call appears. A new
|
|
9
|
+
* call that has no id yet (this tab's browser talk while connecting) already replaces it, so the previous
|
|
10
|
+
* transcript is not shown while the new call connects.
|
|
11
|
+
*
|
|
12
|
+
* `signedInUserId` is any stable id of the signed-in member (the app's user id). The ended call
|
|
13
|
+
* is followed only for the member who saw it: when another member signs in while the hook stays
|
|
14
|
+
* mounted, the previous member's transcript is dropped, never shown to them.
|
|
15
|
+
*/
|
|
16
|
+
export function useLiveCallCaptionsOfLatestCall(signedInUserId) {
|
|
17
|
+
const { call } = useCallPresence();
|
|
18
|
+
const [followedCall, setFollowedCall] = useState(null);
|
|
19
|
+
const chosen = chooseCallToShowCaptionsOf(call, followedCall, signedInUserId);
|
|
20
|
+
if (chosen.followedCall !== followedCall)
|
|
21
|
+
setFollowedCall(chosen.followedCall);
|
|
22
|
+
return useLiveCallCaptions(chosen.callId);
|
|
23
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** `loading` until the first read answers; `load_failed` keeps the last number read, if any. */
|
|
2
|
+
export type PhoneNumberLoadStatus = "loading" | "ready" | "load_failed";
|
|
3
|
+
/** What the member asked for last, while it is under way. */
|
|
4
|
+
export type PhoneNumberChange = "none" | "saving" | "removing";
|
|
5
|
+
/**
|
|
6
|
+
* How a save ended: saved; `number_refused`, the backend read the typed number and refused it
|
|
7
|
+
* (not a valid number, or another member's), so the field is wrong; or `failed`, nothing about the
|
|
8
|
+
* number was decided (sign-in, membership, a setup problem, the network).
|
|
9
|
+
*/
|
|
10
|
+
export type PhoneNumberSaveOutcome = {
|
|
11
|
+
outcome: "saved";
|
|
12
|
+
phoneNumber: string;
|
|
13
|
+
} | {
|
|
14
|
+
outcome: "number_refused";
|
|
15
|
+
} | {
|
|
16
|
+
outcome: "failed";
|
|
17
|
+
};
|
|
18
|
+
export interface PhoneNumberControls {
|
|
19
|
+
/** The saved E.164 number, `null` when none is saved, `undefined` until the first read answers. */
|
|
20
|
+
phoneNumber: string | null | undefined;
|
|
21
|
+
/** The saved number for people to read, e.g. `+1 (415) 555-0123`; set exactly when `phoneNumber` is. */
|
|
22
|
+
phoneNumberDisplay: string | null | undefined;
|
|
23
|
+
/** The app's number the member calls, in E.164 (for a `tel:` link); `null` when the app set none. */
|
|
24
|
+
phoneNumberToCall: string | null | undefined;
|
|
25
|
+
/** The number to call for people to read; set exactly when `phoneNumberToCall` is. */
|
|
26
|
+
phoneNumberToCallDisplay: string | null | undefined;
|
|
27
|
+
loadStatus: PhoneNumberLoadStatus;
|
|
28
|
+
change: PhoneNumberChange;
|
|
29
|
+
/** Why the last read, save or removal failed, as a sentence to show; `null` after a success. */
|
|
30
|
+
error: string | null;
|
|
31
|
+
/**
|
|
32
|
+
* Saves the member's own number as typed: the backend reads a number without `+` as a US number.
|
|
33
|
+
* Resolves how it ended; `error` holds the sentence to show when it did not save.
|
|
34
|
+
*/
|
|
35
|
+
save: (typedPhoneNumber: string) => Promise<PhoneNumberSaveOutcome>;
|
|
36
|
+
/** Removes the member's number. Resolves `true` once it is gone. */
|
|
37
|
+
remove: () => Promise<boolean>;
|
|
38
|
+
reload: () => void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The signed-in member's own phone number, read from `GET {prefix}/me/phone-number` on mount and
|
|
42
|
+
* changed through `PUT` and `DELETE`. Calls from the saved number reach the member's
|
|
43
|
+
* assistant. A read that answers after a newer one, or after unmount, is dropped.
|
|
44
|
+
*/
|
|
45
|
+
export declare function usePhoneNumber(): PhoneNumberControls;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
+
import { describePhoneNumberError } from "./describePhoneNumberError.js";
|
|
3
|
+
import { VoiceApiError } from "./VoiceApiError.js";
|
|
4
|
+
import { deleteOwnPhoneNumber, getOwnPhoneNumber, putOwnPhoneNumber } from "./voiceConversationsApi.js";
|
|
5
|
+
/** The backend's refusals that are about the typed number itself. */
|
|
6
|
+
const NUMBER_REFUSAL_CODES = new Set([
|
|
7
|
+
"phone_number_not_e164",
|
|
8
|
+
"phone_number_held_by_another_member",
|
|
9
|
+
]);
|
|
10
|
+
/**
|
|
11
|
+
* The signed-in member's own phone number, read from `GET {prefix}/me/phone-number` on mount and
|
|
12
|
+
* changed through `PUT` and `DELETE`. Calls from the saved number reach the member's
|
|
13
|
+
* assistant. A read that answers after a newer one, or after unmount, is dropped.
|
|
14
|
+
*/
|
|
15
|
+
export function usePhoneNumber() {
|
|
16
|
+
const [answer, setAnswer] = useState(undefined);
|
|
17
|
+
const [loadStatus, setLoadStatus] = useState("loading");
|
|
18
|
+
const [change, setChange] = useState("none");
|
|
19
|
+
const [error, setError] = useState(null);
|
|
20
|
+
const latestRequest = useRef(0);
|
|
21
|
+
const mounted = useRef(true);
|
|
22
|
+
/**
|
|
23
|
+
* Reads the saved number. `keep_error` is for the re-read after a failed change: the change's
|
|
24
|
+
* refusal stays shown, and only the number and load status are refreshed.
|
|
25
|
+
*/
|
|
26
|
+
const readSavedPhoneNumber = useCallback((errorHandling) => {
|
|
27
|
+
const request = ++latestRequest.current;
|
|
28
|
+
setLoadStatus("loading");
|
|
29
|
+
getOwnPhoneNumber().then((saved) => {
|
|
30
|
+
if (!mounted.current || request !== latestRequest.current)
|
|
31
|
+
return;
|
|
32
|
+
setAnswer(saved);
|
|
33
|
+
setLoadStatus("ready");
|
|
34
|
+
if (errorHandling === "clear_error")
|
|
35
|
+
setError(null);
|
|
36
|
+
}, (failure) => {
|
|
37
|
+
if (!mounted.current || request !== latestRequest.current)
|
|
38
|
+
return;
|
|
39
|
+
setLoadStatus("load_failed");
|
|
40
|
+
if (errorHandling === "clear_error")
|
|
41
|
+
setError(describePhoneNumberError(failure));
|
|
42
|
+
});
|
|
43
|
+
}, []);
|
|
44
|
+
const reload = useCallback(() => readSavedPhoneNumber("clear_error"), [readSavedPhoneNumber]);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
mounted.current = true;
|
|
47
|
+
reload();
|
|
48
|
+
return () => {
|
|
49
|
+
mounted.current = false;
|
|
50
|
+
};
|
|
51
|
+
}, [reload]);
|
|
52
|
+
const latestChange = useRef(0);
|
|
53
|
+
const earlierChangesSettled = useRef(Promise.resolve());
|
|
54
|
+
/**
|
|
55
|
+
* Runs one save or removal. Changes are sent one at a time, in the order asked for, so the
|
|
56
|
+
* backend saves them in that order and the newest change's answer is what it kept. Only the
|
|
57
|
+
* newest request (read or change) may set the number, and only the newest change may set the
|
|
58
|
+
* error or end `change`, so an earlier reply never overwrites a newer one or clears the flag
|
|
59
|
+
* while a later change is still under way.
|
|
60
|
+
*/
|
|
61
|
+
const sendChange = useCallback(async (kind, send, updateAnswer) => {
|
|
62
|
+
const request = ++latestRequest.current;
|
|
63
|
+
const changeRequest = ++latestChange.current;
|
|
64
|
+
const isNewestChange = () => mounted.current && changeRequest === latestChange.current;
|
|
65
|
+
setChange(kind);
|
|
66
|
+
const sent = earlierChangesSettled.current.then(send);
|
|
67
|
+
earlierChangesSettled.current = sent.then(() => undefined, () => undefined);
|
|
68
|
+
try {
|
|
69
|
+
const answered = await sent;
|
|
70
|
+
if (mounted.current && request === latestRequest.current) {
|
|
71
|
+
setAnswer((previous) => updateAnswer(answered, previous));
|
|
72
|
+
setLoadStatus("ready");
|
|
73
|
+
// A reload sent after this change owns the error: its failure must stay shown.
|
|
74
|
+
if (isNewestChange())
|
|
75
|
+
setError(null);
|
|
76
|
+
}
|
|
77
|
+
return { sent: answered };
|
|
78
|
+
}
|
|
79
|
+
catch (failure) {
|
|
80
|
+
if (isNewestChange())
|
|
81
|
+
setError(describePhoneNumberError(failure));
|
|
82
|
+
// This change superseded any read under way, so read again: the number on screen
|
|
83
|
+
// must not stay unknown (or stale) because a refused change dropped that read.
|
|
84
|
+
if (mounted.current && request === latestRequest.current)
|
|
85
|
+
readSavedPhoneNumber("keep_error");
|
|
86
|
+
return { failure };
|
|
87
|
+
}
|
|
88
|
+
finally {
|
|
89
|
+
if (isNewestChange())
|
|
90
|
+
setChange("none");
|
|
91
|
+
}
|
|
92
|
+
}, [readSavedPhoneNumber]);
|
|
93
|
+
const save = useCallback(async (typedPhoneNumber) => {
|
|
94
|
+
const saved = await sendChange("saving", () => putOwnPhoneNumber(typedPhoneNumber), (answered) => answered);
|
|
95
|
+
if ("sent" in saved) {
|
|
96
|
+
// `PUT` answers the saved number; `null` there is no save, whatever the status said.
|
|
97
|
+
const phoneNumber = saved.sent.phone_number;
|
|
98
|
+
return phoneNumber === null ? { outcome: "failed" } : { outcome: "saved", phoneNumber };
|
|
99
|
+
}
|
|
100
|
+
const numberRefused = saved.failure instanceof VoiceApiError &&
|
|
101
|
+
saved.failure.code !== null &&
|
|
102
|
+
NUMBER_REFUSAL_CODES.has(saved.failure.code);
|
|
103
|
+
return { outcome: numberRefused ? "number_refused" : "failed" };
|
|
104
|
+
}, [sendChange]);
|
|
105
|
+
const remove = useCallback(async () => "sent" in
|
|
106
|
+
(await sendChange("removing", deleteOwnPhoneNumber, (_removed, previous) => ({
|
|
107
|
+
// The removal answers no body: the number to call is the last one read.
|
|
108
|
+
phone_number: null,
|
|
109
|
+
phone_number_display: null,
|
|
110
|
+
phone_number_to_call: previous?.phone_number_to_call ?? null,
|
|
111
|
+
phone_number_to_call_display: previous?.phone_number_to_call_display ?? null,
|
|
112
|
+
}))), [sendChange]);
|
|
113
|
+
return {
|
|
114
|
+
phoneNumber: answer?.phone_number,
|
|
115
|
+
phoneNumberDisplay: answer?.phone_number_display,
|
|
116
|
+
phoneNumberToCall: answer?.phone_number_to_call,
|
|
117
|
+
phoneNumberToCallDisplay: answer?.phone_number_to_call_display,
|
|
118
|
+
loadStatus,
|
|
119
|
+
change,
|
|
120
|
+
error,
|
|
121
|
+
save,
|
|
122
|
+
remove,
|
|
123
|
+
reload,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type * as Generated from "./generated/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* The voice-conversations member routes' request and response bodies, projected from the types
|
|
4
|
+
* generated from the backend package's OpenAPI (`src/generated`, `pnpm generate:api-types`), so
|
|
5
|
+
* the Pydantic models are the one place they are defined. Only the `CallId` brand is added here. Wire names stay
|
|
6
|
+
* snake_case so a fixture written by the backend tests reads unchanged.
|
|
7
|
+
*/
|
|
8
|
+
declare const callIdBrand: unique symbol;
|
|
9
|
+
/** A `calls` row id from the backend; never the OpenAI session id. Produced only by the parsers. */
|
|
10
|
+
export type CallId = string & {
|
|
11
|
+
readonly [callIdBrand]: "CallId";
|
|
12
|
+
};
|
|
13
|
+
type WithCallId<Body extends {
|
|
14
|
+
call_id: string;
|
|
15
|
+
}> = Omit<Body, "call_id"> & {
|
|
16
|
+
call_id: CallId;
|
|
17
|
+
};
|
|
18
|
+
export type CallStartedThrough = Generated.CurrentCallDetails["started_through"];
|
|
19
|
+
export type CallSpeaker = Generated.CallCaption["speaker"];
|
|
20
|
+
export type CurrentCallStatus = Generated.CurrentCallDetails["status"];
|
|
21
|
+
export type CaptionedCallStatus = Generated.CallCaptionsSoFar["call_status"];
|
|
22
|
+
/**
|
|
23
|
+
* Why a call ended or is ending. `ended_by_member`: End from the app, in any tab or device.
|
|
24
|
+
* `phone_took_over`: a phone call arrived during a browser talk. `time_limit`: the hour cap.
|
|
25
|
+
* `caller_hung_up`: the member hung up the phone. `connection_lost`: the media connection died.
|
|
26
|
+
* `caller_silent`: the voice said goodbye and hung up after the caller stayed silent.
|
|
27
|
+
*/
|
|
28
|
+
export type CallEndReason = NonNullable<Generated.CallCaptionsSoFar["end_reason"]>;
|
|
29
|
+
/**
|
|
30
|
+
* The browser's zone on a browser talk start: its IANA name, or `time_zone_not_reported` when the browser
|
|
31
|
+
* cannot tell. The backend stores it on the call; a call whose browser reported none gets the app's
|
|
32
|
+
* default zone.
|
|
33
|
+
*/
|
|
34
|
+
export type BrowserReportedTimeZone = NonNullable<Generated.StartBrowserTalkRequest["time_zone"]>;
|
|
35
|
+
/** `POST {prefix}/browser-talks` body; this package always sends the browser's zone. */
|
|
36
|
+
export type StartBrowserTalkRequest = Required<Generated.StartBrowserTalkRequest>;
|
|
37
|
+
/** `POST {prefix}/browser-talks` 201 body; `server_now` lets the browser talk clock run in server time. */
|
|
38
|
+
export type BrowserTalkStarted = WithCallId<Generated.BrowserTalkStarted>;
|
|
39
|
+
/** The member's live call in `GET {prefix}/calls/current`. */
|
|
40
|
+
export type CurrentCallDetails = WithCallId<Generated.CurrentCallDetails>;
|
|
41
|
+
/** `GET {prefix}/calls/current` 200 body. */
|
|
42
|
+
export type CurrentCall = Omit<Generated.CurrentCall, "call"> & {
|
|
43
|
+
call: CurrentCallDetails | null;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* One caption: one speaker's consecutive transcript fragments until the other speaker's next one,
|
|
47
|
+
* built by the backend's one caption rule. The last caption keeps growing while the call lasts;
|
|
48
|
+
* `first_fragment_id` stays put as it grows, so it keys the caption.
|
|
49
|
+
*/
|
|
50
|
+
export type CallCaption = Generated.CallCaption;
|
|
51
|
+
/** `GET {prefix}/calls/{call_id}` 200 body: whose call it was, when it started, how long it lasted. */
|
|
52
|
+
export type CallSummary = WithCallId<Generated.CallSummary>;
|
|
53
|
+
/** `GET {prefix}/calls/{call_id}/captions` 200 body: every caption of the call so far. */
|
|
54
|
+
export type CallCaptionsSoFar = Generated.CallCaptionsSoFar;
|
|
55
|
+
type GeneratedVoiceErrorDetail = Generated.VoiceErrorBody["error"];
|
|
56
|
+
/**
|
|
57
|
+
* Every refusal the package itself, or a passed-through provider 4xx, sends, projected from the
|
|
58
|
+
* generated body. `code` widens to a string so hooks built against an older backend still read a
|
|
59
|
+
* code a newer one added, and `call_id`, present only on a refusal about one call, takes the brand.
|
|
60
|
+
*/
|
|
61
|
+
export interface VoiceErrorBody {
|
|
62
|
+
error: Omit<GeneratedVoiceErrorDetail, "code" | "call_id"> & {
|
|
63
|
+
code: string;
|
|
64
|
+
call_id?: CallId;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/** `GET` and `PUT {prefix}/me/phone-number` 200 body: the member's saved number, or null. */
|
|
68
|
+
export type MemberPhoneNumber = Generated.MemberPhoneNumber;
|
|
69
|
+
/** Whether the person accepted their project invite; a pending invitee's number counts at once. */
|
|
70
|
+
export type CountedInviteStatus = Generated.AdminAddedPhoneNumber["invite_status"];
|
|
71
|
+
/** `POST {prefix}/admin/phone-numbers` 200 body: what an admin saved, and for whom. */
|
|
72
|
+
export type AdminAddedPhoneNumber = Generated.AdminAddedPhoneNumber;
|
|
73
|
+
/** One member's saved number in `GET {prefix}/admin/phone-numbers`. */
|
|
74
|
+
export type AdminListedPhoneNumber = Generated.AdminListedPhoneNumber;
|
|
75
|
+
/** `GET {prefix}/admin/phone-numbers` 200 body: one page, in member user id order. */
|
|
76
|
+
export type AdminPhoneNumbersPage = Generated.AdminPhoneNumbersPage;
|
|
77
|
+
/** Why one uploaded row was not saved; the person's earlier number, if any, is kept. */
|
|
78
|
+
export type UploadedPhoneNumberRefusalReason = Generated.UploadedPhoneNumberRefused["reason"];
|
|
79
|
+
export type UploadedPhoneNumberAdded = Generated.UploadedPhoneNumberAdded;
|
|
80
|
+
export type UploadedPhoneNumberRefused = Generated.UploadedPhoneNumberRefused;
|
|
81
|
+
/** Every kind of row the report holds, read from the generated report, so a new kind reaches the parser's checks. */
|
|
82
|
+
export type UploadedPhoneNumberRow = Generated.PhoneNumberUploadReport["rows"][number];
|
|
83
|
+
/** `POST {prefix}/admin/phone-numbers/csv` 200 body: one result per row, in file order. */
|
|
84
|
+
export type PhoneNumberUploadReport = Generated.PhoneNumberUploadReport;
|
|
85
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|