Skip to content

Commit 8e9afa1

Browse files
committed
Actions documented, test of how the docs fit into GitHub
1 parent 90b380c commit 8e9afa1

27 files changed

+1986
-243
lines changed

bin/docgen

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ const mkpath = require('mkpath');
1212
const path = require('path');
1313
const rimraf = require('rimraf');
1414

15-
rimraf.sync(path.resolve(__dirname, '../_auto_doc_'));
15+
rimraf.sync(path.resolve(__dirname, '../docs/auto'));
1616

17-
const outputDir = path.resolve(__dirname, '../_auto_doc_');
17+
const outputDir = path.resolve(__dirname, '../docs/auto');
1818

1919
const data = jsdoc2md.getTemplateDataSync({ files: 'src/**/*.js' });
2020

@@ -25,7 +25,7 @@ const moduleNames = data.reduce((res, obj) => {
2525

2626
moduleNames.forEach((name) => {
2727
const template = `{{#module name="${name}"}}{{>docs}}{{/module}}`;
28-
console.log(`rendering ${name}, template: ${template}`);
28+
console.log(`rendering ${name}`);
2929
const output = jsdoc2md.renderSync({ data, template });
3030
const destFile = `${outputDir}/${name}.md`;
3131
mkpath.sync(path.dirname(destFile));

docs/auto/actions.auth.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<a name="module_actions.auth"></a>
2+
3+
## actions.auth
4+
Actions related to Topcoder authentication system.
5+
6+
7+
* [actions.auth](#module_actions.auth)
8+
* [.loadProfileDone(userTokenV3)](#module_actions.auth.loadProfileDone) ⇒ <code>Action</code>
9+
* [.setTcTokenV2(tokenV2)](#module_actions.auth.setTcTokenV2) ⇒ <code>Action</code>
10+
* [.setTcTokenV3(tokenV3)](#module_actions.auth.setTcTokenV3) ⇒ <code>Action</code>
11+
12+
<a name="module_actions.auth.loadProfileDone"></a>
13+
14+
### actions.auth.loadProfileDone(userTokenV3) ⇒ <code>Action</code>
15+
Creates an action that loads Topcoder user profile from v3 API.
16+
17+
**Kind**: static method of [<code>actions.auth</code>](#module_actions.auth)
18+
19+
| Param | Type | Description |
20+
| --- | --- | --- |
21+
| userTokenV3 | <code>String</code> | v3 authentication token. |
22+
23+
<a name="module_actions.auth.setTcTokenV2"></a>
24+
25+
### actions.auth.setTcTokenV2(tokenV2) ⇒ <code>Action</code>
26+
Creates an action that sets Topcoder v2 authentication token.
27+
28+
**Kind**: static method of [<code>actions.auth</code>](#module_actions.auth)
29+
30+
| Param | Type | Description |
31+
| --- | --- | --- |
32+
| tokenV2 | <code>String</code> | Topcoder v2 authentication token. |
33+
34+
<a name="module_actions.auth.setTcTokenV3"></a>
35+
36+
### actions.auth.setTcTokenV3(tokenV3) ⇒ <code>Action</code>
37+
Creates an action that decodes Topcoder v3 authentication token,
38+
to get user object, and then writes both the token and the user object into
39+
Redux store.
40+
41+
**Kind**: static method of [<code>actions.auth</code>](#module_actions.auth)
42+
43+
| Param | Type | Description |
44+
| --- | --- | --- |
45+
| tokenV3 | <code>String</code> | Topcoder v3 authentication token. |
46+

docs/auto/actions.challenge.md

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
<a name="module_actions.challenge"></a>
2+
3+
## actions.challenge
4+
Actions related to Topcoder challenges APIs.
5+
6+
7+
* [actions.challenge](#module_actions.challenge)
8+
* [.dropCheckpoints()](#module_actions.challenge.dropCheckpoints) ⇒ <code>Action</code>
9+
* [.dropResults()](#module_actions.challenge.dropResults) ⇒ <code>Action</code>
10+
* [.getDetailsInit(challengeId)](#module_actions.challenge.getDetailsInit) ⇒ <code>Action</code>
11+
* [.getDetailsDone(challengeId, tokenV3, tokenV2)](#module_actions.challenge.getDetailsDone) ⇒ <code>Action</code>
12+
* [.getSubmissionsInit(challengeId)](#module_actions.challenge.getSubmissionsInit) ⇒ <code>Action</code>
13+
* [.getSubmissionsDone(challengeId, tokenV2)](#module_actions.challenge.getSubmissionsDone) ⇒ <code>Action</code>
14+
* [.registerInit()](#module_actions.challenge.registerInit) ⇒ <code>Action</code>
15+
* [.registerDone(auth, challengeId)](#module_actions.challenge.registerDone) ⇒ <code>Action</code>
16+
* [.unregisterInit()](#module_actions.challenge.unregisterInit) ⇒ <code>Action</code>
17+
* [.unregisterDone(auth, challengeId)](#module_actions.challenge.unregisterDone) ⇒ <code>Action</code>
18+
* [.loadResultsInit(challengeId)](#module_actions.challenge.loadResultsInit) ⇒ <code>Action</code>
19+
* [.loadResultsDone(auth, challengeId, type)](#module_actions.challenge.loadResultsDone) ⇒ <code>Action</code>
20+
* [.fetchCheckpointsInit()](#module_actions.challenge.fetchCheckpointsInit) ⇒ <code>Action</code>
21+
* [.fetchCheckpointsDone(tokenV2, challengeId)](#module_actions.challenge.fetchCheckpointsDone)
22+
* [.toggleCheckpointFeedback(id, open)](#module_actions.challenge.toggleCheckpointFeedback) ⇒ <code>Action</code>
23+
* [.updateChallengeInit(uuid)](#module_actions.challenge.updateChallengeInit) ⇒ <code>Action</code>
24+
* [.updateChallengeDone(uuid, challenge, tokenV3)](#module_actions.challenge.updateChallengeDone) ⇒ <code>Action</code>
25+
26+
<a name="module_actions.challenge.dropCheckpoints"></a>
27+
28+
### actions.challenge.dropCheckpoints() ⇒ <code>Action</code>
29+
Creates an action that drops from Redux store all checkpoints loaded
30+
before.
31+
32+
**Kind**: static method of [<code>actions.challenge</code>](#module_actions.challenge)
33+
<a name="module_actions.challenge.dropResults"></a>
34+
35+
### actions.challenge.dropResults() ⇒ <code>Action</code>
36+
Creates an action that drops from Redux store all challenge results
37+
loaded before.
38+
39+
**Kind**: static method of [<code>actions.challenge</code>](#module_actions.challenge)
40+
<a name="module_actions.challenge.getDetailsInit"></a>
41+
42+
### actions.challenge.getDetailsInit(challengeId) ⇒ <code>Action</code>
43+
Creates an action that signals beginning of challenge details loading.
44+
45+
**Kind**: static method of [<code>actions.challenge</code>](#module_actions.challenge)
46+
47+
| Param | Type | Description |
48+
| --- | --- | --- |
49+
| challengeId | <code>Number</code> \| <code>String</code> | Challenge ID |
50+
51+
<a name="module_actions.challenge.getDetailsDone"></a>
52+
53+
### actions.challenge.getDetailsDone(challengeId, tokenV3, tokenV2) ⇒ <code>Action</code>
54+
Creates an action that loads challenge details.
55+
56+
**Kind**: static method of [<code>actions.challenge</code>](#module_actions.challenge)
57+
58+
| Param | Type | Description |
59+
| --- | --- | --- |
60+
| challengeId | <code>Number</code> \| <code>String</code> | Challenge ID. |
61+
| tokenV3 | <code>String</code> | Topcoder v3 auth token. |
62+
| tokenV2 | <code>String</code> | Topcoder v2 auth token. |
63+
64+
<a name="module_actions.challenge.getSubmissionsInit"></a>
65+
66+
### actions.challenge.getSubmissionsInit(challengeId) ⇒ <code>Action</code>
67+
Creates an action that signals beginning of user submissions loading.
68+
69+
**Kind**: static method of [<code>actions.challenge</code>](#module_actions.challenge)
70+
71+
| Param | Type | Description |
72+
| --- | --- | --- |
73+
| challengeId | <code>String</code> | Challenge ID. |
74+
75+
<a name="module_actions.challenge.getSubmissionsDone"></a>
76+
77+
### actions.challenge.getSubmissionsDone(challengeId, tokenV2) ⇒ <code>Action</code>
78+
Creates an action that loads user's submissions to the specified
79+
challenge.
80+
81+
**Kind**: static method of [<code>actions.challenge</code>](#module_actions.challenge)
82+
83+
| Param | Type | Description |
84+
| --- | --- | --- |
85+
| challengeId | <code>String</code> | Challenge ID. |
86+
| tokenV2 | <code>String</code> | Topcoder auth token v2. |
87+
88+
<a name="module_actions.challenge.registerInit"></a>
89+
90+
### actions.challenge.registerInit() ⇒ <code>Action</code>
91+
Creates an action that signals beginning of registration for a
92+
challenge.
93+
94+
**Kind**: static method of [<code>actions.challenge</code>](#module_actions.challenge)
95+
<a name="module_actions.challenge.registerDone"></a>
96+
97+
### actions.challenge.registerDone(auth, challengeId) ⇒ <code>Action</code>
98+
Creates an action that registers user for a challenge.
99+
100+
**Kind**: static method of [<code>actions.challenge</code>](#module_actions.challenge)
101+
102+
| Param | Type | Description |
103+
| --- | --- | --- |
104+
| auth | <code>Object</code> | An object that holds auth tokens. You can directly pass here the `auth` segment of Redux store. |
105+
| [auth.tokenV2] | <code>String</code> | Topcoder auth token v2. |
106+
| [auth.tokenV3] | <code>String</code> | Topcoder auth token v3. |
107+
| challengeId | <code>String</code> | Challenge ID. |
108+
109+
<a name="module_actions.challenge.unregisterInit"></a>
110+
111+
### actions.challenge.unregisterInit() ⇒ <code>Action</code>
112+
Creates an action that signals beginning of user unregistration from a
113+
challenge.
114+
115+
**Kind**: static method of [<code>actions.challenge</code>](#module_actions.challenge)
116+
<a name="module_actions.challenge.unregisterDone"></a>
117+
118+
### actions.challenge.unregisterDone(auth, challengeId) ⇒ <code>Action</code>
119+
Creates an action that unregisters user from a challenge.
120+
121+
**Kind**: static method of [<code>actions.challenge</code>](#module_actions.challenge)
122+
123+
| Param | Type | Description |
124+
| --- | --- | --- |
125+
| auth | <code>Object</code> | Object that holds Topcoder auth tokens. |
126+
| [auth.tokenV2] | <code>String</code> | v2 token. |
127+
| [auth.tokenV3] | <code>String</code> | v3 token. |
128+
| challengeId | <code>String</code> | Challenge ID. |
129+
130+
<a name="module_actions.challenge.loadResultsInit"></a>
131+
132+
### actions.challenge.loadResultsInit(challengeId) ⇒ <code>Action</code>
133+
Creates an action that signals beginning of challenge results loading.
134+
135+
**Kind**: static method of [<code>actions.challenge</code>](#module_actions.challenge)
136+
137+
| Param | Type | Description |
138+
| --- | --- | --- |
139+
| challengeId | <code>Number</code> \| <code>String</code> | Challenge ID |
140+
141+
<a name="module_actions.challenge.loadResultsDone"></a>
142+
143+
### actions.challenge.loadResultsDone(auth, challengeId, type) ⇒ <code>Action</code>
144+
Creates an action that loads challenge results.
145+
146+
**Kind**: static method of [<code>actions.challenge</code>](#module_actions.challenge)
147+
148+
| Param | Type | Description |
149+
| --- | --- | --- |
150+
| auth | <code>Object</code> | Object that holds Topcoder auth tokens. |
151+
| [auth.tokenV2] | <code>String</code> | v2 token. |
152+
| [auth.tokenV3] | <code>String</code> | v3 token. |
153+
| challengeId | <code>Number</code> \| <code>String</code> | Challenge ID. Should match the one passed in the previous [loadResultsInit](#module_actions.challenge.loadResultsInit) call. |
154+
| type | <code>String</code> | Challenge type. |
155+
156+
<a name="module_actions.challenge.fetchCheckpointsInit"></a>
157+
158+
### actions.challenge.fetchCheckpointsInit() ⇒ <code>Action</code>
159+
Creates an action that signals beginning of challenge checkpoints data
160+
loading.
161+
162+
**Kind**: static method of [<code>actions.challenge</code>](#module_actions.challenge)
163+
<a name="module_actions.challenge.fetchCheckpointsDone"></a>
164+
165+
### actions.challenge.fetchCheckpointsDone(tokenV2, challengeId)
166+
Creates an action that loads challenge checkpoints data.
167+
168+
**Kind**: static method of [<code>actions.challenge</code>](#module_actions.challenge)
169+
170+
| Param | Type | Description |
171+
| --- | --- | --- |
172+
| tokenV2 | <code>String</code> | Topcoder v2 auth token. |
173+
| challengeId | <code>String</code> | Challenge ID. |
174+
175+
<a name="module_actions.challenge.toggleCheckpointFeedback"></a>
176+
177+
### actions.challenge.toggleCheckpointFeedback(id, open) ⇒ <code>Action</code>
178+
Creates an action that Toggles checkpoint details panel in the Topcoder
179+
Submission Management Page.
180+
181+
**Kind**: static method of [<code>actions.challenge</code>](#module_actions.challenge)
182+
**Todo**
183+
184+
- [ ] This is UI action relevant to a specific page in specific app. Must be
185+
moved back to Community App.
186+
187+
188+
| Param | Type | Description |
189+
| --- | --- | --- |
190+
| id | <code>Number</code> | Checkpoint ID. |
191+
| open | <code>Boolean</code> | Target state: `true` to expand, `false` to collapse the details. |
192+
193+
<a name="module_actions.challenge.updateChallengeInit"></a>
194+
195+
### actions.challenge.updateChallengeInit(uuid) ⇒ <code>Action</code>
196+
Creates an action that signals beginning of challenge details update.
197+
198+
**Kind**: static method of [<code>actions.challenge</code>](#module_actions.challenge)
199+
**Todo**
200+
201+
- [ ] No idea, why we have this action. This functionality should be covered
202+
by [getDetailsInit](#module_actions.challenge.getDetailsInit) and
203+
[getDetailsDone](#module_actions.challenge.getDetailsDone). We need to refactor this.
204+
205+
206+
| Param | Type | Description |
207+
| --- | --- | --- |
208+
| uuid | <code>String</code> | UUID of the operation (the same should be passed into the corresponding [updateChallengeDone](#module_actions.challenge.updateChallengeDone)). |
209+
210+
<a name="module_actions.challenge.updateChallengeDone"></a>
211+
212+
### actions.challenge.updateChallengeDone(uuid, challenge, tokenV3) ⇒ <code>Action</code>
213+
Creates an action that updates challenge details.
214+
215+
**Kind**: static method of [<code>actions.challenge</code>](#module_actions.challenge)
216+
**Todo**
217+
218+
- [ ] No idea, why we have this action. This functionality should be covered
219+
by [getDetailsInit](#module_actions.challenge.getDetailsInit) and
220+
[getDetailsDone](#module_actions.challenge.getDetailsDone). We need to refactor this.
221+
222+
223+
| Param | Type | Description |
224+
| --- | --- | --- |
225+
| uuid | <code>String</code> | Operation UUID. Should match the one passed into the previous [updateChallengeInit](#module_actions.challenge.updateChallengeInit) call. |
226+
| challenge | <code>Object</code> | Challenge data. |
227+
| tokenV3 | <code>String</code> | Topcoder v3 auth token. |
228+

docs/auto/actions.direct.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<a name="module_actions.direct"></a>
2+
3+
## actions.direct
4+
Actions related to Direct API: access to projects, billing accounts,
5+
copilot operations, and other similar stuff is handled by them.
6+
7+
8+
* [actions.direct](#module_actions.direct)
9+
* [.dropAll()](#module_actions.direct.dropAll) ⇒ <code>Action</code>
10+
* [.getProjectDetailsInit(projectId)](#module_actions.direct.getProjectDetailsInit) ⇒ <code>Action</code>
11+
* [.getProjectDetailsDone(projectId, tokenV3)](#module_actions.direct.getProjectDetailsDone) ⇒ <code>Action</code>
12+
* [.getProjectPermissionsInit(projectId)](#module_actions.direct.getProjectPermissionsInit) ⇒ <code>Action</code>
13+
* [.getProjectPermissionsDone(projectId, tokenV3)](#module_actions.direct.getProjectPermissionsDone) ⇒ <code>Action</code>
14+
* [.getUserProjectsInit(tokenV3)](#module_actions.direct.getUserProjectsInit) ⇒ <code>Action</code>
15+
* [.getUserProjectsDone(tokenV3)](#module_actions.direct.getUserProjectsDone) ⇒ <code>Action</code>
16+
17+
<a name="module_actions.direct.dropAll"></a>
18+
19+
### actions.direct.dropAll() ⇒ <code>Action</code>
20+
Creates an action that drops out of Redux store all Direct-related
21+
data, loaded by other actions from this module, and also cancels any pending
22+
loading operations.
23+
24+
**Kind**: static method of [<code>actions.direct</code>](#module_actions.direct)
25+
<a name="module_actions.direct.getProjectDetailsInit"></a>
26+
27+
### actions.direct.getProjectDetailsInit(projectId) ⇒ <code>Action</code>
28+
Creates an action that signals beginning of project details loading.
29+
30+
**Kind**: static method of [<code>actions.direct</code>](#module_actions.direct)
31+
32+
| Param | Type | Description |
33+
| --- | --- | --- |
34+
| projectId | <code>Number</code> | Project ID. |
35+
36+
<a name="module_actions.direct.getProjectDetailsDone"></a>
37+
38+
### actions.direct.getProjectDetailsDone(projectId, tokenV3) ⇒ <code>Action</code>
39+
Creates an action that loads project details.
40+
41+
**Kind**: static method of [<code>actions.direct</code>](#module_actions.direct)
42+
43+
| Param | Type | Description |
44+
| --- | --- | --- |
45+
| projectId | <code>Number</code> | Project ID. |
46+
| tokenV3 | <code>String</code> | Topcoder auth token v3. |
47+
48+
<a name="module_actions.direct.getProjectPermissionsInit"></a>
49+
50+
### actions.direct.getProjectPermissionsInit(projectId) ⇒ <code>Action</code>
51+
Creates an action that signals beginning of project permissions
52+
loading.
53+
54+
**Kind**: static method of [<code>actions.direct</code>](#module_actions.direct)
55+
56+
| Param | Type | Description |
57+
| --- | --- | --- |
58+
| projectId | <code>Number</code> \| <code>String</code> | Project ID. |
59+
60+
<a name="module_actions.direct.getProjectPermissionsDone"></a>
61+
62+
### actions.direct.getProjectPermissionsDone(projectId, tokenV3) ⇒ <code>Action</code>
63+
Creates an action that loads project permissions.
64+
65+
**Kind**: static method of [<code>actions.direct</code>](#module_actions.direct)
66+
67+
| Param | Type | Description |
68+
| --- | --- | --- |
69+
| projectId | <code>Number</code> \| <code>String</code> | Project ID. |
70+
| tokenV3 | <code>String</code> | Topcoder v3 auth token. |
71+
72+
<a name="module_actions.direct.getUserProjectsInit"></a>
73+
74+
### actions.direct.getUserProjectsInit(tokenV3) ⇒ <code>Action</code>
75+
Creates an action that signals beginning of loading the projects
76+
related with a user.
77+
78+
**Kind**: static method of [<code>actions.direct</code>](#module_actions.direct)
79+
80+
| Param | Type | Description |
81+
| --- | --- | --- |
82+
| tokenV3 | <code>String</code> | Topcoder v3 auth token of the user for who we load the projects. |
83+
84+
<a name="module_actions.direct.getUserProjectsDone"></a>
85+
86+
### actions.direct.getUserProjectsDone(tokenV3) ⇒ <code>Action</code>
87+
Creates an action that loads projects related to a user.
88+
89+
**Kind**: static method of [<code>actions.direct</code>](#module_actions.direct)
90+
91+
| Param | Type | Description |
92+
| --- | --- | --- |
93+
| tokenV3 | <code>String</code> | Topcoder auth token v3. |
94+

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy