@pol-studios/db 1.0.2 → 1.0.3
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/index.d.ts +100 -5
- package/dist/index.js +519 -7428
- package/dist/index.js.map +1 -1
- package/dist/index.web.d.ts +2 -3
- package/dist/index.web.js +476 -11003
- package/dist/index.web.js.map +1 -1
- package/dist/{useResolveFeedback-DuGP4Tgb.d.ts → useResolveFeedback-kQZVy6lb.d.ts} +2 -96
- package/package.json +1 -1
|
@@ -8,7 +8,6 @@ import { PostgrestSingleResponse, PostgrestError, RealtimePostgresChangesPayload
|
|
|
8
8
|
import { u as useDbAdvanceFilterQuery, Q as QueryState, T as Tables, d as DbChangeLog } from './index-DNrSptau.js';
|
|
9
9
|
import { ItemType as ItemType$6 } from '@pol-studios/utils';
|
|
10
10
|
import { U as UseDbQuerySingleReturn } from './useDbQuery-C-TL8jY1.js';
|
|
11
|
-
import { FileOptions, TransformOptions } from '@supabase/storage-js';
|
|
12
11
|
import { T as TableDataAdapter, C as CapableDataAdapter, c as AdapterCapabilities, A as AdapterQueryResult } from './useDbCount-B5-Va9sg.js';
|
|
13
12
|
import { DatabaseSchema, QueryOptions } from './core/index.js';
|
|
14
13
|
import { FunctionsResponse } from '@supabase/functions-js';
|
|
@@ -17,8 +16,7 @@ import { PostgrestSingleResponse as PostgrestSingleResponse$1 } from '@supabase/
|
|
|
17
16
|
import { Moment } from 'moment';
|
|
18
17
|
import * as react from 'react';
|
|
19
18
|
import { ReactNode } from 'react';
|
|
20
|
-
import
|
|
21
|
-
import { FileRejection, FileError } from 'react-dropzone';
|
|
19
|
+
import { TransformOptions } from '@supabase/storage-js';
|
|
22
20
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
23
21
|
|
|
24
22
|
declare function setSupabaseUrl(url: string): void;
|
|
@@ -386,21 +384,6 @@ declare function useDbUpdate<TableName extends string & keyof PublicSchema["Tabl
|
|
|
386
384
|
crossOrganization?: boolean;
|
|
387
385
|
}): _tanstack_react_query.UseMutationResult<RowResult, Error, ResultUpdate, unknown>;
|
|
388
386
|
|
|
389
|
-
type RequestOptions = {
|
|
390
|
-
onUploadProgress?: (bytesUploaded: number, bytesTotal: number) => any;
|
|
391
|
-
};
|
|
392
|
-
declare function sanitizeStorageKey(path: string): string;
|
|
393
|
-
declare function useDbAttachmentUpload(bucketId: string, options?: RequestOptions): _tanstack_react_query.UseMutationResult<{
|
|
394
|
-
bucketId: string;
|
|
395
|
-
path: string;
|
|
396
|
-
contentType: string;
|
|
397
|
-
}, Error, {
|
|
398
|
-
directory?: string;
|
|
399
|
-
fileName?: string;
|
|
400
|
-
file: File | Blob | Pick<ReadableStreamDefaultReader, "read">;
|
|
401
|
-
onUploadProgress?: (bytesUploaded: number, bytesTotal: number) => any;
|
|
402
|
-
} & FileOptions, unknown>;
|
|
403
|
-
|
|
404
387
|
type ItemType<T> = T extends Array<infer U> ? U : T;
|
|
405
388
|
type MutationOption = Parameters<typeof useUpdateMutation>[3];
|
|
406
389
|
type useDbUpsertResponse = ReturnType<typeof useDbUpsert>;
|
|
@@ -783,83 +766,6 @@ declare function useStorageUrl(): {
|
|
|
783
766
|
}, callback: () => void) => () => void;
|
|
784
767
|
};
|
|
785
768
|
|
|
786
|
-
interface FileWithPreview extends File {
|
|
787
|
-
preview?: string;
|
|
788
|
-
errors: readonly FileError[];
|
|
789
|
-
}
|
|
790
|
-
type UseSupabaseUploadOptions = {
|
|
791
|
-
/**
|
|
792
|
-
* Name of bucket to upload files to in your Supabase project
|
|
793
|
-
*/
|
|
794
|
-
bucketName: string;
|
|
795
|
-
/**
|
|
796
|
-
* Folder to upload files to in the specified bucket within your Supabase project.
|
|
797
|
-
*
|
|
798
|
-
* Defaults to uploading files to the root of the bucket
|
|
799
|
-
*
|
|
800
|
-
* e.g If specified path is `test`, your file will be uploaded as `test/file_name`
|
|
801
|
-
*/
|
|
802
|
-
path?: string;
|
|
803
|
-
/**
|
|
804
|
-
* Allowed MIME types for each file upload (e.g `image/png`, `text/html`, etc). Wildcards are also supported (e.g `image/*`).
|
|
805
|
-
*
|
|
806
|
-
* Defaults to allowing uploading of all MIME types.
|
|
807
|
-
*/
|
|
808
|
-
allowedMimeTypes?: string[];
|
|
809
|
-
/**
|
|
810
|
-
* Maximum upload size of each file allowed in bytes. (e.g 1000 bytes = 1 KB)
|
|
811
|
-
*/
|
|
812
|
-
maxFileSize?: number;
|
|
813
|
-
/**
|
|
814
|
-
* Maximum number of files allowed per upload.
|
|
815
|
-
*/
|
|
816
|
-
maxFiles?: number;
|
|
817
|
-
/**
|
|
818
|
-
* The number of seconds the asset is cached in the browser and in the Supabase CDN.
|
|
819
|
-
*
|
|
820
|
-
* This is set in the Cache-Control: max-age=<seconds> header. Defaults to 3600 seconds.
|
|
821
|
-
*/
|
|
822
|
-
cacheControl?: number;
|
|
823
|
-
/**
|
|
824
|
-
* When set to true, the file is overwritten if it exists.
|
|
825
|
-
*
|
|
826
|
-
* When set to false, an error is thrown if the object already exists. Defaults to `false`
|
|
827
|
-
*/
|
|
828
|
-
upsert?: boolean;
|
|
829
|
-
};
|
|
830
|
-
type UseSupabaseUploadReturn = ReturnType<typeof useSupabaseUpload>;
|
|
831
|
-
declare const useSupabaseUpload: (options: UseSupabaseUploadOptions) => {
|
|
832
|
-
open: () => void;
|
|
833
|
-
isFocused: boolean;
|
|
834
|
-
isDragActive: boolean;
|
|
835
|
-
isDragAccept: boolean;
|
|
836
|
-
isDragReject: boolean;
|
|
837
|
-
isFileDialogActive: boolean;
|
|
838
|
-
acceptedFiles: readonly react_dropzone.FileWithPath[];
|
|
839
|
-
fileRejections: readonly FileRejection[];
|
|
840
|
-
rootRef: React.RefObject<HTMLElement>;
|
|
841
|
-
inputRef: React.RefObject<HTMLInputElement>;
|
|
842
|
-
getRootProps: <T extends react_dropzone.DropzoneRootProps>(props?: T) => T;
|
|
843
|
-
getInputProps: <T extends react_dropzone.DropzoneInputProps>(props?: T) => T;
|
|
844
|
-
files: FileWithPreview[];
|
|
845
|
-
setFiles: react.Dispatch<react.SetStateAction<FileWithPreview[]>>;
|
|
846
|
-
successes: string[];
|
|
847
|
-
isSuccess: boolean;
|
|
848
|
-
loading: boolean;
|
|
849
|
-
errors: {
|
|
850
|
-
name: string;
|
|
851
|
-
message: string;
|
|
852
|
-
}[];
|
|
853
|
-
setErrors: react.Dispatch<react.SetStateAction<{
|
|
854
|
-
name: string;
|
|
855
|
-
message: string;
|
|
856
|
-
}[]>>;
|
|
857
|
-
onUpload: () => Promise<void>;
|
|
858
|
-
maxFileSize: number;
|
|
859
|
-
maxFiles: number;
|
|
860
|
-
allowedMimeTypes: string[];
|
|
861
|
-
};
|
|
862
|
-
|
|
863
769
|
/**
|
|
864
770
|
* Metadata stored in storage.objects.metadata JSONB column
|
|
865
771
|
*/
|
|
@@ -1162,4 +1068,4 @@ declare function useResolveFeedback(): _tanstack_react_query.UseMutationResult<{
|
|
|
1162
1068
|
}>;
|
|
1163
1069
|
}, Error, number, unknown>;
|
|
1164
1070
|
|
|
1165
|
-
export {
|
|
1071
|
+
export { LiveChangeContext as $, type UseMutationSuccessOptions as A, useMutationSuccess as B, useMutationSuccessRN as C, getErrorBody as D, type AIOptions as E, type AIResponse as F, useAI as G, type ExtractedReceipt as H, type BatchAnalysisProgress as I, type ServerAvailabilityState as J, useServerAvailability as K, useSearchQuery as L, type MutationOption as M, type UpdateOptions as N, executeAdvanceQuery as O, type PendingExpense as P, type CustomPageQueryResult as Q, type StorageObjectMetadata as R, SupabaseAdapter as S, BUCKETS as T, type UseDbPartialAdvanceQueryResult as U, type BucketName as V, createInCondition as W, TIMEOUT_ERROR_MESSAGE as X, DEFAULT_QUERY_TIMEOUT as Y, isTimeoutError as Z, type AlertProps as _, useDbInsert as a, LiveChangeContextProvider as a0, useUpsertChangelog as a1, useDeleteChangelog as a2, useUpsertChangelogEntry as a3, useMultiUpsertChangelogEntries as a4, useDeleteChangelogEntry as a5, useMultiDeleteChangelogEntries as a6, useUpsertChangelogMedia as a7, useDeleteChangelogMedia as a8, useUploadChangelogMedia as a9, useChangelogs as aa, usePublishedChangelogs as ab, useChangelogById as ac, useChangelogBySlug as ad, useChangelogEntries as ae, useChangelogMedia as af, useFeedbackList as ag, type FeedbackListItem as ah, type FeedbackListParams as ai, useSubmitFeedback as aj, type SubmitFeedbackParams as ak, useApplyFeedback as al, useResolveFeedback as am, useDbUpdate as b, useDbDelete as c, useDbUpsert as d, useDbRealtimeQuery as e, createSupabaseAdapter as f, useSupabaseFunction as g, useReceiptAI as h, useLiveChangeTracking as i, useLatestOperationLog as j, useAutosaveState as k, useToastError as l, useStorageUrl as m, newTimeActivity as n, useStoragePath as o, getSupabaseUrl as p, useDbMultiDelete as q, useDbMultiUpsert as r, setSupabaseUrl as s, useDbPartialAdvanceQuery as t, useDbRealtime as u, type UseDbPartialQueryResult as v, useDbPartialQuery as w, type UseDbRealtimeQueryResult as x, convertFilterToRealtimeQuery as y, type useDbUpsertResponse as z };
|