@nextblock-cms/db 0.9.70 → 0.9.91
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/index.d.ts +3 -0
- package/lib/media-actions.d.ts +25 -0
- package/lib/package-validation.d.ts +1 -0
- package/lib/supabase/client.d.ts +9 -0
- package/lib/supabase/middleware.d.ts +2 -0
- package/lib/supabase/server.d.ts +2197 -0
- package/lib/supabase/ssg-client.d.ts +2 -0
- package/lib/supabase/types.d.ts +2332 -0
- package/package.json +1 -1
- package/server.d.ts +3 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Database } from './supabase/types';
|
|
2
|
+
type Media = Database['public']['Tables']['media']['Row'];
|
|
3
|
+
export interface ImageVariant {
|
|
4
|
+
objectKey: string;
|
|
5
|
+
url: string;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
fileType: string;
|
|
9
|
+
sizeBytes: number;
|
|
10
|
+
variantLabel: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function recordMediaUpload(payload: {
|
|
13
|
+
fileName: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
r2OriginalKey: string;
|
|
16
|
+
r2Variants: ImageVariant[];
|
|
17
|
+
originalImageDetails: ImageVariant;
|
|
18
|
+
blurDataUrl?: string;
|
|
19
|
+
}, returnJustData?: boolean): Promise<{
|
|
20
|
+
success: true;
|
|
21
|
+
data: Media;
|
|
22
|
+
} | {
|
|
23
|
+
error: string;
|
|
24
|
+
} | void>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function verifyPackageOnline(packageId: string, customClient?: any): Promise<boolean>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SupabaseClient } from '@supabase/supabase-js';
|
|
2
|
+
import { Database } from './types';
|
|
3
|
+
type Profile = Database['public']['Tables']['profiles']['Row'];
|
|
4
|
+
type Language = Database['public']['Tables']['languages']['Row'];
|
|
5
|
+
export declare const createClient: () => SupabaseClient<any, "public", "public", any, any>;
|
|
6
|
+
export declare function getProfileWithRoleClientSide(supabase: SupabaseClient, // Accept the client instance
|
|
7
|
+
userId: string): Promise<Profile | null>;
|
|
8
|
+
export declare function getActiveLanguagesClientSide(): Promise<Language[]>;
|
|
9
|
+
export {};
|