unee-t / frontend

Meteor front end
https://case.dev.unee-t.com/
GNU Affero General Public License v3.0
9 stars 17 forks source link

enhanced case API for 3rd party case viewers/editors #889

Closed nbiton closed 4 years ago

nbiton commented 4 years ago

This PR now includes:

franck-boullier commented 4 years ago

@nbiton does this API allow a new user to be created "on the fly" like we can when we create a new case?

The Scenario:

3rd party App wants to

AND The user that the 3rd party App wants to assign (or invite) to the case does NOT exist in Unee-T (OR that user exists in Unee-T but has NOT been associated to any role in that unit yet).

Ideally, the API will be able to: 1- create that new user 2- assign that new user to the unit in one of the roles 3- determine if the user is a "private" or "public" user in the given role. 4- Add the user to the case as either the assignee or one of the person who has been invited to the case.

Can you confirm what will happen in each of these scenario?

Thanks

franck-boullier commented 4 years ago

@nbiton a few fields seem to be missing from the GET call:

nbiton commented 4 years ago

@nbiton a few fields seem to be missing from the GET call:

  • details
  • nextStepsBy
  • Severity
  • Priority

These are currently not a part of the response, but can be added

nbiton commented 4 years ago

@nbiton does this API allow a new user to be created "on the fly" like we can when we create a new case?

Currently, no.

3- determine if the user is a "private" or "public" user in the given role. 4- Add the user to the case as either the assignee or one of the person who has been invited to the case.

How do you suggest we allow that? How should these options be specified by the user?

nbiton commented 4 years ago

@nbiton a few fields seem to be missing from the GET call:

  • details
  • nextStepsBy
  • Severity
  • Priority

Fixed

nbiton commented 4 years ago

d09f484 includes the comment creation API. The APIs route is POST /api/cases/:caseId/comments. It receives "text" in the body of the request and apiKey can be sent as a part of the body or in an Authentication header Bearer token.

Example:

{
  "text": "This is a test comment created via the new API",
  "apiKey": "xxxxxxxxxxx"
}
nbiton commented 4 years ago

It can't be tested any further locally or on a review app because of the invite lambda dependency. We can merge to master and start testing on dev