@ifunny/ifunny-api-types 1.0.4 → 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.
- package/.devenv/bootstrap/bootstrapLib.nix +650 -0
- package/.devenv/bootstrap/default.nix +22 -0
- package/.devenv/bootstrap/lock-sources.nix +123 -0
- package/.devenv/bootstrap/resolve-input-paths.nix +34 -0
- package/.devenv/bootstrap/resolve-lock.nix +116 -0
- package/.devenv/changelog-cache.json +13 -0
- package/.devenv/devenv.fish +252 -0
- package/.devenv/imports.txt +0 -0
- package/.devenv/input-paths.txt +8 -0
- package/.devenv/load-exports +1 -0
- package/.devenv/nix-eval-cache.db +0 -0
- package/.devenv/nix-eval-cache.db.init.lock +0 -0
- package/.devenv/nixpkgs-config-99f33fda17d41bc9.nix +17 -0
- package/.devenv/nixpkgs-config-c46eff8321b73149.nix +29 -0
- package/.devenv/profiles/nix/bootstrap/bootstrapLib.nix +571 -0
- package/.devenv/profiles/nix/bootstrap/default.nix +19 -0
- package/.devenv/profiles/nix/bootstrap/resolve-lock.nix +157 -0
- package/.devenv/profiles/nix/imports.txt +0 -0
- package/.devenv/profiles/nix/input-paths.txt +4 -0
- package/.devenv/profiles/nix/load-exports +1 -0
- package/.devenv/profiles/nix/nix-eval-cache.db +0 -0
- package/.devenv/profiles/nix/nix-eval-cache.db-shm +0 -0
- package/.devenv/profiles/nix/nix-eval-cache.db-wal +0 -0
- package/.devenv/profiles/nix/nixpkgs-config-99f33fda17d41bc9.nix +17 -0
- package/.devenv/profiles/nix/shell-0d722b4fe4724c8e.sh +2270 -0
- package/.devenv/profiles/nix/shell-314b72302fb2c916.sh +2270 -0
- package/.devenv/profiles/nix/shell-6a4b00b5ca837a3b.sh +2270 -0
- package/.devenv/profiles/nix/shell-956adc1e664f64c3.sh +2270 -0
- package/.devenv/profiles/nix/shell-9dbff87fad44e8d9.sh +2270 -0
- package/.devenv/profiles/nix/shell-b1e9e1f82076662f.sh +2270 -0
- package/.devenv/profiles/nix/shell-b4f4bbfa36797bee.sh +2270 -0
- package/.devenv/profiles/nix/shell-c4b190d331c48d67.sh +2270 -0
- package/.devenv/profiles/nix/state/files.json +1 -0
- package/.devenv/profiles/nix/state/tasks.db +0 -0
- package/.devenv/profiles/nix/state/tasks.db-shm +0 -0
- package/.devenv/profiles/nix/state/tasks.db-wal +0 -0
- package/.devenv/profiles/nix/task-names.txt +5 -0
- package/.devenv/shell-086ca2c39799e6a6.sh +2270 -0
- package/.devenv/shell-2c06a35dd99be3d1.sh +2270 -0
- package/.devenv/shell-36f1fe0faec08873.sh +2270 -0
- package/.devenv/shell-676361065bda5b43.sh +2270 -0
- package/.devenv/shell-9f6cb513d1721fef.sh +2270 -0
- package/.devenv/shell-c0e4459b4f5922d7.sh +2270 -0
- package/.devenv/shell-c862a0db6e9ad5f4.sh +2270 -0
- package/.devenv/shell-d71ade933a43e837.sh +2270 -0
- package/.devenv/shell-dd73aac05b182946.sh +2270 -0
- package/.devenv/shell-e39d0b30a7e0eb13.sh +2270 -0
- package/.devenv/shell-env.sh +2275 -0
- package/.devenv/shell-f924d749ff8c17ee.sh +2270 -0
- package/.devenv/shell-rcfile.sh +152 -0
- package/.devenv/state/files.json +5 -0
- package/.devenv/state/git-hooks-install/hooks +1 -0
- package/.devenv/state/git-hooks-install/key +4 -0
- package/.devenv/state/prek/.lock +0 -0
- package/.devenv/state/prek/README +2 -0
- package/.devenv/state/prek/config-tracking.json +3 -0
- package/.devenv/state/prek/patches/1793595918715-562072.patch +26 -0
- package/.devenv/state/prek/patches/1793596283854-574354.patch +22881 -0
- package/.devenv/state/prek/patches/1793596332255-574728.patch +22870 -0
- package/.devenv/state/prek/patches/1793597557669-617911.patch +284 -0
- package/.devenv/state/prek/patches/1793856046749-331249.patch +2906 -0
- package/.devenv/state/prek/patches/1793856096552-331868.patch +2998 -0
- package/.devenv/state/prek/patches/1793856146786-332328.patch +3009 -0
- package/.devenv/state/prek/patches/1793856181490-332981.patch +11401 -0
- package/.devenv/state/prek/patches/1793856203087-333510.patch +11388 -0
- package/.devenv/state/prek/patches/1793856277935-334258.patch +11372 -0
- package/.devenv/state/prek/patches/1793856646955-337912.patch +8488 -0
- package/.devenv/state/prek/patches/1793856682905-338572.patch +8260 -0
- package/.devenv/state/prek/patches/1793857035751-356215.patch +8295 -0
- package/.devenv/state/tasks.db +0 -0
- package/.devenv/state/tasks.db.init.lock +0 -0
- package/.devenv/task-names.txt +7 -0
- package/.github/workflows/codeql.yml +72 -72
- package/.github/workflows/test.yml +31 -31
- package/.prettierignore +9 -0
- package/CHANGELOG.md +609 -427
- package/LICENSE +121 -121
- package/README.md +2 -2
- package/devenv.lock +103 -0
- package/devenv.nix +35 -0
- package/devenv.yaml +23 -0
- package/dist/errors/bad_request.js +7 -7
- package/dist/errors/bad_request.js.map +1 -1
- package/dist/errors/captcha_required.js +18 -18
- package/dist/errors/captcha_required.js.map +1 -1
- package/dist/errors/email_exists.js +7 -7
- package/dist/errors/email_exists.js.map +1 -1
- package/dist/errors/error.js +2 -2
- package/dist/errors/error_base.js +42 -42
- package/dist/errors/error_base.js.map +1 -1
- package/dist/errors/index.js +28 -28
- package/dist/errors/invalid_client.js +7 -7
- package/dist/errors/invalid_client.js.map +1 -1
- package/dist/errors/invalid_email.js +7 -7
- package/dist/errors/invalid_email.js.map +1 -1
- package/dist/errors/invalid_grant.js +7 -7
- package/dist/errors/invalid_grant.js.map +1 -1
- package/dist/errors/not_found.js +2 -2
- package/dist/errors/permission_denied.js +7 -7
- package/dist/errors/permission_denied.js.map +1 -1
- package/dist/errors/unauthorized.js +7 -7
- package/dist/errors/unauthorized.js.map +1 -1
- package/dist/errors/wrong_params.js +7 -7
- package/dist/errors/wrong_params.js.map +1 -1
- package/dist/index.js +20 -20
- package/dist/payloads/activity.js +49 -49
- package/dist/payloads/activity.js.map +1 -1
- package/dist/payloads/app.js +2 -2
- package/dist/payloads/appeal.js +13 -13
- package/dist/payloads/appeal.js.map +1 -1
- package/dist/payloads/ban.js +35 -35
- package/dist/payloads/ban.js.map +1 -1
- package/dist/payloads/base.js +2 -2
- package/dist/payloads/chat.js +37 -0
- package/dist/payloads/chat.js.map +1 -0
- package/dist/payloads/client.js +12 -12
- package/dist/payloads/client.js.map +1 -1
- package/dist/payloads/comment.js +41 -41
- package/dist/payloads/comment.js.map +1 -1
- package/dist/payloads/content.js +175 -175
- package/dist/payloads/content.js.map +1 -1
- package/dist/payloads/index.js +28 -26
- package/dist/payloads/index.js.map +1 -1
- package/dist/payloads/strike.js +2 -2
- package/dist/payloads/topics.js +72 -0
- package/dist/payloads/topics.js.map +1 -0
- package/dist/payloads/user.js +214 -214
- package/dist/payloads/user.js.map +1 -1
- package/dist/rest/account.js +2 -2
- package/dist/rest/content.js +53 -53
- package/dist/rest/content.js.map +1 -1
- package/dist/rest/counters.js +2 -2
- package/dist/rest/endpoints.js +198 -198
- package/dist/rest/endpoints.js.map +1 -1
- package/dist/rest/explore.js +81 -81
- package/dist/rest/explore.js.map +1 -1
- package/dist/rest/feeds.js +2 -2
- package/dist/rest/index.js +24 -24
- package/dist/rest/issues.js +2 -2
- package/dist/rest/oauth2.js +8 -8
- package/dist/rest/oauth2.js.map +1 -1
- package/dist/utils/index.js +18 -18
- package/dist/utils/rest.js +2 -2
- package/dist/utils/util.js +2 -2
- package/eslint.config.mjs +18 -0
- package/package.json +66 -50
- package/prettier.config.js +15 -0
- package/tag-check.sh +111 -0
- package/types/errors/bad_request.d.ts +11 -11
- package/types/errors/bad_request.d.ts.map +1 -1
- package/types/errors/captcha_required.d.ts +32 -32
- package/types/errors/captcha_required.d.ts.map +1 -1
- package/types/errors/email_exists.d.ts +14 -14
- package/types/errors/email_exists.d.ts.map +1 -1
- package/types/errors/error.d.ts +28 -28
- package/types/errors/error.d.ts.map +1 -1
- package/types/errors/error_base.d.ts +60 -60
- package/types/errors/error_base.d.ts.map +1 -1
- package/types/errors/index.d.ts +12 -12
- package/types/errors/invalid_client.d.ts +14 -14
- package/types/errors/invalid_client.d.ts.map +1 -1
- package/types/errors/invalid_email.d.ts +14 -14
- package/types/errors/invalid_email.d.ts.map +1 -1
- package/types/errors/invalid_grant.d.ts +11 -11
- package/types/errors/invalid_grant.d.ts.map +1 -1
- package/types/errors/not_found.d.ts +7 -7
- package/types/errors/permission_denied.d.ts +11 -11
- package/types/errors/permission_denied.d.ts.map +1 -1
- package/types/errors/unauthorized.d.ts +11 -11
- package/types/errors/unauthorized.d.ts.map +1 -1
- package/types/errors/wrong_params.d.ts +10 -10
- package/types/errors/wrong_params.d.ts.map +1 -1
- package/types/index.d.ts +4 -4
- package/types/payloads/activity.d.ts +113 -113
- package/types/payloads/activity.d.ts.map +1 -1
- package/types/payloads/app.d.ts +265 -265
- package/types/payloads/appeal.d.ts +21 -21
- package/types/payloads/appeal.d.ts.map +1 -1
- package/types/payloads/ban.d.ts +84 -84
- package/types/payloads/ban.d.ts.map +1 -1
- package/types/payloads/base.d.ts +4 -4
- package/types/payloads/chat.d.ts +117 -0
- package/types/payloads/chat.d.ts.map +1 -0
- package/types/payloads/client.d.ts +107 -107
- package/types/payloads/client.d.ts.map +1 -1
- package/types/payloads/comment.d.ts +123 -123
- package/types/payloads/comment.d.ts.map +1 -1
- package/types/payloads/content.d.ts +676 -677
- package/types/payloads/content.d.ts.map +1 -1
- package/types/payloads/index.d.ts +12 -10
- package/types/payloads/index.d.ts.map +1 -1
- package/types/payloads/strike.d.ts +14 -14
- package/types/payloads/topics.d.ts +45 -0
- package/types/payloads/topics.d.ts.map +1 -0
- package/types/payloads/user.d.ts +522 -522
- package/types/payloads/user.d.ts.map +1 -1
- package/types/rest/account.d.ts +3 -3
- package/types/rest/account.d.ts.map +1 -1
- package/types/rest/content.d.ts +95 -95
- package/types/rest/content.d.ts.map +1 -1
- package/types/rest/counters.d.ts +9 -9
- package/types/rest/counters.d.ts.map +1 -1
- package/types/rest/endpoints.d.ts +152 -152
- package/types/rest/explore.d.ts +112 -112
- package/types/rest/explore.d.ts.map +1 -1
- package/types/rest/feeds.d.ts +16 -16
- package/types/rest/index.d.ts +8 -8
- package/types/rest/issues.d.ts +15 -15
- package/types/rest/oauth2.d.ts +36 -36
- package/types/rest/oauth2.d.ts.map +1 -1
- package/types/utils/index.d.ts +2 -2
- package/types/utils/rest.d.ts +49 -49
- package/types/utils/rest.d.ts.map +1 -1
- package/types/utils/util.d.ts +79 -79
- package/types/utils/util.d.ts.map +1 -1
package/dist/rest/endpoints.js
CHANGED
|
@@ -1,199 +1,199 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Endpoints = void 0;
|
|
5
|
-
class Endpoints {
|
|
6
|
-
/**
|
|
7
|
-
* @param query The nick or id of the user
|
|
8
|
-
* @param byNick Whether to fetch by nick (Default: false)
|
|
9
|
-
* @example
|
|
10
|
-
* "/timelines/users/:userId"
|
|
11
|
-
* "/timelines/users/by_nick/:userNick"
|
|
12
|
-
*/
|
|
13
|
-
static userTimeline(query, byNick = false) {
|
|
14
|
-
return this.timelines + this.user(query, byNick);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @param query The user id or nick
|
|
18
|
-
* @param byNick Whether to fetch by nick (Default: false)
|
|
19
|
-
* @example
|
|
20
|
-
* "/users"
|
|
21
|
-
* "/users/:userId"
|
|
22
|
-
* "/users/by_nick/:userNick"
|
|
23
|
-
*/
|
|
24
|
-
static user(query, byNick = false) {
|
|
25
|
-
|
|
26
|
-
if (!query)
|
|
27
|
-
return users;
|
|
28
|
-
return users + (byNick ? `/by_nick/${query}` : `/${query}`);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* @param user The user id or nick
|
|
32
|
-
* @param byNick Whether the user is by nick (Default: false)
|
|
33
|
-
* @example
|
|
34
|
-
* "/users/:userId/guests"
|
|
35
|
-
* "/users/by_nick/:userNick/guests"
|
|
36
|
-
*/
|
|
37
|
-
static guests(user, byNick = false) {
|
|
38
|
-
return this.user(user, byNick) + "/guests";
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* @param user The user id or nick
|
|
42
|
-
* @param byNick Whether the user is by nick (Default: false)
|
|
43
|
-
* @example
|
|
44
|
-
* "/users/:userId/blocked"
|
|
45
|
-
* "/users/by_nick/:userNick/blocked"
|
|
46
|
-
*/
|
|
47
|
-
static blocked(user, byNick = false) {
|
|
48
|
-
return this.user(user, byNick) + "/blocked";
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
*
|
|
52
|
-
* @param user User nick or ID
|
|
53
|
-
* @param byNick User is the nick
|
|
54
|
-
* @example
|
|
55
|
-
* ""
|
|
56
|
-
*/
|
|
57
|
-
static blockedData(user, byNick = false) {
|
|
58
|
-
return this.blocked(user, byNick) + "/data";
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
* @param user Url to block
|
|
63
|
-
* @param byNick Is the user the nick?
|
|
64
|
-
* @example
|
|
65
|
-
* "/users/my/blocked/:userId"
|
|
66
|
-
* "/users/my/blocked/by_nick/:userNick"
|
|
67
|
-
*/
|
|
68
|
-
static blockUser(user, byNick = false) {
|
|
69
|
-
return this.myUser + "/blocked" + this.user(user, byNick);
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* @param user The user id or nick
|
|
73
|
-
* @param byNick Whether the user is by nick (Default: false)
|
|
74
|
-
* @example
|
|
75
|
-
* "/users/:userId/subscribers"
|
|
76
|
-
* "/users/by_nick/:userNick/subscribers"
|
|
77
|
-
*/
|
|
78
|
-
static subscribers(user, byNick = false) {
|
|
79
|
-
return this.user(user, byNick) + "/subscribers";
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* @param user The user id or nick
|
|
83
|
-
* @param byNick Whether the user is by nick (Default: false)
|
|
84
|
-
* @example
|
|
85
|
-
* "/users/:userId/subscriptions"
|
|
86
|
-
*/
|
|
87
|
-
static subscriptions(user, byNick = false) {
|
|
88
|
-
return this.user(user, byNick) + "/subscriptions";
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* @param id Id of the content if getting one
|
|
92
|
-
* @example
|
|
93
|
-
* "/content"
|
|
94
|
-
* "/content/:contentId"
|
|
95
|
-
*/
|
|
96
|
-
static content(id) {
|
|
97
|
-
return "/content" + (id ? `/${id}` : "");
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* @param contentId The content id
|
|
101
|
-
* @example
|
|
102
|
-
* "/content/:contentId/smiles"
|
|
103
|
-
*/
|
|
104
|
-
static smiles(contentId) {
|
|
105
|
-
return this.content(contentId) + "/smiles";
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* @param contentId The content id
|
|
109
|
-
* @example
|
|
110
|
-
* "/content/:contentId/unsmiles"
|
|
111
|
-
*/
|
|
112
|
-
static unsmiles(contentId) {
|
|
113
|
-
return this.content(contentId) + "/unsmiles";
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* @param contentId The content id
|
|
117
|
-
* @example
|
|
118
|
-
* "/content/:contentId/republished"
|
|
119
|
-
*/
|
|
120
|
-
static republishes(contentId) {
|
|
121
|
-
return this.content(contentId) + "/republished";
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* @param contentId Id of the content
|
|
125
|
-
* @param commentId Id of the comment if applicable
|
|
126
|
-
* @example
|
|
127
|
-
* "/content/:contentId/comments"
|
|
128
|
-
* "/content/:contentId/comments/:commentId"
|
|
129
|
-
*/
|
|
130
|
-
static comments(contentId, commentId) {
|
|
131
|
-
return this.content(contentId) + "/comments" + (commentId ? `/${commentId}` : "");
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* @param contentId The content id
|
|
135
|
-
* @param commentId The comment id
|
|
136
|
-
* @example
|
|
137
|
-
* "/content/:contentId/comments/:commentId/replies"
|
|
138
|
-
*/
|
|
139
|
-
static replies(contentId, commentId) {
|
|
140
|
-
return this.comments(contentId, commentId) + "/replies";
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* @param contentId The content id
|
|
144
|
-
* @example
|
|
145
|
-
* "/content/:contentId/comments/attached_content"
|
|
146
|
-
*/
|
|
147
|
-
static commentAttachment(contentId) {
|
|
148
|
-
return this.comments(contentId) + "/attached_content";
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* @param contentId The content id or array of content ids if adding to reads
|
|
152
|
-
* @example
|
|
153
|
-
* "/reads"
|
|
154
|
-
* "/reads/:contentId"
|
|
155
|
-
* "/reads/:contentId1,contentId2..."
|
|
156
|
-
*/
|
|
157
|
-
static reads(contentId) {
|
|
158
|
-
if (Array.isArray(contentId)) {
|
|
159
|
-
contentId = contentId.join(",");
|
|
160
|
-
}
|
|
161
|
-
return "/reads" + (contentId ? `/${contentId}` : "");
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* @param userId The id of the user the ban belongs to
|
|
165
|
-
* @param banId The id of the Ban
|
|
166
|
-
* @example
|
|
167
|
-
* "/users/:userId/bans"
|
|
168
|
-
* "/users/:userId/bans/:banId"
|
|
169
|
-
*/
|
|
170
|
-
static bans(userId, banId) {
|
|
171
|
-
return `/users/${userId}/bans` + (banId ? `/${banId}` : "");
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
exports.Endpoints = Endpoints;
|
|
175
|
-
_a = Endpoints;
|
|
176
|
-
Endpoints.base = "api.ifunny.mobi";
|
|
177
|
-
Endpoints.account = "/account";
|
|
178
|
-
Endpoints.collective = "/feeds/collective";
|
|
179
|
-
Endpoints.counters = "/counters";
|
|
180
|
-
Endpoints.featured = "/feeds/featured";
|
|
181
|
-
Endpoints.feeds = "/feeds";
|
|
182
|
-
Endpoints.oauth2 = "/oauth2";
|
|
183
|
-
Endpoints.projectElements = "/feeds/project_elements";
|
|
184
|
-
Endpoints.subscriptionFeed = "/timelines/home";
|
|
185
|
-
Endpoints.timelines = "/timelines";
|
|
186
|
-
Endpoints.token = "/oauth2/token";
|
|
187
|
-
Endpoints.myUser = "/users/my";
|
|
188
|
-
Endpoints.myComments = _a.myUser + "/comments";
|
|
189
|
-
Endpoints.chatInvites = _a.myUser + "/chat_invitations";
|
|
190
|
-
Endpoints.mySmiles = _a.myUser + "/content_smiles";
|
|
191
|
-
Endpoints.myAppeals = _a.myUser + "/appeals";
|
|
192
|
-
Endpoints.unreadChatMessages = _a.myUser + "/unread_chat_messages";
|
|
193
|
-
Endpoints.myNews = "/news/my";
|
|
194
|
-
Endpoints.nicksAvailable = "/users/nicks_available";
|
|
195
|
-
Endpoints.emailsAvailable = "/users/emails_available";
|
|
196
|
-
Endpoints.app = "/app";
|
|
197
|
-
Endpoints.settings = _a.app + "/settings";
|
|
198
|
-
Endpoints.privacy = _a.app + "/privacy";
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Endpoints = void 0;
|
|
5
|
+
class Endpoints {
|
|
6
|
+
/**
|
|
7
|
+
* @param query The nick or id of the user
|
|
8
|
+
* @param byNick Whether to fetch by nick (Default: false)
|
|
9
|
+
* @example
|
|
10
|
+
* "/timelines/users/:userId"
|
|
11
|
+
* "/timelines/users/by_nick/:userNick"
|
|
12
|
+
*/
|
|
13
|
+
static userTimeline(query, byNick = false) {
|
|
14
|
+
return this.timelines + this.user(query, byNick);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @param query The user id or nick
|
|
18
|
+
* @param byNick Whether to fetch by nick (Default: false)
|
|
19
|
+
* @example
|
|
20
|
+
* "/users"
|
|
21
|
+
* "/users/:userId"
|
|
22
|
+
* "/users/by_nick/:userNick"
|
|
23
|
+
*/
|
|
24
|
+
static user(query, byNick = false) {
|
|
25
|
+
const users = "/users";
|
|
26
|
+
if (!query)
|
|
27
|
+
return users;
|
|
28
|
+
return users + (byNick ? `/by_nick/${query}` : `/${query}`);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @param user The user id or nick
|
|
32
|
+
* @param byNick Whether the user is by nick (Default: false)
|
|
33
|
+
* @example
|
|
34
|
+
* "/users/:userId/guests"
|
|
35
|
+
* "/users/by_nick/:userNick/guests"
|
|
36
|
+
*/
|
|
37
|
+
static guests(user, byNick = false) {
|
|
38
|
+
return this.user(user, byNick) + "/guests";
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @param user The user id or nick
|
|
42
|
+
* @param byNick Whether the user is by nick (Default: false)
|
|
43
|
+
* @example
|
|
44
|
+
* "/users/:userId/blocked"
|
|
45
|
+
* "/users/by_nick/:userNick/blocked"
|
|
46
|
+
*/
|
|
47
|
+
static blocked(user, byNick = false) {
|
|
48
|
+
return this.user(user, byNick) + "/blocked";
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @param user User nick or ID
|
|
53
|
+
* @param byNick User is the nick
|
|
54
|
+
* @example
|
|
55
|
+
* ""
|
|
56
|
+
*/
|
|
57
|
+
static blockedData(user, byNick = false) {
|
|
58
|
+
return this.blocked(user, byNick) + "/data";
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @param user Url to block
|
|
63
|
+
* @param byNick Is the user the nick?
|
|
64
|
+
* @example
|
|
65
|
+
* "/users/my/blocked/:userId"
|
|
66
|
+
* "/users/my/blocked/by_nick/:userNick"
|
|
67
|
+
*/
|
|
68
|
+
static blockUser(user, byNick = false) {
|
|
69
|
+
return this.myUser + "/blocked" + this.user(user, byNick);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @param user The user id or nick
|
|
73
|
+
* @param byNick Whether the user is by nick (Default: false)
|
|
74
|
+
* @example
|
|
75
|
+
* "/users/:userId/subscribers"
|
|
76
|
+
* "/users/by_nick/:userNick/subscribers"
|
|
77
|
+
*/
|
|
78
|
+
static subscribers(user, byNick = false) {
|
|
79
|
+
return this.user(user, byNick) + "/subscribers";
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* @param user The user id or nick
|
|
83
|
+
* @param byNick Whether the user is by nick (Default: false)
|
|
84
|
+
* @example
|
|
85
|
+
* "/users/:userId/subscriptions"
|
|
86
|
+
*/
|
|
87
|
+
static subscriptions(user, byNick = false) {
|
|
88
|
+
return this.user(user, byNick) + "/subscriptions";
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* @param id Id of the content if getting one
|
|
92
|
+
* @example
|
|
93
|
+
* "/content"
|
|
94
|
+
* "/content/:contentId"
|
|
95
|
+
*/
|
|
96
|
+
static content(id) {
|
|
97
|
+
return "/content" + (id ? `/${id}` : "");
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @param contentId The content id
|
|
101
|
+
* @example
|
|
102
|
+
* "/content/:contentId/smiles"
|
|
103
|
+
*/
|
|
104
|
+
static smiles(contentId) {
|
|
105
|
+
return this.content(contentId) + "/smiles";
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* @param contentId The content id
|
|
109
|
+
* @example
|
|
110
|
+
* "/content/:contentId/unsmiles"
|
|
111
|
+
*/
|
|
112
|
+
static unsmiles(contentId) {
|
|
113
|
+
return this.content(contentId) + "/unsmiles";
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* @param contentId The content id
|
|
117
|
+
* @example
|
|
118
|
+
* "/content/:contentId/republished"
|
|
119
|
+
*/
|
|
120
|
+
static republishes(contentId) {
|
|
121
|
+
return this.content(contentId) + "/republished";
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* @param contentId Id of the content
|
|
125
|
+
* @param commentId Id of the comment if applicable
|
|
126
|
+
* @example
|
|
127
|
+
* "/content/:contentId/comments"
|
|
128
|
+
* "/content/:contentId/comments/:commentId"
|
|
129
|
+
*/
|
|
130
|
+
static comments(contentId, commentId) {
|
|
131
|
+
return this.content(contentId) + "/comments" + (commentId ? `/${commentId}` : "");
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* @param contentId The content id
|
|
135
|
+
* @param commentId The comment id
|
|
136
|
+
* @example
|
|
137
|
+
* "/content/:contentId/comments/:commentId/replies"
|
|
138
|
+
*/
|
|
139
|
+
static replies(contentId, commentId) {
|
|
140
|
+
return this.comments(contentId, commentId) + "/replies";
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* @param contentId The content id
|
|
144
|
+
* @example
|
|
145
|
+
* "/content/:contentId/comments/attached_content"
|
|
146
|
+
*/
|
|
147
|
+
static commentAttachment(contentId) {
|
|
148
|
+
return this.comments(contentId) + "/attached_content";
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* @param contentId The content id or array of content ids if adding to reads
|
|
152
|
+
* @example
|
|
153
|
+
* "/reads"
|
|
154
|
+
* "/reads/:contentId"
|
|
155
|
+
* "/reads/:contentId1,contentId2..."
|
|
156
|
+
*/
|
|
157
|
+
static reads(contentId) {
|
|
158
|
+
if (Array.isArray(contentId)) {
|
|
159
|
+
contentId = contentId.join(",");
|
|
160
|
+
}
|
|
161
|
+
return "/reads" + (contentId ? `/${contentId}` : "");
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* @param userId The id of the user the ban belongs to
|
|
165
|
+
* @param banId The id of the Ban
|
|
166
|
+
* @example
|
|
167
|
+
* "/users/:userId/bans"
|
|
168
|
+
* "/users/:userId/bans/:banId"
|
|
169
|
+
*/
|
|
170
|
+
static bans(userId, banId) {
|
|
171
|
+
return `/users/${userId}/bans` + (banId ? `/${banId}` : "");
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
exports.Endpoints = Endpoints;
|
|
175
|
+
_a = Endpoints;
|
|
176
|
+
Endpoints.base = "api.ifunny.mobi";
|
|
177
|
+
Endpoints.account = "/account";
|
|
178
|
+
Endpoints.collective = "/feeds/collective";
|
|
179
|
+
Endpoints.counters = "/counters";
|
|
180
|
+
Endpoints.featured = "/feeds/featured";
|
|
181
|
+
Endpoints.feeds = "/feeds";
|
|
182
|
+
Endpoints.oauth2 = "/oauth2";
|
|
183
|
+
Endpoints.projectElements = "/feeds/project_elements";
|
|
184
|
+
Endpoints.subscriptionFeed = "/timelines/home";
|
|
185
|
+
Endpoints.timelines = "/timelines";
|
|
186
|
+
Endpoints.token = "/oauth2/token";
|
|
187
|
+
Endpoints.myUser = "/users/my";
|
|
188
|
+
Endpoints.myComments = _a.myUser + "/comments";
|
|
189
|
+
Endpoints.chatInvites = _a.myUser + "/chat_invitations";
|
|
190
|
+
Endpoints.mySmiles = _a.myUser + "/content_smiles";
|
|
191
|
+
Endpoints.myAppeals = _a.myUser + "/appeals";
|
|
192
|
+
Endpoints.unreadChatMessages = _a.myUser + "/unread_chat_messages";
|
|
193
|
+
Endpoints.myNews = "/news/my";
|
|
194
|
+
Endpoints.nicksAvailable = "/users/nicks_available";
|
|
195
|
+
Endpoints.emailsAvailable = "/users/emails_available";
|
|
196
|
+
Endpoints.app = "/app";
|
|
197
|
+
Endpoints.settings = _a.app + "/settings";
|
|
198
|
+
Endpoints.privacy = _a.app + "/privacy";
|
|
199
199
|
//# sourceMappingURL=endpoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../src/rest/endpoints.ts"],"names":[],"mappings":";;;;AAAA,MAAa,SAAS;IAyBrB;;;;;;OAMG;IACH,MAAM,CAAC,YAAY,CAAC,KAAa,EAAE,SAAkB,KAAK;QACzD,OAAO,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI,CAAC,KAAc,EAAE,SAAkB,KAAK;QAClD,
|
|
1
|
+
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../src/rest/endpoints.ts"],"names":[],"mappings":";;;;AAAA,MAAa,SAAS;IAyBrB;;;;;;OAMG;IACH,MAAM,CAAC,YAAY,CAAC,KAAa,EAAE,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AAS,GAAG,EAAI,CAAC,MAAM,GAAG,UAAU,AAA3B,CAA4B;AACrC,4BAAkB,GAAG,EAAI,CAAC,MAAM,GAAG,uBAAuB,AAAxC,CAAyC;AAC3D,gBAAM,GAAG,UAAU,AAAb,CAAc;AACpB,wBAAc,GAAG,wBAAwB,AAA3B,CAA4B;AAC1C,yBAAe,GAAG,yBAAyB,AAA5B,CAA6B;AAC5C,aAAG,GAAG,MAAM,AAAT,CAAU;AACb,kBAAQ,GAAG,EAAI,CAAC,GAAG,GAAG,WAAW,AAAzB,CAA0B;AAClC,iBAAO,GAAG,EAAI,CAAC,GAAG,GAAG,UAAU,AAAxB,CAAyB"}
|
package/dist/rest/explore.js
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EXPLORE_COMPILATION_TYPES = exports.EXPLORE_COMPILATION_IDS = exports.EXPLORE_LAYOUTS = exports.EXPLORE_TAB_IDS = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* All known explore tab ids
|
|
6
|
-
*/
|
|
7
|
-
var EXPLORE_TAB_IDS;
|
|
8
|
-
(function (EXPLORE_TAB_IDS) {
|
|
9
|
-
EXPLORE_TAB_IDS[EXPLORE_TAB_IDS["Best"] = 2] = "Best";
|
|
10
|
-
EXPLORE_TAB_IDS[EXPLORE_TAB_IDS["Memes"] = 3] = "Memes";
|
|
11
|
-
EXPLORE_TAB_IDS[EXPLORE_TAB_IDS["Users"] = 4] = "Users";
|
|
12
|
-
EXPLORE_TAB_IDS[EXPLORE_TAB_IDS["Chats"] = 5] = "Chats";
|
|
13
|
-
EXPLORE_TAB_IDS[EXPLORE_TAB_IDS["Channels"] = 6] = "Channels";
|
|
14
|
-
EXPLORE_TAB_IDS[EXPLORE_TAB_IDS["Tags"] = 7] = "Tags";
|
|
15
|
-
EXPLORE_TAB_IDS[EXPLORE_TAB_IDS["All"] = 8] = "All";
|
|
16
|
-
})(EXPLORE_TAB_IDS
|
|
17
|
-
/**
|
|
18
|
-
* All possible layouts for explore
|
|
19
|
-
*/
|
|
20
|
-
var EXPLORE_LAYOUTS;
|
|
21
|
-
(function (EXPLORE_LAYOUTS) {
|
|
22
|
-
/**
|
|
23
|
-
* Lists content in explore
|
|
24
|
-
*/
|
|
25
|
-
EXPLORE_LAYOUTS["CONTENT_LIST"] = "content_list_6_items";
|
|
26
|
-
/**
|
|
27
|
-
* Lists comments in explore
|
|
28
|
-
*/
|
|
29
|
-
EXPLORE_LAYOUTS["COMMENT_LIST"] = "comment_list";
|
|
30
|
-
/**
|
|
31
|
-
* Lists chats in explore
|
|
32
|
-
*/
|
|
33
|
-
EXPLORE_LAYOUTS["CHATS_LIST"] = "chats_list_horizontal";
|
|
34
|
-
/**
|
|
35
|
-
* Lists users in explore
|
|
36
|
-
*/
|
|
37
|
-
EXPLORE_LAYOUTS["USER_LIST"] = "users_list_vertical";
|
|
38
|
-
/**
|
|
39
|
-
* Lists categories in explore
|
|
40
|
-
*/
|
|
41
|
-
EXPLORE_LAYOUTS["CATEGORY_LIST"] = "category_list";
|
|
42
|
-
/**
|
|
43
|
-
* Lists top values by their calender year or month
|
|
44
|
-
*/
|
|
45
|
-
EXPLORE_LAYOUTS["CALENDER_LIST"] = "calender";
|
|
46
|
-
})(EXPLORE_LAYOUTS
|
|
47
|
-
// TODO: Document all compilation ids
|
|
48
|
-
var EXPLORE_COMPILATION_IDS;
|
|
49
|
-
(function (EXPLORE_COMPILATION_IDS) {
|
|
50
|
-
EXPLORE_COMPILATION_IDS["CONTENT_TOP_OVERALL"] = "content_top_overall";
|
|
51
|
-
EXPLORE_COMPILATION_IDS["CONTENT_TOP_TODAY"] = "content_top_today";
|
|
52
|
-
EXPLORE_COMPILATION_IDS["CONTENT_TOP_SHARES"] = "content_top_by_share";
|
|
53
|
-
EXPLORE_COMPILATION_IDS["CONTENT_SHUFFLE"] = "content_shuffle";
|
|
54
|
-
EXPLORE_COMPILATION_IDS["USERS_TOP_OVERALL"] = "users_top_overall";
|
|
55
|
-
EXPLORE_COMPILATION_IDS["USER_TOP_FEATURED"] = "users_top_by_featured";
|
|
56
|
-
EXPLORE_COMPILATION_IDS["USER_TOP_SUBSCRIBERS"] = "users_top_by_subcribers";
|
|
57
|
-
EXPLORE_COMPILATION_IDS["USER_TOP_VIEWS"] = "users_top_by_content_views";
|
|
58
|
-
EXPLORE_COMPILATION_IDS["CHATS_POPULAR_LAST_WEEK"] = "chats_popular_last_week";
|
|
59
|
-
EXPLORE_COMPILATION_IDS["CHATS_NEW"] = "chats_new_chats";
|
|
60
|
-
EXPLORE_COMPILATION_IDS["CHATS_TOP_MEMBERS"] = "chats_top_by_members";
|
|
61
|
-
EXPLORE_COMPILATION_IDS["CHANNEL_COMMUNITY_GAMING"] = "channel-community-gaming";
|
|
62
|
-
EXPLORE_COMPILATION_IDS["CHANNEL_WTF"] = "channel-wtf";
|
|
63
|
-
EXPLORE_COMPILATION_IDS["CHANNEL_ANIMALS"] = "channel-animals";
|
|
64
|
-
EXPLORE_COMPILATION_IDS["CHANNEL_GAMES"] = "channel-games";
|
|
65
|
-
EXPLORE_COMPILATION_IDS["CHANNEL_COMICS"] = "channel-comics";
|
|
66
|
-
EXPLORE_COMPILATION_IDS["CHANNEL_SPORTS"] = "channel-sports";
|
|
67
|
-
EXPLORE_COMPILATION_IDS["CHANNEL_VIDEO"] = "channel-video";
|
|
68
|
-
EXPLORE_COMPILATION_IDS["CHANNEL_ORIGINALS"] = "channel-ifunny-originals";
|
|
69
|
-
EXPLORE_COMPILATION_IDS["CHANNEL_WHOLESOME"] = "channel-wholesome-wednesday";
|
|
70
|
-
EXPLORE_COMPILATION_IDS["CALENDER_BY_YEARS"] = "calender_by_years";
|
|
71
|
-
EXPLORE_COMPILATION_IDS["CALENDER_BY_MONTH"] = "calender_by_month";
|
|
72
|
-
})(EXPLORE_COMPILATION_IDS
|
|
73
|
-
var EXPLORE_COMPILATION_TYPES;
|
|
74
|
-
(function (EXPLORE_COMPILATION_TYPES) {
|
|
75
|
-
EXPLORE_COMPILATION_TYPES["CONTENT"] = "content";
|
|
76
|
-
EXPLORE_COMPILATION_TYPES["CALENDER"] = "calender";
|
|
77
|
-
EXPLORE_COMPILATION_TYPES["CHAT"] = "chat";
|
|
78
|
-
EXPLORE_COMPILATION_TYPES["CATEGORY"] = "category";
|
|
79
|
-
EXPLORE_COMPILATION_TYPES["USER"] = "user";
|
|
80
|
-
EXPLORE_COMPILATION_TYPES["COMMENT"] = "comment";
|
|
81
|
-
})(EXPLORE_COMPILATION_TYPES
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EXPLORE_COMPILATION_TYPES = exports.EXPLORE_COMPILATION_IDS = exports.EXPLORE_LAYOUTS = exports.EXPLORE_TAB_IDS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* All known explore tab ids
|
|
6
|
+
*/
|
|
7
|
+
var EXPLORE_TAB_IDS;
|
|
8
|
+
(function (EXPLORE_TAB_IDS) {
|
|
9
|
+
EXPLORE_TAB_IDS[EXPLORE_TAB_IDS["Best"] = 2] = "Best";
|
|
10
|
+
EXPLORE_TAB_IDS[EXPLORE_TAB_IDS["Memes"] = 3] = "Memes";
|
|
11
|
+
EXPLORE_TAB_IDS[EXPLORE_TAB_IDS["Users"] = 4] = "Users";
|
|
12
|
+
EXPLORE_TAB_IDS[EXPLORE_TAB_IDS["Chats"] = 5] = "Chats";
|
|
13
|
+
EXPLORE_TAB_IDS[EXPLORE_TAB_IDS["Channels"] = 6] = "Channels";
|
|
14
|
+
EXPLORE_TAB_IDS[EXPLORE_TAB_IDS["Tags"] = 7] = "Tags";
|
|
15
|
+
EXPLORE_TAB_IDS[EXPLORE_TAB_IDS["All"] = 8] = "All";
|
|
16
|
+
})(EXPLORE_TAB_IDS || (exports.EXPLORE_TAB_IDS = EXPLORE_TAB_IDS = {}));
|
|
17
|
+
/**
|
|
18
|
+
* All possible layouts for explore
|
|
19
|
+
*/
|
|
20
|
+
var EXPLORE_LAYOUTS;
|
|
21
|
+
(function (EXPLORE_LAYOUTS) {
|
|
22
|
+
/**
|
|
23
|
+
* Lists content in explore
|
|
24
|
+
*/
|
|
25
|
+
EXPLORE_LAYOUTS["CONTENT_LIST"] = "content_list_6_items";
|
|
26
|
+
/**
|
|
27
|
+
* Lists comments in explore
|
|
28
|
+
*/
|
|
29
|
+
EXPLORE_LAYOUTS["COMMENT_LIST"] = "comment_list";
|
|
30
|
+
/**
|
|
31
|
+
* Lists chats in explore
|
|
32
|
+
*/
|
|
33
|
+
EXPLORE_LAYOUTS["CHATS_LIST"] = "chats_list_horizontal";
|
|
34
|
+
/**
|
|
35
|
+
* Lists users in explore
|
|
36
|
+
*/
|
|
37
|
+
EXPLORE_LAYOUTS["USER_LIST"] = "users_list_vertical";
|
|
38
|
+
/**
|
|
39
|
+
* Lists categories in explore
|
|
40
|
+
*/
|
|
41
|
+
EXPLORE_LAYOUTS["CATEGORY_LIST"] = "category_list";
|
|
42
|
+
/**
|
|
43
|
+
* Lists top values by their calender year or month
|
|
44
|
+
*/
|
|
45
|
+
EXPLORE_LAYOUTS["CALENDER_LIST"] = "calender";
|
|
46
|
+
})(EXPLORE_LAYOUTS || (exports.EXPLORE_LAYOUTS = EXPLORE_LAYOUTS = {}));
|
|
47
|
+
// TODO: Document all compilation ids
|
|
48
|
+
var EXPLORE_COMPILATION_IDS;
|
|
49
|
+
(function (EXPLORE_COMPILATION_IDS) {
|
|
50
|
+
EXPLORE_COMPILATION_IDS["CONTENT_TOP_OVERALL"] = "content_top_overall";
|
|
51
|
+
EXPLORE_COMPILATION_IDS["CONTENT_TOP_TODAY"] = "content_top_today";
|
|
52
|
+
EXPLORE_COMPILATION_IDS["CONTENT_TOP_SHARES"] = "content_top_by_share";
|
|
53
|
+
EXPLORE_COMPILATION_IDS["CONTENT_SHUFFLE"] = "content_shuffle";
|
|
54
|
+
EXPLORE_COMPILATION_IDS["USERS_TOP_OVERALL"] = "users_top_overall";
|
|
55
|
+
EXPLORE_COMPILATION_IDS["USER_TOP_FEATURED"] = "users_top_by_featured";
|
|
56
|
+
EXPLORE_COMPILATION_IDS["USER_TOP_SUBSCRIBERS"] = "users_top_by_subcribers";
|
|
57
|
+
EXPLORE_COMPILATION_IDS["USER_TOP_VIEWS"] = "users_top_by_content_views";
|
|
58
|
+
EXPLORE_COMPILATION_IDS["CHATS_POPULAR_LAST_WEEK"] = "chats_popular_last_week";
|
|
59
|
+
EXPLORE_COMPILATION_IDS["CHATS_NEW"] = "chats_new_chats";
|
|
60
|
+
EXPLORE_COMPILATION_IDS["CHATS_TOP_MEMBERS"] = "chats_top_by_members";
|
|
61
|
+
EXPLORE_COMPILATION_IDS["CHANNEL_COMMUNITY_GAMING"] = "channel-community-gaming";
|
|
62
|
+
EXPLORE_COMPILATION_IDS["CHANNEL_WTF"] = "channel-wtf";
|
|
63
|
+
EXPLORE_COMPILATION_IDS["CHANNEL_ANIMALS"] = "channel-animals";
|
|
64
|
+
EXPLORE_COMPILATION_IDS["CHANNEL_GAMES"] = "channel-games";
|
|
65
|
+
EXPLORE_COMPILATION_IDS["CHANNEL_COMICS"] = "channel-comics";
|
|
66
|
+
EXPLORE_COMPILATION_IDS["CHANNEL_SPORTS"] = "channel-sports";
|
|
67
|
+
EXPLORE_COMPILATION_IDS["CHANNEL_VIDEO"] = "channel-video";
|
|
68
|
+
EXPLORE_COMPILATION_IDS["CHANNEL_ORIGINALS"] = "channel-ifunny-originals";
|
|
69
|
+
EXPLORE_COMPILATION_IDS["CHANNEL_WHOLESOME"] = "channel-wholesome-wednesday";
|
|
70
|
+
EXPLORE_COMPILATION_IDS["CALENDER_BY_YEARS"] = "calender_by_years";
|
|
71
|
+
EXPLORE_COMPILATION_IDS["CALENDER_BY_MONTH"] = "calender_by_month";
|
|
72
|
+
})(EXPLORE_COMPILATION_IDS || (exports.EXPLORE_COMPILATION_IDS = EXPLORE_COMPILATION_IDS = {}));
|
|
73
|
+
var EXPLORE_COMPILATION_TYPES;
|
|
74
|
+
(function (EXPLORE_COMPILATION_TYPES) {
|
|
75
|
+
EXPLORE_COMPILATION_TYPES["CONTENT"] = "content";
|
|
76
|
+
EXPLORE_COMPILATION_TYPES["CALENDER"] = "calender";
|
|
77
|
+
EXPLORE_COMPILATION_TYPES["CHAT"] = "chat";
|
|
78
|
+
EXPLORE_COMPILATION_TYPES["CATEGORY"] = "category";
|
|
79
|
+
EXPLORE_COMPILATION_TYPES["USER"] = "user";
|
|
80
|
+
EXPLORE_COMPILATION_TYPES["COMMENT"] = "comment";
|
|
81
|
+
})(EXPLORE_COMPILATION_TYPES || (exports.EXPLORE_COMPILATION_TYPES = EXPLORE_COMPILATION_TYPES = {}));
|
|
82
82
|
//# sourceMappingURL=explore.js.map
|
package/dist/rest/explore.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explore.js","sourceRoot":"","sources":["../../src/rest/explore.ts"],"names":[],"mappings":";;;AA0BA;;GAEG;AACH,IAAY,eAQX;AARD,WAAY,eAAe;IAC1B,qDAAQ,CAAA;IACR,uDAAS,CAAA;IACT,uDAAS,CAAA;IACT,uDAAS,CAAA;IACT,6DAAY,CAAA;IACZ,qDAAQ,CAAA;IACR,mDAAO,CAAA;AACR,CAAC,EARW,eAAe,
|
|
1
|
+
{"version":3,"file":"explore.js","sourceRoot":"","sources":["../../src/rest/explore.ts"],"names":[],"mappings":";;;AA0BA;;GAEG;AACH,IAAY,eAQX;AARD,WAAY,eAAe;IAC1B,qDAAQ,CAAA;IACR,uDAAS,CAAA;IACT,uDAAS,CAAA;IACT,uDAAS,CAAA;IACT,6DAAY,CAAA;IACZ,qDAAQ,CAAA;IACR,mDAAO,CAAA;AACR,CAAC,EARW,eAAe,+BAAf,eAAe,QAQ1B;AAWD;;GAEG;AACH,IAAY,eAyBX;AAzBD,WAAY,eAAe;IAC1B;;OAEG;IACH,wDAAqC,CAAA;IACrC;;OAEG;IACH,gDAA6B,CAAA;IAC7B;;OAEG;IACH,uDAAoC,CAAA;IACpC;;OAEG;IACH,oDAAiC,CAAA;IACjC;;OAEG;IACH,kDAA+B,CAAA;IAC/B;;OAEG;IACH,6CAA0B,CAAA;AAC3B,CAAC,EAzBW,eAAe,+BAAf,eAAe,QAyB1B;AAiBD,qCAAqC;AACrC,IAAY,uBAuBX;AAvBD,WAAY,uBAAuB;IAClC,sEAA2C,CAAA;IAC3C,kEAAuC,CAAA;IACvC,sEAA2C,CAAA;IAC3C,8DAAmC,CAAA;IACnC,kEAAuC,CAAA;IACvC,sEAA2C,CAAA;IAC3C,2EAAgD,CAAA;IAChD,wEAA6C,CAAA;IAC7C,8EAAmD,CAAA;IACnD,wDAA6B,CAAA;IAC7B,qEAA0C,CAAA;IAC1C,gFAAqD,CAAA;IACrD,sDAA2B,CAAA;IAC3B,8DAAmC,CAAA;IACnC,0DAA+B,CAAA;IAC/B,4DAAiC,CAAA;IACjC,4DAAiC,CAAA;IACjC,0DAA+B,CAAA;IAC/B,yEAA8C,CAAA;IAC9C,4EAAiD,CAAA;IACjD,kEAAuC,CAAA;IACvC,kEAAuC,CAAA;AACxC,CAAC,EAvBW,uBAAuB,uCAAvB,uBAAuB,QAuBlC;AAID,IAAY,yBAOX;AAPD,WAAY,yBAAyB;IACpC,gDAAmB,CAAA;IACnB,kDAAqB,CAAA;IACrB,0CAAa,CAAA;IACb,kDAAqB,CAAA;IACrB,0CAAa,CAAA;IACb,gDAAmB,CAAA;AACpB,CAAC,EAPW,yBAAyB,yCAAzB,yBAAyB,QAOpC"}
|
package/dist/rest/feeds.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=feeds.js.map
|
package/dist/rest/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./account"), exports);
|
|
18
|
-
__exportStar(require("./content"), exports);
|
|
19
|
-
__exportStar(require("./counters"), exports);
|
|
20
|
-
__exportStar(require("./endpoints"), exports);
|
|
21
|
-
__exportStar(require("./explore"), exports);
|
|
22
|
-
__exportStar(require("./feeds"), exports);
|
|
23
|
-
__exportStar(require("./issues"), exports);
|
|
24
|
-
__exportStar(require("./oauth2"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./account"), exports);
|
|
18
|
+
__exportStar(require("./content"), exports);
|
|
19
|
+
__exportStar(require("./counters"), exports);
|
|
20
|
+
__exportStar(require("./endpoints"), exports);
|
|
21
|
+
__exportStar(require("./explore"), exports);
|
|
22
|
+
__exportStar(require("./feeds"), exports);
|
|
23
|
+
__exportStar(require("./issues"), exports);
|
|
24
|
+
__exportStar(require("./oauth2"), exports);
|
|
25
25
|
//# sourceMappingURL=index.js.map
|