diff --git a/README.md b/README.md
index a858972a..a15d010c 100644
--- a/README.md
+++ b/README.md
@@ -85,6 +85,9 @@
tc-taas-es-processor | 2021-01-22T14:27:48.976Z DEBUG no-kafka-client Subscribed to taas.job.delete:0 offset 0 leader kafka:9093
tc-taas-es-processor | 2021-01-22T14:27:48.977Z DEBUG no-kafka-client Subscribed to taas.job.update:0 offset 0 leader kafka:9093
tc-taas-es-processor | 2021-01-22T14:27:48.978Z DEBUG no-kafka-client Subscribed to taas.resourcebooking.update:0 offset 0 leader kafka:9093
+ tc-taas-es-processor | 2021-01-22T14:27:48.979Z DEBUG no-kafka-client Subscribed to taas.workperiod.create:0 offset 0 leader kafka:9093
+ tc-taas-es-processor | 2021-01-22T14:27:48.980Z DEBUG no-kafka-client Subscribed to taas.workperiod.update:0 offset 0 leader kafka:9093
+ tc-taas-es-processor | 2021-01-22T14:27:48.981Z DEBUG no-kafka-client Subscribed to taas.workperiod.delete:0 offset 0 leader kafka:9093
```
@@ -95,14 +98,14 @@
This docker-compose file starts the next services:
- | Service | Name | Port |
- |----------|:-----:|:----:|
- | PostgreSQL | postgres | 5432 |
- | Elasticsearch | elasticsearch | 9200 |
- | Zookeeper | zookeeper | 2181 |
- | Kafka | kafka | 9092 |
- | [tc-bus-api](https://github.com/topcoder-platform/tc-bus-api) | tc-bus-api | 8002 |
- | [taas-es-processor](https://github.com/topcoder-platform/taas-es-processor) | taas-es-processor | 5000 |
+ | Service | Name | Port |
+ | --------------------------------------------------------------------------- | :---------------: | :---: |
+ | PostgreSQL | postgres | 5432 |
+ | Elasticsearch | elasticsearch | 9200 |
+ | Zookeeper | zookeeper | 2181 |
+ | Kafka | kafka | 9092 |
+ | [tc-bus-api](https://github.com/topcoder-platform/tc-bus-api) | tc-bus-api | 8002 |
+ | [taas-es-processor](https://github.com/topcoder-platform/taas-es-processor) | taas-es-processor | 5000 |
- as many of the Topcoder services in this docker-compose require Auth0 configuration for M2M calls, our docker-compose file passes environment variables `AUTH0_CLIENT_ID`, `AUTH0_CLIENT_SECRET`, `AUTH0_URL`, `AUTH0_AUDIENCE`, `AUTH0_PROXY_SERVER_URL` to its containers. docker-compose takes them from `.env` file if provided.
@@ -114,7 +117,7 @@
npm run services:log -- -f SERVICE_NAME
```
- - If you want to modify the code of any of the services which are run inside this docker-compose file, you can stop such service inside docker-compose by command `docker-compose -f local/docker-compose.yml stop -f ` and run the service separately, following its README file.
+ - If you want to modify the code of any of the services which are run inside this docker-compose file, you can stop such service inside docker-compose by command `docker-compose -f local/docker-compose.yml stop ` and run the service separately, following its README file.
@@ -143,31 +146,32 @@
## NPM Commands
-| Command | Description |
-| ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
-| `npm run lint` | Check for for lint errors. |
-| `npm run lint:fix` | Check for for lint errors and fix error automatically when possible. |
-| `npm run build` | Build source code for production run into `dist` folder. |
-| `npm run start` | Start app in the production mode from prebuilt `dist` folder. |
-| `npm run dev` | Start app in the development mode using `nodemon`. |
-| `npm run test` | Run tests. |
-| `npm run init-db` | Initializes Database. |
-| `npm run create-index` | Create Elasticsearch indexes. Use `-- --force` flag to skip confirmation |
-| `npm run delete-index` | Delete Elasticsearch indexes. Use `-- --force` flag to skip confirmation |
-| `npm run data:import ` | Imports data into ES and db from filePath (`./data/demo-data.json` is used as default). Use `-- --force` flag to skip confirmation |
-| `npm run data:export ` | Exports data from ES and db into filePath (`./data/demo-data.json` is used as default). Use `-- --force` flag to skip confirmation |
-| `npm run index:all` | Indexes all data from db into ES. Use `-- --force` flag to skip confirmation|
-| `npm run index:jobs ` | Indexes job data from db into ES, if jobId is not given all data is indexed. Use `-- --force` flag to skip confirmation |
-| `npm run index:job-candidates ` | Indexes job candidate data from db into ES, if jobCandidateId is not given all data is indexed. Use `-- --force` flag to skip confirmation |
-| `npm run index:resource-bookings ` | Indexes resource bookings data from db into ES, if resourceBookingsId is not given all data is indexed. Use `-- --force` flag to skip confirmation |
-| `npm run services:up` | Start services via docker-compose for local development. |
-| `npm run services:down` | Stop services via docker-compose for local development. |
-| `npm run services:logs -- -f ` | View logs of some service inside docker-compose. |
-| `npm run local:init` | Recreate Database and Elasticsearch indexes and populate demo data for local development (removes any existent data). |
-| `npm run local:reset` | Recreate Database and Elasticsearch indexes (removes any existent data). |
-| `npm run cov` | Code Coverage Report. |
-| `npm run migrate` | Run any migration files which haven't run yet. |
-| `npm run migrate:undo` | Revert most recent migration. |
+| Command | Description |
+| ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `npm run lint` | Check for for lint errors. |
+| `npm run lint:fix` | Check for for lint errors and fix error automatically when possible. |
+| `npm run build` | Build source code for production run into `dist` folder. |
+| `npm run start` | Start app in the production mode from prebuilt `dist` folder. |
+| `npm run dev` | Start app in the development mode using `nodemon`. |
+| `npm run test` | Run tests. |
+| `npm run init-db` | Initializes Database. |
+| `npm run create-index` | Create Elasticsearch indexes. Use `-- --force` flag to skip confirmation |
+| `npm run delete-index` | Delete Elasticsearch indexes. Use `-- --force` flag to skip confirmation |
+| `npm run data:import ` | Imports data into ES and db from filePath (`./data/demo-data.json` is used as default). Use `-- --force` flag to skip confirmation |
+| `npm run data:export ` | Exports data from ES and db into filePath (`./data/demo-data.json` is used as default). Use `-- --force` flag to skip confirmation |
+| `npm run index:all` | Indexes all data from db into ES. Use `-- --force` flag to skip confirmation |
+| `npm run index:jobs ` | Indexes job data from db into ES, if jobId is not given all data is indexed. Use `-- --force` flag to skip confirmation |
+| `npm run index:job-candidates ` | Indexes job candidate data from db into ES, if jobCandidateId is not given all data is indexed. Use `-- --force` flag to skip confirmation |
+| `npm run index:resource-bookings ` | Indexes resource bookings data from db into ES, if resourceBookingsId is not given all data is indexed. Use `-- --force` flag to skip confirmation |
+| `npm run index:work-periods ` | Indexes work periods data from db into ES, if workPeriodId is not given all data is indexed. Use `-- --force` flag to skip confirmation |
+| `npm run services:up` | Start services via docker-compose for local development. |
+| `npm run services:down` | Stop services via docker-compose for local development. |
+| `npm run services:logs -- -f ` | View logs of some service inside docker-compose. |
+| `npm run local:init` | Recreate Database and Elasticsearch indexes and populate demo data for local development (removes any existent data). |
+| `npm run local:reset` | Recreate Database and Elasticsearch indexes (removes any existent data). |
+| `npm run cov` | Code Coverage Report. |
+| `npm run migrate` | Run any migration files which haven't run yet. |
+| `npm run migrate:undo` | Revert most recent migration. |
## Import and Export data
@@ -266,10 +270,17 @@ The following parameters can be set in the config file or via env variables:
When we add, update or delete models and/or endpoints we have to make sure that we keep documentation and utility scripts up to date.
-- Update Swagger.
-- Update Postman.
-- Update mapping definitions for ElasticSearch indexes inside this repository and inside [taas-es-processor](https://github.com/topcoder-platform/taas-es-processor) repository.
-- NPM command `index:all` should re-index data in all ES indexes. And there should be an individual NPM command `index:*` which would re-index data only in one ES index.
-- NPM commands `data:import` and `data:export` should support importing/exporting data from/to all the models.
-- NPM commands `create-index` and `delete-index` should support creating/deleting all the indexes.
-- If there are any updates in DB schemas, create a DB migration script inside `migrations` folder which would make any necessary updates to the DB schema. Test, that when we migrate DB from the previous state using `npm run migrate`, we get the same exactly the same DB schema as if we create DB from scratch using command `npm run init-db force`.
+- **Swagger**
+- **Postman**
+- **ES Mapping**
+ - Update mapping definitions for ElasticSearch indexes inside both repositories [taas-apis](https://github.com/topcoder-platform/taas-apis) and [taas-es-processor](https://github.com/topcoder-platform/taas-es-processor).
+- **Reindex**
+ - NPM command `index:all` should re-index data in all ES indexes.
+ - There should be an individual NPM command `index:*` which would re-index data only in one ES index.
+- **Import/Export**
+ - NPM commands `data:import` and `data:export` should support importing/exporting data from/to all the models.
+- **Create/Delete Index**
+ - NPM commands `create-index` and `delete-index` should support creating/deleting all the indexes.
+- **DB Migration**
+ - If there are any updates in DB schemas, create a DB migration script inside `migrations` folder which would make any necessary updates to the DB schema.
+ - Test, that when we migrate DB from the previous state using `npm run migrate`, we get exactly the same DB schema as if we create DB from scratch using command `npm run init-db force`.
diff --git a/app-constants.js b/app-constants.js
index e9747f85..54ed9b7f 100644
--- a/app-constants.js
+++ b/app-constants.js
@@ -33,7 +33,13 @@ const Scopes = {
DELETE_RESOURCE_BOOKING: 'delete:taas-resourceBookings',
ALL_RESOURCE_BOOKING: 'all:taas-resourceBookings',
// taas-team
- READ_TAAS_TEAM: 'read:taas-teams'
+ READ_TAAS_TEAM: 'read:taas-teams',
+ // work period
+ READ_WORK_PERIOD: 'read:taas-workPeriods',
+ CREATE_WORK_PERIOD: 'create:taas-workPeriods',
+ UPDATE_WORK_PERIOD: 'update:taas-workPeriods',
+ DELETE_WORK_PERIOD: 'delete:taas-workPeriods',
+ ALL_WORK_PERIOD: 'all:taas-workPeriods'
}
module.exports = {
diff --git a/config/default.js b/config/default.js
index e475a677..8088c1a8 100644
--- a/config/default.js
+++ b/config/default.js
@@ -76,6 +76,8 @@ module.exports = {
ES_INDEX_JOB_CANDIDATE: process.env.ES_INDEX_JOB_CANDIDATE || 'job_candidate',
// the resource booking index
ES_INDEX_RESOURCE_BOOKING: process.env.ES_INDEX_RESOURCE_BOOKING || 'resource_booking',
+ // the work period index
+ ES_INDEX_WORK_PERIOD: process.env.ES_INDEX_WORK_PERIOD || 'work_period',
// the max bulk size in MB for ES indexing
MAX_BULK_REQUEST_SIZE_MB: process.env.MAX_BULK_REQUEST_SIZE_MB || 20,
@@ -103,13 +105,20 @@ module.exports = {
TAAS_JOB_CANDIDATE_UPDATE_TOPIC: process.env.TAAS_JOB_CANDIDATE_UPDATE_TOPIC || 'taas.jobcandidate.update',
// the delete job candidate entity Kafka message topic
TAAS_JOB_CANDIDATE_DELETE_TOPIC: process.env.TAAS_JOB_CANDIDATE_DELETE_TOPIC || 'taas.jobcandidate.delete',
- // topics for job service
+ // topics for resource booking service
// the create resource booking entity Kafka message topic
TAAS_RESOURCE_BOOKING_CREATE_TOPIC: process.env.TAAS_RESOURCE_BOOKING_CREATE_TOPIC || 'taas.resourcebooking.create',
// the update resource booking entity Kafka message topic
TAAS_RESOURCE_BOOKING_UPDATE_TOPIC: process.env.TAAS_RESOURCE_BOOKING_UPDATE_TOPIC || 'taas.resourcebooking.update',
// the delete resource booking entity Kafka message topic
TAAS_RESOURCE_BOOKING_DELETE_TOPIC: process.env.TAAS_RESOURCE_BOOKING_DELETE_TOPIC || 'taas.resourcebooking.delete',
+ // topics for work period service
+ // the create rwork period entity Kafka message topic
+ TAAS_WORK_PERIOD_CREATE_TOPIC: process.env.TAAS_WORK_PERIOD_CREATE_TOPIC || 'taas.workperiod.create',
+ // the update work period entity Kafka message topic
+ TAAS_WORK_PERIOD_UPDATE_TOPIC: process.env.TAAS_WORK_PERIOD_UPDATE_TOPIC || 'taas.workperiod.update',
+ // the delete work period entity Kafka message topic
+ TAAS_WORK_PERIOD_DELETE_TOPIC: process.env.TAAS_WORK_PERIOD_DELETE_TOPIC || 'taas.workperiod.delete',
// the Kafka message topic for sending email
EMAIL_TOPIC: process.env.EMAIL_TOPIC || 'external.action.email',
diff --git a/data/demo-data.json b/data/demo-data.json
index 6c8872b4..94bbdbb9 100644
--- a/data/demo-data.json
+++ b/data/demo-data.json
@@ -1 +1 @@
-{"Job":[{"id":"b9887564-3d3d-4c70-8a7b-552576ef2e8d","projectId":111,"externalId":"0","description":"taas-demo-job1","title":"Demo Title","startDate":"2020-09-27T04:17:23.131Z","endDate":"2020-09-27T04:17:23.131Z","numPositions":13,"resourceType":"Dummy Resource Type","rateType":"weekly","workload":"full-time","skills":["ee4c50c1-c8c3-475e-b6b6-edbd136a19d6","89139c80-d0a2-47c2-aa16-14589d5afd10","9f2d9127-6a2e-4506-ad76-c4ab63577b09","9515e7ee-83b6-49d1-ba5c-6c59c5a8ef1b","c854ab55-5922-4be1-8ecc-b3bc1f8629af","8456002e-fa2d-44f0-b0e7-86b1c02b6e4c","114b4ec8-805e-4c60-b351-14a955a991a9","213408aa-f16f-46c8-bc57-9e569cee3f11","b37a48db-f775-4e4e-b403-8ad1d234cdea","99b930b5-1b91-4df1-8b17-d9307107bb51","6388a632-c3ad-4525-9a73-66a527c03672","23839f38-6f19-4de9-9d28-f020056bca73","289e42a3-23e9-49be-88e1-6deb93cd8c31","b403f209-63b5-42bc-9b5f-1564416640d8"],"status":"sourcing","createdAt":"2021-01-28T19:36:33.409Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":null,"updatedBy":null},{"id":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","projectId":111,"externalId":"0","description":"taas-demo-job2","title":"Dummy title - at most 64 characters","startDate":"2020-09-27T04:17:23.131Z","endDate":"2020-09-27T04:17:23.131Z","numPositions":7,"resourceType":"Dummy Resource Type","rateType":"weekly","workload":"full-time","skills":["213408aa-f16f-46c8-bc57-9e569cee3f11","b37a48db-f775-4e4e-b403-8ad1d234cdea","99b930b5-1b91-4df1-8b17-d9307107bb51","6388a632-c3ad-4525-9a73-66a527c03672","23839f38-6f19-4de9-9d28-f020056bca73","289e42a3-23e9-49be-88e1-6deb93cd8c31","b403f209-63b5-42bc-9b5f-1564416640d8"],"status":"in-review","createdAt":"2021-01-28T19:36:44.975Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:38:17.463Z","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c"},{"id":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","projectId":111,"externalId":"0","description":"taas-demo-job3","title":"Dummy title - at most 64 characters","startDate":"2020-09-27T04:17:23.131Z","endDate":"2020-09-27T04:17:23.131Z","numPositions":7,"resourceType":"Dummy Resource Type","rateType":"weekly","workload":"full-time","skills":[],"status":"assigned","createdAt":"2021-01-28T19:38:23.739Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:41:10.607Z","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c"},{"id":"84b73f90-0fef-4507-887a-074578e5ef38","projectId":111,"externalId":"0","description":"taas-demo-job4","title":"Dummy title - at most 64 characters","startDate":"2020-09-27T04:17:23.131Z","endDate":"2020-09-27T04:17:23.131Z","numPositions":7,"resourceType":"Dummy Resource Type","rateType":"weekly","workload":"full-time","skills":["8456002e-fa2d-44f0-b0e7-86b1c02b6e4c","114b4ec8-805e-4c60-b351-14a955a991a9","213408aa-f16f-46c8-bc57-9e569cee3f11","b37a48db-f775-4e4e-b403-8ad1d234cdea","99b930b5-1b91-4df1-8b17-d9307107bb51","6388a632-c3ad-4525-9a73-66a527c03672"],"status":"closed","createdAt":"2021-01-28T19:41:21.892Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:41:28.849Z","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c"},{"id":"62399aa0-b088-41fe-9e9b-0c8071f1934f","projectId":111,"externalId":"0","description":"taas-demo-job5","title":"Dummy title - at most 64 characters","startDate":"2020-09-27T04:17:23.131Z","endDate":"2020-09-27T04:17:23.131Z","numPositions":7,"resourceType":"Dummy Resource Type","rateType":"weekly","workload":"full-time","skills":["b37a48db-f775-4e4e-b403-8ad1d234cdea","99b930b5-1b91-4df1-8b17-d9307107bb51","6388a632-c3ad-4525-9a73-66a527c03672"],"status":"cancelled","createdAt":"2021-01-28T19:41:35.098Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:41:42.124Z","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c"}],"JobCandidate":[{"id":"debadcd8-64bf-4ab8-9cdb-297479eef6f5","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"4dfc6090-4ba8-4387-b5c4-584fcef982ba","status":"open","externalId":null,"resume":null,"createdAt":"2021-01-28T19:37:05.723Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":null,"updatedBy":null},{"id":"7ff45b8f-2b71-4510-b760-8dfa62e79504","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"243517dd-77d7-4f70-8951-0bc66da83076","status":"open","externalId":null,"resume":null,"createdAt":"2021-01-28T19:37:11.598Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":null,"updatedBy":null},{"id":"91d63d5f-01d5-419e-89df-6117ea92f535","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"a2e28bf4-1147-41a6-a39f-e2509306f2a6","status":"open","externalId":null,"resume":null,"createdAt":"2021-01-28T19:37:18.066Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":null,"updatedBy":null},{"id":"257f98d9-45f7-4e13-a6c2-d7e7b6efc9fe","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"b8649393-d32f-4b7f-a156-12e9776acb0e","status":"open","externalId":null,"resume":null,"createdAt":"2021-01-28T19:37:24.095Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":null,"updatedBy":null},{"id":"a01852d0-fa08-410c-b97b-67580ce62215","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"a0a3a5ce-1de6-465d-91b2-518feb299851","status":"open","externalId":null,"resume":null,"createdAt":"2021-01-28T19:37:29.734Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":null,"updatedBy":null},{"id":"2fd7ca69-c8ec-4bf3-a7f3-655fbfe3e7df","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"e6958d77-ffaf-4d24-9cdb-6391506695a4","status":"open","externalId":null,"resume":null,"createdAt":"2021-01-28T19:37:44.728Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":null,"updatedBy":null},{"id":"f0023058-2996-4bba-8c5f-d09a7023be38","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"626bb327-e738-48e3-8f67-1fa2dc677d3c","status":"open","externalId":null,"resume":null,"createdAt":"2021-01-28T19:37:50.619Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":null,"updatedBy":null},{"id":"a189b34d-acde-4633-b18b-f7a34d7c5a74","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"b49a0adb-1565-4de1-9189-a763c77f5ed4","status":"open","externalId":null,"resume":null,"createdAt":"2021-01-28T19:37:56.456Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":null,"updatedBy":null},{"id":"5191a860-4327-4c50-b76b-84beba04519b","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"79ce2a3e-7679-48cf-8ac9-0a8ca4c4b463","status":"shortlist","externalId":null,"resume":null,"createdAt":"2021-01-28T19:36:51.222Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:38:02.293Z","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c"},{"id":"e6d9635c-b122-4f69-9285-09fb1ab30106","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"98ec2c16-442e-4b61-8ad1-66123ee37d3c","status":"rejected","externalId":null,"resume":null,"createdAt":"2021-01-28T19:36:58.774Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:38:13.553Z","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c"},{"id":"f67b155e-0f09-4fdd-89a7-d79c5e46cac6","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"05e988b7-7d54-4c10-ada1-1a04870a88a8","status":"open","externalId":null,"resume":null,"createdAt":"2021-01-28T19:38:38.332Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":null,"updatedBy":null},{"id":"8ffd33d3-4a43-4719-aee4-8e46be1d8f1c","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"a2ffdeed-704d-4cf7-b70a-93fcf61de598","status":"open","externalId":null,"resume":null,"createdAt":"2021-01-28T19:38:43.967Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":null,"updatedBy":null},{"id":"2b8ba549-8878-43d6-ad5f-6a66e3b9d6c9","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"4709473d-f060-4102-87f8-4d51ff0b34c1","status":"open","externalId":null,"resume":null,"createdAt":"2021-01-28T19:38:50.106Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":null,"updatedBy":null},{"id":"ae5a81ec-5d05-43c4-8253-847d91a54711","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"39c7376e-2d5c-4601-bc47-6b60f505814d","status":"open","externalId":null,"resume":null,"createdAt":"2021-01-28T19:38:55.734Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":null,"updatedBy":null},{"id":"85d6649e-2682-4904-9480-a77b72fef27d","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"213d2dd9-1fc3-4eda-ad97-2d56e2a84a1e","status":"selected","externalId":null,"resume":null,"createdAt":"2021-01-28T19:38:30.856Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:40:27.209Z","updatedBy":"00000000-0000-0000-0000-000000000000"},{"id":"922dfce3-4e06-4387-9fdb-64f70675e86b","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"dd5adacb-444d-4992-8b7b-0c349be598db","status":"selected","externalId":null,"resume":null,"createdAt":"2021-01-28T19:39:02.435Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:40:49.349Z","updatedBy":"00000000-0000-0000-0000-000000000000"},{"id":"c26c38e2-a47d-405b-abc6-fe62a739561c","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"6d0509c7-5f12-4d84-9a19-8e80ef7ddd66","status":"selected","externalId":null,"resume":null,"createdAt":"2021-01-28T19:39:08.233Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:40:53.659Z","updatedBy":"00000000-0000-0000-0000-000000000000"},{"id":"7bef2b37-e1ee-4638-bfc1-c911787ac955","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"f65e2104-2987-4136-839d-ee4632f0b2e5","status":"selected","externalId":null,"resume":null,"createdAt":"2021-01-28T19:39:13.469Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:40:57.999Z","updatedBy":"00000000-0000-0000-0000-000000000000"},{"id":"e9716139-1f40-4bf1-9f8a-77ae4bcc621e","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"e5e667ad-0950-43c2-8d1d-6e83ad7d1c7e","status":"selected","externalId":null,"resume":null,"createdAt":"2021-01-28T19:39:19.215Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:41:01.953Z","updatedBy":"00000000-0000-0000-0000-000000000000"},{"id":"a1731d01-eac9-4eff-8e5a-8a3c99bc66e0","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"bef43122-426b-4b2b-acdd-9b5b3bd1c0bf","status":"selected","externalId":null,"resume":null,"createdAt":"2021-01-28T19:39:24.625Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:41:06.370Z","updatedBy":"00000000-0000-0000-0000-000000000000"}],"ResourceBooking":[{"id":"08f5e4b9-1088-496d-91a7-5b22a3583e3c","projectId":111,"userId":"213d2dd9-1fc3-4eda-ad97-2d56e2a84a1e","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"assigned","startDate":"2021-01-25T19:39:28.000Z","endDate":"2021-01-31T19:39:28.000Z","memberRate":1000,"customerRate":1200,"rateType":"weekly","createdAt":"2021-01-28T19:39:30.052Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:40:25.260Z","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c"},{"id":"7d967fed-9792-4768-98a7-0b644aa84f2e","projectId":111,"userId":"05e988b7-7d54-4c10-ada1-1a04870a88a8","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"in-review","startDate":"2021-01-25T19:39:34.000Z","endDate":"2021-01-31T19:39:34.000Z","memberRate":1000,"customerRate":1200,"rateType":"weekly","createdAt":"2021-01-28T19:39:35.571Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:40:30.291Z","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c"},{"id":"35e1abd8-1890-4664-bb52-aade382d7b66","projectId":111,"userId":"a2ffdeed-704d-4cf7-b70a-93fcf61de598","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"closed","startDate":"2021-01-25T19:39:39.000Z","endDate":"2021-01-31T19:39:39.000Z","memberRate":1000,"customerRate":1200,"rateType":"weekly","createdAt":"2021-01-28T19:39:41.205Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:40:34.859Z","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c"},{"id":"a098e8d8-ce5b-47d9-afee-38b050d16745","projectId":111,"userId":"4709473d-f060-4102-87f8-4d51ff0b34c1","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"cancelled","startDate":"2021-01-25T19:39:45.000Z","endDate":"2021-01-31T19:39:45.000Z","memberRate":1000,"customerRate":1200,"rateType":"weekly","createdAt":"2021-01-28T19:39:46.515Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:40:38.820Z","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c"},{"id":"d38a6223-3f91-4300-9ecb-6e5fee173625","projectId":111,"userId":"39c7376e-2d5c-4601-bc47-6b60f505814d","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"sourcing","startDate":"2021-01-25T19:39:50.000Z","endDate":"2021-01-31T19:39:50.000Z","memberRate":1000,"customerRate":1200,"rateType":"weekly","createdAt":"2021-01-28T19:39:52.063Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:40:43.021Z","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c"},{"id":"51b45f5d-5df2-46d5-9c3d-8a1323df38dd","projectId":111,"userId":"dd5adacb-444d-4992-8b7b-0c349be598db","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"assigned","startDate":"2021-01-25T19:39:58.000Z","endDate":"2021-01-31T19:39:58.000Z","memberRate":800,"customerRate":1000,"rateType":"weekly","createdAt":"2021-01-28T19:39:59.432Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:40:47.743Z","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c"},{"id":"0a6799d7-f5d1-456b-8bf1-90619284b295","projectId":111,"userId":"6d0509c7-5f12-4d84-9a19-8e80ef7ddd66","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"assigned","startDate":"2021-01-25T19:40:03.000Z","endDate":"2021-01-31T19:40:03.000Z","memberRate":2000,"customerRate":2500,"rateType":"weekly","createdAt":"2021-01-28T19:40:04.761Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:40:52.303Z","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c"},{"id":"61f5d474-e41f-490b-ab58-9f983e3d4916","projectId":111,"userId":"f65e2104-2987-4136-839d-ee4632f0b2e5","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"assigned","startDate":"2000-07-27T04:17:23.131Z","endDate":"2000-09-27T04:17:23.131Z","memberRate":3000,"customerRate":3500,"rateType":"weekly","createdAt":"2021-01-28T19:40:09.879Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:40:56.381Z","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c"},{"id":"dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa","projectId":111,"userId":"e5e667ad-0950-43c2-8d1d-6e83ad7d1c7e","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"assigned","startDate":"2022-07-27T04:17:23.131Z","endDate":"2022-09-27T04:17:23.131Z","memberRate":1700,"customerRate":1900,"rateType":"weekly","createdAt":"2021-01-28T19:40:15.326Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:41:00.503Z","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c"},{"id":"8173579e-4b3c-418d-a9a1-c999caa38404","projectId":111,"userId":"bef43122-426b-4b2b-acdd-9b5b3bd1c0bf","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"assigned","startDate":"2020-09-27T04:17:23.131Z","endDate":"2020-09-27T04:17:23.131Z","memberRate":0,"customerRate":0,"rateType":"weekly","createdAt":"2021-01-28T19:40:20.627Z","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedAt":"2021-01-28T19:41:04.919Z","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c"}]}
\ No newline at end of file
+{"Job":[{"id":"b9887564-3d3d-4c70-8a7b-552576ef2e8d","projectId":111,"externalId":"0","description":"taas-demo-job1","title":"Demo Title","startDate":"2020-09-27T04:17:23.131Z","duration":null,"numPositions":13,"resourceType":"Dummy Resource Type","rateType":"weekly","workload":"full-time","skills":["ee4c50c1-c8c3-475e-b6b6-edbd136a19d6","89139c80-d0a2-47c2-aa16-14589d5afd10","9f2d9127-6a2e-4506-ad76-c4ab63577b09","9515e7ee-83b6-49d1-ba5c-6c59c5a8ef1b","c854ab55-5922-4be1-8ecc-b3bc1f8629af","8456002e-fa2d-44f0-b0e7-86b1c02b6e4c","114b4ec8-805e-4c60-b351-14a955a991a9","213408aa-f16f-46c8-bc57-9e569cee3f11","b37a48db-f775-4e4e-b403-8ad1d234cdea","99b930b5-1b91-4df1-8b17-d9307107bb51","6388a632-c3ad-4525-9a73-66a527c03672","23839f38-6f19-4de9-9d28-f020056bca73","289e42a3-23e9-49be-88e1-6deb93cd8c31","b403f209-63b5-42bc-9b5f-1564416640d8"],"status":"sourcing","isApplicationPageActive":false,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-01-28T19:36:33.409Z","updatedAt":"2021-03-30T19:11:05.033Z"},{"id":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","projectId":111,"externalId":"0","description":"taas-demo-job2","title":"Dummy title - at most 64 characters","startDate":"2020-09-27T04:17:23.131Z","duration":null,"numPositions":7,"resourceType":"Dummy Resource Type","rateType":"weekly","workload":"full-time","skills":["213408aa-f16f-46c8-bc57-9e569cee3f11","b37a48db-f775-4e4e-b403-8ad1d234cdea","99b930b5-1b91-4df1-8b17-d9307107bb51","6388a632-c3ad-4525-9a73-66a527c03672","23839f38-6f19-4de9-9d28-f020056bca73","289e42a3-23e9-49be-88e1-6deb93cd8c31","b403f209-63b5-42bc-9b5f-1564416640d8"],"status":"in-review","isApplicationPageActive":false,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","createdAt":"2021-01-28T19:36:44.975Z","updatedAt":"2021-01-28T19:38:17.463Z"},{"id":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","projectId":111,"externalId":"0","description":"taas-demo-job3","title":"Dummy title - at most 64 characters","startDate":"2020-09-27T04:17:23.131Z","duration":null,"numPositions":7,"resourceType":"Dummy Resource Type","rateType":"weekly","workload":"full-time","skills":[],"status":"assigned","isApplicationPageActive":false,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","createdAt":"2021-01-28T19:38:23.739Z","updatedAt":"2021-01-28T19:41:10.607Z"},{"id":"84b73f90-0fef-4507-887a-074578e5ef38","projectId":111,"externalId":"0","description":"taas-demo-job4","title":"Dummy title - at most 64 characters","startDate":"2020-09-27T04:17:23.131Z","duration":null,"numPositions":7,"resourceType":"Dummy Resource Type","rateType":"weekly","workload":"full-time","skills":["8456002e-fa2d-44f0-b0e7-86b1c02b6e4c","114b4ec8-805e-4c60-b351-14a955a991a9","213408aa-f16f-46c8-bc57-9e569cee3f11","b37a48db-f775-4e4e-b403-8ad1d234cdea","99b930b5-1b91-4df1-8b17-d9307107bb51","6388a632-c3ad-4525-9a73-66a527c03672"],"status":"closed","isApplicationPageActive":false,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","createdAt":"2021-01-28T19:41:21.892Z","updatedAt":"2021-01-28T19:41:28.849Z"},{"id":"62399aa0-b088-41fe-9e9b-0c8071f1934f","projectId":111,"externalId":"0","description":"taas-demo-job5","title":"Dummy title - at most 64 characters","startDate":"2020-09-27T04:17:23.131Z","duration":null,"numPositions":7,"resourceType":"Dummy Resource Type","rateType":"weekly","workload":"full-time","skills":["b37a48db-f775-4e4e-b403-8ad1d234cdea","99b930b5-1b91-4df1-8b17-d9307107bb51","6388a632-c3ad-4525-9a73-66a527c03672"],"status":"cancelled","isApplicationPageActive":false,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","createdAt":"2021-01-28T19:41:35.098Z","updatedAt":"2021-01-28T19:41:42.124Z"}],"JobCandidate":[{"id":"debadcd8-64bf-4ab8-9cdb-297479eef6f5","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"4dfc6090-4ba8-4387-b5c4-584fcef982ba","status":"open","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-01-28T19:37:05.723Z","updatedAt":"2021-03-30T19:11:05.043Z"},{"id":"7ff45b8f-2b71-4510-b760-8dfa62e79504","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"243517dd-77d7-4f70-8951-0bc66da83076","status":"open","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-01-28T19:37:11.598Z","updatedAt":"2021-03-30T19:11:05.043Z"},{"id":"91d63d5f-01d5-419e-89df-6117ea92f535","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"a2e28bf4-1147-41a6-a39f-e2509306f2a6","status":"open","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-01-28T19:37:18.066Z","updatedAt":"2021-03-30T19:11:05.043Z"},{"id":"257f98d9-45f7-4e13-a6c2-d7e7b6efc9fe","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"b8649393-d32f-4b7f-a156-12e9776acb0e","status":"open","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-01-28T19:37:24.095Z","updatedAt":"2021-03-30T19:11:05.043Z"},{"id":"a01852d0-fa08-410c-b97b-67580ce62215","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"a0a3a5ce-1de6-465d-91b2-518feb299851","status":"open","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-01-28T19:37:29.734Z","updatedAt":"2021-03-30T19:11:05.043Z"},{"id":"2fd7ca69-c8ec-4bf3-a7f3-655fbfe3e7df","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"e6958d77-ffaf-4d24-9cdb-6391506695a4","status":"open","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-01-28T19:37:44.728Z","updatedAt":"2021-03-30T19:11:05.043Z"},{"id":"f0023058-2996-4bba-8c5f-d09a7023be38","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"626bb327-e738-48e3-8f67-1fa2dc677d3c","status":"open","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-01-28T19:37:50.619Z","updatedAt":"2021-03-30T19:11:05.043Z"},{"id":"a189b34d-acde-4633-b18b-f7a34d7c5a74","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"b49a0adb-1565-4de1-9189-a763c77f5ed4","status":"open","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-01-28T19:37:56.456Z","updatedAt":"2021-03-30T19:11:05.043Z"},{"id":"5191a860-4327-4c50-b76b-84beba04519b","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"79ce2a3e-7679-48cf-8ac9-0a8ca4c4b463","status":"shortlist","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","createdAt":"2021-01-28T19:36:51.222Z","updatedAt":"2021-01-28T19:38:02.293Z"},{"id":"e6d9635c-b122-4f69-9285-09fb1ab30106","jobId":"a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e","userId":"98ec2c16-442e-4b61-8ad1-66123ee37d3c","status":"rejected","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","createdAt":"2021-01-28T19:36:58.774Z","updatedAt":"2021-01-28T19:38:13.553Z"},{"id":"f67b155e-0f09-4fdd-89a7-d79c5e46cac6","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"05e988b7-7d54-4c10-ada1-1a04870a88a8","status":"open","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-01-28T19:38:38.332Z","updatedAt":"2021-03-30T19:11:05.043Z"},{"id":"8ffd33d3-4a43-4719-aee4-8e46be1d8f1c","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"a2ffdeed-704d-4cf7-b70a-93fcf61de598","status":"open","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-01-28T19:38:43.967Z","updatedAt":"2021-03-30T19:11:05.043Z"},{"id":"2b8ba549-8878-43d6-ad5f-6a66e3b9d6c9","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"4709473d-f060-4102-87f8-4d51ff0b34c1","status":"open","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-01-28T19:38:50.106Z","updatedAt":"2021-03-30T19:11:05.043Z"},{"id":"ae5a81ec-5d05-43c4-8253-847d91a54711","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"39c7376e-2d5c-4601-bc47-6b60f505814d","status":"open","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-01-28T19:38:55.734Z","updatedAt":"2021-03-30T19:11:05.043Z"},{"id":"85d6649e-2682-4904-9480-a77b72fef27d","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"213d2dd9-1fc3-4eda-ad97-2d56e2a84a1e","status":"selected","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"00000000-0000-0000-0000-000000000000","createdAt":"2021-01-28T19:38:30.856Z","updatedAt":"2021-01-28T19:40:27.209Z"},{"id":"922dfce3-4e06-4387-9fdb-64f70675e86b","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"dd5adacb-444d-4992-8b7b-0c349be598db","status":"selected","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"00000000-0000-0000-0000-000000000000","createdAt":"2021-01-28T19:39:02.435Z","updatedAt":"2021-01-28T19:40:49.349Z"},{"id":"c26c38e2-a47d-405b-abc6-fe62a739561c","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"6d0509c7-5f12-4d84-9a19-8e80ef7ddd66","status":"selected","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"00000000-0000-0000-0000-000000000000","createdAt":"2021-01-28T19:39:08.233Z","updatedAt":"2021-01-28T19:40:53.659Z"},{"id":"7bef2b37-e1ee-4638-bfc1-c911787ac955","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"f65e2104-2987-4136-839d-ee4632f0b2e5","status":"selected","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"00000000-0000-0000-0000-000000000000","createdAt":"2021-01-28T19:39:13.469Z","updatedAt":"2021-01-28T19:40:57.999Z"},{"id":"e9716139-1f40-4bf1-9f8a-77ae4bcc621e","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"e5e667ad-0950-43c2-8d1d-6e83ad7d1c7e","status":"selected","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"00000000-0000-0000-0000-000000000000","createdAt":"2021-01-28T19:39:19.215Z","updatedAt":"2021-01-28T19:41:01.953Z"},{"id":"a1731d01-eac9-4eff-8e5a-8a3c99bc66e0","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","userId":"bef43122-426b-4b2b-acdd-9b5b3bd1c0bf","status":"selected","externalId":null,"resume":null,"createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"00000000-0000-0000-0000-000000000000","createdAt":"2021-01-28T19:39:24.625Z","updatedAt":"2021-01-28T19:41:06.370Z"}],"ResourceBooking":[{"id":"08f5e4b9-1088-496d-91a7-5b22a3583e3c","projectId":111,"userId":"213d2dd9-1fc3-4eda-ad97-2d56e2a84a1e","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"assigned","startDate":"2021-01-25T19:39:28.000Z","endDate":"2021-01-31T19:39:28.000Z","memberRate":1000,"customerRate":1200,"rateType":"weekly","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","createdAt":"2021-01-28T19:39:30.052Z","updatedAt":"2021-01-28T19:40:25.260Z"},{"id":"7d967fed-9792-4768-98a7-0b644aa84f2e","projectId":111,"userId":"05e988b7-7d54-4c10-ada1-1a04870a88a8","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"in-review","startDate":"2021-01-25T19:39:34.000Z","endDate":"2021-01-31T19:39:34.000Z","memberRate":1000,"customerRate":1200,"rateType":"weekly","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","createdAt":"2021-01-28T19:39:35.571Z","updatedAt":"2021-01-28T19:40:30.291Z"},{"id":"35e1abd8-1890-4664-bb52-aade382d7b66","projectId":111,"userId":"a2ffdeed-704d-4cf7-b70a-93fcf61de598","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"closed","startDate":"2021-01-25T19:39:39.000Z","endDate":"2021-01-31T19:39:39.000Z","memberRate":1000,"customerRate":1200,"rateType":"weekly","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","createdAt":"2021-01-28T19:39:41.205Z","updatedAt":"2021-01-28T19:40:34.859Z"},{"id":"a098e8d8-ce5b-47d9-afee-38b050d16745","projectId":111,"userId":"4709473d-f060-4102-87f8-4d51ff0b34c1","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"cancelled","startDate":"2021-01-25T19:39:45.000Z","endDate":"2021-01-31T19:39:45.000Z","memberRate":1000,"customerRate":1200,"rateType":"weekly","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","createdAt":"2021-01-28T19:39:46.515Z","updatedAt":"2021-01-28T19:40:38.820Z"},{"id":"d38a6223-3f91-4300-9ecb-6e5fee173625","projectId":111,"userId":"39c7376e-2d5c-4601-bc47-6b60f505814d","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"sourcing","startDate":"2021-01-25T19:39:50.000Z","endDate":"2021-01-31T19:39:50.000Z","memberRate":1000,"customerRate":1200,"rateType":"weekly","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","createdAt":"2021-01-28T19:39:52.063Z","updatedAt":"2021-01-28T19:40:43.021Z"},{"id":"51b45f5d-5df2-46d5-9c3d-8a1323df38dd","projectId":111,"userId":"dd5adacb-444d-4992-8b7b-0c349be598db","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"assigned","startDate":"2021-01-25T19:39:58.000Z","endDate":"2021-01-31T19:39:58.000Z","memberRate":800,"customerRate":1000,"rateType":"weekly","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","createdAt":"2021-01-28T19:39:59.432Z","updatedAt":"2021-01-28T19:40:47.743Z"},{"id":"0a6799d7-f5d1-456b-8bf1-90619284b295","projectId":111,"userId":"6d0509c7-5f12-4d84-9a19-8e80ef7ddd66","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"assigned","startDate":"2021-01-25T19:40:03.000Z","endDate":"2021-01-31T19:40:03.000Z","memberRate":2000,"customerRate":2500,"rateType":"weekly","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","createdAt":"2021-01-28T19:40:04.761Z","updatedAt":"2021-01-28T19:40:52.303Z"},{"id":"61f5d474-e41f-490b-ab58-9f983e3d4916","projectId":111,"userId":"f65e2104-2987-4136-839d-ee4632f0b2e5","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"assigned","startDate":"2000-07-27T04:17:23.131Z","endDate":"2000-09-27T04:17:23.131Z","memberRate":3000,"customerRate":3500,"rateType":"weekly","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","createdAt":"2021-01-28T19:40:09.879Z","updatedAt":"2021-01-28T19:40:56.381Z"},{"id":"dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa","projectId":111,"userId":"e5e667ad-0950-43c2-8d1d-6e83ad7d1c7e","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"assigned","startDate":"2022-07-27T04:17:23.131Z","endDate":"2022-09-27T04:17:23.131Z","memberRate":1700,"customerRate":1900,"rateType":"weekly","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","createdAt":"2021-01-28T19:40:15.326Z","updatedAt":"2021-01-28T19:41:00.503Z"},{"id":"8173579e-4b3c-418d-a9a1-c999caa38404","projectId":111,"userId":"bef43122-426b-4b2b-acdd-9b5b3bd1c0bf","jobId":"2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0","status":"assigned","startDate":"2020-09-27T04:17:23.131Z","endDate":"2020-09-27T04:17:23.131Z","memberRate":0,"customerRate":0,"rateType":"weekly","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","createdAt":"2021-01-28T19:40:20.627Z","updatedAt":"2021-01-28T19:41:04.919Z"}],"WorkPeriod":[{"id":"80b85cbb-3064-45aa-bb75-9dc010848fc1","resourceBookingId":"dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa","userHandle":"nskumar278","projectId":111,"startDate":"2021-03-07","endDate":"2021-03-13","daysWorked":2,"memberRate":13.13,"customerRate":13.13,"paymentStatus":"pending","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:13:23.714Z","updatedAt":"2021-03-30T19:13:23.714Z"},{"id":"9b0765ef-4e20-4cb2-91f1-ce8d7bcd8062","resourceBookingId":"d38a6223-3f91-4300-9ecb-6e5fee173625","userHandle":"nithyaasworld","projectId":111,"startDate":"2021-03-07","endDate":"2021-03-13","daysWorked":2,"memberRate":13.13,"customerRate":13.13,"paymentStatus":"cancelled","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:14:17.109Z","updatedAt":"2021-03-30T19:14:17.109Z"},{"id":"5796eecf-cc4f-42c2-a25b-7af4710847d6","resourceBookingId":"a098e8d8-ce5b-47d9-afee-38b050d16745","userHandle":"TCConnCopilot","projectId":111,"startDate":"2021-03-14","endDate":"2021-03-20","daysWorked":5,"memberRate":15.13,"customerRate":17.13,"paymentStatus":"completed","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:14:43.498Z","updatedAt":"2021-03-30T19:14:43.498Z"},{"id":"dba9dc5a-afaa-43b2-9b7d-f0f03af81211","resourceBookingId":"a098e8d8-ce5b-47d9-afee-38b050d16745","userHandle":"TCConnCopilot","projectId":111,"startDate":"2021-03-07","endDate":"2021-03-13","daysWorked":5,"memberRate":15.13,"customerRate":17.13,"paymentStatus":"pending","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:14:56.991Z","updatedAt":"2021-03-30T19:14:56.991Z"},{"id":"d694bbea-707d-41d5-a3f4-14884ff6fbf6","resourceBookingId":"8173579e-4b3c-418d-a9a1-c999caa38404","userHandle":"testcat","projectId":111,"startDate":"2021-03-07","endDate":"2021-03-13","daysWorked":1,"memberRate":10.13,"customerRate":18.13,"paymentStatus":"pending","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:15:16.106Z","updatedAt":"2021-03-30T19:15:16.106Z"},{"id":"30ff1dbe-3434-45c7-806b-0c52a41652b5","resourceBookingId":"8173579e-4b3c-418d-a9a1-c999caa38404","userHandle":"testcat","projectId":111,"startDate":"2021-03-14","endDate":"2021-03-20","daysWorked":7,"memberRate":5.13,"customerRate":7.13,"paymentStatus":"completed","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:15:32.338Z","updatedAt":"2021-03-30T19:15:32.338Z"},{"id":"a974b73d-12a3-464e-ac97-a939f10a0726","resourceBookingId":"7d967fed-9792-4768-98a7-0b644aa84f2e","userHandle":"sachin-wipro","projectId":111,"startDate":"2021-03-14","endDate":"2021-03-20","daysWorked":7,"memberRate":5.13,"customerRate":7.13,"paymentStatus":"completed","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:15:54.822Z","updatedAt":"2021-03-30T19:15:54.822Z"},{"id":"db66b486-157b-4c0c-9a6c-03bd46c0f1d1","resourceBookingId":"7d967fed-9792-4768-98a7-0b644aa84f2e","userHandle":"sachin-wipro","projectId":111,"startDate":"2021-03-21","endDate":"2021-03-27","daysWorked":5,"memberRate":2.13,"customerRate":7.13,"paymentStatus":"pending","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:16:12.235Z","updatedAt":"2021-03-30T19:16:12.235Z"},{"id":"ec9195a6-cc81-4c7d-aa7b-5ac80a6926e8","resourceBookingId":"61f5d474-e41f-490b-ab58-9f983e3d4916","userHandle":"sonu628","projectId":111,"startDate":"2021-03-21","endDate":"2021-03-27","daysWorked":5,"memberRate":2.13,"customerRate":7.13,"paymentStatus":"pending","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:16:25.772Z","updatedAt":"2021-03-30T19:16:25.772Z"},{"id":"fd59ab02-75be-4d78-bc48-2ec35af61d41","resourceBookingId":"61f5d474-e41f-490b-ab58-9f983e3d4916","userHandle":"sonu628","projectId":111,"startDate":"2021-03-28","endDate":"2021-04-03","daysWorked":2,"memberRate":2.13,"customerRate":6.13,"paymentStatus":"pending","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:16:43.007Z","updatedAt":"2021-03-30T19:16:43.007Z"},{"id":"4bafda13-3319-4c46-8a31-0b9279a6e633","resourceBookingId":"51b45f5d-5df2-46d5-9c3d-8a1323df38dd","userHandle":"amy_admin","projectId":111,"startDate":"2021-03-28","endDate":"2021-04-03","daysWorked":2,"memberRate":2.13,"customerRate":6.13,"paymentStatus":"pending","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:16:54.483Z","updatedAt":"2021-03-30T19:16:54.483Z"},{"id":"c4dfb0d7-1a3a-4d1a-8fa5-9fc4b555b724","resourceBookingId":"51b45f5d-5df2-46d5-9c3d-8a1323df38dd","userHandle":"amy_admin","projectId":111,"startDate":"2021-04-04","endDate":"2021-04-10","daysWorked":2,"memberRate":2.13,"customerRate":6.13,"paymentStatus":"pending","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:17:07.537Z","updatedAt":"2021-03-30T19:17:07.537Z"},{"id":"0d92396b-040b-43d3-b816-7fdc9d888864","resourceBookingId":"35e1abd8-1890-4664-bb52-aade382d7b66","userHandle":"lakshmiaconnmgr","projectId":111,"startDate":"2021-04-04","endDate":"2021-04-10","daysWorked":2,"memberRate":2.13,"customerRate":6.13,"paymentStatus":"pending","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:17:20.639Z","updatedAt":"2021-03-30T19:17:20.639Z"},{"id":"073e179b-dae7-4dd7-9cb6-a35fd1370fca","resourceBookingId":"35e1abd8-1890-4664-bb52-aade382d7b66","userHandle":"lakshmiaconnmgr","projectId":111,"startDate":"2021-04-11","endDate":"2021-04-17","daysWorked":2,"memberRate":2.13,"customerRate":6.13,"paymentStatus":"cancelled","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:17:36.581Z","updatedAt":"2021-03-30T19:17:36.581Z"},{"id":"03b2d6e3-0448-4fbf-9f17-576b3dd94405","resourceBookingId":"0a6799d7-f5d1-456b-8bf1-90619284b295","userHandle":"aaaa","projectId":111,"startDate":"2021-04-11","endDate":"2021-04-17","daysWorked":4,"memberRate":2.13,"customerRate":6.13,"paymentStatus":"cancelled","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:17:53.085Z","updatedAt":"2021-03-30T19:17:53.085Z"},{"id":"99c1dba2-a70c-4f73-b19b-9e1a66fa5fd5","resourceBookingId":"0a6799d7-f5d1-456b-8bf1-90619284b295","userHandle":"aaaa","projectId":111,"startDate":"2021-04-04","endDate":"2021-04-10","daysWorked":4,"memberRate":2.13,"customerRate":6.13,"paymentStatus":"pending","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:18:10.763Z","updatedAt":"2021-03-30T19:18:10.763Z"},{"id":"854804e0-e698-424c-8cb9-cbbf885db0b6","resourceBookingId":"08f5e4b9-1088-496d-91a7-5b22a3583e3c","userHandle":"ritesh_cs","projectId":111,"startDate":"2021-04-04","endDate":"2021-04-10","daysWorked":4,"memberRate":2.13,"customerRate":6.13,"paymentStatus":"pending","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:18:23.704Z","updatedAt":"2021-03-30T19:18:23.704Z"},{"id":"a2242b3d-026a-493b-b186-ca16587e5701","resourceBookingId":"08f5e4b9-1088-496d-91a7-5b22a3583e3c","userHandle":"ritesh_cs","projectId":111,"startDate":"2021-04-11","endDate":"2021-04-17","daysWorked":6,"memberRate":12.13,"customerRate":16.13,"paymentStatus":"completed","createdBy":"57646ff9-1cd3-4d3c-88ba-eb09a395366c","updatedBy":null,"createdAt":"2021-03-30T19:18:36.729Z","updatedAt":"2021-03-30T19:18:36.729Z"}]}
\ No newline at end of file
diff --git a/docs/Topcoder-bookings-api.postman_collection.json b/docs/Topcoder-bookings-api.postman_collection.json
index 9b3b3f8e..33b2da9d 100644
--- a/docs/Topcoder-bookings-api.postman_collection.json
+++ b/docs/Topcoder-bookings-api.postman_collection.json
@@ -1,6 +1,6 @@
{
"info": {
- "_postman_id": "b1144d77-699c-47be-864e-fbe99e7f5c14",
+ "_postman_id": "488f8826-1016-4c2a-9d72-244c9ad4d9aa",
"name": "Topcoder-bookings-api",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
@@ -4081,351 +4081,567 @@
]
},
{
- "name": "Taas Teams",
+ "name": "Work Periods",
"item": [
{
- "name": "GET /taas-teams",
- "request": {
- "method": "GET",
- "header": [
- {
- "key": "Authorization",
- "value": "Bearer {{token_bookingManager}}",
- "type": "text"
- }
- ],
- "url": {
- "raw": "{{URL}}/taas-teams?perPage=10&page=1&name=*taas*&sortBy=lastActivityAt&sortOrder=desc",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "taas-teams"
- ],
- "query": [
- {
- "key": "perPage",
- "value": "10"
- },
- {
- "key": "page",
- "value": "1"
- },
+ "name": "Before Test",
+ "item": [
+ {
+ "name": "create job",
+ "event": [
{
- "key": "name",
- "value": "*taas*",
- "description": "case-insensitive; support wildcard match"
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ " if(pm.response.status === \"OK\"){\r",
+ " const response = pm.response.json()\r",
+ " pm.environment.set(\"jobId\", response.id);\r",
+ " }\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{token_bookingManager}}",
+ "type": "text"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
},
+ "url": {
+ "raw": "{{URL}}/jobs",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobs"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "create resource booking",
+ "event": [
{
- "key": "sortBy",
- "value": "lastActivityAt",
- "description": "allows: createdAt, updatedAt, lastActivityAt, id, status, name, type, best match"
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ " if(pm.response.status === \"OK\"){\r",
+ " const response = pm.response.json()\r",
+ " pm.environment.set(\"resourceBookingId\", response.id);\r",
+ " }\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
},
- {
- "key": "sortOrder",
- "value": "desc",
- "description": "allows: asc, desc"
+ "url": {
+ "raw": "{{URL}}/resourceBookings",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "resourceBookings"
+ ]
}
- ]
+ },
+ "response": []
}
- },
- "response": []
+ ]
},
{
- "name": "GET /taas-teams with booking manager",
+ "name": "create work period with booking manager",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ " if(pm.response.status === \"OK\"){\r",
+ " const response = pm.response.json()\r",
+ " pm.environment.set(\"workPeriodId\", response.id);\r",
+ " }\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
- "method": "GET",
+ "method": "POST",
"header": [
{
"key": "Authorization",
- "value": "Bearer {{token_bookingManager}}",
- "type": "text"
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
}
],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
"url": {
- "raw": "{{URL}}/taas-teams?perPage=10&page=1&name=*taas*&sortBy=lastActivityAt&sortOrder=desc",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "taas-teams"
- ],
- "query": [
- {
- "key": "perPage",
- "value": "10"
- },
- {
- "key": "page",
- "value": "1"
- },
- {
- "key": "name",
- "value": "*taas*",
- "description": "case-insensitive; support wildcard match"
- },
- {
- "key": "sortBy",
- "value": "lastActivityAt",
- "description": "allows: createdAt, updatedAt, lastActivityAt, id, status, name, type, best match"
- },
- {
- "key": "sortOrder",
- "value": "desc",
- "description": "allows: asc, desc"
- }
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "GET /taas-teams with m2m read",
+ "name": "create work period with m2m create",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ " if(pm.response.status === \"OK\"){\r",
+ " const response = pm.response.json()\r",
+ " pm.environment.set(\"workPeriodIdCreatedByM2M\", response.id);\r",
+ " }\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
- "method": "GET",
+ "method": "POST",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_m2m_read_taas_team}}"
+ "value": "Bearer {{token_m2m_create_work_period}}"
}
],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-14\",\r\n \"endDate\": \"2021-03-20\",\r\n \"daysWorked\": 3,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"cancelled\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
"url": {
- "raw": "{{URL}}/taas-teams",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "taas-teams"
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "GET /taas-teams/:id",
+ "name": "create work period with connect user",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 403', function () {\r",
+ " pm.response.to.have.status(403);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
- "method": "GET",
+ "method": "POST",
"header": [
{
"key": "Authorization",
- "value": "Bearer {{token_bookingManager}}",
- "type": "text"
+ "type": "text",
+ "value": "Bearer {{token_connectUser}}"
}
],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-21\",\r\n \"endDate\": \"2021-03-27\",\r\n \"daysWorked\": 3,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"cancelled\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
"url": {
- "raw": "{{URL}}/taas-teams/{{projectId}}",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "taas-teams",
- "{{projectId}}"
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "GET /taas-teams/:id with booking manager",
+ "name": "create work period with member",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 403', function () {\r",
+ " pm.response.to.have.status(403);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
- "method": "GET",
+ "method": "POST",
"header": [
{
"key": "Authorization",
- "value": "Bearer {{token_bookingManager}}",
- "type": "text"
+ "type": "text",
+ "value": "Bearer {{token_member}}"
}
],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-21\",\r\n \"endDate\": \"2021-03-27\",\r\n \"daysWorked\": 3,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"cancelled\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
"url": {
- "raw": "{{URL}}/taas-teams/:projectId",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "taas-teams",
- ":projectId"
- ],
- "variable": [
- {
- "key": "projectId",
- "value": "16705"
- }
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "GET /taas-teams/:id with m2m read",
+ "name": "create work period with user id not exist",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"Bad Request\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
- "method": "GET",
+ "method": "POST",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_m2m_read_taas_team}}"
+ "value": "Bearer {{token_userId_not_exist}}"
}
],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-21\",\r\n \"endDate\": \"2021-03-27\",\r\n \"daysWorked\": 3,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"cancelled\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
"url": {
- "raw": "{{URL}}/taas-teams/{{projectId}}",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "taas-teams",
- "{{projectId}}"
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "GET /taas-teams/:id/jobs/:jobId",
+ "name": "create work period with invalid token",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 401', function () {\r",
+ " pm.response.to.have.status(401);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"Invalid Token.\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
- "method": "GET",
+ "method": "POST",
"header": [
{
"key": "Authorization",
- "value": "Bearer {{token_bookingManager}}",
- "type": "text"
+ "type": "text",
+ "value": "Bearer invalid_token"
}
],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-21\",\r\n \"endDate\": \"2021-03-27\",\r\n \"daysWorked\": 3,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"cancelled\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
"url": {
- "raw": "{{URL}}/taas-teams/{{projectId}}/jobs/{{jobId}}",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "taas-teams",
- "{{projectId}}",
- "jobs",
- "{{jobId}}"
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "GET /taas-teams/:id/jobs/:jobId with booking manager",
+ "name": "create work period with missing parameter 1",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"workPeriod.resourceBookingId\\\" is required\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
- "method": "GET",
+ "method": "POST",
"header": [
{
"key": "Authorization",
- "value": "Bearer {{token_bookingManager}}",
- "type": "text"
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
}
],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
"url": {
- "raw": "{{URL}}/taas-teams/:projectId/jobs/:jobId",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "taas-teams",
- ":projectId",
- "jobs",
- ":jobId"
- ],
- "variable": [
- {
- "key": "projectId",
- "value": "16705"
- },
- {
- "key": "jobId",
- "value": "948a25a6-086f-4a96-aad5-9ccd2d3e87b2"
- }
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "GET /taas-teams/:id/jobs/:jobId with m2m read",
+ "name": "create work period with missing parameter 2",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"workPeriod.endDate\\\" is required\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
- "method": "GET",
+ "method": "POST",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_m2m_read_taas_team}}"
+ "value": "Bearer {{token_bookingManager}}"
}
],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
"url": {
- "raw": "{{URL}}/taas-teams/{{projectId}}/jobs/{{jobId}}",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "taas-teams",
- "{{projectId}}",
- "jobs",
- "{{jobId}}"
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "GET /taas-teams/skills",
+ "name": "create work period with missing parameter 3",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"workPeriod.paymentStatus\\\" is required\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
- "method": "GET",
+ "method": "POST",
"header": [
{
"key": "Authorization",
- "value": "Bearer {{token_member}}",
- "type": "text"
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
}
],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
"url": {
- "raw": "{{URL}}/taas-teams/skills?perPage=10&page=1&orderBy=name",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "taas-teams",
- "skills"
- ],
- "query": [
- {
- "key": "perPage",
- "value": "10"
- },
- {
- "key": "page",
- "value": "1"
- },
- {
- "key": "orderBy",
- "value": "name",
- "description": "possible values are defined by /v5/skills"
- }
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "POST /taas-teams/email - team-issue-report",
+ "name": "create work period with invalid parameter 1",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"workPeriod.resourceBookingId\\\" must be a valid GUID\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
- "value": "Bearer {{token_member}}",
- "type": "text"
- },
- {
- "key": "Content-Type",
- "value": "application/json",
- "type": "text"
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
}
],
"body": {
"mode": "raw",
- "raw": "{\n \"template\": \"team-issue-report\",\n \"data\": {\n \"projectName\": \"TaaS Project Name\",\n \"projectId\": 12345,\n \"reportText\": \"I have issue with ...\"\n }\n}",
+ "raw": "{\r\n \"resourceBookingId\": \"aaa-aaa\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -4433,37 +4649,46 @@
}
},
"url": {
- "raw": "{{URL}}/taas-teams/email",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "taas-teams",
- "email"
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "POST /taas-teams/email - member-issue-report",
+ "name": "create work period with invalid parameter 2",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"workPeriod.startDate\\\" must be in YYYY-MM-DD format\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_member}}"
- },
- {
- "key": "Content-Type",
- "type": "text",
- "value": "application/json"
+ "value": "Bearer {{token_bookingManager}}"
}
],
"body": {
"mode": "raw",
- "raw": "{\n \"template\": \"member-issue-report\",\n \"data\": {\n \"projectName\": \"TaaS Project Name\",\n \"projectId\": 12345,\n \"userHandle\": \"pshah_manager\",\n \"reportText\": \"I have issue with ...\"\n }\n}",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"07-03-2021\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -4471,37 +4696,46 @@
}
},
"url": {
- "raw": "{{URL}}/taas-teams/email",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "taas-teams",
- "email"
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "POST /taas-teams/email - extension-request",
+ "name": "create work period with invalid parameter 3",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"startDate should be always Sunday\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_member}}"
- },
- {
- "key": "Content-Type",
- "type": "text",
- "value": "application/json"
+ "value": "Bearer {{token_bookingManager}}"
}
],
"body": {
"mode": "raw",
- "raw": "{\n \"template\": \"extension-request\",\n \"data\": {\n \"projectName\": \"TaaS Project Name\",\n \"projectId\": 12345,\n \"userHandle\": \"pshah_manager\",\n \"reportText\": \"I would like to keep working with this member for 2 months...\"\n }\n}",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-06\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -4509,37 +4743,46 @@
}
},
"url": {
- "raw": "{{URL}}/taas-teams/email",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "taas-teams",
- "email"
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "POST /taas-teams/:id/members",
- "request": {
- "method": "POST",
- "header": [
- {
- "key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_administrator}}"
- },
- {
- "key": "Content-Type",
+ "name": "create work period with invalid parameter 4",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"endDate should be always the next Saturday\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
"type": "text",
- "value": "application/json"
+ "value": "Bearer {{token_bookingManager}}"
}
],
"body": {
"mode": "raw",
- "raw": "{\n \"handles\": [\n \"tester1234\",\n \"non-existing\"\n ],\n \"emails\": [\n \"non-existing@domain.com\",\n \"email@domain.com\"\n ]\n}",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-14\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -4547,403 +4790,3833 @@
}
},
"url": {
- "raw": "{{URL}}/taas-teams/:id/members",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "taas-teams",
- ":id",
- "members"
- ],
- "variable": [
- {
- "key": "id",
- "value": "16705"
- }
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "GET /taas-teams/:id/members",
+ "name": "create work period with invalid parameter 5",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"workPeriod.daysWorked\\\" must be a number\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
- "method": "GET",
+ "method": "POST",
"header": [
{
"key": "Authorization",
"type": "text",
"value": "Bearer {{token_bookingManager}}"
- },
- {
- "key": "Content-Type",
- "type": "text",
- "value": "application/json"
}
],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": \"aa\",\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
"url": {
- "raw": "{{URL}}/taas-teams/:id/members?role=customer&fields=id,userId,role,createdAt,updatedAt,createdBy,updatedBy,handle,photoURL,workingHourStart,workingHourEnd,timeZone,email",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "taas-teams",
- ":id",
- "members"
- ],
- "query": [
- {
- "key": "role",
- "value": "customer"
- },
- {
- "key": "fields",
- "value": "id,userId,role,createdAt,updatedAt,createdBy,updatedBy,handle,photoURL,workingHourStart,workingHourEnd,timeZone,email"
- }
- ],
- "variable": [
- {
- "key": "id",
- "value": "16705"
- }
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "GET /taas-teams/:id/invites",
+ "name": "create work period with invalid parameter 6",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(`Key (resource_booking_id, start_date, end_date)=(${pm.environment.get('resourceBookingId')}, 2021-03-07, 2021-03-13) already exists.`)\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
- "method": "GET",
+ "method": "POST",
"header": [
{
"key": "Authorization",
"type": "text",
"value": "Bearer {{token_bookingManager}}"
- },
- {
- "key": "Content-Type",
- "type": "text",
- "value": "application/json"
}
],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
"url": {
- "raw": "{{URL}}/taas-teams/:id/invites?fields=createdAt,deletedAt,role,updatedBy,createdBy,id,projectId,userId,email,deletedBy,updatedAt,status",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "taas-teams",
- ":id",
- "invites"
- ],
- "query": [
- {
- "key": "fields",
- "value": "createdAt,deletedAt,role,updatedBy,createdBy,id,projectId,userId,email,deletedBy,updatedAt,status"
- }
- ],
- "variable": [
- {
- "key": "id",
- "value": "16705"
- }
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "DELETE /taas-teams/:id/members/:projectMemberId",
+ "name": "create work period with invalid parameter 7",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"workPeriod.paymentStatus\\\" must be one of [pending, partially-completed, completed, cancelled]\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
- "method": "DELETE",
+ "method": "POST",
"header": [
{
"key": "Authorization",
"type": "text",
"value": "Bearer {{token_bookingManager}}"
- },
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"paid\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "get work period with booking manager",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
{
- "key": "Content-Type",
+ "key": "Authorization",
"type": "text",
- "value": "application/json"
+ "value": "Bearer {{token_bookingManager}}"
}
],
"url": {
- "raw": "{{URL}}/taas-teams/:id/members/:projectMemberId",
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
"host": [
"{{URL}}"
],
"path": [
- "taas-teams",
- ":id",
- "members",
- ":projectMemberId"
- ],
- "variable": [
- {
- "key": "id",
- "value": "16705"
- },
- {
- "key": "projectMemberId",
- "value": "14327"
- }
+ "workPeriods",
+ "{{workPeriodId}}"
]
}
},
"response": []
},
- {
- "name": "GET /taas-teams/me",
+ {
+ "name": "get work period with m2m read",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_member}}"
+ "value": "Bearer {{token_m2m_read_work_period}}"
}
],
"url": {
- "raw": "{{URL}}/taas-teams/me",
+ "raw": "{{URL}}/workPeriods/{{workPeriodIdCreatedByM2M}}",
"host": [
"{{URL}}"
],
"path": [
- "taas-teams",
- "me"
+ "workPeriods",
+ "{{workPeriodIdCreatedByM2M}}"
]
}
},
"response": []
- }
- ]
- },
- {
- "name": "health check",
- "item": [
+ },
{
- "name": "health check",
+ "name": "get work period with booking manager from db",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
"method": "GET",
- "header": [],
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
"url": {
- "raw": "{{URL}}/health",
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}?fromDb=true",
"host": [
"{{URL}}"
],
"path": [
- "health"
+ "workPeriods",
+ "{{workPeriodId}}"
+ ],
+ "query": [
+ {
+ "key": "fromDb",
+ "value": "true"
+ }
]
}
},
"response": []
- }
- ]
- },
- {
- "name": "Create Demo Data For Team",
- "item": [
+ },
{
- "name": "Get Users",
- "item": [
+ "name": "get work period with connect user",
+ "event": [
{
- "name": "Get Users",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "var data = JSON.parse(responseBody);",
- "",
- "pm.test(\"Status code is 200\", function () {",
- " pm.response.to.have.status(200);",
- "});",
- "",
- "var demoUsers = 20;",
- "",
- "pm.test('We need to have at least ' + demoUsers + ' demo userIds. Define them in {{demoUserIdN}} variables.', function () {",
- " for (var i = 0; i < demoUsers; i++) {",
- " var variableName = \"demoUserId\" + (i + 1);",
- " var existentValue = pm.variables.get(variableName);",
- " var user = data[i];",
- "",
- " pm.expect(!!user || !!existentValue).to.be.true;",
- "",
- " postman.setEnvironmentVariable(variableName, user.id);",
- " }",
- "});"
- ],
- "type": "text/javascript"
- }
- }
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_connectUser}}"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
],
- "request": {
- "auth": {
- "type": "bearer",
- "bearer": [
- {
- "key": "token",
- "value": "{{token_bookingManager}}",
- "type": "string"
- }
- ]
- },
- "method": "GET",
- "header": [],
- "url": {
- "raw": "https://api.topcoder-dev.com/v5/users?perPage=20",
- "protocol": "https",
- "host": [
- "api",
- "topcoder-dev",
- "com"
- ],
- "path": [
- "v5",
- "users"
- ],
- "query": [
- {
- "key": "perPage",
- "value": "20"
- }
- ]
- }
- },
- "response": []
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
}
- ]
+ },
+ "response": []
},
{
- "name": "Create job #1 \"sourcing\"",
- "item": [
+ "name": "get work period with member",
+ "event": [
{
- "name": "create job #1",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "var data = JSON.parse(responseBody);\r",
- "\r",
- "pm.test(\"Successful POST request\", function () {\r",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
- "});\r",
- "\r",
- "postman.setEnvironmentVariable(\"demoJobId1\",data.id);"
- ],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "POST",
- "header": [
- {
- "key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_bookingManager}}"
- }
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 401', function () {\r",
+ " pm.response.to.have.status(401);\r",
+ "});"
],
- "body": {
- "mode": "raw",
- "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"0\",\n \"description\": \"taas-demo-job1\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"weekly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"ee4c50c1-c8c3-475e-b6b6-edbd136a19d6\",\n \"89139c80-d0a2-47c2-aa16-14589d5afd10\",\n \"9f2d9127-6a2e-4506-ad76-c4ab63577b09\",\n \"9515e7ee-83b6-49d1-ba5c-6c59c5a8ef1b\",\n \"c854ab55-5922-4be1-8ecc-b3bc1f8629af\",\n \"8456002e-fa2d-44f0-b0e7-86b1c02b6e4c\",\n \"114b4ec8-805e-4c60-b351-14a955a991a9\",\n \"213408aa-f16f-46c8-bc57-9e569cee3f11\",\n \"b37a48db-f775-4e4e-b403-8ad1d234cdea\",\n \"99b930b5-1b91-4df1-8b17-d9307107bb51\",\n \"6388a632-c3ad-4525-9a73-66a527c03672\",\n \"23839f38-6f19-4de9-9d28-f020056bca73\",\n \"289e42a3-23e9-49be-88e1-6deb93cd8c31\",\n \"b403f209-63b5-42bc-9b5f-1564416640d8\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{URL}}/jobs",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "jobs"
- ]
- }
- },
- "response": []
+ "type": "text/javascript"
+ }
}
- ]
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_member}}"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
},
{
- "name": "Create job #2 \"in-review\"",
- "item": [
+ "name": "search work periods with booking manager",
+ "event": [
{
- "name": "create job #2",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "var data = JSON.parse(responseBody);\r",
- "\r",
- "pm.test(\"Successful POST request\", function () {\r",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
- "});\r",
- "\r",
- "postman.setEnvironmentVariable(\"demoJobId2\",data.id);"
- ],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "POST",
- "header": [
- {
- "key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_bookingManager}}"
- }
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ "});"
],
- "body": {
- "mode": "raw",
- "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"0\",\n \"description\": \"taas-demo-job2\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 7,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"weekly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"213408aa-f16f-46c8-bc57-9e569cee3f11\",\n \"b37a48db-f775-4e4e-b403-8ad1d234cdea\",\n \"99b930b5-1b91-4df1-8b17-d9307107bb51\",\n \"6388a632-c3ad-4525-9a73-66a527c03672\",\n \"23839f38-6f19-4de9-9d28-f020056bca73\",\n \"289e42a3-23e9-49be-88e1-6deb93cd8c31\",\n \"b403f209-63b5-42bc-9b5f-1564416640d8\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/workPeriods",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods"
+ ],
+ "query": [
+ {
+ "key": "page",
+ "value": "1",
+ "disabled": true
},
- "url": {
- "raw": "{{URL}}/jobs",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "jobs"
- ]
- }
- },
- "response": []
- },
- {
- "name": "create job #2 candidate 1",
- "event": [
{
- "listen": "test",
- "script": {
- "exec": [
- "var data = JSON.parse(responseBody);\r",
- "\r",
- "pm.test(\"Successful POST request\", function () {\r",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
- "});\r",
- "\r",
- "postman.setEnvironmentVariable(\"demoJob1candidateId1\",data.id);"
- ],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "POST",
+ "key": "perPage",
+ "value": "5",
+ "disabled": true
+ },
+ {
+ "key": "sortBy",
+ "value": "id",
+ "disabled": true
+ },
+ {
+ "key": "sortOrder",
+ "value": "desc",
+ "disabled": true
+ },
+ {
+ "key": "resourceBookingId",
+ "value": "{{resourceBookingId}}",
+ "disabled": true
+ },
+ {
+ "key": "resourceBookingIds",
+ "value": "{{resourceBookingId}},{{resourceBookingIdCreatedByM2M}}",
+ "disabled": true
+ },
+ {
+ "key": "paymentStatus",
+ "value": "pending",
+ "disabled": true
+ },
+ {
+ "key": "startDate",
+ "value": "2021-03-14",
+ "disabled": true
+ },
+ {
+ "key": "endDate",
+ "value": "2021-03-20",
+ "disabled": true
+ },
+ {
+ "key": "userHandle",
+ "value": "pshah_manager",
+ "disabled": true
+ },
+ {
+ "key": "projectId",
+ "value": "16843",
+ "disabled": true
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "search work periods with m2m all",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_m2m_all_work_period}}"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/workPeriods",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods"
+ ],
+ "query": [
+ {
+ "key": "page",
+ "value": "1",
+ "disabled": true
+ },
+ {
+ "key": "perPage",
+ "value": "5",
+ "disabled": true
+ },
+ {
+ "key": "sortBy",
+ "value": "id",
+ "disabled": true
+ },
+ {
+ "key": "sortOrder",
+ "value": "desc",
+ "disabled": true
+ },
+ {
+ "key": "resourceBookingId",
+ "value": "{{resourceBookingId}}",
+ "disabled": true
+ },
+ {
+ "key": "resourceBookingIds",
+ "value": "{{resourceBookingId}},{{resourceBookingIdCreatedByM2M}}",
+ "disabled": true
+ },
+ {
+ "key": "paymentStatus",
+ "value": "pending",
+ "disabled": true
+ },
+ {
+ "key": "startDate",
+ "value": "2021-03-14",
+ "disabled": true
+ },
+ {
+ "key": "endDate",
+ "value": "2021-03-20",
+ "disabled": true
+ },
+ {
+ "key": "userHandle",
+ "value": "pshah_manager",
+ "disabled": true
+ },
+ {
+ "key": "projectId",
+ "value": "16843",
+ "disabled": true
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "search work periods with connect user",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_connectUser}}"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/workPeriods",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods"
+ ],
+ "query": [
+ {
+ "key": "page",
+ "value": "1",
+ "disabled": true
+ },
+ {
+ "key": "perPage",
+ "value": "5",
+ "disabled": true
+ },
+ {
+ "key": "sortBy",
+ "value": "id",
+ "disabled": true
+ },
+ {
+ "key": "sortOrder",
+ "value": "desc",
+ "disabled": true
+ },
+ {
+ "key": "resourceBookingId",
+ "value": "{{resourceBookingId}}",
+ "disabled": true
+ },
+ {
+ "key": "resourceBookingIds",
+ "value": "{{resourceBookingId}},{{resourceBookingIdCreatedByM2M}}",
+ "disabled": true
+ },
+ {
+ "key": "paymentStatus",
+ "value": "pending",
+ "disabled": true
+ },
+ {
+ "key": "startDate",
+ "value": "2021-03-14",
+ "disabled": true
+ },
+ {
+ "key": "endDate",
+ "value": "2021-03-20",
+ "disabled": true
+ },
+ {
+ "key": "userHandle",
+ "value": "pshah_manager",
+ "disabled": true
+ },
+ {
+ "key": "projectId",
+ "value": "16843",
+ "disabled": true
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "search work periods with member",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_member}}"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/workPeriods",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods"
+ ],
+ "query": [
+ {
+ "key": "page",
+ "value": "1",
+ "disabled": true
+ },
+ {
+ "key": "perPage",
+ "value": "5",
+ "disabled": true
+ },
+ {
+ "key": "sortBy",
+ "value": "id",
+ "disabled": true
+ },
+ {
+ "key": "sortOrder",
+ "value": "desc",
+ "disabled": true
+ },
+ {
+ "key": "resourceBookingId",
+ "value": "{{resourceBookingId}}",
+ "disabled": true
+ },
+ {
+ "key": "resourceBookingIds",
+ "value": "{{resourceBookingId}},{{resourceBookingIdCreatedByM2M}}",
+ "disabled": true
+ },
+ {
+ "key": "paymentStatus",
+ "value": "pending",
+ "disabled": true
+ },
+ {
+ "key": "startDate",
+ "value": "2021-03-14",
+ "disabled": true
+ },
+ {
+ "key": "endDate",
+ "value": "2021-03-20",
+ "disabled": true
+ },
+ {
+ "key": "userHandle",
+ "value": "pshah_manager",
+ "disabled": true
+ },
+ {
+ "key": "projectId",
+ "value": "16843",
+ "disabled": true
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "search work periods with invalid token",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 401', function () {\r",
+ " pm.response.to.have.status(401);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer invalid_token"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/workPeriods",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods"
+ ],
+ "query": [
+ {
+ "key": "page",
+ "value": "1",
+ "disabled": true
+ },
+ {
+ "key": "perPage",
+ "value": "5",
+ "disabled": true
+ },
+ {
+ "key": "sortBy",
+ "value": "id",
+ "disabled": true
+ },
+ {
+ "key": "sortOrder",
+ "value": "desc",
+ "disabled": true
+ },
+ {
+ "key": "resourceBookingId",
+ "value": "{{resourceBookingId}}",
+ "disabled": true
+ },
+ {
+ "key": "resourceBookingIds",
+ "value": "{{resourceBookingId}},{{resourceBookingIdCreatedByM2M}}",
+ "disabled": true
+ },
+ {
+ "key": "paymentStatus",
+ "value": "pending",
+ "disabled": true
+ },
+ {
+ "key": "startDate",
+ "value": "2021-03-14",
+ "disabled": true
+ },
+ {
+ "key": "endDate",
+ "value": "2021-03-20",
+ "disabled": true
+ },
+ {
+ "key": "userHandle",
+ "value": "pshah_manager",
+ "disabled": true
+ },
+ {
+ "key": "projectId",
+ "value": "111",
+ "disabled": true
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "put work period with booking manager",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "put work period with m2m update",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_m2m_update_work_period}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-14\",\r\n \"endDate\": \"2021-03-20\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodIdCreatedByM2M}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodIdCreatedByM2M}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "put work period with connect user",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 403', function () {\r",
+ " pm.response.to.have.status(403);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_connectUser}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-21\",\r\n \"endDate\": \"2021-03-27\",\r\n \"daysWorked\": 3,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"cancelled\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "put work period with member",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 403', function () {\r",
+ " pm.response.to.have.status(403);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_member}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-21\",\r\n \"endDate\": \"2021-03-27\",\r\n \"daysWorked\": 3,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"cancelled\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "put work period with user id not exist",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"Bad Request\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_userId_not_exist}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-21\",\r\n \"endDate\": \"2021-03-27\",\r\n \"daysWorked\": 3,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"cancelled\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "put work period with invalid token",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 401', function () {\r",
+ " pm.response.to.have.status(401);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"Invalid Token.\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer invalid_token"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-21\",\r\n \"endDate\": \"2021-03-27\",\r\n \"daysWorked\": 3,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"cancelled\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "put work period with missing parameter 1",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"data.resourceBookingId\\\" is required\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "put work period with missing parameter 2",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"data.endDate\\\" is required\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "put work period with missing parameter 3",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"data.paymentStatus\\\" is required\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "put work period with invalid parameter 1",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"data.resourceBookingId\\\" must be a valid GUID\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"aaa-aaa\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "put work period with invalid parameter 2",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"data.startDate\\\" must be in YYYY-MM-DD format\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"07-03-2021\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "put work period with invalid parameter 3",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"startDate should be always Sunday\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-06\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "put work period with invalid parameter 4",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"endDate should be always the next Saturday\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-14\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "put work period with invalid parameter 5",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"data.daysWorked\\\" must be a number\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": \"aa\",\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "put work period with invalid parameter 6",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(`Key (resource_booking_id, start_date, end_date)=(${pm.environment.get('resourceBookingId')}, 2021-03-14, 2021-03-20) already exists.`)\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-14\",\r\n \"endDate\": \"2021-03-20\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "put work period with invalid parameter 7",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"data.paymentStatus\\\" must be one of [pending, partially-completed, completed, cancelled]\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"paid\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "patch work period with booking manager",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "patch work period with m2m update",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_m2m_update_work_period}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-14\",\r\n \"endDate\": \"2021-03-20\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodIdCreatedByM2M}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodIdCreatedByM2M}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "patch work period with connect user",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 403', function () {\r",
+ " pm.response.to.have.status(403);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_connectUser}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-21\",\r\n \"endDate\": \"2021-03-27\",\r\n \"daysWorked\": 3,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"cancelled\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "patch work period with member",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 403', function () {\r",
+ " pm.response.to.have.status(403);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_member}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-21\",\r\n \"endDate\": \"2021-03-27\",\r\n \"daysWorked\": 3,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"cancelled\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "patch work period with user id not exist",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"Bad Request\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_userId_not_exist}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-21\",\r\n \"endDate\": \"2021-03-27\",\r\n \"daysWorked\": 3,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"cancelled\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "patch work period with invalid token",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 401', function () {\r",
+ " pm.response.to.have.status(401);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"Invalid Token.\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer invalid_token"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-21\",\r\n \"endDate\": \"2021-03-27\",\r\n \"daysWorked\": 3,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"cancelled\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "patch work period with invalid parameter 1",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"data.resourceBookingId\\\" must be a valid GUID\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"aaa-aaa\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "patch work period with invalid parameter 2",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"data.startDate\\\" must be in YYYY-MM-DD format\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"07-03-2021\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "patch work period with invalid parameter 3",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"startDate should be always Sunday\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-06\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "patch work period with invalid parameter 4",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"endDate should be always the next Saturday\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-14\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "patch work period with invalid parameter 5",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"data.daysWorked\\\" must be a number\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": \"aa\",\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "patch work period with invalid parameter 6",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(`Key (resource_booking_id, start_date, end_date)=(${pm.environment.get('resourceBookingId')}, 2021-03-14, 2021-03-20) already exists.`)\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-14\",\r\n \"endDate\": \"2021-03-20\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "patch work period with invalid parameter 7",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 400', function () {\r",
+ " pm.response.to.have.status(400);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"\\\"data.paymentStatus\\\" must be one of [pending, partially-completed, completed, cancelled]\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"paid\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "delete work period with member",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 403', function () {\r",
+ " pm.response.to.have.status(403);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "DELETE",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_member}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "delete work period with connect user",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 403', function () {\r",
+ " pm.response.to.have.status(403);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "DELETE",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_connectUser}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "delete work period with booking manager",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 204', function () {\r",
+ " pm.response.to.have.status(204);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "DELETE",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "delete work period with m2m delete",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 204', function () {\r",
+ " pm.response.to.have.status(204);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "DELETE",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_m2m_delete_work_period}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodIdCreatedByM2M}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodIdCreatedByM2M}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "delete work period with invalid token",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 401', function () {\r",
+ " pm.response.to.have.status(401);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"Invalid Token.\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "DELETE",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer invalid_token"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "delete work period not found",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 404', function () {\r",
+ " pm.response.to.have.status(404);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "DELETE",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods/{{workPeriodId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods",
+ "{{workPeriodId}}"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+ },
+ {
+ "name": "Taas Teams",
+ "item": [
+ {
+ "name": "GET /taas-teams",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{token_bookingManager}}",
+ "type": "text"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/taas-teams?perPage=10&page=1&name=*taas*&sortBy=lastActivityAt&sortOrder=desc",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams"
+ ],
+ "query": [
+ {
+ "key": "perPage",
+ "value": "10"
+ },
+ {
+ "key": "page",
+ "value": "1"
+ },
+ {
+ "key": "name",
+ "value": "*taas*",
+ "description": "case-insensitive; support wildcard match"
+ },
+ {
+ "key": "sortBy",
+ "value": "lastActivityAt",
+ "description": "allows: createdAt, updatedAt, lastActivityAt, id, status, name, type, best match"
+ },
+ {
+ "key": "sortOrder",
+ "value": "desc",
+ "description": "allows: asc, desc"
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "GET /taas-teams with booking manager",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{token_bookingManager}}",
+ "type": "text"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/taas-teams?perPage=10&page=1&name=*taas*&sortBy=lastActivityAt&sortOrder=desc",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams"
+ ],
+ "query": [
+ {
+ "key": "perPage",
+ "value": "10"
+ },
+ {
+ "key": "page",
+ "value": "1"
+ },
+ {
+ "key": "name",
+ "value": "*taas*",
+ "description": "case-insensitive; support wildcard match"
+ },
+ {
+ "key": "sortBy",
+ "value": "lastActivityAt",
+ "description": "allows: createdAt, updatedAt, lastActivityAt, id, status, name, type, best match"
+ },
+ {
+ "key": "sortOrder",
+ "value": "desc",
+ "description": "allows: asc, desc"
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "GET /taas-teams with m2m read",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_m2m_read_taas_team}}"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/taas-teams",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "GET /taas-teams/:id",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{token_bookingManager}}",
+ "type": "text"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/taas-teams/{{projectId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams",
+ "{{projectId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "GET /taas-teams/:id with booking manager",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{token_bookingManager}}",
+ "type": "text"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/taas-teams/:projectId",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams",
+ ":projectId"
+ ],
+ "variable": [
+ {
+ "key": "projectId",
+ "value": "16705"
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "GET /taas-teams/:id with m2m read",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_m2m_read_taas_team}}"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/taas-teams/{{projectId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams",
+ "{{projectId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "GET /taas-teams/:id/jobs/:jobId",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{token_bookingManager}}",
+ "type": "text"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/taas-teams/{{projectId}}/jobs/{{jobId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams",
+ "{{projectId}}",
+ "jobs",
+ "{{jobId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "GET /taas-teams/:id/jobs/:jobId with booking manager",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{token_bookingManager}}",
+ "type": "text"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/taas-teams/:projectId/jobs/:jobId",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams",
+ ":projectId",
+ "jobs",
+ ":jobId"
+ ],
+ "variable": [
+ {
+ "key": "projectId",
+ "value": "16705"
+ },
+ {
+ "key": "jobId",
+ "value": "948a25a6-086f-4a96-aad5-9ccd2d3e87b2"
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "GET /taas-teams/:id/jobs/:jobId with m2m read",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_m2m_read_taas_team}}"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/taas-teams/{{projectId}}/jobs/{{jobId}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams",
+ "{{projectId}}",
+ "jobs",
+ "{{jobId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "GET /taas-teams/skills",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{token_member}}",
+ "type": "text"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/taas-teams/skills?perPage=10&page=1&orderBy=name",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams",
+ "skills"
+ ],
+ "query": [
+ {
+ "key": "perPage",
+ "value": "10"
+ },
+ {
+ "key": "page",
+ "value": "1"
+ },
+ {
+ "key": "orderBy",
+ "value": "name",
+ "description": "possible values are defined by /v5/skills"
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "POST /taas-teams/email - team-issue-report",
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{token_member}}",
+ "type": "text"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/json",
+ "type": "text"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"template\": \"team-issue-report\",\n \"data\": {\n \"projectName\": \"TaaS Project Name\",\n \"projectId\": 12345,\n \"reportText\": \"I have issue with ...\"\n }\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/taas-teams/email",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams",
+ "email"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "POST /taas-teams/email - member-issue-report",
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_member}}"
+ },
+ {
+ "key": "Content-Type",
+ "type": "text",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"template\": \"member-issue-report\",\n \"data\": {\n \"projectName\": \"TaaS Project Name\",\n \"projectId\": 12345,\n \"userHandle\": \"pshah_manager\",\n \"reportText\": \"I have issue with ...\"\n }\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/taas-teams/email",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams",
+ "email"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "POST /taas-teams/email - extension-request",
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_member}}"
+ },
+ {
+ "key": "Content-Type",
+ "type": "text",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"template\": \"extension-request\",\n \"data\": {\n \"projectName\": \"TaaS Project Name\",\n \"projectId\": 12345,\n \"userHandle\": \"pshah_manager\",\n \"reportText\": \"I would like to keep working with this member for 2 months...\"\n }\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/taas-teams/email",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams",
+ "email"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "POST /taas-teams/:id/members",
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ },
+ {
+ "key": "Content-Type",
+ "type": "text",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"handles\": [\n \"tester1234\",\n \"non-existing\"\n ],\n \"emails\": [\n \"non-existing@domain.com\",\n \"email@domain.com\"\n ]\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/taas-teams/:id/members",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams",
+ ":id",
+ "members"
+ ],
+ "variable": [
+ {
+ "key": "id",
+ "value": "16705"
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "GET /taas-teams/:id/members",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ },
+ {
+ "key": "Content-Type",
+ "type": "text",
+ "value": "application/json"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/taas-teams/:id/members?role=customer&fields=id,userId,role,createdAt,updatedAt,createdBy,updatedBy,handle,photoURL,workingHourStart,workingHourEnd,timeZone,email",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams",
+ ":id",
+ "members"
+ ],
+ "query": [
+ {
+ "key": "role",
+ "value": "customer"
+ },
+ {
+ "key": "fields",
+ "value": "id,userId,role,createdAt,updatedAt,createdBy,updatedBy,handle,photoURL,workingHourStart,workingHourEnd,timeZone,email"
+ }
+ ],
+ "variable": [
+ {
+ "key": "id",
+ "value": "16705"
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "GET /taas-teams/:id/invites",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ },
+ {
+ "key": "Content-Type",
+ "type": "text",
+ "value": "application/json"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/taas-teams/:id/invites?fields=createdAt,deletedAt,role,updatedBy,createdBy,id,projectId,userId,email,deletedBy,updatedAt,status",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams",
+ ":id",
+ "invites"
+ ],
+ "query": [
+ {
+ "key": "fields",
+ "value": "createdAt,deletedAt,role,updatedBy,createdBy,id,projectId,userId,email,deletedBy,updatedAt,status"
+ }
+ ],
+ "variable": [
+ {
+ "key": "id",
+ "value": "16705"
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "DELETE /taas-teams/:id/members/:projectMemberId",
+ "request": {
+ "method": "DELETE",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ },
+ {
+ "key": "Content-Type",
+ "type": "text",
+ "value": "application/json"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/taas-teams/:id/members/:projectMemberId",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams",
+ ":id",
+ "members",
+ ":projectMemberId"
+ ],
+ "variable": [
+ {
+ "key": "id",
+ "value": "16705"
+ },
+ {
+ "key": "projectMemberId",
+ "value": "14327"
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "GET /taas-teams/me",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_member}}"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/taas-teams/me",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "taas-teams",
+ "me"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+ },
+ {
+ "name": "health check",
+ "item": [
+ {
+ "name": "health check",
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "{{URL}}/health",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "health"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+ },
+ {
+ "name": "Create Demo Data For Team",
+ "item": [
+ {
+ "name": "Get Users",
+ "item": [
+ {
+ "name": "Get Users",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "var data = JSON.parse(responseBody);",
+ "",
+ "pm.test(\"Status code is 200\", function () {",
+ " pm.response.to.have.status(200);",
+ "});",
+ "",
+ "var demoUsers = 20;",
+ "",
+ "pm.test('We need to have at least ' + demoUsers + ' demo userIds. Define them in {{demoUserIdN}} variables.', function () {",
+ " for (var i = 0; i < demoUsers; i++) {",
+ " var variableName = \"demoUserId\" + (i + 1);",
+ " var existentValue = pm.variables.get(variableName);",
+ " var user = data[i];",
+ "",
+ " pm.expect(!!user || !!existentValue).to.be.true;",
+ "",
+ " postman.setEnvironmentVariable(variableName, user.id);",
+ " }",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "auth": {
+ "type": "bearer",
+ "bearer": [
+ {
+ "key": "token",
+ "value": "{{token_bookingManager}}",
+ "type": "string"
+ }
+ ]
+ },
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://api.topcoder-dev.com/v5/users?perPage=20",
+ "protocol": "https",
+ "host": [
+ "api",
+ "topcoder-dev",
+ "com"
+ ],
+ "path": [
+ "v5",
+ "users"
+ ],
+ "query": [
+ {
+ "key": "perPage",
+ "value": "20"
+ }
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+ },
+ {
+ "name": "Create job #1 \"sourcing\"",
+ "item": [
+ {
+ "name": "create job #1",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "var data = JSON.parse(responseBody);\r",
+ "\r",
+ "pm.test(\"Successful POST request\", function () {\r",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
+ "});\r",
+ "\r",
+ "postman.setEnvironmentVariable(\"demoJobId1\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"0\",\n \"description\": \"taas-demo-job1\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"weekly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"ee4c50c1-c8c3-475e-b6b6-edbd136a19d6\",\n \"89139c80-d0a2-47c2-aa16-14589d5afd10\",\n \"9f2d9127-6a2e-4506-ad76-c4ab63577b09\",\n \"9515e7ee-83b6-49d1-ba5c-6c59c5a8ef1b\",\n \"c854ab55-5922-4be1-8ecc-b3bc1f8629af\",\n \"8456002e-fa2d-44f0-b0e7-86b1c02b6e4c\",\n \"114b4ec8-805e-4c60-b351-14a955a991a9\",\n \"213408aa-f16f-46c8-bc57-9e569cee3f11\",\n \"b37a48db-f775-4e4e-b403-8ad1d234cdea\",\n \"99b930b5-1b91-4df1-8b17-d9307107bb51\",\n \"6388a632-c3ad-4525-9a73-66a527c03672\",\n \"23839f38-6f19-4de9-9d28-f020056bca73\",\n \"289e42a3-23e9-49be-88e1-6deb93cd8c31\",\n \"b403f209-63b5-42bc-9b5f-1564416640d8\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobs",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobs"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+ },
+ {
+ "name": "Create job #2 \"in-review\"",
+ "item": [
+ {
+ "name": "create job #2",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "var data = JSON.parse(responseBody);\r",
+ "\r",
+ "pm.test(\"Successful POST request\", function () {\r",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
+ "});\r",
+ "\r",
+ "postman.setEnvironmentVariable(\"demoJobId2\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"0\",\n \"description\": \"taas-demo-job2\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 7,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"weekly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"213408aa-f16f-46c8-bc57-9e569cee3f11\",\n \"b37a48db-f775-4e4e-b403-8ad1d234cdea\",\n \"99b930b5-1b91-4df1-8b17-d9307107bb51\",\n \"6388a632-c3ad-4525-9a73-66a527c03672\",\n \"23839f38-6f19-4de9-9d28-f020056bca73\",\n \"289e42a3-23e9-49be-88e1-6deb93cd8c31\",\n \"b403f209-63b5-42bc-9b5f-1564416640d8\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobs",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobs"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "create job #2 candidate 1",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "var data = JSON.parse(responseBody);\r",
+ "\r",
+ "pm.test(\"Successful POST request\", function () {\r",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
+ "});\r",
+ "\r",
+ "postman.setEnvironmentVariable(\"demoJob1candidateId1\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId1}}\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobCandidates",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "create job #2 candidate 2",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "var data = JSON.parse(responseBody);\r",
+ "\r",
+ "pm.test(\"Successful POST request\", function () {\r",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
+ "});\r",
+ "\r",
+ "postman.setEnvironmentVariable(\"demoJob1candidateId2\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId2}}\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobCandidates",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "create job #2 candidate 3",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test(\"Successful POST request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId3}}\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobCandidates",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "create job #2 candidate 4",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test(\"Successful POST request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId4}}\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobCandidates",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "create job #2 candidate 5",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test(\"Successful POST request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId5}}\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobCandidates",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "create job #2 candidate 6",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test(\"Successful POST request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId6}}\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobCandidates",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "create job #2 candidate 7",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test(\"Successful POST request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId7}}\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobCandidates",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "create job #2 candidate 8",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test(\"Successful POST request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId8}}\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobCandidates",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "create job #2 candidate 9",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test(\"Successful POST request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId9}}\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobCandidates",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "create job #2 candidate 10",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test(\"Successful POST request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId10}}\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobCandidates",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "update job #2 candidate 1 to \"shortlist\"",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test(\"Successful PATCH request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"status\": \"shortlist\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobCandidates/{{demoJob1candidateId1}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates",
+ "{{demoJob1candidateId1}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "update job #2 candidate 2 to \"rejected\"",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test(\"Successful PATCH request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
"header": [
{
"key": "Authorization",
@@ -4953,7 +8626,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId1}}\"\r\n}",
+ "raw": "{\r\n \"status\": \"rejected\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -4961,19 +8634,71 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/jobCandidates/{{demoJob1candidateId2}}",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "jobCandidates",
+ "{{demoJob1candidateId2}}"
]
}
},
"response": []
},
{
- "name": "create job #2 candidate 2",
+ "name": "update job #2 status to \"in-review\"",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test(\"Successful PATCH request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"status\": \"in-review\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobs/{{demoJobId2}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobs",
+ "{{demoJobId2}}"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+ },
+ {
+ "name": "Create job #3 \"assigned\"",
+ "item": [
+ {
+ "name": "create job #3",
"event": [
{
"listen": "test",
@@ -4985,7 +8710,7 @@
" pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
"});\r",
"\r",
- "postman.setEnvironmentVariable(\"demoJob1candidateId2\",data.id);"
+ "postman.setEnvironmentVariable(\"demoJobId3\",data.id);"
],
"type": "text/javascript"
}
@@ -5002,7 +8727,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId2}}\"\r\n}",
+ "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"0\",\n \"description\": \"taas-demo-job3\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 7,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"weekly\",\n \"workload\": \"full-time\",\n \"skills\": [],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
"options": {
"raw": {
"language": "json"
@@ -5010,19 +8735,19 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/jobs",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "jobs"
]
}
},
"response": []
},
{
- "name": "create job #2 candidate 3",
+ "name": "create job #3 candidate 11",
"event": [
{
"listen": "test",
@@ -5047,7 +8772,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId3}}\"\r\n}",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId11}}\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5067,7 +8792,7 @@
"response": []
},
{
- "name": "create job #2 candidate 4",
+ "name": "create job #3 candidate 12",
"event": [
{
"listen": "test",
@@ -5092,7 +8817,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId4}}\"\r\n}",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId12}}\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5112,7 +8837,7 @@
"response": []
},
{
- "name": "create job #2 candidate 5",
+ "name": "create job #3 candidate 13",
"event": [
{
"listen": "test",
@@ -5137,7 +8862,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId5}}\"\r\n}",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId13}}\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5157,7 +8882,7 @@
"response": []
},
{
- "name": "create job #2 candidate 6",
+ "name": "create job #3 candidate 14",
"event": [
{
"listen": "test",
@@ -5182,7 +8907,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId6}}\"\r\n}",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId14}}\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5202,7 +8927,7 @@
"response": []
},
{
- "name": "create job #2 candidate 7",
+ "name": "create job #3 candidate 15",
"event": [
{
"listen": "test",
@@ -5227,7 +8952,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId7}}\"\r\n}",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId15}}\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5247,7 +8972,7 @@
"response": []
},
{
- "name": "create job #2 candidate 8",
+ "name": "create job #3 candidate 16",
"event": [
{
"listen": "test",
@@ -5272,7 +8997,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId8}}\"\r\n}",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId16}}\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5292,7 +9017,7 @@
"response": []
},
{
- "name": "create job #2 candidate 9",
+ "name": "create job #3 candidate 17",
"event": [
{
"listen": "test",
@@ -5317,7 +9042,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId9}}\"\r\n}",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId17}}\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5337,7 +9062,7 @@
"response": []
},
{
- "name": "create job #2 candidate 10",
+ "name": "create job #3 candidate 18",
"event": [
{
"listen": "test",
@@ -5362,7 +9087,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId2}}\",\r\n \"userId\": \"{{demoUserId10}}\"\r\n}",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId18}}\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5382,13 +9107,13 @@
"response": []
},
{
- "name": "update job #2 candidate 1 to \"shortlist\"",
+ "name": "create job #3 candidate 19",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "pm.test(\"Successful PATCH request\", function () {",
+ "pm.test(\"Successful POST request\", function () {",
" pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
"});"
],
@@ -5397,7 +9122,7 @@
}
],
"request": {
- "method": "PATCH",
+ "method": "POST",
"header": [
{
"key": "Authorization",
@@ -5407,7 +9132,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"status\": \"shortlist\"\r\n}",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId19}}\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5415,26 +9140,25 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates/{{demoJob1candidateId1}}",
+ "raw": "{{URL}}/jobCandidates",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates",
- "{{demoJob1candidateId1}}"
+ "jobCandidates"
]
}
},
"response": []
},
{
- "name": "update job #2 candidate 2 to \"rejected\"",
+ "name": "create job #3 candidate 20",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "pm.test(\"Successful PATCH request\", function () {",
+ "pm.test(\"Successful POST request\", function () {",
" pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
"});"
],
@@ -5443,7 +9167,7 @@
}
],
"request": {
- "method": "PATCH",
+ "method": "POST",
"header": [
{
"key": "Authorization",
@@ -5453,7 +9177,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"status\": \"rejected\"\r\n}",
+ "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId20}}\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5461,35 +9185,54 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates/{{demoJob1candidateId2}}",
+ "raw": "{{URL}}/jobCandidates",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates",
- "{{demoJob1candidateId2}}"
+ "jobCandidates"
]
}
},
"response": []
},
{
- "name": "update job #2 status to \"in-review\"",
+ "name": "create job 3 resource booking 11",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "pm.test(\"Successful PATCH request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "var data = JSON.parse(responseBody);\r",
+ "\r",
+ "pm.test(\"Successful POST request\", function () {\r",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
+ "});\r",
+ "\r",
+ "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId11\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "const startDate = new Date()",
+ "startDate.setDate(startDate.getDate() - 3);",
+ "",
+ "const endDate = new Date()",
+ "endDate.setDate(endDate.getDate() + 3);",
+ "",
+ "postman.setEnvironmentVariable(\"resourceStartDate\", startDate.toUTCString());",
+ "postman.setEnvironmentVariable(\"resourceEndDate\", endDate.toUTCString());"
],
"type": "text/javascript"
}
}
],
"request": {
- "method": "PATCH",
+ "method": "POST",
"header": [
{
"key": "Authorization",
@@ -5499,7 +9242,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"status\": \"in-review\"\r\n}",
+ "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId11}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"{{resourceStartDate}}\",\r\n \"endDate\": \"{{resourceEndDate}}\",\r\n \"memberRate\": 1000,\r\n \"customerRate\": 1200,\r\n \"rateType\": \"weekly\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5507,25 +9250,19 @@
}
},
"url": {
- "raw": "{{URL}}/jobs/{{demoJobId2}}",
+ "raw": "{{URL}}/resourceBookings",
"host": [
"{{URL}}"
],
"path": [
- "jobs",
- "{{demoJobId2}}"
+ "resourceBookings"
]
}
},
"response": []
- }
- ]
- },
- {
- "name": "Create job #3 \"assigned\"",
- "item": [
+ },
{
- "name": "create job #3",
+ "name": "create job 3 resource booking 12",
"event": [
{
"listen": "test",
@@ -5537,7 +9274,88 @@
" pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
"});\r",
"\r",
- "postman.setEnvironmentVariable(\"demoJobId3\",data.id);"
+ "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId12\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "const startDate = new Date()",
+ "startDate.setDate(startDate.getDate() - 3);",
+ "",
+ "const endDate = new Date()",
+ "endDate.setDate(endDate.getDate() + 3);",
+ "",
+ "postman.setEnvironmentVariable(\"resourceStartDate\", startDate.toUTCString());",
+ "postman.setEnvironmentVariable(\"resourceEndDate\", endDate.toUTCString());"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_bookingManager}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId12}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"{{resourceStartDate}}\",\r\n \"endDate\": \"{{resourceEndDate}}\",\r\n \"memberRate\": 1000,\r\n \"customerRate\": 1200,\r\n \"rateType\": \"weekly\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/resourceBookings",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "resourceBookings"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "create job 3 resource booking 13",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "var data = JSON.parse(responseBody);\r",
+ "\r",
+ "pm.test(\"Successful POST request\", function () {\r",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
+ "});\r",
+ "\r",
+ "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId13\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "const startDate = new Date()",
+ "startDate.setDate(startDate.getDate() - 3);",
+ "",
+ "const endDate = new Date()",
+ "endDate.setDate(endDate.getDate() + 3);",
+ "",
+ "postman.setEnvironmentVariable(\"resourceStartDate\", startDate.toUTCString());",
+ "postman.setEnvironmentVariable(\"resourceEndDate\", endDate.toUTCString());"
],
"type": "text/javascript"
}
@@ -5554,7 +9372,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"0\",\n \"description\": \"taas-demo-job3\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 7,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"weekly\",\n \"workload\": \"full-time\",\n \"skills\": [],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId13}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"{{resourceStartDate}}\",\r\n \"endDate\": \"{{resourceEndDate}}\",\r\n \"memberRate\": 1000,\r\n \"customerRate\": 1200,\r\n \"rateType\": \"weekly\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5562,27 +9380,47 @@
}
},
"url": {
- "raw": "{{URL}}/jobs",
+ "raw": "{{URL}}/resourceBookings",
"host": [
"{{URL}}"
],
"path": [
- "jobs"
+ "resourceBookings"
]
}
},
"response": []
},
{
- "name": "create job #3 candidate 11",
+ "name": "create job 3 resource booking 14",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "pm.test(\"Successful POST request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "var data = JSON.parse(responseBody);\r",
+ "\r",
+ "pm.test(\"Successful POST request\", function () {\r",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
+ "});\r",
+ "\r",
+ "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId14\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "const startDate = new Date()",
+ "startDate.setDate(startDate.getDate() - 3);",
+ "",
+ "const endDate = new Date()",
+ "endDate.setDate(endDate.getDate() + 3);",
+ "",
+ "postman.setEnvironmentVariable(\"resourceStartDate\", startDate.toUTCString());",
+ "postman.setEnvironmentVariable(\"resourceEndDate\", endDate.toUTCString());"
],
"type": "text/javascript"
}
@@ -5599,7 +9437,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId11}}\"\r\n}",
+ "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId14}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"{{resourceStartDate}}\",\r\n \"endDate\": \"{{resourceEndDate}}\",\r\n \"memberRate\": 1000,\r\n \"customerRate\": 1200,\r\n \"rateType\": \"weekly\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5607,27 +9445,47 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/resourceBookings",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "resourceBookings"
]
}
},
"response": []
},
{
- "name": "create job #3 candidate 12",
+ "name": "create job 3 resource booking 15",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "pm.test(\"Successful POST request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "var data = JSON.parse(responseBody);\r",
+ "\r",
+ "pm.test(\"Successful POST request\", function () {\r",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
+ "});\r",
+ "\r",
+ "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId15\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "const startDate = new Date()",
+ "startDate.setDate(startDate.getDate() - 3);",
+ "",
+ "const endDate = new Date()",
+ "endDate.setDate(endDate.getDate() + 3);",
+ "",
+ "postman.setEnvironmentVariable(\"resourceStartDate\", startDate.toUTCString());",
+ "postman.setEnvironmentVariable(\"resourceEndDate\", endDate.toUTCString());"
],
"type": "text/javascript"
}
@@ -5644,7 +9502,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId12}}\"\r\n}",
+ "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId15}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"{{resourceStartDate}}\",\r\n \"endDate\": \"{{resourceEndDate}}\",\r\n \"memberRate\": 1000,\r\n \"customerRate\": 1200,\r\n \"rateType\": \"weekly\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5652,27 +9510,47 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/resourceBookings",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "resourceBookings"
]
}
},
"response": []
},
{
- "name": "create job #3 candidate 13",
+ "name": "create job 3 resource booking 16",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "pm.test(\"Successful POST request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "var data = JSON.parse(responseBody);\r",
+ "\r",
+ "pm.test(\"Successful POST request\", function () {\r",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
+ "});\r",
+ "\r",
+ "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId16\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "const startDate = new Date()",
+ "startDate.setDate(startDate.getDate() - 3);",
+ "",
+ "const endDate = new Date()",
+ "endDate.setDate(endDate.getDate() + 3);",
+ "",
+ "postman.setEnvironmentVariable(\"resourceStartDate\", startDate.toUTCString());",
+ "postman.setEnvironmentVariable(\"resourceEndDate\", endDate.toUTCString());"
],
"type": "text/javascript"
}
@@ -5689,7 +9567,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId13}}\"\r\n}",
+ "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId16}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"{{resourceStartDate}}\",\r\n \"endDate\": \"{{resourceEndDate}}\",\r\n \"memberRate\": 800,\r\n \"customerRate\": 1000,\r\n \"rateType\": \"weekly\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5697,27 +9575,47 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/resourceBookings",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "resourceBookings"
]
}
},
"response": []
},
{
- "name": "create job #3 candidate 14",
+ "name": "create job 3 resource booking 17",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "pm.test(\"Successful POST request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "var data = JSON.parse(responseBody);\r",
+ "\r",
+ "pm.test(\"Successful POST request\", function () {\r",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
+ "});\r",
+ "\r",
+ "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId17\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "const startDate = new Date()",
+ "startDate.setDate(startDate.getDate() - 3);",
+ "",
+ "const endDate = new Date()",
+ "endDate.setDate(endDate.getDate() + 3);",
+ "",
+ "postman.setEnvironmentVariable(\"resourceStartDate\", startDate.toUTCString());",
+ "postman.setEnvironmentVariable(\"resourceEndDate\", endDate.toUTCString());"
],
"type": "text/javascript"
}
@@ -5734,7 +9632,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId14}}\"\r\n}",
+ "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId17}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"{{resourceStartDate}}\",\r\n \"endDate\": \"{{resourceEndDate}}\",\r\n \"memberRate\": 2000,\r\n \"customerRate\": 2500,\r\n \"rateType\": \"weekly\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5742,27 +9640,40 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/resourceBookings",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "resourceBookings"
]
}
},
"response": []
},
{
- "name": "create job #3 candidate 15",
+ "name": "create job 3 resource booking 18",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "pm.test(\"Successful POST request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "var data = JSON.parse(responseBody);\r",
+ "\r",
+ "pm.test(\"Successful POST request\", function () {\r",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
+ "});\r",
+ "\r",
+ "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId18\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ ""
],
"type": "text/javascript"
}
@@ -5779,7 +9690,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId15}}\"\r\n}",
+ "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId18}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"2000-07-27T04:17:23.131Z\",\r\n \"endDate\": \"2000-09-27T04:17:23.131Z\",\r\n \"memberRate\": 3000,\r\n \"customerRate\": 3500,\r\n \"rateType\": \"weekly\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5787,27 +9698,31 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/resourceBookings",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "resourceBookings"
]
}
},
"response": []
},
{
- "name": "create job #3 candidate 16",
+ "name": "create job 3 resource booking 19",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "pm.test(\"Successful POST request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "var data = JSON.parse(responseBody);\r",
+ "\r",
+ "pm.test(\"Successful POST request\", function () {\r",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
+ "});\r",
+ "\r",
+ "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId19\",data.id);"
],
"type": "text/javascript"
}
@@ -5824,7 +9739,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId16}}\"\r\n}",
+ "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId19}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"2022-07-27T04:17:23.131Z\",\r\n \"endDate\": \"2022-09-27T04:17:23.131Z\",\r\n \"memberRate\": 1700,\r\n \"customerRate\": 1900,\r\n \"rateType\": \"weekly\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5832,27 +9747,47 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/resourceBookings",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "resourceBookings"
]
}
},
"response": []
},
{
- "name": "create job #3 candidate 17",
+ "name": "create job 3 resource booking 20",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "pm.test(\"Successful POST request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "var data = JSON.parse(responseBody);\r",
+ "\r",
+ "pm.test(\"Successful POST request\", function () {\r",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
+ "});\r",
+ "\r",
+ "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId20\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "const startDate = new Date()",
+ "startDate.setDate(startDate.getDate() - 3);",
+ "",
+ "const endDate = new Date()",
+ "endDate.setDate(endDate.getDate() + 3);",
+ "",
+ "postman.setEnvironmentVariable(\"resourceStartDate\", startDate.toUTCString());",
+ "postman.setEnvironmentVariable(\"resourceEndDate\", endDate.toUTCString());"
],
"type": "text/javascript"
}
@@ -5869,7 +9804,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId17}}\"\r\n}",
+ "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId20}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 0,\r\n \"customerRate\": 0,\r\n \"rateType\": \"weekly\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5877,25 +9812,25 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/resourceBookings",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "resourceBookings"
]
}
},
"response": []
},
{
- "name": "create job #3 candidate 18",
+ "name": "update job 3 resource booking 11 status to \"assigned\"",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "pm.test(\"Successful POST request\", function () {",
+ "pm.test(\"Successful PATCH request\", function () {",
" pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
"});"
],
@@ -5904,7 +9839,7 @@
}
],
"request": {
- "method": "POST",
+ "method": "PATCH",
"header": [
{
"key": "Authorization",
@@ -5914,7 +9849,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId18}}\"\r\n}",
+ "raw": "{\r\n \"status\": \"assigned\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5922,25 +9857,26 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId11}}",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "resourceBookings",
+ "{{demoJob3resourceCandiateId11}}"
]
}
},
"response": []
},
{
- "name": "create job #3 candidate 19",
+ "name": "update job 3 resource booking 12 status to \"in-review\"",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "pm.test(\"Successful POST request\", function () {",
+ "pm.test(\"Successful PATCH request\", function () {",
" pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
"});"
],
@@ -5949,7 +9885,7 @@
}
],
"request": {
- "method": "POST",
+ "method": "PATCH",
"header": [
{
"key": "Authorization",
@@ -5959,7 +9895,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId19}}\"\r\n}",
+ "raw": "{\r\n \"status\": \"in-review\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -5967,25 +9903,26 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId12}}",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "resourceBookings",
+ "{{demoJob3resourceCandiateId12}}"
]
}
},
"response": []
},
{
- "name": "create job #3 candidate 20",
+ "name": "update job 3 resource booking 13 status to \"closed\"",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "pm.test(\"Successful POST request\", function () {",
+ "pm.test(\"Successful PATCH request\", function () {",
" pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
"});"
],
@@ -5994,7 +9931,7 @@
}
],
"request": {
- "method": "POST",
+ "method": "PATCH",
"header": [
{
"key": "Authorization",
@@ -6004,7 +9941,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"userId\": \"{{demoUserId20}}\"\r\n}",
+ "raw": "{\r\n \"status\": \"closed\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -6012,54 +9949,35 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId13}}",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "resourceBookings",
+ "{{demoJob3resourceCandiateId13}}"
]
}
},
"response": []
},
{
- "name": "create job 3 resource booking 11",
+ "name": "update job 3 resource booking 14 status to \"cancelled\"",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "var data = JSON.parse(responseBody);\r",
- "\r",
- "pm.test(\"Successful POST request\", function () {\r",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
- "});\r",
- "\r",
- "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId11\",data.id);"
- ],
- "type": "text/javascript"
- }
- },
- {
- "listen": "prerequest",
- "script": {
- "exec": [
- "const startDate = new Date()",
- "startDate.setDate(startDate.getDate() - 3);",
- "",
- "const endDate = new Date()",
- "endDate.setDate(endDate.getDate() + 3);",
- "",
- "postman.setEnvironmentVariable(\"resourceStartDate\", startDate.toUTCString());",
- "postman.setEnvironmentVariable(\"resourceEndDate\", endDate.toUTCString());"
+ "pm.test(\"Successful PATCH request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
],
"type": "text/javascript"
}
}
],
"request": {
- "method": "POST",
+ "method": "PATCH",
"header": [
{
"key": "Authorization",
@@ -6069,7 +9987,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId11}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"{{resourceStartDate}}\",\r\n \"endDate\": \"{{resourceEndDate}}\",\r\n \"memberRate\": 1000,\r\n \"customerRate\": 1200,\r\n \"rateType\": \"weekly\"\r\n}",
+ "raw": "{\r\n \"status\": \"cancelled\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -6077,54 +9995,35 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings",
+ "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId14}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings"
+ "resourceBookings",
+ "{{demoJob3resourceCandiateId14}}"
]
}
},
"response": []
},
{
- "name": "create job 3 resource booking 12",
+ "name": "update job 3 resource booking 15 status to \"sourcing\"",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "var data = JSON.parse(responseBody);\r",
- "\r",
- "pm.test(\"Successful POST request\", function () {\r",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
- "});\r",
- "\r",
- "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId12\",data.id);"
- ],
- "type": "text/javascript"
- }
- },
- {
- "listen": "prerequest",
- "script": {
- "exec": [
- "const startDate = new Date()",
- "startDate.setDate(startDate.getDate() - 3);",
- "",
- "const endDate = new Date()",
- "endDate.setDate(endDate.getDate() + 3);",
- "",
- "postman.setEnvironmentVariable(\"resourceStartDate\", startDate.toUTCString());",
- "postman.setEnvironmentVariable(\"resourceEndDate\", endDate.toUTCString());"
+ "pm.test(\"Successful PATCH request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
],
"type": "text/javascript"
}
}
],
"request": {
- "method": "POST",
+ "method": "PATCH",
"header": [
{
"key": "Authorization",
@@ -6134,7 +10033,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId12}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"{{resourceStartDate}}\",\r\n \"endDate\": \"{{resourceEndDate}}\",\r\n \"memberRate\": 1000,\r\n \"customerRate\": 1200,\r\n \"rateType\": \"weekly\"\r\n}",
+ "raw": "{\r\n \"status\": \"sourcing\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -6142,54 +10041,35 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings",
+ "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId15}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings"
+ "resourceBookings",
+ "{{demoJob3resourceCandiateId15}}"
]
}
},
"response": []
},
{
- "name": "create job 3 resource booking 13",
+ "name": "update job 3 resource booking 16 status to \"assigned\"",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "var data = JSON.parse(responseBody);\r",
- "\r",
- "pm.test(\"Successful POST request\", function () {\r",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
- "});\r",
- "\r",
- "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId13\",data.id);"
- ],
- "type": "text/javascript"
- }
- },
- {
- "listen": "prerequest",
- "script": {
- "exec": [
- "const startDate = new Date()",
- "startDate.setDate(startDate.getDate() - 3);",
- "",
- "const endDate = new Date()",
- "endDate.setDate(endDate.getDate() + 3);",
- "",
- "postman.setEnvironmentVariable(\"resourceStartDate\", startDate.toUTCString());",
- "postman.setEnvironmentVariable(\"resourceEndDate\", endDate.toUTCString());"
+ "pm.test(\"Successful PATCH request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
],
"type": "text/javascript"
}
}
],
"request": {
- "method": "POST",
+ "method": "PATCH",
"header": [
{
"key": "Authorization",
@@ -6199,7 +10079,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId13}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"{{resourceStartDate}}\",\r\n \"endDate\": \"{{resourceEndDate}}\",\r\n \"memberRate\": 1000,\r\n \"customerRate\": 1200,\r\n \"rateType\": \"weekly\"\r\n}",
+ "raw": "{\r\n \"status\": \"assigned\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -6207,54 +10087,35 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings",
+ "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId16}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings"
+ "resourceBookings",
+ "{{demoJob3resourceCandiateId16}}"
]
}
},
"response": []
},
{
- "name": "create job 3 resource booking 14",
+ "name": "update job 3 resource booking 17 status to \"assigned\"",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "var data = JSON.parse(responseBody);\r",
- "\r",
- "pm.test(\"Successful POST request\", function () {\r",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
- "});\r",
- "\r",
- "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId14\",data.id);"
- ],
- "type": "text/javascript"
- }
- },
- {
- "listen": "prerequest",
- "script": {
- "exec": [
- "const startDate = new Date()",
- "startDate.setDate(startDate.getDate() - 3);",
- "",
- "const endDate = new Date()",
- "endDate.setDate(endDate.getDate() + 3);",
- "",
- "postman.setEnvironmentVariable(\"resourceStartDate\", startDate.toUTCString());",
- "postman.setEnvironmentVariable(\"resourceEndDate\", endDate.toUTCString());"
+ "pm.test(\"Successful PATCH request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
],
"type": "text/javascript"
}
}
],
"request": {
- "method": "POST",
+ "method": "PATCH",
"header": [
{
"key": "Authorization",
@@ -6264,7 +10125,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId14}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"{{resourceStartDate}}\",\r\n \"endDate\": \"{{resourceEndDate}}\",\r\n \"memberRate\": 1000,\r\n \"customerRate\": 1200,\r\n \"rateType\": \"weekly\"\r\n}",
+ "raw": "{\r\n \"status\": \"assigned\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -6272,54 +10133,35 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings",
+ "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId17}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings"
+ "resourceBookings",
+ "{{demoJob3resourceCandiateId17}}"
]
}
},
"response": []
},
{
- "name": "create job 3 resource booking 15",
+ "name": "update job 3 resource booking 18 status to \"assigned\"",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "var data = JSON.parse(responseBody);\r",
- "\r",
- "pm.test(\"Successful POST request\", function () {\r",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
- "});\r",
- "\r",
- "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId15\",data.id);"
- ],
- "type": "text/javascript"
- }
- },
- {
- "listen": "prerequest",
- "script": {
- "exec": [
- "const startDate = new Date()",
- "startDate.setDate(startDate.getDate() - 3);",
- "",
- "const endDate = new Date()",
- "endDate.setDate(endDate.getDate() + 3);",
- "",
- "postman.setEnvironmentVariable(\"resourceStartDate\", startDate.toUTCString());",
- "postman.setEnvironmentVariable(\"resourceEndDate\", endDate.toUTCString());"
+ "pm.test(\"Successful PATCH request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
],
"type": "text/javascript"
}
}
],
"request": {
- "method": "POST",
+ "method": "PATCH",
"header": [
{
"key": "Authorization",
@@ -6329,7 +10171,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId15}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"{{resourceStartDate}}\",\r\n \"endDate\": \"{{resourceEndDate}}\",\r\n \"memberRate\": 1000,\r\n \"customerRate\": 1200,\r\n \"rateType\": \"weekly\"\r\n}",
+ "raw": "{\r\n \"status\": \"assigned\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -6337,54 +10179,35 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings",
+ "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId18}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings"
+ "resourceBookings",
+ "{{demoJob3resourceCandiateId18}}"
]
}
},
"response": []
},
{
- "name": "create job 3 resource booking 16",
+ "name": "update job 3 resource booking 19 status to \"assigned\"",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "var data = JSON.parse(responseBody);\r",
- "\r",
- "pm.test(\"Successful POST request\", function () {\r",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
- "});\r",
- "\r",
- "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId16\",data.id);"
- ],
- "type": "text/javascript"
- }
- },
- {
- "listen": "prerequest",
- "script": {
- "exec": [
- "const startDate = new Date()",
- "startDate.setDate(startDate.getDate() - 3);",
- "",
- "const endDate = new Date()",
- "endDate.setDate(endDate.getDate() + 3);",
- "",
- "postman.setEnvironmentVariable(\"resourceStartDate\", startDate.toUTCString());",
- "postman.setEnvironmentVariable(\"resourceEndDate\", endDate.toUTCString());"
+ "pm.test(\"Successful PATCH request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
],
"type": "text/javascript"
}
}
],
"request": {
- "method": "POST",
+ "method": "PATCH",
"header": [
{
"key": "Authorization",
@@ -6394,7 +10217,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId16}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"{{resourceStartDate}}\",\r\n \"endDate\": \"{{resourceEndDate}}\",\r\n \"memberRate\": 800,\r\n \"customerRate\": 1000,\r\n \"rateType\": \"weekly\"\r\n}",
+ "raw": "{\r\n \"status\": \"assigned\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -6402,54 +10225,35 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings",
+ "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId19}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings"
+ "resourceBookings",
+ "{{demoJob3resourceCandiateId19}}"
]
}
},
"response": []
},
{
- "name": "create job 3 resource booking 17",
+ "name": "update job 3 resource booking 20 status to \"assigned\"",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "var data = JSON.parse(responseBody);\r",
- "\r",
- "pm.test(\"Successful POST request\", function () {\r",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
- "});\r",
- "\r",
- "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId17\",data.id);"
- ],
- "type": "text/javascript"
- }
- },
- {
- "listen": "prerequest",
- "script": {
- "exec": [
- "const startDate = new Date()",
- "startDate.setDate(startDate.getDate() - 3);",
- "",
- "const endDate = new Date()",
- "endDate.setDate(endDate.getDate() + 3);",
- "",
- "postman.setEnvironmentVariable(\"resourceStartDate\", startDate.toUTCString());",
- "postman.setEnvironmentVariable(\"resourceEndDate\", endDate.toUTCString());"
+ "pm.test(\"Successful PATCH request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
],
"type": "text/javascript"
}
}
],
"request": {
- "method": "POST",
+ "method": "PATCH",
"header": [
{
"key": "Authorization",
@@ -6459,7 +10263,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId17}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"{{resourceStartDate}}\",\r\n \"endDate\": \"{{resourceEndDate}}\",\r\n \"memberRate\": 2000,\r\n \"customerRate\": 2500,\r\n \"rateType\": \"weekly\"\r\n}",
+ "raw": "{\r\n \"status\": \"assigned\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -6467,47 +10271,35 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings",
+ "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId20}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings"
+ "resourceBookings",
+ "{{demoJob3resourceCandiateId20}}"
]
}
},
"response": []
},
{
- "name": "create job 3 resource booking 18",
+ "name": "update job #3 status to \"assigned\"",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "var data = JSON.parse(responseBody);\r",
- "\r",
- "pm.test(\"Successful POST request\", function () {\r",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
- "});\r",
- "\r",
- "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId18\",data.id);"
- ],
- "type": "text/javascript"
- }
- },
- {
- "listen": "prerequest",
- "script": {
- "exec": [
- ""
+ "pm.test(\"Successful PATCH request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
],
"type": "text/javascript"
}
}
],
"request": {
- "method": "POST",
+ "method": "PATCH",
"header": [
{
"key": "Authorization",
@@ -6517,7 +10309,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId18}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"2000-07-27T04:17:23.131Z\",\r\n \"endDate\": \"2000-09-27T04:17:23.131Z\",\r\n \"memberRate\": 3000,\r\n \"customerRate\": 3500,\r\n \"rateType\": \"weekly\"\r\n}",
+ "raw": "{\r\n \"status\": \"assigned\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -6525,19 +10317,25 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings",
+ "raw": "{{URL}}/jobs/{{demoJobId3}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings"
+ "jobs",
+ "{{demoJobId3}}"
]
}
},
"response": []
- },
+ }
+ ]
+ },
+ {
+ "name": "Create job #4 \"closed\"",
+ "item": [
{
- "name": "create job 3 resource booking 19",
+ "name": "create job #4",
"event": [
{
"listen": "test",
@@ -6549,7 +10347,7 @@
" pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
"});\r",
"\r",
- "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId19\",data.id);"
+ "postman.setEnvironmentVariable(\"demoJobId4\",data.id);"
],
"type": "text/javascript"
}
@@ -6566,7 +10364,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId19}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"2022-07-27T04:17:23.131Z\",\r\n \"endDate\": \"2022-09-27T04:17:23.131Z\",\r\n \"memberRate\": 1700,\r\n \"customerRate\": 1900,\r\n \"rateType\": \"weekly\"\r\n}",
+ "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"0\",\n \"description\": \"taas-demo-job4\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 7,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"weekly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"8456002e-fa2d-44f0-b0e7-86b1c02b6e4c\",\n \"114b4ec8-805e-4c60-b351-14a955a991a9\",\n \"213408aa-f16f-46c8-bc57-9e569cee3f11\",\n \"b37a48db-f775-4e4e-b403-8ad1d234cdea\",\n \"99b930b5-1b91-4df1-8b17-d9307107bb51\",\n \"6388a632-c3ad-4525-9a73-66a527c03672\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
"options": {
"raw": {
"language": "json"
@@ -6574,54 +10372,34 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings",
+ "raw": "{{URL}}/jobs",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings"
+ "jobs"
]
}
},
"response": []
},
{
- "name": "create job 3 resource booking 20",
+ "name": "update job #4 status to \"closed\"",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "var data = JSON.parse(responseBody);\r",
- "\r",
- "pm.test(\"Successful POST request\", function () {\r",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
- "});\r",
- "\r",
- "postman.setEnvironmentVariable(\"demoJob3resourceCandiateId20\",data.id);"
- ],
- "type": "text/javascript"
- }
- },
- {
- "listen": "prerequest",
- "script": {
- "exec": [
- "const startDate = new Date()",
- "startDate.setDate(startDate.getDate() - 3);",
- "",
- "const endDate = new Date()",
- "endDate.setDate(endDate.getDate() + 3);",
- "",
- "postman.setEnvironmentVariable(\"resourceStartDate\", startDate.toUTCString());",
- "postman.setEnvironmentVariable(\"resourceEndDate\", endDate.toUTCString());"
+ "pm.test(\"Successful PATCH request\", function () {",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
+ "});"
],
"type": "text/javascript"
}
}
],
"request": {
- "method": "POST",
+ "method": "PATCH",
"header": [
{
"key": "Authorization",
@@ -6631,7 +10409,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"{{demoUserId20}}\",\r\n \"jobId\": \"{{demoJobId3}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 0,\r\n \"customerRate\": 0,\r\n \"rateType\": \"weekly\"\r\n}",
+ "raw": "{\r\n \"status\": \"closed\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -6639,34 +10417,44 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings",
+ "raw": "{{URL}}/jobs/{{demoJobId4}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings"
+ "jobs",
+ "{{demoJobId4}}"
]
}
},
"response": []
- },
+ }
+ ]
+ },
+ {
+ "name": "Create job #5 \"cancelled\"",
+ "item": [
{
- "name": "update job 3 resource booking 11 status to \"assigned\"",
+ "name": "create job #5",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "pm.test(\"Successful PATCH request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "var data = JSON.parse(responseBody);\r",
+ "\r",
+ "pm.test(\"Successful POST request\", function () {\r",
+ " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
+ "});\r",
+ "\r",
+ "postman.setEnvironmentVariable(\"demoJobId5\",data.id);"
],
"type": "text/javascript"
}
}
],
"request": {
- "method": "PATCH",
+ "method": "POST",
"header": [
{
"key": "Authorization",
@@ -6676,7 +10464,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"status\": \"assigned\"\r\n}",
+ "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"0\",\n \"description\": \"taas-demo-job5\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 7,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"weekly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"b37a48db-f775-4e4e-b403-8ad1d234cdea\",\n \"99b930b5-1b91-4df1-8b17-d9307107bb51\",\n \"6388a632-c3ad-4525-9a73-66a527c03672\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
"options": {
"raw": {
"language": "json"
@@ -6684,20 +10472,19 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId11}}",
+ "raw": "{{URL}}/jobs",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings",
- "{{demoJob3resourceCandiateId11}}"
+ "jobs"
]
}
},
"response": []
},
{
- "name": "update job 3 resource booking 12 status to \"in-review\"",
+ "name": "update job #5 status to \"cancelled\"",
"event": [
{
"listen": "test",
@@ -6722,662 +10509,897 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"status\": \"in-review\"\r\n}",
+ "raw": "{\r\n \"status\": \"cancelled\"\r\n}",
"options": {
"raw": {
"language": "json"
}
- }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobs/{{demoJobId5}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobs",
+ "{{demoJobId5}}"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "Test Permission Rules",
+ "item": [
+ {
+ "name": "Request with Administrator Role",
+ "item": [
+ {
+ "name": "Jobs",
+ "item": [
+ {
+ "name": "✔ create job with administrator",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "var data = JSON.parse(responseBody);\r",
+ "postman.setEnvironmentVariable(\"job_id_created_by_administrator\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{token_administrator}}",
+ "type": "text"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobs",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobs"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "✔ get job with administrator",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/jobs/{{job_id_created_by_administrator}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobs",
+ "{{job_id_created_by_administrator}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "✔ search jobs with administrator",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
+ ],
+ "url": {
+ "raw": "{{URL}}/jobs",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobs"
+ ],
+ "query": [
+ {
+ "key": "page",
+ "value": "0",
+ "disabled": true
+ },
+ {
+ "key": "perPage",
+ "value": "3",
+ "disabled": true
+ },
+ {
+ "key": "sortBy",
+ "value": "id",
+ "disabled": true
+ },
+ {
+ "key": "sortOrder",
+ "value": "asc",
+ "disabled": true
+ },
+ {
+ "key": "projectId",
+ "value": "21",
+ "disabled": true
+ },
+ {
+ "key": "externalId",
+ "value": "1212",
+ "disabled": true
+ },
+ {
+ "key": "description",
+ "value": "Dummy",
+ "disabled": true
+ },
+ {
+ "key": "startDate",
+ "value": "2020-09-27T04:17:23.131Z",
+ "disabled": true
+ },
+ {
+ "key": "resourceType",
+ "value": "Dummy Resource Type",
+ "disabled": true
+ },
+ {
+ "key": "skill",
+ "value": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
+ "disabled": true
+ },
+ {
+ "key": "rateType",
+ "value": "hourly",
+ "disabled": true
+ },
+ {
+ "key": "status",
+ "value": "sourcing",
+ "disabled": true
+ },
+ {
+ "key": "workload",
+ "value": "full-time",
+ "disabled": true
+ },
+ {
+ "key": "title",
+ "value": "dummy",
+ "disabled": true
+ }
+ ]
+ }
+ },
+ "response": []
},
- "url": {
- "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId12}}",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "resourceBookings",
- "{{demoJob3resourceCandiateId12}}"
- ]
- }
- },
- "response": []
- },
- {
- "name": "update job 3 resource booking 13 status to \"closed\"",
- "event": [
{
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Successful PATCH request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "name": "✔ put job with administrator",
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "PATCH",
- "header": [
- {
- "key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_bookingManager}}"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"status\": \"closed\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"fractional\",\n \"skills\": [\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"status\": \"sourcing\",\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobs/{{job_id_created_by_administrator}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobs",
+ "{{job_id_created_by_administrator}}"
+ ]
}
- }
+ },
+ "response": []
},
- "url": {
- "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId13}}",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "resourceBookings",
- "{{demoJob3resourceCandiateId13}}"
- ]
- }
- },
- "response": []
- },
- {
- "name": "update job 3 resource booking 14 status to \"cancelled\"",
- "event": [
{
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Successful PATCH request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "name": "✔ patch job with administrator",
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "PATCH",
- "header": [
- {
- "key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_bookingManager}}"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"status\": \"cancelled\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"fractional\",\n \"skills\": [\n \"cbac57a3-7180-4316-8769-73af64893158\"\n ],\n \"status\": \"sourcing\",\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobs/{{job_id_created_by_administrator}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobs",
+ "{{job_id_created_by_administrator}}"
+ ]
}
- }
+ },
+ "response": []
},
- "url": {
- "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId14}}",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "resourceBookings",
- "{{demoJob3resourceCandiateId14}}"
- ]
- }
- },
- "response": []
- },
- {
- "name": "update job 3 resource booking 15 status to \"sourcing\"",
- "event": [
{
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Successful PATCH request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
- ],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "PATCH",
- "header": [
- {
- "key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_bookingManager}}"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"status\": \"sourcing\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
+ "name": "✔ delete job with administrator",
+ "request": {
+ "method": "DELETE",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobs/{{job_id_created_by_administrator}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobs",
+ "{{job_id_created_by_administrator}}"
+ ]
}
- }
- },
- "url": {
- "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId15}}",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "resourceBookings",
- "{{demoJob3resourceCandiateId15}}"
- ]
+ },
+ "response": []
}
- },
- "response": []
+ ]
},
{
- "name": "update job 3 resource booking 16 status to \"assigned\"",
- "event": [
+ "name": "Job Candidates",
+ "item": [
{
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Successful PATCH request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "name": "✔ create job candidate with administrator",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "var data = JSON.parse(responseBody);\r",
+ "postman.setEnvironmentVariable(\"job_candidate_id_created_by_administrator\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "PATCH",
- "header": [
- {
- "key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_bookingManager}}"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"status\": \"assigned\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"jobId\": \"{{job_id_created_by_administrator}}\",\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobCandidates",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates"
+ ]
}
- }
+ },
+ "response": []
},
- "url": {
- "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId16}}",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "resourceBookings",
- "{{demoJob3resourceCandiateId16}}"
- ]
- }
- },
- "response": []
- },
- {
- "name": "update job 3 resource booking 17 status to \"assigned\"",
- "event": [
{
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Successful PATCH request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "name": "✔ get job candidate with administrator",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "PATCH",
- "header": [
- {
- "key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_bookingManager}}"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"status\": \"assigned\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
+ "url": {
+ "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_by_administrator}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates",
+ "{{job_candidate_id_created_by_administrator}}"
+ ]
}
- }
+ },
+ "response": []
},
- "url": {
- "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId17}}",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "resourceBookings",
- "{{demoJob3resourceCandiateId17}}"
- ]
- }
- },
- "response": []
- },
- {
- "name": "update job 3 resource booking 18 status to \"assigned\"",
- "event": [
{
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Successful PATCH request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "name": "✔ search job candidates with administrator",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "PATCH",
- "header": [
- {
- "key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_bookingManager}}"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"status\": \"assigned\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
+ "url": {
+ "raw": "{{URL}}/jobCandidates",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates"
+ ],
+ "query": [
+ {
+ "key": "page",
+ "value": "1",
+ "disabled": true
+ },
+ {
+ "key": "perPage",
+ "value": "1",
+ "disabled": true
+ },
+ {
+ "key": "sortBy",
+ "value": "id",
+ "disabled": true
+ },
+ {
+ "key": "sortOrder",
+ "value": "asc",
+ "disabled": true
+ },
+ {
+ "key": "jobId",
+ "value": "46225f4c-c2a3-4603-a141-0277e96fabfa",
+ "disabled": true
+ },
+ {
+ "key": "userId",
+ "value": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
+ "disabled": true
+ },
+ {
+ "key": "status",
+ "value": "shortlist",
+ "disabled": true
+ }
+ ]
}
- }
+ },
+ "response": []
},
- "url": {
- "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId18}}",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "resourceBookings",
- "{{demoJob3resourceCandiateId18}}"
- ]
- }
- },
- "response": []
- },
- {
- "name": "update job 3 resource booking 19 status to \"assigned\"",
- "event": [
{
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Successful PATCH request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "name": "✔ put job candidate with administrator",
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "PATCH",
- "header": [
- {
- "key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_bookingManager}}"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"status\": \"assigned\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"jobId\": \"{{job_id_created_by_administrator}}\",\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"status\": \"selected\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_by_administrator}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates",
+ "{{job_candidate_id_created_by_administrator}}"
+ ]
}
- }
+ },
+ "response": []
},
- "url": {
- "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId19}}",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "resourceBookings",
- "{{demoJob3resourceCandiateId19}}"
- ]
- }
- },
- "response": []
- },
- {
- "name": "update job 3 resource booking 20 status to \"assigned\"",
- "event": [
{
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Successful PATCH request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "name": "✔ patch job candidate with administrator",
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "PATCH",
- "header": [
- {
- "key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_bookingManager}}"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"status\": \"assigned\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"status\": \"shortlist\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_by_administrator}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates",
+ "{{job_candidate_id_created_by_administrator}}"
+ ]
}
- }
+ },
+ "response": []
},
- "url": {
- "raw": "{{URL}}/resourceBookings/{{demoJob3resourceCandiateId20}}",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "resourceBookings",
- "{{demoJob3resourceCandiateId20}}"
- ]
+ {
+ "name": "✔ delete job candidate with administrator",
+ "request": {
+ "method": "DELETE",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_by_administrator}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates",
+ "{{job_candidate_id_created_by_administrator}}"
+ ]
+ }
+ },
+ "response": []
}
- },
- "response": []
+ ]
},
{
- "name": "update job #3 status to \"assigned\"",
- "event": [
+ "name": "Resource Bookings",
+ "item": [
{
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Successful PATCH request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "name": "✔ create resource booking with administrator",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "var data = JSON.parse(responseBody);\r",
+ "postman.setEnvironmentVariable(\"resource_bookings_id_created_by_administrator\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "PATCH",
- "header": [
- {
- "key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_bookingManager}}"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"status\": \"assigned\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{job_id_created_by_administrator}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/resourceBookings",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "resourceBookings"
+ ]
}
- }
+ },
+ "response": []
},
- "url": {
- "raw": "{{URL}}/jobs/{{demoJobId3}}",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "jobs",
- "{{demoJobId3}}"
- ]
- }
- },
- "response": []
- }
- ]
- },
- {
- "name": "Create job #4 \"closed\"",
- "item": [
- {
- "name": "create job #4",
- "event": [
{
- "listen": "test",
- "script": {
- "exec": [
- "var data = JSON.parse(responseBody);\r",
- "\r",
- "pm.test(\"Successful POST request\", function () {\r",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
- "});\r",
- "\r",
- "postman.setEnvironmentVariable(\"demoJobId4\",data.id);"
+ "name": "✔ get resource booking with administrator",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "POST",
- "header": [
- {
- "key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_bookingManager}}"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"0\",\n \"description\": \"taas-demo-job4\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 7,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"weekly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"8456002e-fa2d-44f0-b0e7-86b1c02b6e4c\",\n \"114b4ec8-805e-4c60-b351-14a955a991a9\",\n \"213408aa-f16f-46c8-bc57-9e569cee3f11\",\n \"b37a48db-f775-4e4e-b403-8ad1d234cdea\",\n \"99b930b5-1b91-4df1-8b17-d9307107bb51\",\n \"6388a632-c3ad-4525-9a73-66a527c03672\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
- "options": {
- "raw": {
- "language": "json"
+ "url": {
+ "raw": "{{URL}}/resourceBookings/{{resource_bookings_id_created_by_administrator}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "resourceBookings",
+ "{{resource_bookings_id_created_by_administrator}}"
+ ]
}
- }
+ },
+ "response": []
},
- "url": {
- "raw": "{{URL}}/jobs",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "jobs"
- ]
- }
- },
- "response": []
- },
- {
- "name": "update job #4 status to \"closed\"",
- "event": [
{
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Successful PATCH request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "name": "✔ search resource bookings with administrator",
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "PATCH",
- "header": [
- {
- "key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_bookingManager}}"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"status\": \"closed\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
+ "url": {
+ "raw": "{{URL}}/resourceBookings",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "resourceBookings"
+ ],
+ "query": [
+ {
+ "key": "page",
+ "value": "1",
+ "disabled": true
+ },
+ {
+ "key": "perPage",
+ "value": "5",
+ "disabled": true
+ },
+ {
+ "key": "sortBy",
+ "value": "id",
+ "disabled": true
+ },
+ {
+ "key": "sortOrder",
+ "value": "desc",
+ "disabled": true
+ },
+ {
+ "key": "startDate",
+ "value": "2020-09-27T04:17:23.131Z",
+ "disabled": true
+ },
+ {
+ "key": "endDate",
+ "value": "2020-09-27T04:17:23.131Z",
+ "disabled": true
+ },
+ {
+ "key": "rateType",
+ "value": "hourly",
+ "disabled": true
+ },
+ {
+ "key": "status",
+ "value": "sourcing",
+ "disabled": true
+ },
+ {
+ "key": "projectIds",
+ "value": "111, 16705",
+ "disabled": true
+ }
+ ]
}
- }
+ },
+ "response": []
},
- "url": {
- "raw": "{{URL}}/jobs/{{demoJobId4}}",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "jobs",
- "{{demoJobId4}}"
- ]
- }
- },
- "response": []
- }
- ]
- },
- {
- "name": "Create job #5 \"cancelled\"",
- "item": [
- {
- "name": "create job #5",
- "event": [
{
- "listen": "test",
- "script": {
- "exec": [
- "var data = JSON.parse(responseBody);\r",
- "\r",
- "pm.test(\"Successful POST request\", function () {\r",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);\r",
- "});\r",
- "\r",
- "postman.setEnvironmentVariable(\"demoJobId5\",data.id);"
+ "name": "✔ put resource booking with administrator",
+ "request": {
+ "method": "PUT",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "POST",
- "header": [
- {
- "key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_bookingManager}}"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"0\",\n \"description\": \"taas-demo-job5\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 7,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"weekly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"b37a48db-f775-4e4e-b403-8ad1d234cdea\",\n \"99b930b5-1b91-4df1-8b17-d9307107bb51\",\n \"6388a632-c3ad-4525-9a73-66a527c03672\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
- "options": {
- "raw": {
- "language": "json"
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{job_id_created_by_administrator}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/resourceBookings/{{resource_bookings_id_created_by_administrator}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "resourceBookings",
+ "{{resource_bookings_id_created_by_administrator}}"
+ ]
}
- }
+ },
+ "response": []
},
- "url": {
- "raw": "{{URL}}/jobs",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "jobs"
- ]
- }
- },
- "response": []
- },
- {
- "name": "update job #5 status to \"cancelled\"",
- "event": [
{
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Successful PATCH request\", function () {",
- " pm.expect(pm.response.code).to.be.oneOf([200, 201, 202]);",
- "});"
+ "name": "✔ patch resource booking with administrator",
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "PATCH",
- "header": [
- {
- "key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_bookingManager}}"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"status\": \"cancelled\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/resourceBookings/{{resource_bookings_id_created_by_administrator}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "resourceBookings",
+ "{{resource_bookings_id_created_by_administrator}}"
+ ]
}
- }
+ },
+ "response": []
},
- "url": {
- "raw": "{{URL}}/jobs/{{demoJobId5}}",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "jobs",
- "{{demoJobId5}}"
- ]
+ {
+ "name": "✔ delete resource booking with administrator",
+ "request": {
+ "method": "DELETE",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/resourceBookings/{{resource_bookings_id_created_by_administrator}}",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "resourceBookings",
+ "{{resource_bookings_id_created_by_administrator}}"
+ ]
+ }
+ },
+ "response": []
}
- },
- "response": []
- }
- ]
- }
- ]
- },
- {
- "name": "Test Permission Rules",
- "item": [
- {
- "name": "Request with Administrator Role",
- "item": [
+ ]
+ },
{
- "name": "Jobs",
+ "name": "Work Periods",
"item": [
{
- "name": "✔ create job with administrator",
+ "name": "Before Test",
+ "item": [
+ {
+ "name": "✔ create job with administrator",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ " if(pm.response.status === \"OK\"){\r",
+ " const response = pm.response.json()\r",
+ " pm.environment.set(\"job_id_created_by_administrator\", response.id);\r",
+ " }\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{token_administrator}}",
+ "type": "text"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobs",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobs"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "✔ create resource booking with administrator",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ " if(pm.response.status === \"OK\"){\r",
+ " const response = pm.response.json()\r",
+ " pm.environment.set(\"resource_bookings_id_created_by_administrator\", response.id);\r",
+ " }\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{job_id_created_by_administrator}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/resourceBookings",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "resourceBookings"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+ },
+ {
+ "name": "✔ create work period with administrator",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "var data = JSON.parse(responseBody);\r",
- "postman.setEnvironmentVariable(\"job_id_created_by_administrator\",data.id);"
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ " if(pm.response.status === \"OK\"){\r",
+ " const response = pm.response.json()\r",
+ " pm.environment.set(\"workPeriodId_created_by_administrator\", response.id);\r",
+ " }\r",
+ "});"
],
"type": "text/javascript"
}
@@ -7388,13 +11410,13 @@
"header": [
{
"key": "Authorization",
- "value": "Bearer {{token_administrator}}",
- "type": "text"
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
}
],
"body": {
"mode": "raw",
- "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resource_bookings_id_created_by_administrator}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -7402,19 +11424,19 @@
}
},
"url": {
- "raw": "{{URL}}/jobs",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "jobs"
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "✔ get job with administrator",
+ "name": "✔ get work period with administrator",
"request": {
"method": "GET",
"header": [
@@ -7425,20 +11447,20 @@
}
],
"url": {
- "raw": "{{URL}}/jobs/{{job_id_created_by_administrator}}",
+ "raw": "{{URL}}/workPeriods/{{workPeriodId_created_by_administrator}}",
"host": [
"{{URL}}"
],
"path": [
- "jobs",
- "{{job_id_created_by_administrator}}"
+ "workPeriods",
+ "{{workPeriodId_created_by_administrator}}"
]
}
},
"response": []
},
{
- "name": "✔ search jobs with administrator",
+ "name": "✔ search work periods with administrator",
"request": {
"method": "GET",
"header": [
@@ -7449,82 +11471,67 @@
}
],
"url": {
- "raw": "{{URL}}/jobs",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "jobs"
+ "workPeriods"
],
"query": [
{
"key": "page",
- "value": "0",
+ "value": "1",
"disabled": true
},
{
"key": "perPage",
- "value": "3",
+ "value": "5",
"disabled": true
},
{
"key": "sortBy",
- "value": "id",
- "disabled": true
- },
- {
- "key": "sortOrder",
- "value": "asc",
- "disabled": true
- },
- {
- "key": "projectId",
- "value": "21",
- "disabled": true
- },
- {
- "key": "externalId",
- "value": "1212",
+ "value": "id",
"disabled": true
},
{
- "key": "description",
- "value": "Dummy",
+ "key": "sortOrder",
+ "value": "desc",
"disabled": true
},
{
- "key": "startDate",
- "value": "2020-09-27T04:17:23.131Z",
+ "key": "resourceBookingId",
+ "value": "{{resource_bookings_id_created_by_administrator}}",
"disabled": true
},
{
- "key": "resourceType",
- "value": "Dummy Resource Type",
+ "key": "resourceBookingIds",
+ "value": "{{resource_bookings_id_created_by_administrator}},{{resource_bookings_id_created_by_administrator}}",
"disabled": true
},
{
- "key": "skill",
- "value": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
+ "key": "paymentStatus",
+ "value": "pending",
"disabled": true
},
{
- "key": "rateType",
- "value": "hourly",
+ "key": "startDate",
+ "value": "2021-03-07",
"disabled": true
},
{
- "key": "status",
- "value": "sourcing",
+ "key": "endDate",
+ "value": "2021-03-13",
"disabled": true
},
{
- "key": "workload",
- "value": "full-time",
+ "key": "userHandle",
+ "value": "pshah_manager",
"disabled": true
},
{
- "key": "title",
- "value": "dummy",
+ "key": "projectId",
+ "value": "111",
"disabled": true
}
]
@@ -7533,7 +11540,20 @@
"response": []
},
{
- "name": "✔ put job with administrator",
+ "name": "✔ put work period with administrator",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
"method": "PUT",
"header": [
@@ -7545,7 +11565,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"fractional\",\n \"skills\": [\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"status\": \"sourcing\",\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resource_bookings_id_created_by_administrator}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -7553,20 +11573,33 @@
}
},
"url": {
- "raw": "{{URL}}/jobs/{{job_id_created_by_administrator}}",
+ "raw": "{{URL}}/workPeriods/{{workPeriodId_created_by_administrator}}",
"host": [
"{{URL}}"
],
"path": [
- "jobs",
- "{{job_id_created_by_administrator}}"
+ "workPeriods",
+ "{{workPeriodId_created_by_administrator}}"
]
}
},
"response": []
},
{
- "name": "✔ patch job with administrator",
+ "name": "✔ patch work period with administrator",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
"method": "PATCH",
"header": [
@@ -7578,7 +11611,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"fractional\",\n \"skills\": [\n \"cbac57a3-7180-4316-8769-73af64893158\"\n ],\n \"status\": \"sourcing\",\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resource_bookings_id_created_by_administrator}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -7586,20 +11619,33 @@
}
},
"url": {
- "raw": "{{URL}}/jobs/{{job_id_created_by_administrator}}",
+ "raw": "{{URL}}/workPeriods/{{workPeriodId_created_by_administrator}}",
"host": [
"{{URL}}"
],
"path": [
- "jobs",
- "{{job_id_created_by_administrator}}"
+ "workPeriods",
+ "{{workPeriodId_created_by_administrator}}"
]
}
},
"response": []
},
{
- "name": "✔ delete job with administrator",
+ "name": "✔ delete work period with administrator",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 204', function () {\r",
+ " pm.response.to.have.status(204);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
"method": "DELETE",
"header": [
@@ -7619,32 +11665,53 @@
}
},
"url": {
- "raw": "{{URL}}/jobs/{{job_id_created_by_administrator}}",
+ "raw": "{{URL}}/workPeriods/{{workPeriodId_created_by_administrator}}",
"host": [
"{{URL}}"
],
"path": [
- "jobs",
- "{{job_id_created_by_administrator}}"
+ "workPeriods",
+ "{{workPeriodId_created_by_administrator}}"
]
}
},
"response": []
}
]
+ }
+ ]
+ },
+ {
+ "name": "Request with Topcoder User Role",
+ "item": [
+ {
+ "name": "README",
+ "item": [
+ {
+ "name": "[STUB] all operations cause 403 error if user is not member of project",
+ "request": {
+ "method": "LOCK",
+ "header": [],
+ "url": {
+ "raw": ""
+ }
+ },
+ "response": []
+ }
+ ]
},
{
- "name": "Job Candidates",
+ "name": "Jobs",
"item": [
{
- "name": "✔ create job candidate with administrator",
+ "name": "✔ create job with member",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var data = JSON.parse(responseBody);\r",
- "postman.setEnvironmentVariable(\"job_candidate_id_created_by_administrator\",data.id);"
+ "postman.setEnvironmentVariable(\"job_id_created_by_member\",data.id);"
],
"type": "text/javascript"
}
@@ -7655,13 +11722,13 @@
"header": [
{
"key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_administrator}}"
+ "value": "Bearer {{token_member_tester1234}}",
+ "type": "text"
}
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{job_id_created_by_administrator}}\",\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\"\r\n}",
+ "raw": "{\n \"projectId\": {{project_id_16718}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
"options": {
"raw": {
"language": "json"
@@ -7669,69 +11736,69 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/jobs",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "jobs"
]
}
},
"response": []
},
{
- "name": "✔ get job candidate with administrator",
+ "name": "✔ get job with member",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_administrator}}"
+ "value": "Bearer {{token_member_tester1234}}"
}
],
"url": {
- "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_by_administrator}}",
+ "raw": "{{URL}}/jobs/{{job_id_created_by_member}}",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates",
- "{{job_candidate_id_created_by_administrator}}"
+ "jobs",
+ "{{job_id_created_by_member}}"
]
}
},
"response": []
},
{
- "name": "✔ search job candidates with administrator",
+ "name": "✔ search jobs with member filtering by \"projectId\"",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_administrator}}"
+ "value": "Bearer {{token_member_tester1234}}"
}
],
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/jobs?projectId={{project_id_16718}}",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "jobs"
],
"query": [
{
"key": "page",
- "value": "1",
+ "value": "0",
"disabled": true
},
{
"key": "perPage",
- "value": "1",
+ "value": "3",
"disabled": true
},
{
@@ -7745,18 +11812,52 @@
"disabled": true
},
{
- "key": "jobId",
- "value": "46225f4c-c2a3-4603-a141-0277e96fabfa",
+ "key": "projectId",
+ "value": "{{project_id_16718}}"
+ },
+ {
+ "key": "externalId",
+ "value": "1212",
"disabled": true
},
{
- "key": "userId",
- "value": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
+ "key": "description",
+ "value": "Dummy",
+ "disabled": true
+ },
+ {
+ "key": "startDate",
+ "value": "2020-09-27T04:17:23.131Z",
+ "disabled": true
+ },
+ {
+ "key": "resourceType",
+ "value": "Dummy Resource Type",
+ "disabled": true
+ },
+ {
+ "key": "skill",
+ "value": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
+ "disabled": true
+ },
+ {
+ "key": "rateType",
+ "value": "hourly",
"disabled": true
},
{
"key": "status",
- "value": "shortlist",
+ "value": "sourcing",
+ "disabled": true
+ },
+ {
+ "key": "workload",
+ "value": "full-time",
+ "disabled": true
+ },
+ {
+ "key": "title",
+ "value": "dummy",
"disabled": true
}
]
@@ -7765,19 +11866,19 @@
"response": []
},
{
- "name": "✔ put job candidate with administrator",
+ "name": "✔ put job with member",
"request": {
"method": "PUT",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_administrator}}"
+ "value": "Bearer {{token_member_tester1234}}"
}
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{job_id_created_by_administrator}}\",\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"status\": \"selected\"\r\n}",
+ "raw": "{\n \"projectId\": {{project_id_16718}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"fractional\",\n \"skills\": [\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"status\": \"sourcing\",\n \"title\": \"Dummy title - at most 64 characters\"\n}",
"options": {
"raw": {
"language": "json"
@@ -7785,32 +11886,32 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_by_administrator}}",
+ "raw": "{{URL}}/jobs/{{job_id_created_by_member}}",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates",
- "{{job_candidate_id_created_by_administrator}}"
+ "jobs",
+ "{{job_id_created_by_member}}"
]
}
},
"response": []
},
{
- "name": "✔ patch job candidate with administrator",
+ "name": "✔ patch job with member",
"request": {
"method": "PATCH",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_administrator}}"
+ "value": "Bearer {{token_member_tester1234}}"
}
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"status\": \"shortlist\"\r\n}",
+ "raw": "{\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"fractional\",\n \"skills\": [\n \"cbac57a3-7180-4316-8769-73af64893158\"\n ],\n \"status\": \"sourcing\",\n \"title\": \"Dummy title - at most 64 characters\"\n}",
"options": {
"raw": {
"language": "json"
@@ -7818,27 +11919,27 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_by_administrator}}",
+ "raw": "{{URL}}/jobs/{{job_id_created_by_member}}",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates",
- "{{job_candidate_id_created_by_administrator}}"
+ "jobs",
+ "{{job_id_created_by_member}}"
]
}
},
"response": []
},
{
- "name": "✔ delete job candidate with administrator",
+ "name": "✘ delete job with member",
"request": {
"method": "DELETE",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_administrator}}"
+ "value": "Bearer {{token_member_tester1234}}"
}
],
"body": {
@@ -7851,32 +11952,81 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_by_administrator}}",
+ "raw": "{{URL}}/jobs/{{job_id_created_by_member}}",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates",
- "{{job_candidate_id_created_by_administrator}}"
+ "jobs",
+ "{{job_id_created_by_member}}"
]
}
- },
- "response": []
- }
- ]
- },
- {
- "name": "Resource Bookings",
- "item": [
+ },
+ "response": []
+ }
+ ]
+ },
+ {
+ "name": "Job Candidates",
+ "item": [
+ {
+ "name": "Before Test",
+ "item": [
+ {
+ "name": "create job candidate",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "var data = JSON.parse(responseBody);\r",
+ "postman.setEnvironmentVariable(\"job_candidate_id_created_for_member\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobCandidates",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+ },
{
- "name": "✔ create resource booking with administrator",
+ "name": "✘ create job candidate with member",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var data = JSON.parse(responseBody);\r",
- "postman.setEnvironmentVariable(\"resource_bookings_id_created_by_administrator\",data.id);"
+ "postman.setEnvironmentVariable(\"job_candidate_id_created_by_member\",data.id);"
],
"type": "text/javascript"
}
@@ -7888,12 +12038,12 @@
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_administrator}}"
+ "value": "Bearer {{token_member_tester1234}}"
}
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{job_id_created_by_administrator}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
+ "raw": "{\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -7901,59 +12051,59 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings",
+ "raw": "{{URL}}/jobCandidates",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings"
+ "jobCandidates"
]
}
},
"response": []
},
{
- "name": "✔ get resource booking with administrator",
+ "name": "✔ get job candidate with member",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_administrator}}"
+ "value": "Bearer {{token_member_tester1234}}"
}
],
"url": {
- "raw": "{{URL}}/resourceBookings/{{resource_bookings_id_created_by_administrator}}",
+ "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_for_member}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings",
- "{{resource_bookings_id_created_by_administrator}}"
+ "jobCandidates",
+ "{{job_candidate_id_created_for_member}}"
]
}
},
"response": []
},
{
- "name": "✔ search resource bookings with administrator",
+ "name": "✔ search job candidates with member filtering by \"jobId\"",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_administrator}}"
+ "value": "Bearer {{token_member_tester1234}}"
}
],
"url": {
- "raw": "{{URL}}/resourceBookings",
+ "raw": "{{URL}}/jobCandidates?jobId={{job_id_created_by_member}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings"
+ "jobCandidates"
],
"query": [
{
@@ -7963,7 +12113,7 @@
},
{
"key": "perPage",
- "value": "5",
+ "value": "1",
"disabled": true
},
{
@@ -7973,32 +12123,21 @@
},
{
"key": "sortOrder",
- "value": "desc",
- "disabled": true
- },
- {
- "key": "startDate",
- "value": "2020-09-27T04:17:23.131Z",
+ "value": "asc",
"disabled": true
},
{
- "key": "endDate",
- "value": "2020-09-27T04:17:23.131Z",
- "disabled": true
+ "key": "jobId",
+ "value": "{{job_id_created_by_member}}"
},
{
- "key": "rateType",
- "value": "hourly",
+ "key": "userId",
+ "value": "fe38eed1-af73-41fd-85a2-ac4da1ff09a3",
"disabled": true
},
{
"key": "status",
- "value": "sourcing",
- "disabled": true
- },
- {
- "key": "projectIds",
- "value": "111, 16705",
+ "value": "shortlist",
"disabled": true
}
]
@@ -8007,19 +12146,19 @@
"response": []
},
{
- "name": "✔ put resource booking with administrator",
+ "name": "✔ put job candidate with member",
"request": {
"method": "PUT",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_administrator}}"
+ "value": "Bearer {{token_member_tester1234}}"
}
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{job_id_created_by_administrator}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\"\r\n}",
+ "raw": "{\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"status\": \"selected\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -8027,32 +12166,32 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings/{{resource_bookings_id_created_by_administrator}}",
+ "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_for_member}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings",
- "{{resource_bookings_id_created_by_administrator}}"
+ "jobCandidates",
+ "{{job_candidate_id_created_for_member}}"
]
}
},
"response": []
},
{
- "name": "✔ patch resource booking with administrator",
+ "name": "✔ patch job candidate with member",
"request": {
"method": "PATCH",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_administrator}}"
+ "value": "Bearer {{token_member_tester1234}}"
}
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
+ "raw": "{\r\n \"status\": \"shortlist\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -8060,27 +12199,27 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings/{{resource_bookings_id_created_by_administrator}}",
+ "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_for_member}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings",
- "{{resource_bookings_id_created_by_administrator}}"
+ "jobCandidates",
+ "{{job_candidate_id_created_for_member}}"
]
}
},
"response": []
},
{
- "name": "✔ delete resource booking with administrator",
+ "name": "✘ delete job candidate with member",
"request": {
"method": "DELETE",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_administrator}}"
+ "value": "Bearer {{token_member_tester1234}}"
}
],
"body": {
@@ -8093,53 +12232,81 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings/{{resource_bookings_id_created_by_administrator}}",
+ "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_for_member}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings",
- "{{resource_bookings_id_created_by_administrator}}"
+ "jobCandidates",
+ "{{job_candidate_id_created_for_member}}"
]
}
},
"response": []
}
]
- }
- ]
- },
- {
- "name": "Request with Topcoder User Role",
- "item": [
+ },
{
- "name": "README",
+ "name": "Resource Bookings",
"item": [
{
- "name": "[STUB] all operations cause 403 error if user is not member of project",
- "request": {
- "method": "LOCK",
- "header": [],
- "url": {
- "raw": ""
+ "name": "Before Test",
+ "item": [
+ {
+ "name": "create resource booking",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "var data = JSON.parse(responseBody);\r",
+ "postman.setEnvironmentVariable(\"resource_booking_id_created_for_member\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"projectId\": {{project_id_16718}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/resourceBookings",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "resourceBookings"
+ ]
+ }
+ },
+ "response": []
}
- },
- "response": []
- }
- ]
- },
- {
- "name": "Jobs",
- "item": [
+ ]
+ },
{
- "name": "✔ create job with member",
+ "name": "✘ create resource booking with member",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var data = JSON.parse(responseBody);\r",
- "postman.setEnvironmentVariable(\"job_id_created_by_member\",data.id);"
+ "postman.setEnvironmentVariable(\"resource_booking_id_created_by_member\",data.id);"
],
"type": "text/javascript"
}
@@ -8150,13 +12317,13 @@
"header": [
{
"key": "Authorization",
- "value": "Bearer {{token_member_tester1234}}",
- "type": "text"
+ "type": "text",
+ "value": "Bearer {{token_member_tester1234}}"
}
],
"body": {
"mode": "raw",
- "raw": "{\n \"projectId\": {{project_id_16718}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "raw": "{\r\n \"projectId\": {{project_id_16718}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -8164,19 +12331,19 @@
}
},
"url": {
- "raw": "{{URL}}/jobs",
+ "raw": "{{URL}}/resourceBookings",
"host": [
"{{URL}}"
],
"path": [
- "jobs"
+ "resourceBookings"
]
}
},
"response": []
},
{
- "name": "✔ get job with member",
+ "name": "✔ get resource booking with member",
"request": {
"method": "GET",
"header": [
@@ -8187,20 +12354,20 @@
}
],
"url": {
- "raw": "{{URL}}/jobs/{{job_id_created_by_member}}",
+ "raw": "{{URL}}/resourceBookings/{{resource_booking_id_created_for_member}}",
"host": [
"{{URL}}"
],
"path": [
- "jobs",
- "{{job_id_created_by_member}}"
+ "resourceBookings",
+ "{{resource_booking_id_created_for_member}}"
]
}
},
"response": []
},
{
- "name": "✔ search jobs with member filtering by \"projectId\"",
+ "name": "✔ search resource bookings with member filtering by \"projectId\"",
"request": {
"method": "GET",
"header": [
@@ -8211,22 +12378,22 @@
}
],
"url": {
- "raw": "{{URL}}/jobs?projectId={{project_id_16718}}",
+ "raw": "{{URL}}/resourceBookings?projectId={{project_id_16718}}",
"host": [
"{{URL}}"
],
"path": [
- "jobs"
+ "resourceBookings"
],
"query": [
{
"key": "page",
- "value": "0",
+ "value": "1",
"disabled": true
},
{
"key": "perPage",
- "value": "3",
+ "value": "5",
"disabled": true
},
{
@@ -8236,21 +12403,7 @@
},
{
"key": "sortOrder",
- "value": "asc",
- "disabled": true
- },
- {
- "key": "projectId",
- "value": "{{project_id_16718}}"
- },
- {
- "key": "externalId",
- "value": "1212",
- "disabled": true
- },
- {
- "key": "description",
- "value": "Dummy",
+ "value": "desc",
"disabled": true
},
{
@@ -8259,13 +12412,8 @@
"disabled": true
},
{
- "key": "resourceType",
- "value": "Dummy Resource Type",
- "disabled": true
- },
- {
- "key": "skill",
- "value": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
+ "key": "endDate",
+ "value": "2020-09-27T04:17:23.131Z",
"disabled": true
},
{
@@ -8279,14 +12427,13 @@
"disabled": true
},
{
- "key": "workload",
- "value": "full-time",
+ "key": "projectIds",
+ "value": "111, 16705",
"disabled": true
},
{
- "key": "title",
- "value": "dummy",
- "disabled": true
+ "key": "projectId",
+ "value": "{{project_id_16718}}"
}
]
}
@@ -8294,7 +12441,7 @@
"response": []
},
{
- "name": "✔ put job with member",
+ "name": "✘ put resource booking with member",
"request": {
"method": "PUT",
"header": [
@@ -8306,7 +12453,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\n \"projectId\": {{project_id_16718}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"fractional\",\n \"skills\": [\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"status\": \"sourcing\",\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "raw": "{\r\n \"projectId\": {{project_id_16718}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -8314,20 +12461,20 @@
}
},
"url": {
- "raw": "{{URL}}/jobs/{{job_id_created_by_member}}",
+ "raw": "{{URL}}/resourceBookings/{{resource_booking_id_created_for_member}}",
"host": [
"{{URL}}"
],
"path": [
- "jobs",
- "{{job_id_created_by_member}}"
+ "resourceBookings",
+ "{{resource_booking_id_created_for_member}}"
]
}
},
"response": []
},
{
- "name": "✔ patch job with member",
+ "name": "✘ patch resource booking with member",
"request": {
"method": "PATCH",
"header": [
@@ -8339,7 +12486,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"fractional\",\n \"skills\": [\n \"cbac57a3-7180-4316-8769-73af64893158\"\n ],\n \"status\": \"sourcing\",\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -8347,20 +12494,20 @@
}
},
"url": {
- "raw": "{{URL}}/jobs/{{job_id_created_by_member}}",
+ "raw": "{{URL}}/resourceBookings/{{resource_booking_id_created_for_member}}",
"host": [
"{{URL}}"
],
- "path": [
- "jobs",
- "{{job_id_created_by_member}}"
+ "path": [
+ "resourceBookings",
+ "{{resource_booking_id_created_for_member}}"
]
}
},
"response": []
},
{
- "name": "✘ delete job with member",
+ "name": "✘ delete resource booking with member",
"request": {
"method": "DELETE",
"header": [
@@ -8380,13 +12527,13 @@
}
},
"url": {
- "raw": "{{URL}}/jobs/{{job_id_created_by_member}}",
+ "raw": "{{URL}}/resourceBookings/{{resource_booking_id_created_for_member}}",
"host": [
"{{URL}}"
],
"path": [
- "jobs",
- "{{job_id_created_by_member}}"
+ "resourceBookings",
+ "{{resource_booking_id_created_for_member}}"
]
}
},
@@ -8395,20 +12542,74 @@
]
},
{
- "name": "Job Candidates",
+ "name": "Work Periods",
"item": [
{
"name": "Before Test",
"item": [
{
- "name": "create job candidate",
+ "name": "create job",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "var data = JSON.parse(responseBody);\r",
- "postman.setEnvironmentVariable(\"job_candidate_id_created_for_member\",data.id);"
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ " if(pm.response.status === \"OK\"){\r",
+ " const response = pm.response.json()\r",
+ " pm.environment.set(\"job_id_created_by_member\", response.id);\r",
+ " }\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{token_member_tester1234}}",
+ "type": "text"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"projectId\": {{project_id_16718}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobs",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobs"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "create resource booking",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ " if(pm.response.status === \"OK\"){\r",
+ " const response = pm.response.json()\r",
+ " pm.environment.set(\"resource_booking_id_created_for_member\", response.id);\r",
+ " }\r",
+ "});"
],
"type": "text/javascript"
}
@@ -8425,7 +12626,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\"\r\n}",
+ "raw": "{\r\n \"projectId\": {{project_id_16718}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -8433,12 +12634,61 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/resourceBookings",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "resourceBookings"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "create work period",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ " if(pm.response.status === \"OK\"){\r",
+ " const response = pm.response.json()\r",
+ " pm.environment.set(\"workPeriodId_created_for_member\", response.id);\r",
+ " }\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resource_booking_id_created_for_member}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods"
]
}
},
@@ -8447,14 +12697,17 @@
]
},
{
- "name": "✘ create job candidate with member",
+ "name": "✘ create work period with member",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "var data = JSON.parse(responseBody);\r",
- "postman.setEnvironmentVariable(\"job_candidate_id_created_by_member\",data.id);"
+ "pm.test('Status code is 403', function () {\r",
+ " pm.response.to.have.status(403);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r",
+ "});"
],
"type": "text/javascript"
}
@@ -8471,7 +12724,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\"\r\n}",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resource_booking_id_created_for_member}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -8479,19 +12732,19 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "✔ get job candidate with member",
+ "name": "✔ get work period with member",
"request": {
"method": "GET",
"header": [
@@ -8502,20 +12755,20 @@
}
],
"url": {
- "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_for_member}}",
+ "raw": "{{URL}}/workPeriods/{{workPeriodId_created_for_member}}",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates",
- "{{job_candidate_id_created_for_member}}"
+ "workPeriods",
+ "{{workPeriodId_created_for_member}}"
]
}
},
"response": []
},
{
- "name": "✔ search job candidates with member filtering by \"jobId\"",
+ "name": "✔ search work periods with member",
"request": {
"method": "GET",
"header": [
@@ -8526,12 +12779,12 @@
}
],
"url": {
- "raw": "{{URL}}/jobCandidates?jobId={{job_id_created_by_member}}",
+ "raw": "{{URL}}/workPeriods?projectId=16718",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "workPeriods"
],
"query": [
{
@@ -8541,7 +12794,7 @@
},
{
"key": "perPage",
- "value": "1",
+ "value": "5",
"disabled": true
},
{
@@ -8551,22 +12804,42 @@
},
{
"key": "sortOrder",
- "value": "asc",
+ "value": "desc",
"disabled": true
},
{
- "key": "jobId",
- "value": "{{job_id_created_by_member}}"
+ "key": "resourceBookingId",
+ "value": "{{resource_booking_id_created_for_member}}",
+ "disabled": true
},
{
- "key": "userId",
- "value": "fe38eed1-af73-41fd-85a2-ac4da1ff09a3",
+ "key": "resourceBookingIds",
+ "value": "{{resource_booking_id_created_for_member}},{{resource_booking_id_created_for_member}}",
"disabled": true
},
{
- "key": "status",
- "value": "shortlist",
+ "key": "paymentStatus",
+ "value": "pending",
+ "disabled": true
+ },
+ {
+ "key": "startDate",
+ "value": "2021-03-07",
+ "disabled": true
+ },
+ {
+ "key": "endDate",
+ "value": "2021-03-13",
"disabled": true
+ },
+ {
+ "key": "userHandle",
+ "value": "pshah_manager",
+ "disabled": true
+ },
+ {
+ "key": "projectId",
+ "value": "16718"
}
]
}
@@ -8574,7 +12847,22 @@
"response": []
},
{
- "name": "✔ put job candidate with member",
+ "name": "✘ put work period with member",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 403', function () {\r",
+ " pm.response.to.have.status(403);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
"method": "PUT",
"header": [
@@ -8586,7 +12874,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"status\": \"selected\"\r\n}",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resource_booking_id_created_for_member}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -8594,20 +12882,35 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_for_member}}",
+ "raw": "{{URL}}/workPeriods/{{workPeriodId_created_for_member}}",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates",
- "{{job_candidate_id_created_for_member}}"
+ "workPeriods",
+ "{{workPeriodId_created_for_member}}"
]
}
},
"response": []
},
{
- "name": "✔ patch job candidate with member",
+ "name": "✘ patch work period with member",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 403', function () {\r",
+ " pm.response.to.have.status(403);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
"method": "PATCH",
"header": [
@@ -8619,7 +12922,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"status\": \"shortlist\"\r\n}",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resource_booking_id_created_for_member}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -8627,20 +12930,35 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_for_member}}",
+ "raw": "{{URL}}/workPeriods/{{workPeriodId_created_for_member}}",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates",
- "{{job_candidate_id_created_for_member}}"
+ "workPeriods",
+ "{{workPeriodId_created_for_member}}"
]
}
},
"response": []
},
{
- "name": "✘ delete job candidate with member",
+ "name": "✘ delete work period with member",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 403', function () {\r",
+ " pm.response.to.have.status(403);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
"method": "DELETE",
"header": [
@@ -8660,81 +12978,53 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_for_member}}",
+ "raw": "{{URL}}/workPeriods/{{workPeriodId_created_for_member}}",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates",
- "{{job_candidate_id_created_for_member}}"
+ "workPeriods",
+ "{{workPeriodId_created_for_member}}"
]
}
},
"response": []
}
]
- },
+ }
+ ]
+ },
+ {
+ "name": "Request with Connect Manager Role",
+ "item": [
{
- "name": "Resource Bookings",
+ "name": "README",
"item": [
{
- "name": "Before Test",
- "item": [
- {
- "name": "create resource booking",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "var data = JSON.parse(responseBody);\r",
- "postman.setEnvironmentVariable(\"resource_booking_id_created_for_member\",data.id);"
- ],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "POST",
- "header": [
- {
- "key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_administrator}}"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"projectId\": {{project_id_16718}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{URL}}/resourceBookings",
- "host": [
- "{{URL}}"
- ],
- "path": [
- "resourceBookings"
- ]
- }
- },
- "response": []
+ "name": "[STUB] all operations except get/search cause 403 error if manager is not member of project",
+ "request": {
+ "method": "LOCK",
+ "header": [],
+ "url": {
+ "raw": ""
}
- ]
- },
+ },
+ "response": []
+ }
+ ]
+ },
+ {
+ "name": "Jobs",
+ "item": [
{
- "name": "✘ create resource booking with member",
+ "name": "✔ create job with connect manager",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var data = JSON.parse(responseBody);\r",
- "postman.setEnvironmentVariable(\"resource_booking_id_created_by_member\",data.id);"
+ "postman.setEnvironmentVariable(\"job_id_created_by_connect_manager\",data.id);"
],
"type": "text/javascript"
}
@@ -8745,13 +13035,13 @@
"header": [
{
"key": "Authorization",
- "type": "text",
- "value": "Bearer {{token_member_tester1234}}"
+ "value": "Bearer {{token_connect_manager_pshahcopmanag2}}",
+ "type": "text"
}
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"projectId\": {{project_id_16718}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
+ "raw": "{\n \"projectId\": {{project_id_16843}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
"options": {
"raw": {
"language": "json"
@@ -8759,69 +13049,69 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings",
+ "raw": "{{URL}}/jobs",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings"
+ "jobs"
]
}
},
"response": []
},
{
- "name": "✔ get resource booking with member",
+ "name": "✔ get job with connect manager",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_member_tester1234}}"
+ "value": "Bearer {{token_connect_manager_pshahcopmanag2}}"
}
],
"url": {
- "raw": "{{URL}}/resourceBookings/{{resource_booking_id_created_for_member}}",
+ "raw": "{{URL}}/jobs/{{job_id_created_by_connect_manager}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings",
- "{{resource_booking_id_created_for_member}}"
+ "jobs",
+ "{{job_id_created_by_connect_manager}}"
]
}
},
"response": []
},
{
- "name": "✔ search resource bookings with member filtering by \"projectId\"",
+ "name": "✔ search jobs with connect manager",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_member_tester1234}}"
+ "value": "Bearer {{token_connect_manager_pshahcopmanag2}}"
}
],
"url": {
- "raw": "{{URL}}/resourceBookings?projectId={{project_id_16718}}",
+ "raw": "{{URL}}/jobs",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings"
+ "jobs"
],
"query": [
{
"key": "page",
- "value": "1",
+ "value": "0",
"disabled": true
},
{
"key": "perPage",
- "value": "5",
+ "value": "3",
"disabled": true
},
{
@@ -8831,7 +13121,22 @@
},
{
"key": "sortOrder",
- "value": "desc",
+ "value": "asc",
+ "disabled": true
+ },
+ {
+ "key": "projectId",
+ "value": "21",
+ "disabled": true
+ },
+ {
+ "key": "externalId",
+ "value": "1212",
+ "disabled": true
+ },
+ {
+ "key": "description",
+ "value": "Dummy",
"disabled": true
},
{
@@ -8840,8 +13145,13 @@
"disabled": true
},
{
- "key": "endDate",
- "value": "2020-09-27T04:17:23.131Z",
+ "key": "resourceType",
+ "value": "Dummy Resource Type",
+ "disabled": true
+ },
+ {
+ "key": "skill",
+ "value": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"disabled": true
},
{
@@ -8855,13 +13165,14 @@
"disabled": true
},
{
- "key": "projectIds",
- "value": "111, 16705",
+ "key": "workload",
+ "value": "full-time",
"disabled": true
},
{
- "key": "projectId",
- "value": "{{project_id_16718}}"
+ "key": "title",
+ "value": "dummy",
+ "disabled": true
}
]
}
@@ -8869,19 +13180,19 @@
"response": []
},
{
- "name": "✘ put resource booking with member",
+ "name": "✔ put job with connect manager",
"request": {
"method": "PUT",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_member_tester1234}}"
+ "value": "Bearer {{token_connect_manager_pshahcopmanag2}}"
}
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"projectId\": {{project_id_16718}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\"\r\n}",
+ "raw": "{\n \"projectId\": {{project_id_16843}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"fractional\",\n \"skills\": [\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"status\": \"sourcing\",\n \"title\": \"Dummy title - at most 64 characters\"\n}",
"options": {
"raw": {
"language": "json"
@@ -8889,32 +13200,32 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings/{{resource_booking_id_created_for_member}}",
+ "raw": "{{URL}}/jobs/{{job_id_created_by_connect_manager}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings",
- "{{resource_booking_id_created_for_member}}"
+ "jobs",
+ "{{job_id_created_by_connect_manager}}"
]
}
},
"response": []
},
{
- "name": "✘ patch resource booking with member",
+ "name": "✔ patch job with connect manager",
"request": {
"method": "PATCH",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_member_tester1234}}"
+ "value": "Bearer {{token_connect_manager_pshahcopmanag2}}"
}
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
+ "raw": "{\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"fractional\",\n \"skills\": [\n \"cbac57a3-7180-4316-8769-73af64893158\"\n ],\n \"status\": \"sourcing\",\n \"title\": \"Dummy title - at most 64 characters\"\n}",
"options": {
"raw": {
"language": "json"
@@ -8922,27 +13233,27 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings/{{resource_booking_id_created_for_member}}",
+ "raw": "{{URL}}/jobs/{{job_id_created_by_connect_manager}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings",
- "{{resource_booking_id_created_for_member}}"
+ "jobs",
+ "{{job_id_created_by_connect_manager}}"
]
}
},
"response": []
},
{
- "name": "✘ delete resource booking with member",
+ "name": "✘ delete job with connect manager",
"request": {
"method": "DELETE",
"header": [
{
"key": "Authorization",
"type": "text",
- "value": "Bearer {{token_member_tester1234}}"
+ "value": "Bearer {{token_connect_manager_pshahcopmanag2}}"
}
],
"body": {
@@ -8955,53 +13266,81 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings/{{resource_booking_id_created_for_member}}",
+ "raw": "{{URL}}/jobs/{{job_id_created_by_connect_manager}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings",
- "{{resource_booking_id_created_for_member}}"
+ "jobs",
+ "{{job_id_created_by_connect_manager}}"
]
}
},
"response": []
}
]
- }
- ]
- },
- {
- "name": "Request with Connect Manager Role",
- "item": [
+ },
{
- "name": "README",
+ "name": "Job Candidates",
"item": [
{
- "name": "[STUB] all operations except get/search cause 403 error if manager is not member of project",
- "request": {
- "method": "LOCK",
- "header": [],
- "url": {
- "raw": ""
+ "name": "Before Test",
+ "item": [
+ {
+ "name": "create job candidate",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "var data = JSON.parse(responseBody);\r",
+ "postman.setEnvironmentVariable(\"job_candidate_id_created_for_connect_manager\",data.id);"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobCandidates",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobCandidates"
+ ]
+ }
+ },
+ "response": []
}
- },
- "response": []
- }
- ]
- },
- {
- "name": "Jobs",
- "item": [
+ ]
+ },
{
- "name": "✔ create job with connect manager",
+ "name": "✘ create job candidate with connect manager",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var data = JSON.parse(responseBody);\r",
- "postman.setEnvironmentVariable(\"job_id_created_by_connect_manager\",data.id);"
+ "postman.setEnvironmentVariable(\"job_candidate_id_created_by_connect_manager\",data.id);"
],
"type": "text/javascript"
}
@@ -9012,13 +13351,13 @@
"header": [
{
"key": "Authorization",
- "value": "Bearer {{token_connect_manager_pshahcopmanag2}}",
- "type": "text"
+ "type": "text",
+ "value": "Bearer {{token_connect_manager_pshahcopmanag2}}"
}
],
"body": {
"mode": "raw",
- "raw": "{\n \"projectId\": {{project_id_16843}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "raw": "{\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -9026,19 +13365,19 @@
}
},
"url": {
- "raw": "{{URL}}/jobs",
+ "raw": "{{URL}}/jobCandidates",
"host": [
"{{URL}}"
],
"path": [
- "jobs"
+ "jobCandidates"
]
}
},
"response": []
},
{
- "name": "✔ get job with connect manager",
+ "name": "✔ get job candidate with connect manager",
"request": {
"method": "GET",
"header": [
@@ -9049,20 +13388,20 @@
}
],
"url": {
- "raw": "{{URL}}/jobs/{{job_id_created_by_connect_manager}}",
+ "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_for_connect_manager}}",
"host": [
"{{URL}}"
],
"path": [
- "jobs",
- "{{job_id_created_by_connect_manager}}"
+ "jobCandidates",
+ "{{job_candidate_id_created_for_connect_manager}}"
]
}
},
"response": []
},
{
- "name": "✔ search jobs with connect manager",
+ "name": "✔ search job candidates with connect manager",
"request": {
"method": "GET",
"header": [
@@ -9073,22 +13412,22 @@
}
],
"url": {
- "raw": "{{URL}}/jobs",
+ "raw": "{{URL}}/jobCandidates",
"host": [
"{{URL}}"
],
"path": [
- "jobs"
+ "jobCandidates"
],
"query": [
{
"key": "page",
- "value": "0",
+ "value": "1",
"disabled": true
},
{
"key": "perPage",
- "value": "3",
+ "value": "1",
"disabled": true
},
{
@@ -9102,53 +13441,18 @@
"disabled": true
},
{
- "key": "projectId",
- "value": "21",
- "disabled": true
- },
- {
- "key": "externalId",
- "value": "1212",
- "disabled": true
- },
- {
- "key": "description",
- "value": "Dummy",
- "disabled": true
- },
- {
- "key": "startDate",
- "value": "2020-09-27T04:17:23.131Z",
- "disabled": true
- },
- {
- "key": "resourceType",
- "value": "Dummy Resource Type",
- "disabled": true
- },
- {
- "key": "skill",
- "value": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
+ "key": "jobId",
+ "value": "46225f4c-c2a3-4603-a141-0277e96fabfa",
"disabled": true
},
{
- "key": "rateType",
- "value": "hourly",
+ "key": "userId",
+ "value": "fe38eed1-af73-41fd-85a2-ac4da1ff09a3",
"disabled": true
},
{
"key": "status",
- "value": "sourcing",
- "disabled": true
- },
- {
- "key": "workload",
- "value": "full-time",
- "disabled": true
- },
- {
- "key": "title",
- "value": "dummy",
+ "value": "shortlist",
"disabled": true
}
]
@@ -9157,7 +13461,7 @@
"response": []
},
{
- "name": "✔ put job with connect manager",
+ "name": "✔ put job candidate with connect manager",
"request": {
"method": "PUT",
"header": [
@@ -9169,7 +13473,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\n \"projectId\": {{project_id_16843}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"fractional\",\n \"skills\": [\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"status\": \"sourcing\",\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "raw": "{\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"status\": \"selected\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -9177,20 +13481,20 @@
}
},
"url": {
- "raw": "{{URL}}/jobs/{{job_id_created_by_connect_manager}}",
+ "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_for_connect_manager}}",
"host": [
"{{URL}}"
],
"path": [
- "jobs",
- "{{job_id_created_by_connect_manager}}"
+ "jobCandidates",
+ "{{job_candidate_id_created_for_connect_manager}}"
]
}
},
"response": []
},
{
- "name": "✔ patch job with connect manager",
+ "name": "✔ patch job candidate with connect manager",
"request": {
"method": "PATCH",
"header": [
@@ -9202,7 +13506,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"fractional\",\n \"skills\": [\n \"cbac57a3-7180-4316-8769-73af64893158\"\n ],\n \"status\": \"sourcing\",\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "raw": "{\r\n \"status\": \"shortlist\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -9210,20 +13514,20 @@
}
},
"url": {
- "raw": "{{URL}}/jobs/{{job_id_created_by_connect_manager}}",
+ "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_for_connect_manager}}",
"host": [
"{{URL}}"
],
"path": [
- "jobs",
- "{{job_id_created_by_connect_manager}}"
+ "jobCandidates",
+ "{{job_candidate_id_created_for_connect_manager}}"
]
}
},
"response": []
},
{
- "name": "✘ delete job with connect manager",
+ "name": "✘ delete job candidate with connect manager",
"request": {
"method": "DELETE",
"header": [
@@ -9243,13 +13547,13 @@
}
},
"url": {
- "raw": "{{URL}}/jobs/{{job_id_created_by_connect_manager}}",
+ "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_for_connect_manager}}",
"host": [
"{{URL}}"
],
"path": [
- "jobs",
- "{{job_id_created_by_connect_manager}}"
+ "jobCandidates",
+ "{{job_candidate_id_created_for_connect_manager}}"
]
}
},
@@ -9258,20 +13562,20 @@
]
},
{
- "name": "Job Candidates",
+ "name": "Resource Bookings",
"item": [
{
"name": "Before Test",
"item": [
{
- "name": "create job candidate",
+ "name": "create resource booking",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var data = JSON.parse(responseBody);\r",
- "postman.setEnvironmentVariable(\"job_candidate_id_created_for_connect_manager\",data.id);"
+ "postman.setEnvironmentVariable(\"resource_booking_id_created_for_connect_manager\",data.id);"
],
"type": "text/javascript"
}
@@ -9288,7 +13592,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\"\r\n}",
+ "raw": "{\r\n \"projectId\": {{project_id_16843}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -9296,12 +13600,12 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/resourceBookings",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "resourceBookings"
]
}
},
@@ -9310,14 +13614,14 @@
]
},
{
- "name": "✘ create job candidate with connect manager",
+ "name": "✘ create resource booking with connect manager",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var data = JSON.parse(responseBody);\r",
- "postman.setEnvironmentVariable(\"job_candidate_id_created_by_connect_manager\",data.id);"
+ "postman.setEnvironmentVariable(\"resource_booking_id_created_by_connect_manager\",data.id);"
],
"type": "text/javascript"
}
@@ -9334,7 +13638,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\"\r\n}",
+ "raw": "{\r\n \"projectId\": {{project_id_16843}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -9342,19 +13646,19 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/resourceBookings",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "resourceBookings"
]
}
},
"response": []
},
{
- "name": "✔ get job candidate with connect manager",
+ "name": "✔ get resource booking with connect manager",
"request": {
"method": "GET",
"header": [
@@ -9365,20 +13669,20 @@
}
],
"url": {
- "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_for_connect_manager}}",
+ "raw": "{{URL}}/resourceBookings/{{resource_booking_id_created_for_connect_manager}}",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates",
- "{{job_candidate_id_created_for_connect_manager}}"
+ "resourceBookings",
+ "{{resource_booking_id_created_for_connect_manager}}"
]
}
},
"response": []
},
{
- "name": "✔ search job candidates with connect manager",
+ "name": "✔ search resource bookings with connect manager",
"request": {
"method": "GET",
"header": [
@@ -9389,12 +13693,12 @@
}
],
"url": {
- "raw": "{{URL}}/jobCandidates",
+ "raw": "{{URL}}/resourceBookings",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates"
+ "resourceBookings"
],
"query": [
{
@@ -9404,7 +13708,7 @@
},
{
"key": "perPage",
- "value": "1",
+ "value": "5",
"disabled": true
},
{
@@ -9414,22 +13718,32 @@
},
{
"key": "sortOrder",
- "value": "asc",
+ "value": "desc",
"disabled": true
},
{
- "key": "jobId",
- "value": "46225f4c-c2a3-4603-a141-0277e96fabfa",
+ "key": "startDate",
+ "value": "2020-09-27T04:17:23.131Z",
"disabled": true
},
{
- "key": "userId",
- "value": "fe38eed1-af73-41fd-85a2-ac4da1ff09a3",
+ "key": "endDate",
+ "value": "2020-09-27T04:17:23.131Z",
+ "disabled": true
+ },
+ {
+ "key": "rateType",
+ "value": "hourly",
"disabled": true
},
{
"key": "status",
- "value": "shortlist",
+ "value": "sourcing",
+ "disabled": true
+ },
+ {
+ "key": "projectIds",
+ "value": "111, 16705",
"disabled": true
}
]
@@ -9438,7 +13752,7 @@
"response": []
},
{
- "name": "✔ put job candidate with connect manager",
+ "name": "✘ put resource booking with connect manager",
"request": {
"method": "PUT",
"header": [
@@ -9450,7 +13764,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"status\": \"selected\"\r\n}",
+ "raw": "{\r\n \"projectId\": {{project_id_16843}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -9458,20 +13772,20 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_for_connect_manager}}",
+ "raw": "{{URL}}/resourceBookings/{{resource_booking_id_created_for_connect_manager}}",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates",
- "{{job_candidate_id_created_for_connect_manager}}"
+ "resourceBookings",
+ "{{resource_booking_id_created_for_connect_manager}}"
]
}
},
"response": []
},
{
- "name": "✔ patch job candidate with connect manager",
+ "name": "✘ patch resource booking with connect manager",
"request": {
"method": "PATCH",
"header": [
@@ -9483,7 +13797,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"status\": \"shortlist\"\r\n}",
+ "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -9491,20 +13805,20 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_for_connect_manager}}",
+ "raw": "{{URL}}/resourceBookings/{{resource_booking_id_created_for_connect_manager}}",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates",
- "{{job_candidate_id_created_for_connect_manager}}"
+ "resourceBookings",
+ "{{resource_booking_id_created_for_connect_manager}}"
]
}
},
"response": []
},
{
- "name": "✘ delete job candidate with connect manager",
+ "name": "✘ delete resource booking with connect manager",
"request": {
"method": "DELETE",
"header": [
@@ -9524,13 +13838,13 @@
}
},
"url": {
- "raw": "{{URL}}/jobCandidates/{{job_candidate_id_created_for_connect_manager}}",
+ "raw": "{{URL}}/resourceBookings/{{resource_booking_id_created_for_connect_manager}}",
"host": [
"{{URL}}"
],
"path": [
- "jobCandidates",
- "{{job_candidate_id_created_for_connect_manager}}"
+ "resourceBookings",
+ "{{resource_booking_id_created_for_connect_manager}}"
]
}
},
@@ -9539,11 +13853,60 @@
]
},
{
- "name": "Resource Bookings",
+ "name": "Work Periods",
"item": [
{
"name": "Before Test",
"item": [
+ {
+ "name": "create job",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ " if(pm.response.status === \"OK\"){\r",
+ " const response = pm.response.json()\r",
+ " pm.environment.set(\"job_id_created_by_connect_manager\", response.id);\r",
+ " }\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{token_administrator}}",
+ "type": "text"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"projectId\": {{project_id_16843}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/jobs",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "jobs"
+ ]
+ }
+ },
+ "response": []
+ },
{
"name": "create resource booking",
"event": [
@@ -9551,8 +13914,13 @@
"listen": "test",
"script": {
"exec": [
- "var data = JSON.parse(responseBody);\r",
- "postman.setEnvironmentVariable(\"resource_booking_id_created_for_connect_manager\",data.id);"
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ " if(pm.response.status === \"OK\"){\r",
+ " const response = pm.response.json()\r",
+ " pm.environment.set(\"resource_booking_id_created_for_connect_manager\", response.id);\r",
+ " }\r",
+ "});"
],
"type": "text/javascript"
}
@@ -9587,18 +13955,70 @@
}
},
"response": []
+ },
+ {
+ "name": "create work period",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 200', function () {\r",
+ " pm.response.to.have.status(200);\r",
+ " if(pm.response.status === \"OK\"){\r",
+ " const response = pm.response.json()\r",
+ " pm.environment.set(\"workPeriodId_created_for_connect_manager\", response.id);\r",
+ " }\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "Bearer {{token_administrator}}"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resource_booking_id_created_for_connect_manager}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "{{URL}}/workPeriods",
+ "host": [
+ "{{URL}}"
+ ],
+ "path": [
+ "workPeriods"
+ ]
+ }
+ },
+ "response": []
}
]
},
{
- "name": "✘ create resource booking with connect manager",
+ "name": "✘ create work period with connect manager",
"event": [
{
"listen": "test",
"script": {
"exec": [
- "var data = JSON.parse(responseBody);\r",
- "postman.setEnvironmentVariable(\"resource_booking_id_created_by_connect_manager\",data.id);"
+ "pm.test('Status code is 403', function () {\r",
+ " pm.response.to.have.status(403);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r",
+ "});"
],
"type": "text/javascript"
}
@@ -9615,7 +14035,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"projectId\": {{project_id_16843}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resource_booking_id_created_for_connect_manager}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -9623,19 +14043,19 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings",
+ "raw": "{{URL}}/workPeriods",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings"
+ "workPeriods"
]
}
},
"response": []
},
{
- "name": "✔ get resource booking with connect manager",
+ "name": "✔ get work period with connect manager",
"request": {
"method": "GET",
"header": [
@@ -9646,20 +14066,20 @@
}
],
"url": {
- "raw": "{{URL}}/resourceBookings/{{resource_booking_id_created_for_connect_manager}}",
+ "raw": "{{URL}}/workPeriods/{{workPeriodId_created_for_connect_manager}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings",
- "{{resource_booking_id_created_for_connect_manager}}"
+ "workPeriods",
+ "{{workPeriodId_created_for_connect_manager}}"
]
}
},
"response": []
},
{
- "name": "✔ search resource bookings with connect manager",
+ "name": "✔ search work periods with connect manager",
"request": {
"method": "GET",
"header": [
@@ -9670,12 +14090,12 @@
}
],
"url": {
- "raw": "{{URL}}/resourceBookings",
+ "raw": "{{URL}}/workPeriods?projectId=16843",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings"
+ "workPeriods"
],
"query": [
{
@@ -9699,29 +14119,38 @@
"disabled": true
},
{
- "key": "startDate",
- "value": "2020-09-27T04:17:23.131Z",
+ "key": "resourceBookingId",
+ "value": "{{resource_booking_id_created_for_connect_manager}}",
"disabled": true
},
{
- "key": "endDate",
- "value": "2020-09-27T04:17:23.131Z",
+ "key": "resourceBookingIds",
+ "value": "{{resource_booking_id_created_for_connect_manager}},{{resource_booking_id_created_for_connect_manager}}",
"disabled": true
},
{
- "key": "rateType",
- "value": "hourly",
+ "key": "paymentStatus",
+ "value": "pending",
"disabled": true
},
{
- "key": "status",
- "value": "sourcing",
+ "key": "startDate",
+ "value": "2021-03-07",
"disabled": true
},
{
- "key": "projectIds",
- "value": "111, 16705",
+ "key": "endDate",
+ "value": "2021-03-13",
+ "disabled": true
+ },
+ {
+ "key": "userHandle",
+ "value": "pshah_manager",
"disabled": true
+ },
+ {
+ "key": "projectId",
+ "value": "16843"
}
]
}
@@ -9729,7 +14158,22 @@
"response": []
},
{
- "name": "✘ put resource booking with connect manager",
+ "name": "✘ put work period with connect manager",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 403', function () {\r",
+ " pm.response.to.have.status(403);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
"method": "PUT",
"header": [
@@ -9741,7 +14185,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"projectId\": {{project_id_16843}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\"\r\n}",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resource_booking_id_created_for_connect_manager}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -9749,20 +14193,35 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings/{{resource_booking_id_created_for_connect_manager}}",
+ "raw": "{{URL}}/workPeriods/{{workPeriodId_created_for_connect_manager}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings",
- "{{resource_booking_id_created_for_connect_manager}}"
+ "workPeriods",
+ "{{workPeriodId_created_for_connect_manager}}"
]
}
},
"response": []
},
{
- "name": "✘ patch resource booking with connect manager",
+ "name": "✘ patch work period with connect manager",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 403', function () {\r",
+ " pm.response.to.have.status(403);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
"method": "PATCH",
"header": [
@@ -9774,7 +14233,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}",
+ "raw": "{\r\n \"resourceBookingId\": \"{{resource_booking_id_created_for_connect_manager}}\",\r\n \"startDate\": \"2021-03-07\",\r\n \"endDate\": \"2021-03-13\",\r\n \"daysWorked\": 2,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"pending\"\r\n}",
"options": {
"raw": {
"language": "json"
@@ -9782,20 +14241,35 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings/{{resource_booking_id_created_for_connect_manager}}",
+ "raw": "{{URL}}/workPeriods/{{workPeriodId_created_for_connect_manager}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings",
- "{{resource_booking_id_created_for_connect_manager}}"
+ "workPeriods",
+ "{{workPeriodId_created_for_connect_manager}}"
]
}
},
"response": []
},
{
- "name": "✘ delete resource booking with connect manager",
+ "name": "✘ delete work period with connect manager",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "pm.test('Status code is 403', function () {\r",
+ " pm.response.to.have.status(403);\r",
+ " const response = pm.response.json()\r",
+ " pm.expect(response.message).to.eq(\"You are not allowed to perform this action!\")\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
"request": {
"method": "DELETE",
"header": [
@@ -9815,13 +14289,13 @@
}
},
"url": {
- "raw": "{{URL}}/resourceBookings/{{resource_booking_id_created_for_connect_manager}}",
+ "raw": "{{URL}}/workPeriods/{{workPeriodId_created_for_connect_manager}}",
"host": [
"{{URL}}"
],
"path": [
- "resourceBookings",
- "{{resource_booking_id_created_for_connect_manager}}"
+ "workPeriods",
+ "{{workPeriodId_created_for_connect_manager}}"
]
}
},
@@ -9834,4 +14308,4 @@
]
}
]
-}
+}
\ No newline at end of file
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index fb38c7ef..bbd145ef 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -4,16 +4,17 @@ info:
description: Bookings microservice
version: 1.0.0
servers:
-- url: /api/{apiVersion}/
- variables:
- apiVersion:
- default: 'v5'
- description: The REST API version
+ - url: /api/{apiVersion}/
+ variables:
+ apiVersion:
+ default: "v5"
+ description: The REST API version
tags:
- name: Jobs
- name: JobCandidates
- name: ResourceBookings
- name: Teams
+ - name: WorkPeriods
paths:
/jobs:
post:
@@ -34,38 +35,38 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/JobRequestBody'
+ $ref: "#/components/schemas/JobRequestBody"
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
- $ref: '#/components/schemas/Job'
- '400':
+ $ref: "#/components/schemas/Job"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
get:
tags:
- Jobs
@@ -96,7 +97,7 @@ paths:
schema:
type: string
default: id
- enum: ['id','createdAt','startDate','rateType','status']
+ enum: ["id", "createdAt", "startDate", "rateType", "status"]
description: The sort by column.
- in: query
name: sortOrder
@@ -104,7 +105,7 @@ paths:
schema:
type: string
default: desc
- enum: ['desc','asc']
+ enum: ["desc", "asc"]
description: The sort order.
- in: query
name: projectId
@@ -161,32 +162,32 @@ paths:
required: false
schema:
type: string
- enum: ['full-time', 'fractional']
+ enum: ["full-time", "fractional"]
description: The rate type.
- in: query
name: rateType
required: false
schema:
type: string
- enum: ['hourly', 'daily', 'weekly', 'monthly']
+ enum: ["hourly", "daily", "weekly", "monthly"]
description: The rate type.
- in: query
name: status
required: false
schema:
type: string
- enum: ['sourcing', 'in-review', 'assigned', 'closed', 'cancelled']
+ enum: ["sourcing", "in-review", "assigned", "closed", "cancelled"]
description: The rate type.
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
type: array
items:
- $ref: '#/components/schemas/Job'
-
+ $ref: "#/components/schemas/Job"
+
headers:
X-Next-Page:
schema:
@@ -216,41 +217,41 @@ paths:
schema:
type: string
description: Pagination link header.
- '400':
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
/jobs/{id}:
get:
- tags:
+ tags:
- Jobs
description: |
Get job information by id.
-
+
**Authorization** All topcoder members are allowed
security:
- bearerAuth: []
- parameters:
+ parameters:
- in: path
name: id
description: The job id.
@@ -264,50 +265,50 @@ paths:
schema:
type: boolean
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
- $ref: '#/components/schemas/Job'
- '400':
+ $ref: "#/components/schemas/Job"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
delete:
- tags:
+ tags:
- Jobs
- description: |
+ description: |
Delete the job.
**Authorization** Every topcoder member can delete the job he/she created. bookingmanager can delete all jobs.
- security:
+ security:
- bearerAuth: []
parameters:
- in: path
@@ -318,40 +319,40 @@ paths:
type: string
format: uuid
responses:
- '204':
+ "204":
description: OK
- '400':
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
put:
- tags:
+ tags:
- Jobs
description: |
Update the job.
@@ -376,47 +377,47 @@ paths:
application/json:
schema:
allOf:
- - $ref: '#/components/schemas/JobRequestBody'
- - $ref: '#/components/schemas/JobPatchRequestBody'
+ - $ref: "#/components/schemas/JobRequestBody"
+ - $ref: "#/components/schemas/JobPatchRequestBody"
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
- $ref: '#/components/schemas/Job'
- '400':
+ $ref: "#/components/schemas/Job"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
patch:
- tags:
+ tags:
- Jobs
description: |
Update job.
@@ -440,44 +441,44 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/JobPatchRequestBody'
+ $ref: "#/components/schemas/JobPatchRequestBody"
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
- $ref: '#/components/schemas/Job'
- '400':
+ $ref: "#/components/schemas/Job"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
/jobCandidates:
post:
tags:
@@ -492,44 +493,44 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/JobCandidateRequestBody'
+ $ref: "#/components/schemas/JobCandidateRequestBody"
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
- $ref: '#/components/schemas/JobCandidate'
- '400':
+ $ref: "#/components/schemas/JobCandidate"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
get:
tags:
- JobCandidates
@@ -560,7 +561,7 @@ paths:
schema:
type: string
default: id
- enum: ['id','status']
+ enum: ["id", "status"]
description: The sort by column.
- in: query
name: sortOrder
@@ -568,7 +569,7 @@ paths:
schema:
type: string
default: desc
- enum: ['desc','asc']
+ enum: ["desc", "asc"]
- in: query
name: jobId
required: false
@@ -588,7 +589,15 @@ paths:
required: false
schema:
type: string
- enum: ['open', 'selected', 'shortlist', 'rejected', 'cancelled', 'interview']
+ enum:
+ [
+ "open",
+ "selected",
+ "shortlist",
+ "rejected",
+ "cancelled",
+ "interview",
+ ]
description: The job candidate status.
- in: query
name: externalId
@@ -597,15 +606,15 @@ paths:
type: string
description: The external id.
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
type: array
items:
- $ref: '#/components/schemas/JobCandidate'
-
+ $ref: "#/components/schemas/JobCandidate"
+
headers:
X-Next-Page:
schema:
@@ -635,41 +644,41 @@ paths:
schema:
type: string
description: Pagination link header.
- '400':
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
/jobCandidates/{id}:
get:
- tags:
+ tags:
- JobCandidates
description: |
Get job candidate information by id.
-
+
**Authorization** Topcoder token with read job candidate scope is allowed
security:
- bearerAuth: []
- parameters:
+ parameters:
- in: path
name: id
description: The job candidate id.
@@ -684,50 +693,50 @@ paths:
schema:
type: boolean
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
- $ref: '#/components/schemas/JobCandidate'
- '400':
+ $ref: "#/components/schemas/JobCandidate"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
delete:
- tags:
+ tags:
- JobCandidates
- description: |
+ description: |
Delete the job.
**Authorization** Topcoder token with delete job candidate scope is allowed
- security:
+ security:
- bearerAuth: []
parameters:
- in: path
@@ -738,40 +747,40 @@ paths:
type: string
format: uuid
responses:
- '204':
+ "204":
description: OK
- '400':
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
put:
- tags:
+ tags:
- JobCandidates
description: |
Update the job candidate.
@@ -791,47 +800,47 @@ paths:
application/json:
schema:
allOf:
- - $ref: '#/components/schemas/JobCandidateRequestBody'
- - $ref: '#/components/schemas/JobCandidatePatchRequestBody'
+ - $ref: "#/components/schemas/JobCandidateRequestBody"
+ - $ref: "#/components/schemas/JobCandidatePatchRequestBody"
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
- $ref: '#/components/schemas/JobCandidate'
- '400':
+ $ref: "#/components/schemas/JobCandidate"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
patch:
- tags:
+ tags:
- JobCandidates
description: |
Partail update job candidate.
@@ -851,44 +860,44 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/JobCandidatePatchRequestBody'
+ $ref: "#/components/schemas/JobCandidatePatchRequestBody"
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
- $ref: '#/components/schemas/JobCandidate'
- '400':
+ $ref: "#/components/schemas/JobCandidate"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
/resourceBookings:
post:
tags:
@@ -903,44 +912,44 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/ResourceBookingRequestBody'
+ $ref: "#/components/schemas/ResourceBookingRequestBody"
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
- $ref: '#/components/schemas/ResourceBooking'
- '400':
+ $ref: "#/components/schemas/ResourceBooking"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
get:
tags:
- ResourceBookings
@@ -971,7 +980,16 @@ paths:
schema:
type: string
default: id
- enum: ['id','status','startDate','endDate','rateType','customerRate','memberRate']
+ enum:
+ [
+ "id",
+ "status",
+ "startDate",
+ "endDate",
+ "rateType",
+ "customerRate",
+ "memberRate",
+ ]
description: The sort by column.
- in: query
name: sortOrder
@@ -979,13 +997,13 @@ paths:
schema:
type: string
default: desc
- enum: ['desc','asc']
+ enum: ["desc", "asc"]
- in: query
name: status
required: false
schema:
type: string
- enum: ['assigned', 'in-progress', 'completed']
+ enum: ["assigned", "in-progress", "completed"]
description: The status.
- in: query
name: startDate
@@ -1006,7 +1024,7 @@ paths:
required: false
schema:
type: string
- enum: ['hourly', 'daily', 'weekly', 'monthly']
+ enum: ["hourly", "daily", "weekly", "monthly"]
description: The rate type.
- in: query
name: jobId
@@ -1034,17 +1052,17 @@ paths:
schema:
type: string
description: comma separated project ids.
-
+
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
type: array
items:
- $ref: '#/components/schemas/ResourceBooking'
-
+ $ref: "#/components/schemas/ResourceBooking"
+
headers:
X-Next-Page:
schema:
@@ -1074,41 +1092,41 @@ paths:
schema:
type: string
description: Pagination link header.
- '400':
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
/resourceBookings/{id}:
get:
- tags:
+ tags:
- ResourceBookings
description: |
Get resource booking by id.
-
+
**Authorization** Topcoder token with read resource booking scope is allowed
security:
- bearerAuth: []
- parameters:
+ parameters:
- in: path
name: id
description: The resource booking id.
@@ -1123,50 +1141,50 @@ paths:
schema:
type: boolean
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
- $ref: '#/components/schemas/ResourceBooking'
- '400':
+ $ref: "#/components/schemas/ResourceBooking"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
delete:
- tags:
+ tags:
- ResourceBookings
- description: |
+ description: |
Delete the resource booking.
**Authorization** Topcoder token with delete resource booking scope is allowed
- security:
+ security:
- bearerAuth: []
parameters:
- in: path
@@ -1177,40 +1195,40 @@ paths:
type: string
format: uuid
responses:
- '204':
+ "204":
description: OK
- '400':
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
put:
- tags:
+ tags:
- ResourceBookings
description: |
Update the resource booking.
@@ -1231,47 +1249,47 @@ paths:
application/json:
schema:
allOf:
- - $ref: '#/components/schemas/ResourceBookingRequestBody'
- - $ref: '#/components/schemas/ResourceBookingPatchRequestBody'
+ - $ref: "#/components/schemas/ResourceBookingRequestBody"
+ - $ref: "#/components/schemas/ResourceBookingPatchRequestBody"
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
- $ref: '#/components/schemas/ResourceBooking'
- '400':
+ $ref: "#/components/schemas/ResourceBooking"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
patch:
- tags:
+ tags:
- ResourceBookings
description: |
Partial Update resource booking.
@@ -1291,44 +1309,492 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/ResourceBookingPatchRequestBody'
+ $ref: "#/components/schemas/ResourceBookingPatchRequestBody"
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
- $ref: '#/components/schemas/ResourceBooking'
- '400':
+ $ref: "#/components/schemas/ResourceBooking"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
+ /workPeriods:
+ post:
+ tags:
+ - WorkPeriods
+ description: |
+ Create Work Period.
+
+ **Authorization** Topcoder token with write Work period scope is allowed
+ security:
+ - bearerAuth: []
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/WorkPeriodRequestBody"
+ responses:
+ "200":
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/WorkPeriod"
+ "400":
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "401":
+ description: Not authenticated
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "403":
+ description: Forbidden
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "404":
+ description: Not Found
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ get:
+ tags:
+ - WorkPeriods
+ description: |
+ Search work period.
+
+ **Authorization** Topcoder token with read work period scope is allowed
+ security:
+ - bearerAuth: []
+ parameters:
+ - in: query
+ name: page
+ required: false
+ schema:
+ type: integer
+ default: 1
+ description: The page number.
+ - in: query
+ name: perPage
+ required: false
+ schema:
+ type: integer
+ default: 20
+ description: The number of items to list per page.
+ - in: query
+ name: sortBy
+ required: false
+ schema:
+ type: string
+ default: id
+ enum:
+ [
+ "id",
+ "resourceBookingId",
+ "userHandle",
+ "projectId",
+ "paymentStatus",
+ "startDate",
+ "endDate",
+ "daysWorked",
+ "customerRate",
+ "memberRate",
+ ]
+ description: The sort by column.
+ - in: query
+ name: sortOrder
+ required: false
+ schema:
+ type: string
+ default: desc
+ enum: ["desc", "asc"]
+ - in: query
+ name: resourceBookingId
+ required: false
+ schema:
+ type: string
+ format: uuid
+ description: The resource booking id.
+ - in: query
+ name: resourceBookingIds
+ required: false
+ schema:
+ oneOf:
+ - type: array
+ items:
+ type: string
+ format: uuid
+ - type: string
+ description: comma separated resource booking ids.
+ - in: query
+ name: paymentStatus
+ required: false
+ schema:
+ type: string
+ enum: ["pending", "partially-completed", "completed", "cancelled"]
+ description: The payment status.
+ - in: query
+ name: startDate
+ required: false
+ schema:
+ type: string
+ format: date
+ pattern: '^\d{4}-\d{2}-\d{2}$'
+ description: The work period start date.
+ - in: query
+ name: endDate
+ required: false
+ schema:
+ type: string
+ format: date
+ pattern: '^\d{4}-\d{2}-\d{2}$'
+ description: The work period end date.
+ - in: query
+ name: userHandle
+ required: false
+ schema:
+ type: string
+ description: The user handle.
+ - in: query
+ name: projectId
+ required: false
+ schema:
+ type: integer
+ description: The project id.
+ responses:
+ "200":
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: "#/components/schemas/WorkPeriod"
+ headers:
+ X-Next-Page:
+ schema:
+ type: integer
+ description: The index of the next page
+ X-Page:
+ schema:
+ type: integer
+ description: The index of the current page (starting at 1)
+ X-Per-Page:
+ schema:
+ type: integer
+ description: The number of items to list per page
+ X-Prev-Page:
+ schema:
+ type: integer
+ description: The index of the previous page
+ X-Total:
+ schema:
+ type: integer
+ description: The total number of items
+ X-Total-Pages:
+ schema:
+ type: integer
+ description: The total number of pages
+ Link:
+ schema:
+ type: string
+ description: Pagination link header.
+ "400":
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "401":
+ description: Not authenticated
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "403":
+ description: Forbidden
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ /workPeriods/{id}:
+ get:
+ tags:
+ - WorkPeriods
+ description: |
+ Get work period by id.
+
+ **Authorization** Topcoder token with read work period scope is allowed
+ security:
+ - bearerAuth: []
+ parameters:
+ - in: path
+ name: id
+ description: The work period id.
+ required: true
+ schema:
+ type: string
+ format: uuid
+ - in: query
+ name: fromDb
+ description: get data from db or not.
+ required: false
+ schema:
+ type: boolean
+ default: false
+ responses:
+ "200":
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/WorkPeriod"
+ "400":
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "401":
+ description: Not authenticated
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "403":
+ description: Forbidden
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "404":
+ description: Not Found
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ delete:
+ tags:
+ - WorkPeriods
+ description: |
+ Delete the work period.
+
+ **Authorization** Topcoder token with delete work period scope is allowed
+ security:
+ - bearerAuth: []
+ parameters:
+ - in: path
+ name: id
+ description: The id of work period.
+ required: true
+ schema:
+ type: string
+ format: uuid
+ responses:
+ "204":
+ description: OK
+ "400":
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "401":
+ description: Not authenticated
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "403":
+ description: Forbidden
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "404":
+ description: Not Found
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ put:
+ tags:
+ - WorkPeriods
+ description: |
+ Update the work period.
+
+ **Authorization** Topcoder token with update work period scope is allowed
+ security:
+ - bearerAuth: []
+ parameters:
+ - in: path
+ name: id
+ description: The id of work period.
+ required: true
+ schema:
+ type: string
+ format: uuid
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/WorkPeriodRequestBody"
+ responses:
+ "200":
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/WorkPeriod"
+ "400":
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "401":
+ description: Not authenticated
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "403":
+ description: Forbidden
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "404":
+ description: Not Found
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ patch:
+ tags:
+ - WorkPeriods
+ description: |
+ Partial Update work period.
+
+ **Authorization** Topcoder token with update work period scope is allowed
+ security:
+ - bearerAuth: []
+ parameters:
+ - in: path
+ name: id
+ description: The id of work period.
+ required: true
+ schema:
+ type: string
+ format: uuid
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/WorkPeriodPatchRequestBody"
+ responses:
+ "200":
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/WorkPeriod"
+ "400":
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "401":
+ description: Not authenticated
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "403":
+ description: Forbidden
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "404":
+ description: Not Found
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "500":
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
/taas-teams:
get:
tags:
@@ -1356,7 +1822,17 @@ paths:
schema:
type: string
default: createdAt
- enum: ['createdAt', 'updatedAt', 'lastActivityAt', 'id', 'status', 'name', 'type', 'best match']
+ enum:
+ [
+ "createdAt",
+ "updatedAt",
+ "lastActivityAt",
+ "id",
+ "status",
+ "name",
+ "type",
+ "best match",
+ ]
description: The sort by column.
- in: query
name: sortOrder
@@ -1364,7 +1840,7 @@ paths:
schema:
type: string
default: desc
- enum: ['desc','asc']
+ enum: ["desc", "asc"]
description: The sort order. Not allowed when sortBy is `best match`.
- in: query
name: name
@@ -1372,18 +1848,18 @@ paths:
schema:
type: string
description: filter by name, case-insensitive; support wildcard match.
- example: '*taas*'
+ example: "*taas*"
security:
- bearerAuth: []
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
type: array
items:
- $ref: '#/components/schemas/Team'
+ $ref: "#/components/schemas/Team"
headers:
X-Next-Page:
schema:
@@ -1413,24 +1889,24 @@ paths:
schema:
type: string
description: Pagination link header.
- '400':
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
/taas-teams/{id}:
get:
tags:
@@ -1447,36 +1923,36 @@ paths:
type: integer
description: The team/project id.
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
- $ref: '#/components/schemas/TeamDetail'
- '400':
+ $ref: "#/components/schemas/TeamDetail"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Not authorized
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
/taas-teams/{id}/jobs/{jobId}:
get:
tags:
@@ -1500,42 +1976,42 @@ paths:
format: uuid
description: The job id.
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
- $ref: '#/components/schemas/JobDetail'
- '400':
+ $ref: "#/components/schemas/JobDetail"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Not authorized
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
/taas-teams/{id}/members:
post:
tags:
@@ -1555,44 +2031,44 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/AddMembersRequestBody'
+ $ref: "#/components/schemas/AddMembersRequestBody"
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
- $ref: '#/components/schemas/AddMembersResponseBody'
- '400':
+ $ref: "#/components/schemas/AddMembersResponseBody"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Not authorized
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
get:
tags:
- Teams
@@ -1621,38 +2097,38 @@ paths:
type: string
description: Filtered by a specific role.
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
type: array
items:
- $ref: '#/components/schemas/ProjectMember'
- '400':
+ $ref: "#/components/schemas/ProjectMember"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Not authorized
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
/taas-teams/{id}/invites:
get:
@@ -1677,38 +2153,38 @@ paths:
type: string
description: Fields to be returned.
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
type: array
items:
- $ref: '#/components/schemas/ProjectMemberInvite'
- '400':
+ $ref: "#/components/schemas/ProjectMemberInvite"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Not authorized
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
/taas-teams/{id}/members/{projectMemberId}:
delete:
tags:
@@ -1732,38 +2208,38 @@ paths:
type: integer
description: The id of the project member.
responses:
- '204':
+ "204":
description: OK
- '400':
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
/taas-teams/skills:
get:
tags:
@@ -1793,14 +2269,14 @@ paths:
security:
- bearerAuth: []
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
type: array
items:
- $ref: '#/components/schemas/UbahnSkill'
+ $ref: "#/components/schemas/UbahnSkill"
headers:
X-Next-Page:
schema:
@@ -1830,70 +2306,70 @@ paths:
schema:
type: string
description: Pagination link header.
- '400':
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
/taas-teams/email:
post:
- tags:
+ tags:
- Teams
- description: |
+ description: |
Send emails through one of predefined templates.
- security:
+ security:
- bearerAuth: []
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/TeamEmailRequestBody'
+ $ref: "#/components/schemas/TeamEmailRequestBody"
responses:
- '204':
+ "204":
description: OK
- '400':
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
/taas-teams/me:
get:
@@ -1904,42 +2380,42 @@ paths:
security:
- bearerAuth: []
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
- $ref: '#/components/schemas/UbahnUser'
- '400':
+ $ref: "#/components/schemas/UbahnUser"
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Not authenticated
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not Found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Internal Server Error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
/health:
get:
tags:
@@ -1947,18 +2423,18 @@ paths:
description: |
Get health status of the app.
responses:
- '200':
+ "200":
description: OK
content:
application/json:
schema:
- $ref: '#/components/schemas/CheckRun'
- '503':
+ $ref: "#/components/schemas/CheckRun"
+ "503":
description: Service unavailable
content:
application/json:
schema:
- $ref: '#/components/schemas/CheckRun'
+ $ref: "#/components/schemas/CheckRun"
components:
securitySchemes:
bearerAuth:
@@ -2017,11 +2493,11 @@ components:
description: "The resource type of job."
rateType:
type: string
- enum: ['hourly', 'daily', 'weekly', 'monthly']
+ enum: ["hourly", "daily", "weekly", "monthly"]
description: "The rate type of the job."
workload:
type: string
- enum: ['full-time', 'fractional']
+ enum: ["full-time", "fractional"]
description: "The workload of the job."
skills:
type: array
@@ -2032,13 +2508,13 @@ components:
description: "The skill id."
status:
type: string
- enum: ['sourcing', 'in-review', 'assigned', 'closed', 'cancelled']
+ enum: ["sourcing", "in-review", "assigned", "closed", "cancelled"]
description: "The job status."
candidates:
type: array
description: "The job candidates."
items:
- $ref: '#/components/schemas/JobCandidate'
+ $ref: "#/components/schemas/JobCandidate"
isApplicationPageActive:
type: boolean
default: false
@@ -2048,7 +2524,7 @@ components:
description: "The job created date."
createdBy:
type: string
- example: 'topocder user'
+ example: "topocder user"
description: "The user who created the job.(Will get the user info from the token)"
updatedAt:
type: string
@@ -2056,7 +2532,7 @@ components:
description: "The job last updated at."
updatedBy:
type: string
- example: 'topcoder user'
+ example: "topcoder user"
description: "The user who updated the job last time.(Will get the user info from the token)"
JobRequestBody:
required:
@@ -2084,7 +2560,7 @@ components:
maxLength: 64
status:
type: string
- enum: ['sourcing', 'in-review', 'assigned', 'closed', 'cancelled']
+ enum: ["sourcing", "in-review", "assigned", "closed", "cancelled"]
description: "The job status."
default: sourcing
startDate:
@@ -2106,11 +2582,11 @@ components:
description: "The resource type of job."
rateType:
type: string
- enum: ['hourly', 'daily', 'weekly', 'monthly']
+ enum: ["hourly", "daily", "weekly", "monthly"]
description: "The rate type of the job."
workload:
type: string
- enum: ['full-time', 'fractional']
+ enum: ["full-time", "fractional"]
description: "The workload of the job."
skills:
type: array
@@ -2123,7 +2599,7 @@ components:
type: boolean
default: false
JobCandidate:
- required:
+ required:
- id
- jobId
- userId
@@ -2144,7 +2620,15 @@ components:
description: "The user id."
status:
type: string
- enum: ['open', 'selected', 'shortlist', 'rejected', 'cancelled', 'interview']
+ enum:
+ [
+ "open",
+ "selected",
+ "shortlist",
+ "rejected",
+ "cancelled",
+ "interview",
+ ]
description: "The job candidate status."
externalId:
type: string
@@ -2160,7 +2644,7 @@ components:
description: "The job created date."
createdBy:
type: string
- example: 'topocder user'
+ example: "topocder user"
description: "The user who created the job.(Will get the user info from the token)"
updatedAt:
type: string
@@ -2168,10 +2652,10 @@ components:
description: "The job last updated at."
updatedBy:
type: string
- example: 'topcoder user'
+ example: "topcoder user"
description: "The user who updated the job last time.(Will get the user info from the token)"
JobCandidateRequestBody:
- required:
+ required:
- jobId
- userId
properties:
@@ -2186,7 +2670,7 @@ components:
description: "The user id."
status:
type: string
- enum: ['open', 'selected', 'shortlist', 'rejected', 'cancelled']
+ enum: ["open", "selected", "shortlist", "rejected", "cancelled"]
description: "The job candidate status."
default: open
externalId:
@@ -2201,7 +2685,15 @@ components:
properties:
status:
type: string
- enum: ['open', 'selected', 'shortlist', 'rejected', 'cancelled', 'interview']
+ enum:
+ [
+ "open",
+ "selected",
+ "shortlist",
+ "rejected",
+ "cancelled",
+ "interview",
+ ]
externalId:
type: string
example: "1212"
@@ -2214,7 +2706,7 @@ components:
properties:
status:
type: string
- enum: ['sourcing', 'in-review', 'assigned', 'closed', 'cancelled']
+ enum: ["sourcing", "in-review", "assigned", "closed", "cancelled"]
description:
type: string
example: "Dummy Description"
@@ -2238,11 +2730,11 @@ components:
description: "The resource type of job."
rateType:
type: string
- enum: ['hourly', 'daily', 'weekly', 'monthly']
+ enum: ["hourly", "daily", "weekly", "monthly"]
description: "The rate type of the job."
workload:
type: string
- enum: ['full-time', 'fractional']
+ enum: ["full-time", "fractional"]
description: "The workload of the job."
skills:
type: array
@@ -2283,7 +2775,7 @@ components:
description: "The external id."
status:
type: string
- enum: ['sourcing', 'in-review', 'assigned', 'closed', 'cancelled']
+ enum: ["sourcing", "in-review", "assigned", "closed", "cancelled"]
description: "The job status."
startDate:
type: string
@@ -2307,7 +2799,7 @@ components:
description: "The customer rate."
rateType:
type: string
- enum: ['hourly', 'daily', 'weekly', 'monthly']
+ enum: ["hourly", "daily", "weekly", "monthly"]
description: "The rate type of the job."
createdAt:
type: string
@@ -2315,7 +2807,7 @@ components:
description: "The job created date."
createdBy:
type: string
- example: 'topocder user'
+ example: "topocder user"
description: "The user who created the job.(Will get the user info from the token)"
updatedAt:
type: string
@@ -2323,7 +2815,7 @@ components:
description: "The job last updated at."
updatedBy:
type: string
- example: 'topcoder user'
+ example: "topcoder user"
description: "The user who updated the job last time.(Will get the user info from the token)"
ResourceBookingRequestBody:
required:
@@ -2346,7 +2838,7 @@ components:
description: "The job id."
status:
type: string
- enum: ['sourcing', 'in-review', 'assigned', 'closed', 'cancelled']
+ enum: ["sourcing", "in-review", "assigned", "closed", "cancelled"]
description: "The job status."
default: sourcing
startDate:
@@ -2371,13 +2863,13 @@ components:
description: "The customer rate."
rateType:
type: string
- enum: ['hourly', 'daily', 'weekly', 'monthly']
+ enum: ["hourly", "daily", "weekly", "monthly"]
description: "The rate type of the job."
ResourceBookingPatchRequestBody:
properties:
status:
type: string
- enum: ['sourcing', 'in-review', 'assigned', 'closed', 'cancelled']
+ enum: ["sourcing", "in-review", "assigned", "closed", "cancelled"]
startDate:
type: string
format: date-time
@@ -2400,8 +2892,153 @@ components:
description: "The customer rate."
rateType:
type: string
- enum: ['hourly', 'daily', 'weekly', 'monthly']
+ enum: ["hourly", "daily", "weekly", "monthly"]
description: "The rate type of the job."
+ WorkPeriod:
+ required:
+ - id
+ - resourceBookingId
+ - userHandle
+ - projectId
+ - startDate
+ - endDate
+ - paymentStatus
+ - createdAt
+ - createdBy
+ properties:
+ id:
+ type: string
+ format: uuid
+ description: "The work period id."
+ resourceBookingId:
+ type: string
+ format: uuid
+ description: "The resource booking id."
+ userHandle:
+ type: string
+ example: "eisbilir"
+ description: "The user handle."
+ projectId:
+ type: integer
+ example: 123
+ description: "The project id."
+ startDate:
+ type: string
+ format: date
+ example: "2021-03-07"
+ description: "The start date of work period. Should be always Sunday."
+ endDate:
+ type: string
+ format: date
+ example: "2021-03-13"
+ description: "The end date of work period. Should be always Saturday."
+ daysWorked:
+ type: integer
+ example: 2
+ description: "The count of the days worked for that work period."
+ memberRate:
+ type: integer
+ format: float
+ example: 13.13
+ description: "The member rate."
+ customerRate:
+ type: integer
+ format: float
+ example: 13.13
+ description: "The customer rate."
+ paymentStatus:
+ type: string
+ enum: ["pending", "partially-completed", "completed", "cancelled"]
+ description: "The payment status."
+ createdAt:
+ type: string
+ format: date-time
+ description: "The work period created date."
+ createdBy:
+ type: string
+ format: uuid
+ description: "The user Id who created the work period.(Will get the user info from the token)"
+ updatedAt:
+ type: string
+ format: date-time
+ description: "The work period last updated at."
+ updatedBy:
+ type: string
+ format: uuid
+ description: "The user Id who updated the work period last time.(Will get the user info from the token)"
+ WorkPeriodRequestBody:
+ required:
+ - resourceBookingId
+ - startDate
+ - endDate
+ - paymentStatus
+ properties:
+ resourceBookingId:
+ type: string
+ format: uuid
+ description: "The resource booking id."
+ startDate:
+ type: string
+ format: date
+ example: "2021-03-07"
+ description: "The start date of work period. Should be always Sunday."
+ endDate:
+ type: string
+ format: date
+ example: "2021-03-13"
+ description: "The end date of work period. Should be always Saturday."
+ daysWorked:
+ type: integer
+ example: 2
+ description: "The count of the days worked for that work period."
+ memberRate:
+ type: integer
+ format: float
+ example: 13.13
+ description: "The member rate."
+ customerRate:
+ type: integer
+ format: float
+ example: 13.13
+ description: "The customer rate."
+ paymentStatus:
+ type: string
+ enum: ["pending", "partially-completed", "completed", "cancelled"]
+ description: "The payment status."
+ WorkPeriodPatchRequestBody:
+ properties:
+ resourceBookingId:
+ type: string
+ format: uuid
+ description: "The resource booking id."
+ startDate:
+ type: string
+ format: date
+ example: "2021-03-07"
+ description: "The start date of work period. Should be always Sunday."
+ endDate:
+ type: string
+ format: date
+ example: "2021-03-13"
+ description: "The end date of work period. Should be always Saturday."
+ daysWorked:
+ type: integer
+ example: 2
+ description: "The count of the days worked for that work period."
+ memberRate:
+ type: integer
+ format: float
+ example: 13.13
+ description: "The member rate."
+ customerRate:
+ type: integer
+ format: float
+ example: 13.13
+ description: "The customer rate."
+ paymentStatus:
+ type: string
+ enum: ["pending", "partially-completed", "completed", "cancelled"]
+ description: "The payment status."
CheckRun:
type: object
properties:
@@ -2424,13 +3061,46 @@ components:
items:
type: object
description: "The invites of the project"
- example: [{"createdAt": "2021-02-08T09:21:00.885Z", "createdBy": 40159127, "deletedBy": null, "email": null, "id": 3008, "projectId": 16819, "role": "customer", "status": "pending", "updatedAt": "2021-02-08T09:21:00.885Z", "updatedBy": 40159127, "userId": 40153913}]
+ example:
+ [
+ {
+ "createdAt": "2021-02-08T09:21:00.885Z",
+ "createdBy": 40159127,
+ "deletedBy": null,
+ "email": null,
+ "id": 3008,
+ "projectId": 16819,
+ "role": "customer",
+ "status": "pending",
+ "updatedAt": "2021-02-08T09:21:00.885Z",
+ "updatedBy": 40159127,
+ "userId": 40153913,
+ },
+ ]
members:
type: array
items:
type: object
description: "The members of the project"
- example: [{"lastName": "L_NAME", "role": "customer", "updatedBy": 21926562, "handle": "Tester123", "userId": 21926562, "deletedBy": null, "createdAt": "2021-01-12T10:58:26.237Z", "firstName": "F_NAME", "createdBy": 21926562, "isPrimary": false, "id": 13833, "projectId": 16893, "email": "email@domain.com.z", "updatedAt": "2021-01-12T10:58:26.237Z"}]
+ example:
+ [
+ {
+ "lastName": "L_NAME",
+ "role": "customer",
+ "updatedBy": 21926562,
+ "handle": "Tester123",
+ "userId": 21926562,
+ "deletedBy": null,
+ "createdAt": "2021-01-12T10:58:26.237Z",
+ "firstName": "F_NAME",
+ "createdBy": 21926562,
+ "isPrimary": false,
+ "id": 13833,
+ "projectId": 16893,
+ "email": "email@domain.com.z",
+ "updatedAt": "2021-01-12T10:58:26.237Z",
+ },
+ ]
startDate:
type: string
format: date-time
@@ -2444,16 +3114,16 @@ components:
weeklyCost:
type: number
format: decimal
- example: 5000.50
+ example: 5000.50
description: "The average weekly cost"
totalPositions:
type: integer
- description: 'The sum of number of positions opening in all job'
- resources:
+ description: "The sum of number of positions opening in all job"
+ resources:
type: array
description: "The rosources that are assigned"
items:
- $ref: '#/components/schemas/ResourceUserInfo'
+ $ref: "#/components/schemas/ResourceUserInfo"
User:
properties:
id:
@@ -2470,13 +3140,13 @@ components:
example: "https://topcoder-dev-media.s3.amazonaws.com/member/profile/TonyJ-1604301092491.jpeg"
description: "The user avatar."
firstName:
- type: string
- example: 'Tony'
- description: 'The first name of user'
+ type: string
+ example: "Tony"
+ description: "The first name of user"
lastName:
type: string
- example: 'J'
- description: 'The last name of user'
+ example: "J"
+ description: "The last name of user"
ResourceUserInfo:
properties:
id:
@@ -2497,13 +3167,13 @@ components:
example: "https://topcoder-dev-media.s3.amazonaws.com/member/profile/TonyJ-1604301092491.jpeg"
description: "The user avatar."
firstName:
- type: string
- example: 'Tony'
- description: 'The first name of user'
+ type: string
+ example: "Tony"
+ description: "The first name of user"
lastName:
type: string
- example: 'J'
- description: 'The last name of user'
+ example: "J"
+ description: "The last name of user"
TeamDetail:
properties:
id:
@@ -2519,13 +3189,46 @@ components:
items:
type: object
description: "The invites of the project"
- example: [{"createdAt": "2021-02-08T09:21:00.885Z", "createdBy": 40159127, "deletedBy": null, "email": null, "id": 3008, "projectId": 16819, "role": "customer", "status": "pending", "updatedAt": "2021-02-08T09:21:00.885Z", "updatedBy": 40159127, "userId": 40153913}]
+ example:
+ [
+ {
+ "createdAt": "2021-02-08T09:21:00.885Z",
+ "createdBy": 40159127,
+ "deletedBy": null,
+ "email": null,
+ "id": 3008,
+ "projectId": 16819,
+ "role": "customer",
+ "status": "pending",
+ "updatedAt": "2021-02-08T09:21:00.885Z",
+ "updatedBy": 40159127,
+ "userId": 40153913,
+ },
+ ]
members:
type: array
items:
type: object
description: "The members of the project"
- example: [{"lastName": "L_NAME", "role": "customer", "updatedBy": 21926562, "handle": "Tester123", "userId": 21926562, "deletedBy": null, "createdAt": "2021-01-12T10:58:26.237Z", "firstName": "F_NAME", "createdBy": 21926562, "isPrimary": false, "id": 13833, "projectId": 16893, "email": "email@domain.com.z", "updatedAt": "2021-01-12T10:58:26.237Z"}]
+ example:
+ [
+ {
+ "lastName": "L_NAME",
+ "role": "customer",
+ "updatedBy": 21926562,
+ "handle": "Tester123",
+ "userId": 21926562,
+ "deletedBy": null,
+ "createdAt": "2021-01-12T10:58:26.237Z",
+ "firstName": "F_NAME",
+ "createdBy": 21926562,
+ "isPrimary": false,
+ "id": 13833,
+ "projectId": 16893,
+ "email": "email@domain.com.z",
+ "updatedAt": "2021-01-12T10:58:26.237Z",
+ },
+ ]
startDate:
type: string
format: date-time
@@ -2539,14 +3242,14 @@ components:
weeklyCost:
type: number
format: decimal
- example: 5000.50
+ example: 5000.50
description: "The average weekly cost"
- resources:
+ resources:
type: array
description: "The rosources that are assigned"
items:
- allOf:
- - $ref: '#/components/schemas/ResourceUserInfo'
+ allOf:
+ - $ref: "#/components/schemas/ResourceUserInfo"
type: object
properties:
customerRate:
@@ -2554,10 +3257,10 @@ components:
format: float
example: 13
description: "The customer rate."
- skills:
+ skills:
type: array
items:
- $ref: '#/components/schemas/Skill'
+ $ref: "#/components/schemas/Skill"
jobId:
type: string
format: uuid
@@ -2572,22 +3275,22 @@ components:
format: date-time
example: "2020-09-27T04:17:23.131Z"
description: "Resource end date."
-
- jobs:
+
+ jobs:
type: array
description: "The jobs which are opened"
items:
- $ref: '#/components/schemas/JobForTeam'
- Skill:
+ $ref: "#/components/schemas/JobForTeam"
+ Skill:
type: object
properties:
id:
type: string
format: uuid
description: "The skill id."
- name:
+ name:
type: string
- example: 'React'
+ example: "React"
description: The skill name.
UbahnSkill:
type: object
@@ -2650,13 +3353,13 @@ components:
description: "The number of positions for the job."
rateType:
type: string
- enum: ['hourly', 'daily', 'weekly', 'monthly']
+ enum: ["hourly", "daily", "weekly", "monthly"]
description: "The rate type of the job."
skills:
type: array
description: "The skills."
items:
- $ref: '#/components/schemas/Skill'
+ $ref: "#/components/schemas/Skill"
customerRate:
type: integer
format: float
@@ -2664,7 +3367,7 @@ components:
description: "The customer rate."
status:
type: string
- enum: ['sourcing', 'in-review', 'assigned', 'closed', 'cancelled']
+ enum: ["sourcing", "in-review", "assigned", "closed", "cancelled"]
description: "The job status."
JobDetail:
type: object
@@ -2680,8 +3383,8 @@ components:
candidates:
type: array
items:
- allOf:
- - $ref: '#/components/schemas/User'
+ allOf:
+ - $ref: "#/components/schemas/User"
type: object
properties:
id:
@@ -2692,18 +3395,26 @@ components:
type: string
format: uuid
description: "User id."
- resume:
+ resume:
type: string
format: url
- description: 'The link for the resume that can be downloaded'
+ description: "The link for the resume that can be downloaded"
status:
type: string
- enum: ['open', 'selected', 'shortlist', 'rejected', 'cancelled', 'interview']
+ enum:
+ [
+ "open",
+ "selected",
+ "shortlist",
+ "rejected",
+ "cancelled",
+ "interview",
+ ]
description: "The job candidate status."
- skills:
- type: array
- items:
- $ref: '#/components/schemas/Skill'
+ skills:
+ type: array
+ items:
+ $ref: "#/components/schemas/Skill"
TeamEmailRequestBody:
type: object
properties:
@@ -2713,7 +3424,12 @@ components:
example: "team-issue-report"
data:
type: object
- example: {"projectName": "TaaS Project Name", "projectId": 12345, "reportText": "I have issue with ..."}
+ example:
+ {
+ "projectName": "TaaS Project Name",
+ "projectId": 12345,
+ "reportText": "I have issue with ...",
+ }
description: "Arbitrary data to feed the specified template"
AddMembersRequestBody:
properties:
@@ -2730,14 +3446,14 @@ components:
items:
type: string
description: "the email of a member"
- example: 'xxx@xxx.com'
+ example: "xxx@xxx.com"
AddMembersResponseBody:
properties:
success:
type: array
description: "The members created."
items:
- $ref: '#/components/schemas/ProjectMember'
+ $ref: "#/components/schemas/ProjectMember"
failed:
type: array
description: "The emails."
@@ -2762,16 +3478,185 @@ components:
email:
type: string
description: "the email of a member"
- example: 'xxx@xxx.com'
+ example: "xxx@xxx.com"
ProjectMember:
type: object
- example: {"id": 14329, "userId": 40159097, "role": "customer", "createdAt": "2021-02-24T12:34:45.074Z", "updatedAt": "2021-02-24T12:34:45.075Z", "createdBy": -101, "updatedBy": -101, "handle": "tester1234", "photoURL": null, "workingHourStart": "9:00", "workingHourEnd": "17:00", "timeZone": "Asia/Kolkata", "email": "xxx@xxx.com"}
+ example:
+ {
+ "id": 14329,
+ "userId": 40159097,
+ "role": "customer",
+ "createdAt": "2021-02-24T12:34:45.074Z",
+ "updatedAt": "2021-02-24T12:34:45.075Z",
+ "createdBy": -101,
+ "updatedBy": -101,
+ "handle": "tester1234",
+ "photoURL": null,
+ "workingHourStart": "9:00",
+ "workingHourEnd": "17:00",
+ "timeZone": "Asia/Kolkata",
+ "email": "xxx@xxx.com",
+ }
ProjectMemberInvite:
type: object
- example: {"createdAt": "2021-02-24T11:02:12.673Z", "deletedAt": null, "role": "customer", "updatedBy": -101, "createdBy": -101, "id": 3686, "projectId": 16705, "userId": 23008602, "email": null, "deletedBy": null, "updatedAt": "2021-02-24T11:02:12.674Z", "status": "pending"}
+ example:
+ {
+ "createdAt": "2021-02-24T11:02:12.673Z",
+ "deletedAt": null,
+ "role": "customer",
+ "updatedBy": -101,
+ "createdBy": -101,
+ "id": 3686,
+ "projectId": 16705,
+ "userId": 23008602,
+ "email": null,
+ "deletedBy": null,
+ "updatedAt": "2021-02-24T11:02:12.674Z",
+ "status": "pending",
+ }
UbahnUser:
type: object
- example: {"lastName": "DeLaurentis", "updatedBy": "tcAdmin", "achievements": [{"certifierId": "certifierId", "updatedBy": "tcAdmin", "createdBy": "tc-user", "certifiedDate": "2020-05-04T07:36:28.036Z", "created": "2020-05-13T08:44:27.244Z", "name": "Topcoder", "id": "a49e1013-fd42-4c08-bc12-492510cadb96", "achievementsProviderId": "ce05133f-129e-484d-9ef9-72bf51ff81f9", "uri": "http://www.google.com/xx", "updated": "2021-01-05T10:58:32.429Z", "userId": "0bcb0d86-09bb-410a-b2b1-fba90d1a7699", "achievementprovider": {"updatedBy": "tcAdmin", "createdBy": "tc-user", "created": "2020-05-13T08:42:41.877Z", "name": "achievementsProviders_02", "id": "ce05133f-129e-484d-9ef9-72bf51ff81f9", "updated": "2021-01-05T10:58:32.341Z"}}], "created": "2020-05-05T10:18:03.882Z", "handle": "lazybaer", "skills": [{"certifierId": null, "skillId": "d67f35c3-fa42-4866-a0f9-0a4b84fcf4a9", "updatedBy": "tcAdmin", "createdBy": "lazybaer", "certifiedDate": null, "created": "2020-10-23T16:22:11.208Z", "skill": {"updatedBy": "tcAdmin", "skillprovider": {"updatedBy": "tcAdmin", "createdBy": "TonyJ", "created": "2020-08-31T12:30:00.543Z", "name": "Wipro Digital", "id": "26fb37b1-5f9f-4727-baa9-f3c87de84ab1", "updated": "2021-01-05T10:58:32.836Z"}, "createdBy": "0", "created": "2020-09-01T21:59:21.554Z", "skillProviderId": "26fb37b1-5f9f-4727-baa9-f3c87de84ab1", "name": "GitHub", "externalId": null, "id": "d67f35c3-fa42-4866-a0f9-0a4b84fcf4a9", "uri": null, "updated": "2021-01-05T10:58:33.332Z"}, "metricValue": null, "id": "8a84c1b4-1884-4a3c-90b2-eb86bf469bb6", "updated": "2021-01-05T10:58:34.080Z", "userId": "0bcb0d86-09bb-410a-b2b1-fba90d1a7699"}], "firstName": "Christopher", "externalProfiles": [{"organizationId": "0d2320f9-be61-4ba4-973e-edc3bb682a69", "updatedBy": "tcAdmin", "createdBy": "TonyJ", "isInactive": false, "created": "2020-08-31T12:30:38.495Z", "organization": {"updatedBy": "tcAdmin", "createdBy": "TonyJ", "created": "2020-08-31T12:29:58.081Z", "name": "Wipro Digital", "skillProviders": [{"organizationId": "0d2320f9-be61-4ba4-973e-edc3bb682a69", "updatedBy": "tcAdmin", "createdBy": "TonyJ", "created": "2020-08-31T12:30:08.410Z", "skillProviderId": "26fb37b1-5f9f-4727-baa9-f3c87de84ab1", "id": "5b26cdd3-fe68-4b30-85c5-ceaf280bd688", "updated": "2021-01-05T10:58:32.919Z"}], "id": "0d2320f9-be61-4ba4-973e-edc3bb682a69", "updated": "2021-01-05T10:58:32.261Z"}, "externalId": "8547899", "id": "870af97b-8c3b-4659-92d6-cac126bbe9de", "uri": null, "updated": "2021-01-05T10:58:32.724Z", "userId": "0bcb0d86-09bb-410a-b2b1-fba90d1a7699"}], "createdBy": "tc-Copilot", "attributes": [{"attributeId": "d709276a-80c3-491c-9b29-a4f065b2a56f", "updatedBy": "tcAdmin", "createdBy": "tc-Admin", "created": "2020-05-13T08:19:13.709Z", "id": "21de9324-900d-41ea-b127-f297dfb9a873", "attribute": {"updatedBy": "tcAdmin", "attributegroup": {"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad", "updatedBy": "tc-Admin", "createdBy": "tc-Admin", "created": "2020-05-13T07:15:01.215Z", "name": "group 03", "id": "84634bbd-8191-40cf-a03e-9962d7e39fda", "updated": "2020-05-13T07:16:20.636Z"}, "createdBy": "tc-Admin", "created": "2020-05-13T07:32:03.128Z", "name": "Billing Account", "id": "d709276a-80c3-491c-9b29-a4f065b2a56f", "attributeGroupId": "84634bbd-8191-40cf-a03e-9962d7e39fda", "updated": "2021-01-05T10:58:32.604Z"}, "value": "74314457", "updated": "2021-01-05T10:58:33.739Z", "userId": "0bcb0d86-09bb-410a-b2b1-fba90d1a7699"}], "id": "0bcb0d86-09bb-410a-b2b1-fba90d1a7699", "updated": "2021-01-05T10:58:32.113Z"}
+ example:
+ {
+ "lastName": "DeLaurentis",
+ "updatedBy": "tcAdmin",
+ "achievements":
+ [
+ {
+ "certifierId": "certifierId",
+ "updatedBy": "tcAdmin",
+ "createdBy": "tc-user",
+ "certifiedDate": "2020-05-04T07:36:28.036Z",
+ "created": "2020-05-13T08:44:27.244Z",
+ "name": "Topcoder",
+ "id": "a49e1013-fd42-4c08-bc12-492510cadb96",
+ "achievementsProviderId": "ce05133f-129e-484d-9ef9-72bf51ff81f9",
+ "uri": "http://www.google.com/xx",
+ "updated": "2021-01-05T10:58:32.429Z",
+ "userId": "0bcb0d86-09bb-410a-b2b1-fba90d1a7699",
+ "achievementprovider":
+ {
+ "updatedBy": "tcAdmin",
+ "createdBy": "tc-user",
+ "created": "2020-05-13T08:42:41.877Z",
+ "name": "achievementsProviders_02",
+ "id": "ce05133f-129e-484d-9ef9-72bf51ff81f9",
+ "updated": "2021-01-05T10:58:32.341Z",
+ },
+ },
+ ],
+ "created": "2020-05-05T10:18:03.882Z",
+ "handle": "lazybaer",
+ "skills":
+ [
+ {
+ "certifierId": null,
+ "skillId": "d67f35c3-fa42-4866-a0f9-0a4b84fcf4a9",
+ "updatedBy": "tcAdmin",
+ "createdBy": "lazybaer",
+ "certifiedDate": null,
+ "created": "2020-10-23T16:22:11.208Z",
+ "skill":
+ {
+ "updatedBy": "tcAdmin",
+ "skillprovider":
+ {
+ "updatedBy": "tcAdmin",
+ "createdBy": "TonyJ",
+ "created": "2020-08-31T12:30:00.543Z",
+ "name": "Wipro Digital",
+ "id": "26fb37b1-5f9f-4727-baa9-f3c87de84ab1",
+ "updated": "2021-01-05T10:58:32.836Z",
+ },
+ "createdBy": "0",
+ "created": "2020-09-01T21:59:21.554Z",
+ "skillProviderId": "26fb37b1-5f9f-4727-baa9-f3c87de84ab1",
+ "name": "GitHub",
+ "externalId": null,
+ "id": "d67f35c3-fa42-4866-a0f9-0a4b84fcf4a9",
+ "uri": null,
+ "updated": "2021-01-05T10:58:33.332Z",
+ },
+ "metricValue": null,
+ "id": "8a84c1b4-1884-4a3c-90b2-eb86bf469bb6",
+ "updated": "2021-01-05T10:58:34.080Z",
+ "userId": "0bcb0d86-09bb-410a-b2b1-fba90d1a7699",
+ },
+ ],
+ "firstName": "Christopher",
+ "externalProfiles":
+ [
+ {
+ "organizationId": "0d2320f9-be61-4ba4-973e-edc3bb682a69",
+ "updatedBy": "tcAdmin",
+ "createdBy": "TonyJ",
+ "isInactive": false,
+ "created": "2020-08-31T12:30:38.495Z",
+ "organization":
+ {
+ "updatedBy": "tcAdmin",
+ "createdBy": "TonyJ",
+ "created": "2020-08-31T12:29:58.081Z",
+ "name": "Wipro Digital",
+ "skillProviders":
+ [
+ {
+ "organizationId": "0d2320f9-be61-4ba4-973e-edc3bb682a69",
+ "updatedBy": "tcAdmin",
+ "createdBy": "TonyJ",
+ "created": "2020-08-31T12:30:08.410Z",
+ "skillProviderId": "26fb37b1-5f9f-4727-baa9-f3c87de84ab1",
+ "id": "5b26cdd3-fe68-4b30-85c5-ceaf280bd688",
+ "updated": "2021-01-05T10:58:32.919Z",
+ },
+ ],
+ "id": "0d2320f9-be61-4ba4-973e-edc3bb682a69",
+ "updated": "2021-01-05T10:58:32.261Z",
+ },
+ "externalId": "8547899",
+ "id": "870af97b-8c3b-4659-92d6-cac126bbe9de",
+ "uri": null,
+ "updated": "2021-01-05T10:58:32.724Z",
+ "userId": "0bcb0d86-09bb-410a-b2b1-fba90d1a7699",
+ },
+ ],
+ "createdBy": "tc-Copilot",
+ "attributes":
+ [
+ {
+ "attributeId": "d709276a-80c3-491c-9b29-a4f065b2a56f",
+ "updatedBy": "tcAdmin",
+ "createdBy": "tc-Admin",
+ "created": "2020-05-13T08:19:13.709Z",
+ "id": "21de9324-900d-41ea-b127-f297dfb9a873",
+ "attribute":
+ {
+ "updatedBy": "tcAdmin",
+ "attributegroup":
+ {
+ "organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
+ "updatedBy": "tc-Admin",
+ "createdBy": "tc-Admin",
+ "created": "2020-05-13T07:15:01.215Z",
+ "name": "group 03",
+ "id": "84634bbd-8191-40cf-a03e-9962d7e39fda",
+ "updated": "2020-05-13T07:16:20.636Z",
+ },
+ "createdBy": "tc-Admin",
+ "created": "2020-05-13T07:32:03.128Z",
+ "name": "Billing Account",
+ "id": "d709276a-80c3-491c-9b29-a4f065b2a56f",
+ "attributeGroupId": "84634bbd-8191-40cf-a03e-9962d7e39fda",
+ "updated": "2021-01-05T10:58:32.604Z",
+ },
+ "value": "74314457",
+ "updated": "2021-01-05T10:58:33.739Z",
+ "userId": "0bcb0d86-09bb-410a-b2b1-fba90d1a7699",
+ },
+ ],
+ "id": "0bcb0d86-09bb-410a-b2b1-fba90d1a7699",
+ "updated": "2021-01-05T10:58:32.113Z",
+ }
Error:
required:
- message
diff --git a/docs/topcoder-bookings.postman_environment.json b/docs/topcoder-bookings.postman_environment.json
index 52dd7275..f68993a4 100644
--- a/docs/topcoder-bookings.postman_environment.json
+++ b/docs/topcoder-bookings.postman_environment.json
@@ -1,5 +1,5 @@
{
- "id": "a7cb1c6e-c710-49c3-ad58-db7536c85944",
+ "id": "9f3d832e-2330-4b01-ad24-acdca64aa2d6",
"name": "topcoder-bookings",
"values": [
{
@@ -7,21 +7,6 @@
"value": "http://localhost:3000/api/v5",
"enabled": true
},
- {
- "key": "jobId",
- "value": "",
- "enabled": true
- },
- {
- "key": "jobCandidateId",
- "value": "",
- "enabled": true
- },
- {
- "key": "resourceBookingId",
- "value": "",
- "enabled": true
- },
{
"key": "token_administrator",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiYWRtaW5pc3RyYXRvciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoidGVzdDEiLCJleHAiOjIxNDc0ODM2NDgsInVzZXJJZCI6IjQwMTUyODU2IiwiaWF0IjoxNDYzMDc2MDg5LCJlbWFpbCI6InRlc3RAdG9wY29kZXIuY29tIiwianRpIjoiYjMzYjc3Y2QtYjUyZS00MGZlLTgzN2UtYmViOGUwYWU2YTRhIn0.PKv0QrMCPf0-ZPjv4PGWT7eXne54m7i9YX9eq-fceMU",
@@ -38,13 +23,13 @@
"enabled": true
},
{
- "key": "token_connect_manager_pshahcopmanag2",
- "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwczovL3RvcGNvZGVyLWRldi5jb20vcm9sZXMiOlsiQnVzaW5lc3MgVXNlciIsIlRvcGNvZGVyIFVzZXIiLCJDb25uZWN0IENvcGlsb3QgTWFuYWdlciIsIkNvbm5lY3QgTWFuYWdlciJdLCJodHRwczovL3RvcGNvZGVyLWRldi5jb20vdXNlcklkIjoiODg3NzQ0ODkiLCJodHRwczovL3RvcGNvZGVyLWRldi5jb20vaGFuZGxlIjoicHNoYWhjb3BtYW5hZzIiLCJodHRwczovL3RvcGNvZGVyLWRldi5jb20vdXNlcl9pZCI6ImF1dGgwfDg4Nzc0NDg5IiwiaHR0cHM6Ly90b3Bjb2Rlci1kZXYuY29tL3Rjc3NvIjoiODg3NzQ0ODl8ODdhZDNiNjNiZGZjMmYyNjczNGJiMDIzMTM2YWEzM2NhYWY5MzdiNzdhZmQyYjE3YzljMWY3ZWVkZWI4IiwiaHR0cHM6Ly90b3Bjb2Rlci1kZXYuY29tL2FjdGl2ZSI6dHJ1ZSwibmlja25hbWUiOiJwc2hhaGNvcG1hbmFnMiIsIm5hbWUiOiJtYXhjZWVtK3RjK3BzaGFoY29wbWFuYWcyQGdtYWlsLmNvbSIsInBpY3R1cmUiOiJodHRwczovL3MuZ3JhdmF0YXIuY29tL2F2YXRhci8wZDY1NWNlZDM4NTFiM2JmY2I1Y2Y3Y2U3NjY0ODQwNj9zPTQ4MCZyPXBnJmQ9aHR0cHMlM0ElMkYlMkZjZG4uYXV0aDAuY29tJTJGYXZhdGFycyUyRm1hLnBuZyIsInVwZGF0ZWRfYXQiOiIyMDIxLTAxLTAyVDEyOjM3OjAxLjE2MFoiLCJlbWFpbCI6Im1heGNlZW0rdGMrcHNoYWhjb3BtYW5hZzJAZ21haWwuY29tIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImlzcyI6Imh0dHBzOi8vYXV0aC50b3Bjb2Rlci1kZXYuY29tLyIsInN1YiI6ImF1dGgwfDg4Nzc0NDg5IiwiYXVkIjoiQlhXWFVXbmlsVlVQZE4wMXQyU2UyOVR3MlpZTkdadkgiLCJpYXQiOjE2MDk1OTEwMjQsImV4cCI6MjE0NzQ4MzY0OCwibm9uY2UiOiJaVmhCV1dKbU5GbFlOa0pGU0ZWSU9VSkZTbFIrYkhoVVVEYzJmak41UkVWcFFuWkRWSFZUVlVKU1RRPT0ifQ.G-wrxaqoRH9GQS9cjqX93nRoH91tn-wPW1j_MA42lCY",
+ "key": "token_member",
+ "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5VSkZORGd4UlRVME5EWTBOVVkzTlRkR05qTXlRamxETmpOQk5UYzVRVUV3UlRFeU56TTJRUSJ9.eyJodHRwczovL3RvcGNvZGVyLWRldi5jb20vcm9sZXMiOlsiVG9wY29kZXIgVXNlciJdLCJodHRwczovL3RvcGNvZGVyLWRldi5jb20vdXNlcklkIjoiODU0Nzg5OSIsImh0dHBzOi8vdG9wY29kZXItZGV2LmNvbS9oYW5kbGUiOiJwc2hhaF9tYW5hZ2VyIiwiaHR0cHM6Ly90b3Bjb2Rlci1kZXYuY29tL3VzZXJfaWQiOiJhdXRoMHw0MDE1Mjg1NiIsImh0dHBzOi8vdG9wY29kZXItZGV2LmNvbS90Y3NzbyI6IjQwMTUyODU2fDgxMzRmNDhlYmUxMWE4NDhhMzc1OWU1ZWY5ZTkyZjIxNDY5MmUyMTEzMDQwYzgyYjVkOGY1ODFjNmRmY2NjODgiLCJodHRwczovL3RvcGNvZGVyLWRldi5jb20vYWN0aXZlIjp0cnVlLCJuaWNrbmFtZSI6InBzaGFoX21hbmFnZXIiLCJuYW1lIjoidmlrYXMuYWdhcndhbCtwc2hhaF9tYW5hZ2VyQHRvcGNvZGVyLmNvbSIsInBpY3R1cmUiOiJodHRwczovL3MuZ3JhdmF0YXIuY29tL2F2YXRhci85MmFmYjJmMGVkNTJmZGZhZTFmMzcxMDIxYWU2NTAxMz9zPTQ4MCZyPXBnJmQ9aHR0cHMlM0ElMkYlMkZjZG4uYXV0aDAuY29tJTJGYXZhdGFycyUyRnZpLnBuZyIsInVwZGF0ZWRfYXQiOiIyMDIwLTEwLTI0VDA4OjI4OjI0LjE4NFoiLCJlbWFpbCI6InZpa2FzLmFnYXJ3YWwrcHNoYWhfbWFuYWdlckB0b3Bjb2Rlci5jb20iLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6Ly9hdXRoLnRvcGNvZGVyLWRldi5jb20vIiwic3ViIjoiYXV0aDB8NDAxNTI4NTYiLCJhdWQiOiJCWFdYVVduaWxWVVBkTjAxdDJTZTI5VHcyWllOR1p2SCIsImlhdCI6MTYwMzU0MzMzOCwiZXhwIjozMzE2MDQ1MjczOCwibm9uY2UiOiJSMUEyY3pZdVZUWm1ialpIUkc5MlZsOURTVUo2VWxsdlFYYzNSSGg1UzNaV2RXWkRjRE5YTUVaMVh3PT0ifQ.HbAisH30DLcbFNQeIifSzk1yhDmlGHNpPi9LSZbAowo",
"enabled": true
},
{
- "key": "token_member",
- "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5VSkZORGd4UlRVME5EWTBOVVkzTlRkR05qTXlRamxETmpOQk5UYzVRVUV3UlRFeU56TTJRUSJ9.eyJodHRwczovL3RvcGNvZGVyLWRldi5jb20vcm9sZXMiOlsiVG9wY29kZXIgVXNlciJdLCJodHRwczovL3RvcGNvZGVyLWRldi5jb20vdXNlcklkIjoiODU0Nzg5OSIsImh0dHBzOi8vdG9wY29kZXItZGV2LmNvbS9oYW5kbGUiOiJwc2hhaF9tYW5hZ2VyIiwiaHR0cHM6Ly90b3Bjb2Rlci1kZXYuY29tL3VzZXJfaWQiOiJhdXRoMHw0MDE1Mjg1NiIsImh0dHBzOi8vdG9wY29kZXItZGV2LmNvbS90Y3NzbyI6IjQwMTUyODU2fDgxMzRmNDhlYmUxMWE4NDhhMzc1OWU1ZWY5ZTkyZjIxNDY5MmUyMTEzMDQwYzgyYjVkOGY1ODFjNmRmY2NjODgiLCJodHRwczovL3RvcGNvZGVyLWRldi5jb20vYWN0aXZlIjp0cnVlLCJuaWNrbmFtZSI6InBzaGFoX21hbmFnZXIiLCJuYW1lIjoidmlrYXMuYWdhcndhbCtwc2hhaF9tYW5hZ2VyQHRvcGNvZGVyLmNvbSIsInBpY3R1cmUiOiJodHRwczovL3MuZ3JhdmF0YXIuY29tL2F2YXRhci85MmFmYjJmMGVkNTJmZGZhZTFmMzcxMDIxYWU2NTAxMz9zPTQ4MCZyPXBnJmQ9aHR0cHMlM0ElMkYlMkZjZG4uYXV0aDAuY29tJTJGYXZhdGFycyUyRnZpLnBuZyIsInVwZGF0ZWRfYXQiOiIyMDIwLTEwLTI0VDA4OjI4OjI0LjE4NFoiLCJlbWFpbCI6InZpa2FzLmFnYXJ3YWwrcHNoYWhfbWFuYWdlckB0b3Bjb2Rlci5jb20iLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6Ly9hdXRoLnRvcGNvZGVyLWRldi5jb20vIiwic3ViIjoiYXV0aDB8NDAxNTI4NTYiLCJhdWQiOiJCWFdYVVduaWxWVVBkTjAxdDJTZTI5VHcyWllOR1p2SCIsImlhdCI6MTYwMzU0MzMzOCwiZXhwIjozMzE2MDQ1MjczOCwibm9uY2UiOiJSMUEyY3pZdVZUWm1ialpIUkc5MlZsOURTVUo2VWxsdlFYYzNSSGg1UzNaV2RXWkRjRE5YTUVaMVh3PT0ifQ.HbAisH30DLcbFNQeIifSzk1yhDmlGHNpPi9LSZbAowo",
+ "key": "token_connect_manager_pshahcopmanag2",
+ "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwczovL3RvcGNvZGVyLWRldi5jb20vcm9sZXMiOlsiQnVzaW5lc3MgVXNlciIsIlRvcGNvZGVyIFVzZXIiLCJDb25uZWN0IENvcGlsb3QgTWFuYWdlciIsIkNvbm5lY3QgTWFuYWdlciJdLCJodHRwczovL3RvcGNvZGVyLWRldi5jb20vdXNlcklkIjoiODg3NzQ0ODkiLCJodHRwczovL3RvcGNvZGVyLWRldi5jb20vaGFuZGxlIjoicHNoYWhjb3BtYW5hZzIiLCJodHRwczovL3RvcGNvZGVyLWRldi5jb20vdXNlcl9pZCI6ImF1dGgwfDg4Nzc0NDg5IiwiaHR0cHM6Ly90b3Bjb2Rlci1kZXYuY29tL3Rjc3NvIjoiODg3NzQ0ODl8ODdhZDNiNjNiZGZjMmYyNjczNGJiMDIzMTM2YWEzM2NhYWY5MzdiNzdhZmQyYjE3YzljMWY3ZWVkZWI4IiwiaHR0cHM6Ly90b3Bjb2Rlci1kZXYuY29tL2FjdGl2ZSI6dHJ1ZSwibmlja25hbWUiOiJwc2hhaGNvcG1hbmFnMiIsIm5hbWUiOiJtYXhjZWVtK3RjK3BzaGFoY29wbWFuYWcyQGdtYWlsLmNvbSIsInBpY3R1cmUiOiJodHRwczovL3MuZ3JhdmF0YXIuY29tL2F2YXRhci8wZDY1NWNlZDM4NTFiM2JmY2I1Y2Y3Y2U3NjY0ODQwNj9zPTQ4MCZyPXBnJmQ9aHR0cHMlM0ElMkYlMkZjZG4uYXV0aDAuY29tJTJGYXZhdGFycyUyRm1hLnBuZyIsInVwZGF0ZWRfYXQiOiIyMDIxLTAxLTAyVDEyOjM3OjAxLjE2MFoiLCJlbWFpbCI6Im1heGNlZW0rdGMrcHNoYWhjb3BtYW5hZzJAZ21haWwuY29tIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImlzcyI6Imh0dHBzOi8vYXV0aC50b3Bjb2Rlci1kZXYuY29tLyIsInN1YiI6ImF1dGgwfDg4Nzc0NDg5IiwiYXVkIjoiQlhXWFVXbmlsVlVQZE4wMXQyU2UyOVR3MlpZTkdadkgiLCJpYXQiOjE2MDk1OTEwMjQsImV4cCI6MjE0NzQ4MzY0OCwibm9uY2UiOiJaVmhCV1dKbU5GbFlOa0pGU0ZWSU9VSkZTbFIrYkhoVVVEYzJmak41UkVWcFFuWkRWSFZUVlVKU1RRPT0ifQ.G-wrxaqoRH9GQS9cjqX93nRoH91tn-wPW1j_MA42lCY",
"enabled": true
},
{
@@ -58,23 +43,8 @@
"enabled": true
},
{
- "key": "projectId",
- "value": "111",
- "enabled": true
- },
- {
- "key": "project_id_16718",
- "value": "16718",
- "enabled": true
- },
- {
- "key": "project_id_16843",
- "value": "16843",
- "enabled": true
- },
- {
- "key": "jobIdCreatedByMember",
- "value": "",
+ "key": "token_m2m_create_job",
+ "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJjcmVhdGU6dGFhcy1qb2JzIiwiZ3R5IjoiY2xpZW50LWNyZWRlbnRpYWxzIn0.m-tHt9ABFj5KqzWYbLNxufVL4QvNw_y4j7w-Pj9l5_E",
"enabled": true
},
{
@@ -82,11 +52,6 @@
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnRhYXMtam9icyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.l4fH_SGhhbP8kcQoOJhhQW0eRGwC3wIwuj0_7XGj7Ac",
"enabled": true
},
- {
- "key": "token_m2m_create_job",
- "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJjcmVhdGU6dGFhcy1qb2JzIiwiZ3R5IjoiY2xpZW50LWNyZWRlbnRpYWxzIn0.m-tHt9ABFj5KqzWYbLNxufVL4QvNw_y4j7w-Pj9l5_E",
- "enabled": true
- },
{
"key": "token_m2m_update_job",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJ1cGRhdGU6dGFhcy1qb2JzIiwiZ3R5IjoiY2xpZW50LWNyZWRlbnRpYWxzIn0.AM9C6kPZmtQVN-6GtbKeMIiQIZqRk5nOcPuciClZKdY",
@@ -103,13 +68,13 @@
"enabled": true
},
{
- "key": "token_m2m_read_job_candidate",
- "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnRhYXMtam9iQ2FuZGlkYXRlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.N-5rUvF8gKHqs3rSCjlbsa6GJ9SPgJ66ZQlGYuImQXQ",
+ "key": "token_m2m_create_job_candidate",
+ "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJjcmVhdGU6dGFhcy1qb2JDYW5kaWRhdGVzIiwiZ3R5IjoiY2xpZW50LWNyZWRlbnRpYWxzIn0.SXQY7145ceuDQd8YPAv4ePyaF1JRnHtVGy1kIhzCfPk",
"enabled": true
},
{
- "key": "token_m2m_create_job_candidate",
- "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJjcmVhdGU6dGFhcy1qb2JDYW5kaWRhdGVzIiwiZ3R5IjoiY2xpZW50LWNyZWRlbnRpYWxzIn0.SXQY7145ceuDQd8YPAv4ePyaF1JRnHtVGy1kIhzCfPk",
+ "key": "token_m2m_read_job_candidate",
+ "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnRhYXMtam9iQ2FuZGlkYXRlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.N-5rUvF8gKHqs3rSCjlbsa6GJ9SPgJ66ZQlGYuImQXQ",
"enabled": true
},
{
@@ -128,13 +93,13 @@
"enabled": true
},
{
- "key": "token_m2m_read_resource_booking",
- "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnRhYXMtcmVzb3VyY2VCb29raW5ncyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.tQEMwMS7z7S1q_9vyVCvhlKKRInZ4U21KdE1lQIenjo",
+ "key": "token_m2m_create_resource_booking",
+ "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJjcmVhdGU6dGFhcy1yZXNvdXJjZUJvb2tpbmdzIiwiZ3R5IjoiY2xpZW50LWNyZWRlbnRpYWxzIn0.mE4x9DtPvjVKCib3S9qykmwAr1NsloT0ozQVOPcSdMU",
"enabled": true
},
{
- "key": "token_m2m_create_resource_booking",
- "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJjcmVhdGU6dGFhcy1yZXNvdXJjZUJvb2tpbmdzIiwiZ3R5IjoiY2xpZW50LWNyZWRlbnRpYWxzIn0.mE4x9DtPvjVKCib3S9qykmwAr1NsloT0ozQVOPcSdMU",
+ "key": "token_m2m_read_resource_booking",
+ "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnRhYXMtcmVzb3VyY2VCb29raW5ncyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.tQEMwMS7z7S1q_9vyVCvhlKKRInZ4U21KdE1lQIenjo",
"enabled": true
},
{
@@ -157,23 +122,148 @@
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnRhYXMtdGVhbXMiLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMifQ.LKd9krhA2ErAMPqLR6dEeWPG0u0JedsysrkZwvAVSMs",
"enabled": true
},
+ {
+ "key": "projectId",
+ "value": "111",
+ "enabled": true
+ },
+ {
+ "key": "project_id_16718",
+ "value": "16718",
+ "enabled": true
+ },
+ {
+ "key": "project_id_16843",
+ "value": "16843",
+ "enabled": true
+ },
+ {
+ "key": "jobId",
+ "value": "",
+ "enabled": true
+ },
{
"key": "jobIdCreatedByM2M",
- "value": "47430794-8d89-42a4-947b-341b3fe75031",
+ "value": "",
+ "enabled": true
+ },
+ {
+ "key": "jobIdCreatedByMember",
+ "value": "",
+ "enabled": true
+ },
+ {
+ "key": "jobCandidateId",
+ "value": "",
"enabled": true
},
{
"key": "jobCandidateIdCreatedByM2M",
- "value": "bdc13c45-40a2-4597-9b21-4b572a1faf25",
+ "value": "",
+ "enabled": true
+ },
+ {
+ "key": "resourceBookingId",
+ "value": "",
"enabled": true
},
{
"key": "resourceBookingIdCreatedByM2M",
- "value": "083ddc0e-710e-45f3-b4d3-1f70bf3d8713",
+ "value": "",
+ "enabled": true
+ },
+ {
+ "key": "workPeriodId",
+ "value": "",
+ "enabled": true
+ },
+ {
+ "key": "workPeriodIdCreatedByM2M",
+ "value": "",
+ "enabled": true
+ },
+ {
+ "key": "token_m2m_create_work_period",
+ "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJjcmVhdGU6dGFhcy13b3JrUGVyaW9kcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.tgKxTrlI8bu6CVFk4-kFB1gKHL-L6X8akKYYREjZiSE",
+ "enabled": true
+ },
+ {
+ "key": "token_m2m_read_work_period",
+ "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnRhYXMtd29ya1BlcmlvZHMiLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMifQ.y0-mysWkSf6YnUw9jKhxzg65ngPWNhfXzGQGCVWhXrk",
+ "enabled": true
+ },
+ {
+ "key": "token_m2m_update_work_period",
+ "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJ1cGRhdGU6dGFhcy13b3JrUGVyaW9kcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.TU4vUcrQylzIyB6hDMqqC5NucpDSRMHWd-PZ6uW_lEc",
+ "enabled": true
+ },
+ {
+ "key": "token_m2m_delete_work_period",
+ "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJkZWxldGU6dGFhcy13b3JrUGVyaW9kcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.gKWTDiVYowiTgUV9n4z2O9W-BksDgVThALR-pZ8szyY",
+ "enabled": true
+ },
+ {
+ "key": "token_m2m_all_work_period",
+ "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjIxNDc0ODM2NDgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJhbGw6dGFhcy13b3JrUGVyaW9kcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.0gEgjGsG4ftTOlfN1bTZQXw3YIvxBiCGJEBzD0bmyUE",
+ "enabled": true
+ },
+ {
+ "key": "job_id_created_by_administrator",
+ "value": "",
+ "enabled": true
+ },
+ {
+ "key": "resource_bookings_id_created_by_administrator",
+ "value": "",
+ "enabled": true
+ },
+ {
+ "key": "workPeriodId_created_by_administrator",
+ "value": "",
+ "enabled": true
+ },
+ {
+ "key": "job_id_created_by_member",
+ "value": "",
+ "enabled": true
+ },
+ {
+ "key": "resource_booking_id_created_by_member",
+ "value": "",
+ "enabled": true
+ },
+ {
+ "key": "resource_booking_id_created_for_member",
+ "value": "",
+ "enabled": true
+ },
+ {
+ "key": "workPeriodId_created_for_member",
+ "value": "",
+ "enabled": true
+ },
+ {
+ "key": "resource_booking_id_created_for_connect_manager",
+ "value": "",
+ "enabled": true
+ },
+ {
+ "key": "job_id_created_by_connect_manager",
+ "value": "",
+ "enabled": true
+ },
+ {
+ "key": "workPeriodId_created_for_connect_manager",
+ "value": "",
+ "enabled": true
+ },
+ {
+ "key": "job_candidate_id_created_by_administrator",
+ "value": "",
"enabled": true
}
],
"_postman_variable_scope": "environment",
- "_postman_exported_at": "2020-12-04T12:09:30.809Z",
- "_postman_exported_using": "Postman/7.29.0"
-}
+ "_postman_exported_at": "2021-03-30T00:44:02.221Z",
+ "_postman_exported_using": "Postman/8.0.9"
+}
\ No newline at end of file
diff --git a/local/kafka-client/Dockerfile b/local/kafka-client/Dockerfile
index e34a3ae6..64b15b36 100644
--- a/local/kafka-client/Dockerfile
+++ b/local/kafka-client/Dockerfile
@@ -1,4 +1,4 @@
-From wurstmeister/kafka
+FROM wurstmeister/kafka
WORKDIR /app/
COPY topics.txt .
COPY create-topics.sh .
diff --git a/local/kafka-client/topics.txt b/local/kafka-client/topics.txt
index 7bf08bc8..49e4d614 100644
--- a/local/kafka-client/topics.txt
+++ b/local/kafka-client/topics.txt
@@ -1,10 +1,13 @@
taas.job.create
taas.jobcandidate.create
taas.resourcebooking.create
+taas.workperiod.create
taas.job.update
taas.jobcandidate.update
taas.resourcebooking.update
+taas.workperiod.update
taas.job.delete
taas.jobcandidate.delete
taas.resourcebooking.delete
+taas.workperiod.delete
external.action.email
diff --git a/migrations/2021-01-04-make-some-resouce-booking-fields-optional.js b/migrations/2021-01-04-make-some-resouce-booking-fields-optional.js
index 5ae7e66d..f8313177 100644
--- a/migrations/2021-01-04-make-some-resouce-booking-fields-optional.js
+++ b/migrations/2021-01-04-make-some-resouce-booking-fields-optional.js
@@ -1,3 +1,5 @@
+const config = require('config')
+
/*
* Make ResourceBooking fields startDate, endDate, memberRate and customerRate optional.
*/
@@ -16,3 +18,48 @@ module.exports = {
))
}
}
+
+module.exports = {
+ up: async (queryInterface, Sequelize) => {
+ const transaction = await queryInterface.sequelize.transaction()
+ try {
+ await queryInterface.changeColumn({ tableName: 'resource_bookings', schema: config.DB_SCHEMA_NAME }, 'start_date',
+ { type: Sequelize.DATE, allowNull: true },
+ { transaction })
+ await queryInterface.changeColumn({ tableName: 'resource_bookings', schema: config.DB_SCHEMA_NAME }, 'end_date',
+ { type: Sequelize.DATE, allowNull: true }
+ , { transaction })
+ await queryInterface.changeColumn({ tableName: 'resource_bookings', schema: config.DB_SCHEMA_NAME }, 'member_rate',
+ { type: Sequelize.FLOAT, allowNull: true }
+ , { transaction })
+ await queryInterface.changeColumn({ tableName: 'resource_bookings', schema: config.DB_SCHEMA_NAME }, 'customer_rate',
+ { type: Sequelize.FLOAT, allowNull: true }
+ , { transaction })
+ await transaction.commit()
+ } catch (err) {
+ await transaction.rollback()
+ throw err
+ }
+ },
+ down: async (queryInterface, Sequelize) => {
+ const transaction = await queryInterface.sequelize.transaction()
+ try {
+ await queryInterface.changeColumn({ tableName: 'resource_bookings', schema: config.DB_SCHEMA_NAME }, 'start_date',
+ { type: Sequelize.DATE, allowNull: false },
+ { transaction })
+ await queryInterface.changeColumn({ tableName: 'resource_bookings', schema: config.DB_SCHEMA_NAME }, 'end_date',
+ { type: Sequelize.DATE, allowNull: false }
+ , { transaction })
+ await queryInterface.changeColumn({ tableName: 'resource_bookings', schema: config.DB_SCHEMA_NAME }, 'member_rate',
+ { type: Sequelize.FLOAT, allowNull: false }
+ , { transaction })
+ await queryInterface.changeColumn({ tableName: 'resource_bookings', schema: config.DB_SCHEMA_NAME }, 'customer_rate',
+ { type: Sequelize.FLOAT, allowNull: false }
+ , { transaction })
+ await transaction.commit()
+ } catch (err) {
+ await transaction.rollback()
+ throw err
+ }
+ }
+}
diff --git a/migrations/2021-01-06-job-add-title-field.js b/migrations/2021-01-06-job-add-title-field.js
index 6832332e..3423ed83 100644
--- a/migrations/2021-01-06-job-add-title-field.js
+++ b/migrations/2021-01-06-job-add-title-field.js
@@ -1,18 +1,28 @@
+const config = require('config')
+
/*
* Add title field to the Job model.
*/
module.exports = {
- up: queryInterface => {
- return Promise.all([
- queryInterface.sequelize.query('ALTER TABLE bookings.jobs ADD title VARCHAR(64)'),
- queryInterface.sequelize.query('UPDATE bookings.jobs SET title=description WHERE title is NULL'),
- queryInterface.sequelize.query('ALTER TABLE bookings.jobs ALTER COLUMN title SET NOT NULL')
- ])
+ up: async (queryInterface, Sequelize) => {
+ const transaction = await queryInterface.sequelize.transaction()
+ try {
+ await queryInterface.addColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'title',
+ { type: Sequelize.STRING(64) },
+ { transaction })
+ await queryInterface.sequelize.query(`UPDATE ${config.DB_SCHEMA_NAME}.jobs SET title = description`,
+ { transaction })
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'title',
+ { type: Sequelize.STRING(64), allowNull: false }
+ , { transaction })
+ await transaction.commit()
+ } catch (err) {
+ await transaction.rollback()
+ throw err
+ }
},
- down: queryInterface => {
- return Promise.all([
- queryInterface.sequelize.query('ALTER TABLE bookings.jobs DROP title')
- ])
+ down: async (queryInterface, Sequelize) => {
+ await queryInterface.removeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'title')
}
}
diff --git a/migrations/2021-01-07-job-candidate-add-external-id-and-resume-fields.js b/migrations/2021-01-07-job-candidate-add-external-id-and-resume-fields.js
index 6ca47bba..dbd04397 100644
--- a/migrations/2021-01-07-job-candidate-add-external-id-and-resume-fields.js
+++ b/migrations/2021-01-07-job-candidate-add-external-id-and-resume-fields.js
@@ -1,18 +1,36 @@
+const config = require('config')
+
/*
* Add externalId and resume fields to the JobCandidate model.
*/
module.exports = {
- up: queryInterface => {
- return Promise.all([
- queryInterface.sequelize.query('ALTER TABLE bookings.job_candidates ADD external_id VARCHAR(255)'),
- queryInterface.sequelize.query('ALTER TABLE bookings.job_candidates ADD resume VARCHAR(2048)')
- ])
+ up: async (queryInterface, Sequelize) => {
+ const transaction = await queryInterface.sequelize.transaction()
+ try {
+ await queryInterface.addColumn({ tableName: 'job_candidates', schema: config.DB_SCHEMA_NAME }, 'external_id',
+ { type: Sequelize.STRING(255) },
+ { transaction })
+ await queryInterface.addColumn({ tableName: 'job_candidates', schema: config.DB_SCHEMA_NAME }, 'resume',
+ { type: Sequelize.STRING(2048) },
+ { transaction })
+ await transaction.commit()
+ } catch (err) {
+ await transaction.rollback()
+ throw err
+ }
},
- down: queryInterface => {
- return Promise.all([
- queryInterface.sequelize.query('ALTER TABLE bookings.job_candidates DROP external_id'),
- queryInterface.sequelize.query('ALTER TABLE bookings.job_candidates DROP resume')
- ])
+ down: async (queryInterface, Sequelize) => {
+ const transaction = await queryInterface.sequelize.transaction()
+ try {
+ await queryInterface.removeColumn({ tableName: 'job_candidates', schema: config.DB_SCHEMA_NAME }, 'resume',
+ { transaction })
+ await queryInterface.removeColumn({ tableName: 'job_candidates', schema: config.DB_SCHEMA_NAME }, 'external_id',
+ { transaction })
+ await transaction.commit()
+ } catch (err) {
+ await transaction.rollback()
+ throw err
+ }
}
}
diff --git a/migrations/2021-01-09-make-some-job-fields-optional.js b/migrations/2021-01-09-make-some-job-fields-optional.js
index 88a7fc32..9bd224e4 100644
--- a/migrations/2021-01-09-make-some-job-fields-optional.js
+++ b/migrations/2021-01-09-make-some-job-fields-optional.js
@@ -1,26 +1,68 @@
+const config = require('config')
+
/*
* Make Job fields externalId, description, startDate, endDate, resourceType, rateType and workload optional.
*/
-const targetFields = [
- 'external_id',
- 'description',
- 'start_date',
- 'end_date',
- 'resource_type',
- 'rate_type',
- 'workload'
-]
-
module.exports = {
- up: queryInterface => {
- return Promise.all(targetFields.map(field =>
- queryInterface.sequelize.query(`ALTER TABLE bookings.jobs ALTER COLUMN ${field} DROP NOT NULL`)
- ))
+ up: async (queryInterface, Sequelize) => {
+ const transaction = await queryInterface.sequelize.transaction()
+ try {
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'external_id',
+ { type: Sequelize.STRING(255), allowNull: true },
+ { transaction })
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'description',
+ { type: Sequelize.STRING(255), allowNull: true }
+ , { transaction })
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'start_date',
+ { type: Sequelize.DATE, allowNull: true }
+ , { transaction })
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'end_date',
+ { type: Sequelize.DATE, allowNull: true }
+ , { transaction })
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'resource_type',
+ { type: Sequelize.STRING(255), allowNull: true }
+ , { transaction })
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'rate_type',
+ { type: Sequelize.STRING(255), allowNull: true }
+ , { transaction })
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'workload',
+ { type: Sequelize.STRING(45), allowNull: true }
+ , { transaction })
+ await transaction.commit()
+ } catch (err) {
+ await transaction.rollback()
+ throw err
+ }
},
- down: queryInterface => {
- return Promise.all(targetFields.map(field =>
- queryInterface.sequelize.query(`ALTER TABLE bookings.jobs ALTER COLUMN ${field} SET NOT NULL`)
- ))
+ down: async (queryInterface, Sequelize) => {
+ const transaction = await queryInterface.sequelize.transaction()
+ try {
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'external_id',
+ { type: Sequelize.STRING(255), allowNull: false },
+ { transaction })
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'description',
+ { type: Sequelize.STRING(255), allowNull: false }
+ , { transaction })
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'start_date',
+ { type: Sequelize.DATE, allowNull: false }
+ , { transaction })
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'end_date',
+ { type: Sequelize.DATE, allowNull: false }
+ , { transaction })
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'resource_type',
+ { type: Sequelize.STRING(255), allowNull: false }
+ , { transaction })
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'rate_type',
+ { type: Sequelize.STRING(255), allowNull: false }
+ , { transaction })
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'workload',
+ { type: Sequelize.STRING(45), allowNull: false }
+ , { transaction })
+ await transaction.commit()
+ } catch (err) {
+ await transaction.rollback()
+ throw err
+ }
}
}
diff --git a/migrations/2021-01-13-make-some-job-fields-longer.js b/migrations/2021-01-13-make-some-job-fields-longer.js
index 286fd888..615f97a1 100644
--- a/migrations/2021-01-13-make-some-job-fields-longer.js
+++ b/migrations/2021-01-13-make-some-job-fields-longer.js
@@ -1,3 +1,5 @@
+const config = require('config')
+
/*
* Make some Job fields longer
* title: 64 -> 128
@@ -5,16 +7,34 @@
*/
module.exports = {
- up: queryInterface => {
- return Promise.all([
- queryInterface.sequelize.query(`ALTER TABLE bookings.jobs ALTER COLUMN title TYPE VARCHAR(128)`),
- queryInterface.sequelize.query(`ALTER TABLE bookings.jobs ALTER COLUMN description TYPE TEXT`)
- ])
+ up: async (queryInterface, Sequelize) => {
+ const transaction = await queryInterface.sequelize.transaction()
+ try {
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'title',
+ { type: Sequelize.STRING(128), allowNull: false },
+ { transaction })
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'description',
+ { type: Sequelize.TEXT },
+ { transaction })
+ await transaction.commit()
+ } catch (err) {
+ await transaction.rollback()
+ throw err
+ }
},
- down: queryInterface => {
- return Promise.all([
- queryInterface.sequelize.query(`ALTER TABLE bookings.jobs ALTER COLUMN title TYPE VARCHAR(64)`),
- queryInterface.sequelize.query(`ALTER TABLE bookings.jobs ALTER COLUMN description TYPE VARCHAR(255)`)
- ])
+ down: async (queryInterface, Sequelize) => {
+ const transaction = await queryInterface.sequelize.transaction()
+ try {
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'title',
+ { type: Sequelize.STRING(64), allowNull: false },
+ { transaction })
+ await queryInterface.changeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'description',
+ { type: Sequelize.STRING(255) },
+ { transaction })
+ await transaction.commit()
+ } catch (err) {
+ await transaction.rollback()
+ throw err
+ }
}
}
diff --git a/migrations/2021-02-10-job-replace-end-date-with-duration.js b/migrations/2021-02-10-job-replace-end-date-with-duration.js
index d7e81096..5630f9e5 100644
--- a/migrations/2021-02-10-job-replace-end-date-with-duration.js
+++ b/migrations/2021-02-10-job-replace-end-date-with-duration.js
@@ -1,18 +1,40 @@
+const config = require('config')
+
/*
* Replace endData with duration in Job model.
*/
module.exports = {
- up: queryInterface => {
- return Promise.all([
- queryInterface.sequelize.query('ALTER TABLE bookings.jobs DROP end_date'),
- queryInterface.sequelize.query('ALTER TABLE bookings.jobs ADD duration INTEGER')
- ])
+ up: async (queryInterface, Sequelize) => {
+ const transaction = await queryInterface.sequelize.transaction()
+ try {
+ await queryInterface.addColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'duration',
+ { type: Sequelize.INTEGER },
+ { transaction })
+ await queryInterface.sequelize.query(`UPDATE ${config.DB_SCHEMA_NAME}.jobs SET duration = DATE_PART('day', end_date - start_date)`,
+ { transaction })
+ await queryInterface.removeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'end_date',
+ { transaction })
+ await transaction.commit()
+ } catch (err) {
+ await transaction.rollback()
+ throw err
+ }
},
- down: queryInterface => {
- return Promise.all([
- queryInterface.sequelize.query('ALTER TABLE bookings.jobs ADD end_date DATE'),
- queryInterface.sequelize.query('ALTER TABLE bookings.jobs DROP duration')
- ])
+ down: async (queryInterface, Sequelize) => {
+ const transaction = await queryInterface.sequelize.transaction()
+ try {
+ await queryInterface.addColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'end_date',
+ { type: Sequelize.DATE },
+ { transaction })
+ await queryInterface.sequelize.query(`UPDATE ${config.DB_SCHEMA_NAME}.jobs SET end_date = start_date + COALESCE(duration,0) * INTERVAL '1 day'`,
+ { transaction })
+ await queryInterface.removeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'duration',
+ { transaction })
+ await transaction.commit()
+ } catch (err) {
+ await transaction.rollback()
+ throw err
+ }
}
}
diff --git a/migrations/2021-02-27-job-add-is-application-page-active-field.js b/migrations/2021-02-27-job-add-is-application-page-active-field.js
index 84e548a4..f16f7cea 100644
--- a/migrations/2021-02-27-job-add-is-application-page-active-field.js
+++ b/migrations/2021-02-27-job-add-is-application-page-active-field.js
@@ -1,19 +1,27 @@
+const config = require('config')
+
/*
* Add isApplicationPageActive field to the Job model.
*/
module.exports = {
- up: queryInterface => {
- return Promise.all([
- queryInterface.sequelize.query('ALTER TABLE bookings.jobs ADD is_application_page_active BOOLEAN NOT NULL DEFAULT false'),
- // this command looks like does nothing, because we already set default value to `null` and this column cannot be `NULL`
- // but we keep it as it was tested this way, and it looks harmful
- queryInterface.sequelize.query('UPDATE bookings.jobs SET is_application_page_active=false WHERE is_application_page_active is NULL'),
- ])
+ up: async (queryInterface, Sequelize) => {
+ const transaction = await queryInterface.sequelize.transaction()
+ try {
+ await queryInterface.addColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'is_application_page_active',
+ { type: Sequelize.BOOLEAN, allowNull: false, defaultValue: false },
+ { transaction })
+ await queryInterface.bulkUpdate({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME },
+ { is_application_page_active: false },
+ { is_application_page_active: null },
+ { transaction })
+ await transaction.commit()
+ } catch (err) {
+ await transaction.rollback()
+ throw err
+ }
},
- down: queryInterface => {
- return Promise.all([
- queryInterface.sequelize.query('ALTER TABLE bookings.jobs DROP is_application_page_active')
- ])
+ down: async (queryInterface, Sequelize) => {
+ await queryInterface.removeColumn({ tableName: 'jobs', schema: config.DB_SCHEMA_NAME }, 'is_application_page_active')
}
}
diff --git a/migrations/2021-03-30-work-period-table-create.js b/migrations/2021-03-30-work-period-table-create.js
new file mode 100644
index 00000000..bf6cdb0f
--- /dev/null
+++ b/migrations/2021-03-30-work-period-table-create.js
@@ -0,0 +1,119 @@
+const config = require('config')
+
+/*
+ * Create work_periods table and reference to the "resource_bookings" table
+ */
+
+module.exports = {
+ up: async (queryInterface, Sequelize) => {
+ // because our migration have more than one step we use transaction
+ const transaction = await queryInterface.sequelize.transaction()
+ try {
+ await queryInterface.createTable('work_periods', {
+ id: {
+ type: Sequelize.UUID,
+ primaryKey: true,
+ allowNull: false,
+ defaultValue: Sequelize.UUIDV4
+ },
+ resourceBookingId: {
+ field: 'resource_booking_id',
+ type: Sequelize.UUID,
+ allowNull: false,
+ references: {
+ model: {
+ tableName: 'resource_bookings',
+ schema: config.DB_SCHEMA_NAME
+ },
+ key: 'id'
+ },
+ onUpdate: 'CASCADE',
+ onDelete: 'CASCADE',
+ },
+ userHandle: {
+ field: 'user_handle',
+ type: Sequelize.STRING(50),
+ allowNull: false
+ },
+ projectId: {
+ field: 'project_id',
+ type: Sequelize.INTEGER,
+ allowNull: false
+ },
+ startDate: {
+ field: 'start_date',
+ type: Sequelize.DATEONLY,
+ allowNull: false
+ },
+ endDate: {
+ field: 'end_date',
+ type: Sequelize.DATEONLY,
+ allowNull: false
+ },
+ daysWorked: {
+ field: 'days_worked',
+ type: Sequelize.INTEGER
+ },
+ memberRate: {
+ field: 'member_rate',
+ type: Sequelize.FLOAT
+ },
+ customerRate: {
+ field: 'customer_rate',
+ type: Sequelize.FLOAT
+ },
+ paymentStatus: {
+ field: 'payment_status',
+ type: Sequelize.STRING(50),
+ allowNull: false
+ },
+ createdBy: {
+ field: 'created_by',
+ type: Sequelize.UUID,
+ allowNull: false
+ },
+ updatedBy: {
+ field: 'updated_by',
+ type: Sequelize.UUID
+ },
+ createdAt: {
+ field: 'created_at',
+ type: Sequelize.DATE
+ },
+ updatedAt: {
+ field: 'updated_at',
+ type: Sequelize.DATE
+ },
+ deletedAt: {
+ field: 'deleted_at',
+ type: Sequelize.DATE
+ }
+ }, {
+ schema: 'bookings',
+ transaction
+ })
+ await queryInterface.addIndex(
+ {
+ tableName: 'work_periods',
+ schema: config.DB_SCHEMA_NAME
+ },
+ ['resource_booking_id', 'start_date', 'end_date'],
+ {
+ type: 'UNIQUE',
+ where: { deleted_at: null },
+ transaction: transaction
+ }
+ )
+ await transaction.commit()
+ } catch (err) {
+ await transaction.rollback()
+ throw err
+ }
+ },
+ down: async (queryInterface, Sequelize) => {
+ await queryInterface.dropTable({
+ tableName: 'work_periods',
+ schema: config.DB_SCHEMA_NAME
+ })
+ }
+}
diff --git a/package-lock.json b/package-lock.json
index 97150812..225069c1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -418,7 +418,6 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@joi/date/-/date-2.0.1.tgz",
"integrity": "sha512-vAnBxaPmyXRmHlbr5H3zY6x8ToW1a3c3gCo91dsf/HPKP2vS4sz2xzjyCE1up0vmFmSWgfDIyJMpRWVOG2cpZQ==",
- "dev": true,
"requires": {
"moment": "2.x.x"
}
diff --git a/package.json b/package.json
index 23621ca5..86ab71ce 100644
--- a/package.json
+++ b/package.json
@@ -15,6 +15,7 @@
"index:jobs": "node scripts/es/reIndexJobs.js",
"index:job-candidates": "node scripts/es/reIndexJobCandidates.js",
"index:resource-bookings": "node scripts/es/reIndexResourceBookings.js",
+ "index:work-periods": "node scripts/es/reIndexWorkPeriods.js",
"data:export": "node scripts/data/exportData.js",
"data:import": "node scripts/data/importData.js",
"migrate": "npx sequelize db:migrate",
@@ -32,6 +33,7 @@
"license": "ISC",
"dependencies": {
"@elastic/elasticsearch": "^7.9.1",
+ "@joi/date": "^2.0.1",
"@topcoder-platform/topcoder-bus-api-wrapper": "github:topcoder-platform/tc-bus-api-wrapper",
"aws-sdk": "^2.787.0",
"bottleneck": "^2.19.5",
@@ -59,7 +61,6 @@
"winston": "^3.3.3"
},
"devDependencies": {
- "@joi/date": "^2.0.1",
"chai": "^4.2.0",
"csv-parser": "^3.0.0",
"mocha": "^8.1.3",
diff --git a/scripts/data/exportData.js b/scripts/data/exportData.js
index c443cb38..858988d7 100644
--- a/scripts/data/exportData.js
+++ b/scripts/data/exportData.js
@@ -7,7 +7,7 @@ const helper = require('../../src/common/helper')
const filePath = helper.getParamFromCliArgs() || config.DEFAULT_DATA_FILE_PATH
const userPrompt = `WARNING: are you sure you want to export all data in the database to a json file with the path ${filePath}? This will overwrite the file.`
-const dataModels = ['Job', 'JobCandidate', 'ResourceBooking']
+const dataModels = ['Job', 'JobCandidate', 'ResourceBooking', 'WorkPeriod']
async function exportData () {
await helper.promptUser(userPrompt, async () => {
diff --git a/scripts/data/importData.js b/scripts/data/importData.js
index 1f51e61c..f1770196 100644
--- a/scripts/data/importData.js
+++ b/scripts/data/importData.js
@@ -7,7 +7,7 @@ const helper = require('../../src/common/helper')
const filePath = helper.getParamFromCliArgs() || config.DEFAULT_DATA_FILE_PATH
const userPrompt = `WARNING: this would remove existing data. Are you sure you want to import data from a json file with the path ${filePath}?`
-const dataModels = ['Job', 'JobCandidate', 'ResourceBooking']
+const dataModels = ['Job', 'JobCandidate', 'ResourceBooking', 'WorkPeriod']
async function importData () {
await helper.promptUser(userPrompt, async () => {
diff --git a/scripts/es/createIndex.js b/scripts/es/createIndex.js
index d2c72943..4591214a 100644
--- a/scripts/es/createIndex.js
+++ b/scripts/es/createIndex.js
@@ -8,7 +8,8 @@ const helper = require('../../src/common/helper')
const indices = [
config.get('esConfig.ES_INDEX_JOB'),
config.get('esConfig.ES_INDEX_JOB_CANDIDATE'),
- config.get('esConfig.ES_INDEX_RESOURCE_BOOKING')
+ config.get('esConfig.ES_INDEX_RESOURCE_BOOKING'),
+ config.get('esConfig.ES_INDEX_WORK_PERIOD')
]
const userPrompt = `WARNING: Are you sure want to create the following elasticsearch indices: ${indices}?`
diff --git a/scripts/es/deleteIndex.js b/scripts/es/deleteIndex.js
index 6e30995a..8acffe33 100644
--- a/scripts/es/deleteIndex.js
+++ b/scripts/es/deleteIndex.js
@@ -8,7 +8,8 @@ const helper = require('../../src/common/helper')
const indices = [
config.get('esConfig.ES_INDEX_JOB'),
config.get('esConfig.ES_INDEX_JOB_CANDIDATE'),
- config.get('esConfig.ES_INDEX_RESOURCE_BOOKING')
+ config.get('esConfig.ES_INDEX_RESOURCE_BOOKING'),
+ config.get('esConfig.ES_INDEX_WORK_PERIOD')
]
const userPrompt = `WARNING: this would remove existent data! Are you sure want to delete the following eleasticsearch indices: ${indices}?`
diff --git a/scripts/es/reIndexAll.js b/scripts/es/reIndexAll.js
index 65ddc2ec..215efaa2 100644
--- a/scripts/es/reIndexAll.js
+++ b/scripts/es/reIndexAll.js
@@ -13,6 +13,7 @@ async function indexAll () {
await helper.indexBulkDataToES('Job', config.get('esConfig.ES_INDEX_JOB'), logger)
await helper.indexBulkDataToES('JobCandidate', config.get('esConfig.ES_INDEX_JOB_CANDIDATE'), logger)
await helper.indexBulkDataToES('ResourceBooking', config.get('esConfig.ES_INDEX_RESOURCE_BOOKING'), logger)
+ await helper.indexBulkDataToES('WorkPeriod', config.get('esConfig.ES_INDEX_WORK_PERIOD'), logger)
process.exit(0)
} catch (err) {
logger.logFullError(err, { component: 'indexAll' })
diff --git a/scripts/es/reIndexWorkPeriods.js b/scripts/es/reIndexWorkPeriods.js
new file mode 100644
index 00000000..a759d6c1
--- /dev/null
+++ b/scripts/es/reIndexWorkPeriods.js
@@ -0,0 +1,37 @@
+/**
+ * Reindex WorkPeriods data in Elasticsearch using data from database
+ */
+const config = require('config')
+const logger = require('../../src/common/logger')
+const helper = require('../../src/common/helper')
+
+const workPeriodId = helper.getParamFromCliArgs()
+const index = config.get('esConfig.ES_INDEX_WORK_PERIOD')
+const reIndexAllWorkPeriodsPrompt = `WARNING: this would remove existent data! Are you sure you want to reindex the index ${index}`
+const reIndexWorkPeriodPrompt = `WARNING: this would remove existent data! Are you sure you want to reindex the document with id ${workPeriodId} in index ${index}?`
+
+async function reIndexWorkPeriods () {
+ if (workPeriodId === null) {
+ await helper.promptUser(reIndexAllWorkPeriodsPrompt, async () => {
+ try {
+ await helper.indexBulkDataToES('WorkPeriod', index, logger)
+ process.exit(0)
+ } catch (err) {
+ logger.logFullError(err, { component: 'reIndexWorkPeriods' })
+ process.exit(1)
+ }
+ })
+ } else {
+ await helper.promptUser(reIndexWorkPeriodPrompt, async () => {
+ try {
+ await helper.indexDataToEsById(workPeriodId, 'WorkPeriod', index, logger)
+ process.exit(0)
+ } catch (err) {
+ logger.logFullError(err, { component: 'reIndexWorkPeriods' })
+ process.exit(1)
+ }
+ })
+ }
+}
+
+reIndexWorkPeriods()
diff --git a/src/bootstrap.js b/src/bootstrap.js
index 918a37e9..a85bdec4 100644
--- a/src/bootstrap.js
+++ b/src/bootstrap.js
@@ -10,6 +10,7 @@ Joi.jobStatus = () => Joi.string().valid('sourcing', 'in-review', 'assigned', 'c
Joi.workload = () => Joi.string().valid('full-time', 'fractional')
Joi.jobCandidateStatus = () => Joi.string().valid('open', 'selected', 'shortlist', 'rejected', 'cancelled', 'interview')
Joi.title = () => Joi.string().max(128)
+Joi.paymentStatus = () => Joi.string().valid('pending', 'partially-completed', 'completed', 'cancelled')
// Empty string is not allowed by Joi by default and must be enabled with allow('').
// See https://joi.dev/api/?v=17.3.0#string fro details why it's like this.
// In many cases we would like to allow empty string to make it easier to create UI for editing data.
diff --git a/src/common/helper.js b/src/common/helper.js
index 0f456215..da86c854 100644
--- a/src/common/helper.js
+++ b/src/common/helper.js
@@ -102,6 +102,22 @@ esIndexPropertyMapping[config.get('esConfig.ES_INDEX_RESOURCE_BOOKING')] = {
updatedAt: { type: 'date' },
updatedBy: { type: 'keyword' }
}
+esIndexPropertyMapping[config.get('esConfig.ES_INDEX_WORK_PERIOD')] = {
+ resourceBookingId: { type: 'keyword' },
+ userHandle: { type: 'keyword' },
+ projectId: { type: 'integer' },
+ userId: { type: 'keyword' },
+ startDate: { type: 'date', format: 'yyyy-MM-dd' },
+ endDate: { type: 'date', format: 'yyyy-MM-dd' },
+ daysWorked: { type: 'integer' },
+ memberRate: { type: 'float' },
+ customerRate: { type: 'float' },
+ paymentStatus: { type: 'keyword' },
+ createdAt: { type: 'date' },
+ createdBy: { type: 'keyword' },
+ updatedAt: { type: 'date' },
+ updatedBy: { type: 'keyword' }
+}
/**
* Get the first parameter from cli arguments
@@ -916,6 +932,16 @@ async function ensureJobById (jobId) {
return models.Job.findById(jobId)
}
+/**
+ * Ensure resource booking with specific id exists.
+ *
+ * @param {String} resourceBookingId the job id
+ * @returns {Object} the job data
+ */
+async function ensureResourceBookingById (resourceBookingId) {
+ return models.ResourceBooking.findById(resourceBookingId)
+}
+
/**
* Ensure user with specific id exists.
*
@@ -1151,6 +1177,7 @@ module.exports = {
getTopcoderSkills,
getSkillById,
ensureJobById,
+ ensureResourceBookingById,
ensureUserById,
getAuditM2Muser,
checkIsMemberOfProject,
diff --git a/src/controllers/WorkPeriodController.js b/src/controllers/WorkPeriodController.js
new file mode 100644
index 00000000..6d36e874
--- /dev/null
+++ b/src/controllers/WorkPeriodController.js
@@ -0,0 +1,72 @@
+/**
+ * Controller for ResourceBooking endpoints
+ */
+const HttpStatus = require('http-status-codes')
+const service = require('../services/WorkPeriodService')
+const helper = require('../common/helper')
+
+/**
+ * Get workPeriod by id
+ * @param req the request
+ * @param res the response
+ */
+async function getWorkPeriod (req, res) {
+ res.send(await service.getWorkPeriod(req.authUser, req.params.id, req.query.fromDb))
+}
+
+/**
+ * Create workPeriod
+ * @param req the request
+ * @param res the response
+ */
+async function createWorkPeriod (req, res) {
+ res.send(await service.createWorkPeriod(req.authUser, req.body))
+}
+
+/**
+ * Partially update workPeriod by id
+ * @param req the request
+ * @param res the response
+ */
+async function partiallyUpdateWorkPeriod (req, res) {
+ res.send(await service.partiallyUpdateWorkPeriod(req.authUser, req.params.id, req.body))
+}
+
+/**
+ * Fully update workPeriod by id
+ * @param req the request
+ * @param res the response
+ */
+async function fullyUpdateWorkPeriod (req, res) {
+ res.send(await service.fullyUpdateWorkPeriod(req.authUser, req.params.id, req.body))
+}
+
+/**
+ * Delete workPeriod by id
+ * @param req the request
+ * @param res the response
+ */
+async function deleteWorkPeriod (req, res) {
+ await service.deleteWorkPeriod(req.authUser, req.params.id)
+ res.status(HttpStatus.NO_CONTENT).end()
+}
+
+/**
+ * Search workPeriods
+ * @param req the request
+ * @param res the response
+ */
+async function searchWorkPeriods (req, res) {
+ const result = await service.searchWorkPeriods(req.authUser, req.query)
+ helper.setResHeaders(req, res, result)
+ res.send(result.result)
+}
+
+module.exports = {
+ getWorkPeriod,
+ createWorkPeriod,
+ partiallyUpdateWorkPeriod,
+ fullyUpdateWorkPeriod,
+ deleteWorkPeriod,
+ searchWorkPeriods
+}
diff --git a/src/models/ResourceBooking.js b/src/models/ResourceBooking.js
index 2b6b0b7f..3cfe26fb 100644
--- a/src/models/ResourceBooking.js
+++ b/src/models/ResourceBooking.js
@@ -10,6 +10,7 @@ module.exports = (sequelize) => {
*/
static associate (models) {
ResourceBooking.belongsTo(models.Job, { foreignKey: 'jobId' })
+ ResourceBooking.hasMany(models.WorkPeriod, { foreignKey: 'resourceBookingId' })
}
/**
diff --git a/src/models/WorkPeriod.js b/src/models/WorkPeriod.js
new file mode 100644
index 00000000..b5117532
--- /dev/null
+++ b/src/models/WorkPeriod.js
@@ -0,0 +1,136 @@
+const { Sequelize, Model } = require('sequelize')
+const config = require('config')
+const errors = require('../common/errors')
+
+module.exports = (sequelize) => {
+ class WorkPeriod extends Model {
+ /**
+ * Create association between models
+ * @param {Object} models the database models
+ */
+ static associate (models) {
+ WorkPeriod.belongsTo(models.ResourceBooking, { foreignKey: 'resourceBookingId' })
+ }
+
+ /**
+ * Get work period by id
+ * @param {String} id the work period id
+ * @returns {WorkPeriod} the work period instance
+ */
+ static async findById (id) {
+ const workPeriod = await WorkPeriod.findOne({
+ where: {
+ id
+ }
+ })
+ if (!workPeriod) {
+ throw new errors.NotFoundError(`id: ${id} "WorkPeriod" doesn't exists.`)
+ }
+ return workPeriod
+ }
+ }
+ WorkPeriod.init(
+ {
+ id: {
+ type: Sequelize.UUID,
+ primaryKey: true,
+ allowNull: false,
+ defaultValue: Sequelize.UUIDV4
+ },
+ resourceBookingId: {
+ field: 'resource_booking_id',
+ type: Sequelize.UUID,
+ allowNull: false
+ },
+ userHandle: {
+ field: 'user_handle',
+ type: Sequelize.STRING(50),
+ allowNull: false
+ },
+ projectId: {
+ field: 'project_id',
+ type: Sequelize.INTEGER,
+ allowNull: false
+ },
+ startDate: {
+ field: 'start_date',
+ type: Sequelize.DATEONLY,
+ allowNull: false
+ },
+ endDate: {
+ field: 'end_date',
+ type: Sequelize.DATEONLY,
+ allowNull: false
+ },
+ daysWorked: {
+ field: 'days_worked',
+ type: Sequelize.INTEGER
+ },
+ memberRate: {
+ field: 'member_rate',
+ type: Sequelize.FLOAT
+ },
+ customerRate: {
+ field: 'customer_rate',
+ type: Sequelize.FLOAT
+ },
+ paymentStatus: {
+ field: 'payment_status',
+ type: Sequelize.STRING(50),
+ allowNull: false
+ },
+ createdBy: {
+ field: 'created_by',
+ type: Sequelize.UUID,
+ allowNull: false
+ },
+ updatedBy: {
+ field: 'updated_by',
+ type: Sequelize.UUID
+ },
+ createdAt: {
+ field: 'created_at',
+ type: Sequelize.DATE
+ },
+ updatedAt: {
+ field: 'updated_at',
+ type: Sequelize.DATE
+ },
+ deletedAt: {
+ field: 'deleted_at',
+ type: Sequelize.DATE
+ }
+ },
+ {
+ schema: config.DB_SCHEMA_NAME,
+ sequelize,
+ tableName: 'work_periods',
+ paranoid: true,
+ deletedAt: 'deletedAt',
+ createdAt: 'createdAt',
+ updatedAt: 'updatedAt',
+ timestamps: true,
+ defaultScope: {
+ attributes: {
+ exclude: ['deletedAt']
+ }
+ },
+ hooks: {
+ afterCreate: (workPeriod) => {
+ delete workPeriod.dataValues.deletedAt
+ }
+ },
+ indexes: [
+ {
+ unique: true,
+ fields: ['resource_booking_id', 'start_date', 'end_date'],
+ where: {
+ deleted_at: null
+ }
+ }
+ ]
+ }
+ )
+
+ return WorkPeriod
+}
diff --git a/src/routes/WorkPeriodRoutes.js b/src/routes/WorkPeriodRoutes.js
new file mode 100644
index 00000000..42e61de4
--- /dev/null
+++ b/src/routes/WorkPeriodRoutes.js
@@ -0,0 +1,47 @@
+/**
+ * Contains workPeriod routes
+ */
+const constants = require('../../app-constants')
+
+module.exports = {
+ '/workPeriods': {
+ post: {
+ controller: 'WorkPeriodController',
+ method: 'createWorkPeriod',
+ auth: 'jwt',
+ scopes: [constants.Scopes.CREATE_WORK_PERIOD, constants.Scopes.ALL_WORK_PERIOD]
+ },
+ get: {
+ controller: 'WorkPeriodController',
+ method: 'searchWorkPeriods',
+ auth: 'jwt',
+ scopes: [constants.Scopes.READ_WORK_PERIOD, constants.Scopes.ALL_WORK_PERIOD]
+ }
+ },
+ '/workPeriods/:id': {
+ get: {
+ controller: 'WorkPeriodController',
+ method: 'getWorkPeriod',
+ auth: 'jwt',
+ scopes: [constants.Scopes.READ_WORK_PERIOD, constants.Scopes.ALL_WORK_PERIOD]
+ },
+ put: {
+ controller: 'WorkPeriodController',
+ method: 'fullyUpdateWorkPeriod',
+ auth: 'jwt',
+ scopes: [constants.Scopes.UPDATE_WORK_PERIOD, constants.Scopes.ALL_WORK_PERIOD]
+ },
+ patch: {
+ controller: 'WorkPeriodController',
+ method: 'partiallyUpdateWorkPeriod',
+ auth: 'jwt',
+ scopes: [constants.Scopes.UPDATE_WORK_PERIOD, constants.Scopes.ALL_WORK_PERIOD]
+ },
+ delete: {
+ controller: 'WorkPeriodController',
+ method: 'deleteWorkPeriod',
+ auth: 'jwt',
+ scopes: [constants.Scopes.DELETE_WORK_PERIOD, constants.Scopes.ALL_WORK_PERIOD]
+ }
+ }
+}
diff --git a/src/services/WorkPeriodService.js b/src/services/WorkPeriodService.js
new file mode 100644
index 00000000..4f143979
--- /dev/null
+++ b/src/services/WorkPeriodService.js
@@ -0,0 +1,495 @@
+/**
+ * This service provides operations of WorkPeriod.
+ */
+
+const _ = require('lodash')
+const Joi = require('joi').extend(require('@joi/date'))
+const config = require('config')
+const HttpStatus = require('http-status-codes')
+const { Op } = require('sequelize')
+const uuid = require('uuid')
+const helper = require('../common/helper')
+const logger = require('../common/logger')
+const errors = require('../common/errors')
+const models = require('../models')
+const moment = require('moment')
+
+const WorkPeriod = models.WorkPeriod
+const esClient = helper.getESClient()
+
+// "startDate" and "endDate" should always represent one week:
+// "startDate" should be always Monday and "endDate" should be always Sunday of the same week.
+// It should not include time or timezone, only date.
+Joi.workPeriodStartDate = () => Joi.date().format('YYYY-MM-DD').custom((value, helpers) => {
+ const date = new Date(value)
+ const weekDay = date.getDay()
+ if (weekDay !== 0) {
+ return helpers.message('startDate should be always Sunday')
+ }
+ return value
+})
+Joi.workPeriodEndDate = () => Joi.date()
+ .when('startDate', {
+ is: Joi.exist(),
+ then: Joi.date().format('YYYY-MM-DD').equal(Joi.ref('startDate', {
+ adjust: (value) => {
+ const date = new Date(value)
+ date.setDate(date.getDate() + 6)
+ return date
+ }
+ })).messages({
+ 'any.only': 'endDate should be always the next Saturday'
+ }),
+ otherwise: Joi.date().format('YYYY-MM-DD').custom((value, helpers) => {
+ const date = new Date(value)
+ const weekDay = date.getDay()
+ if (weekDay !== 6) {
+ return helpers.message('endDate should be always Saturday')
+ }
+ return value
+ }).required()
+ })
+Joi.workPeriodEndDateOptional = () => Joi.date()
+ .when('startDate', {
+ is: Joi.exist(),
+ then: Joi.date().format('YYYY-MM-DD').equal(Joi.ref('startDate', {
+ adjust: (value) => {
+ const date = new Date(value)
+ date.setDate(date.getDate() + 6)
+ return date
+ }
+ })).messages({
+ 'any.only': 'endDate should be always the next Saturday'
+ }),
+ otherwise: Joi.date().format('YYYY-MM-DD').custom((value, helpers) => {
+ const date = new Date(value)
+ const weekDay = date.getDay()
+ if (weekDay !== 6) {
+ return helpers.message('endDate should be always Saturday')
+ }
+ return value
+ })
+ })
+
+/**
+ * filter fields of work period by user role.
+ * @param {Object} currentUser the user who perform this operation.
+ * @param {Object} workPeriod the workPeriod with all fields
+ * @returns {Object} the workPeriod
+ */
+async function _getWorkPeriodFilteringFields (currentUser, workPeriod) {
+ if (currentUser.hasManagePermission || currentUser.isMachine) {
+ return workPeriod
+ }
+ return _.omit(workPeriod, 'memberRate')
+}
+
+/**
+ * Check user permission for getting work period.
+ *
+ * @param {Object} currentUser the user who perform this operation.
+ * @param {String} projectId the project id
+ * @returns {undefined}
+ */
+async function _checkUserPermissionForGetWorkPeriod (currentUser, projectId) {
+ if (!currentUser.hasManagePermission && !currentUser.isMachine && !currentUser.isConnectManager) {
+ await helper.checkIsMemberOfProject(currentUser.userId, projectId)
+ }
+}
+
+/**
+ * Check user permission for creating or updating work period.
+ *
+ * @param {Object} currentUser the user who perform this operation.
+ * @returns {undefined}
+ */
+async function _checkUserPermissionForWriteWorkPeriod (currentUser) {
+ if (!currentUser.hasManagePermission && !currentUser.isMachine) {
+ throw new errors.ForbiddenError('You are not allowed to perform this action!')
+ }
+}
+
+/**
+ * Checks if one of the date is missing and autocalculates it.
+ * @param {Object} data workPeriod data object
+ */
+function _autoCalculateDates (data) {
+ if (data.startDate && !data.endDate) {
+ const date = new Date(data.startDate)
+ date.setDate(date.getDate() + 6)
+ data.endDate = date
+ } else if (!data.startDate && data.endDate) {
+ const date = new Date(data.endDate)
+ date.setDate(date.getDate() - 6)
+ data.startDate = date
+ }
+}
+
+/**
+ * Get workPeriod by id
+ * @param {Object} currentUser the user who perform this operation.
+ * @param {String} id the workPeriod id
+ * @param {Boolean} fromDb flag if query db for data or not
+ * @returns {Object} the workPeriod
+ */
+async function getWorkPeriod (currentUser, id, fromDb = false) {
+ if (!fromDb) {
+ try {
+ const workPeriod = await esClient.get({
+ index: config.esConfig.ES_INDEX_WORK_PERIOD,
+ id
+ })
+
+ await _checkUserPermissionForGetWorkPeriod(currentUser, workPeriod.body._source.projectId) // check user permission
+
+ const workPeriodRecord = { id: workPeriod.body._id, ...workPeriod.body._source }
+ return _getWorkPeriodFilteringFields(currentUser, workPeriodRecord)
+ } catch (err) {
+ if (helper.isDocumentMissingException(err)) {
+ throw new errors.NotFoundError(`id: ${id} "WorkPeriod" not found`)
+ }
+ if (err.httpStatus === HttpStatus.FORBIDDEN) {
+ throw err
+ }
+ logger.logFullError(err, { component: 'WorkPeriodService', context: 'getWorkPeriod' })
+ }
+ }
+ logger.info({ component: 'WorkPeriodService', context: 'getWorkPeriod', message: 'try to query db for data' })
+ const workPeriod = await WorkPeriod.findById(id)
+
+ await _checkUserPermissionForGetWorkPeriod(currentUser, workPeriod.projectId) // check user permission
+ // We should only return "memberRate" to Booking Manager, Administrator or M2M
+ return _getWorkPeriodFilteringFields(currentUser, workPeriod.dataValues)
+}
+
+getWorkPeriod.schema = Joi.object().keys({
+ currentUser: Joi.object().required(),
+ id: Joi.string().guid().required(),
+ fromDb: Joi.boolean()
+}).required()
+
+/**
+ * Create workPeriod
+ * @param {Object} currentUser the user who perform this operation
+ * @param {Object} workPeriod the workPeriod to be created
+ * @returns {Object} the created workPeriod
+ */
+async function createWorkPeriod (currentUser, workPeriod) {
+ // check permission
+ await _checkUserPermissionForWriteWorkPeriod(currentUser)
+ // If one of the dates are missing then auto-calculate it
+ _autoCalculateDates(workPeriod)
+
+ const resourceBooking = await helper.ensureResourceBookingById(workPeriod.resourceBookingId) // ensure resource booking exists
+ workPeriod.projectId = resourceBooking.projectId
+
+ const user = await helper.ensureUserById(resourceBooking.userId) // ensure user exists
+ workPeriod.userHandle = user.handle
+
+ workPeriod.id = uuid.v4()
+ workPeriod.createdBy = await helper.getUserId(currentUser.userId)
+
+ let created = null
+ try {
+ created = await WorkPeriod.create(workPeriod)
+ } catch (err) {
+ if (!_.isUndefined(err.original)) {
+ throw new errors.BadRequestError(err.original.detail)
+ } else {
+ throw err
+ }
+ }
+
+ await helper.postEvent(config.TAAS_WORK_PERIOD_CREATE_TOPIC, created.toJSON())
+ return created.dataValues
+}
+
+createWorkPeriod.schema = Joi.object().keys({
+ currentUser: Joi.object().required(),
+ workPeriod: Joi.object().keys({
+ resourceBookingId: Joi.string().uuid().required(),
+ startDate: Joi.workPeriodStartDate(),
+ endDate: Joi.workPeriodEndDate(),
+ daysWorked: Joi.number().integer().min(0).allow(null),
+ memberRate: Joi.number().allow(null),
+ customerRate: Joi.number().allow(null),
+ paymentStatus: Joi.paymentStatus().required()
+ }).required()
+}).required()
+
+/**
+ * Update workPeriod
+ * @param {Object} currentUser the user who perform this operation
+ * @param {String} id the workPeriod id
+ * @param {Object} data the data to be updated
+ * @returns {Object} the updated workPeriod
+ */
+async function updateWorkPeriod (currentUser, id, data) {
+ // check permission
+ await _checkUserPermissionForWriteWorkPeriod(currentUser)
+
+ const workPeriod = await WorkPeriod.findById(id)
+ const oldValue = workPeriod.toJSON()
+
+ // if resourceBookingId is provided then update projectId and userHandle
+ if (data.resourceBookingId) {
+ const resourceBooking = await helper.ensureResourceBookingById(data.resourceBookingId) // ensure resource booking exists
+ data.projectId = resourceBooking.projectId
+
+ const user = await helper.ensureUserById(resourceBooking.userId) // ensure user exists
+ data.userHandle = user.handle
+ }
+ // If one of the dates are missing then auto-calculate it
+ _autoCalculateDates(data)
+
+ data.updatedBy = await helper.getUserId(currentUser.userId)
+ let updated = null
+ try {
+ updated = await workPeriod.update(data)
+ } catch (err) {
+ if (!_.isUndefined(err.original)) {
+ throw new errors.BadRequestError(err.original.detail)
+ } else {
+ throw err
+ }
+ }
+
+ await helper.postEvent(config.TAAS_WORK_PERIOD_UPDATE_TOPIC, updated.toJSON(), { oldValue: oldValue })
+ return updated.dataValues
+}
+
+/**
+ * Partially update workPeriod by id
+ * @param {Object} currentUser the user who perform this operation
+ * @param {String} id the workPeriod id
+ * @param {Object} data the data to be updated
+ * @returns {Object} the updated workPeriod
+ */
+async function partiallyUpdateWorkPeriod (currentUser, id, data) {
+ return updateWorkPeriod(currentUser, id, data)
+}
+
+partiallyUpdateWorkPeriod.schema = Joi.object().keys({
+ currentUser: Joi.object().required(),
+ id: Joi.string().uuid().required(),
+ data: Joi.object().keys({
+ resourceBookingId: Joi.string().uuid(),
+ startDate: Joi.workPeriodStartDate(),
+ endDate: Joi.workPeriodEndDateOptional(),
+ daysWorked: Joi.number().integer().min(0).allow(null),
+ memberRate: Joi.number().allow(null),
+ customerRate: Joi.number().allow(null),
+ paymentStatus: Joi.paymentStatus()
+ }).required()
+}).required()
+
+/**
+ * Fully update workPeriod by id
+ * @param {Object} currentUser the user who perform this operation
+ * @param {String} id the workPeriod id
+ * @param {Object} data the data to be updated
+ * @returns {Object} the updated workPeriod
+ */
+async function fullyUpdateWorkPeriod (currentUser, id, data) {
+ return updateWorkPeriod(currentUser, id, data)
+}
+
+fullyUpdateWorkPeriod.schema = Joi.object().keys({
+ currentUser: Joi.object().required(),
+ id: Joi.string().uuid().required(),
+ data: Joi.object().keys({
+ resourceBookingId: Joi.string().uuid().required(),
+ startDate: Joi.workPeriodStartDate(),
+ endDate: Joi.workPeriodEndDate(),
+ daysWorked: Joi.number().integer().min(0).allow(null).default(null),
+ memberRate: Joi.number().allow(null).default(null),
+ customerRate: Joi.number().allow(null).default(null),
+ paymentStatus: Joi.paymentStatus().required()
+ }).required()
+}).required()
+
+/**
+ * Delete workPeriod by id
+ * @params {Object} currentUser the user who perform this operation
+ * @params {String} id the workPeriod id
+ */
+async function deleteWorkPeriod (currentUser, id) {
+ // check permission
+ if (!currentUser.hasManagePermission && !currentUser.isMachine) {
+ throw new errors.ForbiddenError('You are not allowed to perform this action!')
+ }
+
+ const workPeriod = await WorkPeriod.findById(id)
+ await workPeriod.destroy()
+ await helper.postEvent(config.TAAS_WORK_PERIOD_DELETE_TOPIC, { id })
+}
+
+deleteWorkPeriod.schema = Joi.object().keys({
+ currentUser: Joi.object().required(),
+ id: Joi.string().uuid().required()
+}).required()
+
+/**
+ * List workPeriods
+ * @param {Object} currentUser the user who perform this operation.
+ * @param {Object} criteria the search criteria
+ * @param {Object} options the extra options to control the function
+ * @returns {Object} the search result, contain total/page/perPage and result array
+ */
+async function searchWorkPeriods (currentUser, criteria, options = { returnAll: false }) {
+ // check user permission
+ if (!currentUser.hasManagePermission && !currentUser.isMachine && !currentUser.isConnectManager && !options.returnAll) {
+ if (!criteria.projectId) { // regular user can only search with filtering by "projectId"
+ throw new errors.ForbiddenError('Not allowed without filtering by "projectId"')
+ }
+ await helper.checkIsMemberOfProject(currentUser.userId, criteria.projectId)
+ }
+
+ // `criteria.resourceBookingIds` could be array of ids, or comma separated string of ids
+ // in case it's comma separated string of ids we have to convert it to an array of ids
+ if ((typeof criteria.resourceBookingIds) === 'string') {
+ criteria.resourceBookingIds = criteria.resourceBookingIds.trim().split(',').map(resourceBookingIdRaw => {
+ const resourceBookingId = resourceBookingIdRaw.trim()
+ if (!uuid.validate(resourceBookingId)) {
+ throw new errors.BadRequestError(`resourceBookingId ${resourceBookingId} is not a valid uuid`)
+ }
+ return resourceBookingId
+ })
+ }
+ const page = criteria.page
+ let perPage
+ if (options.returnAll) {
+ // To simplify the logic we are use a very large number for perPage
+ // because in practice there could hardly be so many records to be returned.(also consider we are using filters in the meantime)
+ // the number is limited by `index.max_result_window`, its default value is 10000, see
+ // https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-result-window
+ perPage = 10000
+ } else {
+ perPage = criteria.perPage
+ }
+
+ if (!criteria.sortBy) {
+ criteria.sortBy = 'id'
+ }
+ if (!criteria.sortOrder) {
+ criteria.sortOrder = 'desc'
+ }
+ try {
+ const sort = [{ [criteria.sortBy === 'id' ? '_id' : criteria.sortBy]: { order: criteria.sortOrder } }]
+
+ const esQuery = {
+ index: config.get('esConfig.ES_INDEX_WORK_PERIOD'),
+ body: {
+ query: {
+ bool: {
+ must: []
+ }
+ },
+ from: (page - 1) * perPage,
+ size: perPage,
+ sort
+ }
+ }
+ // change the date format to match with database model
+ if (criteria.startDate) {
+ criteria.startDate = moment(criteria.startDate).format('YYYY-MM-DD')
+ }
+ if (criteria.endDate) {
+ criteria.endDate = moment(criteria.endDate).format('YYYY-MM-DD')
+ }
+ _.each(_.pick(criteria, ['resourceBookingId', 'userHandle', 'projectId', 'startDate', 'endDate', 'paymentStatus']), (value, key) => {
+ esQuery.body.query.bool.must.push({
+ term: {
+ [key]: {
+ value
+ }
+ }
+ })
+ })
+ // if criteria contains resourceBookingIds, filter resourceBookingId with this value
+ if (criteria.resourceBookingIds) {
+ esQuery.body.query.bool.filter = [{
+ terms: {
+ resourceBookingId: criteria.resourceBookingIds
+ }
+ }]
+ }
+ logger.debug({ component: 'WorkPeriodService', context: 'searchWorkPeriods', message: `Query: ${JSON.stringify(esQuery)}` })
+
+ const { body } = await esClient.search(esQuery)
+
+ return {
+ total: body.hits.total.value,
+ page,
+ perPage,
+ result: _.map(body.hits.hits, (hit) => {
+ const obj = _.cloneDeep(hit._source)
+ obj.id = hit._id
+ // We should only return "memberRate" to Booking Manager, Administrator or M2M
+ if (!currentUser.hasManagePermission && !currentUser.isMachine) {
+ delete obj.memberRate
+ }
+ return obj
+ })
+ }
+ } catch (err) {
+ logger.logFullError(err, { component: 'WorkPeriodService', context: 'searchWorkPeriods' })
+ }
+ logger.info({ component: 'WorkPeriodService', context: 'searchWorkPeriods', message: 'fallback to DB query' })
+ const filter = { [Op.and]: [] }
+ _.each(_.pick(criteria, ['resourceBookingId', 'userHandle', 'projectId', 'startDate', 'endDate', 'paymentStatus']), (value, key) => {
+ filter[Op.and].push({ [key]: value })
+ })
+ if (criteria.resourceBookingIds) {
+ filter[Op.and].push({ resourceBookingId: criteria.resourceBookingIds })
+ }
+ const workPeriods = await WorkPeriod.findAll({
+ where: filter,
+ offset: ((page - 1) * perPage),
+ limit: perPage,
+ order: [[criteria.sortBy, criteria.sortOrder]]
+ })
+ return {
+ fromDb: true,
+ total: workPeriods.length,
+ page,
+ perPage,
+ result: _.map(workPeriods, workPeriod => {
+ // We should only return "memberRate" to Booking Manager, Administrator or M2M
+ if (!currentUser.hasManagePermission && !currentUser.isMachine) {
+ delete workPeriod.dataValues.memberRate
+ }
+ return workPeriod.dataValues
+ })
+ }
+}
+
+searchWorkPeriods.schema = Joi.object().keys({
+ currentUser: Joi.object().required(),
+ criteria: Joi.object().keys({
+ page: Joi.number().integer().min(1).default(1),
+ perPage: Joi.number().integer().min(1).max(10000).default(20),
+ sortBy: Joi.string().valid('id', 'resourceBookingId', 'userHandle', 'projectId', 'startDate', 'endDate', 'daysWorked', 'customerRate', 'memberRate', 'paymentStatus'),
+ sortOrder: Joi.string().valid('desc', 'asc'),
+ paymentStatus: Joi.paymentStatus(),
+ startDate: Joi.date().format('YYYY-MM-DD'),
+ endDate: Joi.date().format('YYYY-MM-DD'),
+ userHandle: Joi.string(),
+ projectId: Joi.number().integer(),
+ resourceBookingId: Joi.string().uuid(),
+ resourceBookingIds: Joi.alternatives(
+ Joi.string(),
+ Joi.array().items(Joi.string().uuid())
+ )
+ }).required(),
+ options: Joi.object()
+}).required()
+
+module.exports = {
+ getWorkPeriod,
+ createWorkPeriod,
+ partiallyUpdateWorkPeriod,
+ fullyUpdateWorkPeriod,
+ deleteWorkPeriod,
+ searchWorkPeriods
+}