cloudflare
Version:
The official TypeScript library for the Cloudflare API
38 lines • 1.75 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthMethods = exports.BaseAuthMethods = void 0;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../../../core/resource.js");
const pagination_1 = require("../../../../core/pagination.js");
const path_1 = require("../../../../internal/utils/path.js");
var BaseAuthMethods = /* @__PURE__ */ (() => {
class BaseAuthMethods extends resource_1.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((0, path_1.path) `/accounts/${account_id}/one/applications/${applicationID}/auth-methods`, (pagination_1.SinglePage), { query, ...options });
}
}
BaseAuthMethods._key = Object.freeze(['zeroTrust', 'casb', 'applications', 'authMethods']);
return BaseAuthMethods;
})();
exports.BaseAuthMethods = BaseAuthMethods;
class AuthMethods extends BaseAuthMethods {
}
exports.AuthMethods = AuthMethods;
//# sourceMappingURL=auth-methods.js.map