Skip to content

Commit

Permalink
4.8.15 dev v2 (#388)
Browse files Browse the repository at this point in the history
* content-creator role add for the upate status api (#376)

* Assessment  SavePoint API (#377)

Assessment  SavePoint API

* Added ui-proxy for V2 APIs of Playlist

* kong for v2 playlist APIs

* Added access role content creator for V2 update API

* Added new role for update API

* ui-proxy change for v2 read API

* ui-proxy for v2 read

* cios ui-proxies added

* cios roles updated

* ciosIntegration APIs added (#384)

* cios-integration apis added

* cios-integration apis added

* Tenders APi impl

* 4.8.15 dev v2 (#387)

* added configurations for bulk user create and update using csv

* added configurations for bulk user create and update using csv

---------

Co-authored-by: shankaragoudab <[email protected]>
Co-authored-by: tarentomaheshvakkund <[email protected]>
Co-authored-by: ruksanasemeir <[email protected]>
Co-authored-by: arpithasureshappa <[email protected]>
Co-authored-by: Sharath Prasad <[email protected]>
Co-authored-by: anilkumarkammalapalli <[email protected]>
  • Loading branch information
7 people authored Jun 18, 2024
1 parent 76d6ae4 commit fb7b947
Show file tree
Hide file tree
Showing 3 changed files with 175 additions and 6 deletions.
16 changes: 15 additions & 1 deletion src/proxies_v8/proxies_v8.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ proxiesV8.use('/dashboard/*',
proxyCreatorSunbird(express.Router(), `${CONSTANTS.KONG_API_BASE}`)
)
// tslint:disable-next-line:max-line-length
proxiesV8.post(['/user/v1/bulkupload', '/storage/profilePhotoUpload/*', '/workflow/admin/transition/bulkupdate', '/cloud-services/mlcore/v1/files/upload', '/calendar/v1/bulkUpload', '/storage/orgStoreUpload'], (req, res) => {
proxiesV8.post(['/user/v1/bulkupload', '/storage/profilePhotoUpload/*', '/workflow/admin/transition/bulkupdate', '/cloud-services/mlcore/v1/files/upload', '/calendar/v1/bulkUpload', '/storage/orgStoreUpload', 'workflow/admin/v2/transition/bulkupdate', '/user/v2/bulkupload'], (req, res) => {
if (req.files && req.files.data) {
const url = removePrefix('/proxies/v8', req.originalUrl)
const file: UploadedFile = req.files.data as UploadedFile
Expand Down Expand Up @@ -729,6 +729,10 @@ proxiesV8.use('/assessment/save/',
proxyCreatorSunbird(express.Router(), `${CONSTANTS.KONG_API_BASE}`)
)

proxiesV8.use('/assessment/savepoint/',
proxyCreatorSunbird(express.Router(), `${CONSTANTS.KONG_API_BASE}`)
)

proxiesV8.use('/announcements/*',
proxyCreatorSunbird(express.Router(), `${CONSTANTS.KONG_API_BASE}`)
)
Expand Down Expand Up @@ -937,6 +941,16 @@ proxiesV8.use('/orgBookmark/*',
proxyCreatorSunbird(express.Router(), `${CONSTANTS.KONG_API_BASE}`)
)

proxiesV8.use('/cios/*',
proxyCreatorSunbird(express.Router(), `${CONSTANTS.KONG_API_BASE}`)
)

proxiesV8.use('/ciosIntegration/*',
proxyCreatorSunbird(express.Router(), `${CONSTANTS.KONG_API_BASE}`)
)
proxiesV8.use('/tenders/*',
proxyCreatorSunbird(express.Router(), `${CONSTANTS.KONG_API_BASE}`)
)
export interface IUserProfile {
channel: string
firstName: string
Expand Down
15 changes: 11 additions & 4 deletions src/publicApi_v8/publicApiV8.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,20 @@ publicApiV8.use('/halloffame/read', proxyCreatorRoute(express.Router(), CONSTANT

publicApiV8.use('/playlist', youtubePlaylist)

// tslint:disable-next-line: all
publicApiV8.get('/careers/list', async (_, res) => {
await fetchList('Jobs', res)
})

publicApiV8.get('/tenders/list', async (_, res) => {
await fetchList('Tenders', res)
})

const fetchList = async (resourceCategoryString: string, res: express.Response) => {
const reqBody = {
request: {
facets: ['name', 'source', 'position'],
filters: {
resourceCategory: 'Jobs',
resourceCategory: resourceCategoryString,
status: ['Live'],
},
limit: 500,
Expand All @@ -102,7 +109,7 @@ publicApiV8.get('/careers/list', async (_, res) => {
res.status(200).send(response.data)
}
} catch (error) {
logError('Failed to get carrer listing. Error : ' + error)
logError(`Failed to get ${resourceCategoryString} listing. Error: ${error}`)
res.status(500).send('Internal Server Error')
}
})
}
150 changes: 149 additions & 1 deletion src/utils/whitelistApis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3187,6 +3187,7 @@ export const API_LIST = {
ROLE.MDO_ADMIN,
ROLE.MDO_LEADER,
ROLE.SPV_PUBLISHER,
ROLE.CONTENT_CREATOR,
],
},
'/proxies/v8/playList/search': {
Expand Down Expand Up @@ -3285,6 +3286,7 @@ export const API_LIST = {
ROLE.MDO_ADMIN,
ROLE.MDO_LEADER,
ROLE.SPV_ADMIN,
ROLE.CONTENT_CREATOR,
],
},
'/proxies/v8/orgBookmark/v1/create': {
Expand Down Expand Up @@ -3380,7 +3382,137 @@ export const API_LIST = {
ROLE.MDO_LEADER,
ROLE.SPV_ADMIN,
],
},
},
'/proxies/v8/assessment/savepoint': {
checksNeeded: [CHECK.ROLE],
// tslint:disable-next-line: object-literal-sort-keys
ROLE_CHECK: [
ROLE.PUBLIC,
],
},
'/proxies/v8/playList/v2/create': {
checksNeeded: [CHECK.ROLE],
// tslint:disable-next-line: object-literal-sort-keys
ROLE_CHECK: [
ROLE.SPV_ADMIN,
ROLE.MDO_ADMIN,
ROLE.MDO_LEADER,
ROLE.SPV_PUBLISHER,
],
},
'/proxies/v8/playList/v2/update': {
checksNeeded: [CHECK.ROLE],
// tslint:disable-next-line: object-literal-sort-keys
ROLE_CHECK: [
ROLE.SPV_ADMIN,
ROLE.MDO_ADMIN,
ROLE.MDO_LEADER,
ROLE.SPV_PUBLISHER,
ROLE.CONTENT_CREATOR,
],
},
'/proxies/v8/playList/v2/read/:id/:playListId/:orgId': {
checksNeeded: [CHECK.ROLE],
// tslint:disable-next-line: object-literal-sort-keys
ROLE_CHECK: [
ROLE.PUBLIC,
],
},
'/proxies/v8/cios/v1/onboardContent': {
checksNeeded: [CHECK.ROLE],
// tslint:disable-next-line: object-literal-sort-keys
ROLE_CHECK: [
ROLE.SPV_ADMIN,
ROLE.MDO_ADMIN,
ROLE.CBP_ADMIN,
],
},
'/proxies/v8/cios/v1/content/read/:contentId': {
checksNeeded: [CHECK.ROLE],
// tslint:disable-next-line: object-literal-sort-keys
ROLE_CHECK: [
ROLE.PUBLIC,
],
},
'/proxies/v8/cios/v1/search/content': {
checksNeeded: [CHECK.ROLE],
// tslint:disable-next-line: object-literal-sort-keys
ROLE_CHECK: [
ROLE.PUBLIC,
],
},
'/proxies/v8/cios/v1/content/delete/:contentId': {
checksNeeded: [CHECK.ROLE],
// tslint:disable-next-line: object-literal-sort-keys
ROLE_CHECK: [
ROLE.SPV_ADMIN,
ROLE.MDO_ADMIN,
ROLE.CBP_ADMIN,
],
},
'/proxies/v8/ciosIntegration/v1/loadContentFromExcel': {
checksNeeded: [CHECK.ROLE],
// tslint:disable-next-line: object-literal-sort-keys
ROLE_CHECK: [
ROLE.SPV_ADMIN,
ROLE.MDO_ADMIN,
ROLE.CBP_ADMIN,
],
},
'/proxies/v8/ciosIntegration/v1/readAllContentFromDb': {
checksNeeded: [CHECK.ROLE],
// tslint:disable-next-line: object-literal-sort-keys
ROLE_CHECK: [
ROLE.SPV_ADMIN,
ROLE.MDO_ADMIN,
ROLE.CBP_ADMIN,
],
},
'/proxies/v8/tenders/v4/read/:do_id': {
checksNeeded: [CHECK.ROLE],
// tslint:disable-next-line: object-literal-sort-keys
ROLE_CHECK: [
ROLE.PUBLIC,
],
},
'/proxies/v8/tenders/v4/publish/:do_id': {
checksNeeded: [CHECK.ROLE],
// tslint:disable-next-line: object-literal-sort-keys
ROLE_CHECK: [
ROLE.SPV_ADMIN,
],
},
'/proxies/v8/tenders/v4/create': {
checksNeeded: [CHECK.ROLE],
// tslint:disable-next-line: object-literal-sort-keys
ROLE_CHECK: [
ROLE.SPV_ADMIN,
],
},
'/proxies/v8/tenders/v4/update/:do_id': {
checksNeeded: [CHECK.ROLE],
// tslint:disable-next-line: object-literal-sort-keys
ROLE_CHECK: [
ROLE.SPV_ADMIN,
],
},
'/proxies/v8/user/v2/bulkupload': {
checksNeeded: [CHECK.ROLE],
// tslint:disable-next-line: object-literal-sort-keys
ROLE_CHECK: [
ROLE.MDO_ADMIN,
ROLE.MDO_LEADER,
],
},
'/proxies/v8/workflow/admin/v2/transition/bulkupdate': {
checksNeeded: [CHECK.ROLE],
// tslint:disable-next-line: object-literal-sort-keys
ROLE_CHECK: [
ROLE.MDO_ADMIN,
ROLE.MDO_LEADER,
],
},

},
URL_PATTERN:
[
Expand Down Expand Up @@ -3814,5 +3946,21 @@ export const API_LIST = {
'/proxies/v8/announcements/v1/search',
'/proxies/v8/announcements/v1/read/:id',
'/proxies/v8/announcements/v1/delete/:id',
'/proxies/v8/assessment/savepoint',
'/proxies/v8/playList/v2/create',
'/proxies/v8/playList/v2/update',
'/proxies/v8/playList/v2/read/:id/:playListId/:orgId',
'/proxies/v8/cios/v1/onboardContent',
'/proxies/v8/cios/v1/content/read/:contentId',
'/proxies/v8/cios/v1/search/content',
'/proxies/v8/cios/v1/content/delete/:contentId',
'/proxies/v8/ciosIntegration/v1/loadContentFromExcel',
'/proxies/v8/ciosIntegration/v1/readAllContentFromDb',
'/proxies/v8/tenders/v4/read/:do_id',
'/proxies/v8/tenders/v4/publish/:do_id',
'/proxies/v8/tenders/v4/create',
'/proxies/v8/tenders/v4/update/:do_id',
'/proxies/v8/user/v2/bulkupload',
'/proxies/v8/workflow/admin/v2/transition/bulkupdate'
],
}

0 comments on commit fb7b947

Please sign in to comment.