palbase 0.29.0 → 0.31.0
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/ai/index.js +2 -2
- package/dist/backend/engine.js +2 -2
- package/dist/backend/env.js +1 -1
- package/dist/backend/index.js +3 -3
- package/dist/backend/stack.js +1 -1
- package/dist/backend/test.js +2 -2
- package/dist/chunks/{IQ6QJDM4.js → 2Q7GJQ6Q.js} +2 -2
- package/dist/chunks/{GJPGCOTW.js → 3N3PAQ6I.js} +2 -2
- package/dist/chunks/{EWMPKYBN.js → 7ZJXPGTW.js} +1 -1
- package/dist/chunks/{WNEUGMU4.js → D5KT3Y7I.js} +1 -1
- package/dist/chunks/DIMP746R.js +2 -0
- package/dist/chunks/{3NB2Z2MF.js → FMIHOHLT.js} +1 -1
- package/dist/chunks/{62XTQSVZ.js → I37FMNMJ.js} +2 -2
- package/dist/chunks/{OCZ5XVNP.js → II3T2SUS.js} +1 -1
- package/dist/chunks/{GV63GJ4D.js → IPUAZNBO.js} +2 -2
- package/dist/chunks/{4Q5QXL7S.js → KVBUSRIV.js} +1 -1
- package/dist/chunks/{IYJRPKS2.js → M4QDYWZD.js} +2 -2
- package/dist/chunks/{VCUKXTAR.js → NLTKUCTU.js} +2 -2
- package/dist/chunks/{I5IDPWDM.js → PNZBIPJK.js} +2 -2
- package/dist/chunks/{AMWYOTRD.js → PYZFFIAR.js} +2 -2
- package/dist/chunks/{HC2AGD3N.js → R2MQ64AL.js} +2 -2
- package/dist/chunks/{OLRLJB7H.js → RU3S5TA2.js} +1 -1
- package/dist/chunks/{ZVRYGPBA.js → RZR2OTEP.js} +2 -2
- package/dist/chunks/{A6CGX34F.js → V4IE2JUY.js} +2 -2
- package/dist/chunks/{OAVOR7X5.js → W33FF6LK.js} +1 -1
- package/dist/chunks/Y6DSZS4O.js +22 -0
- package/dist/chunks/{MKLUERPB.js → ZCJW4USW.js} +2 -2
- package/dist/chunks/{66PTYGSE.js → ZGELVBLC.js} +2 -2
- package/dist/chunks/{KN6YJGWP.js → ZPHQTAU2.js} +2 -2
- package/dist/cli.js +101 -101
- package/dist/cloud/index.js +2 -2
- package/dist/refuse/ai.js +1 -1
- package/dist/refuse/backend.js +1 -1
- package/dist/refuse/cloud.js +1 -1
- package/dist/refuse/server.js +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/testing.js +2 -2
- package/dist/web/calls-ui.js +2 -2
- package/dist/web/index.js +2 -2
- package/dist/web/message.js +2 -2
- package/dist/web/palbe.js +2 -2
- package/dist/web/paywall.js +2 -2
- package/dist/web/push-sw.js +1 -1
- package/dist/web/ssr.js +2 -2
- package/dist/web/vite.js +2 -2
- package/package.json +2 -2
- package/types/cloud/src/generated/project.d.ts +1 -1
- package/types/internal/src/modules/calls.d.ts +15 -186
- package/types/internal/src/modules/machines.d.ts +33 -4
- package/types/web/src/calls.d.ts +6 -36
- package/types/web/src/client.d.ts +1 -1
- package/dist/chunks/C2SU644S.js +0 -2
- package/dist/chunks/IOU6E244.js +0 -22
|
@@ -49,10 +49,6 @@ export type Call = {
|
|
|
49
49
|
metadata: {
|
|
50
50
|
[key: string]: string;
|
|
51
51
|
};
|
|
52
|
-
/**
|
|
53
|
-
* Between two devices, or through the media server
|
|
54
|
-
*/
|
|
55
|
-
mode: "p2p" | "sfu";
|
|
56
52
|
/**
|
|
57
53
|
* Its people and bots
|
|
58
54
|
*/
|
|
@@ -102,18 +98,14 @@ export type CallEvent = {
|
|
|
102
98
|
* direct or group
|
|
103
99
|
*/
|
|
104
100
|
kind: string;
|
|
105
|
-
/**
|
|
106
|
-
* p2p or sfu
|
|
107
|
-
*/
|
|
108
|
-
mode: string;
|
|
109
101
|
/**
|
|
110
102
|
* user or bot
|
|
111
103
|
*/
|
|
112
104
|
participant_kind?: string;
|
|
113
105
|
/**
|
|
114
|
-
* The call's room on the media server
|
|
106
|
+
* The call's room on the media server: what an agent's ticket is for
|
|
115
107
|
*/
|
|
116
|
-
room
|
|
108
|
+
room: string;
|
|
117
109
|
/**
|
|
118
110
|
* The call's state
|
|
119
111
|
*/
|
|
@@ -174,10 +166,6 @@ export type CallSettings = {
|
|
|
174
166
|
* How many people (and bots) a call holds
|
|
175
167
|
*/
|
|
176
168
|
max_participants: number;
|
|
177
|
-
/**
|
|
178
|
-
* Every direct call's media goes through the relay
|
|
179
|
-
*/
|
|
180
|
-
relay_all: boolean;
|
|
181
169
|
};
|
|
182
170
|
/**
|
|
183
171
|
* What to change (null hook: none)
|
|
@@ -195,10 +183,6 @@ export type CallSettingsRequest = {
|
|
|
195
183
|
* 2 to 100
|
|
196
184
|
*/
|
|
197
185
|
max_participants?: number;
|
|
198
|
-
/**
|
|
199
|
-
* Relay every direct call
|
|
200
|
-
*/
|
|
201
|
-
relay_all?: boolean;
|
|
202
186
|
};
|
|
203
187
|
/**
|
|
204
188
|
* The device
|
|
@@ -265,40 +249,6 @@ export type HookSettings = {
|
|
|
265
249
|
*/
|
|
266
250
|
url: string;
|
|
267
251
|
};
|
|
268
|
-
/**
|
|
269
|
-
* An ICE candidate
|
|
270
|
-
*/
|
|
271
|
-
export type IceCandidate = {
|
|
272
|
-
/**
|
|
273
|
-
* The candidate line
|
|
274
|
-
*/
|
|
275
|
-
candidate: string;
|
|
276
|
-
/**
|
|
277
|
-
* Its media section's index
|
|
278
|
-
*/
|
|
279
|
-
sdp_m_line_index?: number | null;
|
|
280
|
-
/**
|
|
281
|
-
* Its media section's id
|
|
282
|
-
*/
|
|
283
|
-
sdp_mid?: string | null;
|
|
284
|
-
};
|
|
285
|
-
/**
|
|
286
|
-
* A STUN or TURN server
|
|
287
|
-
*/
|
|
288
|
-
export type IceServer = {
|
|
289
|
-
/**
|
|
290
|
-
* The relay credential
|
|
291
|
-
*/
|
|
292
|
-
credential?: string;
|
|
293
|
-
/**
|
|
294
|
-
* The server's URLs (stun:, turn:, turns:)
|
|
295
|
-
*/
|
|
296
|
-
urls: string[];
|
|
297
|
-
/**
|
|
298
|
-
* The relay credential's name
|
|
299
|
-
*/
|
|
300
|
-
username?: string;
|
|
301
|
-
};
|
|
302
252
|
/**
|
|
303
253
|
* People to ask in
|
|
304
254
|
*/
|
|
@@ -313,50 +263,30 @@ export type InviteRequest = {
|
|
|
313
263
|
user_ids: string[];
|
|
314
264
|
};
|
|
315
265
|
/**
|
|
316
|
-
*
|
|
266
|
+
* A device's way into the call's room on the media server, where every call's media flows — one to one or in a group: its url and the ticket its client connects with
|
|
317
267
|
*/
|
|
318
268
|
export type Media = {
|
|
319
|
-
/**
|
|
320
|
-
* A direct call's ICE servers
|
|
321
|
-
*/
|
|
322
|
-
ice_servers: IceServer[];
|
|
323
|
-
/**
|
|
324
|
-
* relay: every packet through the relay
|
|
325
|
-
*/
|
|
326
|
-
ice_transport_policy: "all" | "relay";
|
|
327
|
-
/**
|
|
328
|
-
* Between the two devices, or through the media server
|
|
329
|
-
*/
|
|
330
|
-
mode: "p2p" | "sfu";
|
|
331
|
-
/**
|
|
332
|
-
* This device makes the offer (the caller's); the other answers it
|
|
333
|
-
*/
|
|
334
|
-
offerer: boolean;
|
|
335
|
-
/**
|
|
336
|
-
* Their device
|
|
337
|
-
*/
|
|
338
|
-
peer_device_id: string | null;
|
|
339
|
-
/**
|
|
340
|
-
* The other person of a direct call
|
|
341
|
-
*/
|
|
342
|
-
peer_user_id: string | null;
|
|
343
269
|
/**
|
|
344
270
|
* The call's room
|
|
345
271
|
*/
|
|
346
|
-
room: string
|
|
272
|
+
room: string;
|
|
347
273
|
/**
|
|
348
274
|
* The ticket into the call's room
|
|
349
275
|
*/
|
|
350
|
-
token: string
|
|
276
|
+
token: string;
|
|
351
277
|
/**
|
|
352
278
|
* The media server's url (wss://)
|
|
353
279
|
*/
|
|
354
|
-
url: string
|
|
280
|
+
url: string;
|
|
355
281
|
};
|
|
356
282
|
/**
|
|
357
283
|
* A person, or a bot, in a call
|
|
358
284
|
*/
|
|
359
285
|
export type Participant = {
|
|
286
|
+
/**
|
|
287
|
+
* What the media server sent them in the call (bytes): what the call is billed by, as its meter told it (up to a minute behind)
|
|
288
|
+
*/
|
|
289
|
+
bytes: number;
|
|
360
290
|
/**
|
|
361
291
|
* The device they are in it on (answered on)
|
|
362
292
|
*/
|
|
@@ -402,80 +332,6 @@ export type Participant = {
|
|
|
402
332
|
*/
|
|
403
333
|
user_id: string;
|
|
404
334
|
};
|
|
405
|
-
/**
|
|
406
|
-
* A signal between a direct call's two devices: an offer or an answer carries its sdp, a candidate its candidate
|
|
407
|
-
*/
|
|
408
|
-
export type Signal = {
|
|
409
|
-
/**
|
|
410
|
-
* The call
|
|
411
|
-
*/
|
|
412
|
-
call_id: string;
|
|
413
|
-
candidate?: IceCandidate;
|
|
414
|
-
/**
|
|
415
|
-
* When it was sent
|
|
416
|
-
*/
|
|
417
|
-
created_at: string;
|
|
418
|
-
/**
|
|
419
|
-
* From which device
|
|
420
|
-
*/
|
|
421
|
-
from_device_id: string;
|
|
422
|
-
/**
|
|
423
|
-
* Who sent it
|
|
424
|
-
*/
|
|
425
|
-
from_user_id: string;
|
|
426
|
-
/**
|
|
427
|
-
* An offer's or an answer's SDP (absent on a candidate or a bye)
|
|
428
|
-
*/
|
|
429
|
-
sdp?: string;
|
|
430
|
-
/**
|
|
431
|
-
* Its place in the call's order
|
|
432
|
-
*/
|
|
433
|
-
seq: number;
|
|
434
|
-
/**
|
|
435
|
-
* For which device
|
|
436
|
-
*/
|
|
437
|
-
to_device_id: string;
|
|
438
|
-
/**
|
|
439
|
-
* What it is
|
|
440
|
-
*/
|
|
441
|
-
type: "offer" | "answer" | "candidate" | "bye";
|
|
442
|
-
};
|
|
443
|
-
/**
|
|
444
|
-
* Signals
|
|
445
|
-
*/
|
|
446
|
-
export type SignalList = {
|
|
447
|
-
/**
|
|
448
|
-
* The signals, in order
|
|
449
|
-
*/
|
|
450
|
-
signals: Signal[];
|
|
451
|
-
};
|
|
452
|
-
/**
|
|
453
|
-
* A signal to the other device
|
|
454
|
-
*/
|
|
455
|
-
export type SignalRequest = {
|
|
456
|
-
candidate?: IceCandidate;
|
|
457
|
-
/**
|
|
458
|
-
* The device sending it
|
|
459
|
-
*/
|
|
460
|
-
device_id: string;
|
|
461
|
-
/**
|
|
462
|
-
* An offer's or an answer's SDP (32 KiB at most)
|
|
463
|
-
*/
|
|
464
|
-
sdp?: string | null;
|
|
465
|
-
/**
|
|
466
|
-
* What it is
|
|
467
|
-
*/
|
|
468
|
-
type: "offer" | "answer" | "candidate" | "bye";
|
|
469
|
-
};
|
|
470
|
-
/**
|
|
471
|
-
* A signal kept
|
|
472
|
-
*/
|
|
473
|
-
export type SignalSent = {
|
|
474
|
-
/**
|
|
475
|
-
* Its place in the call's order
|
|
476
|
-
*/
|
|
477
|
-
seq: number;
|
|
478
|
-
};
|
|
479
335
|
/**
|
|
480
336
|
* A call to make
|
|
481
337
|
*/
|
|
@@ -606,7 +462,7 @@ export declare function client(t: Transport): {
|
|
|
606
462
|
/**
|
|
607
463
|
* Call people
|
|
608
464
|
*
|
|
609
|
-
* Rings one person (a direct call
|
|
465
|
+
* Rings one person (a direct call) or asks several into a group call, from the caller's device; either is a room on the media server, which the caller's device is in from the start (`POST /calls/{call_id}/media`). `ring: false` makes a group call that rings no one: the people asked join it when they like (a huddle). A call to someone who is calling the caller this moment is that call, answered (200). A call to someone in another call — or being rung by one — ends at once, `busy`, and they hear they missed it. Who may be called is the project's: no one who blocked the caller or whom they blocked, no deleted account, a conversation's members alone when it names one (`conversation_id`), and whom the project's hook allows (`calls.can_call`). A call from a conversation is kept in it, as a `call` message.
|
|
610
466
|
*/
|
|
611
467
|
startCall(input: {
|
|
612
468
|
body: StartCallRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
@@ -652,7 +508,7 @@ export declare function client(t: Transport): {
|
|
|
652
508
|
/**
|
|
653
509
|
* Let an agent in
|
|
654
510
|
*
|
|
655
|
-
* Lets the project's agent into the call as a bot: a participant everyone in it hears (and sees), listed as a bot (`kind` bot; on the media server, an agent). The ticket is the media server's url and an access token its open-source client and agent libraries connect with as they are — LiveKit's: the agent receives each person's audio as a track of its own, named by their user id, and publishes its own.
|
|
511
|
+
* Lets the project's agent into the call as a bot: a participant everyone in it hears (and sees), listed as a bot (`kind` bot; on the media server, an agent). The ticket is the media server's url and an access token its open-source client and agent libraries connect with as they are — LiveKit's: the agent receives each person's audio as a track of its own, named by their user id, and publishes its own. What the media server sends it is billed as anyone's; past a Free project's call data no new agent comes in (`429 quota_exceeded`), one in the call already gets its way back in. Palbase runs no agent: transcribing, answering, taking notes are the agent's. The `calls.call.started` and `calls.participant.joined` webhooks are when to send one in.
|
|
656
512
|
*/
|
|
657
513
|
createCallTicket(input: {
|
|
658
514
|
path: {
|
|
@@ -672,7 +528,7 @@ export declare function client(t: Transport): {
|
|
|
672
528
|
/**
|
|
673
529
|
* Set call settings
|
|
674
530
|
*
|
|
675
|
-
* What it names changes: how many people (and bots) a call holds (2 to 100),
|
|
531
|
+
* What it names changes: how many people (and bots) a call holds (2 to 100), how many calls a person may start in an hour, and the hook asked whom one may call (`calls.can_call`; null: none). A hook set for the first time is given its signing secret, here, once.
|
|
676
532
|
*/
|
|
677
533
|
putCallSettings(input: {
|
|
678
534
|
body: CallSettingsRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
@@ -758,7 +614,7 @@ export declare function client(t: Transport): {
|
|
|
758
614
|
/**
|
|
759
615
|
* How the media flows
|
|
760
616
|
*
|
|
761
|
-
*
|
|
617
|
+
* A ticket into the call's room on the platform's media server, where every call's media flows — one to one or in a group — for the device the reader is in the call on: the media server's url, the ticket, the room. What the media server sends the call's people is what the project's calls are billed by.
|
|
762
618
|
*/
|
|
763
619
|
getCallMedia(input: {
|
|
764
620
|
path: {
|
|
@@ -770,7 +626,7 @@ export declare function client(t: Transport): {
|
|
|
770
626
|
/**
|
|
771
627
|
* Ask more people in
|
|
772
628
|
*
|
|
773
|
-
* Asks more people into a call the reader is in, ringing them (or not: `ring: false`). A direct call becomes a group
|
|
629
|
+
* Asks more people into a call the reader is in, ringing them (or not: `ring: false`). A direct call becomes a group, going on in the same room.
|
|
774
630
|
*/
|
|
775
631
|
inviteToCall(input: {
|
|
776
632
|
path: {
|
|
@@ -779,32 +635,5 @@ export declare function client(t: Transport): {
|
|
|
779
635
|
body: InviteRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
780
636
|
signal?: AbortSignal;
|
|
781
637
|
}): Promise<Reply<200, Call>>;
|
|
782
|
-
/**
|
|
783
|
-
* Signals missed
|
|
784
|
-
*
|
|
785
|
-
* The signals for the device after `after` (the last seq it has), in order: what it missed of what was told.
|
|
786
|
-
*/
|
|
787
|
-
listCallSignals(input: {
|
|
788
|
-
path: {
|
|
789
|
-
call_id: string;
|
|
790
|
-
};
|
|
791
|
-
query: {
|
|
792
|
-
device_id: string; /** The last seq the device has (0: from the first) */
|
|
793
|
-
after?: number;
|
|
794
|
-
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
795
|
-
signal?: AbortSignal;
|
|
796
|
-
}): Promise<Reply<200, SignalList>>;
|
|
797
|
-
/**
|
|
798
|
-
* Signal the other device
|
|
799
|
-
*
|
|
800
|
-
* An offer, an answer, a candidate or a goodbye for the other device of a direct call — kept for it, and told to it on its channel (`signal`) as it is sent. Nothing goes before the call is answered: no address leaves a device for someone who did not pick up.
|
|
801
|
-
*/
|
|
802
|
-
sendCallSignal(input: {
|
|
803
|
-
path: {
|
|
804
|
-
call_id: string;
|
|
805
|
-
};
|
|
806
|
-
body: SignalRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
807
|
-
signal?: AbortSignal;
|
|
808
|
-
}): Promise<Reply<202, SignalSent>>;
|
|
809
638
|
};
|
|
810
639
|
export type Client = ReturnType<typeof client>;
|
|
@@ -500,9 +500,9 @@ export type Database = {
|
|
|
500
500
|
*/
|
|
501
501
|
pooled_port: number;
|
|
502
502
|
/**
|
|
503
|
-
* The database's size. free: 0.25 vCPU, 512 MiB, 1 GB, put to sleep when idle (woken by the next connection in about 10 s), awake 400 hours a month at most, archived after a week asleep (its next connection brings it back from its backup); hobby: 0.25 vCPU, 512 MiB, 5 GB, put to sleep when idle, no monthly limit; shared-1g: 1 GiB, up to 1 vCPU, 10 GB; shared-2g: 2 GiB, up to 2 vCPU, 25 GB; shared-4g: 4 GiB, up to 2 vCPU, 50 GB; dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The shared and dedicated sizes never sleep and live on a Premium SSD v2 disk of their own; free and hobby on the platform's SAN. A database past its size's storage turns read-only. What a project's machines and databases reserve between them is held to its limit: a size that does not fit is refused (409 `machines_over_limit`).
|
|
503
|
+
* The database's size. free: 0.25 vCPU, 512 MiB, 1 GB, put to sleep when idle (woken by the next connection in about 10 s), awake 400 hours a month at most, archived after a week asleep (its next connection brings it back from its backup); hobby: 0.25 vCPU, 512 MiB, 5 GB, put to sleep when idle, no monthly limit; shared-1g: 1 GiB, up to 1 vCPU, 10 GB; shared-2g: 2 GiB, up to 2 vCPU, 25 GB; shared-4g: 4 GiB, up to 2 vCPU, 50 GB; dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The shared and dedicated sizes never sleep and live on a Premium SSD v2 disk of their own; free and hobby on the platform's SAN. A database past its size's storage turns read-only. What a project's machines and databases reserve between them is held to its limit: a size that does not fit is refused (409 `machines_over_limit`). preview: a machine's pull request preview's own database — 0.25 vCPU, 512 MiB, 500 MB, put to sleep when idle — opened with its preview and deleted with it; no database is opened at or moved to it.
|
|
504
504
|
*/
|
|
505
|
-
size: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "shared-1g" | "shared-2g" | "shared-4g";
|
|
505
|
+
size: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "preview" | "shared-1g" | "shared-2g" | "shared-4g";
|
|
506
506
|
/**
|
|
507
507
|
* Where its data lives, as its size says: san, the platform's SAN; premium, a Premium SSD v2 disk of its own.
|
|
508
508
|
*/
|
|
@@ -1714,9 +1714,13 @@ export type Preview = {
|
|
|
1714
1714
|
*/
|
|
1715
1715
|
url: string;
|
|
1716
1716
|
/**
|
|
1717
|
-
* authorization_required — a fork's head waiting for an admin of the environment to authorize it (fork protection): nothing of it is built until one does, and each push asks again —, building, ready, failed — or closed: its pull request closed, its address answers no more.
|
|
1717
|
+
* authorization_required — a fork's head waiting for an admin of the environment to authorize it (fork protection): nothing of it is built until one does, and each push asks again —, building, ready, failed, refused — a machine's preview its environment's limits refused at its last push (reason says why): the next push, or previews:open, tries again —, idle — a machine's preview whose pull request had no push for 3 days: its machine and its own database are taken away, and the next push, or previews:open, makes them again — or closed: its pull request closed, its address answers no more.
|
|
1718
|
+
*/
|
|
1719
|
+
state: "authorization_required" | "building" | "ready" | "failed" | "refused" | "idle" | "closed";
|
|
1720
|
+
/**
|
|
1721
|
+
* Why a machine's preview was refused (state refused).
|
|
1718
1722
|
*/
|
|
1719
|
-
|
|
1723
|
+
reason?: string;
|
|
1720
1724
|
/**
|
|
1721
1725
|
* A machine's preview: its own machine, by name.
|
|
1722
1726
|
*/
|
|
@@ -1840,6 +1844,19 @@ export type PreviewAuthorized = {
|
|
|
1840
1844
|
pull_request: number;
|
|
1841
1845
|
commit: string;
|
|
1842
1846
|
};
|
|
1847
|
+
/**
|
|
1848
|
+
* A machine's preview opened again.
|
|
1849
|
+
*/
|
|
1850
|
+
export type PreviewOpened = {
|
|
1851
|
+
/**
|
|
1852
|
+
* The pull request's number.
|
|
1853
|
+
*/
|
|
1854
|
+
pull_request: number;
|
|
1855
|
+
/**
|
|
1856
|
+
* The pull request's head it is built at.
|
|
1857
|
+
*/
|
|
1858
|
+
commit: string;
|
|
1859
|
+
};
|
|
1843
1860
|
/** Palbase Machines */
|
|
1844
1861
|
export declare function client(t: Transport): {
|
|
1845
1862
|
/**
|
|
@@ -2701,5 +2718,17 @@ export declare function client(t: Transport): {
|
|
|
2701
2718
|
body: PreviewAuthorize; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
2702
2719
|
signal?: AbortSignal;
|
|
2703
2720
|
}): Promise<Reply<202, PreviewAuthorized>>;
|
|
2721
|
+
/**
|
|
2722
|
+
* Open a machine's pull request preview again
|
|
2723
|
+
*
|
|
2724
|
+
* Opens a machine's preview of an open pull request again, at the pull request's head: one closed for want of a push (state idle: no push for 3 days, its machine and its own database taken away) or refused at its last push (state refused) is made anew, with a new, empty database of its own when the machine runs its database's migrations. One open goes on as it is, and its 3 days start again. A fork's preview under fork protection opens only at a head an admin authorized (409 preview_waits_authorization); one the environment's limits refuse again answers 409 preview_refused, with why.
|
|
2725
|
+
*/
|
|
2726
|
+
openMachinePreview(input: {
|
|
2727
|
+
path: {
|
|
2728
|
+
name: string; /** The pull request's number. */
|
|
2729
|
+
pull_request: number;
|
|
2730
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
2731
|
+
signal?: AbortSignal;
|
|
2732
|
+
}): Promise<Reply<202, PreviewOpened>>;
|
|
2704
2733
|
};
|
|
2705
2734
|
export type Client = ReturnType<typeof client>;
|
package/types/web/src/calls.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export interface RemoteParticipant {
|
|
|
22
22
|
name: string | null;
|
|
23
23
|
imageUrl: string | null;
|
|
24
24
|
bot: boolean;
|
|
25
|
-
/** Their audio and video: one stream for the whole call,
|
|
25
|
+
/** Their audio and video: one stream for the whole call, the same object while they are in it. */
|
|
26
26
|
stream: MediaStream;
|
|
27
27
|
/** Their microphone is heard. */
|
|
28
28
|
audio: boolean;
|
|
@@ -37,8 +37,6 @@ export interface CallState {
|
|
|
37
37
|
phase: CallPhase;
|
|
38
38
|
/** This person rang (or started the group). */
|
|
39
39
|
outgoing: boolean;
|
|
40
|
-
/** Between the two devices, or through the media server. */
|
|
41
|
-
mode: 'p2p' | 'sfu';
|
|
42
40
|
/** This device's microphone and camera, while it is in the call. */
|
|
43
41
|
local: MediaStream | null;
|
|
44
42
|
microphone: boolean;
|
|
@@ -64,15 +62,13 @@ export interface StartCallOptions {
|
|
|
64
62
|
/** The name and picture shown to those rung; else the caller's messaging profile's. */
|
|
65
63
|
callerName?: string;
|
|
66
64
|
callerImageUrl?: string;
|
|
67
|
-
/** This call's media through the relay alone (CallsOptions.forceRelay, for one call). */
|
|
68
|
-
forceRelay?: boolean;
|
|
69
65
|
/** A microphone (and camera) stream the app opened already; left open when the call ends. */
|
|
70
66
|
media?: MediaStream;
|
|
71
67
|
}
|
|
72
68
|
export interface AnswerOptions {
|
|
73
69
|
/** Send video (the call's own kind unless said): a video call answered by voice, or a voice call with the camera on. */
|
|
74
70
|
video?: boolean;
|
|
75
|
-
|
|
71
|
+
/** A microphone (and camera) stream the app opened already; left open when the call ends. */
|
|
76
72
|
media?: MediaStream;
|
|
77
73
|
}
|
|
78
74
|
export interface HistoryOptions {
|
|
@@ -86,16 +82,10 @@ export interface HistoryOptions {
|
|
|
86
82
|
}
|
|
87
83
|
/** The browser's media, as calls uses it: a test's or a runtime's own. */
|
|
88
84
|
export interface CallsRTC {
|
|
89
|
-
RTCPeerConnection: typeof RTCPeerConnection;
|
|
90
85
|
MediaStream: typeof MediaStream;
|
|
91
86
|
getUserMedia(constraints: MediaStreamConstraints): Promise<MediaStream>;
|
|
92
87
|
}
|
|
93
88
|
export interface CallsOptions {
|
|
94
|
-
/**
|
|
95
|
-
* Every call's media through the relay (iceTransportPolicy relay), never straight between the devices: neither
|
|
96
|
-
* learns the other's address, at the price of a hop. The project's relay_all setting says it for every app.
|
|
97
|
-
*/
|
|
98
|
-
forceRelay?: boolean;
|
|
99
89
|
/** The others' voices play by themselves (true by default): false leaves each RemoteParticipant's stream to the app. */
|
|
100
90
|
playAudio?: boolean;
|
|
101
91
|
}
|
|
@@ -116,28 +106,17 @@ export declare class CallSession {
|
|
|
116
106
|
private phase;
|
|
117
107
|
private endReason;
|
|
118
108
|
private error;
|
|
119
|
-
private relay;
|
|
120
109
|
private local;
|
|
121
110
|
private tracks;
|
|
122
111
|
/** The tracks this device opened, stopped when the call is done with them; an app's own stream is left open. */
|
|
123
112
|
private readonly opened;
|
|
124
113
|
private mic;
|
|
125
114
|
private facing;
|
|
126
|
-
private link;
|
|
127
|
-
private linking;
|
|
128
|
-
private linkState;
|
|
129
|
-
private sdpSent;
|
|
130
|
-
private answered;
|
|
131
|
-
private answer;
|
|
132
|
-
private inbox;
|
|
133
|
-
private lastSeq;
|
|
134
|
-
private readonly seen;
|
|
135
|
-
private readonly sentSeqs;
|
|
136
115
|
private room;
|
|
137
116
|
private joiningRoom;
|
|
138
117
|
private roomState;
|
|
139
118
|
private readonly streams;
|
|
140
|
-
private readonly
|
|
119
|
+
private readonly owners;
|
|
141
120
|
private readonly mutedInRoom;
|
|
142
121
|
private readonly players;
|
|
143
122
|
private sink;
|
|
@@ -156,7 +135,7 @@ export declare class CallSession {
|
|
|
156
135
|
decline(): Promise<void>;
|
|
157
136
|
/** Hangs up (or, while it rings, cancels): a direct call ends for both; a group goes on for the others. */
|
|
158
137
|
leave(): Promise<void>;
|
|
159
|
-
/** Asks more people in (ringing them unless ring is false): a direct call becomes a group, going on. */
|
|
138
|
+
/** Asks more people in (ringing them unless ring is false): a direct call becomes a group, going on in the same room. */
|
|
160
139
|
invite(userIds: string | string[], o?: {
|
|
161
140
|
ring?: boolean;
|
|
162
141
|
}): Promise<void>;
|
|
@@ -178,18 +157,9 @@ export declare class CallSession {
|
|
|
178
157
|
/** This device's microphone (and camera): the app's stream, or opened here. */
|
|
179
158
|
private open;
|
|
180
159
|
private camera;
|
|
181
|
-
/** The camera's track now (null: off)
|
|
160
|
+
/** The camera's track now (null: off): sent to the room in place of the one before. */
|
|
182
161
|
private putVideo;
|
|
183
|
-
|
|
184
|
-
/** Sends a signal once the call is answered (nothing leaves before): an offer or answer in order, candidates after it. */
|
|
185
|
-
private signal;
|
|
186
|
-
private take;
|
|
187
|
-
/** A signal between the last one handled and this one that is neither handled nor this device's own: missed. */
|
|
188
|
-
private gapBefore;
|
|
189
|
-
private fetchSignals;
|
|
190
|
-
private handle;
|
|
191
|
-
/** The connection between the devices is gone: what came through it goes too. */
|
|
192
|
-
private unlink;
|
|
162
|
+
/** Into the call's room with a ticket of this device's: its microphone (and camera) sent there, the others' heard. */
|
|
193
163
|
private toRoom;
|
|
194
164
|
private streamOf;
|
|
195
165
|
private heard;
|
|
@@ -72,7 +72,7 @@ export interface ClientOptions {
|
|
|
72
72
|
language?: string | readonly string[];
|
|
73
73
|
/** What the device keeps of the signed-in person's conversations (pb.messaging): dropped on sign-out unless keepOnSignOut. */
|
|
74
74
|
messaging?: MessagingOptions;
|
|
75
|
-
/** How the signed-in person's calls go (pb.calls):
|
|
75
|
+
/** How the signed-in person's calls go (pb.calls): the others' voices played by themselves (playAudio). */
|
|
76
76
|
calls?: CallsOptions;
|
|
77
77
|
}
|
|
78
78
|
/**
|