-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
98 lines (85 loc) · 2.6 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
declare module '@sefinek/random-emoji' {
/**
* Interface representing an emoji with a name, content, and type.
* Used in the emoji collection to provide more detailed information about each emoji.
*/
export interface EmojisCollection {
content: string;
name: string;
type: string;
}
/**
* Interface representing an emoji with a name and content.
* Used for simpler emoji categories like cats, hearts, etc.
*/
export interface Emojis {
content: string;
name: string;
}
/**
* Returns a random emoji from a large collection.
* Each emoji includes its name and type.
* @returns {EmojisCollection} A random emoji from the collection.
*/
export function emojis(): EmojisCollection;
/**
* Returns a random cat emoji.
* @returns {Emojis} A random cat emoji.
*/
export function cats(): Emojis;
/**
* Returns a random circle emoji.
* @returns {Emojis} A random circle emoji.
*/
export function circles(): Emojis;
/**
* Returns a random food emoji.
* @returns {Emojis} A random food emoji.
*/
export function foods(): Emojis;
/**
* Returns a random heart emoji.
* @returns {Emojis} A random heart emoji.
*/
export function hearts(): Emojis;
/**
* Returns a random square emoji.
* @returns {Emojis} A random square emoji.
*/
export function squares(): Emojis;
/**
* Returns a random Unicode emoji character.
* @returns {string} A random Unicode emoji character.
*/
export function unicode(): string;
/**
* Interface representing the response from an API endpoint.
* Includes information about the success status, API category, and response message.
*/
export interface ApiResponse {
success: boolean;
status: number;
info: {
category: string;
endpoint: string;
};
message: string;
}
/**
* Kaomojis class for accessing various random content endpoints.
* Allows fetching of random kaomojis from specified endpoints.
*/
export class Kaomojis {
constructor();
/**
* Dynamically generated methods for accessing random content endpoints.
* Each method returns a Promise that resolves to an ApiResponse.
* @returns {Promise<ApiResponse>} A promise resolving to the API response.
*/
[endpoint: string]: () => Promise<ApiResponse>;
}
/**
* The current version of the module.
*/
export const version: string;
}