skapi-js 2.2.6-beta.4 → 2.2.6-beta.5
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 +10 -10
- package/dist/skapi.cjs.map +1 -1
- package/dist/skapi.d.mts +34 -1
- package/dist/skapi.d.ts +34 -1
- package/dist/skapi.js +10 -10
- package/dist/skapi.js.map +1 -1
- package/dist/skapi.mjs +10 -10
- package/dist/skapi.mjs.map +1 -1
- package/package.json +2 -2
package/dist/skapi.d.mts
CHANGED
|
@@ -583,6 +583,28 @@ type FileUploadError = {
|
|
|
583
583
|
*/
|
|
584
584
|
error: SkapiError;
|
|
585
585
|
};
|
|
586
|
+
/** One item of postRecords(): the two arguments postRecord() takes, as one object. */
|
|
587
|
+
type PostRecordsItem = {
|
|
588
|
+
/**
|
|
589
|
+
* The record's data, as postRecord()'s first argument: an object, or null. Leave it out (undefined)
|
|
590
|
+
* to keep a record's stored data as it is on an update. Files are not attached here: attach them
|
|
591
|
+
* with uploadFiles() to the saved record.
|
|
592
|
+
*/
|
|
593
|
+
data?: Record<string, any> | null;
|
|
594
|
+
/** The record's configuration, as postRecord()'s second argument. */
|
|
595
|
+
config: PostRecordConfig;
|
|
596
|
+
};
|
|
597
|
+
/** What postRecords() resolves with. `list.length + failed.length` is the number of items given. */
|
|
598
|
+
type PostRecordsResult = {
|
|
599
|
+
/** The records that were saved, in the order their items were given. */
|
|
600
|
+
list: RecordData[];
|
|
601
|
+
/** The items that were not saved, in the order they were given. `index` is the item's position in the input. */
|
|
602
|
+
failed: {
|
|
603
|
+
index: number;
|
|
604
|
+
code: string;
|
|
605
|
+
message: string;
|
|
606
|
+
}[];
|
|
607
|
+
};
|
|
586
608
|
/** What uploadFiles() resolves with. */
|
|
587
609
|
type UploadFilesResult = {
|
|
588
610
|
/** Files that are stored. */
|
|
@@ -1272,6 +1294,8 @@ type Types_Index = Index;
|
|
|
1272
1294
|
type Types_Newsletter = Newsletter;
|
|
1273
1295
|
type Types_NewsletterGroup = NewsletterGroup;
|
|
1274
1296
|
type Types_PostRecordConfig = PostRecordConfig;
|
|
1297
|
+
type Types_PostRecordsItem = PostRecordsItem;
|
|
1298
|
+
type Types_PostRecordsResult = PostRecordsResult;
|
|
1275
1299
|
type Types_ProgressCallback = ProgressCallback;
|
|
1276
1300
|
type Types_RTCConnector = RTCConnector;
|
|
1277
1301
|
type Types_RTCConnectorParams = RTCConnectorParams;
|
|
@@ -1303,7 +1327,7 @@ type Types_UserProfile = UserProfile;
|
|
|
1303
1327
|
type Types_UserPublic = UserPublic;
|
|
1304
1328
|
type Types_WebSocketMessage = WebSocketMessage;
|
|
1305
1329
|
declare namespace Types {
|
|
1306
|
-
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_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 };
|
|
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 };
|
|
1307
1331
|
}
|
|
1308
1332
|
|
|
1309
1333
|
declare function terminatePendingRequests(): void;
|
|
@@ -3139,6 +3163,15 @@ declare class Skapi {
|
|
|
3139
3163
|
name: string;
|
|
3140
3164
|
file: File;
|
|
3141
3165
|
}[]): Promise<RecordData>;
|
|
3166
|
+
/**
|
|
3167
|
+
* Creates or updates several records in one call, 100 records to a request. Each item is the two arguments of postRecord() as one object: `{ data, config }`.
|
|
3168
|
+
* Resolves with `list`, the records that were saved in the order their items were given, and `failed`, the items that were not saved, each with its `index` in the input, a `code` and a `message`.
|
|
3169
|
+
* A refused item never rejects the call, and the items after it are still posted; only a failure of a request itself (connection, sign-in, a server error) rejects, and the records saved before it stay saved.
|
|
3170
|
+
* Files are not attached here: use uploadFiles() on a saved record.
|
|
3171
|
+
* @param items Non-empty array of `{ data, config }` items.
|
|
3172
|
+
* @returns A promise that resolves to Promise<PostRecordsResult>.
|
|
3173
|
+
*/
|
|
3174
|
+
postRecords(items: PostRecordsItem[]): Promise<PostRecordsResult>;
|
|
3142
3175
|
/**
|
|
3143
3176
|
* Fetches subscriber/subscription relationships with filters and pagination. At least one of `subscriber` or `subscription` must be provided.
|
|
3144
3177
|
* @param params Request parameters.
|
package/dist/skapi.d.ts
CHANGED
|
@@ -583,6 +583,28 @@ type FileUploadError = {
|
|
|
583
583
|
*/
|
|
584
584
|
error: SkapiError;
|
|
585
585
|
};
|
|
586
|
+
/** One item of postRecords(): the two arguments postRecord() takes, as one object. */
|
|
587
|
+
type PostRecordsItem = {
|
|
588
|
+
/**
|
|
589
|
+
* The record's data, as postRecord()'s first argument: an object, or null. Leave it out (undefined)
|
|
590
|
+
* to keep a record's stored data as it is on an update. Files are not attached here: attach them
|
|
591
|
+
* with uploadFiles() to the saved record.
|
|
592
|
+
*/
|
|
593
|
+
data?: Record<string, any> | null;
|
|
594
|
+
/** The record's configuration, as postRecord()'s second argument. */
|
|
595
|
+
config: PostRecordConfig;
|
|
596
|
+
};
|
|
597
|
+
/** What postRecords() resolves with. `list.length + failed.length` is the number of items given. */
|
|
598
|
+
type PostRecordsResult = {
|
|
599
|
+
/** The records that were saved, in the order their items were given. */
|
|
600
|
+
list: RecordData[];
|
|
601
|
+
/** The items that were not saved, in the order they were given. `index` is the item's position in the input. */
|
|
602
|
+
failed: {
|
|
603
|
+
index: number;
|
|
604
|
+
code: string;
|
|
605
|
+
message: string;
|
|
606
|
+
}[];
|
|
607
|
+
};
|
|
586
608
|
/** What uploadFiles() resolves with. */
|
|
587
609
|
type UploadFilesResult = {
|
|
588
610
|
/** Files that are stored. */
|
|
@@ -1272,6 +1294,8 @@ type Types_Index = Index;
|
|
|
1272
1294
|
type Types_Newsletter = Newsletter;
|
|
1273
1295
|
type Types_NewsletterGroup = NewsletterGroup;
|
|
1274
1296
|
type Types_PostRecordConfig = PostRecordConfig;
|
|
1297
|
+
type Types_PostRecordsItem = PostRecordsItem;
|
|
1298
|
+
type Types_PostRecordsResult = PostRecordsResult;
|
|
1275
1299
|
type Types_ProgressCallback = ProgressCallback;
|
|
1276
1300
|
type Types_RTCConnector = RTCConnector;
|
|
1277
1301
|
type Types_RTCConnectorParams = RTCConnectorParams;
|
|
@@ -1303,7 +1327,7 @@ type Types_UserProfile = UserProfile;
|
|
|
1303
1327
|
type Types_UserPublic = UserPublic;
|
|
1304
1328
|
type Types_WebSocketMessage = WebSocketMessage;
|
|
1305
1329
|
declare namespace Types {
|
|
1306
|
-
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_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 };
|
|
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 };
|
|
1307
1331
|
}
|
|
1308
1332
|
|
|
1309
1333
|
declare function terminatePendingRequests(): void;
|
|
@@ -3139,6 +3163,15 @@ declare class Skapi {
|
|
|
3139
3163
|
name: string;
|
|
3140
3164
|
file: File;
|
|
3141
3165
|
}[]): Promise<RecordData>;
|
|
3166
|
+
/**
|
|
3167
|
+
* Creates or updates several records in one call, 100 records to a request. Each item is the two arguments of postRecord() as one object: `{ data, config }`.
|
|
3168
|
+
* Resolves with `list`, the records that were saved in the order their items were given, and `failed`, the items that were not saved, each with its `index` in the input, a `code` and a `message`.
|
|
3169
|
+
* A refused item never rejects the call, and the items after it are still posted; only a failure of a request itself (connection, sign-in, a server error) rejects, and the records saved before it stay saved.
|
|
3170
|
+
* Files are not attached here: use uploadFiles() on a saved record.
|
|
3171
|
+
* @param items Non-empty array of `{ data, config }` items.
|
|
3172
|
+
* @returns A promise that resolves to Promise<PostRecordsResult>.
|
|
3173
|
+
*/
|
|
3174
|
+
postRecords(items: PostRecordsItem[]): Promise<PostRecordsResult>;
|
|
3142
3175
|
/**
|
|
3143
3176
|
* Fetches subscriber/subscription relationships with filters and pagination. At least one of `subscriber` or `subscription` must be provided.
|
|
3144
3177
|
* @param params Request parameters.
|