-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
67 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,3 @@ | ||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
|
||
export type CloudApiErrors = | ||
| 'TeamDoesNotExist' | ||
| 'UserDoesNotExist' | ||
| 'CloudFeatureDisabled' | ||
| 'InsufficientPermissions' | ||
| 'TeamHasNoRegisteredApps' | ||
| 'DatabaseError' | ||
| 'MaximumUsersPerTeamReached' | ||
| 'UserAlreadyBelongsToTheTeam' | ||
| 'IncorrectPassword' | ||
| 'AccessTokenFailure' | ||
| 'RefreshTokenFailure' | ||
| 'AppAlreadyExists' | ||
| 'MaximumAppsPerTeamReached' | ||
| 'TeamAlreadyExists' | ||
| 'PersonalTeamAlreadyExists' | ||
| 'EmailAlreadyExists' | ||
| 'InternalServerError' | ||
| 'UserDoesNotBelongsToTheTeam' | ||
| 'InvalidName' | ||
| 'UnauthorizedOriginError' | ||
| 'AppDoesNotExist' | ||
| 'UserAlreadyInvitedToTheTeam' | ||
| 'MaximumInvitesPerTeamReached' | ||
| 'InviteNotFound' | ||
| 'ActionForbiddenForPersonalTeam' | ||
| 'InviteDoesNotExist' | ||
| 'InvalidPaginationCursor' | ||
| 'InvalidOrExpiredVerificationCode' | ||
| 'InvalidOrExpiredAuthCode' | ||
| 'InvalidDomainName' | ||
| 'DomainAlreadyVerified' | ||
| 'DomainVerificationFailure' | ||
| 'DomainNotFound' | ||
| 'DomainVerificationNotStarted' | ||
| 'DomainAlreadyVerifiedByAnotherApp' | ||
| 'NoPendingDomainVerification' | ||
| 'WebAuthnError' | ||
| 'PasswordNotSet' | ||
| 'UserDoesNotHavePasskey' | ||
| 'PasskeyAlreadyExists' | ||
| 'InvalidPasskeyCredential' | ||
| 'PasskeyDoesNotExist' | ||
| 'FailedToCreateTeam' | ||
| 'DashboardImportFail' | ||
| 'OriginHeaderRequired' | ||
| 'InvalidOrigin' | ||
| 'InvalidAction' | ||
| 'AdminCannotLeaveTeam' | ||
| 'GrafanaError' | ||
| 'TeamWithoutGrafanaId' | ||
export type CloudApiErrors = "TeamDoesNotExist" | "UserDoesNotExist" | "CloudFeatureDisabled" | "InsufficientPermissions" | "TeamHasNoRegisteredApps" | "DatabaseError" | "MaximumUsersPerTeamReached" | "UserAlreadyBelongsToTheTeam" | "IncorrectPassword" | "AccessTokenFailure" | "RefreshTokenFailure" | "AppAlreadyExists" | "MaximumAppsPerTeamReached" | "TeamAlreadyExists" | "PersonalTeamAlreadyExists" | "EmailAlreadyExists" | "InternalServerError" | "UserDoesNotBelongsToTheTeam" | "InvalidName" | "UnauthorizedOriginError" | "AppDoesNotExist" | "UserAlreadyInvitedToTheTeam" | "MaximumInvitesPerTeamReached" | "InviteNotFound" | "ActionForbiddenForPersonalTeam" | "InviteDoesNotExist" | "InvalidPaginationCursor" | "InvalidOrExpiredVerificationCode" | "InvalidOrExpiredAuthCode" | "InvalidDomainName" | "DomainAlreadyVerified" | "DomainVerificationFailure" | "DomainNotFound" | "DomainVerificationNotStarted" | "DomainAlreadyVerifiedByAnotherApp" | "NoPendingDomainVerification" | "WebAuthnError" | "PasswordNotSet" | "UserDoesNotHavePasskey" | "PasskeyAlreadyExists" | "InvalidPasskeyCredential" | "PasskeyDoesNotExist" | "FailedToCreateTeam" | "DashboardImportFail" | "OriginHeaderRequired" | "InvalidOrigin" | "InvalidAction" | "AdminCannotLeaveTeam" | "GrafanaError" | "TeamWithoutGrafanaId" | "UserDoesNotExistInGrafana"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,3 @@ | ||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
|
||
export type HttpCloudEndpoint = | ||
| '/register_new_app' | ||
| '/register_with_password_start' | ||
| '/register_with_password_finish' | ||
| '/login_with_password' | ||
| '/login_with_google' | ||
| '/refresh_token' | ||
| '/register_new_team' | ||
| '/remove_user_from_team' | ||
| '/get_user_joined_teams' | ||
| '/events' | ||
| '/invite_user_to_team' | ||
| '/accept_team_invite' | ||
| '/get_team_user_invites' | ||
| '/get_user_team_invites' | ||
| '/cancel_team_user_invite' | ||
| '/cancel_user_team_invite' | ||
| '/get_app_events' | ||
| '/reset_password_start' | ||
| '/reset_password_finish' | ||
| '/verify_domain_start' | ||
| '/verify_domain_finish' | ||
| '/remove_whitelisted_domain' | ||
| '/cancel_pending_domain_verification' | ||
| '/register_with_passkey_start' | ||
| '/register_with_passkey_finish' | ||
| '/reset_passkey_start' | ||
| '/reset_passkey_finish' | ||
| '/get_passkey_challenge' | ||
| '/delete_passkey' | ||
| '/add_passkey_start' | ||
| '/add_passkey_finish' | ||
| '/get_user_metadata' | ||
| '/get_team_metadata' | ||
| '/get_team_users_privileges' | ||
| '/change_user_privileges' | ||
| '/login_with_passkey_start' | ||
| '/login_with_passkey_finish' | ||
| '/verify_code' | ||
| '/leave_team' | ||
| '/delete_app' | ||
| '/delete_team' | ||
| '/delete_account_start' | ||
| '/delete_account_finish' | ||
export type HttpCloudEndpoint = "/register_new_app" | "/register_with_password_start" | "/register_with_password_finish" | "/login_with_password" | "/login_with_google" | "/refresh_token" | "/register_new_team" | "/remove_user_from_team" | "/get_user_joined_teams" | "/events" | "/invite_user_to_team" | "/accept_team_invite" | "/get_team_user_invites" | "/get_user_team_invites" | "/cancel_team_user_invite" | "/cancel_user_team_invite" | "/get_app_events" | "/reset_password_start" | "/reset_password_finish" | "/verify_domain_start" | "/verify_domain_finish" | "/remove_whitelisted_domain" | "/cancel_pending_domain_verification" | "/register_with_passkey_start" | "/register_with_passkey_finish" | "/reset_passkey_start" | "/reset_passkey_finish" | "/get_passkey_challenge" | "/delete_passkey" | "/add_passkey_start" | "/add_passkey_finish" | "/get_user_metadata" | "/get_team_metadata" | "/get_team_users_privileges" | "/change_user_privileges" | "/login_with_passkey_start" | "/login_with_passkey_finish" | "/verify_code" | "/leave_team" | "/delete_app" | "/delete_team" | "/delete_account_start" | "/delete_account_finish"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
|
||
export interface HttpDeleteAccountFinishRequest { | ||
authCode: string | ||
} | ||
export interface HttpDeleteAccountFinishRequest { authCode: string, } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
|
||
export interface HttpDeleteAccountStartRequest { | ||
device: string | ||
browser: string | ||
} | ||
export interface HttpDeleteAccountStartRequest { device: string, browser: string, } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
|
||
export type VerificationAction = | ||
| 'registerPassword' | ||
| 'registerPasskey' | ||
| 'resetPassword' | ||
| 'resetPasskey' | ||
| 'deleteAccount' | ||
export type VerificationAction = "registerPassword" | "registerPasskey" | "resetPassword" | "resetPasskey" | "deleteAccount"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -256,6 +256,7 @@ mod tests { | |
}; | ||
use std::net::SocketAddr; | ||
use tower::ServiceExt; | ||
use uuid7::uuid7; | ||
|
||
#[tokio::test] | ||
async fn test_invite_user_to_team() { | ||
|
@@ -354,9 +355,11 @@ mod tests { | |
|
||
let (auth_token, _email, _password) = register_and_login_random_user(&test_app).await; | ||
|
||
let team_id = uuid7().to_string(); | ||
|
||
// Team does not exist | ||
let resp = invite_user_to_test_team( | ||
&i64::MAX.to_string(), | ||
&team_id, | ||
&"[email protected]".to_string(), | ||
&auth_token, | ||
&test_app, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,6 +216,7 @@ mod tests { | |
}; | ||
use std::net::SocketAddr; | ||
use tower::ServiceExt; | ||
use uuid7::uuid7; | ||
|
||
#[tokio::test] | ||
async fn test_remove_user_from_team() { | ||
|
@@ -320,9 +321,11 @@ mod tests { | |
|
||
let (auth_token, _email, _password) = register_and_login_random_user(&test_app).await; | ||
|
||
let team_id = uuid7().to_string(); | ||
|
||
// Team does not exist | ||
let resp = remove_user_from_test_team( | ||
&i64::MAX.to_string(), | ||
&team_id, | ||
&"[email protected]".to_string(), | ||
&auth_token, | ||
&test_app, | ||
|