@atproto/oauth-scopes
Version:
A library for manipulating and validating ATproto OAuth scopes in TypeScript.
26 lines • 1.03 kB
TypeScript
import { LexPermission } from './lexicon.js';
import { ScopeSyntax } from './syntax.js';
/**
* Translates a {@link LexPermission} into a {@link ScopeSyntax}.
*/
export declare class LexPermissionSyntax<P extends string = string> implements ScopeSyntax<P> {
readonly lexPermission: Readonly<LexPermission & {
resource: P;
}>;
constructor(lexPermission: Readonly<LexPermission & {
resource: P;
}>);
get prefix(): P;
get positional(): undefined;
get(key: string): string | number | boolean | (string | number | boolean)[] | undefined;
keys(): Generator<string, void, unknown>;
getSingle(key: string): string | number | boolean | null | undefined;
getMulti(key: string): (string | number | boolean)[] | null | undefined;
toJSON(): Readonly<{
type: "permission";
resource: string;
} & Record<string, string | number | boolean | (string | number | boolean)[] | undefined> & {
resource: P;
}>;
}
//# sourceMappingURL=syntax-lexicon.d.ts.map