nixamp 0.77.2 → 0.78.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/backtoschool/dist/assets/{ar-Cj5WpObc.js → ar-CYu0byMf.js} +1 -1
- package/backtoschool/dist/assets/{cs-DOYgXvWh.js → cs-BTTM7DeB.js} +1 -1
- package/backtoschool/dist/assets/{da-CmgimT0P.js → da-iixezQtd.js} +1 -1
- package/backtoschool/dist/assets/{de-D_AUWuE3.js → de-Sx3acevR.js} +1 -1
- package/backtoschool/dist/assets/{es-B4QfiG7X.js → es-ByCnw8ja.js} +1 -1
- package/backtoschool/dist/assets/{fi-Clf9SZn5.js → fi-BCeFoeH5.js} +1 -1
- package/backtoschool/dist/assets/{fr-DpLIxvgd.js → fr-Nz5hMzAE.js} +1 -1
- package/backtoschool/dist/assets/{hi-a9HR1j7t.js → hi-x5-IG1rl.js} +1 -1
- package/backtoschool/dist/assets/hls-CydbS6hn.js +42 -0
- package/backtoschool/dist/assets/hls-OR5FY6YP-O3qhTXm4.js +1 -0
- package/backtoschool/dist/assets/{hu-CXw_ATKN.js → hu-QqIkGcMe.js} +1 -1
- package/backtoschool/dist/assets/{id-B8GHWT99.js → id-OVwO1Uoi.js} +1 -1
- package/backtoschool/dist/assets/index-Dgqs6yM_.js +112 -0
- package/backtoschool/dist/assets/{it-D8K-Cjn9.js → it-CmssY5Ut.js} +1 -1
- package/backtoschool/dist/assets/mpegts-RQlLEU1A.js +3 -0
- package/backtoschool/dist/assets/mpegts-Y2FARLFE-y49QH7a5.js +1 -0
- package/backtoschool/dist/assets/{nl-BTHM_tIM.js → nl-VkQxlPku.js} +1 -1
- package/backtoschool/dist/assets/{ru-cwqVc7z_.js → ru-Dk8FAbDx.js} +1 -1
- package/backtoschool/dist/assets/{sv-De7KSFg-.js → sv-CNs1UySx.js} +1 -1
- package/backtoschool/dist/assets/{uk-COyId2km.js → uk-BDB1YayY.js} +1 -1
- package/backtoschool/dist/assets/{vi-3djg7AGj.js → vi-DnEIKzy7.js} +1 -1
- package/backtoschool/dist/assets/{zh-DNAab67I.js → zh-B_atHA4S.js} +1 -1
- package/backtoschool/dist/index.html +1 -1
- package/dist/ai-label.js +368 -0
- package/dist/partyline.d.ts +41 -201
- package/dist/partyline.js +65 -601
- package/package.json +13 -12
- package/src/ai-label.ts +368 -0
- package/src/partyline.ts +88 -671
- package/web/dist/assets/{ar-D11SvZiO.js → ar-Dt4ftL7_.js} +1 -1
- package/web/dist/assets/background.worker-F49brs4A.js +547 -0
- package/web/dist/assets/chunk-55GBNX64-BDcCEJUP.js +1 -0
- package/web/dist/assets/client-D7waX8NA.js +1 -0
- package/web/dist/assets/{cs-C9A8mi2r.js → cs-D7U7SQMd.js} +1 -1
- package/web/dist/assets/{da-CIp_Ajuh.js → da-BcJX_2kR.js} +1 -1
- package/web/dist/assets/{de-5HI3ODDg.js → de-rl_x2VZN.js} +1 -1
- package/web/dist/assets/{es-B7jsPXIF.js → es-BGrhKZQz.js} +1 -1
- package/web/dist/assets/{fi-CDifgjAY.js → fi-CY2dfbr_.js} +1 -1
- package/web/dist/assets/{fr-CWCMwXQf.js → fr-BJkwpR_P.js} +1 -1
- package/web/dist/assets/{hi-D9A8GEcr.js → hi-BrJHlcBX.js} +1 -1
- package/web/dist/assets/hls-CydbS6hn.js +42 -0
- package/web/dist/assets/hls-OR5FY6YP-_WOdANsC.js +1 -0
- package/web/dist/assets/{hu-BQnB41QA.js → hu-BULQmmjT.js} +1 -1
- package/web/dist/assets/{id-BiRd7S38.js → id-Dzh3ujB1.js} +1 -1
- package/web/dist/assets/{it-Qyw9ho6m.js → it-CexE1NXI.js} +1 -1
- package/web/dist/assets/main-CsEDH18x.js +26 -0
- package/web/dist/assets/mpegts-CL9RC5Ls.js +3 -0
- package/web/dist/assets/mpegts-Y2FARLFE-C91SD8Pl.js +1 -0
- package/web/dist/assets/music-ByEeUk4Z.js +1 -0
- package/web/dist/assets/{nl-BO3ykanC.js → nl-BPpsDvjT.js} +1 -1
- package/web/dist/assets/radio-BnQ78a-O.js +1 -0
- package/web/dist/assets/{ru-EoEoXLPn.js → ru-CmYwwWDR.js} +1 -1
- package/web/dist/assets/{station-UibBpdBh.js → station-C_6L4CDU.js} +2 -2
- package/web/dist/assets/{sv-BzFjGhqA.js → sv-DnY0WiF0.js} +1 -1
- package/web/dist/assets/{uk-DMWjHo-5.js → uk-Cm0pAuQa.js} +1 -1
- package/web/dist/assets/{vi-DlSMYqgm.js → vi-CgKu2IlV.js} +1 -1
- package/web/dist/assets/{vod-CkR6hzN7.js → vod-CbSC5NFA.js} +1 -1
- package/web/dist/assets/{watch-BO-wMY8T.js → watch-D-ZRxfJ_.js} +1 -1
- package/web/dist/assets/{zh-cB0Zpdge.js → zh-DOa77AtL.js} +1 -1
- package/web/dist/index.html +5 -5
- package/web/dist/music.html +2 -2
- package/web/dist/radio.html +3 -3
- package/web/dist/station.html +3 -3
- package/web/dist/sw.js +32 -32
- package/web/dist/vod.html +3 -3
- package/web/dist/watch.html +3 -3
- package/backtoschool/dist/assets/hls-OR5FY6YP-nOjNFW0f.js +0 -1
- package/backtoschool/dist/assets/hls-n74Cnh8A.js +0 -42
- package/backtoschool/dist/assets/index-BPJoeY65.js +0 -112
- package/backtoschool/dist/assets/mpegts-7CN75AI2-cUtR703j.js +0 -1
- package/backtoschool/dist/assets/mpegts-CixmcUbS.js +0 -3
- package/web/dist/assets/background.worker-Hz7oaQ8X.js +0 -547
- package/web/dist/assets/chunk-Q2XQMA4B-OBCD3Aev.js +0 -1
- package/web/dist/assets/client-B_mfdrFh.js +0 -1
- package/web/dist/assets/hls-OR5FY6YP-B2RNEz5K.js +0 -1
- package/web/dist/assets/hls-n74Cnh8A.js +0 -42
- package/web/dist/assets/main-D4Tyu9aM.js +0 -26
- package/web/dist/assets/mpegts-7CN75AI2-1Qj6py7N.js +0 -1
- package/web/dist/assets/mpegts-BcF3gJrf.js +0 -3
- package/web/dist/assets/music-Day-DtFd.js +0 -1
- package/web/dist/assets/radio-Dx44o-ug.js +0 -1
- /package/web/dist/assets/{chunk-Q2XQMA4B-DR1XNWCJ.css → chunk-55GBNX64-DR1XNWCJ.css} +0 -0
package/dist/partyline.d.ts
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
/**
|
|
2
|
+
* The party line.
|
|
3
|
+
*
|
|
4
|
+
* A phone number, a six-digit code, and everybody who keyed the same code
|
|
5
|
+
* talking to each other. You call 408-357-2326, key 482917, and you are on the
|
|
6
|
+
* line with whoever else keyed 482917.
|
|
7
|
+
*
|
|
8
|
+
* The phone half -- answering, asking for the code on the keypad, the voices,
|
|
9
|
+
* Telnyx conferences and their four-hour expiry, who is in which room -- is
|
|
10
|
+
* @profullstack/group-call, which started life as this file and is shared with
|
|
11
|
+
* group.call.pit.world. What stays here is what a code means to nixamp: a code
|
|
12
|
+
* that belongs to a live stream is that stream's room, a code whose stream has
|
|
13
|
+
* ended offers a text for when it is back, and anything else is an ordinary
|
|
14
|
+
* room nobody had to create first.
|
|
15
|
+
*/
|
|
16
|
+
import { GroupCall, peopleHere, sameSecret, spokenCode, telnyxSms, type RoomInfo, type Sms, type TelnyxEvent } from "@profullstack/group-call";
|
|
17
|
+
export { peopleHere, sameSecret, spokenCode, telnyxSms };
|
|
18
|
+
export type { RoomInfo, Sms, TelnyxEvent };
|
|
19
|
+
/**
|
|
20
|
+
* How long a room code is.
|
|
21
|
+
*
|
|
22
|
+
* Six digits, because the code has to survive being read down a phone line and
|
|
23
|
+
* typed into a URL. A room code is something you tell somebody, so it has to
|
|
24
|
+
* be short enough to hold in your head between hearing it and dialling it.
|
|
25
|
+
*/
|
|
26
|
+
export declare const CODE_LENGTH = 6;
|
|
27
|
+
/** A six-digit room code from whatever the caller keyed, or "". */
|
|
28
|
+
export declare function roomCodeFrom(entered: unknown): string;
|
|
10
29
|
/**
|
|
11
30
|
* What the party line needs to know about a stream.
|
|
12
31
|
*
|
|
@@ -29,10 +48,6 @@ export interface StreamLookup {
|
|
|
29
48
|
endedAt: number;
|
|
30
49
|
} | undefined;
|
|
31
50
|
}
|
|
32
|
-
/** Sending a text. Injected because the number that sends is not this one. */
|
|
33
|
-
export interface Sms {
|
|
34
|
-
send(to: string, text: string): Promise<boolean>;
|
|
35
|
-
}
|
|
36
51
|
export interface PartyLineOptions {
|
|
37
52
|
/** A Telnyx API key with call-control rights. */
|
|
38
53
|
apiKey: string;
|
|
@@ -43,15 +58,10 @@ export interface PartyLineOptions {
|
|
|
43
58
|
*
|
|
44
59
|
* Not from the toll-free number the call arrived on: toll-free A2P messaging
|
|
45
60
|
* is filtered by carriers until the number is verified, and ours is not. A
|
|
46
|
-
* long code that already has a messaging profile sends today
|
|
47
|
-
* go out from there and the verification can land whenever it lands.
|
|
61
|
+
* long code that already has a messaging profile sends today.
|
|
48
62
|
*/
|
|
49
63
|
sms?: Sms;
|
|
50
|
-
/**
|
|
51
|
-
* The account's ed25519 public key, base64, from the portal. Without it
|
|
52
|
-
* every webhook is refused: an unauthenticated call-control webhook lets a
|
|
53
|
-
* stranger drive calls we are paying for.
|
|
54
|
-
*/
|
|
64
|
+
/** The account's ed25519 public key, base64, from the portal. */
|
|
55
65
|
publicKey: string;
|
|
56
66
|
/** What the caller hears before being asked for a room. */
|
|
57
67
|
greeting?: string;
|
|
@@ -65,28 +75,6 @@ export interface PartyLineOptions {
|
|
|
65
75
|
fetch?: typeof globalThis.fetch;
|
|
66
76
|
onEvent?: (message: string) => void;
|
|
67
77
|
}
|
|
68
|
-
/**
|
|
69
|
-
* How long a room code is.
|
|
70
|
-
*
|
|
71
|
-
* Six digits, because the code has to survive being read down a phone line and
|
|
72
|
-
* typed into a URL. The generated ids this replaces were long enough that
|
|
73
|
-
* nobody could say one out loud, which is the whole failure being fixed: a
|
|
74
|
-
* room code is something you tell somebody, so it has to be short enough to
|
|
75
|
-
* hold in your head between hearing it and dialling it.
|
|
76
|
-
*/
|
|
77
|
-
export declare const CODE_LENGTH = 6;
|
|
78
|
-
/**
|
|
79
|
-
* A room code, from whatever the caller keyed.
|
|
80
|
-
*
|
|
81
|
-
* Digits only, and exactly six of them. Five is not a near miss to be
|
|
82
|
-
* charitable about -- it is a different room, and guessing which one they
|
|
83
|
-
* meant would drop somebody into a stranger's conversation.
|
|
84
|
-
*
|
|
85
|
-
* Nothing here is case-sensitive because nothing here has a case. That is the
|
|
86
|
-
* point of digits over letters: a phone keypad has one way to type a 4, and no
|
|
87
|
-
* two people disagree about how to say it.
|
|
88
|
-
*/
|
|
89
|
-
export declare function roomCodeFrom(entered: unknown): string;
|
|
90
78
|
/**
|
|
91
79
|
* A time as a caller should hear it.
|
|
92
80
|
*
|
|
@@ -97,49 +85,19 @@ export declare function roomCodeFrom(entered: unknown): string;
|
|
|
97
85
|
* weeks every spring.
|
|
98
86
|
*/
|
|
99
87
|
export declare function pacificTime(at: number): string;
|
|
100
|
-
/** How a code is read back: one digit at a time, because 482917 is not a number. */
|
|
101
|
-
export declare function spokenCode(code: string): string;
|
|
102
88
|
/**
|
|
103
89
|
* A track's name as it should be read out.
|
|
104
90
|
*
|
|
105
91
|
* What is playing is a filename more often than a title: "02 - ...And Justice
|
|
106
92
|
* For All.mp3" read aloud is "zero two dash dot dot dot", and the extension is
|
|
107
|
-
* a noise the caller does not need.
|
|
108
|
-
* is left is close enough to a title to say.
|
|
93
|
+
* a noise the caller does not need.
|
|
109
94
|
*/
|
|
110
95
|
export declare function spokenTitle(nowPlaying: string): string;
|
|
111
96
|
/**
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* The count includes them: "there are 3 people in here" is what you say to the
|
|
115
|
-
* third person, and "you are the first one here" is what you say to the first,
|
|
116
|
-
* who would otherwise be told there is one person in an empty room.
|
|
117
|
-
*/
|
|
118
|
-
export declare function peopleHere(callers: number): string;
|
|
119
|
-
export interface TelnyxEvent {
|
|
120
|
-
event_type?: string;
|
|
121
|
-
payload?: Record<string, unknown>;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* The party line, as a thing that answers webhooks.
|
|
125
|
-
*
|
|
126
|
-
* It owns no socket and no timer. The server hands it a verified event and it
|
|
127
|
-
* issues whatever call-control commands that event calls for, which makes the
|
|
128
|
-
* whole state machine testable with a fetch that records what it was asked.
|
|
97
|
+
* The party line, as a thing that answers webhooks: a group call whose codes
|
|
98
|
+
* can also be streams.
|
|
129
99
|
*/
|
|
130
|
-
export declare class PartyLine {
|
|
131
|
-
private readonly options;
|
|
132
|
-
private readonly rooms;
|
|
133
|
-
/** Which room a leg is heading for, between asking and being answered. */
|
|
134
|
-
private readonly legRoom;
|
|
135
|
-
/** The number each caller is calling from, for a reminder they ask for. */
|
|
136
|
-
private readonly legFrom;
|
|
137
|
-
/** Legs that heard "press 1", and which stream they would be reminded about. */
|
|
138
|
-
private readonly pendingReminder;
|
|
139
|
-
/** How many times each leg has been asked for a code, so it is not forever. */
|
|
140
|
-
private readonly asks;
|
|
141
|
-
/** Legs whose voice failed once, which hear the plain one from then on. */
|
|
142
|
-
private readonly plainVoice;
|
|
100
|
+
export declare class PartyLine extends GroupCall {
|
|
143
101
|
/** Who to text when a stream returns, by stream code. */
|
|
144
102
|
private readonly reminders;
|
|
145
103
|
/**
|
|
@@ -150,75 +108,20 @@ export declare class PartyLine {
|
|
|
150
108
|
* break a promise made to somebody on a telephone.
|
|
151
109
|
*/
|
|
152
110
|
private reminderStore;
|
|
111
|
+
private readonly party;
|
|
112
|
+
constructor(options: PartyLineOptions);
|
|
153
113
|
/** Start echoing reminders somewhere durable, and put back what was there. */
|
|
154
114
|
persistRemindersTo(store: {
|
|
155
115
|
add: (code: string, phone: string) => void;
|
|
156
116
|
take: (code: string) => Promise<string[]>;
|
|
157
117
|
}, waiting?: ReadonlyMap<string, ReadonlySet<string>>): void;
|
|
158
|
-
private readonly key;
|
|
159
|
-
private readonly fetch;
|
|
160
|
-
private readonly now;
|
|
161
|
-
constructor(options: PartyLineOptions);
|
|
162
|
-
/** True when this instance can actually check a signature. */
|
|
163
|
-
get armed(): boolean;
|
|
164
|
-
/**
|
|
165
|
-
* Whether a webhook really came from Telnyx.
|
|
166
|
-
*
|
|
167
|
-
* The body has to be the bytes that arrived. Parsing and reserialising JSON
|
|
168
|
-
* changes key order and whitespace, and the signature is over the original.
|
|
169
|
-
*/
|
|
170
|
-
verify(rawBody: string, signature: string | undefined, timestamp: string | undefined): boolean;
|
|
171
|
-
/**
|
|
172
|
-
* The rooms with someone in them, busiest first, with their codes.
|
|
173
|
-
*
|
|
174
|
-
* The code is published on purpose. An earlier version withheld it on the
|
|
175
|
-
* reasoning that a code is the only thing between a stranger and a
|
|
176
|
-
* conversation -- true of a private room, and wrong here: this is a public
|
|
177
|
-
* call-in line, and a listing you cannot dial is a listing of nothing. The
|
|
178
|
-
* code is how you join, so it is what the list is for.
|
|
179
|
-
*/
|
|
180
|
-
list(): {
|
|
181
|
-
code: string;
|
|
182
|
-
callers: number;
|
|
183
|
-
startedAt: number;
|
|
184
|
-
}[];
|
|
185
|
-
/**
|
|
186
|
-
* Drive one call-control event.
|
|
187
|
-
*
|
|
188
|
-
* Every branch returns rather than falling through, because an event we do
|
|
189
|
-
* not handle is the normal case -- Telnyx sends a dozen kinds per call and
|
|
190
|
-
* this cares about four.
|
|
191
|
-
*/
|
|
192
|
-
handle(event: TelnyxEvent): Promise<void>;
|
|
193
|
-
/**
|
|
194
|
-
* Ask for a room code, on the keypad.
|
|
195
|
-
*
|
|
196
|
-
* Not by voice, which is the one thing here that changed its mind. Speech
|
|
197
|
-
* suited a room *name* -- "blue" misheard is still recognisably a word, and
|
|
198
|
-
* a person can say it differently the second time. A six-digit code has no
|
|
199
|
-
* such slack: one digit misheard is a different room that also exists, and
|
|
200
|
-
* the caller lands in a stranger's conversation with nothing to tell them
|
|
201
|
-
* they went wrong. A keypad cannot mishear a 4.
|
|
202
|
-
*
|
|
203
|
-
* Six digits terminates the gather on its own, so the caller does not have
|
|
204
|
-
* to press anything after; # is there for the ones who do it anyway.
|
|
205
|
-
*/
|
|
206
|
-
private ask;
|
|
207
118
|
/**
|
|
208
119
|
* Answer a code that belongs to a stream, rather than a room.
|
|
209
120
|
*
|
|
210
|
-
* Returns false when the code is nobody's stream, which is how an ordinary
|
|
211
|
-
* room code still works: this line was a party line before it was a way into
|
|
212
|
-
* a broadcast, and a code that means nothing to the directory should still
|
|
213
|
-
* mean a room.
|
|
214
|
-
*
|
|
215
121
|
* Keying a stream's code puts you in a room with the other people watching
|
|
216
|
-
* it. It does not play the stream at you
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
* Playing the audio down the phone was both the worse half of the idea and
|
|
220
|
-
* the one that kept failing, because a share link answers a 302 and a cookie
|
|
221
|
-
* rather than an MP3.
|
|
122
|
+
* it. It does not play the stream at you: this is the phone line beside a
|
|
123
|
+
* broadcast, the way a podcast has an 800 number -- the show is on your
|
|
124
|
+
* screen and the phone is where you talk about it.
|
|
222
125
|
*/
|
|
223
126
|
private stream;
|
|
224
127
|
/** Whether the caller took the reminder that was offered. */
|
|
@@ -237,77 +140,14 @@ export declare class PartyLine {
|
|
|
237
140
|
}): Promise<number>;
|
|
238
141
|
/** How many numbers are waiting to hear that a code is live. */
|
|
239
142
|
waitingOn(code: string): number;
|
|
240
|
-
/**
|
|
241
|
-
* Put a leg into a room, making the conference if it is the first one there.
|
|
242
|
-
*
|
|
243
|
-
* `welcome` is what the caller hears once they are in, before the count of
|
|
244
|
-
* who else is; a stream's room names the stream, an ordinary room reads its
|
|
245
|
-
* code back.
|
|
246
|
-
*/
|
|
247
|
-
private join;
|
|
248
|
-
private enter;
|
|
249
|
-
/**
|
|
250
|
-
* Say hello to somebody who just joined, and only to them.
|
|
251
|
-
*
|
|
252
|
-
* Spoken into the conference rather than at the leg, because the leg is in
|
|
253
|
-
* the conference now and a speak on it is what the join interrupts. Telnyx
|
|
254
|
-
* addresses conference speech to particular participants, so the others in
|
|
255
|
-
* the room do not hear every arrival welcomed.
|
|
256
|
-
*/
|
|
257
|
-
private greet;
|
|
258
143
|
/**
|
|
259
144
|
* A line said into a room, to everybody on the phone in it. What the
|
|
260
145
|
* trollbox becomes on the party line: the handle and the words, in the
|
|
261
|
-
* voice of whoever typed them.
|
|
262
|
-
* which is most of the time and costs nothing.
|
|
146
|
+
* voice of whoever typed them.
|
|
263
147
|
*/
|
|
264
148
|
say(code: string, text: string, voice: string, settings?: {
|
|
265
149
|
api_key_ref: string;
|
|
266
150
|
}): Promise<boolean>;
|
|
267
|
-
/**
|
|
268
|
-
hasCallers(code: string): boolean;
|
|
269
|
-
/**
|
|
270
|
-
* How many people are on the phone for a stream.
|
|
271
|
-
*
|
|
272
|
-
* The room's own count, now that a stream's code is a room like any other.
|
|
273
|
-
* It used to count legs with an MP3 playing into them, which is a thing that
|
|
274
|
-
* no longer happens.
|
|
275
|
-
*/
|
|
151
|
+
/** How many people are on the phone for a stream: the room's own count. */
|
|
276
152
|
listenersOn(code: string): number;
|
|
277
|
-
/** A leg that hung up or was dropped, wherever it was. */
|
|
278
|
-
private release;
|
|
279
|
-
/**
|
|
280
|
-
* The room on this code, made if nobody is using it.
|
|
281
|
-
*
|
|
282
|
-
* Entering a code nobody is in opens that room rather than failing. The code
|
|
283
|
-
* is a rendezvous, not a credential: two people who agree on 482917
|
|
284
|
-
* beforehand should both be able to dial in, and neither of them should have
|
|
285
|
-
* had to create it first.
|
|
286
|
-
*/
|
|
287
|
-
private room;
|
|
288
|
-
private get voice();
|
|
289
|
-
/** The voice for this leg: the good one, unless it has already failed them. */
|
|
290
|
-
private voiceFor;
|
|
291
|
-
private get maxParticipants();
|
|
292
|
-
/** One call-control command. True when Telnyx accepted it. */
|
|
293
|
-
private command;
|
|
294
|
-
/** A POST to Telnyx, or null if it did not work. */
|
|
295
|
-
private request;
|
|
296
153
|
}
|
|
297
|
-
/**
|
|
298
|
-
* Texting, over Telnyx.
|
|
299
|
-
*
|
|
300
|
-
* A separate `from` because it is a different number: the call arrives on the
|
|
301
|
-
* toll-free line, but toll-free A2P messaging is filtered by carriers until
|
|
302
|
-
* that number is verified and ours is not yet. The long code already carries a
|
|
303
|
-
* messaging profile, so it can send today -- and when verification lands, this
|
|
304
|
-
* becomes a one-line change rather than a redesign.
|
|
305
|
-
*/
|
|
306
|
-
export declare function telnyxSms({ apiKey, from, fetch, onEvent }: {
|
|
307
|
-
apiKey: string;
|
|
308
|
-
from: string;
|
|
309
|
-
fetch?: typeof globalThis.fetch;
|
|
310
|
-
onEvent?: (message: string) => void;
|
|
311
|
-
}): Sms;
|
|
312
|
-
/** Constant-time compare, for the places a token is checked rather than signed. */
|
|
313
|
-
export declare function sameSecret(a: string, b: string): boolean;
|