import { APIResource } from "../../core/resource.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { PagePromise, SinglePage } from "../../core/pagination.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; export declare class BaseSSO extends APIResource { static readonly _key: readonly ['iam', 'sso']; /** * Creates a new SSO connector for logging into Cloudflare through an identity * provider. * * @example * ```ts * const sso = await client.iam.sso.create({ * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * email_domain: 'example.com', * }); * ``` */ create(params: SSOCreateParams, options?: RequestOptions): APIPromise; /** * Updates the state or configuration of an SSO connector. * * @example * ```ts * const sso = await client.iam.sso.update( * '023e105f4ecef8ad9ca31a8372d0c353', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ update(ssoConnectorID: string, params: SSOUpdateParams, options?: RequestOptions): APIPromise; /** * Lists all SSO connectors configured for the account. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const ssoListResponse of client.iam.sso.list({ * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * })) { * // ... * } * ``` */ list(params: SSOListParams, options?: RequestOptions): PagePromise; /** * Deletes an SSO connector from the account. * * @example * ```ts * const sso = await client.iam.sso.delete( * '023e105f4ecef8ad9ca31a8372d0c353', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ delete(ssoConnectorID: string, params: SSODeleteParams, options?: RequestOptions): APIPromise; /** * Validates the user has added the DNS TXT record required for validating * ownership of the domain they are trying to set up a connector for. * * @example * ```ts * const response = await client.iam.sso.beginVerification( * '023e105f4ecef8ad9ca31a8372d0c353', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ beginVerification(ssoConnectorID: string, params: SSOBeginVerificationParams, options?: RequestOptions): APIPromise; /** * Retrieves details for a specific SSO connector. * * @example * ```ts * const sso = await client.iam.sso.get( * '023e105f4ecef8ad9ca31a8372d0c353', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ get(ssoConnectorID: string, params: SSOGetParams, options?: RequestOptions): APIPromise; } export declare class SSO extends BaseSSO { } export type SSOListResponsesSinglePage = SinglePage; export interface SSOCreateResponse { /** * SSO Connector identifier tag. */ id?: string; /** * Timestamp for the creation of the SSO connector */ created_on?: string; email_domain?: string; enabled?: boolean; /** * Timestamp for the last update of the SSO connector */ updated_on?: string; /** * Controls the display of FedRAMP language to the user during SSO login */ use_fedramp_language?: boolean; verification?: SSOCreateResponse.Verification; } export declare namespace SSOCreateResponse { interface Verification { /** * DNS verification code. Add this entire string to the DNS TXT record of the email * domain to validate ownership. */ code?: string; /** * The status of the verification code from the verification process. */ status?: 'awaiting' | 'pending' | 'failed' | 'verified'; } } export interface SSOUpdateResponse { /** * SSO Connector identifier tag. */ id?: string; /** * Timestamp for the creation of the SSO connector */ created_on?: string; email_domain?: string; enabled?: boolean; /** * Timestamp for the last update of the SSO connector */ updated_on?: string; /** * Controls the display of FedRAMP language to the user during SSO login */ use_fedramp_language?: boolean; verification?: SSOUpdateResponse.Verification; } export declare namespace SSOUpdateResponse { interface Verification { /** * DNS verification code. Add this entire string to the DNS TXT record of the email * domain to validate ownership. */ code?: string; /** * The status of the verification code from the verification process. */ status?: 'awaiting' | 'pending' | 'failed' | 'verified'; } } export interface SSOListResponse { /** * SSO Connector identifier tag. */ id?: string; /** * Timestamp for the creation of the SSO connector */ created_on?: string; email_domain?: string; enabled?: boolean; /** * Timestamp for the last update of the SSO connector */ updated_on?: string; /** * Controls the display of FedRAMP language to the user during SSO login */ use_fedramp_language?: boolean; verification?: SSOListResponse.Verification; } export declare namespace SSOListResponse { interface Verification { /** * DNS verification code. Add this entire string to the DNS TXT record of the email * domain to validate ownership. */ code?: string; /** * The status of the verification code from the verification process. */ status?: 'awaiting' | 'pending' | 'failed' | 'verified'; } } export interface SSODeleteResponse { /** * Identifier */ id: string; } export interface SSOBeginVerificationResponse { errors: Array; messages: Array; /** * Whether the API call was successful. */ success: true; } export declare namespace SSOBeginVerificationResponse { interface Error { code: number; message: string; documentation_url?: string; source?: Error.Source; } namespace Error { interface Source { pointer?: string; } } interface Message { code: number; message: string; documentation_url?: string; source?: Message.Source; } namespace Message { interface Source { pointer?: string; } } } export interface SSOGetResponse { /** * SSO Connector identifier tag. */ id?: string; /** * Timestamp for the creation of the SSO connector */ created_on?: string; email_domain?: string; enabled?: boolean; /** * Timestamp for the last update of the SSO connector */ updated_on?: string; /** * Controls the display of FedRAMP language to the user during SSO login */ use_fedramp_language?: boolean; verification?: SSOGetResponse.Verification; } export declare namespace SSOGetResponse { interface Verification { /** * DNS verification code. Add this entire string to the DNS TXT record of the email * domain to validate ownership. */ code?: string; /** * The status of the verification code from the verification process. */ status?: 'awaiting' | 'pending' | 'failed' | 'verified'; } } export interface SSOCreateParams { /** * Path param: Account identifier tag. */ account_id: string; /** * Body param: Email domain of the new SSO connector */ email_domain: string; /** * Body param: Begin the verification process after creation */ begin_verification?: boolean; /** * Body param: Controls the display of FedRAMP language to the user during SSO * login */ use_fedramp_language?: boolean; } export interface SSOUpdateParams { /** * Path param: Account identifier tag. */ account_id: string; /** * Body param: SSO Connector enabled state */ enabled?: boolean; /** * Body param: Controls the display of FedRAMP language to the user during SSO * login */ use_fedramp_language?: boolean; } export interface SSOListParams { /** * Account identifier tag. */ account_id: string; } export interface SSODeleteParams { /** * Account identifier tag. */ account_id: string; } export interface SSOBeginVerificationParams { /** * Account identifier tag. */ account_id: string; } export interface SSOGetParams { /** * Account identifier tag. */ account_id: string; } export declare namespace SSO { export { type SSOCreateResponse as SSOCreateResponse, type SSOUpdateResponse as SSOUpdateResponse, type SSOListResponse as SSOListResponse, type SSODeleteResponse as SSODeleteResponse, type SSOBeginVerificationResponse as SSOBeginVerificationResponse, type SSOGetResponse as SSOGetResponse, type SSOListResponsesSinglePage as SSOListResponsesSinglePage, type SSOCreateParams as SSOCreateParams, type SSOUpdateParams as SSOUpdateParams, type SSOListParams as SSOListParams, type SSODeleteParams as SSODeleteParams, type SSOBeginVerificationParams as SSOBeginVerificationParams, type SSOGetParams as SSOGetParams, }; } //# sourceMappingURL=sso.d.mts.map