File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ type ExtensionErrorOptions = {
1616 message ?: string ; // User-friendly message describing what happened
1717 responsePayload ?: Record < string , unknown > ; // Extra JSON data to be returned to the client
1818 debugPayload ?: Record < string , unknown > ; // Extra JSON data for debugging. Not returned to the client in production
19- cause ?: Error ; // The underlying error, if any
19+ cause ?: unknown ; // The underlying error, if any
2020} ;
2121
2222export type ErrorPayload = {
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ export * from './providers/shared';
33export * from './errors' ;
44
55export type BackendExtension = {
6- apiKey ? : ApiKeyProvider ;
6+ apiKey : ApiKeyProvider ;
77} ;
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export enum ApiKeyCapabilities {
55 Revoke = 'revoke' ,
66 Delete = 'delete' ,
77 CreateWithResources = 'create_with_resources' ,
8+ ListKeysPaginated = 'list_keys_paginated' ,
89}
910
1011export type CreateApiKeyRequest = {
Original file line number Diff line number Diff line change @@ -9,14 +9,18 @@ import type {
99export type ProviderEnv = {
1010 DB : D1Database ;
1111 AUTH_ISSUER : string ;
12+ EXTENSION_CONFIG ?: string ; // JSON string containing arbitrary data the extension needs
1213} ;
1314
1415export enum AuthType {
1516 OAuth = 'oauth' ,
1617 ApiKey = 'api_key' ,
1718}
1819
19- export type Scope = 'runt:read' | 'runt:execute' ;
20+ export enum Scope {
21+ RuntRead = 'runt:read' ,
22+ RuntExecute = 'runt:execute' ,
23+ }
2024
2125export type User = {
2226 id : string ;
You can’t perform that action at this time.
0 commit comments