@ifunny/ifunny-api-types 0.1.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/LICENSE +121 -0
  3. package/README.md +2 -0
  4. package/dist/index.d.ts +376 -0
  5. package/dist/index.d.ts.map +1 -0
  6. package/dist/index.js +20 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/payloads/client.js +13 -0
  9. package/dist/payloads/client.js.map +1 -0
  10. package/dist/payloads/index.js +20 -0
  11. package/dist/payloads/index.js.map +1 -0
  12. package/dist/payloads/post.js +38 -0
  13. package/dist/payloads/post.js.map +1 -0
  14. package/dist/payloads/user.js +59 -0
  15. package/dist/payloads/user.js.map +1 -0
  16. package/dist/payloads/util.js +3 -0
  17. package/dist/payloads/util.js.map +1 -0
  18. package/dist/rest/explore.js +11 -0
  19. package/dist/rest/explore.js.map +1 -0
  20. package/dist/rest/index.js +19 -0
  21. package/dist/rest/index.js.map +1 -0
  22. package/dist/rest/issues.js +3 -0
  23. package/dist/rest/issues.js.map +1 -0
  24. package/dist/utils/index.js +18 -0
  25. package/dist/utils/index.js.map +1 -0
  26. package/dist/utils/util.js +3 -0
  27. package/dist/utils/util.js.map +1 -0
  28. package/package.json +46 -0
  29. package/types/index.d.ts +4 -0
  30. package/types/index.d.ts.map +1 -0
  31. package/types/payloads/client.d.ts +79 -0
  32. package/types/payloads/client.d.ts.map +1 -0
  33. package/types/payloads/index.d.ts +4 -0
  34. package/types/payloads/index.d.ts.map +1 -0
  35. package/types/payloads/post.d.ts +372 -0
  36. package/types/payloads/post.d.ts.map +1 -0
  37. package/types/payloads/user.d.ts +339 -0
  38. package/types/payloads/user.d.ts.map +1 -0
  39. package/types/payloads/util.d.ts +18 -0
  40. package/types/payloads/util.d.ts.map +1 -0
  41. package/types/rest/explore.d.ts +13 -0
  42. package/types/rest/explore.d.ts.map +1 -0
  43. package/types/rest/index.d.ts +3 -0
  44. package/types/rest/index.d.ts.map +1 -0
  45. package/types/rest/issues.d.ts +16 -0
  46. package/types/rest/issues.d.ts.map +1 -0
  47. package/types/utils/index.d.ts +2 -0
  48. package/types/utils/index.d.ts.map +1 -0
  49. package/types/utils/util.d.ts +53 -0
  50. package/types/utils/util.d.ts.map +1 -0
