Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ Refer to the verification document `Verification.md`
- Manage attachments: `POST /v6/challenges/{id}/attachments`, `DELETE /v6/challenges/{id}/attachments/{attachmentId}`. See `work-manager/src/services/challenges.js`.
- Default reviewers: `GET /v6/challenge/default-reviewers?typeId&trackId`. See `work-manager/src/services/challenges.js`.
- Challenge metadata: `GET /v6/challenge-types`, `GET /v6/challenge-tracks`, `GET /v6/challenge-phases`, `GET /v6/challenge-timelines`. See `work-manager/src/services/challenges.js` and config under `work-manager/config/constants/*`.
- Challenge `metadata` may include `submission_type` to override the community-app submission flow:
`zip` shows the standard Topcoder zip upload page, and `url` shows the Topgear URL upload page.
When omitted, consumers should keep their existing default behavior.
- API base configuration points to v6 in dev/local and v5 in prod (for compatibility):
- Dev: `work-manager/config/constants/development.js`.
- Local: `work-manager/config/constants/local.js`.
Expand Down
4 changes: 3 additions & 1 deletion app-routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ function hasInteractiveRoles(authUser) {
* Read the scope claim from an auth user.
*
* The shared authenticator normally copies Auth0's `scope` string into
* `scopes`, but this also handles callers already carrying either shape.
* `scopes`, but this also handles callers already carrying either shape or
* Auth0 RBAC `permissions`.
*
* @param {Object} authUser the decoded auth user from the authenticator
* @returns {Array|String|undefined} scopes from the token
Expand All @@ -39,6 +40,7 @@ function getAuthUserScopes(authUser) {
}
return (
authUser.scopes ||
authUser.permissions ||
_.find(authUser, (value, key) => {
return key.indexOf("scope") !== -1;
})
Expand Down
16 changes: 8 additions & 8 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2585,10 +2585,10 @@ definitions:
properties:
name:
type: string
description: The sample metadata type
description: Metadata name. Use submission_type to override the challenge submission flow.
value:
type: string
description: The sample metadata value
description: Metadata value. For submission_type, supported values are zip and url.
required:
- name
- value
Expand Down Expand Up @@ -2871,10 +2871,10 @@ definitions:
properties:
name:
type: string
description: The sample metadata type
description: Metadata name. Use submission_type to override the challenge submission flow.
value:
type: string
description: The sample metadata value
description: Metadata value. For submission_type, supported values are zip and url.
required:
- name
- value
Expand Down Expand Up @@ -3042,10 +3042,10 @@ definitions:
properties:
name:
type: string
description: The sample metadata type
description: Metadata name. Use submission_type to override the challenge submission flow.
value:
type: string
description: The sample metadata value
description: Metadata value. For submission_type, supported values are zip and url.
required:
- name
- value
Expand Down Expand Up @@ -3258,10 +3258,10 @@ definitions:
properties:
name:
type: string
description: The sample metadata type
description: Metadata name. Use submission_type to override the challenge submission flow.
value:
type: string
description: The sample metadata value
description: Metadata value. For submission_type, supported values are zip and url.
required:
- name
- value
Expand Down
17 changes: 14 additions & 3 deletions packages/challenge-prisma-client/edge.js

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions packages/challenge-prisma-client/index-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ exports.Prisma.ChallengeScalarFieldEnum = {
endDate: 'endDate',
legacyId: 'legacyId',
status: 'status',
approvalStatus: 'approvalStatus',
approvalRejectionReason: 'approvalRejectionReason',
approvalApprovedBy: 'approvalApprovedBy',
createdAt: 'createdAt',
createdBy: 'createdBy',
updatedAt: 'updatedAt',
Expand Down Expand Up @@ -520,6 +523,8 @@ exports.Prisma.ChallengeOrderByRelevanceFieldEnum = {
tags: 'tags',
groups: 'groups',
taskMemberId: 'taskMemberId',
approvalRejectionReason: 'approvalRejectionReason',
approvalApprovedBy: 'approvalApprovedBy',
createdBy: 'createdBy',
updatedBy: 'updatedBy'
};
Expand Down Expand Up @@ -772,6 +777,12 @@ exports.ChallengeStatusEnum = exports.$Enums.ChallengeStatusEnum = {
CANCELLED_PAYMENT_FAILED: 'CANCELLED_PAYMENT_FAILED'
};

exports.ChallengeApprovalStatusEnum = exports.$Enums.ChallengeApprovalStatusEnum = {
PENDING_APPROVAL: 'PENDING_APPROVAL',
APPROVED: 'APPROVED',
REJECTED: 'REJECTED'
};

exports.ChallengeTrackEnum = exports.$Enums.ChallengeTrackEnum = {
DESIGN: 'DESIGN',
DATA_SCIENCE: 'DATA_SCIENCE',
Expand Down
Loading
Loading