UNPKG

contentful-management

Version:
57 lines (56 loc) 1.9 kB
import type { BasicMetaSysProps, DefaultElements, MakeRequest } from '../common-types'; type OAuthApplicationSysProps = BasicMetaSysProps & { lastUsedAt: string | null; }; export declare enum ScopeValues { Read = "content_management_read", Manage = "content_management_manage" } export type OAuthApplicationProps = { name: string; description: string; clientId: string; clientSecret: string; redirectUri: string; scopes: ScopeValues[]; confidential: boolean; sys: OAuthApplicationSysProps; }; export type CreateOAuthApplicationProps = { name: string; description: string; redirectUri: string; scopes: ScopeValues[]; confidential: boolean; }; export type UpdateOAuthApplicationProps = { name?: string; description?: string; redirectUri?: string; scopes?: ScopeValues[]; confidential?: boolean; }; export interface OAuthApplication extends OAuthApplicationProps, DefaultElements<OAuthApplicationProps> { /** * Deletes an OAuth application * @return Promise for the deleted OAuth application */ delete(): Promise<void>; /** * Updates an OAuth application * @return Promise for the updated OAuth application */ update(): Promise<OAuthApplicationProps>; } /** * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw OAuth application data * @return Wrapped OAuth application data */ export declare function wrapOAuthApplication(makeRequest: MakeRequest, data: OAuthApplicationProps, userId: string): OAuthApplication; /** * @private */ export declare const wrapOAuthApplicationCollection: (makeRequest: MakeRequest, data: import("../common-types").CursorPaginatedCollectionProp<OAuthApplicationProps>, userId: string) => import("../common-types").CursorPaginatedCollection<OAuthApplication, OAuthApplicationProps>; export {};