Skip to content

Commit

Permalink
Regenerate, rename errors.ridl
Browse files Browse the repository at this point in the history
  • Loading branch information
VojtechVitek committed Jan 24, 2025
1 parent 5432f2e commit d5cc2f7
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 25 deletions.
File renamed without changes.
45 changes: 23 additions & 22 deletions proto/quotacontrol.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 18 additions & 2 deletions proto/quotacontrol.gen.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable */
// quota-control v0.19.2 09f1fbfa25b6f946a0158c6e92a2044bdbe0845c
// quota-control v0.19.2 906ffd4bfef795875b325957bdc54bc44e0ea5ed
// --
// Code generated by [email protected] with [email protected] generator. DO NOT EDIT.
//
Expand All @@ -16,7 +16,7 @@ export const WebRPCVersion = "v1"
export const WebRPCSchemaVersion = "v0.19.2"

// Schema hash generated from your RIDL schema
export const WebRPCSchemaHash = "09f1fbfa25b6f946a0158c6e92a2044bdbe0845c"
export const WebRPCSchemaHash = "906ffd4bfef795875b325957bdc54bc44e0ea5ed"

type WebrpcGenVersions = {
webrpcGenVersion: string;
Expand Down Expand Up @@ -1030,6 +1030,19 @@ export class ProjectNotFoundError extends WebrpcError {
}
}

export class SecretKeyCorsDisallowedError extends WebrpcError {
constructor(
name: string = 'SecretKeyCorsDisallowed',
code: number = 1009,
message: string = 'CORS disallowed. Admin API Secret Key can't be used from a web app.',
status: number = 0,
cause?: string
) {
super(name, code, message, status, cause)
Object.setPrototypeOf(this, SecretKeyCorsDisallowedError.prototype)
}
}

export class AccessKeyNotFoundError extends WebrpcError {
constructor(
name: string = 'AccessKeyNotFound',
Expand Down Expand Up @@ -1195,6 +1208,7 @@ export enum errors {
Geoblocked = 'Geoblocked',
RateLimited = 'RateLimited',
ProjectNotFound = 'ProjectNotFound',
SecretKeyCorsDisallowed = 'SecretKeyCorsDisallowed',
AccessKeyNotFound = 'AccessKeyNotFound',
AccessKeyMismatch = 'AccessKeyMismatch',
InvalidOrigin = 'InvalidOrigin',
Expand Down Expand Up @@ -1229,6 +1243,7 @@ export enum WebrpcErrorCodes {
Geoblocked = 1006,
RateLimited = 1007,
ProjectNotFound = 1008,
SecretKeyCorsDisallowed = 1009,
AccessKeyNotFound = 1101,
AccessKeyMismatch = 1102,
InvalidOrigin = 1103,
Expand Down Expand Up @@ -1263,6 +1278,7 @@ export const webrpcErrorByCode: { [code: number]: any } = {
[1006]: GeoblockedError,
[1007]: RateLimitedError,
[1008]: ProjectNotFoundError,
[1009]: SecretKeyCorsDisallowedError,
[1101]: AccessKeyNotFoundError,
[1102]: AccessKeyMismatchError,
[1103]: InvalidOriginError,
Expand Down
3 changes: 2 additions & 1 deletion proto/quotacontrol.ridl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ struct ResourceAccess
- minter: Minter

import "authcontrol.errors.ridl"
import "errors.ridl"
import "quotacontrol.errors.ridl"

service QuotaControl
# Project
Expand Down Expand Up @@ -131,3 +131,4 @@ service QuotaControl

# User permissions for a projectId
- GetUserPermission(projectId: uint64, userId: string) => (permission: UserPermission, resourceAccess: ResourceAccess)

0 comments on commit d5cc2f7

Please sign in to comment.