import { type NoIdObjectSkeletonInterface } from '../api/ApiTypes'; import { type OAuth2ClientSkeleton } from '../api/OAuth2ClientApi'; import { type ScriptSkeleton } from '../api/ScriptApi'; import { State } from '../shared/State'; import { ExportMetaData } from './OpsTypes'; export type OAuth2Client = { /** * Create an empty OAuth2 client export template * @returns {OAuth2ClientExportInterface} an empty OAuth2 client export template */ createOAuth2ClientExportTemplate(): OAuth2ClientExportInterface; /** * Read all OAuth2 clients * @returns {Promise} a promise that resolves to an array of oauth2client objects */ readOAuth2Clients(): Promise; /** * Read OAuth2 client * @param {string} clientId client id * @returns {Promise} a promise that resolves to an oauth2client object */ readOAuth2Client(clientId: string): Promise; /** * Create OAuth2 client * @param {string} clientId client id * @param {any} clientData oauth2client object * @returns {Promise} a promise that resolves to an oauth2client object */ createOAuth2Client(clientId: string, clientData: OAuth2ClientSkeleton): Promise; /** * Update or create OAuth2 client * @param {string} clientId client id * @param {any} clientData oauth2client object * @returns {Promise} a promise that resolves to an oauth2client object */ updateOAuth2Client(clientId: string, clientData: OAuth2ClientSkeleton): Promise; /** * Delete all OAuth2 clients * @returns {Promise} a promise that resolves to an array of oauth2client objects */ deleteOAuth2Clients(): Promise; /** * Delete OAuth2 client * @param {string} clientId client id * @returns {Promise} a promise that resolves to an oauth2client object */ deleteOAuth2Client(clientId: string): Promise; /** * Export all OAuth2 clients * @param {OAuth2ClientExportOptions} options export options * @returns {OAuth2ClientExportInterface} export data */ exportOAuth2Clients(options?: OAuth2ClientExportOptions): Promise; /** * Export OAuth2 client by ID * @param {string} clientId oauth2 client id * @param {OAuth2ClientExportOptions} options export options * @returns {OAuth2ClientExportInterface} export data */ exportOAuth2Client(clientId: string, options?: OAuth2ClientExportOptions): Promise; /** * Import OAuth2 Client by ID * @param {string} clientId client id * @param {OAuth2ClientExportInterface} importData import data * @param {OAuth2ClientImportOptions} options import options * @returns {Promise} a promise resolving to an oauth2 client */ importOAuth2Client(clientId: string, importData: OAuth2ClientExportInterface, options?: OAuth2ClientImportOptions): Promise; /** * Import first OAuth2 Client * @param {OAuth2ClientExportInterface} importData import data * @param {OAuth2ClientImportOptions} options import options * @returns {Promise} a promise resolving to an oauth2 client */ importFirstOAuth2Client(importData: OAuth2ClientExportInterface, options?: OAuth2ClientImportOptions): Promise; /** * Import OAuth2 Clients * @param {OAuth2ClientExportInterface} importData import data * @param {OAuth2ClientImportOptions} options import options * @returns {Promise} a promise resolving to an array of oauth2 clients */ importOAuth2Clients(importData: OAuth2ClientExportInterface, options?: OAuth2ClientImportOptions): Promise; /** * Get all OAuth2 clients * @returns {Promise} a promise that resolves to an array of oauth2client objects * @deprecated since v2.0.0 use {@link OAuth2Client.readOAuth2Clients | readOAuth2Clients} instead * ```javascript * readOAuth2Clients(): Promise * ``` * @group Deprecated */ getOAuth2Clients(): Promise; /** * Get OAuth2 client * @param {string} clientId client id * @returns {Promise} a promise that resolves to an oauth2client object * @deprecated since v2.0.0 use {@link OAuth2Client.readOAuth2Client | readOAuth2Client} instead * ```javascript * readOAuth2Client(clientId: string): Promise * ``` * @group Deprecated */ getOAuth2Client(clientId: string): Promise; /** * Put OAuth2 client * @param {string} clientId client id * @param {OAuth2ClientSkeleton} clientData oauth2client object * @returns {Promise} a promise that resolves to an oauth2client object * @deprecated since v2.0.0 use {@link OAuth2Client.updateOAuth2Client | updateOAuth2Client} or {@link OAuth2Client.createOAuth2Client | createOAuth2Client} instead * ```javascript * updateOAuth2Client(clientId: string, clientData: OAuth2ClientSkeleton): Promise * createOAuth2Client(clientId: string, clientData: OAuth2ClientSkeleton): Promise * ``` * @group Deprecated */ putOAuth2Client(clientId: string, clientData: OAuth2ClientSkeleton): Promise; }; declare const _default: (state: State) => OAuth2Client; export default _default; /** * OAuth2 client export options */ export interface OAuth2ClientExportOptions { /** * Use string arrays to store multi-line text in scripts. */ useStringArrays: boolean; /** * Include any dependencies (scripts). */ deps: boolean; } /** * OAuth2 client import options */ export interface OAuth2ClientImportOptions { /** * Include any dependencies (scripts). */ deps: boolean; } export interface OAuth2ClientExportInterface { meta?: ExportMetaData; script?: Record; application: Record; } /** * Create an empty OAuth2 client export template * @returns {OAuth2ClientExportInterface} an empty OAuth2 client export template */ export declare function createOAuth2ClientExportTemplate({ state, }: { state: State; }): OAuth2ClientExportInterface; /** * Get all OAuth2 clients * @returns {Promise} a promise that resolves to an array of oauth2client objects */ export declare function readOAuth2Clients({ state, }: { state: State; }): Promise; /** * Get OAuth2 client * @param {string} clientId client id * @returns {Promise} a promise that resolves to an oauth2client object */ export declare function readOAuth2Client({ clientId, state, }: { clientId: string; state: State; }): Promise; /** * Create OAuth2 client * @param {string} clientId client id * @param {any} clientData oauth2client object * @returns {Promise} a promise that resolves to an oauth2client object */ export declare function createOAuth2Client({ clientId, clientData, state, }: { clientId: string; clientData: OAuth2ClientSkeleton | NoIdObjectSkeletonInterface; state: State; }): Promise; /** * Update or create OAuth2 client * @param {string} clientId client id * @param {any} clientData oauth2client object * @returns {Promise} a promise that resolves to an oauth2client object */ export declare function updateOAuth2Client({ clientId, clientData, state, }: { clientId: string; clientData: OAuth2ClientSkeleton | NoIdObjectSkeletonInterface; state: State; }): Promise; /** * Delete all OAuth2 clients * @param {string} clientId client id * @returns {Promise} a promise that resolves to an oauth2client object */ export declare function deleteOAuth2Clients({ state, }: { state: State; }): Promise; /** * Delete OAuth2 client * @param {string} clientId client id * @returns {Promise} a promise that resolves to an oauth2client object */ export declare function deleteOAuth2Client({ clientId, state, }: { clientId: string; state: State; }): Promise; /** * Export all OAuth2 clients * @param {OAuth2ClientExportOptions} options export options * @returns {Promise} export data */ export declare function exportOAuth2Clients({ options, state, }: { options?: OAuth2ClientExportOptions; state: State; }): Promise; /** * Export OAuth2 client by ID * @param {string} clientId oauth2 client id * @param {OAuth2ClientExportOptions} options export options * @returns {Promise} export data */ export declare function exportOAuth2Client({ clientId, options, state, }: { clientId: string; options?: OAuth2ClientExportOptions; state: State; }): Promise; /** * Import OAuth2 Client by ID * @param {string} clientId client id * @param {OAuth2ClientExportInterface} importData import data * @param {OAuth2ClientImportOptions} options import options * @returns {Promise} a promise resolving to an oauth2 client */ export declare function importOAuth2Client({ clientId, importData, options, state, }: { clientId: string; importData: OAuth2ClientExportInterface; options?: OAuth2ClientImportOptions; state: State; }): Promise; /** * Import first OAuth2 Client * @param {OAuth2ClientExportInterface} importData import data * @param {OAuth2ClientImportOptions} options import options * @returns {Promise} a promise resolving to an oauth2 client */ export declare function importFirstOAuth2Client({ importData, options, state, }: { importData: OAuth2ClientExportInterface; options?: OAuth2ClientImportOptions; state: State; }): Promise; /** * Import OAuth2 Clients * @param {OAuth2ClientExportInterface} importData import data * @param {OAuth2ClientImportOptions} options import options * @returns {Promise} a promise resolving to an array of oauth2 clients */ export declare function importOAuth2Clients({ importData, options, state, }: { importData: OAuth2ClientExportInterface; options?: OAuth2ClientImportOptions; state: State; }): Promise; //# sourceMappingURL=OAuth2ClientOps.d.ts.map