Skip to content

Commit

Permalink
Merge pull request #767 from Availity/fix/type-updates
Browse files Browse the repository at this point in the history
Fix/type updates
  • Loading branch information
jordan-a-young authored Oct 23, 2024
2 parents f94cc34 + a4b3fc8 commit 8b67fbc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/api-axios/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ declare class AvFilesApi extends AvApi {
declare const avFilesApi: AvFilesApi;

declare class AvFilesDeliveryApi extends AvApi {
uploadFilesDelivery(data: any, config?: ApiConfig): Promise<AxiosResponse>;
uploadFilesDelivery(data: any, config?: ApiConfig & { customerId: string; clientId: string }): Promise<AxiosResponse>;

getLocation(response: any): string;
}
Expand Down
15 changes: 11 additions & 4 deletions packages/upload-core/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ export interface Options extends UploadOptions {
bucketId: string;
customerId: string;
clientId: string;
allowedFileNameCharacters?: string;
endpoint?: string;
fileTypes?: `.${string}`[];
maxAvScanRetries?: number;
onPreStart?: (() => boolean)[];
maxSize?: number;
metadata?: Record<string, unknown>;
onPreStart?: ((upload: Upload) => boolean)[];
pollingTime?: number;
retryDelays?: number[];
stripFileNamePathSegments?: boolean;
}

Expand Down Expand Up @@ -45,17 +48,21 @@ declare class Upload {

preStartValidationResults: boolean[];

references: string[];

s3References: string[];

status: 'accepted' | 'pending' | 'rejected' | 'encrypted' | 'decrypting';

timeoutId: NodeJS.Timeout | undefined;

waitForPassword: boolean;

constructor(file: FileUpload, options: Options);
constructor(file: File, options: Options);

abort(): void;

fingerprint(file: FileUpload, options?: Options, callback?: (arg: null, key: string) => string): string;
fingerprint(file: File, options?: Options, callback?: (arg: null, key: string) => string): string;

generateId(): string;

Expand Down
2 changes: 2 additions & 0 deletions packages/upload-core/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ class Upload {
this.error = null;
this.waitForPassword = true;
this.avScanRetries = 0;
this.references = [];
this.s3References = [];

const fileName = this.trimFileName(file.name);

Expand Down

0 comments on commit 8b67fbc

Please sign in to comment.