-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
67 lines (57 loc) · 2.31 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
declare module '@sefinek/random-animals' {
interface AnimalInfo {
category: string;
endpoint: string;
}
interface AnimalApiResponse {
success: boolean;
status: number;
info: AnimalInfo;
message: string;
}
/**
* Fetch random data for a cat from the external API.
* @returns {Promise<AnimalApiResponse>} - A promise that resolves with random cat data or rejects with an error.
*/
export const cat: () => Promise<AnimalApiResponse>;
/**
* Fetch random data for a dog from the external API.
* @returns {Promise<AnimalApiResponse>} - A promise that resolves with random dog data or rejects with an error.
*/
export const dog: () => Promise<AnimalApiResponse>;
/**
* Fetch random data for a fox from the external API.
* @returns {Promise<AnimalApiResponse>} - A promise that resolves with random fox data or rejects with an error.
*/
export const fox: () => Promise<AnimalApiResponse>;
/**
* Fetch random data for a fish from the external API.
* @returns {Promise<AnimalApiResponse>} - A promise that resolves with random fish data or rejects with an error.
*/
export const fish: () => Promise<AnimalApiResponse>;
/**
* Fetch random data for an alpaca from the external API.
* @returns {Promise<AnimalApiResponse>} - A promise that resolves with random alpaca data or rejects with an error.
*/
export const alpaca: () => Promise<AnimalApiResponse>;
/**
* Fetch random data for a bird from the external API.
* @returns {Promise<AnimalApiResponse>} - A promise that resolves with random bird data or rejects with an error.
*/
export const bird: () => Promise<AnimalApiResponse>;
/**
* Get the API version from the external API.
* @returns {Promise<string>} - A promise that resolves with the API version or rejects with an error.
*/
export const apiVersion: () => Promise<string>;
/**
* Get the CDN version from the external CDN.
* @returns {Promise<string>} - A promise that resolves with the CDN version or rejects with an error.
*/
export const cdnVersion: () => Promise<string>;
/**
* Get module version.
* @returns {string} - Returns this package version.
*/
export const version: string;
}