skapi-js 2.2.6-beta.3 → 2.2.6-beta.4
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 +7 -7
- package/dist/skapi.browser.mjs.map +1 -1
- package/dist/skapi.cjs +7 -7
- package/dist/skapi.cjs.map +1 -1
- package/dist/skapi.d.mts +63 -23
- package/dist/skapi.d.ts +63 -23
- package/dist/skapi.js +7 -7
- package/dist/skapi.js.map +1 -1
- package/dist/skapi.mjs +7 -7
- package/dist/skapi.mjs.map +1 -1
- package/package.json +2 -2
package/dist/skapi.d.mts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
declare class SkapiError extends Error {
|
|
2
|
+
code: string | number;
|
|
3
|
+
/** The underlying Error, or the flat TicketError body of a failed ticket consumption (consumeTicket). */
|
|
4
|
+
cause: Error | TicketError;
|
|
5
|
+
constructor(error: any, options?: {
|
|
6
|
+
name?: string;
|
|
7
|
+
code?: string;
|
|
8
|
+
cause?: Error | TicketError;
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
|
|
1
12
|
type Condition = 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | '>' | '>=' | '<' | '<=' | '=';
|
|
2
13
|
type RTCReceiverParams = {
|
|
3
14
|
ice?: string;
|
|
@@ -558,6 +569,48 @@ type ProgressCallback = (e: {
|
|
|
558
569
|
failed?: File[];
|
|
559
570
|
abort: () => void;
|
|
560
571
|
}) => void;
|
|
572
|
+
/** One file of an uploadFiles() call that storage did not accept. */
|
|
573
|
+
type FileUploadError = {
|
|
574
|
+
/** The File as it was given: the same object that is listed in `failed`. */
|
|
575
|
+
file: File;
|
|
576
|
+
/** The file's name. */
|
|
577
|
+
name: string;
|
|
578
|
+
/**
|
|
579
|
+
* Why it was not stored. `code` is the storage error code ('AccessDenied', 'EntityTooLarge' ...),
|
|
580
|
+
* or 'NETWORK_ERROR', 'TIMEOUT' (see UploadFilesParams.timeout), 'ABORTED' (the progress callback's
|
|
581
|
+
* abort()), 'TOO_MANY_REQUESTS', or 'UPLOAD_FAILED' when storage gave no code. `cause` holds the raw
|
|
582
|
+
* response or rejection, when there was one.
|
|
583
|
+
*/
|
|
584
|
+
error: SkapiError;
|
|
585
|
+
};
|
|
586
|
+
/** What uploadFiles() resolves with. */
|
|
587
|
+
type UploadFilesResult = {
|
|
588
|
+
/** Files that are stored. */
|
|
589
|
+
completed: File[];
|
|
590
|
+
/** Files storage did not accept. */
|
|
591
|
+
failed: File[];
|
|
592
|
+
/** Why each file in `failed` was not stored, one entry per file in the same order. Empty when every file was stored. */
|
|
593
|
+
errors: FileUploadError[];
|
|
594
|
+
/** Endpoint of every file, in the order they were given, whether or not it was stored. */
|
|
595
|
+
bin_endpoints: string[];
|
|
596
|
+
};
|
|
597
|
+
type UploadFilesParams = {
|
|
598
|
+
/** Record ID of the record to attach the files to. */
|
|
599
|
+
record_id: string;
|
|
600
|
+
/** Callback for upload progress. Useful when building a progress bar. */
|
|
601
|
+
progress?: ProgressCallback;
|
|
602
|
+
/**
|
|
603
|
+
* Milliseconds one file's upload may take. A file that takes longer is aborted and counted as failed with
|
|
604
|
+
* the code 'TIMEOUT'; the next file is then uploaded. Every file gets the full time. Omitted or 0: no limit.
|
|
605
|
+
*/
|
|
606
|
+
timeout?: number;
|
|
607
|
+
/**
|
|
608
|
+
* Reject at the first file storage does not accept, with that file's error (a SkapiError, see FileUploadError),
|
|
609
|
+
* instead of resolving with it listed in `failed` and `errors`. The files stored before it stay stored.
|
|
610
|
+
* Default false.
|
|
611
|
+
*/
|
|
612
|
+
throwOnFileError?: boolean;
|
|
613
|
+
};
|
|
561
614
|
type FetchOptions = {
|
|
562
615
|
/** Maximum number of records to fetch per call */
|
|
563
616
|
limit?: number;
|
|
@@ -1212,6 +1265,7 @@ type Types_DelRecordQuery = DelRecordQuery;
|
|
|
1212
1265
|
type Types_EncryptionOptions = EncryptionOptions;
|
|
1213
1266
|
type Types_FetchOptions = FetchOptions;
|
|
1214
1267
|
type Types_FileInfo = FileInfo;
|
|
1268
|
+
type Types_FileUploadError = FileUploadError;
|
|
1215
1269
|
type Types_Form<T> = Form<T>;
|
|
1216
1270
|
type Types_GetRecordQuery = GetRecordQuery;
|
|
1217
1271
|
type Types_Index = Index;
|
|
@@ -1242,12 +1296,14 @@ type Types_TicketReceipt = TicketReceipt;
|
|
|
1242
1296
|
type Types_TicketResponseCondition = TicketResponseCondition;
|
|
1243
1297
|
type Types_TicketSignatureCondition = TicketSignatureCondition;
|
|
1244
1298
|
type Types_UniqueId = UniqueId;
|
|
1299
|
+
type Types_UploadFilesParams = UploadFilesParams;
|
|
1300
|
+
type Types_UploadFilesResult = UploadFilesResult;
|
|
1245
1301
|
type Types_UserAttributes = UserAttributes;
|
|
1246
1302
|
type Types_UserProfile = UserProfile;
|
|
1247
1303
|
type Types_UserPublic = UserPublic;
|
|
1248
1304
|
type Types_WebSocketMessage = WebSocketMessage;
|
|
1249
1305
|
declare namespace Types {
|
|
1250
|
-
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_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_UserAttributes as UserAttributes, Types_UserProfile as UserProfile, Types_UserPublic as UserPublic, Types_WebSocketMessage as WebSocketMessage };
|
|
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 };
|
|
1251
1307
|
}
|
|
1252
1308
|
|
|
1253
1309
|
declare function terminatePendingRequests(): void;
|
|
@@ -2881,19 +2937,14 @@ declare class Skapi {
|
|
|
2881
2937
|
endpoints: string | string[];
|
|
2882
2938
|
}): Promise<RecordData[]>;
|
|
2883
2939
|
/**
|
|
2884
|
-
* Uploads files to an existing record
|
|
2940
|
+
* Uploads files to an existing record. Resolves with the files stored (`completed`), the files storage did not accept (`failed`) and why (`errors`, one entry per failed file with a SkapiError that carries the storage code).
|
|
2941
|
+
* `timeout` (milliseconds) aborts a file that takes longer and counts it as failed with the code 'TIMEOUT'; by default a file has no time limit.
|
|
2942
|
+
* `throwOnFileError` rejects at the first file that fails, with that file's error, instead of resolving; the files stored before it stay stored.
|
|
2885
2943
|
* @param fileList Files or form event containing files.
|
|
2886
2944
|
* @param params Request parameters.
|
|
2887
|
-
* @returns A promise that resolves to Promise<
|
|
2945
|
+
* @returns A promise that resolves to Promise<UploadFilesResult>.
|
|
2888
2946
|
*/
|
|
2889
|
-
uploadFiles(fileList: FormData | HTMLFormElement | SubmitEvent, params:
|
|
2890
|
-
record_id: string;
|
|
2891
|
-
progress?: ProgressCallback;
|
|
2892
|
-
}): Promise<{
|
|
2893
|
-
completed: File[];
|
|
2894
|
-
failed: File[];
|
|
2895
|
-
bin_endpoints: string[];
|
|
2896
|
-
}>;
|
|
2947
|
+
uploadFiles(fileList: FormData | HTMLFormElement | SubmitEvent, params: UploadFilesParams): Promise<UploadFilesResult>;
|
|
2897
2948
|
/**
|
|
2898
2949
|
* Calls the mock endpoint for testing request and error handling flows.
|
|
2899
2950
|
* @param data Data payload for the request.
|
|
@@ -3159,15 +3210,4 @@ declare class Skapi {
|
|
|
3159
3210
|
bulkPostRecords(config: PostRecordConfig[]): Promise<RecordData[]>;
|
|
3160
3211
|
}
|
|
3161
3212
|
|
|
3162
|
-
|
|
3163
|
-
code: string | number;
|
|
3164
|
-
/** The underlying Error, or the flat TicketError body of a failed ticket consumption (consumeTicket). */
|
|
3165
|
-
cause: Error | TicketError;
|
|
3166
|
-
constructor(error: any, options?: {
|
|
3167
|
-
name?: string;
|
|
3168
|
-
code?: string;
|
|
3169
|
-
cause?: Error | TicketError;
|
|
3170
|
-
});
|
|
3171
|
-
}
|
|
3172
|
-
|
|
3173
|
-
export { type BinaryFile, type Condition, type Connection, type ConnectionInfo, type DatabaseResponse, type DelRecordQuery, type FetchOptions, type FileInfo, 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 UserAttributes, type UserProfile, type UserPublic, type WebSocketMessage };
|
|
3213
|
+
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 };
|
package/dist/skapi.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
declare class SkapiError extends Error {
|
|
2
|
+
code: string | number;
|
|
3
|
+
/** The underlying Error, or the flat TicketError body of a failed ticket consumption (consumeTicket). */
|
|
4
|
+
cause: Error | TicketError;
|
|
5
|
+
constructor(error: any, options?: {
|
|
6
|
+
name?: string;
|
|
7
|
+
code?: string;
|
|
8
|
+
cause?: Error | TicketError;
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
|
|
1
12
|
type Condition = 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | '>' | '>=' | '<' | '<=' | '=';
|
|
2
13
|
type RTCReceiverParams = {
|
|
3
14
|
ice?: string;
|
|
@@ -558,6 +569,48 @@ type ProgressCallback = (e: {
|
|
|
558
569
|
failed?: File[];
|
|
559
570
|
abort: () => void;
|
|
560
571
|
}) => void;
|
|
572
|
+
/** One file of an uploadFiles() call that storage did not accept. */
|
|
573
|
+
type FileUploadError = {
|
|
574
|
+
/** The File as it was given: the same object that is listed in `failed`. */
|
|
575
|
+
file: File;
|
|
576
|
+
/** The file's name. */
|
|
577
|
+
name: string;
|
|
578
|
+
/**
|
|
579
|
+
* Why it was not stored. `code` is the storage error code ('AccessDenied', 'EntityTooLarge' ...),
|
|
580
|
+
* or 'NETWORK_ERROR', 'TIMEOUT' (see UploadFilesParams.timeout), 'ABORTED' (the progress callback's
|
|
581
|
+
* abort()), 'TOO_MANY_REQUESTS', or 'UPLOAD_FAILED' when storage gave no code. `cause` holds the raw
|
|
582
|
+
* response or rejection, when there was one.
|
|
583
|
+
*/
|
|
584
|
+
error: SkapiError;
|
|
585
|
+
};
|
|
586
|
+
/** What uploadFiles() resolves with. */
|
|
587
|
+
type UploadFilesResult = {
|
|
588
|
+
/** Files that are stored. */
|
|
589
|
+
completed: File[];
|
|
590
|
+
/** Files storage did not accept. */
|
|
591
|
+
failed: File[];
|
|
592
|
+
/** Why each file in `failed` was not stored, one entry per file in the same order. Empty when every file was stored. */
|
|
593
|
+
errors: FileUploadError[];
|
|
594
|
+
/** Endpoint of every file, in the order they were given, whether or not it was stored. */
|
|
595
|
+
bin_endpoints: string[];
|
|
596
|
+
};
|
|
597
|
+
type UploadFilesParams = {
|
|
598
|
+
/** Record ID of the record to attach the files to. */
|
|
599
|
+
record_id: string;
|
|
600
|
+
/** Callback for upload progress. Useful when building a progress bar. */
|
|
601
|
+
progress?: ProgressCallback;
|
|
602
|
+
/**
|
|
603
|
+
* Milliseconds one file's upload may take. A file that takes longer is aborted and counted as failed with
|
|
604
|
+
* the code 'TIMEOUT'; the next file is then uploaded. Every file gets the full time. Omitted or 0: no limit.
|
|
605
|
+
*/
|
|
606
|
+
timeout?: number;
|
|
607
|
+
/**
|
|
608
|
+
* Reject at the first file storage does not accept, with that file's error (a SkapiError, see FileUploadError),
|
|
609
|
+
* instead of resolving with it listed in `failed` and `errors`. The files stored before it stay stored.
|
|
610
|
+
* Default false.
|
|
611
|
+
*/
|
|
612
|
+
throwOnFileError?: boolean;
|
|
613
|
+
};
|
|
561
614
|
type FetchOptions = {
|
|
562
615
|
/** Maximum number of records to fetch per call */
|
|
563
616
|
limit?: number;
|
|
@@ -1212,6 +1265,7 @@ type Types_DelRecordQuery = DelRecordQuery;
|
|
|
1212
1265
|
type Types_EncryptionOptions = EncryptionOptions;
|
|
1213
1266
|
type Types_FetchOptions = FetchOptions;
|
|
1214
1267
|
type Types_FileInfo = FileInfo;
|
|
1268
|
+
type Types_FileUploadError = FileUploadError;
|
|
1215
1269
|
type Types_Form<T> = Form<T>;
|
|
1216
1270
|
type Types_GetRecordQuery = GetRecordQuery;
|
|
1217
1271
|
type Types_Index = Index;
|
|
@@ -1242,12 +1296,14 @@ type Types_TicketReceipt = TicketReceipt;
|
|
|
1242
1296
|
type Types_TicketResponseCondition = TicketResponseCondition;
|
|
1243
1297
|
type Types_TicketSignatureCondition = TicketSignatureCondition;
|
|
1244
1298
|
type Types_UniqueId = UniqueId;
|
|
1299
|
+
type Types_UploadFilesParams = UploadFilesParams;
|
|
1300
|
+
type Types_UploadFilesResult = UploadFilesResult;
|
|
1245
1301
|
type Types_UserAttributes = UserAttributes;
|
|
1246
1302
|
type Types_UserProfile = UserProfile;
|
|
1247
1303
|
type Types_UserPublic = UserPublic;
|
|
1248
1304
|
type Types_WebSocketMessage = WebSocketMessage;
|
|
1249
1305
|
declare namespace Types {
|
|
1250
|
-
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_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_UserAttributes as UserAttributes, Types_UserProfile as UserProfile, Types_UserPublic as UserPublic, Types_WebSocketMessage as WebSocketMessage };
|
|
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 };
|
|
1251
1307
|
}
|
|
1252
1308
|
|
|
1253
1309
|
declare function terminatePendingRequests(): void;
|
|
@@ -2881,19 +2937,14 @@ declare class Skapi {
|
|
|
2881
2937
|
endpoints: string | string[];
|
|
2882
2938
|
}): Promise<RecordData[]>;
|
|
2883
2939
|
/**
|
|
2884
|
-
* Uploads files to an existing record
|
|
2940
|
+
* Uploads files to an existing record. Resolves with the files stored (`completed`), the files storage did not accept (`failed`) and why (`errors`, one entry per failed file with a SkapiError that carries the storage code).
|
|
2941
|
+
* `timeout` (milliseconds) aborts a file that takes longer and counts it as failed with the code 'TIMEOUT'; by default a file has no time limit.
|
|
2942
|
+
* `throwOnFileError` rejects at the first file that fails, with that file's error, instead of resolving; the files stored before it stay stored.
|
|
2885
2943
|
* @param fileList Files or form event containing files.
|
|
2886
2944
|
* @param params Request parameters.
|
|
2887
|
-
* @returns A promise that resolves to Promise<
|
|
2945
|
+
* @returns A promise that resolves to Promise<UploadFilesResult>.
|
|
2888
2946
|
*/
|
|
2889
|
-
uploadFiles(fileList: FormData | HTMLFormElement | SubmitEvent, params:
|
|
2890
|
-
record_id: string;
|
|
2891
|
-
progress?: ProgressCallback;
|
|
2892
|
-
}): Promise<{
|
|
2893
|
-
completed: File[];
|
|
2894
|
-
failed: File[];
|
|
2895
|
-
bin_endpoints: string[];
|
|
2896
|
-
}>;
|
|
2947
|
+
uploadFiles(fileList: FormData | HTMLFormElement | SubmitEvent, params: UploadFilesParams): Promise<UploadFilesResult>;
|
|
2897
2948
|
/**
|
|
2898
2949
|
* Calls the mock endpoint for testing request and error handling flows.
|
|
2899
2950
|
* @param data Data payload for the request.
|
|
@@ -3159,15 +3210,4 @@ declare class Skapi {
|
|
|
3159
3210
|
bulkPostRecords(config: PostRecordConfig[]): Promise<RecordData[]>;
|
|
3160
3211
|
}
|
|
3161
3212
|
|
|
3162
|
-
|
|
3163
|
-
code: string | number;
|
|
3164
|
-
/** The underlying Error, or the flat TicketError body of a failed ticket consumption (consumeTicket). */
|
|
3165
|
-
cause: Error | TicketError;
|
|
3166
|
-
constructor(error: any, options?: {
|
|
3167
|
-
name?: string;
|
|
3168
|
-
code?: string;
|
|
3169
|
-
cause?: Error | TicketError;
|
|
3170
|
-
});
|
|
3171
|
-
}
|
|
3172
|
-
|
|
3173
|
-
export { type BinaryFile, type Condition, type Connection, type ConnectionInfo, type DatabaseResponse, type DelRecordQuery, type FetchOptions, type FileInfo, 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 UserAttributes, type UserProfile, type UserPublic, type WebSocketMessage };
|
|
3213
|
+
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 };
|