skapi-js 2.2.11 → 2.2.13

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/skapi.d.mts CHANGED
@@ -20,36 +20,93 @@ type RTCIceOption = string | Array<{
20
20
  username?: string;
21
21
  credential?: string;
22
22
  }>;
23
+ /**
24
+ * What a local track is. The SDK names the tracks it captures itself ('camera', 'microphone',
25
+ * 'screen'); a stream or track the app passes is 'custom' unless the app names it in share().
26
+ * The other side reads the name on its 'track' event, as `source`.
27
+ */
28
+ type RTCMediaSource = 'camera' | 'microphone' | 'screen' | 'custom' | (string & {});
29
+ /** Screen capture: true, or the options of getDisplayMedia() plus a contentHint for the video track. */
30
+ type RTCScreenOption = boolean | (DisplayMediaStreamOptions & {
31
+ contentHint?: 'text' | 'detail' | 'motion';
32
+ });
33
+ /**
34
+ * The media a side sends. A MediaStream is sent as it is. An object names what the SDK should
35
+ * capture: `audio` and `video` are passed to getUserMedia() (a boolean or track constraints),
36
+ * `screen` to getDisplayMedia(). Omitted, or everything false, sends no media.
37
+ */
38
+ type RTCMediaOption = MediaStream | (MediaStreamConstraints & {
39
+ screen?: RTCScreenOption;
40
+ });
41
+ /** Codec order and sender limits, applied to every track of the kind, now and when one is added later. */
42
+ type RTCEncodingOption = {
43
+ video?: {
44
+ codecs?: string[];
45
+ maxBitrate?: number;
46
+ maxFramerate?: number;
47
+ scaleResolutionDownBy?: number;
48
+ };
49
+ audio?: {
50
+ codecs?: string[];
51
+ maxBitrate?: number;
52
+ };
53
+ };
54
+ /** A data channel to open: a preset name, or RTCDataChannelInit with `protocol` as its label. */
55
+ type RTCChannelOption = RTCDataChannelInit | 'default' | 'text-chat' | 'file-transfer' | 'video-chat' | 'voice-chat' | 'gaming';
23
56
  type RTCReceiverParams = {
24
57
  ice?: RTCIceOption;
25
- media?: {
26
- video: boolean;
27
- audio: boolean;
28
- } | MediaStream | MediaStreamConstraints;
58
+ icePolicy?: 'all' | 'relay';
59
+ media?: RTCMediaOption;
60
+ receive?: {
61
+ audio?: boolean;
62
+ video?: boolean;
63
+ };
64
+ encoding?: RTCEncodingOption;
65
+ channels?: RTCChannelOption[];
29
66
  };
