Skip to content

Recruit proxy api and aggapi change #5592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Jun 28, 2021
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
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ workflows:
filters:
branches:
only:
- develop
- recruit-proxy-api-aggapi
# This is alternate dev env for parallel testing
- "build-test":
context : org-global
Expand Down Expand Up @@ -368,7 +368,7 @@ workflows:
filters: &filters-staging
branches:
only:
- develop
- recruit-proxy-api-aggapi
# Production builds are exectuted
# when PR is merged to the master
# Don't change anything in this configuration
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ ARG TC_M2M_GRANT_TYPE
ARG TC_M2M_AUTH0_PROXY_SERVER_URL
ARG TC_M2M_AUTH0_URL
ARG AUTH_SECRET
ARG VALID_ISSUERS

ARG COMMUNITY_APP_URL
ARG GSHEETS_API_KEY
Expand Down Expand Up @@ -124,6 +125,7 @@ ENV TC_M2M_GRANT_TYPE=$TC_M2M_GRANT_TYPE
ENV TC_M2M_AUTH0_PROXY_SERVER_URL=$TC_M2M_AUTH0_PROXY_SERVER_URL
ENV TC_M2M_AUTH0_URL=$TC_M2M_AUTH0_URL
ENV AUTH_SECRET=$AUTH_SECRET
ENV VALID_ISSUERS=$VALID_ISSUERS

ENV CONTENTFUL_MANAGEMENT_TOKEN=$CONTENTFUL_MANAGEMENT_TOKEN
ENV CONTENTFUL_EDU_SPACE_ID=$CONTENTFUL_EDU_SPACE_ID
Expand Down
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ docker build -t $TAG \
--build-arg GROWSURF_CAMPAIGN_ID=$GROWSURF_CAMPAIGN_ID \
--build-arg GSHEETS_API_KEY=$GSHEETS_API_KEY \
--build-arg OPTIMIZELY_SDK_KEY=$OPTIMIZELY_SDK_KEY \
--build-arg COMMUNITY_APP_URL=$COMMUNITY_APP_URL .
--build-arg COMMUNITY_APP_URL=$COMMUNITY_APP_URL \
--build-arg VALID_ISSUERS=$VALID_ISSUERS .

