// This file was auto-generated by Fern from our API Definition. import { DeploymentClient } from "./api/resources/deployment/client/Client.js"; import { DocClient } from "./api/resources/doc/client/Client.js"; import { DocumentsClient } from "./api/resources/documents/client/Client.js"; import { FoldersClient } from "./api/resources/folders/client/Client.js"; import { GrantsClient } from "./api/resources/grants/client/Client.js"; import { TenantsClient } from "./api/resources/tenants/client/Client.js"; import { TokensClient } from "./api/resources/tokens/client/Client.js"; import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js"; import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "./BaseClient.js"; import * as core from "./core/index.js"; export declare namespace CloudPDFClient { export type Options = BaseClientOptions; export interface RequestOptions extends BaseRequestOptions {} } export class CloudPDFClient { protected readonly _options: NormalizedClientOptionsWithAuth; protected _deployment: DeploymentClient | undefined; protected _doc: DocClient | undefined; protected _grants: GrantsClient | undefined; protected _tenants: TenantsClient | undefined; protected _documents: DocumentsClient | undefined; protected _folders: FoldersClient | undefined; protected _tokens: TokensClient | undefined; constructor(options: CloudPDFClient.Options = {}) { this._options = normalizeClientOptionsWithAuth(options); } public get deployment(): DeploymentClient { return (this._deployment ??= new DeploymentClient(this._options)); } public get doc(): DocClient { return (this._doc ??= new DocClient(this._options)); } public get grants(): GrantsClient { return (this._grants ??= new GrantsClient(this._options)); } public get tenants(): TenantsClient { return (this._tenants ??= new TenantsClient(this._options)); } public get documents(): DocumentsClient { return (this._documents ??= new DocumentsClient(this._options)); } public get folders(): FoldersClient { return (this._folders ??= new FoldersClient(this._options)); } public get tokens(): TokensClient { return (this._tokens ??= new TokensClient(this._options)); } /** * Make a passthrough request using the SDK's configured auth, retry, logging, etc. * This is useful for making requests to endpoints not yet supported in the SDK. * The input can be a URL string, URL object, or Request object. Relative paths are resolved against the configured base URL. * * @param {Request | string | URL} input - The URL, path, or Request object. * @param {RequestInit} init - Standard fetch RequestInit options. * @param {core.PassthroughRequest.RequestOptions} requestOptions - Per-request overrides (timeout, retries, headers, abort signal). * @returns {Promise} A standard Response object. */ public async fetch( input: Request | string | URL, init?: RequestInit, requestOptions?: core.PassthroughRequest.RequestOptions, ): Promise { return core.makePassthroughRequest( input, init, { baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, fetch: this._options.fetch, logging: this._options.logging, getAuthHeaders: async () => (await this._options.authProvider.getAuthRequest()).headers, }, requestOptions, ); } }