|
| 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 | + |
0 commit comments