import { inspect, InspectOptions } from "util"; import TokenPage, { TokenPaginationPayload } from "../../../base/TokenPage"; import Response from "../../../http/response"; import V1 from "../V1"; import { ApiResponse } from "../../../base/ApiResponse"; /** * Request body for PATCH AuthProfile - only friendlyName can be updated */ export declare class PatchAuthProfile { /** * Human-readable name for identification */ "friendlyName"?: string; constructor(payload: any); } /** * Request body for creating a new AuthProfile resource */ export declare class PostAuthProfile { /** * Authentication type */ "type": string; /** * Human-readable name for identification (optional, defaults to blank) */ "friendlyName"?: string | null; /** * OAuth2 token endpoint URL */ "tokenUrl": string; /** * OAuth2 client identifier */ "clientId": string; /** * OAuth2 client secret (never returned, stored securely as secret) */ "clientSecret": string; /** * OAuth2 scope to request */ "scope"?: string; /** * OAuth2 audience parameter */ "audience"?: string; /** * Client credentials authentication method (defaults to CLIENT_SECRET_POST) */ "clientCredentialsAuthMethod"?: string; /** * Digest auth username */ "username": string; /** * Digest auth password (never returned, stored securely as secret) */ "password": string; constructor(payload: any); } /** * Options to pass to patch a AuthProfileInstance */ export interface AuthProfileContextPatchOptions { /** */ patchAuthProfile: PatchAuthProfile; } /** * Options to pass to create a AuthProfileInstance */ export interface AuthProfileListInstanceCreateOptions { /** */ postAuthProfile: PostAuthProfile; /** Idempotency key for mutation operations. Must be a UUIDv7 (other UUID versions are rejected with a 400). */ idempotencyKey?: string; } /** * Options to pass to each */ export interface AuthProfileListInstanceEachOptions { /** Number of items per page (max 100, reflecting the 50-resource account limit per resource type) */ pageSize?: number; /** Token for pagination */ pageToken?: string; /** Function to process each record. If this and a positional callback are passed, this one will be used */ callback?: (item: AuthProfileInstance, done: (err?: Error) => void) => void; /** Function to be called upon completion of streaming */ done?: Function; /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */ limit?: number; } /** * Options to pass to list */ export interface AuthProfileListInstanceOptions { /** Number of items per page (max 100, reflecting the 50-resource account limit per resource type) */ pageSize?: number; /** Token for pagination */ pageToken?: string; /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */ limit?: number; } /** * Options to pass to page */ export interface AuthProfileListInstancePageOptions { /** Number of items per page (max 100, reflecting the 50-resource account limit per resource type) */ pageSize?: number; /** Token for pagination */ pageToken?: string; } export interface AuthProfileContext { /** * Remove a AuthProfileInstance * * @param callback - Callback to handle processed record * * @returns Resolves to processed boolean */ remove(callback?: (error: Error | null, item?: boolean) => any): Promise; /** * Remove a AuthProfileInstance and return HTTP info * * @param callback - Callback to handle processed record * * @returns Resolves to processed boolean with HTTP metadata */ removeWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Fetch a AuthProfileInstance * * @param callback - Callback to handle processed record * * @returns Resolves to processed AuthProfileInstance */ fetch(callback?: (error: Error | null, item?: AuthProfileInstance) => any): Promise; /** * Fetch a AuthProfileInstance and return HTTP info * * @param callback - Callback to handle processed record * * @returns Resolves to processed AuthProfileInstance with HTTP metadata */ fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Patch a AuthProfileInstance * * @param params - Body for request * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed AuthProfileInstance */ patch(params: PatchAuthProfile, headers?: any, callback?: (error: Error | null, item?: AuthProfileInstance) => any): Promise; /** * Patch a AuthProfileInstance and return HTTP info * * @param params - Body for request * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed AuthProfileInstance with HTTP metadata */ patchWithHttpInfo(params: PatchAuthProfile, headers?: any, callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Provide a user-friendly representation */ toJSON(): any; [inspect.custom](_depth: any, options: InspectOptions): any; } export interface AuthProfileContextSolution { authProfileId: string; } export declare class AuthProfileContextImpl implements AuthProfileContext { protected _version: V1; protected _solution: AuthProfileContextSolution; protected _uri: string; constructor(_version: V1, authProfileId: string); remove(callback?: (error: Error | null, item?: boolean) => any): Promise; removeWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; fetch(callback?: (error: Error | null, item?: AuthProfileInstance) => any): Promise; fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; patch(params: PatchAuthProfile, headers?: any, callback?: (error: Error | null, item?: AuthProfileInstance) => any): Promise; patchWithHttpInfo(params: PatchAuthProfile, headers?: any, callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Provide a user-friendly representation * * @returns Object */ toJSON(): AuthProfileContextSolution; [inspect.custom](_depth: any, options: InspectOptions): string; } /** * Nested model for PatchAuthProfile */ export interface PatchAuthProfile { friendlyName?: string; } /** * Nested model for PostAuthProfile */ export interface PostAuthProfile { type: string; friendlyName?: string | null; tokenUrl: string; clientId: string; clientSecret: string; scope?: string; audience?: string; clientCredentialsAuthMethod?: string; username: string; password: string; } interface AuthProfilePayload extends TokenPaginationPayload { authProfiles: AuthProfileResource[]; } /** * Response model for AuthProfileSummary operations */ interface AuthProfileSummary_ResponseResource { id: string; type: string; friendlyName: string; createdAt: Date; updatedAt: Date; } /** * Response model for AuthProfile operations */ interface AuthProfile_ResponseResource { id: string; type: string; friendlyName: string; createdAt: Date; updatedAt: Date; tokenUrl: string; clientId: string; clientSecret?: string; scope?: string; audience?: string; clientCredentialsAuthMethod?: string; username: string; password?: string; } /** * Union type for all possible response models */ type AuthProfileResource = AuthProfileSummary_ResponseResource | AuthProfile_ResponseResource; /** * Authentication resource that can be shared across various settings */ export declare class AuthProfileInstance { protected _version: V1; protected _solution: AuthProfileContextSolution; protected _context?: AuthProfileContext; constructor(_version: V1, _payload: AuthProfileResource, authProfileId?: string); id?: string; type?: string; friendlyName?: string; createdAt?: Date; updatedAt?: Date; /** * OAuth2 token endpoint URL */ tokenUrl?: string; /** * OAuth2 client identifier */ clientId?: string; /** * OAuth2 client secret (never returned, stored securely as secret) */ clientSecret?: string; /** * OAuth2 scope to request */ scope?: string; /** * OAuth2 audience parameter */ audience?: string; /** * Client credentials authentication method (defaults to CLIENT_SECRET_POST) */ clientCredentialsAuthMethod?: string; /** * Digest auth username */ username?: string; /** * Digest auth password (never returned, stored securely as secret) */ password?: string; private get _proxy(); /** * Remove a AuthProfileInstance * * @param callback - Callback to handle processed record * * @returns Resolves to processed boolean */ remove(callback?: (error: Error | null, item?: boolean) => any): Promise; /** * Remove a AuthProfileInstance and return HTTP info * * @param callback - Callback to handle processed record * * @returns Resolves to processed boolean with HTTP metadata */ removeWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Fetch a AuthProfileInstance * * @param callback - Callback to handle processed record * * @returns Resolves to processed AuthProfileInstance */ fetch(callback?: (error: Error | null, item?: AuthProfileInstance) => any): Promise; /** * Fetch a AuthProfileInstance and return HTTP info * * @param callback - Callback to handle processed record * * @returns Resolves to processed AuthProfileInstance with HTTP metadata */ fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Patch a AuthProfileInstance * * @param params - Body for request * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed AuthProfileInstance */ patch(params: PatchAuthProfile, headers?: any, callback?: (error: Error | null, item?: AuthProfileInstance) => any): Promise; /** * Patch a AuthProfileInstance and return HTTP info * * @param params - Body for request * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed AuthProfileInstance with HTTP metadata */ patchWithHttpInfo(params: PatchAuthProfile, headers?: any, callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Provide a user-friendly representation * * @returns Object */ toJSON(): { id: string; type: string; friendlyName: string; createdAt: Date; updatedAt: Date; tokenUrl: string; clientId: string; clientSecret: string; scope: string; audience: string; clientCredentialsAuthMethod: string; username: string; password: string; }; [inspect.custom](_depth: any, options: InspectOptions): string; } export interface AuthProfileSolution { } export interface AuthProfileListInstance { _version: V1; _solution: AuthProfileSolution; _uri: string; (authProfileId: string): AuthProfileContext; get(authProfileId: string): AuthProfileContext; /** * Create a AuthProfileInstance * * @param params - Body for request * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed AuthProfileInstance */ create(params: PostAuthProfile, headers?: any, callback?: (error: Error | null, item?: AuthProfileInstance) => any): Promise; /** * Create a AuthProfileInstance and return HTTP info * * @param params - Body for request * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed AuthProfileInstance with HTTP metadata */ createWithHttpInfo(params: PostAuthProfile, headers?: any, callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Streams AuthProfileInstance records from the API. * * This operation lazily loads records as efficiently as possible until the limit * is reached. * * The results are passed into the callback function, so this operation is memory * efficient. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { AuthProfileListInstanceEachOptions } [params] - Options for request * @param { function } [callback] - Function to process each record */ each(callback?: (item: AuthProfileInstance, done: (err?: Error) => void) => void): void; each(params: AuthProfileListInstanceEachOptions, callback?: (item: AuthProfileInstance, done: (err?: Error) => void) => void): void; /** * Streams AuthProfileInstance records from the API with HTTP metadata captured per page. * * This operation lazily loads records as efficiently as possible until the limit * is reached. HTTP metadata (status code, headers) is captured for each page request. * * The results are passed into the callback function, so this operation is memory * efficient. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { AuthProfileListInstanceEachOptions } [params] - Options for request * @param { function } [callback] - Function to process each record */ eachWithHttpInfo(callback?: (item: AuthProfileInstance, done: (err?: Error) => void) => void): void; eachWithHttpInfo(params: AuthProfileListInstanceEachOptions, callback?: (item: AuthProfileInstance, done: (err?: Error) => void) => void): void; /** * Retrieve a single target page of AuthProfileInstance records from the API. * * The request is executed immediately. * * @param { string } [targetUrl] - API-generated URL for the requested results page * @param { function } [callback] - Callback to handle list of records */ getPage(targetUrl: string, callback?: (error: Error | null, items: AuthProfilePage) => any): Promise; /** * Retrieve a single target page of AuthProfileInstance records from the API with HTTP metadata. * * The request is executed immediately. * * @param { string } [targetUrl] - API-generated URL for the requested results page * @param { function } [callback] - Callback to handle list of records with metadata */ getPageWithHttpInfo(targetUrl: string, callback?: (error: Error | null, items: ApiResponse) => any): Promise>; /** * Lists AuthProfileInstance records from the API as a list. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { AuthProfileListInstanceOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records */ list(callback?: (error: Error | null, items: AuthProfileInstance[]) => any): Promise; list(params: AuthProfileListInstanceOptions, callback?: (error: Error | null, items: AuthProfileInstance[]) => any): Promise; /** * Lists AuthProfileInstance records from the API as a list with HTTP metadata. * * Returns all records along with HTTP metadata from the first page fetched. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { AuthProfileListInstanceOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records with metadata */ listWithHttpInfo(callback?: (error: Error | null, items: ApiResponse) => any): Promise>; listWithHttpInfo(params: AuthProfileListInstanceOptions, callback?: (error: Error | null, items: ApiResponse) => any): Promise>; /** * Retrieve a single page of AuthProfileInstance records from the API. * * The request is executed immediately. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { AuthProfileListInstancePageOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records */ page(callback?: (error: Error | null, items: AuthProfilePage) => any): Promise; page(params: AuthProfileListInstancePageOptions, callback?: (error: Error | null, items: AuthProfilePage) => any): Promise; /** * Retrieve a single page of AuthProfileInstance records from the API with HTTP metadata. * * The request is executed immediately. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { AuthProfileListInstancePageOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records with metadata */ pageWithHttpInfo(callback?: (error: Error | null, items: ApiResponse) => any): Promise>; pageWithHttpInfo(params: AuthProfileListInstancePageOptions, callback?: (error: Error | null, items: ApiResponse) => any): Promise>; /** * Provide a user-friendly representation */ toJSON(): any; [inspect.custom](_depth: any, options: InspectOptions): any; } export declare function AuthProfileListInstance(version: V1): AuthProfileListInstance; export declare class AuthProfilePage extends TokenPage { /** * Initialize the AuthProfilePage * * @param version - Version of the resource * @param response - Response from the API * @param uri - URI of the resource * @param params - Query parameters * @param solution - Path solution */ constructor(version: V1, response: Response, uri: string, params: any, solution: AuthProfileSolution); /** * Build an instance of AuthProfileInstance * * @param payload - Payload response from the API */ getInstance(payload: AuthProfileResource): AuthProfileInstance; [inspect.custom](depth: any, options: InspectOptions): string; } export {};