casa icon indicating copy to clipboard operation
casa copied to clipboard

api/v1/ for Case Contacts (iOS App)

Open FireLemons opened this issue 3 years ago • 39 comments

What type(s) of user does this feature affect?

  • volunteers

Description A volunteer needs to be able to use the app to save a case contact.

Approach

Authentication

HTTP Route Description Issue(s) Completed
POST /api/v1/users/sign_in Login #4976, #6216
POST /api/v1/users/sign_in/validate Validation
POST /api/v1/users/refresh_token Refresh Access Token
DELETE /api/v1/users/sign_out Log-Out #6241

Case Contact

HTTP Route Description Issue{s) Completed
GET /api/v1/case_contacts List Case Contacts (casa_cases)
GET /api/v1/case_contacts/:id Get Specific Case Contact
POST /api/v1/case_contacts Create new Case Contact
PATCH /api/v1/case_contacts/:id Update Specific Case Contact

For Additional Expenses (they are nested under Case Contacts)

HTTP Route Issue(s) Completed
POST /api/v1/case_contacts/:case_contact_id/additional_expenses
PATCH /api/v1/case_contacts/:case_contact_id/additional_expenses/:id
DELETE /api/v1/case_contacts/:case_contact_id/additional_expenses/:id

Requirements for /api/v1/

  1. Secure Authentication (token based) /api/v1/users/sign_in

    Foundation: iOS app can authenticate on sign_in endpoint #4976, and below

    • [ ] #6207 Secure session token in JSON response through token randomization
    • [ ] #6207 Session tokens default to expire 7 hours after creation
    • [ ] #6210 Volunteers Sign-In endpoint has a "stay logged in" or "remember_me" option where refresh tokens expire after 1 year
    • [ ] #6211 Secure endpoint from denial-of-service (DDoS) attacks by blocking suspicious requests

    Token Refreshing: iOS app generates new access tokens when refresh token is still valid /api/v1/users/refresh_token

    • [ ] #6233 Volunteers Refresh Token endpoint generates new access token if refresh_token is still valid

    Token Validating: iOS app can validate users session on endpoint /api/v1/users/validate

    • [ ] #6256 Volunteers user validate endpoint ensures session is valid

    Token Revoking: iOS app can Sign-Out users on sign_out endpoint /api/v1/users/sign_out

    • [ ] #6222 Volunteers Sign-Out endpoint invalidates current session/access token and refresh token when requested
  2. Casa Case Endpoint for Signed-In Users /api/v1/casa_cases

    Milestone 1

    • [ ] Add authenticate user before_action to controller and validate user is signed-in
    • [ ] Signed-In user case contact data is accessible through POST request (only shallow fields meaning fields that don't reference a different table)
    • [ ] Make sure user can only see case contacts they have permission to see

    Milestone 2a

    • [ ] Can display errors

    Milestone 2b

    • [ ] Can accept new case contact and save it
    • [ ] Can create case contact drafts

    Milestone 2c (expand case contact data)

    • [ ] Add case contact creator to json
    • [ ] Add data from casa_case_contact_types to show which contact types are available to be selected for the case contact
    • [ ] Add data from case_contact_contact_types to show contact types have been selected on the case contact
    • [ ] Add data from contact_topic_answers to show sections of notes for the case contact
    • [ ] Add contact topics to show available contact topics to choose from

    Milestone 3a

    • [ ] Can update case contact and save it
    • [ ] Can update case contact drafts and save it

    Milestone 3b

    • [ ] Can delete drafts

We have jBuilder installed. It can help you if your json response is complicated. You can also use it to convert a rails object into json easily like this

Questions? Join Slack!

We highly recommend that you join us in slack https://rubyforgood.herokuapp.com/ #casa channel to ask questions quickly and hear about office hours (currently Tuesday 6-8pm Pacific), stakeholder news, and upcoming new issues.

FireLemons avatar Sep 15 '22 17:09 FireLemons

When this is almost done we'll probably need to talk to sean about a r4g ios publishing account. https://developer.apple.com/support/membership-fee-waiver/

FireLemons avatar Sep 15 '22 20:09 FireLemons

Is this still a priority?

dpaola2 avatar Mar 14 '23 12:03 dpaola2

@dpaola2 A dev team is working on this. Don't worry about it

FireLemons avatar Mar 14 '23 21:03 FireLemons

OK. Should I close? (Which dev team?)

dpaola2 avatar Mar 15 '23 13:03 dpaola2

No don't close it. It's codethechange

FireLemons avatar Mar 15 '23 20:03 FireLemons

This issue has been inactive for 245 hours (10.21 days) and will be unassigned after 115 more hours (4.79 days). If you have questions, please

If you are still working on this, comment here to tell the bot to give you more time

github-actions[bot] avatar Apr 30 '23 00:04 github-actions[bot]

This issue has been inactive for 245 hours (10.21 days) and will be unassigned after 115 more hours (4.79 days). If you have questions, please

If you are still working on this, comment here to tell the bot to give you more time

this project is still being worked on. Don't close yet!

xihai01 avatar May 02 '23 14:05 xihai01

Maybe if I slap the epic tag on it the bot will ignore it

FireLemons avatar May 09 '23 03:05 FireLemons

This issue has been inactive for 261 hours (10.88 days) and will be unassigned after 99 more hours (4.13 days). If you have questions, please

If you are still working on this, comment here to tell the bot to give you more time

github-actions[bot] avatar May 20 '23 00:05 github-actions[bot]

still working on this.

7riumph avatar May 21 '23 04:05 7riumph

This issue has been inactive for 260 hours (10.83 days) and will be unassigned after 100 more hours (4.17 days). If you have questions, please

If you are still working on this, comment here to tell the bot to give you more time

github-actions[bot] avatar Jun 01 '23 00:06 github-actions[bot]

Still working on this.

7riumph avatar Jun 01 '23 01:06 7riumph

This issue has been inactive for 263 hours (10.96 days) and will be unassigned after 97 more hours (4.04 days). If you have questions, please

If you are still working on this, comment here to tell the bot to give you more time

github-actions[bot] avatar Jun 12 '23 00:06 github-actions[bot]

still working on this

xihai01 avatar Jun 12 '23 21:06 xihai01

This issue has been inactive for 243 hours (10.13 days) and will be unassigned after 117 more hours (4.88 days). If you have questions, please

If you are still working on this, comment here to tell the bot to give you more time

github-actions[bot] avatar Jun 23 '23 00:06 github-actions[bot]

still working on this

xihai01 avatar Jun 23 '23 01:06 xihai01

This issue has been inactive for 263 hours (10.96 days) and will be unassigned after 97 more hours (4.04 days). If you have questions, please

If you are still working on this, comment here to tell the bot to give you more time

github-actions[bot] avatar Jul 04 '23 00:07 github-actions[bot]

working on this.

xihai01 avatar Jul 04 '23 14:07 xihai01

This issue has been inactive for 250 hours (10.42 days) and will be unassigned after 110 more hours (4.58 days). If you have questions, please

If you are still working on this, comment here to tell the bot to give you more time

github-actions[bot] avatar Jul 15 '23 00:07 github-actions[bot]

still working on this

xihai01 avatar Jul 18 '23 14:07 xihai01

This issue has been inactive for 250 hours (10.42 days) and will be unassigned after 110 more hours (4.58 days). If you have questions, please

If you are still working on this, comment here to tell the bot to give you more time

github-actions[bot] avatar Jul 29 '23 00:07 github-actions[bot]

This issue has been inactive for 370 hours (15.42 days) and is past the limit of 360 hours (15.00 days) so is being unassigned.You’ve just been unassigned from this ticket due to inactivity – but feel free to pick it back up (or a new one!) in the future! Thank you again for your contribution to this project.

github-actions[bot] avatar Aug 03 '23 00:08 github-actions[bot]

This issue has been inactive for 369 hours (15.38 days) and is past the limit of 360 hours (15.00 days) so is being unassigned.You’ve just been unassigned from this ticket due to inactivity – but feel free to pick it back up (or a new one!) in the future! Thank you again for your contribution to this project.

github-actions[bot] avatar Aug 19 '23 00:08 github-actions[bot]

This issue has been inactive for 393 hours (16.38 days) and is past the limit of 360 hours (15.00 days) so is being unassigned.You’ve just been unassigned from this ticket due to inactivity – but feel free to pick it back up (or a new one!) in the future! Thank you again for your contribution to this project.

github-actions[bot] avatar Aug 20 '23 00:08 github-actions[bot]

still working on this

7riumph avatar Aug 20 '23 00:08 7riumph

This issue has been inactive for 240 hours (10.00 days) and will be unassigned after 120 more hours (5.00 days). If you have questions, please

If you are still working on this, comment here to tell the bot to give you more time

github-actions[bot] avatar Aug 30 '23 00:08 github-actions[bot]

This issue has been inactive for 360 hours (15.00 days) and is past the limit of 360 hours (15.00 days) so is being unassigned.You’ve just been unassigned from this ticket due to inactivity – but feel free to pick it back up (or a new one!) in the future! Thank you again for your contribution to this project.

github-actions[bot] avatar Sep 04 '23 00:09 github-actions[bot]

This issue has been inactive for 408 hours (17.00 days) and is past the limit of 360 hours (15.00 days) so is being unassigned.You’ve just been unassigned from this ticket due to inactivity – but feel free to pick it back up (or a new one!) in the future! Thank you again for your contribution to this project.

github-actions[bot] avatar Sep 06 '23 00:09 github-actions[bot]

still working on this

xihai01 avatar Sep 28 '23 21:09 xihai01

This issue has been inactive for 243 hours (10.13 days) and will be unassigned after 117 more hours (4.88 days). If you have questions, please

If you are still working on this, comment here to tell the bot to give you more time

github-actions[bot] avatar Oct 09 '23 00:10 github-actions[bot]