@ifunny/ifunny-api-types 1.2.0 → 1.2.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.
Files changed (197) hide show
  1. package/.devenv/bootstrap/bootstrapLib.nix +21 -1
  2. package/.devenv/bootstrap/lock-sources.nix +123 -0
  3. package/.devenv/bootstrap/resolve-input-paths.nix +34 -0
  4. package/.devenv/bootstrap/resolve-lock.nix +5 -79
  5. package/.devenv/changelog-cache.json +7 -3
  6. package/.devenv/devenv.fish +13 -13
  7. package/.devenv/input-paths.txt +2 -4
  8. package/.devenv/nix-eval-cache.db +0 -0
  9. package/.devenv/shell-env.sh +1601 -1589
  10. package/.devenv/state/files.json +5 -1
  11. package/.devenv/state/git-hooks-install/hooks +1 -0
  12. package/.devenv/state/git-hooks-install/key +4 -0
  13. package/.devenv/state/prek/.lock +0 -0
  14. package/.devenv/state/prek/README +2 -0
  15. package/.devenv/state/prek/config-tracking.json +3 -0
  16. package/.devenv/state/prek/patches/1793595918715-562072.patch +26 -0
  17. package/.devenv/state/prek/patches/1793596283854-574354.patch +22881 -0
  18. package/.devenv/state/prek/patches/1793596332255-574728.patch +22870 -0
  19. package/.devenv/state/prek/patches/1793597557669-617911.patch +284 -0
  20. package/.devenv/state/prek/patches/1793856046749-331249.patch +2906 -0
  21. package/.devenv/state/prek/patches/1793856096552-331868.patch +2998 -0
  22. package/.devenv/state/prek/patches/1793856146786-332328.patch +3009 -0
  23. package/.devenv/state/prek/patches/1793856181490-332981.patch +11401 -0
  24. package/.devenv/state/prek/patches/1793856203087-333510.patch +11388 -0
  25. package/.devenv/state/prek/patches/1793856277935-334258.patch +11372 -0
  26. package/.devenv/state/prek/patches/1793856646955-337912.patch +8488 -0
  27. package/.devenv/state/prek/patches/1793856682905-338572.patch +8260 -0
  28. package/.devenv/state/prek/patches/1793857035751-356215.patch +8295 -0
  29. package/.devenv/state/tasks.db +0 -0
  30. package/.devenv/task-names.txt +3 -1
  31. package/.prettierignore +9 -0
  32. package/CHANGELOG.md +476 -8272
  33. package/devenv.lock +47 -9
  34. package/devenv.nix +10 -13
  35. package/devenv.yaml +5 -0
  36. package/dist/errors/bad_request.js +8 -0
  37. package/dist/errors/bad_request.js.map +1 -0
  38. package/dist/errors/captcha_required.js +19 -0
  39. package/dist/errors/captcha_required.js.map +1 -0
  40. package/dist/errors/email_exists.js +8 -0
  41. package/dist/errors/email_exists.js.map +1 -0
  42. package/dist/errors/error.js +3 -0
  43. package/dist/errors/error.js.map +1 -0
  44. package/dist/errors/error_base.js +43 -0
  45. package/dist/errors/error_base.js.map +1 -0
  46. package/dist/errors/index.js +29 -0
  47. package/dist/errors/index.js.map +1 -0
  48. package/dist/errors/invalid_client.js +8 -0
  49. package/dist/errors/invalid_client.js.map +1 -0
  50. package/dist/errors/invalid_email.js +8 -0
  51. package/dist/errors/invalid_email.js.map +1 -0
  52. package/dist/errors/invalid_grant.js +8 -0
  53. package/dist/errors/invalid_grant.js.map +1 -0
  54. package/dist/errors/not_found.js +3 -0
  55. package/dist/errors/not_found.js.map +1 -0
  56. package/dist/errors/permission_denied.js +8 -0
  57. package/dist/errors/permission_denied.js.map +1 -0
  58. package/dist/errors/unauthorized.js +8 -0
  59. package/dist/errors/unauthorized.js.map +1 -0
  60. package/dist/errors/wrong_params.js +8 -0
  61. package/dist/errors/wrong_params.js.map +1 -0
  62. package/dist/index.js +21 -0
  63. package/dist/index.js.map +1 -0
  64. package/dist/payloads/activity.js +50 -0
  65. package/dist/payloads/activity.js.map +1 -0
  66. package/dist/payloads/app.js +3 -0
  67. package/dist/payloads/app.js.map +1 -0
  68. package/dist/payloads/appeal.js +14 -0
  69. package/dist/payloads/appeal.js.map +1 -0
  70. package/dist/payloads/ban.js +36 -0
  71. package/dist/payloads/ban.js.map +1 -0
  72. package/dist/payloads/base.js +3 -0
  73. package/dist/payloads/base.js.map +1 -0
  74. package/dist/payloads/chat.js +37 -0
  75. package/dist/payloads/chat.js.map +1 -0
  76. package/dist/payloads/client.js +13 -0
  77. package/dist/payloads/client.js.map +1 -0
  78. package/dist/payloads/comment.js +42 -0
  79. package/dist/payloads/comment.js.map +1 -0
  80. package/dist/payloads/content.js +176 -0
  81. package/dist/payloads/content.js.map +1 -0
  82. package/dist/payloads/index.js +29 -0
  83. package/dist/payloads/index.js.map +1 -0
  84. package/dist/payloads/strike.js +3 -0
  85. package/dist/payloads/strike.js.map +1 -0
  86. package/dist/payloads/topics.js +72 -0
  87. package/dist/payloads/topics.js.map +1 -0
  88. package/dist/payloads/user.js +215 -0
  89. package/dist/payloads/user.js.map +1 -0
  90. package/dist/rest/account.js +3 -0
  91. package/dist/rest/account.js.map +1 -0
  92. package/dist/rest/content.js +54 -0
  93. package/dist/rest/content.js.map +1 -0
  94. package/dist/rest/counters.js +3 -0
  95. package/dist/rest/counters.js.map +1 -0
  96. package/dist/rest/endpoints.js +199 -0
  97. package/dist/rest/endpoints.js.map +1 -0
  98. package/dist/rest/explore.js +82 -0
  99. package/dist/rest/explore.js.map +1 -0
  100. package/dist/rest/feeds.js +3 -0
  101. package/dist/rest/feeds.js.map +1 -0
  102. package/dist/rest/index.js +25 -0
  103. package/dist/rest/index.js.map +1 -0
  104. package/dist/rest/issues.js +3 -0
  105. package/dist/rest/issues.js.map +1 -0
  106. package/dist/rest/oauth2.js +9 -0
  107. package/dist/rest/oauth2.js.map +1 -0
  108. package/dist/utils/index.js +19 -0
  109. package/dist/utils/index.js.map +1 -0
  110. package/dist/utils/rest.js +3 -0
  111. package/dist/utils/rest.js.map +1 -0
  112. package/dist/utils/util.js +3 -0
  113. package/dist/utils/util.js.map +1 -0
  114. package/package.json +15 -8
  115. package/tag-check.sh +111 -0
  116. package/types/errors/bad_request.d.ts +12 -0
  117. package/types/errors/bad_request.d.ts.map +1 -0
  118. package/types/errors/captcha_required.d.ts +33 -0
  119. package/types/errors/captcha_required.d.ts.map +1 -0
  120. package/types/errors/email_exists.d.ts +15 -0
  121. package/types/errors/email_exists.d.ts.map +1 -0
  122. package/types/errors/error.d.ts +29 -0
  123. package/types/errors/error.d.ts.map +1 -0
  124. package/types/errors/error_base.d.ts +61 -0
  125. package/types/errors/error_base.d.ts.map +1 -0
  126. package/types/errors/index.d.ts +13 -0
  127. package/types/errors/index.d.ts.map +1 -0
  128. package/types/errors/invalid_client.d.ts +15 -0
  129. package/types/errors/invalid_client.d.ts.map +1 -0
  130. package/types/errors/invalid_email.d.ts +15 -0
  131. package/types/errors/invalid_email.d.ts.map +1 -0
  132. package/types/errors/invalid_grant.d.ts +12 -0
  133. package/types/errors/invalid_grant.d.ts.map +1 -0
  134. package/types/errors/not_found.d.ts +8 -0
  135. package/types/errors/not_found.d.ts.map +1 -0
  136. package/types/errors/permission_denied.d.ts +12 -0
  137. package/types/errors/permission_denied.d.ts.map +1 -0
  138. package/types/errors/unauthorized.d.ts +12 -0
  139. package/types/errors/unauthorized.d.ts.map +1 -0
  140. package/types/errors/wrong_params.d.ts +11 -0
  141. package/types/errors/wrong_params.d.ts.map +1 -0
  142. package/types/index.d.ts +5 -0
  143. package/types/index.d.ts.map +1 -0
  144. package/types/payloads/activity.d.ts +114 -0
  145. package/types/payloads/activity.d.ts.map +1 -0
  146. package/types/payloads/app.d.ts +266 -0
  147. package/types/payloads/app.d.ts.map +1 -0
  148. package/types/payloads/appeal.d.ts +22 -0
  149. package/types/payloads/appeal.d.ts.map +1 -0
  150. package/types/payloads/ban.d.ts +85 -0
  151. package/types/payloads/ban.d.ts.map +1 -0
  152. package/types/payloads/base.d.ts +5 -0
  153. package/types/payloads/base.d.ts.map +1 -0
  154. package/types/payloads/chat.d.ts +117 -0
  155. package/types/payloads/chat.d.ts.map +1 -0
  156. package/types/payloads/client.d.ts +108 -0
  157. package/types/payloads/client.d.ts.map +1 -0
  158. package/types/payloads/comment.d.ts +124 -0
  159. package/types/payloads/comment.d.ts.map +1 -0
  160. package/types/payloads/content.d.ts +677 -0
  161. package/types/payloads/content.d.ts.map +1 -0
  162. package/types/payloads/index.d.ts +13 -0
  163. package/types/payloads/index.d.ts.map +1 -0
  164. package/types/payloads/strike.d.ts +15 -0
  165. package/types/payloads/strike.d.ts.map +1 -0
  166. package/types/payloads/topics.d.ts +45 -0
  167. package/types/payloads/topics.d.ts.map +1 -0
  168. package/types/payloads/user.d.ts +523 -0
  169. package/types/payloads/user.d.ts.map +1 -0
  170. package/types/rest/account.d.ts +4 -0
  171. package/types/rest/account.d.ts.map +1 -0
  172. package/types/rest/content.d.ts +96 -0
  173. package/types/rest/content.d.ts.map +1 -0
  174. package/types/rest/counters.d.ts +10 -0
  175. package/types/rest/counters.d.ts.map +1 -0
  176. package/types/rest/endpoints.d.ts +153 -0
  177. package/types/rest/endpoints.d.ts.map +1 -0
  178. package/types/rest/explore.d.ts +113 -0
  179. package/types/rest/explore.d.ts.map +1 -0
  180. package/types/rest/feeds.d.ts +17 -0
  181. package/types/rest/feeds.d.ts.map +1 -0
  182. package/types/rest/index.d.ts +9 -0
  183. package/types/rest/index.d.ts.map +1 -0
  184. package/types/rest/issues.d.ts +16 -0
  185. package/types/rest/issues.d.ts.map +1 -0
  186. package/types/rest/oauth2.d.ts +37 -0
  187. package/types/rest/oauth2.d.ts.map +1 -0
  188. package/types/utils/index.d.ts +3 -0
  189. package/types/utils/index.d.ts.map +1 -0
  190. package/types/utils/rest.d.ts +50 -0
  191. package/types/utils/rest.d.ts.map +1 -0
  192. package/types/utils/util.d.ts +80 -0
  193. package/types/utils/util.d.ts.map +1 -0
  194. package/.devenv/nix-eval-cache.db-shm +0 -0
  195. package/.devenv/nix-eval-cache.db-wal +0 -0
  196. package/.devenv/state/tasks.db-shm +0 -0
  197. package/.devenv/state/tasks.db-wal +0 -0
