wikisubmission-sdk
v2.0.8
Published
An NPM package to access WikiSubmission services in a type-safe & unified manner across applications.
Maintainers
Readme
WikiSubmission SDK
An NPM package to access WikiSubmission services in a type-safe & unified manner across applications.
Installation
npm install wikisubmission-sdkQuick Start
import { WikiSubmission } from 'wikisubmission-sdk';
// Create a unified client with access to all services
const client = WikiSubmission.createClient({
enableLogging: true,
});Usage
Direct Supabase Access
For advanced users, you can access the shared Supabase client directly from the main client:
const quran = await client.supabase
.from('ws_quran_index')
.select('*, ws_quran_text(*)')
.eq('verse_id', '2:255')
.single();
const newsletters = await client.supabase
.from('ws_newsletters')
.select('*')
.limit(10);
const media = await client.supabase
.from('ws_media')
.select('*')
.limit(10);Query
The query method, found in every service, accepts any string and is ideal for searchbar-like contexts. It requires a strict validation pattern for proper TypeScript inference. To be documented.
License
This project is licensed under the MIT License. See the LICENSE file for more information.
Contact
Email: [email protected]