30
- type RTCConnectorParams = {
67
+ type RTCConnectorParams = RTCReceiverParams & {
31
68
  cid: string;
32
- ice?: RTCIceOption;
33
- media?: {
34
- video: boolean;
35
- audio: boolean;
36
- } | MediaStream | MediaStreamConstraints;
37
- channels?: Array<RTCDataChannelInit | 'text-chat' | 'file-transfer' | 'video-chat' | 'voice-chat' | 'gaming'>;
69
+ meta?: Record<string, any>;
70
+ ringTimeout?: number;
38
71
  };
39
72
  type RTCConnector = {
40
73
  hangup: () => void;
41
74
  connection: Promise<RTCResolved>;
42
75
  };
76
+ /** Options of share(): for 'screen' the getDisplayMedia() options plus contentHint, for 'camera' and 'microphone' the track constraints, for a stream or track of your own `source`, its name on the other side. */
77
+ type RTCShareOptions = {
78
+ [key: string]: any;
79
+ contentHint?: 'text' | 'detail' | 'motion';
80
+ source?: string;
81
+ };
43
82
  type RTCResolved = {
83
+ cid: string;
44
84
  target: RTCPeerConnection;
45
85
  channels: {
46
86
  [protocol: string]: RTCDataChannel;
47
87
  };
48
88
  hangup: () => void;
49
89
  media: MediaStream;
90
+ meta: Record<string, any>;
91
+ /** Local tracks, all of them or those of one source. */
92
+ tracks: (source?: RTCMediaSource) => MediaStreamTrack[];
93
+ /** Adds the screen, the camera, the microphone, or a stream or track of your own to the call, and resolves with the tracks added. The other side gets them on its 'track' event. */
94
+ share: (what: 'screen' | 'camera' | 'microphone' | MediaStream | MediaStreamTrack, options?: RTCShareOptions) => Promise<MediaStreamTrack[]>;
95
+ /** Takes the tracks of a source, or one track, off the call and stops them. */
96
+ unshare: (what: RTCMediaSource | MediaStreamTrack) => void;
97
+ /** Swaps a track for another of the same kind without a new negotiation: a camera switch, a new microphone. The old track is stopped. */
98
+ replace: (what: RTCMediaSource | MediaStreamTrack, track: MediaStreamTrack) => Promise<void>;
99
+ /** Pauses or resumes what is sent: `audio` the microphone, `video` the camera and other video, `screen` the screen. true pauses, false resumes, omitted leaves it. */
100
+ mute: (what: {
101
+ audio?: boolean;
102
+ video?: boolean;
103
+ screen?: boolean;
104
+ }) => void;
105
+ /** Opens a data channel during the call. */
106
+ addChannel: (protocol: string, init?: RTCDataChannelInit) => RTCDataChannel;
50
107
  };
51
108
  type RTCEvent = {
52
- type: 'track' | 'connectionstatechange' | 'close' | 'message' | 'open' | 'bufferedamountlow' | 'error' | 'icecandidate' | 'icecandidateend' | 'icegatheringstatechange' | 'negotiationneeded' | 'signalingstatechange';
109
+ type: 'track' | 'trackmute' | 'trackunmute' | 'trackended' | 'unshare' | 'connectionstatechange' | 'close' | 'message' | 'open' | 'bufferedamountlow' | 'error' | 'icecandidate' | 'icecandidateend' | 'icecandidateerror' | 'iceconnectionstatechange' | 'icegatheringstatechange' | 'negotiationneeded' | 'signalingstatechange' | 'ringtimeout';
53
110
  [key: string]: any;
54
111
  };
55
112
  type WebSocketMessage = {
@@ -57,6 +114,8 @@ type WebSocketMessage = {
57
114
  message?: any;
58
115
  connectRTC?: (params: RTCReceiverParams, callback: (e: RTCEvent) => void) => Promise<RTCResolved>;
59
116
  hangup?: () => void;
117
+ meta?: Record<string, any>;
118
+ sources?: string[];
60
119
  sender?: string;
61
120
  sender_cid?: string;
62
121
  sender_rid?: string;
@@ -1238,6 +1297,8 @@ type Ticket = {
1238
1297
  updated?: number;
1239
1298
  condition?: TicketCondition;
1240
1299
  actions?: TicketAction[];
1300
+ /** false while the ticket is switched off: it answers TICKET_DISABLED and its queued runs are skipped. */
1301
+ enabled?: boolean;
1241
1302
  /**
1242
1303
  * true on a ticket saved before this release (the dashboard marks it "previous rules"). It
1243
1304
  * keeps running by the rules it was saved with until it is registered again, which applies
@@ -1309,12 +1370,18 @@ type Types_PostRecordConfig = PostRecordConfig;
1309
1370
  type Types_PostRecordsItem = PostRecordsItem;
1310
1371
  type Types_PostRecordsResult = PostRecordsResult;
1311
1372
  type Types_ProgressCallback = ProgressCallback;
1373
+ type Types_RTCChannelOption = RTCChannelOption;
1312
1374
  type Types_RTCConnector = RTCConnector;
1313
1375
  type Types_RTCConnectorParams = RTCConnectorParams;
1376
+ type Types_RTCEncodingOption = RTCEncodingOption;
1314
1377
  type Types_RTCEvent = RTCEvent;
1315
1378
  type Types_RTCIceOption = RTCIceOption;
1379
+ type Types_RTCMediaOption = RTCMediaOption;
1380
+ type Types_RTCMediaSource = RTCMediaSource;
1316
1381
  type Types_RTCReceiverParams = RTCReceiverParams;
1317
1382
  type Types_RTCResolved = RTCResolved;
1383
+ type Types_RTCScreenOption = RTCScreenOption;
1384
+ type Types_RTCShareOptions = RTCShareOptions;
1318
1385
  type Types_RealtimeCallback = RealtimeCallback;
1319
1386
  type Types_RecordData = RecordData;
1320
1387
  type Types_RecordEncryptionInfo = RecordEncryptionInfo;
@@ -1341,7 +1408,7 @@ type Types_UserPublic = UserPublic;
1341
1408
  type Types_UserVisibilityFlag = UserVisibilityFlag;
1342
1409
  type Types_WebSocketMessage = WebSocketMessage;
1343
1410
  declare namespace Types {
1344
- export type { Types_BinaryFile as BinaryFile, Types_Condition as Condition, Types_Connection as Connection, Types_ConnectionInfo as ConnectionInfo, Types_DatabaseResponse as DatabaseResponse, Types_DelRecordQuery as DelRecordQuery, Types_EncryptionOptions as EncryptionOptions, Types_FetchOptions as FetchOptions, Types_FileInfo as FileInfo, Types_FileUploadError as FileUploadError, Types_Form as Form, Types_GetRecordQuery as GetRecordQuery, Types_Index as Index, Types_Newsletter as Newsletter, Types_NewsletterGroup as NewsletterGroup, Types_PostRecordConfig as PostRecordConfig, Types_PostRecordsItem as PostRecordsItem, Types_PostRecordsResult as PostRecordsResult, Types_ProgressCallback as ProgressCallback, Types_RTCConnector as RTCConnector, Types_RTCConnectorParams as RTCConnectorParams, Types_RTCEvent as RTCEvent, Types_RTCIceOption as RTCIceOption, Types_RTCReceiverParams as RTCReceiverParams, Types_RTCResolved as RTCResolved, Types_RealtimeCallback as RealtimeCallback, Types_RecordData as RecordData, Types_RecordEncryptionInfo as RecordEncryptionInfo, Types_RequestHistory as RequestHistory, Types_Subscription as Subscription, Types_Table as Table, Types_Tag as Tag, Types_Ticket as Ticket, Types_TicketAction as TicketAction, Types_TicketCondition as TicketCondition, Types_TicketConditionOperator as TicketConditionOperator, Types_TicketConditionRow as TicketConditionRow, Types_TicketError as TicketError, Types_TicketErrorCode as TicketErrorCode, Types_TicketReceipt as TicketReceipt, Types_TicketResponseCondition as TicketResponseCondition, Types_TicketSignatureCondition as TicketSignatureCondition, Types_UniqueId as UniqueId, Types_UploadFilesParams as UploadFilesParams, Types_UploadFilesResult as UploadFilesResult, Types_UserAttributes as UserAttributes, Types_UserProfile as UserProfile, Types_UserPublic as UserPublic, Types_UserVisibilityFlag as UserVisibilityFlag, Types_WebSocketMessage as WebSocketMessage };
1411
+ export type { Types_BinaryFile as BinaryFile, Types_Condition as Condition, Types_Connection as Connection, Types_ConnectionInfo as ConnectionInfo, Types_DatabaseResponse as DatabaseResponse, Types_DelRecordQuery as DelRecordQuery, Types_EncryptionOptions as EncryptionOptions, Types_FetchOptions as FetchOptions, Types_FileInfo as FileInfo, Types_FileUploadError as FileUploadError, Types_Form as Form, Types_GetRecordQuery as GetRecordQuery, Types_Index as Index, Types_Newsletter as Newsletter, Types_NewsletterGroup as NewsletterGroup, Types_PostRecordConfig as PostRecordConfig, Types_PostRecordsItem as PostRecordsItem, Types_PostRecordsResult as PostRecordsResult, Types_ProgressCallback as ProgressCallback, Types_RTCChannelOption as RTCChannelOption, Types_RTCConnector as RTCConnector, Types_RTCConnectorParams as RTCConnectorParams, Types_RTCEncodingOption as RTCEncodingOption, Types_RTCEvent as RTCEvent, Types_RTCIceOption as RTCIceOption, Types_RTCMediaOption as RTCMediaOption, Types_RTCMediaSource as RTCMediaSource, Types_RTCReceiverParams as RTCReceiverParams, Types_RTCResolved as RTCResolved, Types_RTCScreenOption as RTCScreenOption, Types_RTCShareOptions as RTCShareOptions, Types_RealtimeCallback as RealtimeCallback, Types_RecordData as RecordData, Types_RecordEncryptionInfo as RecordEncryptionInfo, Types_RequestHistory as RequestHistory, Types_Subscription as Subscription, Types_Table as Table, Types_Tag as Tag, Types_Ticket as Ticket, Types_TicketAction as TicketAction, Types_TicketCondition as TicketCondition, Types_TicketConditionOperator as TicketConditionOperator, Types_TicketConditionRow as TicketConditionRow, Types_TicketError as TicketError, Types_TicketErrorCode as TicketErrorCode, Types_TicketReceipt as TicketReceipt, Types_TicketResponseCondition as TicketResponseCondition, Types_TicketSignatureCondition as TicketSignatureCondition, Types_UniqueId as UniqueId, Types_UploadFilesParams as UploadFilesParams, Types_UploadFilesResult as UploadFilesResult, Types_UserAttributes as UserAttributes, Types_UserProfile as UserProfile, Types_UserPublic as UserPublic, Types_UserVisibilityFlag as UserVisibilityFlag, Types_WebSocketMessage as WebSocketMessage };
1345
1412
  }
1346
1413
 
1347
1414
  declare function terminatePendingRequests(): void;
@@ -1434,7 +1501,6 @@ declare class Skapi {
1434
1501
  private __uniqueIdsPersistTimer;
1435
1502
  private userPool;
1436
1503
  private __socket;
1437
- private __mediaStream;
1438
1504
  private host;
1439
1505
  private hostDomain;
1440
1506
  private target_cdn;
@@ -1526,6 +1592,7 @@ declare class Skapi {
1526
1592
  private _updateConnection;
1527
1593
  private registerTicket;
1528
1594
  private unregisterTicket;
1595
+ private updateTicket;
1529
1596
  /**
1530
1597
  * Returns the current SDK version and prints runtime version details in browser environments.
1531
1598
  * @returns A promise that resolves to Promise<string>.
@@ -1551,7 +1618,11 @@ declare class Skapi {
1551
1618
  close_all?: boolean;
1552
1619
  }): Promise<void>;
1553
1620
  /**
1554
- * Creates or joins a WebRTC session and returns an RTC connector for streaming events and controls.
1621
+ * Calls another user over WebRTC: the camera and microphone, the screen, a stream of your own, data channels, or any mix of them.
1622
+ * `media` names what to send (`{ audio, video, screen }`, or a MediaStream), `receive` what to take without sending, `channels` the data channels to open,
1623
+ * `meta` a small JSON object the other side reads on its `rtc:incoming` message, `ringTimeout` how long to wait for an answer.
1624
+ * Resolves with an RTCConnector whose `connection` resolves, once the other side answers, with the running call: its peer connection, channels, local media,
1625
+ * and the controls `share()`, `unshare()`, `replace()`, `mute()` and `addChannel()`.
1555
1626
  * @param params Request parameters.
1556
1627
  * @param callback Callback invoked for events or updates.
1557
1628
  * @returns A promise that resolves to Promise<RTCConnector>.
@@ -3260,4 +3331,4 @@ declare class Skapi {
3260
3331
  bulkPostRecords(config: PostRecordConfig[]): Promise<RecordData[]>;
3261
3332
  }
3262
3333
 
3263
- export { type BinaryFile, type Condition, type Connection, type ConnectionInfo, type DatabaseResponse, type DelRecordQuery, type FetchOptions, type FileInfo, type FileUploadError, type Form, type GetRecordQuery, type Index, type Newsletter, type NewsletterGroup, type PostRecordConfig, type ProgressCallback, type RTCConnector, type RTCConnectorParams, type RTCEvent, type RTCReceiverParams, type RTCResolved, type RealtimeCallback, type RecordData, Skapi, SkapiError, type Subscription, type Table, type Tag, type Ticket, type TicketAction, type TicketCondition, type TicketConditionOperator, type TicketConditionRow, type TicketError, type TicketErrorCode, type TicketReceipt, type TicketResponseCondition, type TicketSignatureCondition, Types, type UniqueId, type UploadFilesParams, type UploadFilesResult, type UserAttributes, type UserProfile, type UserPublic, type WebSocketMessage };
3334
+ export { type BinaryFile, type Condition, type Connection, type ConnectionInfo, type DatabaseResponse, type DelRecordQuery, type FetchOptions, type FileInfo, type FileUploadError, type Form, type GetRecordQuery, type Index, type Newsletter, type NewsletterGroup, type PostRecordConfig, type ProgressCallback, type RTCChannelOption, type RTCConnector, type RTCConnectorParams, type RTCEncodingOption, type RTCEvent, type RTCIceOption, type RTCMediaOption, type RTCMediaSource, type RTCReceiverParams, type RTCResolved, type RTCScreenOption, type RTCShareOptions, type RealtimeCallback, type RecordData, Skapi, SkapiError, type Subscription, type Table, type Tag, type Ticket, type TicketAction, type TicketCondition, type TicketConditionOperator, type TicketConditionRow, type TicketError, type TicketErrorCode, type TicketReceipt, type TicketResponseCondition, type TicketSignatureCondition, Types, type UniqueId, type UploadFilesParams, type UploadFilesResult, type UserAttributes, type UserProfile, type UserPublic, type WebSocketMessage };
package/dist/skapi.d.ts CHANGED
@@ -20,36 +20,93 @@ type RTCIceOption = string | Array<{
20
20
  username?: string;
21
21
  credential?: string;
22
22
  }>;
23
+ /**
24
+ * What a local track is. The SDK names the tracks it captures itself ('camera', 'microphone',
25
+ * 'screen'); a stream or track the app passes is 'custom' unless the app names it in share().
26
+ * The other side reads the name on its 'track' event, as `source`.
27
+ */
28
+ type RTCMediaSource = 'camera' | 'microphone' | 'screen' | 'custom' | (string & {});
29
+ /** Screen capture: true, or the options of getDisplayMedia() plus a contentHint for the video track. */
30
+ type RTCScreenOption = boolean | (DisplayMediaStreamOptions & {
31
+ contentHint?: 'text' | 'detail' | 'motion';
32
+ });
33
+ /**
34
+ * The media a side sends. A MediaStream is sent as it is. An object names what the SDK should
35
+ * capture: `audio` and `video` are passed to getUserMedia() (a boolean or track constraints),
36
+ * `screen` to getDisplayMedia(). Omitted, or everything false, sends no media.
37
+ */
38
+ type RTCMediaOption = MediaStream | (MediaStreamConstraints & {
39
+ screen?: RTCScreenOption;
40
+ });
41
+ /** Codec order and sender limits, applied to every track of the kind, now and when one is added later. */
42
+ type RTCEncodingOption = {
43
+ video?: {
44
+ codecs?: string[];
45
+ maxBitrate?: number;
46
+ maxFramerate?: number;
47
+ scaleResolutionDownBy?: number;
48
+ };
49
+ audio?: {
50
+ codecs?: string[];
51
+ maxBitrate?: number;
52
+ };
53
+ };
54
+ /** A data channel to open: a preset name, or RTCDataChannelInit with `protocol` as its label. */
55
+ type RTCChannelOption = RTCDataChannelInit | 'default' | 'text-chat' | 'file-transfer' | 'video-chat' | 'voice-chat' | 'gaming';
23
56
  type RTCReceiverParams = {
24
57
  ice?: RTCIceOption;
25
- media?: {
26
- video: boolean;
27
- audio: boolean;
28
- } | MediaStream | MediaStreamConstraints;
58
+ icePolicy?: 'all' | 'relay';
59
+ media?: RTCMediaOption;
60
+ receive?: {
61
+ audio?: boolean;
62
+ video?: boolean;
63
+ };
64
+ encoding?: RTCEncodingOption;
65
+ channels?: RTCChannelOption[];
29
66
  };
30
- type RTCConnectorParams = {
67
+ type RTCConnectorParams = RTCReceiverParams & {
31
68
  cid: string;
32
- ice?: RTCIceOption;
33
- media?: {
34
- video: boolean;
35
- audio: boolean;
36
- } | MediaStream | MediaStreamConstraints;
37
- channels?: Array<RTCDataChannelInit | 'text-chat' | 'file-transfer' | 'video-chat' | 'voice-chat' | 'gaming'>;
69
+ meta?: Record<string, any>;
70
+ ringTimeout?: number;
38
71
  };
39
72
  type RTCConnector = {
40
73
  hangup: () => void;
41
74
  connection: Promise<RTCResolved>;
42
75
  };
76
+ /** Options of share(): for 'screen' the getDisplayMedia() options plus contentHint, for 'camera' and 'microphone' the track constraints, for a stream or track of your own `source`, its name on the other side. */
77
+ type RTCShareOptions = {
78
+ [key: string]: any;
79
+ contentHint?: 'text' | 'detail' | 'motion';
80
+ source?: string;
81
+ };
43
82
  type RTCResolved = {
83
+ cid: string;
44
84
  target: RTCPeerConnection;
45
85
  channels: {
46
86
  [protocol: string]: RTCDataChannel;
47
87
  };
48
88
  hangup: () => void;
49
89
  media: MediaStream;
90
+ meta: Record<string, any>;
91
+ /** Local tracks, all of them or those of one source. */
92
+ tracks: (source?: RTCMediaSource) => MediaStreamTrack[];
93
+ /** Adds the screen, the camera, the microphone, or a stream or track of your own to the call, and resolves with the tracks added. The other side gets them on its 'track' event. */
94
+ share: (what: 'screen' | 'camera' | 'microphone' | MediaStream | MediaStreamTrack, options?: RTCShareOptions) => Promise<MediaStreamTrack[]>;
95
+ /** Takes the tracks of a source, or one track, off the call and stops them. */
96
+ unshare: (what: RTCMediaSource | MediaStreamTrack) => void;
97
+ /** Swaps a track for another of the same kind without a new negotiation: a camera switch, a new microphone. The old track is stopped. */
98
+ replace: (what: RTCMediaSource | MediaStreamTrack, track: MediaStreamTrack) => Promise<void>;
99
+ /** Pauses or resumes what is sent: `audio` the microphone, `video` the camera and other video, `screen` the screen. true pauses, false resumes, omitted leaves it. */
100
+ mute: (what: {
101
+ audio?: boolean;
102
+ video?: boolean;
103
+ screen?: boolean;
104
+ }) => void;
105
+ /** Opens a data channel during the call. */
106
+ addChannel: (protocol: string, init?: RTCDataChannelInit) => RTCDataChannel;
50
107
  };
51
108
  type RTCEvent = {
52
- type: 'track' | 'connectionstatechange' | 'close' | 'message' | 'open' | 'bufferedamountlow' | 'error' | 'icecandidate' | 'icecandidateend' | 'icegatheringstatechange' | 'negotiationneeded' | 'signalingstatechange';
109
+ type: 'track' | 'trackmute' | 'trackunmute' | 'trackended' | 'unshare' | 'connectionstatechange' | 'close' | 'message' | 'open' | 'bufferedamountlow' | 'error' | 'icecandidate' | 'icecandidateend' | 'icecandidateerror' | 'iceconnectionstatechange' | 'icegatheringstatechange' | 'negotiationneeded' | 'signalingstatechange' | 'ringtimeout';
53
110
  [key: string]: any;
54
111
  };
55
112
  type WebSocketMessage = {
@@ -57,6 +114,8 @@ type WebSocketMessage = {
57
114
  message?: any;
58
115
  connectRTC?: (params: RTCReceiverParams, callback: (e: RTCEvent) => void) => Promise<RTCResolved>;
59
116
  hangup?: () => void;
117
+ meta?: Record<string, any>;
118
+ sources?: string[];
60
119
  sender?: string;
61
120
  sender_cid?: string;
62
121
  sender_rid?: string;
@@ -1238,6 +1297,8 @@ type Ticket = {
1238
1297
  updated?: number;
1239
1298
  condition?: TicketCondition;
1240
1299
  actions?: TicketAction[];
1300
+ /** false while the ticket is switched off: it answers TICKET_DISABLED and its queued runs are skipped. */
1301
+ enabled?: boolean;
1241
1302
  /**
1242
1303
  * true on a ticket saved before this release (the dashboard marks it "previous rules"). It
1243
1304
  * keeps running by the rules it was saved with until it is registered again, which applies
@@ -1309,12 +1370,18 @@ type Types_PostRecordConfig = PostRecordConfig;
1309
1370
  type Types_PostRecordsItem = PostRecordsItem;
1310
1371
  type Types_PostRecordsResult = PostRecordsResult;
1311
1372
  type Types_ProgressCallback = ProgressCallback;
1373
+ type Types_RTCChannelOption = RTCChannelOption;
1312
1374
  type Types_RTCConnector = RTCConnector;
1313
1375
  type Types_RTCConnectorParams = RTCConnectorParams;
1376
+ type Types_RTCEncodingOption = RTCEncodingOption;
1314
1377
  type Types_RTCEvent = RTCEvent;
1315
1378
  type Types_RTCIceOption = RTCIceOption;
1379
+ type Types_RTCMediaOption = RTCMediaOption;
1380
+ type Types_RTCMediaSource = RTCMediaSource;
1316
1381
  type Types_RTCReceiverParams = RTCReceiverParams;
1317
1382
  type Types_RTCResolved = RTCResolved;
1383
+ type Types_RTCScreenOption = RTCScreenOption;
1384
+ type Types_RTCShareOptions = RTCShareOptions;
1318
1385
  type Types_RealtimeCallback = RealtimeCallback;
1319
1386
  type Types_RecordData = RecordData;
1320
1387
  type Types_RecordEncryptionInfo = RecordEncryptionInfo;
@@ -1341,7 +1408,7 @@ type Types_UserPublic = UserPublic;
1341
1408
  type Types_UserVisibilityFlag = UserVisibilityFlag;
1342
1409
  type Types_WebSocketMessage = WebSocketMessage;
1343
1410
  declare namespace Types {
1344
- export type { Types_BinaryFile as BinaryFile, Types_Condition as Condition, Types_Connection as Connection, Types_ConnectionInfo as ConnectionInfo, Types_DatabaseResponse as DatabaseResponse, Types_DelRecordQuery as DelRecordQuery, Types_EncryptionOptions as EncryptionOptions, Types_FetchOptions as FetchOptions, Types_FileInfo as FileInfo, Types_FileUploadError as FileUploadError, Types_Form as Form, Types_GetRecordQuery as GetRecordQuery, Types_Index as Index, Types_Newsletter as Newsletter, Types_NewsletterGroup as NewsletterGroup, Types_PostRecordConfig as PostRecordConfig, Types_PostRecordsItem as PostRecordsItem, Types_PostRecordsResult as PostRecordsResult, Types_ProgressCallback as ProgressCallback, Types_RTCConnector as RTCConnector, Types_RTCConnectorParams as RTCConnectorParams, Types_RTCEvent as RTCEvent, Types_RTCIceOption as RTCIceOption, Types_RTCReceiverParams as RTCReceiverParams, Types_RTCResolved as RTCResolved, Types_RealtimeCallback as RealtimeCallback, Types_RecordData as RecordData, Types_RecordEncryptionInfo as RecordEncryptionInfo, Types_RequestHistory as RequestHistory, Types_Subscription as Subscription, Types_Table as Table, Types_Tag as Tag, Types_Ticket as Ticket, Types_TicketAction as TicketAction, Types_TicketCondition as TicketCondition, Types_TicketConditionOperator as TicketConditionOperator, Types_TicketConditionRow as TicketConditionRow, Types_TicketError as TicketError, Types_TicketErrorCode as TicketErrorCode, Types_TicketReceipt as TicketReceipt, Types_TicketResponseCondition as TicketResponseCondition, Types_TicketSignatureCondition as TicketSignatureCondition, Types_UniqueId as UniqueId, Types_UploadFilesParams as UploadFilesParams, Types_UploadFilesResult as UploadFilesResult, Types_UserAttributes as UserAttributes, Types_UserProfile as UserProfile, Types_UserPublic as UserPublic, Types_UserVisibilityFlag as UserVisibilityFlag, Types_WebSocketMessage as WebSocketMessage };
1411
+ export type { Types_BinaryFile as BinaryFile, Types_Condition as Condition, Types_Connection as Connection, Types_ConnectionInfo as ConnectionInfo, Types_DatabaseResponse as DatabaseResponse, Types_DelRecordQuery as DelRecordQuery, Types_EncryptionOptions as EncryptionOptions, Types_FetchOptions as FetchOptions, Types_FileInfo as FileInfo, Types_FileUploadError as FileUploadError, Types_Form as Form, Types_GetRecordQuery as GetRecordQuery, Types_Index as Index, Types_Newsletter as Newsletter, Types_NewsletterGroup as NewsletterGroup, Types_PostRecordConfig as PostRecordConfig, Types_PostRecordsItem as PostRecordsItem, Types_PostRecordsResult as PostRecordsResult, Types_ProgressCallback as ProgressCallback, Types_RTCChannelOption as RTCChannelOption, Types_RTCConnector as RTCConnector, Types_RTCConnectorParams as RTCConnectorParams, Types_RTCEncodingOption as RTCEncodingOption, Types_RTCEvent as RTCEvent, Types_RTCIceOption as RTCIceOption, Types_RTCMediaOption as RTCMediaOption, Types_RTCMediaSource as RTCMediaSource, Types_RTCReceiverParams as RTCReceiverParams, Types_RTCResolved as RTCResolved, Types_RTCScreenOption as RTCScreenOption, Types_RTCShareOptions as RTCShareOptions, Types_RealtimeCallback as RealtimeCallback, Types_RecordData as RecordData, Types_RecordEncryptionInfo as RecordEncryptionInfo, Types_RequestHistory as RequestHistory, Types_Subscription as Subscription, Types_Table as Table, Types_Tag as Tag, Types_Ticket as Ticket, Types_TicketAction as TicketAction, Types_TicketCondition as TicketCondition, Types_TicketConditionOperator as TicketConditionOperator, Types_TicketConditionRow as TicketConditionRow, Types_TicketError as TicketError, Types_TicketErrorCode as TicketErrorCode, Types_TicketReceipt as TicketReceipt, Types_TicketResponseCondition as TicketResponseCondition, Types_TicketSignatureCondition as TicketSignatureCondition, Types_UniqueId as UniqueId, Types_UploadFilesParams as UploadFilesParams, Types_UploadFilesResult as UploadFilesResult, Types_UserAttributes as UserAttributes, Types_UserProfile as UserProfile, Types_UserPublic as UserPublic, Types_UserVisibilityFlag as UserVisibilityFlag, Types_WebSocketMessage as WebSocketMessage };
1345
1412
  }
1346
1413
 
1347
1414
  declare function terminatePendingRequests(): void;
@@ -1434,7 +1501,6 @@ declare class Skapi {
1434
1501
  private __uniqueIdsPersistTimer;
1435
1502
  private userPool;
1436
1503
  private __socket;
1437
- private __mediaStream;
1438
1504
  private host;
1439
1505
  private hostDomain;
1440
1506
  private target_cdn;
@@ -1526,6 +1592,7 @@ declare class Skapi {
1526
1592
  private _updateConnection;
1527
1593
  private registerTicket;
1528
1594
  private unregisterTicket;
1595
+ private updateTicket;
1529
1596
  /**
1530
1597
  * Returns the current SDK version and prints runtime version details in browser environments.
1531
1598
  * @returns A promise that resolves to Promise<string>.
@@ -1551,7 +1618,11 @@ declare class Skapi {
1551
1618
  close_all?: boolean;
1552
1619
  }): Promise<void>;
1553
1620
  /**
1554
- * Creates or joins a WebRTC session and returns an RTC connector for streaming events and controls.
1621
+ * Calls another user over WebRTC: the camera and microphone, the screen, a stream of your own, data channels, or any mix of them.
1622
+ * `media` names what to send (`{ audio, video, screen }`, or a MediaStream), `receive` what to take without sending, `channels` the data channels to open,
1623
+ * `meta` a small JSON object the other side reads on its `rtc:incoming` message, `ringTimeout` how long to wait for an answer.
1624
+ * Resolves with an RTCConnector whose `connection` resolves, once the other side answers, with the running call: its peer connection, channels, local media,
1625
+ * and the controls `share()`, `unshare()`, `replace()`, `mute()` and `addChannel()`.
1555
1626
  * @param params Request parameters.
1556
1627
  * @param callback Callback invoked for events or updates.
1557
1628
  * @returns A promise that resolves to Promise<RTCConnector>.
@@ -3260,4 +3331,4 @@ declare class Skapi {
3260
3331
  bulkPostRecords(config: PostRecordConfig[]): Promise<RecordData[]>;
3261
3332
  }
3262
3333
 
3263
- export { type BinaryFile, type Condition, type Connection, type ConnectionInfo, type DatabaseResponse, type DelRecordQuery, type FetchOptions, type FileInfo, type FileUploadError, type Form, type GetRecordQuery, type Index, type Newsletter, type NewsletterGroup, type PostRecordConfig, type ProgressCallback, type RTCConnector, type RTCConnectorParams, type RTCEvent, type RTCReceiverParams, type RTCResolved, type RealtimeCallback, type RecordData, Skapi, SkapiError, type Subscription, type Table, type Tag, type Ticket, type TicketAction, type TicketCondition, type TicketConditionOperator, type TicketConditionRow, type TicketError, type TicketErrorCode, type TicketReceipt, type TicketResponseCondition, type TicketSignatureCondition, Types, type UniqueId, type UploadFilesParams, type UploadFilesResult, type UserAttributes, type UserProfile, type UserPublic, type WebSocketMessage };
3334
+ export { type BinaryFile, type Condition, type Connection, type ConnectionInfo, type DatabaseResponse, type DelRecordQuery, type FetchOptions, type FileInfo, type FileUploadError, type Form, type GetRecordQuery, type Index, type Newsletter, type NewsletterGroup, type PostRecordConfig, type ProgressCallback, type RTCChannelOption, type RTCConnector, type RTCConnectorParams, type RTCEncodingOption, type RTCEvent, type RTCIceOption, type RTCMediaOption, type RTCMediaSource, type RTCReceiverParams, type RTCResolved, type RTCScreenOption, type RTCShareOptions, type RealtimeCallback, type RecordData, Skapi, SkapiError, type Subscription, type Table, type Tag, type Ticket, type TicketAction, type TicketCondition, type TicketConditionOperator, type TicketConditionRow, type TicketError, type TicketErrorCode, type TicketReceipt, type TicketResponseCondition, type TicketSignatureCondition, Types, type UniqueId, type UploadFilesParams, type UploadFilesResult, type UserAttributes, type UserProfile, type UserPublic, type WebSocketMessage };