-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: update go-sequence to use proto enums * deps: update go-sequence * proto: update schema and generated files * data: implement (*AccountTable).Delete method * rpc: implement account intents * rpc: fix the tests * rpc: return an error if email already used * rpc: add more context to ErrEmailAlreadyInUse * rpc: modify account RPCs to use the new identity.Verifier * deps: pin go-sequence to v0.31.0 * update protos
- Loading branch information
Showing
16 changed files
with
481 additions
and
375 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,5 @@ | ||
/* eslint-disable */ | ||
// sequence-waas-authenticator v0.1.0 f7bf79363b992ace30e01ed2c6700c9ad0336c95 | ||
// sequence-waas-authenticator v0.1.0 2b3aee6b2e912ae0b3a6b4878672632d3025a99a | ||
// -- | ||
// Code generated by [email protected] with typescript generator. DO NOT EDIT. | ||
// | ||
|
@@ -12,7 +12,7 @@ export const WebRPCVersion = "v1" | |
export const WebRPCSchemaVersion = "v0.1.0" | ||
|
||
// Schema hash generated from your RIDL schema | ||
export const WebRPCSchemaHash = "f7bf79363b992ace30e01ed2c6700c9ad0336c95" | ||
export const WebRPCSchemaHash = "2b3aee6b2e912ae0b3a6b4878672632d3025a99a" | ||
|
||
// | ||
// Types | ||
|
@@ -655,6 +655,19 @@ export class TenantNotFoundError extends WebrpcError { | |
} | ||
} | ||
|
||
export class EmailAlreadyInUseError extends WebrpcError { | ||
constructor( | ||
name: string = 'EmailAlreadyInUse', | ||
code: number = 2000, | ||
message: string = 'Could not create account as the email is already in use', | ||
status: number = 0, | ||
cause?: string | ||
) { | ||
super(name, code, message, status, cause) | ||
Object.setPrototypeOf(this, EmailAlreadyInUseError.prototype) | ||
} | ||
} | ||
|
||
|
||
export enum errors { | ||
WebrpcEndpoint = 'WebrpcEndpoint', | ||
|
@@ -670,6 +683,7 @@ export enum errors { | |
WebrpcStreamFinished = 'WebrpcStreamFinished', | ||
Unauthorized = 'Unauthorized', | ||
TenantNotFound = 'TenantNotFound', | ||
EmailAlreadyInUse = 'EmailAlreadyInUse', | ||
} | ||
|
||
const webrpcErrorByCode: { [code: number]: any } = { | ||
|
@@ -686,6 +700,7 @@ const webrpcErrorByCode: { [code: number]: any } = { | |
[-10]: WebrpcStreamFinishedError, | ||
[1000]: UnauthorizedError, | ||
[1001]: TenantNotFoundError, | ||
[2000]: EmailAlreadyInUseError, | ||
} | ||
|
||
export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response> | ||
|
Oops, something went wrong.