-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
22f2acb
commit 724a470
Showing
8 changed files
with
77 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
/* eslint-disable */ | ||
// authcontrol v0.9.0 896c9dd61e9b52933577b35ac021a229cdc54fe2 | ||
// authcontrol v0.9.1 809804f85757ee407e93c191d6d5bfb75b82cb56 | ||
// -- | ||
// Code generated by webrpc-gen@v0.21.0 with typescript@v0.15.0 generator. DO NOT EDIT. | ||
// Code generated by webrpc-gen@v0.22.0 with typescript@v0.16.1 generator. DO NOT EDIT. | ||
// | ||
// webrpc-gen -schema=authcontrol.ridl -target=typescript@v0.15.0 -client -out=./authcontrol.gen.ts | ||
// webrpc-gen -schema=authcontrol.ridl -target=typescript@v0.16.1 -client -out=./authcontrol.gen.ts | ||
|
||
export const WebrpcHeader = "Webrpc" | ||
|
||
export const WebrpcHeaderValue = "webrpc@v0.21.0;gen-typescript@v0.15.0;[email protected].0" | ||
export const WebrpcHeaderValue = "webrpc@v0.22.0;gen-typescript@v0.16.1;[email protected].1" | ||
|
||
// WebRPC description and code-gen version | ||
export const WebRPCVersion = "v1" | ||
|
||
// Schema version of your RIDL schema | ||
export const WebRPCSchemaVersion = "v0.9.0" | ||
export const WebRPCSchemaVersion = "v0.9.1" | ||
|
||
// Schema hash generated from your RIDL schema | ||
export const WebRPCSchemaHash = "896c9dd61e9b52933577b35ac021a229cdc54fe2" | ||
export const WebRPCSchemaHash = "809804f85757ee407e93c191d6d5bfb75b82cb56" | ||
|
||
type WebrpcGenVersions = { | ||
webrpcGenVersion: string; | ||
|
@@ -84,7 +84,7 @@ export enum SessionType { | |
|
||
|
||
const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => { | ||
const reqHeaders = { ...headers, 'Content-Type': 'application/json' } | ||
const reqHeaders: {[key: string]: string} = { ...headers, 'Content-Type': 'application/json' } | ||
reqHeaders[WebrpcHeader] = WebrpcHeaderValue | ||
|
||
return { | ||
|
@@ -437,7 +437,30 @@ export enum errors { | |
ProjectNotFound = 'ProjectNotFound', | ||
} | ||
|
||
const webrpcErrorByCode: { [code: number]: any } = { | ||
export enum WebrpcErrorCodes { | ||
WebrpcEndpoint = 0, | ||
WebrpcRequestFailed = -1, | ||
WebrpcBadRoute = -2, | ||
WebrpcBadMethod = -3, | ||
WebrpcBadRequest = -4, | ||
WebrpcBadResponse = -5, | ||
WebrpcServerPanic = -6, | ||
WebrpcInternalError = -7, | ||
WebrpcClientDisconnected = -8, | ||
WebrpcStreamLost = -9, | ||
WebrpcStreamFinished = -10, | ||
Unauthorized = 1000, | ||
PermissionDenied = 1001, | ||
SessionExpired = 1002, | ||
MethodNotFound = 1003, | ||
RequestConflict = 1004, | ||
Aborted = 1005, | ||
Geoblocked = 1006, | ||
RateLimited = 1007, | ||
ProjectNotFound = 1008, | ||
} | ||
|
||
export const webrpcErrorByCode: { [code: number]: any } = { | ||
[0]: WebrpcEndpointError, | ||
[-1]: WebrpcRequestFailedError, | ||
[-2]: WebrpcBadRouteError, | ||
|
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
webrpc = v1 | ||
|
||
name = authcontrol | ||
version = v0.9.1 | ||
|
||
error 1000 Unauthorized "Unauthorized access" HTTP 401 | ||
error 1001 PermissionDenied "Permission denied" HTTP 403 | ||
error 1002 SessionExpired "Session expired" HTTP 403 | ||
error 1003 MethodNotFound "Method not found" HTTP 404 | ||
error 1004 RequestConflict "Conflict with target resource" HTTP 409 | ||
error 1005 Aborted "Request aborted" HTTP 400 | ||
error 1006 Geoblocked "Geoblocked region" HTTP 451 | ||
error 1007 RateLimited "Rate-limited. Please slow down." HTTP 429 | ||
error 1008 ProjectNotFound "Project not found" HTTP 401 |
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