# Copies "node_modules" from the created image, if necessary for caching.
docker create --name app $TAG
Expand Down
1 change: 1 addition & 0 deletions config/custom-environment-variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ module.exports = {

JWT_AUTH: {
SECRET: 'AUTH_SECRET',
AUTH_SECRET: 'AUTH_SECRET',
VALID_ISSUERS: 'VALID_ISSUERS',
},

Expand Down
2 changes: 1 addition & 1 deletion config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,5 +429,5 @@ module.exports = {
OPTIMIZELY: {
SDK_KEY: '7V4CJhurXT3Y3bnzv1hv1',
},
PLATFORM_SITE_URL: 'https://platform.topcoder.com',
PLATFORM_SITE_URL: 'https://platform.topcoder-dev.com',
};
1 change: 1 addition & 0 deletions config/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,5 @@ module.exports = {
TC_EDU_SEARCH_PATH: '/search',
TC_EDU_SEARCH_BAR_MAX_RESULTS_EACH_GROUP: 3,
ENABLE_RECOMMENDER: true,
PLATFORM_SITE_URL: 'https://platform.topcoder.com',
};
549 changes: 549 additions & 0 deletions docs/postman/Community APP.postman_collection.json

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions docs/postman/Community APP.postman_environment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"id": "c92b4b6b-ed64-4879-91de-e293128256b0",
"name": "Community APP",
"values": [
{
"key": "URL",
"value": "localhost:3000/api",
"enabled": true
},
{
"key": "token",
"value": "eyJhbG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dadkgiLCJpYXQiOjE2MjQxMjUzMzYsImV4cCI6MTYyNDEyODMzNiwibm9uY2UiOiJjVE5DTFVwRlpXMVJhMm94WkhSdE5WaGpVbk5IVkZGVFdWTjRiRzFCYVVaQ1dHZGpSVWhZVTB0RVZnPT0ifQ.SfKTYecx7A2qbqM3v8lJaC1GSdctNhkTx6laAhe2BJYVX5LdVL82ZM3_9yWqqZDPWHS9ku408Jt1DUMo5vRev34Av0iwJpYIT_4BbmMLeWQGQ3aRB78zp_emkZ5TE1vOnfSJvfsPoQoiLIwohyOUaDzz9MGdjrgYuSEAA1RGdjhVcamFlNNbR-lNMffnWYs0oWi89N5kgvv37JZjpDPAvQbotNT80Vs0JrLr1p71JLFcLFTQJ-bthFmt0922dj47-1MSjUQgOzFMN4JNjZKGtExyLGR7s_ipCQxg9lxHjMD-JNwg0liI20YGfTXZv9QQQ_K2jPkXiatHBQq_v2_Qjg",
"enabled": true
},
{
"key": "invalid_token_1",
"value": "eyJ",
"enabled": true
},
{
"key": "invalid_token_2",
"value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJjb3BpbG90IiwiQ29ubmVjdCBTdXBwb3J0Il0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJHaG9zdGFyIiwiZXhwIjoxNTQ5ODAwMDc3LCJ1c2VySWQiOiIxNTE3NDMiLCJpYXQiOjE1NDk3OTk0NzcsImVtYWlsIjoiZW1haWxAZG9tYWluLmNvbS56IiwianRpIjoiMTJjMWMxMGItOTNlZi00NTMxLTgzMDUtYmE2NjVmYzRlMWI0In0.2n8k9pb16sE7LOLF_7mjAvEVKgggzS-wS3_8n2-R4RU",
"enabled": true
},
{
"key": "invalid_token_3",
"value": "",
"enabled": true
},
{
"key": "invalid_token_4",
"value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJjb3BpbG90IiwiQ29ubmVjdCBTdXBwb3J0Il0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJHaG9zdGFyIiwiZXhwIjoxNTQ5ODAwMDc3LCJ1c2VySWQiOiIxNTE3NDMiLCJpYXQiOjE1NDk3OTk0NzcsImVtYWlsIjoiZW1haWxAZG9tYWluLmNvbS56IiwianRpIjoiMTJjMWMxMGItOTNlZi00NTMxLTgzMDUtYmE2NjVmYzRlMWI0In0.2n8k9pb16sE7LOLF_7mjAvEVKgggzS-wS3_8n2-R4RU",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2021-06-19T18:52:31.778Z",
"_postman_exported_using": "Postman/8.6.2"
}
1 change: 1 addition & 0 deletions docs/postman/resume.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
My Resume
189 changes: 189 additions & 0 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
openapi: 3.0.0
info:
title: Community APP
description: Community APP
version: 1.0.0
servers:
- url: http://local.topcoder-dev.com:3000
tags:
- name: Profile
paths:
/api/recruit/profile:
get:
tags:
- Profile
description: |
Get Profile of current user

**Authorization** All topcoder members are allowed.
security:
- bearerAuth: []
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Profile"
"401":
description: Not authenticated
content:
application/json:
schema:
$ref: "#/components/schemas/AuthError"
"403":
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/AuthError"
"404":
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/Profile"
"500":
description: Internal Server Error
content:
text/plain::
schema:
type: string
post:
tags:
- Profile
description: |
Update Profile details of current user
**Authorization** All topcoder members are allowed.
security:
- bearerAuth: []
requestBody:
content:
multipart/form-data:
schema:
$ref: "#/components/schemas/ProfileUpdate"
responses:
"204":
description: OK
"400":
description: Bad request
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/JoiError"
- $ref: "#/components/schemas/Error"
"401":
description: Not authenticated
content:
application/json:
schema:
$ref: "#/components/schemas/AuthError"
"403":
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/AuthError"
"404":
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"500":
description: Internal Server Error
content:
text/plain::
schema:
type: string
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
Profile:
required:
- availability
properties:
phone:
type: string
description: "The phone number of the user"
example: "+1123226666"
resume:
type: string
description: "The resume of the user"
availability:
type: boolean
description: "The availability of the user"
default: true
example: true
hasProfile:
type: boolean
description: "Whether has profile for the user"
ProfileUpdate:
required:
- phone
- availability
- city
- countryName
properties:
phone:
type: string
description: "The phone number of the user"
example: "(123) 456-7890"
city:
type: string
description: "The member's city"
countryName:
type: string
description: "The member's country"
resume:
type: string
format: binary
description: "The resume file of the user"
availability:
type: boolean
description: "The availability of the user"
example: true
Error:
properties:
error:
type: boolean
example: true
status:
type: integer
example: 404
url:
type: string
format: uri
errObj:
type: object
JoiError:
required:
- message
properties:
message:
type: string
AuthError:
properties:
version:
type: string
result:
type: object
properties:
success:
type: boolean
example: false
status:
type: integer
example: 403
content:
type: object
properties:
message:
type: string
Loading