@quranjs/api 1.3.0 → 1.4.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/dist/api.cjs.development.js +30 -30
- package/dist/api.cjs.development.js.map +1 -1
- package/dist/api.cjs.production.min.js.map +1 -1
- package/dist/api.esm.js +30 -30
- package/dist/api.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/sdk/v4/audio.ts +22 -22
- package/src/sdk/v4/chapters.ts +9 -9
- package/src/sdk/v4/resources.ts +23 -23
- package/src/sdk/v4/search.ts +6 -6
package/dist/api.esm.js
CHANGED
|
@@ -1312,7 +1312,7 @@ var getChapterOptions = function getChapterOptions(options) {
|
|
|
1312
1312
|
/**
|
|
1313
1313
|
* Get all chapters.
|
|
1314
1314
|
* @description https://quran.api-docs.io/v4/chapters/list-chapters
|
|
1315
|
-
* @param {
|
|
1315
|
+
* @param {GetChapterOptions} options
|
|
1316
1316
|
* @example
|
|
1317
1317
|
* quran.v4.chapters.findAll()
|
|
1318
1318
|
*/
|
|
@@ -1351,7 +1351,7 @@ var findAll$1 = /*#__PURE__*/function () {
|
|
|
1351
1351
|
* Get chapter by id.
|
|
1352
1352
|
* @description https://quran.api-docs.io/v4/chapters/get-chapter
|
|
1353
1353
|
* @param {ChapterId} id chapter id, minimum 1, maximum 114
|
|
1354
|
-
* @param {
|
|
1354
|
+
* @param {GetChapterOptions} options
|
|
1355
1355
|
* @example
|
|
1356
1356
|
* quran.v4.chapters.findById('1')
|
|
1357
1357
|
* quran.v4.chapters.findById('114')
|
|
@@ -1399,7 +1399,7 @@ var findById = /*#__PURE__*/function () {
|
|
|
1399
1399
|
* Get chapter info by id.
|
|
1400
1400
|
* @description https://quran.api-docs.io/v4/chapters/chapter_info
|
|
1401
1401
|
* @param {ChapterId} id chapter id, minimum 1, maximum 114
|
|
1402
|
-
* @param {
|
|
1402
|
+
* @param {GetChapterOptions} options
|
|
1403
1403
|
* @example
|
|
1404
1404
|
* quran.v4.chapters.findInfoById('1')
|
|
1405
1405
|
* quran.v4.chapters.findInfoById('114')
|
|
@@ -1882,7 +1882,7 @@ var getVerseRecitationsOptions = function getVerseRecitationsOptions(options) {
|
|
|
1882
1882
|
* Get all chapter recitations for specific reciter
|
|
1883
1883
|
* @description https://quran.api-docs.io/v4/audio-recitations/list-of-all-surah-audio-files-for-specific-reciter
|
|
1884
1884
|
* @param {string} reciterId
|
|
1885
|
-
* @param {
|
|
1885
|
+
* @param {GetChapterRecitationOptions} options
|
|
1886
1886
|
* @example
|
|
1887
1887
|
* quran.v4.audio.findAllChapterRecitations('2')
|
|
1888
1888
|
*/
|
|
@@ -1922,7 +1922,7 @@ var findAllChapterRecitations = /*#__PURE__*/function () {
|
|
|
1922
1922
|
* @description https://quran.api-docs.io/v4/audio-recitations/get-single-surah-audio-for-specific-reciter
|
|
1923
1923
|
* @param {ChapterId} chapterId
|
|
1924
1924
|
* @param {string} reciterId
|
|
1925
|
-
* @param {
|
|
1925
|
+
* @param {GetChapterRecitationOptions} options
|
|
1926
1926
|
* @example
|
|
1927
1927
|
* quran.v4.audio.findChapterRecitationById('1', '2') // first chapter recitation for reciter 2
|
|
1928
1928
|
*/
|
|
@@ -1970,7 +1970,7 @@ var findChapterRecitationById = /*#__PURE__*/function () {
|
|
|
1970
1970
|
* @description https://quran.api-docs.io/v4/audio-recitations/get-ayah-recitations-for-specific-surah
|
|
1971
1971
|
* @param {ChapterId} chapterId
|
|
1972
1972
|
* @param {string} recitationId
|
|
1973
|
-
* @param {
|
|
1973
|
+
* @param {GetVerseRecitationOptions} options
|
|
1974
1974
|
* @example
|
|
1975
1975
|
* quran.v4.audio.findVerseRecitationsByChapter('1', '2')
|
|
1976
1976
|
*/
|
|
@@ -2062,7 +2062,7 @@ var findVerseRecitationsByJuz = /*#__PURE__*/function () {
|
|
|
2062
2062
|
* @description https://quran.api-docs.io/v4/audio-recitations/get-ayah-recitations-for-specific-madani-mushaf-page
|
|
2063
2063
|
* @param {PageNumber} page
|
|
2064
2064
|
* @param {string} recitationId
|
|
2065
|
-
* @param {
|
|
2065
|
+
* @param {GetVerseRecitationOptions} options
|
|
2066
2066
|
* @example
|
|
2067
2067
|
* quran.v4.audio.findVerseRecitationsByPage('1', '2')
|
|
2068
2068
|
*/
|
|
@@ -2108,7 +2108,7 @@ var findVerseRecitationsByPage = /*#__PURE__*/function () {
|
|
|
2108
2108
|
* @description https://quran.api-docs.io/v4/audio-recitations/get-ayah-recitations-for-specific-rub
|
|
2109
2109
|
* @param {RubNumber} rub
|
|
2110
2110
|
* @param {string} recitationId
|
|
2111
|
-
* @param {
|
|
2111
|
+
* @param {GetVerseRecitationOptions} options
|
|
2112
2112
|
* @example
|
|
2113
2113
|
* quran.v4.audio.findVerseRecitationsByRub('1', '2')
|
|
2114
2114
|
*/
|
|
@@ -2154,7 +2154,7 @@ var findVerseRecitationsByRub = /*#__PURE__*/function () {
|
|
|
2154
2154
|
* @description https://quran.api-docs.io/v4/audio-recitations/get-ayah-recitations-for-specific-hizb
|
|
2155
2155
|
* @param {HizbNumber} hizb
|
|
2156
2156
|
* @param {string} recitationId
|
|
2157
|
-
* @param {
|
|
2157
|
+
* @param {GetVerseRecitationOptions} options
|
|
2158
2158
|
* @example
|
|
2159
2159
|
* quran.v4.audio.findVerseRecitationsByHizb('1', '2')
|
|
2160
2160
|
*/
|
|
@@ -2196,11 +2196,11 @@ var findVerseRecitationsByHizb = /*#__PURE__*/function () {
|
|
|
2196
2196
|
};
|
|
2197
2197
|
}();
|
|
2198
2198
|
/**
|
|
2199
|
-
* Get all verse audio files for a specific reciter and a specific
|
|
2199
|
+
* Get all verse audio files for a specific reciter and a specific verse
|
|
2200
2200
|
* @description https://quran.api-docs.io/v4/audio-recitations/get-ayah-recitations-for-specific-ayah
|
|
2201
2201
|
* @param {VerseKey} key
|
|
2202
2202
|
* @param {string} recitationId
|
|
2203
|
-
* @param {
|
|
2203
|
+
* @param {GetVerseRecitationOptions} options
|
|
2204
2204
|
* @example
|
|
2205
2205
|
* quran.v4.audio.findVerseRecitationsByKey('1:1', '2')
|
|
2206
2206
|
*/
|
|
@@ -2269,7 +2269,7 @@ var getResourcesOptions = function getResourcesOptions(options) {
|
|
|
2269
2269
|
/**
|
|
2270
2270
|
* Get all recitations.
|
|
2271
2271
|
* @description https://quran.api-docs.io/v4/resources/recitations
|
|
2272
|
-
* @param {
|
|
2272
|
+
* @param {GetResourceOptions} options
|
|
2273
2273
|
* @example
|
|
2274
2274
|
* quran.v4.resources.findAllRecitations()
|
|
2275
2275
|
*/
|
|
@@ -2309,11 +2309,11 @@ var findAllRecitations = /*#__PURE__*/function () {
|
|
|
2309
2309
|
* Get all recitation info.
|
|
2310
2310
|
* @description https://quran.api-docs.io/v4/resources/recitation-info
|
|
2311
2311
|
* @param {string} id recitation id
|
|
2312
|
-
* @param {
|
|
2312
|
+
* @param {GetResourceOptions} options
|
|
2313
2313
|
* @example
|
|
2314
2314
|
* quran.v4.resources.findRecitationInfo('1')
|
|
2315
2315
|
*/
|
|
2316
|
-
// const findRecitationInfo = async (id: string, options?:
|
|
2316
|
+
// const findRecitationInfo = async (id: string, options?: GetResourceOptions) => {
|
|
2317
2317
|
// const params = getResourcesOptions(options);
|
|
2318
2318
|
// const { info } = await fetcher<{
|
|
2319
2319
|
// info: RecitationInfoResource;
|
|
@@ -2324,7 +2324,7 @@ var findAllRecitations = /*#__PURE__*/function () {
|
|
|
2324
2324
|
/**
|
|
2325
2325
|
* Get all translations.
|
|
2326
2326
|
* @description https://quran.api-docs.io/v4/resources/translations
|
|
2327
|
-
* @param {
|
|
2327
|
+
* @param {GetResourceOptions} options
|
|
2328
2328
|
* @example
|
|
2329
2329
|
* quran.v4.resources.findAllTranslations()
|
|
2330
2330
|
*/
|
|
@@ -2364,11 +2364,11 @@ var findAllTranslations = /*#__PURE__*/function () {
|
|
|
2364
2364
|
* Get translation info.
|
|
2365
2365
|
* @description https://quran.api-docs.io/v4/resources/translation-info
|
|
2366
2366
|
* @param {string} id translation id
|
|
2367
|
-
* @param {
|
|
2367
|
+
* @param {GetResourceOptions} options
|
|
2368
2368
|
* @example
|
|
2369
2369
|
* quran.v4.resources.findTranslationInfo('169')
|
|
2370
2370
|
*/
|
|
2371
|
-
// const findTranslationInfo = async (id: string, options?:
|
|
2371
|
+
// const findTranslationInfo = async (id: string, options?: GetResourceOptions) => {
|
|
2372
2372
|
// const params = getResourcesOptions(options);
|
|
2373
2373
|
// const { info } = await fetcher<{
|
|
2374
2374
|
// info: TranslationInfoResource;
|
|
@@ -2379,7 +2379,7 @@ var findAllTranslations = /*#__PURE__*/function () {
|
|
|
2379
2379
|
/**
|
|
2380
2380
|
* Get all tafsirs.
|
|
2381
2381
|
* @description https://quran.api-docs.io/v4/resources/tafsirs
|
|
2382
|
-
* @param {
|
|
2382
|
+
* @param {GetResourceOptions} options
|
|
2383
2383
|
* @example
|
|
2384
2384
|
* quran.v4.resources.findAllTafsirs()
|
|
2385
2385
|
*/
|
|
@@ -2419,11 +2419,11 @@ var findAllTafsirs = /*#__PURE__*/function () {
|
|
|
2419
2419
|
* Get tafsir info.
|
|
2420
2420
|
* @description https://quran.api-docs.io/v4/resources/tafsirs-info
|
|
2421
2421
|
* @param {string} id tafsir id
|
|
2422
|
-
* @param {
|
|
2422
|
+
* @param {GetResourceOptions} options
|
|
2423
2423
|
* @example
|
|
2424
2424
|
* quran.v4.resources.findTranslationInfo('1')
|
|
2425
2425
|
*/
|
|
2426
|
-
// const findTafsirInfo = async (id: string, options?:
|
|
2426
|
+
// const findTafsirInfo = async (id: string, options?: GetResourceOptions) => {
|
|
2427
2427
|
// const params = getResourcesOptions(options);
|
|
2428
2428
|
// const { info } = await fetcher<{
|
|
2429
2429
|
// info: TafsirInfoResource;
|
|
@@ -2470,7 +2470,7 @@ var findAllRecitationStyles = /*#__PURE__*/function () {
|
|
|
2470
2470
|
/**
|
|
2471
2471
|
* Get all languages.
|
|
2472
2472
|
* @description https://quran.api-docs.io/v4/resources/languages
|
|
2473
|
-
* @param {
|
|
2473
|
+
* @param {GetResourceOptions} options
|
|
2474
2474
|
* @example
|
|
2475
2475
|
* quran.v4.resources.findAllLanguages()
|
|
2476
2476
|
*/
|
|
@@ -2508,7 +2508,7 @@ var findAllLanguages = /*#__PURE__*/function () {
|
|
|
2508
2508
|
/**
|
|
2509
2509
|
* Get all chapter infos.
|
|
2510
2510
|
* @description https://quran.api-docs.io/v4/resources/chapter-info
|
|
2511
|
-
* @param {
|
|
2511
|
+
* @param {GetResourceOptions} options
|
|
2512
2512
|
* @example
|
|
2513
2513
|
* quran.v4.resources.findAllChapterInfos()
|
|
2514
2514
|
*/
|
|
@@ -2546,7 +2546,7 @@ var findAllChapterInfos = /*#__PURE__*/function () {
|
|
|
2546
2546
|
/**
|
|
2547
2547
|
* Get verse media.
|
|
2548
2548
|
* @description https://quran.api-docs.io/v4/resources/verse_media
|
|
2549
|
-
* @param {
|
|
2549
|
+
* @param {GetResourceOptions} options
|
|
2550
2550
|
* @example
|
|
2551
2551
|
* quran.v4.resources.findVerseMedia()
|
|
2552
2552
|
*/
|
|
@@ -2584,7 +2584,7 @@ var findVerseMedia = /*#__PURE__*/function () {
|
|
|
2584
2584
|
/**
|
|
2585
2585
|
* Get all chapter reciters.
|
|
2586
2586
|
* @description https://quran.api-docs.io/v4/resources/list-of-chapter-reciters
|
|
2587
|
-
* @param {
|
|
2587
|
+
* @param {GetResourceOptions} options
|
|
2588
2588
|
* @example
|
|
2589
2589
|
* quran.v4.resources.findAllChapterReciters()
|
|
2590
2590
|
*/
|
|
@@ -2653,13 +2653,13 @@ var getSearchOptions = function getSearchOptions(q, options) {
|
|
|
2653
2653
|
/**
|
|
2654
2654
|
* Search
|
|
2655
2655
|
* @description https://quran.api-docs.io/v4/search/KfCmk4KQYbtyK9adj
|
|
2656
|
-
* @param q search query
|
|
2657
|
-
* @param
|
|
2656
|
+
* @param {string} q search query
|
|
2657
|
+
* @param {SearchOptions} options
|
|
2658
2658
|
* @example
|
|
2659
|
-
* quran.v4.search.search('
|
|
2660
|
-
* quran.v4.search.search('
|
|
2661
|
-
* quran.v4.search.search('
|
|
2662
|
-
* quran.v4.search.search('
|
|
2659
|
+
* quran.v4.search.search('نور')
|
|
2660
|
+
* quran.v4.search.search('نور', { language: Language.ENGLISH })
|
|
2661
|
+
* quran.v4.search.search('نور', { language: Language.ENGLISH, size: 10 })
|
|
2662
|
+
* quran.v4.search.search('نور', { language: Language.ENGLISH, page: 2 })
|
|
2663
2663
|
*/
|
|
2664
2664
|
|
|
2665
2665
|
|