@@ -0,0 +1,15 @@
1
+ import { EpochSec } from "../utils";
2
+ import { APIBanReason } from "./ban";
3
+ import Base from "./base";
4
+ import { APIContent } from "./content";
5
+ export interface APIStrike extends Base {
6
+ ban_reason: APIBanReason;
7
+ created_at: EpochSec;
8
+ expired_at: EpochSec;
9
+ related_content?: APIContent;
10
+ was_shown: boolean;
11
+ is_active: boolean;
12
+ ban_days: number;
13
+ is_appealed: boolean;
14
+ }
15
+ //# sourceMappingURL=strike.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strike.d.ts","sourceRoot":"","sources":["../../src/payloads/strike.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,MAAM,WAAW,SAAU,SAAQ,IAAI;IACtC,UAAU,EAAE,YAAY,CAAC;IACzB,UAAU,EAAE,QAAQ,CAAC;IACrB,UAAU,EAAE,QAAQ,CAAC;IACrB,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;CACrB"}
@@ -0,0 +1,45 @@
1
+ import { JSONValue } from "../utils";
2
+ import type { APIInvitePayload, APIKickPayload, APIInviteResponsePayload } from "./chat";
3
+ export declare const CHAT_NAMESPACE = "co.fun.chat";
4
+ /**
5
+ * Represents a WAMP topic subscription
6
+ */
7
+ export interface Topic {
8
+ topic: string;
9
+ }
10
+ /**
11
+ * Represents a WAMP RPC call with typed payload
12
+ */
13
+ export interface RpcCall<T = Record<string, JSONValue>> {
14
+ procedure: string;
15
+ kwargs: T;
16
+ }
17
+ /**
18
+ * Returns the WAMP topic for chat channel events
19
+ */
20
+ export declare function eventsIn(channelName: string): Topic;
21
+ /**
22
+ * Returns the WAMP topic for direct message channel events
23
+ */
24
+ export declare function dmChannelTopic(channelName: string): Topic;
25
+ /**
26
+ * Returns the WAMP topic for user's joined chats
27
+ */
28
+ export declare function userJoinedChats(userId: string): Topic;
29
+ /**
30
+ * Returns the WAMP RPC call to invite users to a channel
31
+ */
32
+ export declare function inviteUsers(channelName: string, userIds: string[]): RpcCall<APIInvitePayload>;
33
+ /**
34
+ * Returns the WAMP RPC call to accept a chat invite
35
+ */
36
+ export declare function acceptInvite(channelName: string): RpcCall<APIInviteResponsePayload>;
37
+ /**
38
+ * Returns the WAMP RPC call to decline a chat invite
39
+ */
40
+ export declare function declineInvite(channelName: string): RpcCall<APIInviteResponsePayload>;
41
+ /**
42
+ * Returns the WAMP RPC call to kick a member from a channel
43
+ */
44
+ export declare function kickMember(channelName: string, userId: string): RpcCall<APIKickPayload>;
45
+ //# sourceMappingURL=topics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topics.d.ts","sourceRoot":"","sources":["../../src/payloads/topics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAC;AAEzF,eAAO,MAAM,cAAc,gBAAgB,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,KAAK;IACrB,KAAK,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,OAAO,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,CAAC,CAAC;CACV;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,KAAK,CAInD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,KAAK,CAIzD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAIrD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAK7F;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAKnF;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAKpF;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAKvF"}
@@ -0,0 +1,523 @@
1
+ import { HexCode, Size } from "../utils/util";
2
+ import { APIBanSmall } from "./ban";
3
+ import { APIBasePayload } from "./base";
4
+ /**
5
+ * Simple user type typically found in array of users
6
+ */
7
+ export type APISimpleUser = Omit<APIUser, "rating" | "nick_color">;
8
+ /**
9
+ * The creator object for the Content
10
+ */
11
+ export interface APIUser extends Pick<APIUserProfile, "id" | "nick" | "photo" | "is_verified" | "is_banned" | "is_deleted" | "is_in_subscriptions" | "is_in_subscribers" | "is_blocked" | "nick_color" | "rating" | "original_nick" | "block_type"> {
12
+ /**
13
+ * Only includes subscription and subscriber count
14
+ */
15
+ num: APIUserNums;
16
+ /**
17
+ * Total amount of posts the user has
18
+ */
19
+ total_posts: number;
20
+ }
21
+ /**
22
+ * Num object for the simple user\
23
+ * ? `total_posts` is not in APIUserNumBase. Try `user.total_posts`
24
+ */
25
+ export interface APIUserNums {
26
+ /**
27
+ * Total amount of users that are subscribed to the Client
28
+ */
29
+ subscribers: number;
30
+ /**
31
+ * Total amount of users the Client is subscribed to
32
+ */
33
+ subscriptions: number;
34
+ }
35
+ /**
36
+ * Represents a user from iFunny
37
+ */
38
+ export interface APIUserProfile extends APIBasePayload {
39
+ /**
40
+ * User's about bio\
41
+ * ? Can be an empty string
42
+ */
43
+ about: string;
44
+ /**
45
+ * Did the user block the client
46
+ */
47
+ are_you_blocked: boolean;
48
+ /**
49
+ * Array of APIBan objects.
50
+ */
51
+ bans: APIBanSmall[];
52
+ /**
53
+ * Block type if the user is blocked
54
+ */
55
+ block_type?: APIUserBlockType;
56
+ /**
57
+ * User's cover image background color
58
+ * @example
59
+ * '55ff00'
60
+ */
61
+ cover_bg_color?: HexCode;
62
+ /**
63
+ * User's cover image url
64
+ * @example
65
+ * `https://img.ifunny.co/user_covers/${string}.webp`
66
+ */
67
+ cover_url?: string;
68
+ /**
69
+ * User's unique id\
70
+ * ? Never changes
71
+ */
72
+ id: string;
73
+ /**
74
+ * Can the Client chat with the user
75
+ */
76
+ is_available_for_chat: boolean;
77
+ /**
78
+ * Is the user banned\
79
+ * ! UNSAFE TO CHECK FOR ACTIVE BANS
80
+ */
81
+ is_banned: boolean;
82
+ /**
83
+ * Is the user blocked by the client
84
+ */
85
+ is_blocked: boolean;
86
+ /**
87
+ * Is the user deleted from iFunny's servers\
88
+ * ? if true, many properties will be undefined
89
+ */
90
+ is_deleted: boolean;
91
+ /**
92
+ * Is the User subscribed to the Client
93
+ */
94
+ is_in_subscribers: boolean;
95
+ /**
96
+ * Is the Client subscribed to the user
97
+ */
98
+ is_in_subscriptions: boolean;
99
+ /**
100
+ * Is the user's account private
101
+ */
102
+ is_private: boolean;
103
+ /**
104
+ * Is the client subscribed to the user's notifications
105
+ */
106
+ is_subscribed_to_updates: boolean;
107
+ /**
108
+ * Is the user verified on iFunny
109
+ */
110
+ is_verified: boolean;
111
+ /**
112
+ * The user's meme experience
113
+ */
114
+ meme_experience: APIMemeExperience;
115
+ /**
116
+ * The Chat privacy status of the user
117
+ */
118
+ messaging_privacy_status: APIUserMessagePrivacy;
119
+ /**
120
+ * Does the user have access to chats
121
+ */
122
+ messenger_active: boolean;
123
+ /**
124
+ * Seems to always be `"1010101010101010101010101010101010101010"`
125
+ */
126
+ messenger_token: string;
127
+ /**
128
+ * User's unique username\
129
+ * ! UNSAFE FOR USER CACHING.
130
+ */
131
+ nick: string;
132
+ /**
133
+ * User's nick color (Default: 55FF00)
134
+ * @example
135
+ * '55ff00'
136
+ */
137
+ nick_color?: APINickColor;
138
+ /**
139
+ * User's profile stats
140
+ */
141
+ num: APIUserProfileNums;
142
+ /**
143
+ * Original nick of the user\
144
+ * ? iFunny censors some usernames similar to the comment filter
145
+ */
146
+ original_nick: string;
147
+ /**
148
+ * The user's profile photo
149
+ */
150
+ photo?: APIProfilePhoto;
151
+ /**
152
+ * The user's rating\
153
+ * ! Deprecated by iFunny
154
+ */
155
+ rating: APIUserRating;
156
+ /**
157
+ * The User's linked social accounts\
158
+ * Twitter, Google, Facebook
159
+ */
160
+ social?: APIUserAllSocials;
161
+ /**
162
+ * User's inapp share url
163
+ * @example
164
+ * `https://ifunny.co/user/:nick`
165
+ */
166
+ web_url: string;
167
+ }
168
+ export declare enum UserBlockType {
169
+ USER = "user",
170
+ INSTALLATION = "installation"
171
+ }
172
+ export type APIUserBlockType = `${UserBlockType}`;
173
+ /**
174
+ * `closed` only the user can create direct messages\
175
+ * `public` anyone can create a direct message the user\
176
+ * `subscribers` only subscribers can create a direct message with the user\
177
+ * ? Backend does not check this status on requests as of 5/28/22
178
+ */
179
+ export declare enum MESSAGE_PRIVACY {
180
+ CLOSED = "closed",
181
+ PUBLIC = "public",
182
+ SUBSCRIBERS = "subscribers"
183
+ }
184
+ export type APIUserMessagePrivacy = `${MESSAGE_PRIVACY}`;
185
+ /**
186
+ * A user's meme experience
187
+ */
188
+ export interface APIMemeExperience {
189
+ /**
190
+ * Pixel size of the badge
191
+ */
192
+ badge_size: Size;
193
+ /**
194
+ * MemeRank badge png url
195
+ * @example
196
+ * `https://img.ifunny.co/meme_experience/${number}.png`
197
+ */
198
+ badge_url: string;
199
+ /**
200
+ * The amount of days the user has logged into iFunny
201
+ */
202
+ days: number;
203
+ /**
204
+ * Days needed to get to the meme rank
205
+ */
206
+ next_milestone: typeof MILESTONES[keyof typeof MILESTONES];
207
+ /**
208
+ * The user's rank name
209
+ */
210
+ rank: APIMemeRank;
211
+ }
212
+ /**
213
+ * All current Meme Ranks from the API
214
+ */
215
+ export declare enum RANK {
216
+ /**
217
+ * Days: `1-4`
218
+ */
219
+ MEME_EXPLORER = "Meme explorer",
220
+ /**
221
+ * Days: `5-24`
222
+ */
223
+ MEME_BRO = "Meme bro",
224
+ /**
225
+ * Days: `25-49`
226
+ */
227
+ MEME_DADDY = "Meme daddy",
228
+ /**
229
+ * Days: `50-99`
230
+ */
231
+ DANK_MEMER = "Dank memer",
232
+ /**
233
+ * Days: `100-199`
234
+ */
235
+ MEME_MASTER_BAKER = "Meme master baker",
236
+ /**
237
+ * Days: `200-299`
238
+ */
239
+ DEEP_FRIED_MEMER = "Deep fried memer",
240
+ /**
241
+ * Days: `300-499`
242
+ */
243
+ SAUCY_MEMER = "Saucy memer",
244
+ /**
245
+ * Days: `500-665`
246
+ */
247
+ ORIGINAL_MEME_GANGSTER = "Original Meme Gangster",
248
+ /**
249
+ * Days: `666-910`
250
+ */
251
+ MEME_DEMON = "Meme demon",
252
+ /**
253
+ * Days: `911-999`
254
+ */
255
+ STEAL_BEAMS_OF_MEMES = "Steal beams of memes",
256
+ /**
257
+ * Days: `1000-1499`
258
+ */
259
+ MEME_DEALER = "Meme dealer",
260
+ /**
261
+ * Days: `1500-1999`
262
+ */
263
+ IFUNNY_VETERAN = "iFunny Veteran",
264
+ /**
265
+ * Days: `2000+`
266
+ * * Final Meme Rank
267
+ * ? next_milestone is `3000` but rank does not change
268
+ */
269
+ CHEFS_MEME_AGENT = "Chef's meme agent"
270
+ }
271
+ /**
272
+ * The minimum amount of days for each rank
273
+ */
274
+ export declare const DAYS: {
275
+ /**
276
+ * Days: `1-4`
277
+ */
278
+ readonly MEME_EXPLORER: 1;
279
+ /**
280
+ * Days: `5-24`
281
+ */
282
+ readonly MEME_BRO: 5;
283
+ /**
284
+ * Days: `25-49`
285
+ */
286
+ readonly MEME_DADDY: 25;
287
+ /**
288
+ * Days: `50-99`
289
+ */
290
+ readonly DANK_MEMER: 50;
291
+ /**
292
+ * Days: `100-199`
293
+ */
294
+ readonly MEME_MASTER_BAKER: 100;
295
+ /**
296
+ * Days: `200-299`
297
+ */
298
+ readonly DEEP_FRIED_MEMER: 200;
299
+ /**
300
+ * Days: `300-499`
301
+ */
302
+ readonly SAUCY_MEMER: 300;
303
+ /**
304
+ * Days: `500-665`
305
+ */
306
+ readonly ORIGINAL_MEME_GANGSTER: 500;
307
+ /**
308
+ * Days: `666-910`
309
+ */
310
+ readonly MEME_DEMON: 666;
311
+ /**
312
+ * Days: `911-999`
313
+ */
314
+ readonly STEAL_BEAMS_OF_MEMES: 911;
315
+ /**
316
+ * Days: `1000-1499`
317
+ */
318
+ readonly MEME_DEALER: 1000;
319
+ /**
320
+ * Days: `1500-1999`
321
+ */
322
+ readonly IFUNNY_VETERAN: 1500;
323
+ /**
324
+ * Days: `2000+`
325
+ * * Final Meme Rank
326
+ * ? next_milestone is `3000` but rank does not change
327
+ */
328
+ readonly CHEFS_MEME_AGENT: 2000;
329
+ };
330
+ /**
331
+ * The next milestone for each rank
332
+ */
333
+ export declare const MILESTONES: {
334
+ /**
335
+ * Days: `1-4`
336
+ */
337
+ readonly MEME_EXPLORER: 5;
338
+ /**
339
+ * Days: `5-24`
340
+ */
341
+ readonly MEME_BRO: 25;
342
+ /**
343
+ * Days: `25-49`
344
+ */
345
+ readonly MEME_DADDY: 50;
346
+ /**
347
+ * Days: `50-99`
348
+ */
349
+ readonly DANK_MEMER: 100;
350
+ /**
351
+ * Days: `100-199`
352
+ */
353
+ readonly MEME_MASTER_BAKER: 200;
354
+ /**
355
+ * Days: `200-299`
356
+ */
357
+ readonly DEEP_FRIED_MEMER: 300;
358
+ /**
359
+ * Days: `300-499`
360
+ */
361
+ readonly SAUCY_MEMER: 500;
362
+ /**
363
+ * Days: `500-665`
364
+ */
365
+ readonly ORIGINAL_MEME_GANGSTER: 666;
366
+ /**
367
+ * Days: `666-910`
368
+ */
369
+ readonly MEME_DEMON: 911;
370
+ /**
371
+ * Days: `911-999`
372
+ */
373
+ readonly STEAL_BEAMS_OF_MEMES: 1000;
374
+ /**
375
+ * Days: `1000-1499`
376
+ */
377
+ readonly MEME_DEALER: 1500;
378
+ /**
379
+ * Days: `1500-1999`
380
+ */
381
+ readonly IFUNNY_VETERAN: 2000;
382
+ /**
383
+ * Days: `2000+`
384
+ * * Final Meme Rank\
385
+ * ? next_milestone is `3000` but rank does not change
386
+ */
387
+ readonly CHEFS_MEME_AGENT: 3000;
388
+ };
389
+ export type APIMemeRank = `${RANK}`;
390
+ export interface APIProfilePhoto {
391
+ /**
392
+ * Profile Photo background color
393
+ * @example
394
+ * '55ff00'
395
+ */
396
+ bg_color: HexCode;
397
+ /**
398
+ * Profile photo thumbnail
399
+ */
400
+ thumb: APIProfilePhotoThumbnail;
401
+ /**
402
+ * Profile photo content url
403
+ */
404
+ url: string;
405
+ }
406
+ /**
407
+ * Profile photo thumbnail
408
+ */
409
+ export interface APIProfilePhotoThumbnail {
410
+ /**
411
+ * resize:400x,quality:90
412
+ */
413
+ large_url: string;
414
+ /**
415
+ * resize:200x quality:90
416
+ */
417
+ medium_url: string;
418
+ /**
419
+ * resize:100x quality:90
420
+ */
421
+ small_url: string;
422
+ }
423
+ export interface APIUserProfileNums extends APIUserNums {
424
+ /**
425
+ * Total amount of posts on the user's timeline
426
+ */
427
+ total_posts: number;
428
+ /**
429
+ * Amout of original (not republished) posts on the user's timeline
430
+ */
431
+ created: number;
432
+ /**
433
+ * Amount of featured posts the user has
434
+ */
435
+ featured: number;
436
+ /**
437
+ * Amount of smiles the user has from posts
438
+ */
439
+ total_smiles: number;
440
+ /**
441
+ * Amount of achievements the user has
442
+ */
443
+ achievements: number;
444
+ }
445
+ /**
446
+ * User's Rating\
447
+ * ! Deprecated by iFunny
448
+ */
449
+ export interface APIUserRating {
450
+ points: number;
451
+ current_level: APIUserRatingLevel;
452
+ next_level: APIUserRatingLevel;
453
+ max_level: APIUserRatingLevel;
454
+ is_show_level: boolean;
455
+ }
456
+ /**
457
+ * A User Rating Level\
458
+ * ! Deprecated by iFunny
459
+ */
460
+ export interface APIUserRatingLevel {
461
+ id: string;
462
+ value: number;
463
+ points: number;
464
+ }
465
+ /**
466
+ * Known nick colors
467
+ * @example
468
+ * NICK_COLORS.BRIGHT_GREEN == '55ff00'
469
+ */
470
+ export declare enum NICK_COLOR {
471
+ BRIGHT_GREEN = "55FF00",
472
+ BETA_TESTER = "55FF00",
473
+ MAROON = "660000",
474
+ ORANGE = "e0b400",
475
+ PURPLE = "a078f0",
476
+ RED = "ff3e52",
477
+ WHITE = "ffffff"
478
+ }
479
+ /**
480
+ * A user's nick color
481
+ * @example
482
+ * '55ff00'
483
+ */
484
+ export type APINickColor = `${NICK_COLOR}`;
485
+ /**
486
+ * A user's linked socials
487
+ */
488
+ export interface APIUserAllSocials {
489
+ /**
490
+ * Apple account linked to the user
491
+ */
492
+ apple?: APIUserSocial;
493
+ /**
494
+ * Facebook account linked to the user
495
+ */
496
+ fb?: APIUserSocial;
497
+ /**
498
+ * Google account linked to the user
499
+ */
500
+ ggl?: APIUserSocial;
501
+ /**
502
+ * Odnoklassniki account linked to the user (Russian social media)
503
+ */
504
+ ok?: APIUserSocial;
505
+ /**
506
+ * Twitter account linked to the user
507
+ */
508
+ tw?: APIUserSocial;
509
+ /**
510
+ * V Kontakte account linked to the user (Russian social media)
511
+ */
512
+ vk?: APIUserSocial;
513
+ }
514
+ /**
515
+ * A user's linked social
516
+ */
517
+ export interface APIUserSocial {
518
+ id: string;
519
+ is_hidden: boolean;
520
+ link: string;
521
+ nick?: string;
522
+ }
523
+ //# 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,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,aAAa,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E,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACd"}
@@ -0,0 +1,4 @@
1
+ import { APIClientUser } from "../payloads/client";
2
+ import { RESTAPISuccessResponse } from "../utils/rest";
3
+ export type RESTAPIAccountSuccess = RESTAPISuccessResponse<APIClientUser>;
4
+ //# sourceMappingURL=account.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/rest/account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,MAAM,qBAAqB,GAAG,sBAAsB,CAAC,aAAa,CAAC,CAAC"}
@@ -0,0 +1,96 @@
1
+ import { APIContent, APISimpleUser } from "../payloads";
2
+ import { RESTAPIItems, RESTAPISuccessResponse } from "../utils";
3
+ /**
4
+ * Possible report reasons
5
+ */
6
+ export declare enum REPORT_TYPE {
7
+ /**
8
+ * Hate Speech
9
+ */
10
+ HATE = "hate",
11
+ /**
12
+ * Nudity
13
+ */
14
+ NUDE = "nude",
15
+ /**
16
+ * Bot spam / spamming
17
+ */
18
+ SPAM = "spam",
19
+ /**
20
+ * Scam or Fraud
21
+ */
22
+ FRAUD = "fraud",
23
+ /**
24
+ * Targeted Abuse
25
+ */
26
+ TARGETED_ABUSE = "target",
27
+ /**
28
+ * Threats of Harm
29
+ */
30
+ THREATS = "harm",
31
+ /**
32
+ * Violence or Gore
33
+ */
34
+ VIOLENCE = "violence",
35
+ /**
36
+ * Harassment
37
+ */
38
+ HARASSMENT = "harassment",
39
+ /**
40
+ * Suicide or Self-injury
41
+ */
42
+ SUICIDE = "suicide",
43
+ /**
44
+ * Illegal or regulated goods
45
+ */
46
+ ILLEGAL = "illegal",
47
+ /**
48
+ * Banner Issues
49
+ */
50
+ BANNER = "banner"
51
+ }
52
+ /**
53
+ * Possible report reasons
54
+ */
55
+ export type APIReportReason = `${REPORT_TYPE}`;
56
+ /**
57
+ * @example
58
+ * GET /v4/content/:contentId
59
+ */
60
+ export type RESTAPIContentResponse = RESTAPISuccessResponse<APIContent>;
61
+ /**
62
+ * Nums returned when smiling or unsmiling content
63
+ */
64
+ export interface ContentSmileNums {
65
+ num_smiles: number;
66
+ num_unsmiles: number;
67
+ num_guest_smiles: number;
68
+ }
69
+ /**
70
+ * @example
71
+ * PUT /v4/content/:contentId/smiles
72
+ * DELETE /v4/content/:contentId/smiles
73
+ * PUT /v4/content/:contentId/unsmiles
74
+ * DELETE /v4/content/:contentId/unsmiles
75
+ */
76
+ export type RESTAPIContentSmileResponse = RESTAPISuccessResponse<ContentSmileNums>;
77
+ export interface ContentSmileUsers {
78
+ smiles_count: number;
79
+ guest_smiles_count: number;
80
+ users: RESTAPIItems<APISimpleUser>;
81
+ }
82
+ /**
83
+ * @example
84
+ * GET /v4/content/:contentId/smiles
85
+ */
86
+ export type RESTAPIContentSmileUsersResponse = RESTAPISuccessResponse<ContentSmileUsers>;
87
+ export interface ContentRepublishUsers {
88
+ republishes_count: number;
89
+ users: RESTAPIItems<APISimpleUser>;
90
+ }
91
+ /**
92
+ * @example
93
+ * GET /v4/content/:contentId/republished
94
+ */
95
+ export type RESTAPIContentRepublishUsersResponse = RESTAPISuccessResponse<ContentRepublishUsers>;
96
+ //# sourceMappingURL=content.d.ts.map