@quranjs/api 3.6.0 → 3.8.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.
@@ -350,7 +350,7 @@ interface ChapterReciterResource {
350
350
  format?: string;
351
351
  filesSize?: number;
352
352
  }
353
- type ContentSyncResourceGroup = "articles" | "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:*;mushafs:1;translations:1,6;word_by_word_translations:85`. */
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: "mushafs:1;translations:19;word_by_word_translations:85"
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("mushafs", 1)
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 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, type AnalyticsJsonValue as ag, type AnalyticsEvent as ah, type AnalyticsBatchRequest as ai, type AnalyticsBatchAccepted as aj, 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 };
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 };
@@ -350,7 +350,7 @@ interface ChapterReciterResource {
350
350
  format?: string;
351
351
  filesSize?: number;
352
352
  }
353
- type ContentSyncResourceGroup = "articles" | "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:*;mushafs:1;translations:1,6;word_by_word_translations:85`. */
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: "mushafs:1;translations:19;word_by_word_translations:85"
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("mushafs", 1)
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 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, type AnalyticsJsonValue as ag, type AnalyticsEvent as ah, type AnalyticsBatchRequest as ai, type AnalyticsBatchAccepted as aj, 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 };
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.6.0",
14
+ "version": "3.8.0",
15
15
  "main": "dist/index.min.js",
16
16
  "module": "dist/index.min.mjs",
17
17
  "types": "dist/index.d.ts",
@@ -57,9 +57,9 @@
57
57
  "tsup": "^8.5.0",
58
58
  "typescript": "^5.9.2",
59
59
  "vitest": "^3.2.4",
60
- "@quranjs/tsconfig": "0.1.0",
61
60
  "@quranjs/eslint-config": "0.3.0",
62
- "@quranjs/prettier-config": "0.1.0"
61
+ "@quranjs/prettier-config": "0.1.0",
62
+ "@quranjs/tsconfig": "0.1.0"
63
63
  },
64
64
  "prettier": "@quranjs/prettier-config",
65
65
  "size-limit": [