@@ -0,0 +1,339 @@
1
+ import { HexCode, Size, Timestamp } from "../utils/util";
2
+ export interface APIUser extends APIUserBase {
3
+ /**
4
+ * Is the client subscribed to the user's notifications
5
+ */
6
+ is_subscribed_to_updates: boolean;
7
+ /**
8
+ * The user's profile photo
9
+ */
10
+ photo?: APIProfilePhoto;
11
+ /**
12
+ * Is the user blocked by the client
13
+ */
14
+ is_blocked: false;
15
+ /**
16
+ * Did the user block the client
17
+ */
18
+ are_you_blocked: false;
19
+ /**
20
+ * User's cover image url
21
+ * @example
22
+ * `https://img.ifunny.co/user_covers/${string}.webp`
23
+ */
24
+ cover_url?: string;
25
+ /**
26
+ * User's cover image background color {@link HexCode}
27
+ */
28
+ cover_bg_color?: HexCode;
29
+ /**
30
+ * Is the Client subscribed to the user
31
+ */
32
+ is_in_subscriptions: boolean;
33
+ /**
34
+ * Is the User subscribed to the Client
35
+ */
36
+ is_in_subscribers: boolean;
37
+ /**
38
+ * User's nick color\
39
+ * ? Default: 55FF00
40
+ */
41
+ nick_color?: APINickColor;
42
+ /**
43
+ * The User's linked social accounts\
44
+ * Twitter, Google, Facebook
45
+ */
46
+ social?: APIUserSocial;
47
+ }
48
+ /**
49
+ * API Base User Payload\
50
+ * ? All required properties
51
+ */
52
+ export interface APIUserBase {
53
+ /**
54
+ * The user's meme experience
55
+ */
56
+ meme_experience: APIMemeExperience;
57
+ /**
58
+ * The Chat privacy status of the user
59
+ */
60
+ messaging_privacy_status: APIPrivacyStatus;
61
+ /**
62
+ * Can the Client chat with the user
63
+ */
64
+ is_available_for_chat: boolean;
65
+ /**
66
+ * Is the user's account private
67
+ */
68
+ is_private: boolean;
69
+ /**
70
+ * Seems to always be `"1010101010101010101010101010101010101010"`
71
+ */
72
+ messenger_token: string;
73
+ /**
74
+ * Does the user have access to chats
75
+ */
76
+ messenger_active: boolean;
77
+ /**
78
+ * Array of APIBan objects.
79
+ */
80
+ bans: APIBan[];
81
+ /**
82
+ * User's inapp share url
83
+ * @example
84
+ * `https://ifunny.co/user/${APIUser["nick"]}`
85
+ */
86
+ web_url: string;
87
+ /**
88
+ * User's about bio\
89
+ * ? Can be an empty string
90
+ */
91
+ about: string;
92
+ /**
93
+ * User's unique id\
94
+ * ? Never changes
95
+ */
96
+ id: string;
97
+ /**
98
+ * User's unique username\
99
+ * ! UNSAFE FOR USER CACHING.
100
+ */
101
+ nick: string;
102
+ /**
103
+ * Is the user verified on iFunny
104
+ */
105
+ is_verified: boolean;
106
+ /**
107
+ * Is the user banned\
108
+ * ! UNSAFE TO CHECK FOR ACTIVE BANS
109
+ */
110
+ is_banned: boolean;
111
+ /**
112
+ * Is the user deleted from iFunny's servers\
113
+ * ? if true, many properties will be undefined
114
+ */
115
+ is_deleted: boolean;
116
+ /**
117
+ * User's profile stats
118
+ */
119
+ num: APIUserNums;
120
+ /**
121
+ * The user's rating\
122
+ * ! Deprecated by iFunny
123
+ */
124
+ rating: APIUserRating;
125
+ /**
126
+ * Original nick of the user\
127
+ * ? Should never change, but I'm not positive
128
+ */
129
+ original_nick: string;
130
+ }
131
+ /**
132
+ * `public` anyone can create a direct message the user\
133
+ * `subscribers` only subscribers can create a direct message with the user\
134
+ * `closed` only the user can create direct messages\
135
+ * ? Backend does not check this status on requests as of 5/28/22
136
+ */
137
+ export declare enum MESSAGING_PRIVACY_STATUS {
138
+ PUBLIC = "public",
139
+ SUBSCRIBERS = "subscribers",
140
+ CLOSED = "closed"
141
+ }
142
+ export declare type APIPrivacyStatus = `${MESSAGING_PRIVACY_STATUS}`;
143
+ /**
144
+ * A user's meme experience
145
+ */
146
+ export interface APIMemeExperience {
147
+ /**
148
+ * The amount of days the user has logged into iFunny
149
+ */
150
+ days: number;
151
+ /**
152
+ * The user's rank name
153
+ */
154
+ rank: MemeRank;
155
+ /**
156
+ * MemeRank badge png url
157
+ * @example
158
+ * `https://img.ifunny.co/meme_experience/${number}.png`
159
+ */
160
+ badge_url: string;
161
+ /**
162
+ * Pixel size of the badge
163
+ */
164
+ badge_size: Size;
165
+ /**
166
+ * Days needed to get to the meme rank
167
+ */
168
+ next_milestone: number;
169
+ }
170
+ /**
171
+ * All current MemeRanks from the API
172
+ */
173
+ export declare enum RANKS {
174
+ MEME_EXPLORER = "Meme explorer",
175
+ MEME_BRO = "Meme bro",
176
+ MEME_DADDY = "Meme daddy",
177
+ DANK_MEMER = "Dank memer",
178
+ MEME_MASTER_BAKER = "Meme master baker",
179
+ DEEP_FRIED_MEMER = "Deep fried memer",
180
+ SAUCY_MEMER = "Saucy memer",
181
+ ORIGINAL_MEME_GANGSTER = "Original Meme Gangster",
182
+ MEME_DEMON = "Meme demon",
183
+ STEAL_BEAMS_OF_MEMES = "Steal beams of memes",
184
+ MEME_DEALER = "Meme dealer",
185
+ IFUNNY_VETERAN = "iFunny Veteran",
186
+ /**
187
+ * Final MemeExperience rank
188
+ */
189
+ CHEFS_MEME_AGENT = "Chef's meme agent"
190
+ }
191
+ export declare type MemeRank = `${RANKS}`;
192
+ /**
193
+ * Known ban types
194
+ */
195
+ export declare enum BAN_TYPES {
196
+ COLLECTIVE_SHADOW = "collective"
197
+ }
198
+ /**
199
+ * ? Place holder for when more ban types are known
200
+ */
201
+ export declare type APIBanType = `${BAN_TYPES}`;
202
+ export interface APIBan {
203
+ /**
204
+ * Unique ban Id
205
+ */
206
+ id: string;
207
+ /**
208
+ * Unix timestamp of when the ban expires\
209
+ * ? IN SECONDS! More better accuracy, convert to milliseconds
210
+ */
211
+ date_until: Timestamp;
212
+ /**
213
+ * Known {@link BAN_TYPES types}
214
+ */
215
+ type: APIBanType;
216
+ }
217
+ export interface APIProfilePhoto {
218
+ /**
219
+ * Profile Photo background color {@link HexCode}
220
+ */
221
+ bg_color: HexCode;
222
+ /**
223
+ * Profile photo thumbnail
224
+ */
225
+ thumb: APIProfilePhotoThumbnail;
226
+ /**
227
+ * Profile photo content url
228
+ */
229
+ url: string;
230
+ }
231
+ /**
232
+ * Profile photo thumbnail
233
+ */
234
+ export interface APIProfilePhotoThumbnail {
235
+ /**
236
+ * resize:400x,quality:90
237
+ */
238
+ large_url: string;
239
+ /**
240
+ * resize:200x quality:90
241
+ */
242
+ medium_url: string;
243
+ /**
244
+ * resize:100x quality:90
245
+ */
246
+ small_url: string;
247
+ }
248
+ export interface APIUserNums {
249
+ /**
250
+ * Amount of users the user is subscribed to
251
+ */
252
+ subscriptions: number;
253
+ /**
254
+ * Amount of subscribers the user has
255
+ */
256
+ subscribers: number;
257
+ /**
258
+ * Total amount of posts on the user's timeline
259
+ */
260
+ total_posts: number;
261
+ /**
262
+ * Amout of original (not republished) posts on the user's timeline
263
+ */
264
+ created: number;
265
+ /**
266
+ * Amount of featured posts the user has
267
+ */
268
+ featured: number;
269
+ /**
270
+ * Amount of smiles the user has from posts
271
+ */
272
+ total_smiles: number;
273
+ /**
274
+ * Amount of achievements the user has
275
+ */
276
+ achievements: number;
277
+ }
278
+ /**
279
+ * User's Rating\
280
+ * ! Deprecated by iFunny
281
+ */
282
+ export interface APIUserRating {
283
+ points: number;
284
+ current_level: APIUserRatingLevel;
285
+ next_level: APIUserRatingLevel;
286
+ /**
287
+ * Always the same values
288
+ */
289
+ max_level: APIUserRatingLevelMax;
290
+ is_show_level: boolean;
291
+ }
292
+ /**
293
+ * A User Rating Level\
294
+ * ! Deprecated by iFunny
295
+ */
296
+ export interface APIUserRatingLevel {
297
+ id: string;
298
+ value: number;
299
+ points: number;
300
+ }
301
+ export interface APIUserRatingLevelMax extends APIUserRatingLevel {
302
+ id: "5d3f0152a88a50006d4b1d5c";
303
+ value: 99;
304
+ points: 297600;
305
+ }
306
+ /**
307
+ * Known nick colors
308
+ */
309
+ export declare enum NICK_COLORS {
310
+ BRIGHT_GREEN = "55FF00",
311
+ BETA_TESTER = "55FF00",
312
+ MAROON = "660000",
313
+ RED = "ff3e52",
314
+ PURPLE = "a078f0",
315
+ ORANGE = "e0b400"
316
+ }
317
+ /**
318
+ * A user's nick color\
319
+ * ? Nick colors are hex codes but these are the currently documented ones
320
+ */
321
+ export declare type APINickColor = `${NICK_COLORS}`;
322
+ /**
323
+ * A user's linked socials
324
+ */
325
+ export interface APIUserSocial {
326
+ ggl?: APIUserSocialGoogle;
327
+ tw?: APIUserSocialTwitter;
328
+ }
329
+ export interface APIUserSocialGoogle {
330
+ id: string;
331
+ is_hidden: boolean;
332
+ link: string;
333
+ }
334
+ export interface APIUserSocialTwitter {
335
+ id: string;
336
+ is_hidden: boolean;
337
+ link: string;
338
+ }
339
+ //# sourceMappingURL=user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/payloads/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAEzD,MAAM,WAAW,OAAQ,SAAQ,WAAW;IAC3C;;OAEG;IACH,wBAAwB,EAAE,OAAO,CAAC;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;OAEG;IACH,UAAU,EAAE,KAAK,CAAC;IAClB;;OAEG;IACH,eAAe,EAAE,KAAK,CAAC;IACvB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,mBAAmB,EAAE,OAAO,CAAC;IAC7B;;OAEG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B;;;OAGG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,eA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M,WAAW,aAAa;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,kBAAkB,CAAC;IAClC,UAAU,EAAE,kBAAkB,CAAC;IAC/B;;OAEG;IACH,SAAS,EAAE,qBAAqB,CAAC;IACjC,aAAa,EAAE,OAAO,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAChE,EAAE,EAAE,0BAA0B,CAAC;IAC/B,KAAK,EAAE,EAAE,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;CACf;AAGD;;GAEG;AACH,oBAAY,WAAW;IACtB,YAAY,WAAW;IACvB,WAAW,WAAe;IAC1B,MAAM,WAAW;IACjB,GAAG,WAAW;IACd,MAAM,WAAW;IACjB,MAAM,WAAW;CACjB;AAED;;;GAGG;AACH,oBAAY,YAAY,GAAG,GAAG,WAAW,EAAE,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,GAAG,CAAC,EAAE,mBAAmB,CAAC;IAC1B,EAAE,CAAC,EAAE,oBAAoB,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,oBAAoB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACb"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Pixel size of an image or video
3
+ */
4
+ export interface Size {
5
+ /**
6
+ * Width (in pixels)
7
+ */
8
+ w: number;
9
+ /**
10
+ * Height (in pixels)
11
+ */
12
+ h: number;
13
+ }
14
+ /**
15
+ * A color hex code
16
+ */
17
+ export declare type HexCode = string;
18
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/payloads/util.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,IAAI;IACpB;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;CACV;AAED;;GAEG;AACH,oBAAY,OAAO,GAAG,MAAM,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { ValueOf } from "../utils/util";
2
+ export interface RESTAPIExploreTabBase {
3
+ id: APIExploreTabID;
4
+ }
5
+ export declare const EXPLORE_TAB_IDS: {
6
+ readonly Best: 2;
7
+ readonly Memes: 3;
8
+ readonly Users: 4;
9
+ readonly Chats: 5;
10
+ readonly Channels: 6;
11
+ };
12
+ export declare type APIExploreTabID = ValueOf<typeof EXPLORE_TAB_IDS>;
13
+ //# sourceMappingURL=explore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"explore.d.ts","sourceRoot":"","sources":["../../src/rest/explore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,WAAW,qBAAqB;IACrC,EAAE,EAAE,eAAe,CAAC;CACpB;AAED,eAAO,MAAM,eAAe;;;;;;CAMlB,CAAC;AAEX,oBAAY,eAAe,GAAG,OAAO,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./explore";
2
+ export * from "./issues";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rest/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { Timestamp } from "../utils/util";
2
+ /**
3
+ * When the next feature set releases
4
+ */
5
+ export interface APINextIssueTime {
6
+ time_left: Timestamp;
7
+ time: Timestamp;
8
+ }
9
+ /**
10
+ * The API response for `/issues/next_issue_time`
11
+ */
12
+ export interface RESTAPINextIssueTime {
13
+ data: APINextIssueTime;
14
+ status: 200;
15
+ }
16
+ //# sourceMappingURL=issues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issues.d.ts","sourceRoot":"","sources":["../../src/rest/issues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,SAAS,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,GAAG,CAAC;CACZ"}
@@ -0,0 +1,2 @@
1
+ export * from "./util";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Pixel size of an image or video
3
+ */
4
+ export interface Size {
5
+ /**
6
+ * Width (in pixels)
7
+ */
8
+ w: number;
9
+ /**
10
+ * Height (in pixels)
11
+ */
12
+ h: number;
13
+ }
14
+ /**
15
+ * A color hex code without `#`
16
+ * @example
17
+ * '55ff00'
18
+ */
19
+ export declare type HexCode = string;
20
+ /**
21
+ * Conditional post type.\
22
+ * `T` Conditional\
23
+ * Returns `A` if `T` is true\
24
+ * Returns `B` if `T` is false\
25
+ * Returns `A|B` if T is neither true or false\
26
+ * @example
27
+ * class Foo<Ready extends boolean = boolean> {
28
+ * bar: If<Ready, number, null>
29
+ * isReady(): this is Foo<true> {
30
+ * }
31
+ * }
32
+ */
33
+ export declare type If<T extends boolean, A, B = null> = T extends true ? A : T extends false ? B : A | B;
34
+ /**
35
+ * UNIX timestamp in seconds
36
+ * ? For better accuracy, convert to milliseconds by multiplying by 1000
37
+ */
38
+ export declare type Timestamp = number;
39
+ /**
40
+ * @example
41
+ * interface Foo {
42
+ * bar: 'baz',
43
+ * spam: 'eggs',
44
+ * waldo: 'fred'
45
+ * }
46
+ *
47
+ * type BarOrSpamOrWaldo = ValueOf<Foo> // Expect 'baz'|'eggs'|'fred'
48
+ * type Bar = ValueOf<Foo, 'bar'> // Expect 'baz'
49
+ * type BarOrSpam = ValueOf<Foo, 'bar'|'spam'> // Expect 'baz'|'eggs'
50
+ *
51
+ */
52
+ export declare type ValueOf<T extends unknown, K extends keyof T = keyof T> = T[K];
53
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/utils/util.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,IAAI;IACpB;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;CACV;AAED;;;;GAIG;AACH,oBAAY,OAAO,GAAG,MAAM,CAAC;AAE7B;;;;;;;;;;;;GAYG;AACH,oBAAY,EAAE,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,IAAI,CAAC,SAAS,IAAI,GAC5D,CAAC,GACD,CAAC,SAAS,KAAK,GACf,CAAC,GACD,CAAC,GAAG,CAAC,CAAC;AAET;;;GAGG;AACH,oBAAY,SAAS,GAAG,MAAM,CAAC;AAE/B;;;;;;;;;;;;GAYG;AACH,oBAAY,OAAO,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC"}