@quranjs/api 3.4.1 → 3.5.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 +22 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs.map +1 -1
- package/dist/public.min.js +1 -1
- package/dist/public.min.js.map +1 -1
- package/dist/public.min.mjs +1 -1
- package/dist/public.min.mjs.map +1 -1
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.min.js.map +1 -1
- package/dist/server.min.mjs +1 -1
- package/dist/server.min.mjs.map +1 -1
- package/dist/{verses-C-pY2crx.d.mts → verses-BiAZ4lTB.d.mts} +71 -5
- package/dist/{verses-BNxy6beN.d.ts → verses-CMsmJnhG.d.ts} +71 -5
- package/package.json +2 -2
|
@@ -350,7 +350,73 @@ interface ChapterReciterResource {
|
|
|
350
350
|
format?: string;
|
|
351
351
|
filesSize?: number;
|
|
352
352
|
}
|
|
353
|
-
type ContentSyncResourceGroup = "articles" | "recitations" | "tafsirs" | "translations" | "word_by_word_translations";
|
|
353
|
+
type ContentSyncResourceGroup = "articles" | "mushafs" | "recitations" | "tafsirs" | "translations" | "word_by_word_translations";
|
|
354
|
+
interface MushafMetadataSnapshotRecord extends Record<string, unknown> {
|
|
355
|
+
recordType: "mushaf";
|
|
356
|
+
id: number;
|
|
357
|
+
resourceContentId: number;
|
|
358
|
+
name: string;
|
|
359
|
+
description: string | null;
|
|
360
|
+
pagesCount: number;
|
|
361
|
+
linesPerPage: number;
|
|
362
|
+
defaultFontName: string;
|
|
363
|
+
mappingMode: string;
|
|
364
|
+
qirat: {
|
|
365
|
+
id: number;
|
|
366
|
+
name: string;
|
|
367
|
+
} | null;
|
|
368
|
+
}
|
|
369
|
+
interface MushafPageSnapshotRecord extends Record<string, unknown> {
|
|
370
|
+
recordType: "mushaf_page";
|
|
371
|
+
id: number;
|
|
372
|
+
mushafId: number;
|
|
373
|
+
pageNumber: number;
|
|
374
|
+
firstVerseId: number | null;
|
|
375
|
+
lastVerseId: number | null;
|
|
376
|
+
firstWordId: number | null;
|
|
377
|
+
lastWordId: number | null;
|
|
378
|
+
versesCount: number | null;
|
|
379
|
+
verseMapping: Record<string, unknown> | null;
|
|
380
|
+
updatedAt: string;
|
|
381
|
+
}
|
|
382
|
+
interface MushafFontAssetSnapshotRecord extends Record<string, unknown> {
|
|
383
|
+
recordType: "font_asset";
|
|
384
|
+
id: number;
|
|
385
|
+
assetKey: string;
|
|
386
|
+
mushafId: number;
|
|
387
|
+
pageNumber: number | null;
|
|
388
|
+
fontFamily: string;
|
|
389
|
+
format: string;
|
|
390
|
+
mimeType: string;
|
|
391
|
+
url: string;
|
|
392
|
+
sha256: string;
|
|
393
|
+
byteSize: number;
|
|
394
|
+
version: string;
|
|
395
|
+
provider: string;
|
|
396
|
+
licenseName: string;
|
|
397
|
+
licenseUrl: string | null;
|
|
398
|
+
attribution: string | null;
|
|
399
|
+
updatedAt: string;
|
|
400
|
+
}
|
|
401
|
+
interface MushafWordSnapshotRecord extends Record<string, unknown> {
|
|
402
|
+
recordType: "mushaf_word";
|
|
403
|
+
id: number;
|
|
404
|
+
mushafId: number;
|
|
405
|
+
wordId: number;
|
|
406
|
+
verseId: number;
|
|
407
|
+
sourceVerseId: number | null;
|
|
408
|
+
text: string | null;
|
|
409
|
+
charTypeId: number | null;
|
|
410
|
+
charTypeName: string | null;
|
|
411
|
+
pageNumber: number | null;
|
|
412
|
+
lineNumber: number | null;
|
|
413
|
+
positionInVerse: number | null;
|
|
414
|
+
positionInLine: number | null;
|
|
415
|
+
positionInPage: number | null;
|
|
416
|
+
cssClass: string | null;
|
|
417
|
+
cssStyle: string | null;
|
|
418
|
+
}
|
|
419
|
+
type MushafSnapshotRecord = MushafMetadataSnapshotRecord | MushafPageSnapshotRecord | MushafFontAssetSnapshotRecord | MushafWordSnapshotRecord;
|
|
354
420
|
interface WordByWordTranslationSnapshotRecord extends Record<string, unknown> {
|
|
355
421
|
id: number;
|
|
356
422
|
resourceContentId: number;
|
|
@@ -364,7 +430,7 @@ interface WordByWordTranslationSnapshotRecord extends Record<string, unknown> {
|
|
|
364
430
|
}
|
|
365
431
|
type ContentSyncMutationType = "RESOURCE_CREATE" | "RESOURCE_UPDATE" | "RESOURCE_DELETE" | "ROW_CREATE" | "ROW_UPDATE" | "ROW_DELETE" | "RESOURCE_INVALIDATE";
|
|
366
432
|
interface ContentSyncOptions extends ApiParams {
|
|
367
|
-
/** Resource filter, e.g. `articles:*;translations:1,6;word_by_word_translations:85`. */
|
|
433
|
+
/** Resource filter, e.g. `articles:*;mushafs:1;translations:1,6;word_by_word_translations:85`. */
|
|
368
434
|
resources?: string;
|
|
369
435
|
/** Set to true for the initial sync. */
|
|
370
436
|
bootstrap?: boolean;
|
|
@@ -869,7 +935,7 @@ declare class QuranResources {
|
|
|
869
935
|
* @example
|
|
870
936
|
* client.resources.sync({
|
|
871
937
|
* bootstrap: true,
|
|
872
|
-
* resources: "translations:19;word_by_word_translations:85"
|
|
938
|
+
* resources: "mushafs:1;translations:19;word_by_word_translations:85"
|
|
873
939
|
* })
|
|
874
940
|
*/
|
|
875
941
|
sync<TData extends Record<string, unknown> = Record<string, unknown>>(options?: ContentSyncOptions): Promise<ContentSyncResponse<TData>>;
|
|
@@ -879,7 +945,7 @@ declare class QuranResources {
|
|
|
879
945
|
* @param {string | number} id
|
|
880
946
|
* @param {ContentResourceSnapshotOptions} options
|
|
881
947
|
* @example
|
|
882
|
-
* client.resources.findSnapshot("
|
|
948
|
+
* client.resources.findSnapshot("mushafs", 1)
|
|
883
949
|
*/
|
|
884
950
|
findSnapshot<TRecord extends Record<string, unknown> = Record<string, unknown>>(resourceGroup: ContentSyncResourceGroup, id: string | number, options?: ContentResourceSnapshotOptions): Promise<ContentResourceSnapshot<TRecord>>;
|
|
885
951
|
}
|
|
@@ -987,4 +1053,4 @@ declare class QuranVerses {
|
|
|
987
1053
|
findRandom(options?: GetVerseOptions): Promise<Verse>;
|
|
988
1054
|
}
|
|
989
1055
|
|
|
990
|
-
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
|
|
1056
|
+
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 ContentSyncMutationType as a8, type ContentSyncOptions as a9, type ContentResourceSnapshotOptions as aa, type ContentSyncMutation as ab, type ContentSyncResponse as ac, type ContentResourceSnapshot as ad, SearchNavigationType as ae, type SearchResult as af, 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 };
|
|
@@ -350,7 +350,73 @@ interface ChapterReciterResource {
|
|
|
350
350
|
format?: string;
|
|
351
351
|
filesSize?: number;
|
|
352
352
|
}
|
|
353
|
-
type ContentSyncResourceGroup = "articles" | "recitations" | "tafsirs" | "translations" | "word_by_word_translations";
|
|
353
|
+
type ContentSyncResourceGroup = "articles" | "mushafs" | "recitations" | "tafsirs" | "translations" | "word_by_word_translations";
|
|
354
|
+
interface MushafMetadataSnapshotRecord extends Record<string, unknown> {
|
|
355
|
+
recordType: "mushaf";
|
|
356
|
+
id: number;
|
|
357
|
+
resourceContentId: number;
|
|
358
|
+
name: string;
|
|
359
|
+
description: string | null;
|
|
360
|
+
pagesCount: number;
|
|
361
|
+
linesPerPage: number;
|
|
362
|
+
defaultFontName: string;
|
|
363
|
+
mappingMode: string;
|
|
364
|
+
qirat: {
|
|
365
|
+
id: number;
|
|
366
|
+
name: string;
|
|
367
|
+
} | null;
|
|
368
|
+
}
|
|
369
|
+
interface MushafPageSnapshotRecord extends Record<string, unknown> {
|
|
370
|
+
recordType: "mushaf_page";
|
|
371
|
+
id: number;
|
|
372
|
+
mushafId: number;
|
|
373
|
+
pageNumber: number;
|
|
374
|
+
firstVerseId: number | null;
|
|
375
|
+
lastVerseId: number | null;
|
|
376
|
+
firstWordId: number | null;
|
|
377
|
+
lastWordId: number | null;
|
|
378
|
+
versesCount: number | null;
|
|
379
|
+
verseMapping: Record<string, unknown> | null;
|
|
380
|
+
updatedAt: string;
|
|
381
|
+
}
|
|
382
|
+
interface MushafFontAssetSnapshotRecord extends Record<string, unknown> {
|
|
383
|
+
recordType: "font_asset";
|
|
384
|
+
id: number;
|
|
385
|
+
assetKey: string;
|
|
386
|
+
mushafId: number;
|
|
387
|
+
pageNumber: number | null;
|
|
388
|
+
fontFamily: string;
|
|
389
|
+
format: string;
|
|
390
|
+
mimeType: string;
|
|
391
|
+
url: string;
|
|
392
|
+
sha256: string;
|
|
393
|
+
byteSize: number;
|
|
394
|
+
version: string;
|
|
395
|
+
provider: string;
|
|
396
|
+
licenseName: string;
|
|
397
|
+
licenseUrl: string | null;
|
|
398
|
+
attribution: string | null;
|
|
399
|
+
updatedAt: string;
|
|
400
|
+
}
|
|
401
|
+
interface MushafWordSnapshotRecord extends Record<string, unknown> {
|
|
402
|
+
recordType: "mushaf_word";
|
|
403
|
+
id: number;
|
|
404
|
+
mushafId: number;
|
|
405
|
+
wordId: number;
|
|
406
|
+
verseId: number;
|
|
407
|
+
sourceVerseId: number | null;
|
|
408
|
+
text: string | null;
|
|
409
|
+
charTypeId: number | null;
|
|
410
|
+
charTypeName: string | null;
|
|
411
|
+
pageNumber: number | null;
|
|
412
|
+
lineNumber: number | null;
|
|
413
|
+
positionInVerse: number | null;
|
|
414
|
+
positionInLine: number | null;
|
|
415
|
+
positionInPage: number | null;
|
|
416
|
+
cssClass: string | null;
|
|
417
|
+
cssStyle: string | null;
|
|
418
|
+
}
|
|
419
|
+
type MushafSnapshotRecord = MushafMetadataSnapshotRecord | MushafPageSnapshotRecord | MushafFontAssetSnapshotRecord | MushafWordSnapshotRecord;
|
|
354
420
|
interface WordByWordTranslationSnapshotRecord extends Record<string, unknown> {
|
|
355
421
|
id: number;
|
|
356
422
|
resourceContentId: number;
|
|
@@ -364,7 +430,7 @@ interface WordByWordTranslationSnapshotRecord extends Record<string, unknown> {
|
|
|
364
430
|
}
|
|
365
431
|
type ContentSyncMutationType = "RESOURCE_CREATE" | "RESOURCE_UPDATE" | "RESOURCE_DELETE" | "ROW_CREATE" | "ROW_UPDATE" | "ROW_DELETE" | "RESOURCE_INVALIDATE";
|
|
366
432
|
interface ContentSyncOptions extends ApiParams {
|
|
367
|
-
/** Resource filter, e.g. `articles:*;translations:1,6;word_by_word_translations:85`. */
|
|
433
|
+
/** Resource filter, e.g. `articles:*;mushafs:1;translations:1,6;word_by_word_translations:85`. */
|
|
368
434
|
resources?: string;
|
|
369
435
|
/** Set to true for the initial sync. */
|
|
370
436
|
bootstrap?: boolean;
|
|
@@ -869,7 +935,7 @@ declare class QuranResources {
|
|
|
869
935
|
* @example
|
|
870
936
|
* client.resources.sync({
|
|
871
937
|
* bootstrap: true,
|
|
872
|
-
* resources: "translations:19;word_by_word_translations:85"
|
|
938
|
+
* resources: "mushafs:1;translations:19;word_by_word_translations:85"
|
|
873
939
|
* })
|
|
874
940
|
*/
|
|
875
941
|
sync<TData extends Record<string, unknown> = Record<string, unknown>>(options?: ContentSyncOptions): Promise<ContentSyncResponse<TData>>;
|
|
@@ -879,7 +945,7 @@ declare class QuranResources {
|
|
|
879
945
|
* @param {string | number} id
|
|
880
946
|
* @param {ContentResourceSnapshotOptions} options
|
|
881
947
|
* @example
|
|
882
|
-
* client.resources.findSnapshot("
|
|
948
|
+
* client.resources.findSnapshot("mushafs", 1)
|
|
883
949
|
*/
|
|
884
950
|
findSnapshot<TRecord extends Record<string, unknown> = Record<string, unknown>>(resourceGroup: ContentSyncResourceGroup, id: string | number, options?: ContentResourceSnapshotOptions): Promise<ContentResourceSnapshot<TRecord>>;
|
|
885
951
|
}
|
|
@@ -987,4 +1053,4 @@ declare class QuranVerses {
|
|
|
987
1053
|
findRandom(options?: GetVerseOptions): Promise<Verse>;
|
|
988
1054
|
}
|
|
989
1055
|
|
|
990
|
-
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
|
|
1056
|
+
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 ContentSyncMutationType as a8, type ContentSyncOptions as a9, type ContentResourceSnapshotOptions as aa, type ContentSyncMutation as ab, type ContentSyncResponse as ac, type ContentResourceSnapshot as ad, SearchNavigationType as ae, type SearchResult as af, 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.5.0",
|
|
15
15
|
"main": "dist/index.min.js",
|
|
16
16
|
"module": "dist/index.min.mjs",
|
|
17
17
|
"types": "dist/index.d.ts",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"tsup": "^8.5.0",
|
|
58
58
|
"typescript": "^5.9.2",
|
|
59
59
|
"vitest": "^3.2.4",
|
|
60
|
-
"@quranjs/prettier-config": "0.1.0",
|
|
61
60
|
"@quranjs/eslint-config": "0.3.0",
|
|
61
|
+
"@quranjs/prettier-config": "0.1.0",
|
|
62
62
|
"@quranjs/tsconfig": "0.1.0"
|
|
63
63
|
},
|
|
64
64
|
"prettier": "@quranjs/prettier-config",
|