cloudflare
Version:
The official TypeScript library for the Cloudflare API
33 lines • 1.51 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../../core/resource.mjs";
import { SinglePage } from "../../../../core/pagination.mjs";
import { path } from "../../../../internal/utils/path.mjs";
export var BaseAuthMethods = /* @__PURE__ */ (() => {
class BaseAuthMethods extends APIResource {
/**
* Returns available auth methods for the specified vendor, including credential
* schema, instructions, and example payloads. Use this to understand what
* credentials are required before calling POST /v2/integrations.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const authMethodListResponse of client.zeroTrust.casb.applications.authMethods.list(
* 'ANTHROPIC',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* )) {
* // ...
* }
* ```
*/
list(applicationID, params, options) {
const { account_id, ...query } = params;
return this._client.getAPIList(path `/accounts/${account_id}/one/applications/${applicationID}/auth-methods`, (SinglePage), { query, ...options });
}
}
BaseAuthMethods._key = Object.freeze(['zeroTrust', 'casb', 'applications', 'authMethods']);
return BaseAuthMethods;
})();
export class AuthMethods extends BaseAuthMethods {
}
//# sourceMappingURL=auth-methods.mjs.map