@quranjs/api 3.7.0 → 3.9.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.
- package/README.md +94 -0
- package/dist/app-state-state-DN5xrHqP.d.mts +528 -0
- package/dist/app-state-state-DN5xrHqP.d.ts +528 -0
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +2 -2
- package/dist/index.min.mjs.map +1 -1
- package/dist/public.d.mts +6 -4
- package/dist/public.d.ts +6 -4
- package/dist/public.min.js +2 -2
- package/dist/public.min.js.map +1 -1
- package/dist/public.min.mjs +2 -2
- package/dist/public.min.mjs.map +1 -1
- package/dist/{runtime-utils-z2Ga9MgK.d.ts → runtime-utils-BgscSsmR.d.mts} +1 -1
- package/dist/{runtime-utils-BG7Q7TVB.d.mts → runtime-utils-CASDV4hu.d.ts} +1 -1
- package/dist/server.d.mts +7 -4
- package/dist/server.d.ts +7 -4
- package/dist/server.min.js +2 -2
- package/dist/server.min.js.map +1 -1
- package/dist/server.min.mjs +2 -2
- package/dist/server.min.mjs.map +1 -1
- package/dist/{verses-gs60vEyE.d.ts → verses-CAWZPink.d.mts} +16 -6
- package/dist/{verses-CWixKr_f.d.mts → verses-DLfdreUO.d.ts} +16 -6
- package/package.json +3 -2
- package/dist/index-BJ5hWalX.d.mts +0 -292
- package/dist/index-BJ5hWalX.d.ts +0 -292
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { k as ApiParams, a1 as QuranFetchClient, B as BaseApiParams, j as VerseRecitationField, m as SearchParams, P as PaginationParams, W as WordField, T as TranslationField, V as VerseField } from './app-state-state-DN5xrHqP.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Maps chapter number to verse count
|
|
@@ -350,7 +350,7 @@ interface ChapterReciterResource {
|
|
|
350
350
|
format?: string;
|
|
351
351
|
filesSize?: number;
|
|
352
352
|
}
|
|
353
|
-
type ContentSyncResourceGroup = "articles" | "chapter_recitations" | "mushafs" | "recitations" | "tafsirs" | "translations" | "word_by_word_translations";
|
|
353
|
+
type ContentSyncResourceGroup = "articles" | "chapter_recitations" | "mushafs" | "recitations" | "tafsirs" | "translations" | "word_by_word_transliterations" | "word_by_word_translations";
|
|
354
354
|
interface MushafMetadataSnapshotRecord extends Record<string, unknown> {
|
|
355
355
|
recordType: "mushaf";
|
|
356
356
|
id: number;
|
|
@@ -428,9 +428,19 @@ interface WordByWordTranslationSnapshotRecord extends Record<string, unknown> {
|
|
|
428
428
|
priority: number | null;
|
|
429
429
|
updatedAt: string;
|
|
430
430
|
}
|
|
431
|
+
interface WordByWordTransliterationSnapshotRecord extends Record<string, unknown> {
|
|
432
|
+
id: number;
|
|
433
|
+
resourceContentId: number;
|
|
434
|
+
resourceId: number;
|
|
435
|
+
wordId: number;
|
|
436
|
+
languageId: number;
|
|
437
|
+
languageName: string | null;
|
|
438
|
+
text: string | null;
|
|
439
|
+
updatedAt: string;
|
|
440
|
+
}
|
|
431
441
|
type ContentSyncMutationType = "RESOURCE_CREATE" | "RESOURCE_UPDATE" | "RESOURCE_DELETE" | "ROW_CREATE" | "ROW_UPDATE" | "ROW_DELETE" | "RESOURCE_INVALIDATE";
|
|
432
442
|
interface ContentSyncOptions extends ApiParams {
|
|
433
|
-
/** Resource filter, e.g. `articles:*;
|
|
443
|
+
/** Resource filter, e.g. `articles:*;mushafs:1;translations:1,6;word_by_word_transliterations:60`. */
|
|
434
444
|
resources?: string;
|
|
435
445
|
/** Set to true for the initial sync. */
|
|
436
446
|
bootstrap?: boolean;
|
|
@@ -972,7 +982,7 @@ declare class QuranResources {
|
|
|
972
982
|
* @example
|
|
973
983
|
* client.resources.sync({
|
|
974
984
|
* bootstrap: true,
|
|
975
|
-
* resources: "
|
|
985
|
+
* resources: "mushafs:1;translations:19;word_by_word_transliterations:60"
|
|
976
986
|
* })
|
|
977
987
|
*/
|
|
978
988
|
sync<TData extends Record<string, unknown> = Record<string, unknown>>(options?: ContentSyncOptions): Promise<ContentSyncResponse<TData>>;
|
|
@@ -982,7 +992,7 @@ declare class QuranResources {
|
|
|
982
992
|
* @param {string | number} id
|
|
983
993
|
* @param {ContentResourceSnapshotOptions} options
|
|
984
994
|
* @example
|
|
985
|
-
* client.resources.findSnapshot("
|
|
995
|
+
* client.resources.findSnapshot("word_by_word_transliterations", 60)
|
|
986
996
|
*/
|
|
987
997
|
findSnapshot<TRecord extends Record<string, unknown> = Record<string, unknown>>(resourceGroup: ContentSyncResourceGroup, id: string | number, options?: ContentResourceSnapshotOptions): Promise<ContentResourceSnapshot<TRecord>>;
|
|
988
998
|
}
|
|
@@ -1090,4 +1100,4 @@ declare class QuranVerses {
|
|
|
1090
1100
|
findRandom(options?: GetVerseOptions): Promise<Verse>;
|
|
1091
1101
|
}
|
|
1092
1102
|
|
|
1093
|
-
export { type VerseMediaResource as $, type Answer as A, type Translation as B, type ChapterId as C, type Transliteration as D, type Verse as E, CharType as F, type Juz as G, type HizbNumber as H, type Pagination as I, type JuzNumber as J, type RecitationResource as K, type RecitationInfoResource as L, type TranslationResource as M, type NormalizedVerseRecitation as N, type TranslationInfoResource as O, type PageNumber as P, QuranChapters as Q, type RubNumber as R, type SearchResponse as S, type TranslatedName as T, type TafsirResource as U, type VerseKey as V, type Word as W, type TafsirInfoResource as X, type RecitationStylesResource as Y, type LanguageResource as Z, type ChapterInfoResource as _, QuranAnswers as a, type ChapterReciterResource as a0, type ContentSyncResourceGroup as a1, type MushafMetadataSnapshotRecord as a2, type MushafPageSnapshotRecord as a3, type MushafFontAssetSnapshotRecord as a4, type MushafWordSnapshotRecord as a5, type MushafSnapshotRecord as a6, type WordByWordTranslationSnapshotRecord as a7, type
|
|
1103
|
+
export { type VerseMediaResource as $, type Answer as A, type Translation as B, type ChapterId as C, type Transliteration as D, type Verse as E, CharType as F, type Juz as G, type HizbNumber as H, type Pagination as I, type JuzNumber as J, type RecitationResource as K, type RecitationInfoResource as L, type TranslationResource as M, type NormalizedVerseRecitation as N, type TranslationInfoResource as O, type PageNumber as P, QuranChapters as Q, type RubNumber as R, type SearchResponse as S, type TranslatedName as T, type TafsirResource as U, type VerseKey as V, type Word as W, type TafsirInfoResource as X, type RecitationStylesResource as Y, type LanguageResource as Z, type ChapterInfoResource as _, QuranAnswers as a, type ChapterReciterResource as a0, type ContentSyncResourceGroup as a1, type MushafMetadataSnapshotRecord as a2, type MushafPageSnapshotRecord as a3, type MushafFontAssetSnapshotRecord as a4, type MushafWordSnapshotRecord as a5, type MushafSnapshotRecord as a6, type WordByWordTranslationSnapshotRecord as a7, type WordByWordTransliterationSnapshotRecord as a8, type ContentSyncMutationType as a9, type ContentSyncOptions as aa, type ContentResourceSnapshotOptions as ab, type ContentSyncMutation as ac, type ContentSyncResponse as ad, type ContentResourceSnapshot as ae, SearchNavigationType as af, type SearchResult as ag, type AnalyticsJsonValue as ah, type AnalyticsEvent as ai, type AnalyticsBatchRequest as aj, type AnalyticsBatchAccepted as ak, QuranVerses as b, QuranJuzs as c, QuranAudio as d, QuranHadithReferences as e, QuranResources as f, QuranSearch as g, type AnswerQuestion as h, type AnswersByAyahResponse as i, type AnswerCount as j, type AnswerCountWithinRangeResponse as k, type ChapterRecitation as l, type VerseRecitation as m, type AudioResponse as n, type Chapter as o, type ChapterInfo as p, type ChapterInfoResponse as q, type HadithReference as r, type HadithReferencesByAyahResponse as s, type HadithGrade as t, type HadithContent as u, type Hadith as v, type HadithsByAyahResponse as w, type HadithCountWithinRangeResponse as x, type Segment as y, type Tafsir as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { k as ApiParams, a1 as QuranFetchClient, B as BaseApiParams, j as VerseRecitationField, m as SearchParams, P as PaginationParams, W as WordField, T as TranslationField, V as VerseField } from './app-state-state-DN5xrHqP.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Maps chapter number to verse count
|
|
@@ -350,7 +350,7 @@ interface ChapterReciterResource {
|
|
|
350
350
|
format?: string;
|
|
351
351
|
filesSize?: number;
|
|
352
352
|
}
|
|
353
|
-
type ContentSyncResourceGroup = "articles" | "chapter_recitations" | "mushafs" | "recitations" | "tafsirs" | "translations" | "word_by_word_translations";
|
|
353
|
+
type ContentSyncResourceGroup = "articles" | "chapter_recitations" | "mushafs" | "recitations" | "tafsirs" | "translations" | "word_by_word_transliterations" | "word_by_word_translations";
|
|
354
354
|
interface MushafMetadataSnapshotRecord extends Record<string, unknown> {
|
|
355
355
|
recordType: "mushaf";
|
|
356
356
|
id: number;
|
|
@@ -428,9 +428,19 @@ interface WordByWordTranslationSnapshotRecord extends Record<string, unknown> {
|
|
|
428
428
|
priority: number | null;
|
|
429
429
|
updatedAt: string;
|
|
430
430
|
}
|
|
431
|
+
interface WordByWordTransliterationSnapshotRecord extends Record<string, unknown> {
|
|
432
|
+
id: number;
|
|
433
|
+
resourceContentId: number;
|
|
434
|
+
resourceId: number;
|
|
435
|
+
wordId: number;
|
|
436
|
+
languageId: number;
|
|
437
|
+
languageName: string | null;
|
|
438
|
+
text: string | null;
|
|
439
|
+
updatedAt: string;
|
|
440
|
+
}
|
|
431
441
|
type ContentSyncMutationType = "RESOURCE_CREATE" | "RESOURCE_UPDATE" | "RESOURCE_DELETE" | "ROW_CREATE" | "ROW_UPDATE" | "ROW_DELETE" | "RESOURCE_INVALIDATE";
|
|
432
442
|
interface ContentSyncOptions extends ApiParams {
|
|
433
|
-
/** Resource filter, e.g. `articles:*;
|
|
443
|
+
/** Resource filter, e.g. `articles:*;mushafs:1;translations:1,6;word_by_word_transliterations:60`. */
|
|
434
444
|
resources?: string;
|
|
435
445
|
/** Set to true for the initial sync. */
|
|
436
446
|
bootstrap?: boolean;
|
|
@@ -972,7 +982,7 @@ declare class QuranResources {
|
|
|
972
982
|
* @example
|
|
973
983
|
* client.resources.sync({
|
|
974
984
|
* bootstrap: true,
|
|
975
|
-
* resources: "
|
|
985
|
+
* resources: "mushafs:1;translations:19;word_by_word_transliterations:60"
|
|
976
986
|
* })
|
|
977
987
|
*/
|
|
978
988
|
sync<TData extends Record<string, unknown> = Record<string, unknown>>(options?: ContentSyncOptions): Promise<ContentSyncResponse<TData>>;
|
|
@@ -982,7 +992,7 @@ declare class QuranResources {
|
|
|
982
992
|
* @param {string | number} id
|
|
983
993
|
* @param {ContentResourceSnapshotOptions} options
|
|
984
994
|
* @example
|
|
985
|
-
* client.resources.findSnapshot("
|
|
995
|
+
* client.resources.findSnapshot("word_by_word_transliterations", 60)
|
|
986
996
|
*/
|
|
987
997
|
findSnapshot<TRecord extends Record<string, unknown> = Record<string, unknown>>(resourceGroup: ContentSyncResourceGroup, id: string | number, options?: ContentResourceSnapshotOptions): Promise<ContentResourceSnapshot<TRecord>>;
|
|
988
998
|
}
|
|
@@ -1090,4 +1100,4 @@ declare class QuranVerses {
|
|
|
1090
1100
|
findRandom(options?: GetVerseOptions): Promise<Verse>;
|
|
1091
1101
|
}
|
|
1092
1102
|
|
|
1093
|
-
export { type VerseMediaResource as $, type Answer as A, type Translation as B, type ChapterId as C, type Transliteration as D, type Verse as E, CharType as F, type Juz as G, type HizbNumber as H, type Pagination as I, type JuzNumber as J, type RecitationResource as K, type RecitationInfoResource as L, type TranslationResource as M, type NormalizedVerseRecitation as N, type TranslationInfoResource as O, type PageNumber as P, QuranChapters as Q, type RubNumber as R, type SearchResponse as S, type TranslatedName as T, type TafsirResource as U, type VerseKey as V, type Word as W, type TafsirInfoResource as X, type RecitationStylesResource as Y, type LanguageResource as Z, type ChapterInfoResource as _, QuranAnswers as a, type ChapterReciterResource as a0, type ContentSyncResourceGroup as a1, type MushafMetadataSnapshotRecord as a2, type MushafPageSnapshotRecord as a3, type MushafFontAssetSnapshotRecord as a4, type MushafWordSnapshotRecord as a5, type MushafSnapshotRecord as a6, type WordByWordTranslationSnapshotRecord as a7, type
|
|
1103
|
+
export { type VerseMediaResource as $, type Answer as A, type Translation as B, type ChapterId as C, type Transliteration as D, type Verse as E, CharType as F, type Juz as G, type HizbNumber as H, type Pagination as I, type JuzNumber as J, type RecitationResource as K, type RecitationInfoResource as L, type TranslationResource as M, type NormalizedVerseRecitation as N, type TranslationInfoResource as O, type PageNumber as P, QuranChapters as Q, type RubNumber as R, type SearchResponse as S, type TranslatedName as T, type TafsirResource as U, type VerseKey as V, type Word as W, type TafsirInfoResource as X, type RecitationStylesResource as Y, type LanguageResource as Z, type ChapterInfoResource as _, QuranAnswers as a, type ChapterReciterResource as a0, type ContentSyncResourceGroup as a1, type MushafMetadataSnapshotRecord as a2, type MushafPageSnapshotRecord as a3, type MushafFontAssetSnapshotRecord as a4, type MushafWordSnapshotRecord as a5, type MushafSnapshotRecord as a6, type WordByWordTranslationSnapshotRecord as a7, type WordByWordTransliterationSnapshotRecord as a8, type ContentSyncMutationType as a9, type ContentSyncOptions as aa, type ContentResourceSnapshotOptions as ab, type ContentSyncMutation as ac, type ContentSyncResponse as ad, type ContentResourceSnapshot as ae, SearchNavigationType as af, type SearchResult as ag, type AnalyticsJsonValue as ah, type AnalyticsEvent as ai, type AnalyticsBatchRequest as aj, type AnalyticsBatchAccepted as ak, QuranVerses as b, QuranJuzs as c, QuranAudio as d, QuranHadithReferences as e, QuranResources as f, QuranSearch as g, type AnswerQuestion as h, type AnswersByAyahResponse as i, type AnswerCount as j, type AnswerCountWithinRangeResponse as k, type ChapterRecitation as l, type VerseRecitation as m, type AudioResponse as n, type Chapter as o, type ChapterInfo as p, type ChapterInfoResponse as q, type HadithReference as r, type HadithReferencesByAyahResponse as s, type HadithGrade as t, type HadithContent as u, type Hadith as v, type HadithsByAyahResponse as w, type HadithCountWithinRangeResponse as x, type Segment as y, type Tafsir as z };
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
|
-
"version": "3.
|
|
14
|
+
"version": "3.9.0",
|
|
15
15
|
"main": "dist/index.min.js",
|
|
16
16
|
"module": "dist/index.min.mjs",
|
|
17
17
|
"types": "dist/index.d.ts",
|
|
@@ -86,7 +86,8 @@
|
|
|
86
86
|
"scripts": {
|
|
87
87
|
"build": "tsup",
|
|
88
88
|
"dev": "tsup --watch",
|
|
89
|
-
"test": "vitest run",
|
|
89
|
+
"test": "vitest run && pnpm test:package",
|
|
90
|
+
"test:package": "npm run build && node ./test/smoke/app-state-package.cjs",
|
|
90
91
|
"test:dev": "vitest",
|
|
91
92
|
"test:coverage": "vitest run --coverage",
|
|
92
93
|
"smoke:local:server": "pnpm build && QURANJS_LOCAL_SMOKE=1 node ./test/smoke/local-server.cjs",
|
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
type ApiParams = Record<string, string | number | boolean | unknown[] | undefined | Record<string, boolean>>;
|
|
2
|
-
/**
|
|
3
|
-
* Base parameters that are common across most API endpoints
|
|
4
|
-
*/
|
|
5
|
-
interface BaseApiParams extends ApiParams {
|
|
6
|
-
/** Language for the response */
|
|
7
|
-
language?: Language;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Pagination parameters
|
|
11
|
-
*/
|
|
12
|
-
interface PaginationParams extends ApiParams {
|
|
13
|
-
/** Page number for pagination */
|
|
14
|
-
page?: number;
|
|
15
|
-
/** Number of items per page */
|
|
16
|
-
perPage?: number;
|
|
17
|
-
}
|
|
18
|
-
type BinaryString = "0" | "1";
|
|
19
|
-
declare enum SearchMode {
|
|
20
|
-
Advanced = "advanced",
|
|
21
|
-
Quick = "quick"
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Search parameters
|
|
25
|
-
*/
|
|
26
|
-
interface SearchParams extends BaseApiParams {
|
|
27
|
-
/** Search mode */
|
|
28
|
-
mode: SearchMode;
|
|
29
|
-
/** Search query */
|
|
30
|
-
query: string;
|
|
31
|
-
/** Filter translations */
|
|
32
|
-
filterTranslations?: string | string[];
|
|
33
|
-
/** For advanced search, limit to exact matches */
|
|
34
|
-
exactMatchesOnly?: BinaryString;
|
|
35
|
-
/** Include text in the response */
|
|
36
|
-
getText?: BinaryString;
|
|
37
|
-
/** Include highlighted text */
|
|
38
|
-
highlight?: BinaryString;
|
|
39
|
-
/** Quick search navigational results count */
|
|
40
|
-
navigationalResultsNumber?: number;
|
|
41
|
-
/** Quick search verse results count */
|
|
42
|
-
versesResultsNumber?: number;
|
|
43
|
-
/** Comma-separated list of indexes */
|
|
44
|
-
indexes?: string | string[];
|
|
45
|
-
/** Page number for pagination */
|
|
46
|
-
page?: number;
|
|
47
|
-
/** Number of results to return */
|
|
48
|
-
size?: number;
|
|
49
|
-
/** Translation IDs to use for language detection */
|
|
50
|
-
translationIds?: string | number | Array<string | number>;
|
|
51
|
-
/** Quran fields to include in verse filters */
|
|
52
|
-
fields?: Partial<Record<VerseField, boolean>>;
|
|
53
|
-
/** Translation fields to include in verse filters */
|
|
54
|
-
translationFields?: Partial<Record<TranslationField, boolean>>;
|
|
55
|
-
/** Word fields to include in verse filters */
|
|
56
|
-
wordFields?: Partial<Record<WordField, boolean>>;
|
|
57
|
-
/** Include word data in verse filters */
|
|
58
|
-
words?: boolean;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
type AuthService = "auth" | "quranReflect";
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Custom fetcher function type that matches the native fetch API
|
|
65
|
-
*/
|
|
66
|
-
type CustomFetcher = typeof fetch;
|
|
67
|
-
type RuntimeMode = "server" | "public";
|
|
68
|
-
type HTTPMethod = "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
|
|
69
|
-
interface QuranFetchClient {
|
|
70
|
-
fetch<T = unknown>(url: string, params?: ApiParams): Promise<T>;
|
|
71
|
-
}
|
|
72
|
-
type ApiService = "analytics" | "content" | "search" | AuthService | "oauth2";
|
|
73
|
-
interface ServiceEnvironmentConfig {
|
|
74
|
-
gatewayUrl?: string;
|
|
75
|
-
tokenHost?: string;
|
|
76
|
-
oauth2BaseUrl?: string;
|
|
77
|
-
analyticsBaseUrl?: string;
|
|
78
|
-
contentBaseUrl?: string;
|
|
79
|
-
searchBaseUrl?: string;
|
|
80
|
-
authBaseUrl?: string;
|
|
81
|
-
quranReflectBaseUrl?: string;
|
|
82
|
-
}
|
|
83
|
-
interface QuranClientConfig {
|
|
84
|
-
/** Client ID for authentication */
|
|
85
|
-
clientId: string;
|
|
86
|
-
/** Client secret for authentication */
|
|
87
|
-
clientSecret: string;
|
|
88
|
-
/** Legacy gateway base URL for content/search APIs */
|
|
89
|
-
contentBaseUrl?: string;
|
|
90
|
-
/** Legacy OAuth2 token host URL */
|
|
91
|
-
authBaseUrl?: string;
|
|
92
|
-
/** Custom fetch implementation */
|
|
93
|
-
fetch?: CustomFetcher;
|
|
94
|
-
/** Default parameters for all API calls */
|
|
95
|
-
defaults?: Partial<BaseApiParams>;
|
|
96
|
-
}
|
|
97
|
-
interface UserSession {
|
|
98
|
-
accessToken: string;
|
|
99
|
-
refreshToken?: string;
|
|
100
|
-
idToken?: string;
|
|
101
|
-
scope?: string;
|
|
102
|
-
tokenType?: string;
|
|
103
|
-
expiresAt?: number;
|
|
104
|
-
}
|
|
105
|
-
interface TokenStorage {
|
|
106
|
-
getSession?: () => UserSession | null | undefined | Promise<UserSession | null | undefined>;
|
|
107
|
-
setSession?: (session: UserSession | null) => void | Promise<void>;
|
|
108
|
-
clearSession?: () => void | Promise<void>;
|
|
109
|
-
}
|
|
110
|
-
interface BaseRuntimeClientConfig {
|
|
111
|
-
clientId: string;
|
|
112
|
-
fetch?: CustomFetcher;
|
|
113
|
-
defaults?: Partial<BaseApiParams>;
|
|
114
|
-
services?: ServiceEnvironmentConfig;
|
|
115
|
-
userSession?: UserSession;
|
|
116
|
-
storage?: TokenStorage;
|
|
117
|
-
}
|
|
118
|
-
interface ServerClientConfig extends BaseRuntimeClientConfig {
|
|
119
|
-
clientSecret: string;
|
|
120
|
-
}
|
|
121
|
-
interface PublicClientConfig extends BaseRuntimeClientConfig {
|
|
122
|
-
clientType: "public" | "confidential-proxy";
|
|
123
|
-
}
|
|
124
|
-
interface CachedToken {
|
|
125
|
-
value: string;
|
|
126
|
-
expiresAt: number;
|
|
127
|
-
}
|
|
128
|
-
interface TokenResponse {
|
|
129
|
-
access_token: string;
|
|
130
|
-
token_type?: string;
|
|
131
|
-
expires_in: number;
|
|
132
|
-
refresh_token?: string;
|
|
133
|
-
id_token?: string;
|
|
134
|
-
scope?: string;
|
|
135
|
-
}
|
|
136
|
-
interface OperationRequest {
|
|
137
|
-
path?: Record<string, string | number>;
|
|
138
|
-
query?: ApiParams;
|
|
139
|
-
body?: string | URLSearchParams | Record<string, unknown> | null;
|
|
140
|
-
headers?: Record<string, string>;
|
|
141
|
-
method?: HTTPMethod;
|
|
142
|
-
auth?: "auto" | "none" | "app" | "user";
|
|
143
|
-
accessToken?: string;
|
|
144
|
-
basicAuth?: {
|
|
145
|
-
username: string;
|
|
146
|
-
password: string;
|
|
147
|
-
};
|
|
148
|
-
contentType?: string;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
interface QuranReflectPostReference {
|
|
152
|
-
chapterId: number;
|
|
153
|
-
from: number;
|
|
154
|
-
to: number;
|
|
155
|
-
id?: string;
|
|
156
|
-
}
|
|
157
|
-
interface QuranReflectPostMention {
|
|
158
|
-
marker: string;
|
|
159
|
-
userId: string;
|
|
160
|
-
displayName: string;
|
|
161
|
-
}
|
|
162
|
-
type QuranReflectRoomPostStatus = 0 | 1 | 2;
|
|
163
|
-
interface CreateQuranReflectPostPayload {
|
|
164
|
-
body: string;
|
|
165
|
-
draft: boolean;
|
|
166
|
-
references: QuranReflectPostReference[];
|
|
167
|
-
mentions: QuranReflectPostMention[];
|
|
168
|
-
roomId?: number;
|
|
169
|
-
roomPostStatus?: QuranReflectRoomPostStatus;
|
|
170
|
-
postAsAuthorId?: string;
|
|
171
|
-
publishedAt?: string | Date;
|
|
172
|
-
}
|
|
173
|
-
type UpdateQuranReflectPostPayload = Partial<CreateQuranReflectPostPayload>;
|
|
174
|
-
interface QuranReflectPost {
|
|
175
|
-
id: number | string;
|
|
176
|
-
authorId?: string;
|
|
177
|
-
body?: string;
|
|
178
|
-
commentsCount?: number;
|
|
179
|
-
createdAt?: string;
|
|
180
|
-
discussionId?: number;
|
|
181
|
-
draft?: boolean;
|
|
182
|
-
estimatedReadingTime?: number;
|
|
183
|
-
featuredAt?: string;
|
|
184
|
-
global?: boolean;
|
|
185
|
-
hidden?: boolean;
|
|
186
|
-
languageId?: number;
|
|
187
|
-
languageName?: string;
|
|
188
|
-
likesCount?: number;
|
|
189
|
-
mentions?: QuranReflectPostMention[];
|
|
190
|
-
moderationStatus?: number;
|
|
191
|
-
postTypeId?: number | null;
|
|
192
|
-
postTypeName?: string;
|
|
193
|
-
publishedAt?: string;
|
|
194
|
-
pushedUpAt?: string;
|
|
195
|
-
references?: QuranReflectPostReference[];
|
|
196
|
-
removed?: boolean;
|
|
197
|
-
reported?: boolean;
|
|
198
|
-
reviewedAt?: string;
|
|
199
|
-
roomId?: number | null;
|
|
200
|
-
roomPostStatus?: number;
|
|
201
|
-
toxicityScore?: number;
|
|
202
|
-
updatedAt?: string;
|
|
203
|
-
verified?: boolean;
|
|
204
|
-
views?: number;
|
|
205
|
-
viewsCount?: number;
|
|
206
|
-
}
|
|
207
|
-
interface QuranReflectPostMutationResponse {
|
|
208
|
-
success: boolean;
|
|
209
|
-
data?: QuranReflectPost;
|
|
210
|
-
post?: QuranReflectPost;
|
|
211
|
-
error?: unknown;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
declare enum Language {
|
|
215
|
-
ARABIC = "ar",
|
|
216
|
-
ENGLISH = "en",
|
|
217
|
-
URDU = "ur",
|
|
218
|
-
BENGALI = "bn",
|
|
219
|
-
TURKISH = "tr",
|
|
220
|
-
SPANISH = "es",
|
|
221
|
-
GERMAN = "de",
|
|
222
|
-
BOSNIAN = "bs",
|
|
223
|
-
RUSSIAN = "ru",
|
|
224
|
-
ALBANIAN_AL = "al",
|
|
225
|
-
FRENCH = "fr",
|
|
226
|
-
DUTCH = "nl",
|
|
227
|
-
TAMIL = "ta",
|
|
228
|
-
TAJIK = "tg",
|
|
229
|
-
INDONESIAN = "id",
|
|
230
|
-
UZBEK = "uz",
|
|
231
|
-
VIETNAMESE = "vi",
|
|
232
|
-
CHINESE = "zh",
|
|
233
|
-
ITALIAN = "it",
|
|
234
|
-
JAPANESE = "ja",
|
|
235
|
-
MALAYALAM = "ml",
|
|
236
|
-
AMHARIC = "am",
|
|
237
|
-
KAZAKH = "kk",
|
|
238
|
-
PORTUGUESE = "pt",
|
|
239
|
-
TAGALOG = "tl",
|
|
240
|
-
THAI = "th",
|
|
241
|
-
KOREAN = "ko",
|
|
242
|
-
HINDI = "hi",
|
|
243
|
-
KURDISH = "ku",
|
|
244
|
-
HAUSA = "ha",
|
|
245
|
-
AZERI = "az",
|
|
246
|
-
SWAHILI = "sw",
|
|
247
|
-
PERSIAN = "fa",
|
|
248
|
-
SERBIAN = "sr",
|
|
249
|
-
MARANAO = "mrn",
|
|
250
|
-
AMAZIGH = "zgh",
|
|
251
|
-
ASSAMESE = "as",
|
|
252
|
-
BULGARIAN = "bg",
|
|
253
|
-
CHECHEN = "ce",
|
|
254
|
-
CZECH = "cs",
|
|
255
|
-
DIVEHI = "dv",
|
|
256
|
-
FINNISH = "fi",
|
|
257
|
-
GUJAARATI = "gu",
|
|
258
|
-
HEBREW = "he",
|
|
259
|
-
GEORGIAN = "ka",
|
|
260
|
-
CENTRAL_KHMER = "km",
|
|
261
|
-
GANDA = "lg",
|
|
262
|
-
MARATHI = "mr",
|
|
263
|
-
YORUBA = "yo",
|
|
264
|
-
MALAY = "ms",
|
|
265
|
-
NEPALI = "ne",
|
|
266
|
-
SWEDISH = "sv",
|
|
267
|
-
TELUGU = "te",
|
|
268
|
-
TATAR = "tt",
|
|
269
|
-
UYGHUR = "ug",
|
|
270
|
-
UKRAINIAN = "uk",
|
|
271
|
-
NORWEGIAN = "no",
|
|
272
|
-
OROMO = "om",
|
|
273
|
-
POLISH = "pl",
|
|
274
|
-
PASHTO = "ps",
|
|
275
|
-
ROMANIAN = "ro",
|
|
276
|
-
SINDHI = "sd",
|
|
277
|
-
NORTHERN_SAMI = "se",
|
|
278
|
-
SINHALA = "si",
|
|
279
|
-
SOMALI = "so",
|
|
280
|
-
ALBANIAN_SQ = "sq"
|
|
281
|
-
}
|
|
282
|
-
declare enum QuranFont {
|
|
283
|
-
MadaniV1 = "code_v1",
|
|
284
|
-
MadaniV2 = "code_v2",
|
|
285
|
-
Uthmani = "text_uthmani"
|
|
286
|
-
}
|
|
287
|
-
type VerseField = "chapterId" | "textUthmani" | "textUthmaniSimple" | "textImlaei" | "textImlaeiSimple" | "textIndopak" | "textIndopakNastaleeq" | "textUthmaniTajweed" | "imageUrl" | "imageWidth" | "codeV1" | "codeV2" | "v1Page" | "v2Page";
|
|
288
|
-
type WordField = "v1Page" | "v2Page" | "textUthmani" | "textImlaei" | "textIndopak" | "verseKey" | "location" | "codeV1" | "codeV2";
|
|
289
|
-
type TranslationField = "resourceName" | "verseId" | "languageId" | "languageName" | "verseKey" | "chapterId" | "verseNumber" | "juzNumber" | "hizbNumber" | "rubNumber" | "pageNumber";
|
|
290
|
-
type VerseRecitationField = "id" | "chapterId" | "segments" | "format";
|
|
291
|
-
|
|
292
|
-
export { type ApiParams as A, type BaseApiParams as B, type CustomFetcher as C, type HTTPMethod as H, Language as L, type OperationRequest as O, type PaginationParams as P, type QuranClientConfig as Q, type RuntimeMode as R, SearchMode as S, type TranslationField as T, type UserSession as U, type VerseField as V, type WordField as W, QuranFont as a, type VerseRecitationField as b, type BinaryString as c, type SearchParams as d, type QuranFetchClient as e, type ApiService as f, type ServiceEnvironmentConfig as g, type TokenStorage as h, type ServerClientConfig as i, type PublicClientConfig as j, type CachedToken as k, type TokenResponse as l, type QuranReflectPostReference as m, type QuranReflectPostMention as n, type QuranReflectRoomPostStatus as o, type CreateQuranReflectPostPayload as p, type UpdateQuranReflectPostPayload as q, type QuranReflectPost as r, type QuranReflectPostMutationResponse as s };
|