import type { RestEndpoint } from '../types'; /** * Retrieves details of a specific OAuth application. by its unique user ID and oauth application ID. * * @param {AxiosInstance} http - An Axios HTTP client instance. * @param {Object} params - Parameters for the request. * @param {string} params.userId - The unique user ID of the user. * @param {string} params.oauthApplicationId - The unique application ID of the OAuth application. * @returns {Promise} A Promise that resolves with the retrieved OAuth Application. * @example ```javascript * const contentful = require('contentful-management') * * const plainClient = contentful.createClient( * { * accessToken: '' * }, * { type: 'plain' } * ) * plainClient.get({userId: 'TestUserId', oauthApplicationId: 'TestOAuthAppId'}) * .then(oauthApplication => console.log(oauthApplication)) * .catch(console.error) * ``` */ export declare const get: RestEndpoint<'OAuthApplication', 'get'>; /** * Retrieves a list of OAuth applications associated with the current user. * * @param {AxiosInstance} http - An Axios HTTP client instance. * @param {Object} params - Parameters for the request. * @param {string} params.userId - The unique user ID of the user. * @param {QueryParams} params - Query parameters to filter and customize the request. * @returns {Promise>} A Promise that resolves with a collection of oauth application properties. * @example ```javascript * const contentful = require('contentful-management') * * const plainClient = contentful.createClient( * { * accessToken: '' * }, * { type: 'plain' } * ) * plainClient.getManyForUser({userId: 'TestUserId'}) * .then(result => console.log(result.items)) * .catch(console.error) * ``` */ export declare const getManyForUser: RestEndpoint<'OAuthApplication', 'getManyForUser'>; /** * Creates a new OAuth application for current authenticated user. * * @param {AxiosInstance} http - Axios instance for making the HTTP request. * @param {Object} params - Parameters for the request. * @param {string} params.userId - The unique user ID of the user. * @param {RawAxiosRequestHeaders} [headers] - Optional HTTP headers for the request. * @returns {Promise} A Promise that resolves with the created oauth application. * @example ```javascript * const contentful = require('contentful-management') * * const plainClient = contentful.createClient( * { * accessToken: '', * }, * { type: 'plain' } * ) * plainClient.create( * {userId: 'TestUserId'}, * {name: 'Test-Name', description: 'Test-Desc', scopes: ['content_management_manage'], redirectUri: 'https://redirect.uri.com', confidential: true} * ) * .then(oauthApplication => console.log(oauthApplication)) * .catch(console.error) * ``` */ export declare const create: RestEndpoint<'OAuthApplication', 'create'>; /** * Updates details of a specific OAuth application. * * @param {AxiosInstance} http - The Axios HTTP client instance. * @param {Object} params - The parameters for updating oauth application. * @param {string} params.userId - The unique user ID of the user. * @param {string} params.oauthApplicationId - The unique application ID of the OAuth application. * @returns {Promise} A Promise that resolves with the updated oauth application. * @example ```javascript * const contentful = require('contentful-management') * * const plainClient = contentful.createClient( * { * accessToken: '' * }, * { type: 'plain' } * ) * plainClient.update( * {userId: 'TestUserId', oauthApplicationId: 'TestOAuthAppId'}, * {name: 'Test-Name', description: 'Test-Desc', scope: ['content_management_manage'], redirectUri: 'https://redirect.uri.com', confidential: true} * ) * .then(oauthApplication => console.log(oauthApplication)) * .catch(console.error) * ``` */ export declare const update: RestEndpoint<'OAuthApplication', 'update'>; /** * Deletes a specific OAuth application. * * @param {AxiosInstance} http - The Axios HTTP client instance. * @param {Object} params - The parameters for deleting oauth application. * @param {string} params.userId - The unique user ID of the user. * @param {string} params.oauthApplicationId - The unique application ID of the OAuth application. * @returns {Promise} * @example ```javascript * const contentful = require('contentful-management') * * const plainClient = contentful.createClient( * { * accessToken: '' * }, * { type: 'plain' } * ) * plainClient.del({userId: 'TestUserId', oauthApplicationId: 'TestOAuthAppId'}) }) * .then(result => console.log(result.items)) * .catch(console.error) * ``` */ export declare const del: RestEndpoint<'OAuthApplication', 'delete'>;