@brighterly/lib-core-types 0.2.0 → 0.3.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.
@@ -1,6 +1,6 @@
1
- import { type FilePackStatus, type FilesCategory, FileStatuses } from './enums';
1
+ import type { FilePackStatus, FilesCategory, FileStatuses } from './enums';
2
+ import type { CallbackErrorFunction, CallbackFunction, CallbackSuccessFunction, CallbackUploadProgressFunction, FileErrorCode, FilesPackTree } from './types';
2
3
  import type { OwnerType } from '../tutor/enums';
3
- import type { CallbackErrorFunction, CallbackFunction, CallbackSuccessFunction, CallbackUploadProgressFunction, FilesPackTree } from './types';
4
4
  export interface FileCategory {
5
5
  name: string;
6
6
  cnt: number;
@@ -65,3 +65,11 @@ export interface FileUploadInertiaOptions {
65
65
  export interface DraftUploadOptions extends FileUploadOptions {
66
66
  onUploadProgress?: CallbackUploadProgressFunction;
67
67
  }
68
+ export interface FileRejectionError {
69
+ code: FileErrorCode;
70
+ message: string;
71
+ }
72
+ export interface FileRejectReason {
73
+ file: File;
74
+ errors: FileRejectionError[];
75
+ }
@@ -1 +1 @@
1
- import { FileStatuses, } from './enums';
1
+ export {};
@@ -6,3 +6,4 @@ export type CallbackFunction = () => void;
6
6
  export type CallbackSuccessFunction = (res: AxiosResponse) => void;
7
7
  export type CallbackErrorFunction = (err?: AxiosError) => void;
8
8
  export type CallbackUploadProgressFunction = (progressEvent: any) => void;
9
+ export type FileErrorCode = 'file-invalid-type' | 'file-too-large' | 'file-too-small' | 'too-many-files' | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brighterly/lib-core-types",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Official Brighterly lib-core-types",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",