skapi-js 2.2.6 → 2.2.8
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.browser.mjs +10 -10
- package/dist/skapi.browser.mjs.map +1 -1
- package/dist/skapi.cjs +9 -9
- package/dist/skapi.cjs.map +1 -1
- package/dist/skapi.d.mts +19 -5
- package/dist/skapi.d.ts +19 -5
- package/dist/skapi.js +10 -10
- package/dist/skapi.js.map +1 -1
- package/dist/skapi.mjs +9 -9
- package/dist/skapi.mjs.map +1 -1
- package/package.json +1 -1
package/dist/skapi.d.mts
CHANGED
|
@@ -10,8 +10,18 @@ declare class SkapiError extends Error {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
type Condition = 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | '>' | '>=' | '<' | '<=' | '=';
|
|
13
|
+
/**
|
|
14
|
+
* ICE servers for a WebRTC connection: one url (default "stun:stun.skapi.com:3468"), or a list of
|
|
15
|
+
* { urls, username?, credential? }. A TURN relay, for users whose network blocks direct
|
|
16
|
+
* connections, goes in the list with its login; keep a STUN entry beside it.
|
|
17
|
+
*/
|
|
18
|
+
type RTCIceOption = string | Array<{
|
|
19
|
+
urls: string | string[];
|
|
20
|
+
username?: string;
|
|
21
|
+
credential?: string;
|
|
22
|
+
}>;
|
|
13
23
|
type RTCReceiverParams = {
|
|
14
|
-
ice?:
|
|
24
|
+
ice?: RTCIceOption;
|
|
15
25
|
media?: {
|
|
16
26
|
video: boolean;
|
|
17
27
|
audio: boolean;
|
|
@@ -19,7 +29,7 @@ type RTCReceiverParams = {
|
|
|
19
29
|
};
|
|
20
30
|
type RTCConnectorParams = {
|
|
21
31
|
cid: string;
|
|
22
|
-
ice?:
|
|
32
|
+
ice?: RTCIceOption;
|
|
23
33
|
media?: {
|
|
24
34
|
video: boolean;
|
|
25
35
|
audio: boolean;
|
|
@@ -333,6 +343,8 @@ type NewsletterGroup = {
|
|
|
333
343
|
*/
|
|
334
344
|
endpoint: string;
|
|
335
345
|
};
|
|
346
|
+
/** The public visibility flags: set when an account is created, the user's own afterwards; never changed by an admin's updateUserAttributes(). */
|
|
347
|
+
type UserVisibilityFlag = 'email_public' | 'phone_number_public' | 'address_public' | 'gender_public' | 'birthdate_public';
|
|
336
348
|
type UserAttributes = {
|
|
337
349
|
/** User's name */
|
|
338
350
|
name?: string;
|
|
@@ -1300,6 +1312,7 @@ type Types_ProgressCallback = ProgressCallback;
|
|
|
1300
1312
|
type Types_RTCConnector = RTCConnector;
|
|
1301
1313
|
type Types_RTCConnectorParams = RTCConnectorParams;
|
|
1302
1314
|
type Types_RTCEvent = RTCEvent;
|
|
1315
|
+
type Types_RTCIceOption = RTCIceOption;
|
|
1303
1316
|
type Types_RTCReceiverParams = RTCReceiverParams;
|
|
1304
1317
|
type Types_RTCResolved = RTCResolved;
|
|
1305
1318
|
type Types_RealtimeCallback = RealtimeCallback;
|
|
@@ -1325,9 +1338,10 @@ type Types_UploadFilesResult = UploadFilesResult;
|
|
|
1325
1338
|
type Types_UserAttributes = UserAttributes;
|
|
1326
1339
|
type Types_UserProfile = UserProfile;
|
|
1327
1340
|
type Types_UserPublic = UserPublic;
|
|
1341
|
+
type Types_UserVisibilityFlag = UserVisibilityFlag;
|
|
1328
1342
|
type Types_WebSocketMessage = WebSocketMessage;
|
|
1329
1343
|
declare namespace Types {
|
|
1330
|
-
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_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_WebSocketMessage as WebSocketMessage };
|
|
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 };
|
|
1331
1345
|
}
|
|
1332
1346
|
|
|
1333
1347
|
declare function terminatePendingRequests(): void;
|
|
@@ -2263,10 +2277,10 @@ declare class Skapi {
|
|
|
2263
2277
|
* login another account holds without having verified the address blocks
|
|
2264
2278
|
* nothing; it is removed, and that account keeps the login ID it was created
|
|
2265
2279
|
* with.
|
|
2266
|
-
* @param params Target user_id and the attributes to update.
|
|
2280
|
+
* @param params Target user_id and the attributes to update. Not the `*_public` visibility flags: they are set when the account is created and are the user's own afterwards; the backend refuses them from an admin.
|
|
2267
2281
|
* @returns A promise that resolves to Promise<'SUCCESS: User attributes updated.'>.
|
|
2268
2282
|
*/
|
|
2269
|
-
updateUserAttributes(params: UserAttributes & {
|
|
2283
|
+
updateUserAttributes(params: Omit<UserAttributes, UserVisibilityFlag> & {
|
|
2270
2284
|
user_id: string;
|
|
2271
2285
|
}): Promise<'SUCCESS: User attributes updated.'>;
|
|
2272
2286
|
/**
|
package/dist/skapi.d.ts
CHANGED
|
@@ -10,8 +10,18 @@ declare class SkapiError extends Error {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
type Condition = 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | '>' | '>=' | '<' | '<=' | '=';
|
|
13
|
+
/**
|
|
14
|
+
* ICE servers for a WebRTC connection: one url (default "stun:stun.skapi.com:3468"), or a list of
|
|
15
|
+
* { urls, username?, credential? }. A TURN relay, for users whose network blocks direct
|
|
16
|
+
* connections, goes in the list with its login; keep a STUN entry beside it.
|
|
17
|
+
*/
|
|
18
|
+
type RTCIceOption = string | Array<{
|
|
19
|
+
urls: string | string[];
|
|
20
|
+
username?: string;
|
|
21
|
+
credential?: string;
|
|
22
|
+
}>;
|
|
13
23
|
type RTCReceiverParams = {
|
|
14
|
-
ice?:
|
|
24
|
+
ice?: RTCIceOption;
|
|
15
25
|
media?: {
|
|
16
26
|
video: boolean;
|
|
17
27
|
audio: boolean;
|
|
@@ -19,7 +29,7 @@ type RTCReceiverParams = {
|
|
|
19
29
|
};
|
|
20
30
|
type RTCConnectorParams = {
|
|
21
31
|
cid: string;
|
|
22
|
-
ice?:
|
|
32
|
+
ice?: RTCIceOption;
|
|
23
33
|
media?: {
|
|
24
34
|
video: boolean;
|
|
25
35
|
audio: boolean;
|
|
@@ -333,6 +343,8 @@ type NewsletterGroup = {
|
|
|
333
343
|
*/
|
|
334
344
|
endpoint: string;
|
|
335
345
|
};
|
|
346
|
+
/** The public visibility flags: set when an account is created, the user's own afterwards; never changed by an admin's updateUserAttributes(). */
|
|
347
|
+
type UserVisibilityFlag = 'email_public' | 'phone_number_public' | 'address_public' | 'gender_public' | 'birthdate_public';
|
|
336
348
|
type UserAttributes = {
|
|
337
349
|
/** User's name */
|
|
338
350
|
name?: string;
|
|
@@ -1300,6 +1312,7 @@ type Types_ProgressCallback = ProgressCallback;
|
|
|
1300
1312
|
type Types_RTCConnector = RTCConnector;
|
|
1301
1313
|
type Types_RTCConnectorParams = RTCConnectorParams;
|
|
1302
1314
|
type Types_RTCEvent = RTCEvent;
|
|
1315
|
+
type Types_RTCIceOption = RTCIceOption;
|
|
1303
1316
|
type Types_RTCReceiverParams = RTCReceiverParams;
|
|
1304
1317
|
type Types_RTCResolved = RTCResolved;
|
|
1305
1318
|
type Types_RealtimeCallback = RealtimeCallback;
|
|
@@ -1325,9 +1338,10 @@ type Types_UploadFilesResult = UploadFilesResult;
|
|
|
1325
1338
|
type Types_UserAttributes = UserAttributes;
|
|
1326
1339
|
type Types_UserProfile = UserProfile;
|
|
1327
1340
|
type Types_UserPublic = UserPublic;
|
|
1341
|
+
type Types_UserVisibilityFlag = UserVisibilityFlag;
|
|
1328
1342
|
type Types_WebSocketMessage = WebSocketMessage;
|
|
1329
1343
|
declare namespace Types {
|
|
1330
|
-
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_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_WebSocketMessage as WebSocketMessage };
|
|
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 };
|
|
1331
1345
|
}
|
|
1332
1346
|
|
|
1333
1347
|
declare function terminatePendingRequests(): void;
|
|
@@ -2263,10 +2277,10 @@ declare class Skapi {
|
|
|
2263
2277
|
* login another account holds without having verified the address blocks
|
|
2264
2278
|
* nothing; it is removed, and that account keeps the login ID it was created
|
|
2265
2279
|
* with.
|
|
2266
|
-
* @param params Target user_id and the attributes to update.
|
|
2280
|
+
* @param params Target user_id and the attributes to update. Not the `*_public` visibility flags: they are set when the account is created and are the user's own afterwards; the backend refuses them from an admin.
|
|
2267
2281
|
* @returns A promise that resolves to Promise<'SUCCESS: User attributes updated.'>.
|
|
2268
2282
|
*/
|
|
2269
|
-
updateUserAttributes(params: UserAttributes & {
|
|
2283
|
+
updateUserAttributes(params: Omit<UserAttributes, UserVisibilityFlag> & {
|
|
2270
2284
|
user_id: string;
|
|
2271
2285
|
}): Promise<'SUCCESS: User attributes updated.'>;
|
|
2272
2286
|
/**
|