Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: customer app endpoints, types and errors #18

Merged
merged 37 commits into from
Apr 21, 2022

Conversation

algoflows
Copy link
Contributor

@algoflows algoflows commented Mar 1, 2022

@tayzlor
Copy link
Contributor

tayzlor commented Mar 2, 2022

Overall looks in an OK state (with above comments). Few things missing

  • Tests needed (have a look in test/resources/**)
  • Typescript types (have a look in types/**)
  • Error responses (have a look in lib/Error.js). An example would be

/api/customer/v2/password-reset/verify can return a 200 or a 404. In the 404 response it returns a payload such as

{
  "message": "Reset token not found or expired",
  "type": "E_RESET_CODE_NOT_FOUND"
}

This should be translated into a specific Error type in lib/Error.js

@algoflows
Copy link
Contributor Author

Remaining type work

  • Entry codes [/api/customer/v2/entry-codes]
  • Sessions [/api/customer/v2/sessions]
  • Password reset [/api/customer/v2/password-reset]

@algoflows algoflows self-assigned this Mar 7, 2022
@algoflows algoflows changed the title issue_#10: customer_app_endpoints customer-app: customer app endpoints & tests Mar 7, 2022
@algoflows algoflows changed the title customer-app: customer app endpoints & tests feat: customer app endpoints & tests Mar 7, 2022
@algoflows algoflows changed the title feat: customer app endpoints & tests feat: customer app endpoints & types Mar 7, 2022
@algoflows algoflows changed the title feat: customer app endpoints & types feat: customer app endpoints, types and errors Mar 9, 2022
@algoflows
Copy link
Contributor Author

options?: RequestOptions
): Promise<Aifi.Response<Aifi.Models.Customer | Aifi.Models.Error>>;

// TODO ask question regarding response!?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

list(
params: Aifi.Models.PaginatedParams,
options?: RequestOptions
): Promise<Aifi.Response<PaginatedListResponse>>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets remove paginated responses + types from this PR for now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added back temporarily as build was failing

@tayzlor tayzlor merged commit 96d1212 into master Apr 21, 2022
@tayzlor tayzlor deleted the issue_10/customer_app_endpoints branch April 21, 2022 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants