@quranjs/api 1.7.1 → 1.7.2
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 +1 -1
- package/dist/index.d.ts +14 -0
- package/dist/index.min.js +13 -0
- package/dist/index.min.js.map +1 -0
- package/dist/index.min.mjs +6 -0
- package/dist/index.min.mjs.map +1 -0
- package/dist/index.umd.js +886 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/index.umd.min.js +53 -0
- package/dist/index.umd.min.js.map +1 -0
- package/package.json +24 -9
- package/dist/index.js +0 -13
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -6
- package/dist/index.mjs.map +0 -1
- package/src/index.ts +0 -2
- package/src/sdk/index.ts +0 -9
- package/src/sdk/utils.ts +0 -239
- package/src/sdk/v4/_fetcher.ts +0 -83
- package/src/sdk/v4/audio.ts +0 -246
- package/src/sdk/v4/chapters.ts +0 -80
- package/src/sdk/v4/index.ts +0 -17
- package/src/sdk/v4/juzs.ts +0 -22
- package/src/sdk/v4/resources.ts +0 -220
- package/src/sdk/v4/search.ts +0 -41
- package/src/sdk/v4/verses.ts +0 -234
- package/src/types/BaseApiOptions.ts +0 -6
- package/src/types/ChapterId.ts +0 -4
- package/src/types/FetchFn.ts +0 -1
- package/src/types/HizbNumber.ts +0 -4
- package/src/types/JuzNumber.ts +0 -4
- package/src/types/PageNumber.ts +0 -4
- package/src/types/RubNumber.ts +0 -4
- package/src/types/VerseKey.ts +0 -117
- package/src/types/api/ApiResponses.ts +0 -19
- package/src/types/api/AudioData.ts +0 -20
- package/src/types/api/AudioResponse.ts +0 -9
- package/src/types/api/Chapter.ts +0 -15
- package/src/types/api/ChapterInfo.ts +0 -8
- package/src/types/api/Footnote.ts +0 -6
- package/src/types/api/Juz.ts +0 -8
- package/src/types/api/Pagination.ts +0 -7
- package/src/types/api/Reciter.ts +0 -21
- package/src/types/api/Resources.ts +0 -81
- package/src/types/api/Segment.ts +0 -4
- package/src/types/api/Tafsir.ts +0 -7
- package/src/types/api/TafsirInfo.ts +0 -10
- package/src/types/api/TranslatedName.ts +0 -4
- package/src/types/api/Translation.ts +0 -21
- package/src/types/api/Transliteration.ts +0 -4
- package/src/types/api/Verse.ts +0 -35
- package/src/types/api/Word.ts +0 -30
- package/src/types/api/index.ts +0 -18
- package/src/types/index.ts +0 -136
- package/src/types/utils.ts +0 -24
- package/src/utils/misc.ts +0 -3
package/src/types/api/Verse.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { VerseKey } from '../VerseKey';
|
|
2
|
-
import { AudioResponse } from './AudioResponse';
|
|
3
|
-
import { Tafsir } from './Tafsir';
|
|
4
|
-
import { Translation } from './Translation';
|
|
5
|
-
import { Word } from './Word';
|
|
6
|
-
|
|
7
|
-
export interface Verse {
|
|
8
|
-
id: number;
|
|
9
|
-
verseNumber: number;
|
|
10
|
-
verseKey: VerseKey;
|
|
11
|
-
chapterId?: number | string;
|
|
12
|
-
pageNumber: number;
|
|
13
|
-
juzNumber: number;
|
|
14
|
-
hizbNumber: number;
|
|
15
|
-
rubElHizbNumber: number;
|
|
16
|
-
// verseIndex: number;
|
|
17
|
-
words?: Word[];
|
|
18
|
-
textUthmani?: string;
|
|
19
|
-
textUthmaniSimple?: string;
|
|
20
|
-
textUthmaniTajweed?: string;
|
|
21
|
-
textImlaei?: string;
|
|
22
|
-
textImlaeiSimple?: string;
|
|
23
|
-
textIndopak?: string;
|
|
24
|
-
sajdahNumber: null;
|
|
25
|
-
// sajdahType: null;
|
|
26
|
-
imageUrl?: string;
|
|
27
|
-
imageWidth?: number;
|
|
28
|
-
v1Page?: number;
|
|
29
|
-
v2Page?: number;
|
|
30
|
-
codeV1?: string;
|
|
31
|
-
codeV2?: string;
|
|
32
|
-
translations?: Translation[];
|
|
33
|
-
tafsirs?: Tafsir[];
|
|
34
|
-
audio?: AudioResponse;
|
|
35
|
-
}
|
package/src/types/api/Word.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { VerseKey } from '../VerseKey';
|
|
2
|
-
import { Translation } from './Translation';
|
|
3
|
-
import { Transliteration } from './Transliteration';
|
|
4
|
-
|
|
5
|
-
export enum CharType {
|
|
6
|
-
Word = 'word',
|
|
7
|
-
End = 'end',
|
|
8
|
-
Pause = 'pause',
|
|
9
|
-
Sajdah = 'sajdah',
|
|
10
|
-
RubElHizb = 'rub-el-hizb',
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface Word {
|
|
14
|
-
id?: number;
|
|
15
|
-
position: number;
|
|
16
|
-
audioUrl: string;
|
|
17
|
-
charTypeName: CharType;
|
|
18
|
-
codeV1?: string;
|
|
19
|
-
codeV2?: string;
|
|
20
|
-
pageNumber?: number;
|
|
21
|
-
lineNumber?: number;
|
|
22
|
-
text?: string;
|
|
23
|
-
textUthmani?: string;
|
|
24
|
-
textIndopak?: string;
|
|
25
|
-
textImlaei?: string;
|
|
26
|
-
translation: Translation;
|
|
27
|
-
transliteration: Transliteration;
|
|
28
|
-
location?: string; // chapter:verse:word
|
|
29
|
-
verseKey?: VerseKey;
|
|
30
|
-
}
|
package/src/types/api/index.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export * from './ApiResponses';
|
|
2
|
-
export * from './AudioData';
|
|
3
|
-
export * from './AudioResponse';
|
|
4
|
-
export * from './Chapter';
|
|
5
|
-
export * from './ChapterInfo';
|
|
6
|
-
export * from './Footnote';
|
|
7
|
-
export * from './Reciter';
|
|
8
|
-
export * from './Segment';
|
|
9
|
-
export * from './Tafsir';
|
|
10
|
-
export * from './TafsirInfo';
|
|
11
|
-
export * from './TranslatedName';
|
|
12
|
-
export * from './Translation';
|
|
13
|
-
export * from './Transliteration';
|
|
14
|
-
export * from './Verse';
|
|
15
|
-
export * from './Word';
|
|
16
|
-
export * from './Juz';
|
|
17
|
-
export * from './Pagination';
|
|
18
|
-
export * from './Resources';
|
package/src/types/index.ts
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
export enum Language {
|
|
2
|
-
ARABIC = 'ar',
|
|
3
|
-
ENGLISH = 'en',
|
|
4
|
-
URDU = 'ur',
|
|
5
|
-
BENGALI = 'bn',
|
|
6
|
-
TURKISH = 'tr',
|
|
7
|
-
SPANISH = 'es',
|
|
8
|
-
GERMAN = 'de',
|
|
9
|
-
BOSNIAN = 'bs',
|
|
10
|
-
RUSSIAN = 'ru',
|
|
11
|
-
ALBANIAN_AL = 'al',
|
|
12
|
-
FRENCH = 'fr',
|
|
13
|
-
DUTCH = 'nl',
|
|
14
|
-
TAMIL = 'ta',
|
|
15
|
-
TAJIK = 'tg',
|
|
16
|
-
INDONESIAN = 'id',
|
|
17
|
-
UZBEK = 'uz',
|
|
18
|
-
VIETNAMESE = 'vi',
|
|
19
|
-
CHINESE = 'zh',
|
|
20
|
-
ITALIAN = 'it',
|
|
21
|
-
JAPANESE = 'ja',
|
|
22
|
-
MALAYALAM = 'ml',
|
|
23
|
-
AMHARIC = 'am',
|
|
24
|
-
KAZAKH = 'kk',
|
|
25
|
-
PORTUGUESE = 'pt',
|
|
26
|
-
TAGALOG = 'tl',
|
|
27
|
-
THAI = 'th',
|
|
28
|
-
KOREAN = 'ko',
|
|
29
|
-
HINDI = 'hi',
|
|
30
|
-
KURDISH = 'ku',
|
|
31
|
-
HAUSA = 'ha',
|
|
32
|
-
AZERI = 'az',
|
|
33
|
-
SWAHILI = 'sw',
|
|
34
|
-
PERSIAN = 'fa',
|
|
35
|
-
SERBIAN = 'sr',
|
|
36
|
-
MARANAO = 'mrn',
|
|
37
|
-
AMAZIGH = 'zgh',
|
|
38
|
-
ASSAMESE = 'as',
|
|
39
|
-
BULGARIAN = 'bg',
|
|
40
|
-
CHECHEN = 'ce',
|
|
41
|
-
CZECH = 'cs',
|
|
42
|
-
|
|
43
|
-
DIVEHI = 'dv',
|
|
44
|
-
DHIVEHI = 'dv',
|
|
45
|
-
MALDIVIAN = 'dv',
|
|
46
|
-
|
|
47
|
-
FINNISH = 'fi',
|
|
48
|
-
GUJAARATI = 'gu',
|
|
49
|
-
HEBREW = 'he',
|
|
50
|
-
GEORGIAN = 'ka',
|
|
51
|
-
CENTRAL_KHMER = 'km',
|
|
52
|
-
GANDA = 'lg',
|
|
53
|
-
MARATHI = 'mr',
|
|
54
|
-
YORUBA = 'yo',
|
|
55
|
-
MALAY = 'ms',
|
|
56
|
-
NEPALI = 'ne',
|
|
57
|
-
SWEDISH = 'sv',
|
|
58
|
-
TELUGU = 'te',
|
|
59
|
-
TATAR = 'tt',
|
|
60
|
-
|
|
61
|
-
UIGHUR = 'ug',
|
|
62
|
-
UYGHUR = 'ug',
|
|
63
|
-
|
|
64
|
-
UKRAINIAN = 'uk',
|
|
65
|
-
NORWEGIAN = 'no',
|
|
66
|
-
OROMO = 'om',
|
|
67
|
-
POLISH = 'pl',
|
|
68
|
-
PASHTO = 'ps',
|
|
69
|
-
ROMANIAN = 'ro',
|
|
70
|
-
SINDHI = 'sd',
|
|
71
|
-
NORTHERN_SAMI = 'se',
|
|
72
|
-
|
|
73
|
-
SINHALA = 'si',
|
|
74
|
-
SINHALESE = 'si',
|
|
75
|
-
|
|
76
|
-
SOMALI = 'so',
|
|
77
|
-
ALBANIAN_SQ = 'sq',
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export enum QuranFont {
|
|
81
|
-
MadaniV1 = 'code_v1',
|
|
82
|
-
MadaniV2 = 'code_v2',
|
|
83
|
-
Uthmani = 'text_uthmani',
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export type VerseField =
|
|
87
|
-
| 'chapterId'
|
|
88
|
-
| 'textUthmani'
|
|
89
|
-
| 'textUthmaniSimple'
|
|
90
|
-
| 'textImlaei'
|
|
91
|
-
| 'textImlaeiSimple'
|
|
92
|
-
| 'textIndopak'
|
|
93
|
-
| 'textUthmaniTajweed'
|
|
94
|
-
| 'imageUrl'
|
|
95
|
-
| 'imageWidth'
|
|
96
|
-
| 'codeV1'
|
|
97
|
-
| 'codeV2'
|
|
98
|
-
| 'v1Page'
|
|
99
|
-
| 'v2Page';
|
|
100
|
-
|
|
101
|
-
export type WordField =
|
|
102
|
-
| 'v1Page'
|
|
103
|
-
| 'v2Page'
|
|
104
|
-
| 'textUthmani'
|
|
105
|
-
| 'textImlaei'
|
|
106
|
-
| 'textIndopak'
|
|
107
|
-
| 'verseKey'
|
|
108
|
-
| 'location'
|
|
109
|
-
| 'codeV1'
|
|
110
|
-
| 'codeV2';
|
|
111
|
-
|
|
112
|
-
export type TranslationField =
|
|
113
|
-
| 'resourceName'
|
|
114
|
-
| 'verseId'
|
|
115
|
-
| 'languageId'
|
|
116
|
-
| 'languageName'
|
|
117
|
-
| 'verseKey'
|
|
118
|
-
| 'chapterId'
|
|
119
|
-
| 'verseNumber'
|
|
120
|
-
| 'juzNumber'
|
|
121
|
-
| 'hizbNumber'
|
|
122
|
-
| 'rubNumber'
|
|
123
|
-
| 'pageNumber';
|
|
124
|
-
|
|
125
|
-
export type VerseRecitationField = 'id' | 'chapterId' | 'segments' | 'format';
|
|
126
|
-
|
|
127
|
-
export * from './VerseKey';
|
|
128
|
-
export * from './ChapterId';
|
|
129
|
-
export * from './HizbNumber';
|
|
130
|
-
export * from './JuzNumber';
|
|
131
|
-
export * from './PageNumber';
|
|
132
|
-
export * from './RubNumber';
|
|
133
|
-
|
|
134
|
-
export * from './api';
|
|
135
|
-
|
|
136
|
-
export * from './FetchFn';
|
package/src/types/utils.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
type _NumbersFrom0ToN<Nr extends number> = Nr extends Nr
|
|
2
|
-
? number extends Nr
|
|
3
|
-
? number
|
|
4
|
-
: Nr extends 0
|
|
5
|
-
? never
|
|
6
|
-
: _NumbersFrom0ToNRec<Nr, [], 0>
|
|
7
|
-
: never;
|
|
8
|
-
|
|
9
|
-
type _NumbersFrom0ToNRec<
|
|
10
|
-
Nr extends number,
|
|
11
|
-
Counter extends any[],
|
|
12
|
-
Accumulator extends number
|
|
13
|
-
> = Counter['length'] extends Nr
|
|
14
|
-
? Accumulator
|
|
15
|
-
: _NumbersFrom0ToNRec<Nr, [any, ...Counter], Accumulator | Counter['length']>;
|
|
16
|
-
|
|
17
|
-
export type NumberRange<Start extends number, End extends number> = Exclude<
|
|
18
|
-
_NumbersFrom0ToN<End>,
|
|
19
|
-
_NumbersFrom0ToN<Start>
|
|
20
|
-
>;
|
|
21
|
-
|
|
22
|
-
export type NumberUnionToString<TType> = TType extends number
|
|
23
|
-
? `${TType}`
|
|
24
|
-
: TType;
|
package/src/utils/misc.ts
DELETED