import type { InterfaceDefinition, ObjectTypeDefinition, QueryDefinition } from "@osdk/client"; /** * Declare which resources a function needs access to. * * For `objects`, `interfaces` and `queries`, you may provide either: * - A string alias from resources.json (e.g. `"myObject"`) * - An OSDK type reference imported from your generated ontology SDK (e.g. `Employee`) * * For `links`, `datasets`, `streams`, `mediasets` and `models`, only string aliases are supported. */ export interface ScopeResources { queries?: Array; objects?: Array; interfaces?: Array; links?: string[]; models?: string[]; datasets?: string[]; mediasets?: string[]; streams?: string[]; } /** * Helpers for declaring resource scope. * * Or use these helpers: * `resources: ScopeResources.defaultScopeResources` — use the repo's default scope from resources.json */ export declare namespace ScopeResources { const defaultResources: unique symbol; } /** * Declare read-only marking requirements for callers of this function. */ export interface ScopeReadAuthorization { read: string[]; } /** * Declare read and write marking requirements for callers of this function. */ export interface ScopeReadWriteAuthorization extends ScopeReadAuthorization { write: string[]; } /** * Helpers for declaring authorization scope. * * Or use these helpers: * `authorization: ScopeAuthorization.defaultRead` — use the repo's default read authorization from functions.json */ export declare namespace ScopeAuthorization { const defaultRead: unique symbol; } /** * The scope declaration for a function. * Accepts plain object literals or the sentinel/factory helpers from `ScopeResources` and `ReadOnlyAuthorization`. */ export interface Scope { resources: ScopeResources | typeof ScopeResources.defaultResources; authorization: ScopeReadAuthorization | ScopeReadWriteAuthorization | typeof ScopeAuthorization.defaultRead; }