// AUTO-GENERATED by scripts/generate.ts from .generated-specs. Do not edit. import * as S from "@distilled.cloud/core/schema"; import * as API from "@distilled.cloud/core/api"; import * as T from "../traits.ts"; import { CloudflareProtocol, CloudflarePaginatedProtocol, type CloudflareOpError, type CloudflareOpContext, } from "../protocol.ts"; import { cloudflarePaginate, ResultInfo } from "../pagination.ts"; import { CloudflareError, CloudflareRateLimited } from "../errors.ts"; import * as Retry from "../retry.ts"; export type { CloudflareOpError, CloudflareOpContext }; /** Fallback camelCase→wire mapping for opaque content (mined from the distilled SDK). */ const KEY_DICTIONARY: Record> = { allowedCorsOrigins: "allowed_cors_origins", beginVerification: "begin_verification", clientId: "client_id", clientName: "client_name", clientSecret: "client_secret", clientUri: "client_uri", clientUriVerification: "client_uri_verification", createdAt: "created_at", createdOn: "created_on", documentationUrl: "documentation_url", emailDomain: "email_domain", firstName: "first_name", grantTypes: "grant_types", hasRotatedSecret: "has_rotated_secret", lastName: "last_name", logoUri: "logo_uri", modifiedOn: "modified_on", perPage: "per_page", permissionGroups: "permission_groups", policyUri: "policy_uri", postLogoutRedirectUris: "post_logout_redirect_uris", promotedAt: "promoted_at", redirectUris: "redirect_uris", resourceGroups: "resource_groups", responseTypes: "response_types", resultInfo: "result_info", tokenEndpointAuthMethod: "token_endpoint_auth_method", tosUri: "tos_uri", totalCount: "total_count", updatedAt: "updated_at", updatedOn: "updated_on", useFedrampLanguage: "use_fedramp_language", }; export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export class InvalidMember extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("InvalidMember", { code: S.Number, message: S.String, }), [{ code: 400 }], ) {} export class PolicyValidationFailed extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "PolicyValidationFailed", { code: S.Number, message: S.String, }, ), [{ status: 400, message: { includes: "Policy validation failed" } }], ) {} export class ResourceGroupNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "ResourceGroupNotFound", { code: S.Number, message: S.String, }, ), [{ code: 404, message: { includes: "Resource group" } }], ) {} export class UserGroupMemberNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "UserGroupMemberNotFound", { code: S.Number, message: S.String, }, ), [{ code: 404, message: { includes: "not found in user group" } }], ) {} export class UserGroupNameInUse extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("UserGroupNameInUse", { code: S.Number, message: S.String, }), [{ code: 400, message: { includes: "already in use" } }], ) {} export class UserGroupNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("UserGroupNotFound", { code: S.Number, message: S.String, }), [{ code: 404, message: { includes: "User group" } }], ) {} export interface BeginVerificationSsoRequest { /** Account identifier tag. */ accountId: string; /** SSO Connector identifier tag. */ ssoConnectorId: string; } export const BeginVerificationSsoRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), ssoConnectorId: S.String.pipe(T.Label("sso_connector_id")), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/sso_connectors/{sso_connector_id}/begin_verification", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BeginVerificationSsoRequest", }) as any as S.Schema; export interface BeginVerificationSsoResponse {} export const BeginVerificationSsoResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BeginVerificationSsoResponse", }) as any as S.Schema; export type OauthClientsCreateRequestGrantTypesItem = | "authorization_code" | "refresh_token"; export const OauthClientsCreateRequestGrantTypesItem = /*@__PURE__*/ S.String; export type OauthClientsCreateRequestGrantTypesList = Array< OauthClientsCreateRequestGrantTypesItem | (string & {}) >; export const OauthClientsCreateRequestGrantTypesList = /*@__PURE__*/ S.Array( OauthClientsCreateRequestGrantTypesItem, ) as any as S.Schema; export type OauthClientsCreateRequestRedirectUrisList = Array; export const OauthClientsCreateRequestRedirectUrisList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsCreateRequestResponseTypesItem = | "token" | "id_token" | "code"; export const OauthClientsCreateRequestResponseTypesItem = /*@__PURE__*/ S.String; export type OauthClientsCreateRequestResponseTypesList = Array< OauthClientsCreateRequestResponseTypesItem | (string & {}) >; export const OauthClientsCreateRequestResponseTypesList = /*@__PURE__*/ S.Array( OauthClientsCreateRequestResponseTypesItem, ) as any as S.Schema; export type OauthClientsCreateRequestScopesList = Array; export const OauthClientsCreateRequestScopesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsCreateRequestTokenEndpointAuthMethod = | "none" | "client_secret_basic" | "client_secret_post"; export const OauthClientsCreateRequestTokenEndpointAuthMethod = /*@__PURE__*/ S.String; export type OauthClientsCreateRequestAllowedCorsOriginsList = Array; export const OauthClientsCreateRequestAllowedCorsOriginsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsCreateRequestPostLogoutRedirectUrisList = Array; export const OauthClientsCreateRequestPostLogoutRedirectUrisList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateOauthClientRequest { /** Account identifier tag. */ accountId: string; /** Human-readable name of the OAuth client. */ clientName: string; /** Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally. */ grantTypes: OauthClientsCreateRequestGrantTypesList; /** Array of allowed redirect URIs for the client. */ redirectUris: OauthClientsCreateRequestRedirectUrisList; /** Array of OAuth response types the client is allowed to use. */ responseTypes: OauthClientsCreateRequestResponseTypesList; /** Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`. */ scopes: OauthClientsCreateRequestScopesList; /** The authentication method the client uses at the token endpoint. */ tokenEndpointAuthMethod: | OauthClientsCreateRequestTokenEndpointAuthMethod | (string & {}); /** Array of allowed CORS origins. */ allowedCorsOrigins?: OauthClientsCreateRequestAllowedCorsOriginsList; /** URL of the home page of the client. */ clientUri?: string; /** URL of the client's logo. */ logoUri?: string; /** URL that points to a privacy policy document. */ policyUri?: string; /** Array of allowed post-logout redirect URIs. */ postLogoutRedirectUris?: OauthClientsCreateRequestPostLogoutRedirectUrisList; /** URL that points to a terms of service document. */ tosUri?: string; } export const CreateOauthClientRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), clientName: S.String.pipe(T.Body("client_name")), grantTypes: OauthClientsCreateRequestGrantTypesList.pipe( T.Body("grant_types"), ), redirectUris: OauthClientsCreateRequestRedirectUrisList.pipe( T.Body("redirect_uris"), ), responseTypes: OauthClientsCreateRequestResponseTypesList.pipe( T.Body("response_types"), ), scopes: OauthClientsCreateRequestScopesList, tokenEndpointAuthMethod: OauthClientsCreateRequestTokenEndpointAuthMethod.pipe( T.Body("token_endpoint_auth_method"), ), allowedCorsOrigins: S.optional( OauthClientsCreateRequestAllowedCorsOriginsList.pipe( T.Body("allowed_cors_origins"), ), ), clientUri: S.optional(S.String.pipe(T.Body("client_uri"))), logoUri: S.optional(S.String.pipe(T.Body("logo_uri"))), policyUri: S.optional(S.String.pipe(T.Body("policy_uri"))), postLogoutRedirectUris: S.optional( OauthClientsCreateRequestPostLogoutRedirectUrisList.pipe( T.Body("post_logout_redirect_uris"), ), ), tosUri: S.optional(S.String.pipe(T.Body("tos_uri"))), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/oauth_clients", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateOauthClientRequest", }) as any as S.Schema; export type OauthClientsCreateResponseVisibility = "public" | "private"; export const OauthClientsCreateResponseVisibility = /*@__PURE__*/ S.String; export type OauthClientsCreateResponseAllowedCorsOriginsList = Array; export const OauthClientsCreateResponseAllowedCorsOriginsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsCreateResponseClientUriVerificationStatus = | "pending" | "in_progress" | "verified" | "failed"; export const OauthClientsCreateResponseClientUriVerificationStatus = /*@__PURE__*/ S.String; export interface OauthClientsCreateResponseClientUriVerification { /** Current verification status for the client URI host. */ status?: OauthClientsCreateResponseClientUriVerificationStatus | null; /** Exact TXT record value that must be added to DNS to prove ownership of the client URI host. */ text?: string | null; } export const OauthClientsCreateResponseClientUriVerification = /*@__PURE__*/ S.suspend(() => S.Struct({ status: S.optional( S.NullOr(OauthClientsCreateResponseClientUriVerificationStatus), ), text: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "OauthClientsCreateResponseClientUriVerification", }) as any as S.Schema; export type OauthClientsCreateResponseGrantTypesItem = | "authorization_code" | "refresh_token"; export const OauthClientsCreateResponseGrantTypesItem = /*@__PURE__*/ S.String; export type OauthClientsCreateResponseGrantTypesList = Array; export const OauthClientsCreateResponseGrantTypesList = /*@__PURE__*/ S.Array( OauthClientsCreateResponseGrantTypesItem, ) as any as S.Schema; export type OauthClientsCreateResponsePostLogoutRedirectUrisList = Array; export const OauthClientsCreateResponsePostLogoutRedirectUrisList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsCreateResponseRedirectUrisList = Array; export const OauthClientsCreateResponseRedirectUrisList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsCreateResponseResponseTypesItem = | "token" | "id_token" | "code"; export const OauthClientsCreateResponseResponseTypesItem = /*@__PURE__*/ S.String; export type OauthClientsCreateResponseResponseTypesList = Array; export const OauthClientsCreateResponseResponseTypesList = /*@__PURE__*/ S.Array( OauthClientsCreateResponseResponseTypesItem, ) as any as S.Schema; export type OauthClientsCreateResponseScopesList = Array; export const OauthClientsCreateResponseScopesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsCreateResponseTokenEndpointAuthMethod = | "none" | "client_secret_basic" | "client_secret_post"; export const OauthClientsCreateResponseTokenEndpointAuthMethod = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateOauthClientResponse { /** The unique identifier for an OAuth client. */ clientId: string; /** Visibility of the OAuth client. */ visibility: OauthClientsCreateResponseVisibility; /** Array of allowed CORS origins. */ allowedCorsOrigins?: OauthClientsCreateResponseAllowedCorsOriginsList | null; /** Human-readable name of the OAuth client. */ clientName?: string | null; /** The client secret. This is the only time the secret is returned in a response. */ clientSecret?: string | null; /** URL of the home page of the client. */ clientUri?: string | null; /** Client URI domain control verification state. */ clientUriVerification?: OauthClientsCreateResponseClientUriVerification | null; /** Timestamp when the OAuth client was created. */ createdAt?: string | null; /** Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally. */ grantTypes?: OauthClientsCreateResponseGrantTypesList | null; /** Indicates whether the client has a rotated secret that has not yet been deleted. */ hasRotatedSecret?: boolean | null; /** URL of the client's logo. */ logoUri?: string | null; /** URL that points to a privacy policy document. */ policyUri?: string | null; /** Array of allowed post-logout redirect URIs. */ postLogoutRedirectUris?: OauthClientsCreateResponsePostLogoutRedirectUrisList | null; /** Timestamp when the OAuth client was promoted to public visibility. */ promotedAt?: string | null; /** Array of allowed redirect URIs for the client. */ redirectUris?: OauthClientsCreateResponseRedirectUrisList | null; /** Array of OAuth response types the client is allowed to use. */ responseTypes?: OauthClientsCreateResponseResponseTypesList | null; /** Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`. */ scopes?: OauthClientsCreateResponseScopesList | null; /** The authentication method the client uses at the token endpoint. */ tokenEndpointAuthMethod?: OauthClientsCreateResponseTokenEndpointAuthMethod | null; /** URL that points to a terms of service document. */ tosUri?: string | null; /** Timestamp when the OAuth client was last updated. */ updatedAt?: string | null; } export const CreateOauthClientResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ clientId: S.String.pipe(T.Body("client_id")), visibility: OauthClientsCreateResponseVisibility, allowedCorsOrigins: S.optional( S.NullOr(OauthClientsCreateResponseAllowedCorsOriginsList).pipe( T.Body("allowed_cors_origins"), ), ), clientName: S.optional(S.NullOr(S.String).pipe(T.Body("client_name"))), clientSecret: S.optional(S.NullOr(S.String).pipe(T.Body("client_secret"))), clientUri: S.optional(S.NullOr(S.String).pipe(T.Body("client_uri"))), clientUriVerification: S.optional( S.NullOr(OauthClientsCreateResponseClientUriVerification).pipe( T.Body("client_uri_verification"), ), ), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), grantTypes: S.optional( S.NullOr(OauthClientsCreateResponseGrantTypesList).pipe( T.Body("grant_types"), ), ), hasRotatedSecret: S.optional( S.NullOr(S.Boolean).pipe(T.Body("has_rotated_secret")), ), logoUri: S.optional(S.NullOr(S.String).pipe(T.Body("logo_uri"))), policyUri: S.optional(S.NullOr(S.String).pipe(T.Body("policy_uri"))), postLogoutRedirectUris: S.optional( S.NullOr(OauthClientsCreateResponsePostLogoutRedirectUrisList).pipe( T.Body("post_logout_redirect_uris"), ), ), promotedAt: S.optional(S.NullOr(S.String).pipe(T.Body("promoted_at"))), redirectUris: S.optional( S.NullOr(OauthClientsCreateResponseRedirectUrisList).pipe( T.Body("redirect_uris"), ), ), responseTypes: S.optional( S.NullOr(OauthClientsCreateResponseResponseTypesList).pipe( T.Body("response_types"), ), ), scopes: S.optional(S.NullOr(OauthClientsCreateResponseScopesList)), tokenEndpointAuthMethod: S.optional( S.NullOr(OauthClientsCreateResponseTokenEndpointAuthMethod).pipe( T.Body("token_endpoint_auth_method"), ), ), tosUri: S.optional(S.NullOr(S.String).pipe(T.Body("tos_uri"))), updatedAt: S.optional(S.NullOr(S.String).pipe(T.Body("updated_at"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateOauthClientResponse", }) as any as S.Schema; export interface ResourceGroupsCreateRequestScopeObjectsItem { /** This is a combination of pre-defined resource name and identifier (like Zone ID etc.) */ key: string; } export const ResourceGroupsCreateRequestScopeObjectsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ key: S.String, }), ).annotate({ identifier: "ResourceGroupsCreateRequestScopeObjectsItem", }) as any as S.Schema; export type ResourceGroupsCreateRequestScopeObjectsList = Array; export const ResourceGroupsCreateRequestScopeObjectsList = /*@__PURE__*/ S.Array( ResourceGroupsCreateRequestScopeObjectsItem, ) as any as S.Schema; export interface ResourceGroupsCreateRequestScope { /** This is a combination of pre-defined resource name and identifier (like Account ID etc.) */ key: string; /** A list of scope objects for additional context. The number of Scope objects should not be zero. */ objects: ResourceGroupsCreateRequestScopeObjectsList; } export const ResourceGroupsCreateRequestScope = /*@__PURE__*/ S.suspend(() => S.Struct({ key: S.String, objects: ResourceGroupsCreateRequestScopeObjectsList, }), ).annotate({ identifier: "ResourceGroupsCreateRequestScope", }) as any as S.Schema; export interface CreateResourceGroupRequest { /** Account identifier tag. */ accountId: string; /** Name of the resource group */ name: string; /** A scope is a combination of scope objects which provides additional context. */ scope: ResourceGroupsCreateRequestScope; } export const CreateResourceGroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), name: S.String, scope: ResourceGroupsCreateRequestScope, }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/iam/resource_groups", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateResourceGroupRequest", }) as any as S.Schema; export type ResourceGroupsCreateResponseScopeItemObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export const ResourceGroupsCreateResponseScopeItemObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export type ResourceGroupsCreateResponseScopeItemObjectsList = Array; export const ResourceGroupsCreateResponseScopeItemObjectsList = /*@__PURE__*/ S.Array( ResourceGroupsCreateRequestScopeObjectsItem, ) as any as S.Schema; export interface ResourceGroupsCreateResponseScopeItem { /** This is a combination of pre-defined resource name and identifier (like Account ID etc.) */ key: string; /** A list of scope objects for additional context. */ objects: ResourceGroupsCreateResponseScopeItemObjectsList; } export const ResourceGroupsCreateResponseScopeItem = /*@__PURE__*/ S.suspend( () => S.Struct({ key: S.String, objects: ResourceGroupsCreateResponseScopeItemObjectsList, }), ).annotate({ identifier: "ResourceGroupsCreateResponseScopeItem", }) as any as S.Schema; export type ResourceGroupsCreateResponseScopeList = Array; export const ResourceGroupsCreateResponseScopeList = /*@__PURE__*/ S.Array( ResourceGroupsCreateResponseScopeItem, ) as any as S.Schema; export interface ResourceGroupsCreateResponseMeta { key?: string | null; value?: string | null; } export const ResourceGroupsCreateResponseMeta = /*@__PURE__*/ S.suspend(() => S.Struct({ key: S.optional(S.NullOr(S.String)), value: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "ResourceGroupsCreateResponseMeta", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateResourceGroupResponse { /** Identifier of the resource group. */ id: string; /** The scope associated to the resource group */ scope: ResourceGroupsCreateResponseScopeList; /** Attributes associated to the resource group. */ meta?: ResourceGroupsCreateResponseMeta | null; /** Name of the resource group. */ name?: string | null; } export const CreateResourceGroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, scope: ResourceGroupsCreateResponseScopeList, meta: S.optional(S.NullOr(ResourceGroupsCreateResponseMeta)), name: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateResourceGroupResponse", }) as any as S.Schema; export interface CreateSsoRequest { /** Account identifier tag. */ accountId: string; /** Email domain of the new SSO connector */ emailDomain: string; /** Begin the verification process after creation */ beginVerification?: boolean; /** Controls the display of FedRAMP language to the user during SSO login */ useFedrampLanguage?: boolean; } export const CreateSsoRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), emailDomain: S.String.pipe(T.Body("email_domain")), beginVerification: S.optional(S.Boolean.pipe(T.Body("begin_verification"))), useFedrampLanguage: S.optional( S.Boolean.pipe(T.Body("use_fedramp_language")), ), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/sso_connectors", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSsoRequest", }) as any as S.Schema; export type SsoCreateResponseVerificationStatus = | "awaiting" | "pending" | "failed" | "verified"; export const SsoCreateResponseVerificationStatus = /*@__PURE__*/ S.String; export interface SsoCreateResponseVerification { /** DNS verification code. Add this entire string to the DNS TXT record of the email domain to validate ownership. */ code?: string | null; /** The status of the verification code from the verification process. */ status?: SsoCreateResponseVerificationStatus | null; } export const SsoCreateResponseVerification = /*@__PURE__*/ S.suspend(() => S.Struct({ code: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(SsoCreateResponseVerificationStatus)), }), ).annotate({ identifier: "SsoCreateResponseVerification", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateSsoResponse { /** SSO Connector identifier tag. */ id?: string | null; /** Timestamp for the creation of the SSO connector */ createdOn?: string | null; emailDomain?: string | null; enabled?: boolean | null; /** Timestamp for the last update of the SSO connector */ updatedOn?: string | null; /** Controls the display of FedRAMP language to the user during SSO login */ useFedrampLanguage?: boolean | null; verification?: SsoCreateResponseVerification | null; } export const CreateSsoResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), emailDomain: S.optional(S.NullOr(S.String).pipe(T.Body("email_domain"))), enabled: S.optional(S.NullOr(S.Boolean)), updatedOn: S.optional(S.NullOr(S.String).pipe(T.Body("updated_on"))), useFedrampLanguage: S.optional( S.NullOr(S.Boolean).pipe(T.Body("use_fedramp_language")), ), verification: S.optional(S.NullOr(SsoCreateResponseVerification)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSsoResponse", }) as any as S.Schema; export type UserGroupsCreateRequestPoliciesItemAccess = "allow" | "deny"; export const UserGroupsCreateRequestPoliciesItemAccess = /*@__PURE__*/ S.String; export interface UserGroupsCreateRequestPoliciesItemPermissionGroupsItem { /** Permission Group identifier tag. */ id: string; } export const UserGroupsCreateRequestPoliciesItemPermissionGroupsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }), ).annotate({ identifier: "UserGroupsCreateRequestPoliciesItemPermissionGroupsItem", }) as any as S.Schema; export type UserGroupsCreateRequestPoliciesItemPermissionGroupsList = Array; export const UserGroupsCreateRequestPoliciesItemPermissionGroupsList = /*@__PURE__*/ S.Array( UserGroupsCreateRequestPoliciesItemPermissionGroupsItem, ) as any as S.Schema; export interface UserGroupsCreateRequestPoliciesItemResourceGroupsItem { /** Resource Group identifier tag. */ id: string; } export const UserGroupsCreateRequestPoliciesItemResourceGroupsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }), ).annotate({ identifier: "UserGroupsCreateRequestPoliciesItemResourceGroupsItem", }) as any as S.Schema; export type UserGroupsCreateRequestPoliciesItemResourceGroupsList = Array; export const UserGroupsCreateRequestPoliciesItemResourceGroupsList = /*@__PURE__*/ S.Array( UserGroupsCreateRequestPoliciesItemResourceGroupsItem, ) as any as S.Schema; export interface UserGroupsCreateRequestPoliciesItem { /** Allow or deny operations against the resources. */ access: UserGroupsCreateRequestPoliciesItemAccess | (string & {}); /** A set of permission groups that are specified to the policy. */ permissionGroups: UserGroupsCreateRequestPoliciesItemPermissionGroupsList; /** A set of resource groups that are specified to the policy. */ resourceGroups: UserGroupsCreateRequestPoliciesItemResourceGroupsList; } export const UserGroupsCreateRequestPoliciesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ access: UserGroupsCreateRequestPoliciesItemAccess, permissionGroups: UserGroupsCreateRequestPoliciesItemPermissionGroupsList.pipe( T.Body("permission_groups"), ), resourceGroups: UserGroupsCreateRequestPoliciesItemResourceGroupsList.pipe( T.Body("resource_groups"), ), }), ).annotate({ identifier: "UserGroupsCreateRequestPoliciesItem", }) as any as S.Schema; export type UserGroupsCreateRequestPoliciesList = Array; export const UserGroupsCreateRequestPoliciesList = /*@__PURE__*/ S.Array( UserGroupsCreateRequestPoliciesItem, ) as any as S.Schema; export interface CreateUserGroupRequest { /** Account identifier tag. */ accountId: string; /** Name of the User group. */ name: string; /** Policies attached to the User group */ policies?: UserGroupsCreateRequestPoliciesList; } export const CreateUserGroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), name: S.String, policies: S.optional(UserGroupsCreateRequestPoliciesList), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/iam/user_groups", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateUserGroupRequest", }) as any as S.Schema; export type UserGroupsCreateResponsePoliciesItemAccess = "allow" | "deny"; export const UserGroupsCreateResponsePoliciesItemAccess = /*@__PURE__*/ S.String; export type UserGroupsCreateResponsePoliciesItemPermissionGroupsItemMeta = ResourceGroupsCreateResponseMeta; export const UserGroupsCreateResponsePoliciesItemPermissionGroupsItemMeta = ResourceGroupsCreateResponseMeta; export interface UserGroupsCreateResponsePoliciesItemPermissionGroupsItem { /** Identifier of the permission group. */ id: string; /** Attributes associated to the permission group. */ meta?: ResourceGroupsCreateResponseMeta | null; /** Name of the permission group. */ name?: string | null; } export const UserGroupsCreateResponsePoliciesItemPermissionGroupsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, meta: S.optional(S.NullOr(ResourceGroupsCreateResponseMeta)), name: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UserGroupsCreateResponsePoliciesItemPermissionGroupsItem", }) as any as S.Schema; export type UserGroupsCreateResponsePoliciesItemPermissionGroupsList = Array; export const UserGroupsCreateResponsePoliciesItemPermissionGroupsList = /*@__PURE__*/ S.Array( UserGroupsCreateResponsePoliciesItemPermissionGroupsItem, ) as any as S.Schema; export type UserGroupsCreateResponsePoliciesItemResourceGroupsItemScopeItemObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export const UserGroupsCreateResponsePoliciesItemResourceGroupsItemScopeItemObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export type UserGroupsCreateResponsePoliciesItemResourceGroupsItemScopeItemObjectsList = Array; export const UserGroupsCreateResponsePoliciesItemResourceGroupsItemScopeItemObjectsList = /*@__PURE__*/ S.Array( ResourceGroupsCreateRequestScopeObjectsItem, ) as any as S.Schema; export interface UserGroupsCreateResponsePoliciesItemResourceGroupsItemScopeItem { /** This is a combination of pre-defined resource name and identifier (like Account ID etc.) */ key: string; /** A list of scope objects for additional context. */ objects: UserGroupsCreateResponsePoliciesItemResourceGroupsItemScopeItemObjectsList; } export const UserGroupsCreateResponsePoliciesItemResourceGroupsItemScopeItem = /*@__PURE__*/ S.suspend(() => S.Struct({ key: S.String, objects: UserGroupsCreateResponsePoliciesItemResourceGroupsItemScopeItemObjectsList, }), ).annotate({ identifier: "UserGroupsCreateResponsePoliciesItemResourceGroupsItemScopeItem", }) as any as S.Schema; export type UserGroupsCreateResponsePoliciesItemResourceGroupsItemScopeList = Array; export const UserGroupsCreateResponsePoliciesItemResourceGroupsItemScopeList = /*@__PURE__*/ S.Array( UserGroupsCreateResponsePoliciesItemResourceGroupsItemScopeItem, ) as any as S.Schema; export type UserGroupsCreateResponsePoliciesItemResourceGroupsItemMeta = ResourceGroupsCreateResponseMeta; export const UserGroupsCreateResponsePoliciesItemResourceGroupsItemMeta = ResourceGroupsCreateResponseMeta; export interface UserGroupsCreateResponsePoliciesItemResourceGroupsItem { /** Identifier of the resource group. */ id: string; /** The scope associated to the resource group */ scope: UserGroupsCreateResponsePoliciesItemResourceGroupsItemScopeList; /** Attributes associated to the resource group. */ meta?: ResourceGroupsCreateResponseMeta | null; /** Name of the resource group. */ name?: string | null; } export const UserGroupsCreateResponsePoliciesItemResourceGroupsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, scope: UserGroupsCreateResponsePoliciesItemResourceGroupsItemScopeList, meta: S.optional(S.NullOr(ResourceGroupsCreateResponseMeta)), name: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UserGroupsCreateResponsePoliciesItemResourceGroupsItem", }) as any as S.Schema; export type UserGroupsCreateResponsePoliciesItemResourceGroupsList = Array; export const UserGroupsCreateResponsePoliciesItemResourceGroupsList = /*@__PURE__*/ S.Array( UserGroupsCreateResponsePoliciesItemResourceGroupsItem, ) as any as S.Schema; export interface UserGroupsCreateResponsePoliciesItem { /** Policy identifier. */ id?: string | null; /** Allow or deny operations against the resources. */ access?: UserGroupsCreateResponsePoliciesItemAccess | null; /** A set of permission groups that are specified to the policy. */ permissionGroups?: UserGroupsCreateResponsePoliciesItemPermissionGroupsList | null; /** A list of resource groups that the policy applies to. */ resourceGroups?: UserGroupsCreateResponsePoliciesItemResourceGroupsList | null; } export const UserGroupsCreateResponsePoliciesItem = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.NullOr(S.String)), access: S.optional(S.NullOr(UserGroupsCreateResponsePoliciesItemAccess)), permissionGroups: S.optional( S.NullOr(UserGroupsCreateResponsePoliciesItemPermissionGroupsList).pipe( T.Body("permission_groups"), ), ), resourceGroups: S.optional( S.NullOr(UserGroupsCreateResponsePoliciesItemResourceGroupsList).pipe( T.Body("resource_groups"), ), ), }), ).annotate({ identifier: "UserGroupsCreateResponsePoliciesItem", }) as any as S.Schema; export type UserGroupsCreateResponsePoliciesList = Array; export const UserGroupsCreateResponsePoliciesList = /*@__PURE__*/ S.Array( UserGroupsCreateResponsePoliciesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateUserGroupResponse { /** User Group identifier tag. */ id: string; /** Timestamp for the creation of the user group */ createdOn: string; /** Last time the user group was modified. */ modifiedOn: string; /** Name of the user group. */ name: string; /** Policies attached to the User group */ policies?: UserGroupsCreateResponsePoliciesList | null; } export const CreateUserGroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, policies: S.optional(S.NullOr(UserGroupsCreateResponsePoliciesList)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateUserGroupResponse", }) as any as S.Schema; export interface UserGroupsMembersCreateRequestMembersItem { /** The identifier of an existing account Member. */ id: string; } export const UserGroupsMembersCreateRequestMembersItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }), ).annotate({ identifier: "UserGroupsMembersCreateRequestMembersItem", }) as any as S.Schema; export type UserGroupsMembersCreateRequestMembersList = Array; export const UserGroupsMembersCreateRequestMembersList = /*@__PURE__*/ S.Array( UserGroupsMembersCreateRequestMembersItem, ) as any as S.Schema; export interface CreateUserGroupMemberRequest { /** Account identifier tag. */ accountId: string; /** User Group identifier tag. */ userGroupId: string; members: UserGroupsMembersCreateRequestMembersList; } export const CreateUserGroupMemberRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), userGroupId: S.String.pipe(T.Label("user_group_id")), members: UserGroupsMembersCreateRequestMembersList.pipe(T.HttpBody()), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/iam/user_groups/{user_group_id}/members", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateUserGroupMemberRequest", }) as any as S.Schema; export type UserGroupsMembersCreateResultItemStatus = "accepted" | "pending"; export const UserGroupsMembersCreateResultItemStatus = /*@__PURE__*/ S.String; export interface UserGroupsMembersCreateResultItem { /** Account member identifier. */ id: string; /** The contact email address of the user. */ email?: string | null; /** The member's status in the account. */ status?: UserGroupsMembersCreateResultItemStatus | null; } export const UserGroupsMembersCreateResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, email: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(UserGroupsMembersCreateResultItemStatus)), }), ).annotate({ identifier: "UserGroupsMembersCreateResultItem", }) as any as S.Schema; export type UserGroupsMembersCreateResultList = Array; export const UserGroupsMembersCreateResultList = /*@__PURE__*/ S.Array( UserGroupsMembersCreateResultItem, ) as any as S.Schema; export interface CreateUserGroupMemberResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: UserGroupsMembersCreateResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const CreateUserGroupMemberResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: UserGroupsMembersCreateResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateUserGroupMemberResponse", }) as any as S.Schema; export interface DeleteOauthClientRequest { /** Account identifier tag. */ accountId: string; /** The unique identifier for an OAuth client. */ oauthClientId: string; } export const DeleteOauthClientRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), oauthClientId: S.String.pipe(T.Label("oauth_client_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/oauth_clients/{oauth_client_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteOauthClientRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteOauthClientResponse { /** Identifier */ id: string; } export const DeleteOauthClientResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteOauthClientResponse", }) as any as S.Schema; export interface DeleteResourceGroupRequest { /** Account identifier tag. */ accountId: string; /** Resource Group identifier tag. */ resourceGroupId: string; } export const DeleteResourceGroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), resourceGroupId: S.String.pipe(T.Label("resource_group_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/iam/resource_groups/{resource_group_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteResourceGroupRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteResourceGroupResponse { /** Identifier */ id: string; } export const DeleteResourceGroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteResourceGroupResponse", }) as any as S.Schema; export interface DeleteRotatedSecretOauthClientRequest { /** Account identifier tag. */ accountId: string; /** The unique identifier for an OAuth client. */ oauthClientId: string; } export const DeleteRotatedSecretOauthClientRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), oauthClientId: S.String.pipe(T.Label("oauth_client_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/oauth_clients/{oauth_client_id}/rotate_secret", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteRotatedSecretOauthClientRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteRotatedSecretOauthClientResponse { /** Identifier */ id: string; } export const DeleteRotatedSecretOauthClientResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteRotatedSecretOauthClientResponse", }) as any as S.Schema; export interface DeleteSsoRequest { /** Account identifier tag. */ accountId: string; /** SSO Connector identifier tag. */ ssoConnectorId: string; } export const DeleteSsoRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), ssoConnectorId: S.String.pipe(T.Label("sso_connector_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/sso_connectors/{sso_connector_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSsoRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteSsoResponse { /** Identifier */ id: string; } export const DeleteSsoResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSsoResponse", }) as any as S.Schema; export interface DeleteUserGroupRequest { /** Account identifier tag. */ accountId: string; /** User Group identifier tag. */ userGroupId: string; } export const DeleteUserGroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), userGroupId: S.String.pipe(T.Label("user_group_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/iam/user_groups/{user_group_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteUserGroupRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteUserGroupResponse { /** Identifier */ id: string; } export const DeleteUserGroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteUserGroupResponse", }) as any as S.Schema; export interface DeleteUserGroupMemberRequest { /** Account identifier tag. */ accountId: string; /** User Group identifier tag. */ userGroupId: string; /** The identifier of an existing account Member. */ memberId: string; } export const DeleteUserGroupMemberRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), userGroupId: S.String.pipe(T.Label("user_group_id")), memberId: S.String.pipe(T.Label("member_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/iam/user_groups/{user_group_id}/members/{member_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteUserGroupMemberRequest", }) as any as S.Schema; export type UserGroupsMembersDeleteResponseStatus = "accepted" | "pending"; export const UserGroupsMembersDeleteResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteUserGroupMemberResponse { /** Account member identifier. */ id: string; /** The contact email address of the user. */ email?: string | null; /** The member's status in the account. */ status?: UserGroupsMembersDeleteResponseStatus | null; } export const DeleteUserGroupMemberResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, email: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(UserGroupsMembersDeleteResponseStatus)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteUserGroupMemberResponse", }) as any as S.Schema; export interface GetOauthClientRequest { /** Account identifier tag. */ accountId: string; /** The unique identifier for an OAuth client. */ oauthClientId: string; } export const GetOauthClientRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), oauthClientId: S.String.pipe(T.Label("oauth_client_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/oauth_clients/{oauth_client_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetOauthClientRequest", }) as any as S.Schema; export type OauthClientsGetResponseVisibility = "public" | "private"; export const OauthClientsGetResponseVisibility = /*@__PURE__*/ S.String; export type OauthClientsGetResponseAllowedCorsOriginsList = Array; export const OauthClientsGetResponseAllowedCorsOriginsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsGetResponseClientUriVerificationStatus = | "pending" | "in_progress" | "verified" | "failed"; export const OauthClientsGetResponseClientUriVerificationStatus = /*@__PURE__*/ S.String; export interface OauthClientsGetResponseClientUriVerification { /** Current verification status for the client URI host. */ status?: OauthClientsGetResponseClientUriVerificationStatus | null; /** Exact TXT record value that must be added to DNS to prove ownership of the client URI host. */ text?: string | null; } export const OauthClientsGetResponseClientUriVerification = /*@__PURE__*/ S.suspend(() => S.Struct({ status: S.optional( S.NullOr(OauthClientsGetResponseClientUriVerificationStatus), ), text: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "OauthClientsGetResponseClientUriVerification", }) as any as S.Schema; export type OauthClientsGetResponseGrantTypesItem = | "authorization_code" | "refresh_token"; export const OauthClientsGetResponseGrantTypesItem = /*@__PURE__*/ S.String; export type OauthClientsGetResponseGrantTypesList = Array; export const OauthClientsGetResponseGrantTypesList = /*@__PURE__*/ S.Array( OauthClientsGetResponseGrantTypesItem, ) as any as S.Schema; export type OauthClientsGetResponsePostLogoutRedirectUrisList = Array; export const OauthClientsGetResponsePostLogoutRedirectUrisList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsGetResponseRedirectUrisList = Array; export const OauthClientsGetResponseRedirectUrisList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsGetResponseResponseTypesItem = | "token" | "id_token" | "code"; export const OauthClientsGetResponseResponseTypesItem = /*@__PURE__*/ S.String; export type OauthClientsGetResponseResponseTypesList = Array; export const OauthClientsGetResponseResponseTypesList = /*@__PURE__*/ S.Array( OauthClientsGetResponseResponseTypesItem, ) as any as S.Schema; export type OauthClientsGetResponseScopesList = Array; export const OauthClientsGetResponseScopesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsGetResponseTokenEndpointAuthMethod = | "none" | "client_secret_basic" | "client_secret_post"; export const OauthClientsGetResponseTokenEndpointAuthMethod = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetOauthClientResponse { /** The unique identifier for an OAuth client. */ clientId: string; /** Visibility of the OAuth client. */ visibility: OauthClientsGetResponseVisibility; /** Array of allowed CORS origins. */ allowedCorsOrigins?: OauthClientsGetResponseAllowedCorsOriginsList | null; /** Human-readable name of the OAuth client. */ clientName?: string | null; /** URL of the home page of the client. */ clientUri?: string | null; /** Client URI domain control verification state. */ clientUriVerification?: OauthClientsGetResponseClientUriVerification | null; /** Timestamp when the OAuth client was created. */ createdAt?: string | null; /** Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally. */ grantTypes?: OauthClientsGetResponseGrantTypesList | null; /** Indicates whether the client has a rotated secret that has not yet been deleted. */ hasRotatedSecret?: boolean | null; /** URL of the client's logo. */ logoUri?: string | null; /** URL that points to a privacy policy document. */ policyUri?: string | null; /** Array of allowed post-logout redirect URIs. */ postLogoutRedirectUris?: OauthClientsGetResponsePostLogoutRedirectUrisList | null; /** Timestamp when the OAuth client was promoted to public visibility. */ promotedAt?: string | null; /** Array of allowed redirect URIs for the client. */ redirectUris?: OauthClientsGetResponseRedirectUrisList | null; /** Array of OAuth response types the client is allowed to use. */ responseTypes?: OauthClientsGetResponseResponseTypesList | null; /** Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`. */ scopes?: OauthClientsGetResponseScopesList | null; /** The authentication method the client uses at the token endpoint. */ tokenEndpointAuthMethod?: OauthClientsGetResponseTokenEndpointAuthMethod | null; /** URL that points to a terms of service document. */ tosUri?: string | null; /** Timestamp when the OAuth client was last updated. */ updatedAt?: string | null; } export const GetOauthClientResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ clientId: S.String.pipe(T.Body("client_id")), visibility: OauthClientsGetResponseVisibility, allowedCorsOrigins: S.optional( S.NullOr(OauthClientsGetResponseAllowedCorsOriginsList).pipe( T.Body("allowed_cors_origins"), ), ), clientName: S.optional(S.NullOr(S.String).pipe(T.Body("client_name"))), clientUri: S.optional(S.NullOr(S.String).pipe(T.Body("client_uri"))), clientUriVerification: S.optional( S.NullOr(OauthClientsGetResponseClientUriVerification).pipe( T.Body("client_uri_verification"), ), ), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), grantTypes: S.optional( S.NullOr(OauthClientsGetResponseGrantTypesList).pipe( T.Body("grant_types"), ), ), hasRotatedSecret: S.optional( S.NullOr(S.Boolean).pipe(T.Body("has_rotated_secret")), ), logoUri: S.optional(S.NullOr(S.String).pipe(T.Body("logo_uri"))), policyUri: S.optional(S.NullOr(S.String).pipe(T.Body("policy_uri"))), postLogoutRedirectUris: S.optional( S.NullOr(OauthClientsGetResponsePostLogoutRedirectUrisList).pipe( T.Body("post_logout_redirect_uris"), ), ), promotedAt: S.optional(S.NullOr(S.String).pipe(T.Body("promoted_at"))), redirectUris: S.optional( S.NullOr(OauthClientsGetResponseRedirectUrisList).pipe( T.Body("redirect_uris"), ), ), responseTypes: S.optional( S.NullOr(OauthClientsGetResponseResponseTypesList).pipe( T.Body("response_types"), ), ), scopes: S.optional(S.NullOr(OauthClientsGetResponseScopesList)), tokenEndpointAuthMethod: S.optional( S.NullOr(OauthClientsGetResponseTokenEndpointAuthMethod).pipe( T.Body("token_endpoint_auth_method"), ), ), tosUri: S.optional(S.NullOr(S.String).pipe(T.Body("tos_uri"))), updatedAt: S.optional(S.NullOr(S.String).pipe(T.Body("updated_at"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetOauthClientResponse", }) as any as S.Schema; export interface GetPermissionGroupRequest { /** Account identifier tag. */ accountId: string; /** Permission Group identifier tag. */ permissionGroupId: string; } export const GetPermissionGroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), permissionGroupId: S.String.pipe(T.Label("permission_group_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/iam/permission_groups/{permission_group_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPermissionGroupRequest", }) as any as S.Schema; export type PermissionGroupsGetResponseMeta = ResourceGroupsCreateResponseMeta; export const PermissionGroupsGetResponseMeta = ResourceGroupsCreateResponseMeta; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetPermissionGroupResponse { /** Identifier of the permission group. */ id: string; /** Attributes associated to the permission group. */ meta?: ResourceGroupsCreateResponseMeta | null; /** Name of the permission group. */ name?: string | null; } export const GetPermissionGroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, meta: S.optional(S.NullOr(ResourceGroupsCreateResponseMeta)), name: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetPermissionGroupResponse", }) as any as S.Schema; export interface GetResourceGroupRequest { /** Account identifier tag. */ accountId: string; /** Resource Group identifier tag. */ resourceGroupId: string; } export const GetResourceGroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), resourceGroupId: S.String.pipe(T.Label("resource_group_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/iam/resource_groups/{resource_group_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetResourceGroupRequest", }) as any as S.Schema; export type ResourceGroupsGetResponseScopeItemObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export const ResourceGroupsGetResponseScopeItemObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export type ResourceGroupsGetResponseScopeItemObjectsList = Array; export const ResourceGroupsGetResponseScopeItemObjectsList = /*@__PURE__*/ S.Array( ResourceGroupsCreateRequestScopeObjectsItem, ) as any as S.Schema; export interface ResourceGroupsGetResponseScopeItem { /** This is a combination of pre-defined resource name and identifier (like Account ID etc.) */ key: string; /** A list of scope objects for additional context. */ objects: ResourceGroupsGetResponseScopeItemObjectsList; } export const ResourceGroupsGetResponseScopeItem = /*@__PURE__*/ S.suspend(() => S.Struct({ key: S.String, objects: ResourceGroupsGetResponseScopeItemObjectsList, }), ).annotate({ identifier: "ResourceGroupsGetResponseScopeItem", }) as any as S.Schema; export type ResourceGroupsGetResponseScopeList = Array; export const ResourceGroupsGetResponseScopeList = /*@__PURE__*/ S.Array( ResourceGroupsGetResponseScopeItem, ) as any as S.Schema; export type ResourceGroupsGetResponseMeta = ResourceGroupsCreateResponseMeta; export const ResourceGroupsGetResponseMeta = ResourceGroupsCreateResponseMeta; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetResourceGroupResponse { /** Identifier of the resource group. */ id: string; /** The scope associated to the resource group */ scope: ResourceGroupsGetResponseScopeList; /** Attributes associated to the resource group. */ meta?: ResourceGroupsCreateResponseMeta | null; /** Name of the resource group. */ name?: string | null; } export const GetResourceGroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, scope: ResourceGroupsGetResponseScopeList, meta: S.optional(S.NullOr(ResourceGroupsCreateResponseMeta)), name: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetResourceGroupResponse", }) as any as S.Schema; export interface GetSsoRequest { /** Account identifier tag. */ accountId: string; /** SSO Connector identifier tag. */ ssoConnectorId: string; } export const GetSsoRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), ssoConnectorId: S.String.pipe(T.Label("sso_connector_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/sso_connectors/{sso_connector_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSsoRequest" }) as any as S.Schema; export type SsoGetResponseVerificationStatus = | "awaiting" | "pending" | "failed" | "verified"; export const SsoGetResponseVerificationStatus = /*@__PURE__*/ S.String; export interface SsoGetResponseVerification { /** DNS verification code. Add this entire string to the DNS TXT record of the email domain to validate ownership. */ code?: string | null; /** The status of the verification code from the verification process. */ status?: SsoGetResponseVerificationStatus | null; } export const SsoGetResponseVerification = /*@__PURE__*/ S.suspend(() => S.Struct({ code: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(SsoGetResponseVerificationStatus)), }), ).annotate({ identifier: "SsoGetResponseVerification", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetSsoResponse { /** SSO Connector identifier tag. */ id?: string | null; /** Timestamp for the creation of the SSO connector */ createdOn?: string | null; emailDomain?: string | null; enabled?: boolean | null; /** Timestamp for the last update of the SSO connector */ updatedOn?: string | null; /** Controls the display of FedRAMP language to the user during SSO login */ useFedrampLanguage?: boolean | null; verification?: SsoGetResponseVerification | null; } export const GetSsoResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), emailDomain: S.optional(S.NullOr(S.String).pipe(T.Body("email_domain"))), enabled: S.optional(S.NullOr(S.Boolean)), updatedOn: S.optional(S.NullOr(S.String).pipe(T.Body("updated_on"))), useFedrampLanguage: S.optional( S.NullOr(S.Boolean).pipe(T.Body("use_fedramp_language")), ), verification: S.optional(S.NullOr(SsoGetResponseVerification)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSsoResponse" }) as any as S.Schema; export interface GetUserGroupRequest { /** Account identifier tag. */ accountId: string; /** User Group identifier tag. */ userGroupId: string; } export const GetUserGroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), userGroupId: S.String.pipe(T.Label("user_group_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/iam/user_groups/{user_group_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetUserGroupRequest", }) as any as S.Schema; export type UserGroupsGetResponsePoliciesItemAccess = "allow" | "deny"; export const UserGroupsGetResponsePoliciesItemAccess = /*@__PURE__*/ S.String; export type UserGroupsGetResponsePoliciesItemPermissionGroupsItemMeta = ResourceGroupsCreateResponseMeta; export const UserGroupsGetResponsePoliciesItemPermissionGroupsItemMeta = ResourceGroupsCreateResponseMeta; export type UserGroupsGetResponsePoliciesItemPermissionGroupsItem = UserGroupsCreateResponsePoliciesItemPermissionGroupsItem; export const UserGroupsGetResponsePoliciesItemPermissionGroupsItem = UserGroupsCreateResponsePoliciesItemPermissionGroupsItem; export type UserGroupsGetResponsePoliciesItemPermissionGroupsList = Array; export const UserGroupsGetResponsePoliciesItemPermissionGroupsList = /*@__PURE__*/ S.Array( UserGroupsCreateResponsePoliciesItemPermissionGroupsItem, ) as any as S.Schema; export type UserGroupsGetResponsePoliciesItemResourceGroupsItemScopeItemObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export const UserGroupsGetResponsePoliciesItemResourceGroupsItemScopeItemObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export type UserGroupsGetResponsePoliciesItemResourceGroupsItemScopeItemObjectsList = Array; export const UserGroupsGetResponsePoliciesItemResourceGroupsItemScopeItemObjectsList = /*@__PURE__*/ S.Array( ResourceGroupsCreateRequestScopeObjectsItem, ) as any as S.Schema; export interface UserGroupsGetResponsePoliciesItemResourceGroupsItemScopeItem { /** This is a combination of pre-defined resource name and identifier (like Account ID etc.) */ key: string; /** A list of scope objects for additional context. */ objects: UserGroupsGetResponsePoliciesItemResourceGroupsItemScopeItemObjectsList; } export const UserGroupsGetResponsePoliciesItemResourceGroupsItemScopeItem = /*@__PURE__*/ S.suspend(() => S.Struct({ key: S.String, objects: UserGroupsGetResponsePoliciesItemResourceGroupsItemScopeItemObjectsList, }), ).annotate({ identifier: "UserGroupsGetResponsePoliciesItemResourceGroupsItemScopeItem", }) as any as S.Schema; export type UserGroupsGetResponsePoliciesItemResourceGroupsItemScopeList = Array; export const UserGroupsGetResponsePoliciesItemResourceGroupsItemScopeList = /*@__PURE__*/ S.Array( UserGroupsGetResponsePoliciesItemResourceGroupsItemScopeItem, ) as any as S.Schema; export type UserGroupsGetResponsePoliciesItemResourceGroupsItemMeta = ResourceGroupsCreateResponseMeta; export const UserGroupsGetResponsePoliciesItemResourceGroupsItemMeta = ResourceGroupsCreateResponseMeta; export interface UserGroupsGetResponsePoliciesItemResourceGroupsItem { /** Identifier of the resource group. */ id: string; /** The scope associated to the resource group */ scope: UserGroupsGetResponsePoliciesItemResourceGroupsItemScopeList; /** Attributes associated to the resource group. */ meta?: ResourceGroupsCreateResponseMeta | null; /** Name of the resource group. */ name?: string | null; } export const UserGroupsGetResponsePoliciesItemResourceGroupsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, scope: UserGroupsGetResponsePoliciesItemResourceGroupsItemScopeList, meta: S.optional(S.NullOr(ResourceGroupsCreateResponseMeta)), name: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UserGroupsGetResponsePoliciesItemResourceGroupsItem", }) as any as S.Schema; export type UserGroupsGetResponsePoliciesItemResourceGroupsList = Array; export const UserGroupsGetResponsePoliciesItemResourceGroupsList = /*@__PURE__*/ S.Array( UserGroupsGetResponsePoliciesItemResourceGroupsItem, ) as any as S.Schema; export interface UserGroupsGetResponsePoliciesItem { /** Policy identifier. */ id?: string | null; /** Allow or deny operations against the resources. */ access?: UserGroupsGetResponsePoliciesItemAccess | null; /** A set of permission groups that are specified to the policy. */ permissionGroups?: UserGroupsGetResponsePoliciesItemPermissionGroupsList | null; /** A list of resource groups that the policy applies to. */ resourceGroups?: UserGroupsGetResponsePoliciesItemResourceGroupsList | null; } export const UserGroupsGetResponsePoliciesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), access: S.optional(S.NullOr(UserGroupsGetResponsePoliciesItemAccess)), permissionGroups: S.optional( S.NullOr(UserGroupsGetResponsePoliciesItemPermissionGroupsList).pipe( T.Body("permission_groups"), ), ), resourceGroups: S.optional( S.NullOr(UserGroupsGetResponsePoliciesItemResourceGroupsList).pipe( T.Body("resource_groups"), ), ), }), ).annotate({ identifier: "UserGroupsGetResponsePoliciesItem", }) as any as S.Schema; export type UserGroupsGetResponsePoliciesList = Array; export const UserGroupsGetResponsePoliciesList = /*@__PURE__*/ S.Array( UserGroupsGetResponsePoliciesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetUserGroupResponse { /** User Group identifier tag. */ id: string; /** Timestamp for the creation of the user group */ createdOn: string; /** Last time the user group was modified. */ modifiedOn: string; /** Name of the user group. */ name: string; /** Policies attached to the User group */ policies?: UserGroupsGetResponsePoliciesList | null; } export const GetUserGroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, policies: S.optional(S.NullOr(UserGroupsGetResponsePoliciesList)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetUserGroupResponse", }) as any as S.Schema; export interface GetUserGroupMemberRequest { /** Account identifier tag. */ accountId: string; /** User Group identifier tag. */ userGroupId: string; /** The identifier of an existing account Member. */ memberId: string; } export const GetUserGroupMemberRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), userGroupId: S.String.pipe(T.Label("user_group_id")), memberId: S.String.pipe(T.Label("member_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/iam/user_groups/{user_group_id}/members/{member_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetUserGroupMemberRequest", }) as any as S.Schema; export type UserGroupsMembersGetResponseStatus = "accepted" | "pending"; export const UserGroupsMembersGetResponseStatus = /*@__PURE__*/ S.String; export interface UserGroupsMembersGetResponseUser { /** User identifier tag. */ id?: string | null; /** The contact email address of the user. */ email?: string | null; /** User's first name. */ firstName?: string | null; /** User's last name. */ lastName?: string | null; } export const UserGroupsMembersGetResponseUser = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), email: S.optional(S.NullOr(S.String)), firstName: S.optional(S.NullOr(S.String).pipe(T.Body("first_name"))), lastName: S.optional(S.NullOr(S.String).pipe(T.Body("last_name"))), }), ).annotate({ identifier: "UserGroupsMembersGetResponseUser", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetUserGroupMemberResponse { /** Account member identifier. */ id: string; /** When the member was added to the user group. */ createdAt?: string | null; /** The contact email address of the user. */ email?: string | null; /** The member's status in the account. */ status?: UserGroupsMembersGetResponseStatus | null; /** Details of the user associated with this membership. */ user?: UserGroupsMembersGetResponseUser | null; } export const GetUserGroupMemberResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), email: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(UserGroupsMembersGetResponseStatus)), user: S.optional(S.NullOr(UserGroupsMembersGetResponseUser)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetUserGroupMemberResponse", }) as any as S.Schema; export interface ListOauthClientsRequest { /** Account identifier tag. */ accountId: string; } export const ListOauthClientsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/oauth_clients", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListOauthClientsRequest", }) as any as S.Schema; export type OauthClientsListResultItemVisibility = "public" | "private"; export const OauthClientsListResultItemVisibility = /*@__PURE__*/ S.String; export type OauthClientsListResultItemAllowedCorsOriginsList = Array; export const OauthClientsListResultItemAllowedCorsOriginsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsListResultItemClientUriVerificationStatus = | "pending" | "in_progress" | "verified" | "failed"; export const OauthClientsListResultItemClientUriVerificationStatus = /*@__PURE__*/ S.String; export interface OauthClientsListResultItemClientUriVerification { /** Current verification status for the client URI host. */ status?: OauthClientsListResultItemClientUriVerificationStatus | null; /** Exact TXT record value that must be added to DNS to prove ownership of the client URI host. */ text?: string | null; } export const OauthClientsListResultItemClientUriVerification = /*@__PURE__*/ S.suspend(() => S.Struct({ status: S.optional( S.NullOr(OauthClientsListResultItemClientUriVerificationStatus), ), text: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "OauthClientsListResultItemClientUriVerification", }) as any as S.Schema; export type OauthClientsListResultItemGrantTypesItem = | "authorization_code" | "refresh_token"; export const OauthClientsListResultItemGrantTypesItem = /*@__PURE__*/ S.String; export type OauthClientsListResultItemGrantTypesList = Array; export const OauthClientsListResultItemGrantTypesList = /*@__PURE__*/ S.Array( OauthClientsListResultItemGrantTypesItem, ) as any as S.Schema; export type OauthClientsListResultItemPostLogoutRedirectUrisList = Array; export const OauthClientsListResultItemPostLogoutRedirectUrisList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsListResultItemRedirectUrisList = Array; export const OauthClientsListResultItemRedirectUrisList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsListResultItemResponseTypesItem = | "token" | "id_token" | "code"; export const OauthClientsListResultItemResponseTypesItem = /*@__PURE__*/ S.String; export type OauthClientsListResultItemResponseTypesList = Array; export const OauthClientsListResultItemResponseTypesList = /*@__PURE__*/ S.Array( OauthClientsListResultItemResponseTypesItem, ) as any as S.Schema; export type OauthClientsListResultItemScopesList = Array; export const OauthClientsListResultItemScopesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsListResultItemTokenEndpointAuthMethod = | "none" | "client_secret_basic" | "client_secret_post"; export const OauthClientsListResultItemTokenEndpointAuthMethod = /*@__PURE__*/ S.String; export interface OauthClientsListResultItem { /** The unique identifier for an OAuth client. */ clientId: string; /** Visibility of the OAuth client. */ visibility: OauthClientsListResultItemVisibility; /** Array of allowed CORS origins. */ allowedCorsOrigins?: OauthClientsListResultItemAllowedCorsOriginsList | null; /** Human-readable name of the OAuth client. */ clientName?: string | null; /** URL of the home page of the client. */ clientUri?: string | null; /** Client URI domain control verification state. */ clientUriVerification?: OauthClientsListResultItemClientUriVerification | null; /** Timestamp when the OAuth client was created. */ createdAt?: string | null; /** Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally. */ grantTypes?: OauthClientsListResultItemGrantTypesList | null; /** Indicates whether the client has a rotated secret that has not yet been deleted. */ hasRotatedSecret?: boolean | null; /** URL of the client's logo. */ logoUri?: string | null; /** URL that points to a privacy policy document. */ policyUri?: string | null; /** Array of allowed post-logout redirect URIs. */ postLogoutRedirectUris?: OauthClientsListResultItemPostLogoutRedirectUrisList | null; /** Timestamp when the OAuth client was promoted to public visibility. */ promotedAt?: string | null; /** Array of allowed redirect URIs for the client. */ redirectUris?: OauthClientsListResultItemRedirectUrisList | null; /** Array of OAuth response types the client is allowed to use. */ responseTypes?: OauthClientsListResultItemResponseTypesList | null; /** Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`. */ scopes?: OauthClientsListResultItemScopesList | null; /** The authentication method the client uses at the token endpoint. */ tokenEndpointAuthMethod?: OauthClientsListResultItemTokenEndpointAuthMethod | null; /** URL that points to a terms of service document. */ tosUri?: string | null; /** Timestamp when the OAuth client was last updated. */ updatedAt?: string | null; } export const OauthClientsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ clientId: S.String.pipe(T.Body("client_id")), visibility: OauthClientsListResultItemVisibility, allowedCorsOrigins: S.optional( S.NullOr(OauthClientsListResultItemAllowedCorsOriginsList).pipe( T.Body("allowed_cors_origins"), ), ), clientName: S.optional(S.NullOr(S.String).pipe(T.Body("client_name"))), clientUri: S.optional(S.NullOr(S.String).pipe(T.Body("client_uri"))), clientUriVerification: S.optional( S.NullOr(OauthClientsListResultItemClientUriVerification).pipe( T.Body("client_uri_verification"), ), ), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), grantTypes: S.optional( S.NullOr(OauthClientsListResultItemGrantTypesList).pipe( T.Body("grant_types"), ), ), hasRotatedSecret: S.optional( S.NullOr(S.Boolean).pipe(T.Body("has_rotated_secret")), ), logoUri: S.optional(S.NullOr(S.String).pipe(T.Body("logo_uri"))), policyUri: S.optional(S.NullOr(S.String).pipe(T.Body("policy_uri"))), postLogoutRedirectUris: S.optional( S.NullOr(OauthClientsListResultItemPostLogoutRedirectUrisList).pipe( T.Body("post_logout_redirect_uris"), ), ), promotedAt: S.optional(S.NullOr(S.String).pipe(T.Body("promoted_at"))), redirectUris: S.optional( S.NullOr(OauthClientsListResultItemRedirectUrisList).pipe( T.Body("redirect_uris"), ), ), responseTypes: S.optional( S.NullOr(OauthClientsListResultItemResponseTypesList).pipe( T.Body("response_types"), ), ), scopes: S.optional(S.NullOr(OauthClientsListResultItemScopesList)), tokenEndpointAuthMethod: S.optional( S.NullOr(OauthClientsListResultItemTokenEndpointAuthMethod).pipe( T.Body("token_endpoint_auth_method"), ), ), tosUri: S.optional(S.NullOr(S.String).pipe(T.Body("tos_uri"))), updatedAt: S.optional(S.NullOr(S.String).pipe(T.Body("updated_at"))), }), ).annotate({ identifier: "OauthClientsListResultItem", }) as any as S.Schema; export type OauthClientsListResultList = Array; export const OauthClientsListResultList = /*@__PURE__*/ S.Array( OauthClientsListResultItem, ) as any as S.Schema; export interface ListOauthClientsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: OauthClientsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListOauthClientsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: OauthClientsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListOauthClientsResponse", }) as any as S.Schema; export interface ListOauthScopesRequest {} export const ListOauthScopesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}) .pipe(T.Http({ method: "GET", uri: "/oauth/scopes", code: 200 })) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListOauthScopesRequest", }) as any as S.Schema; export type OauthScopesListResultItemScopesList = Array; export const OauthScopesListResultItemScopesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface OauthScopesListResultItem { /** The scope label to use in the scopes array when creating or updating an OAuth client. */ id: string; /** Human-readable name of the OAuth scope. */ name: string; /** Category for grouping scopes in the UI. */ category?: string | null; /** The underlying resource scopes (Bach scopes) that define which resources this OAuth scope can act upon. */ scopes?: OauthScopesListResultItemScopesList | null; } export const OauthScopesListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, name: S.String, category: S.optional(S.NullOr(S.String)), scopes: S.optional(S.NullOr(OauthScopesListResultItemScopesList)), }), ).annotate({ identifier: "OauthScopesListResultItem", }) as any as S.Schema; export type OauthScopesListResultList = Array; export const OauthScopesListResultList = /*@__PURE__*/ S.Array( OauthScopesListResultItem, ) as any as S.Schema; export interface ListOauthScopesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: OauthScopesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListOauthScopesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: OauthScopesListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListOauthScopesResponse", }) as any as S.Schema; export interface ListPermissionGroupsRequest { /** Account identifier tag. */ accountId: string; /** ID of the permission group to be fetched. */ id?: string; /** Label of the permission group to be fetched. */ label?: string; /** Name of the permission group to be fetched. */ name?: string; /** Page number of paginated results. */ page?: number; /** Maximum number of results per page. */ perPage?: number; } export const ListPermissionGroupsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), id: S.optional(S.String.pipe(T.Query())), label: S.optional(S.String.pipe(T.Query())), name: S.optional(S.String.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/iam/permission_groups", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListPermissionGroupsRequest", }) as any as S.Schema; export type PermissionGroupsListResultItemMeta = ResourceGroupsCreateResponseMeta; export const PermissionGroupsListResultItemMeta = ResourceGroupsCreateResponseMeta; export type PermissionGroupsListResultItem = UserGroupsCreateResponsePoliciesItemPermissionGroupsItem; export const PermissionGroupsListResultItem = UserGroupsCreateResponsePoliciesItemPermissionGroupsItem; export type PermissionGroupsListResultList = Array; export const PermissionGroupsListResultList = /*@__PURE__*/ S.Array( UserGroupsCreateResponsePoliciesItemPermissionGroupsItem, ) as any as S.Schema; export interface ListPermissionGroupsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: PermissionGroupsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListPermissionGroupsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: PermissionGroupsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListPermissionGroupsResponse", }) as any as S.Schema; export interface ListResourceGroupsRequest { /** Account identifier tag. */ accountId: string; /** ID of the resource group to be fetched. */ id?: string; /** Name of the resource group to be fetched. */ name?: string; } export const ListResourceGroupsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), id: S.optional(S.String.pipe(T.Query())), name: S.optional(S.String.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/iam/resource_groups", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListResourceGroupsRequest", }) as any as S.Schema; export type ResourceGroupsListResultItemScopeItemObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export const ResourceGroupsListResultItemScopeItemObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export type ResourceGroupsListResultItemScopeItemObjectsList = Array; export const ResourceGroupsListResultItemScopeItemObjectsList = /*@__PURE__*/ S.Array( ResourceGroupsCreateRequestScopeObjectsItem, ) as any as S.Schema; export interface ResourceGroupsListResultItemScopeItem { /** This is a combination of pre-defined resource name and identifier (like Account ID etc.) */ key: string; /** A list of scope objects for additional context. */ objects: ResourceGroupsListResultItemScopeItemObjectsList; } export const ResourceGroupsListResultItemScopeItem = /*@__PURE__*/ S.suspend( () => S.Struct({ key: S.String, objects: ResourceGroupsListResultItemScopeItemObjectsList, }), ).annotate({ identifier: "ResourceGroupsListResultItemScopeItem", }) as any as S.Schema; export type ResourceGroupsListResultItemScopeList = Array; export const ResourceGroupsListResultItemScopeList = /*@__PURE__*/ S.Array( ResourceGroupsListResultItemScopeItem, ) as any as S.Schema; export type ResourceGroupsListResultItemMeta = ResourceGroupsCreateResponseMeta; export const ResourceGroupsListResultItemMeta = ResourceGroupsCreateResponseMeta; export interface ResourceGroupsListResultItem { /** Identifier of the resource group. */ id: string; /** The scope associated to the resource group */ scope: ResourceGroupsListResultItemScopeList; /** Attributes associated to the resource group. */ meta?: ResourceGroupsCreateResponseMeta | null; /** Name of the resource group. */ name?: string | null; } export const ResourceGroupsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, scope: ResourceGroupsListResultItemScopeList, meta: S.optional(S.NullOr(ResourceGroupsCreateResponseMeta)), name: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "ResourceGroupsListResultItem", }) as any as S.Schema; export type ResourceGroupsListResultList = Array; export const ResourceGroupsListResultList = /*@__PURE__*/ S.Array( ResourceGroupsListResultItem, ) as any as S.Schema; export interface ListResourceGroupsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: ResourceGroupsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListResourceGroupsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: ResourceGroupsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListResourceGroupsResponse", }) as any as S.Schema; export interface ListSsosRequest { /** Account identifier tag. */ accountId: string; } export const ListSsosRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/sso_connectors", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSsosRequest", }) as any as S.Schema; export type SsoListResultItemVerificationStatus = | "awaiting" | "pending" | "failed" | "verified"; export const SsoListResultItemVerificationStatus = /*@__PURE__*/ S.String; export interface SsoListResultItemVerification { /** DNS verification code. Add this entire string to the DNS TXT record of the email domain to validate ownership. */ code?: string | null; /** The status of the verification code from the verification process. */ status?: SsoListResultItemVerificationStatus | null; } export const SsoListResultItemVerification = /*@__PURE__*/ S.suspend(() => S.Struct({ code: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(SsoListResultItemVerificationStatus)), }), ).annotate({ identifier: "SsoListResultItemVerification", }) as any as S.Schema; export interface SsoListResultItem { /** SSO Connector identifier tag. */ id?: string | null; /** Timestamp for the creation of the SSO connector */ createdOn?: string | null; emailDomain?: string | null; enabled?: boolean | null; /** Timestamp for the last update of the SSO connector */ updatedOn?: string | null; /** Controls the display of FedRAMP language to the user during SSO login */ useFedrampLanguage?: boolean | null; verification?: SsoListResultItemVerification | null; } export const SsoListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), emailDomain: S.optional(S.NullOr(S.String).pipe(T.Body("email_domain"))), enabled: S.optional(S.NullOr(S.Boolean)), updatedOn: S.optional(S.NullOr(S.String).pipe(T.Body("updated_on"))), useFedrampLanguage: S.optional( S.NullOr(S.Boolean).pipe(T.Body("use_fedramp_language")), ), verification: S.optional(S.NullOr(SsoListResultItemVerification)), }), ).annotate({ identifier: "SsoListResultItem", }) as any as S.Schema; export type SsoListResultList = Array; export const SsoListResultList = /*@__PURE__*/ S.Array( SsoListResultItem, ) as any as S.Schema; export interface ListSsosResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SsoListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListSsosResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SsoListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSsosResponse", }) as any as S.Schema; export type UserGroupsMembersListRequestDirection = "asc" | "desc"; export const UserGroupsMembersListRequestDirection = /*@__PURE__*/ S.String; export interface ListUserGroupMembersRequest { /** Account identifier tag. */ accountId: string; /** User Group identifier tag. */ userGroupId: string; /** The sort order of returned user group members by email. */ direction?: UserGroupsMembersListRequestDirection | (string & {}); /** A string used for filtering members by partial email match. */ fuzzyEmail?: string; /** Page number of paginated results. */ page?: number; /** Maximum number of results per page. */ perPage?: number; } export const ListUserGroupMembersRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), userGroupId: S.String.pipe(T.Label("user_group_id")), direction: S.optional( UserGroupsMembersListRequestDirection.pipe(T.Query()), ), fuzzyEmail: S.optional(S.String.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/iam/user_groups/{user_group_id}/members", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListUserGroupMembersRequest", }) as any as S.Schema; export type UserGroupsMembersListResultItemStatus = "accepted" | "pending"; export const UserGroupsMembersListResultItemStatus = /*@__PURE__*/ S.String; export interface UserGroupsMembersListResultItem { /** Account member identifier. */ id: string; /** The contact email address of the user. */ email?: string | null; /** The member's status in the account. */ status?: UserGroupsMembersListResultItemStatus | null; } export const UserGroupsMembersListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, email: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(UserGroupsMembersListResultItemStatus)), }), ).annotate({ identifier: "UserGroupsMembersListResultItem", }) as any as S.Schema; export type UserGroupsMembersListResultList = Array; export const UserGroupsMembersListResultList = /*@__PURE__*/ S.Array( UserGroupsMembersListResultItem, ) as any as S.Schema; export interface ListUserGroupMembersResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: UserGroupsMembersListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListUserGroupMembersResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: UserGroupsMembersListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListUserGroupMembersResponse", }) as any as S.Schema; export type UserGroupsListRequestDirection = "asc" | "desc"; export const UserGroupsListRequestDirection = /*@__PURE__*/ S.String; export interface ListUserGroupsRequest { /** Account identifier tag. */ accountId: string; /** ID of the user group to be fetched. */ id?: string; /** The sort order of returned user groups by name (ascending or descending). */ direction?: UserGroupsListRequestDirection | (string & {}); /** A string used for searching for user groups containing that substring. */ fuzzyName?: string; /** Name of the user group to be fetched. */ name?: string; /** Page number of paginated results. */ page?: number; /** Maximum number of results per page. */ perPage?: number; } export const ListUserGroupsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), id: S.optional(S.String.pipe(T.Query())), direction: S.optional(UserGroupsListRequestDirection.pipe(T.Query())), fuzzyName: S.optional(S.String.pipe(T.Query())), name: S.optional(S.String.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/iam/user_groups", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListUserGroupsRequest", }) as any as S.Schema; export type UserGroupsListResultItemPoliciesItemAccess = "allow" | "deny"; export const UserGroupsListResultItemPoliciesItemAccess = /*@__PURE__*/ S.String; export type UserGroupsListResultItemPoliciesItemPermissionGroupsItemMeta = ResourceGroupsCreateResponseMeta; export const UserGroupsListResultItemPoliciesItemPermissionGroupsItemMeta = ResourceGroupsCreateResponseMeta; export type UserGroupsListResultItemPoliciesItemPermissionGroupsItem = UserGroupsCreateResponsePoliciesItemPermissionGroupsItem; export const UserGroupsListResultItemPoliciesItemPermissionGroupsItem = UserGroupsCreateResponsePoliciesItemPermissionGroupsItem; export type UserGroupsListResultItemPoliciesItemPermissionGroupsList = Array; export const UserGroupsListResultItemPoliciesItemPermissionGroupsList = /*@__PURE__*/ S.Array( UserGroupsCreateResponsePoliciesItemPermissionGroupsItem, ) as any as S.Schema; export type UserGroupsListResultItemPoliciesItemResourceGroupsItemScopeItemObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export const UserGroupsListResultItemPoliciesItemResourceGroupsItemScopeItemObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export type UserGroupsListResultItemPoliciesItemResourceGroupsItemScopeItemObjectsList = Array; export const UserGroupsListResultItemPoliciesItemResourceGroupsItemScopeItemObjectsList = /*@__PURE__*/ S.Array( ResourceGroupsCreateRequestScopeObjectsItem, ) as any as S.Schema; export interface UserGroupsListResultItemPoliciesItemResourceGroupsItemScopeItem { /** This is a combination of pre-defined resource name and identifier (like Account ID etc.) */ key: string; /** A list of scope objects for additional context. */ objects: UserGroupsListResultItemPoliciesItemResourceGroupsItemScopeItemObjectsList; } export const UserGroupsListResultItemPoliciesItemResourceGroupsItemScopeItem = /*@__PURE__*/ S.suspend(() => S.Struct({ key: S.String, objects: UserGroupsListResultItemPoliciesItemResourceGroupsItemScopeItemObjectsList, }), ).annotate({ identifier: "UserGroupsListResultItemPoliciesItemResourceGroupsItemScopeItem", }) as any as S.Schema; export type UserGroupsListResultItemPoliciesItemResourceGroupsItemScopeList = Array; export const UserGroupsListResultItemPoliciesItemResourceGroupsItemScopeList = /*@__PURE__*/ S.Array( UserGroupsListResultItemPoliciesItemResourceGroupsItemScopeItem, ) as any as S.Schema; export type UserGroupsListResultItemPoliciesItemResourceGroupsItemMeta = ResourceGroupsCreateResponseMeta; export const UserGroupsListResultItemPoliciesItemResourceGroupsItemMeta = ResourceGroupsCreateResponseMeta; export interface UserGroupsListResultItemPoliciesItemResourceGroupsItem { /** Identifier of the resource group. */ id: string; /** The scope associated to the resource group */ scope: UserGroupsListResultItemPoliciesItemResourceGroupsItemScopeList; /** Attributes associated to the resource group. */ meta?: ResourceGroupsCreateResponseMeta | null; /** Name of the resource group. */ name?: string | null; } export const UserGroupsListResultItemPoliciesItemResourceGroupsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, scope: UserGroupsListResultItemPoliciesItemResourceGroupsItemScopeList, meta: S.optional(S.NullOr(ResourceGroupsCreateResponseMeta)), name: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UserGroupsListResultItemPoliciesItemResourceGroupsItem", }) as any as S.Schema; export type UserGroupsListResultItemPoliciesItemResourceGroupsList = Array; export const UserGroupsListResultItemPoliciesItemResourceGroupsList = /*@__PURE__*/ S.Array( UserGroupsListResultItemPoliciesItemResourceGroupsItem, ) as any as S.Schema; export interface UserGroupsListResultItemPoliciesItem { /** Policy identifier. */ id?: string | null; /** Allow or deny operations against the resources. */ access?: UserGroupsListResultItemPoliciesItemAccess | null; /** A set of permission groups that are specified to the policy. */ permissionGroups?: UserGroupsListResultItemPoliciesItemPermissionGroupsList | null; /** A list of resource groups that the policy applies to. */ resourceGroups?: UserGroupsListResultItemPoliciesItemResourceGroupsList | null; } export const UserGroupsListResultItemPoliciesItem = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.NullOr(S.String)), access: S.optional(S.NullOr(UserGroupsListResultItemPoliciesItemAccess)), permissionGroups: S.optional( S.NullOr(UserGroupsListResultItemPoliciesItemPermissionGroupsList).pipe( T.Body("permission_groups"), ), ), resourceGroups: S.optional( S.NullOr(UserGroupsListResultItemPoliciesItemResourceGroupsList).pipe( T.Body("resource_groups"), ), ), }), ).annotate({ identifier: "UserGroupsListResultItemPoliciesItem", }) as any as S.Schema; export type UserGroupsListResultItemPoliciesList = Array; export const UserGroupsListResultItemPoliciesList = /*@__PURE__*/ S.Array( UserGroupsListResultItemPoliciesItem, ) as any as S.Schema; export interface UserGroupsListResultItem { /** User Group identifier tag. */ id: string; /** Timestamp for the creation of the user group */ createdOn: string; /** Last time the user group was modified. */ modifiedOn: string; /** Name of the user group. */ name: string; /** Policies attached to the User group */ policies?: UserGroupsListResultItemPoliciesList | null; } export const UserGroupsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, policies: S.optional(S.NullOr(UserGroupsListResultItemPoliciesList)), }), ).annotate({ identifier: "UserGroupsListResultItem", }) as any as S.Schema; export type UserGroupsListResultList = Array; export const UserGroupsListResultList = /*@__PURE__*/ S.Array( UserGroupsListResultItem, ) as any as S.Schema; export interface ListUserGroupsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: UserGroupsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListUserGroupsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: UserGroupsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListUserGroupsResponse", }) as any as S.Schema; export type OauthClientsUpdateRequestAllowedCorsOriginsList = Array; export const OauthClientsUpdateRequestAllowedCorsOriginsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsUpdateRequestGrantTypesItem = | "authorization_code" | "refresh_token"; export const OauthClientsUpdateRequestGrantTypesItem = /*@__PURE__*/ S.String; export type OauthClientsUpdateRequestGrantTypesList = Array< OauthClientsUpdateRequestGrantTypesItem | (string & {}) >; export const OauthClientsUpdateRequestGrantTypesList = /*@__PURE__*/ S.Array( OauthClientsUpdateRequestGrantTypesItem, ) as any as S.Schema; export type OauthClientsUpdateRequestPostLogoutRedirectUrisList = Array; export const OauthClientsUpdateRequestPostLogoutRedirectUrisList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsUpdateRequestRedirectUrisList = Array; export const OauthClientsUpdateRequestRedirectUrisList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsUpdateRequestResponseTypesItem = | "token" | "id_token" | "code"; export const OauthClientsUpdateRequestResponseTypesItem = /*@__PURE__*/ S.String; export type OauthClientsUpdateRequestResponseTypesList = Array< OauthClientsUpdateRequestResponseTypesItem | (string & {}) >; export const OauthClientsUpdateRequestResponseTypesList = /*@__PURE__*/ S.Array( OauthClientsUpdateRequestResponseTypesItem, ) as any as S.Schema; export type OauthClientsUpdateRequestScopesList = Array; export const OauthClientsUpdateRequestScopesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsUpdateRequestTokenEndpointAuthMethod = | "none" | "client_secret_basic" | "client_secret_post"; export const OauthClientsUpdateRequestTokenEndpointAuthMethod = /*@__PURE__*/ S.String; export type OauthClientsUpdateRequestVisibility = "public"; export const OauthClientsUpdateRequestVisibility = /*@__PURE__*/ S.String; export interface PatchOauthClientRequest { /** Account identifier tag. */ accountId: string; /** The unique identifier for an OAuth client. */ oauthClientId: string; /** Array of allowed CORS origins. */ allowedCorsOrigins?: OauthClientsUpdateRequestAllowedCorsOriginsList; /** Human-readable name of the OAuth client. */ clientName?: string; /** URL of the home page of the client. */ clientUri?: string; /** Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally. */ grantTypes?: OauthClientsUpdateRequestGrantTypesList; /** URL of the client's logo. */ logoUri?: string; /** URL that points to a privacy policy document. */ policyUri?: string; /** Array of allowed post-logout redirect URIs. */ postLogoutRedirectUris?: OauthClientsUpdateRequestPostLogoutRedirectUrisList; /** Array of allowed redirect URIs for the client. */ redirectUris?: OauthClientsUpdateRequestRedirectUrisList; /** Array of OAuth response types the client is allowed to use. */ responseTypes?: OauthClientsUpdateRequestResponseTypesList; /** Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`. */ scopes?: OauthClientsUpdateRequestScopesList; /** The authentication method the client uses at the token endpoint. */ tokenEndpointAuthMethod?: | OauthClientsUpdateRequestTokenEndpointAuthMethod | (string & {}); /** URL that points to a terms of service document. */ tosUri?: string; /** Promote the OAuth client from private to public visibility. Only `public` is accepted; demotion to `private` is not supported. Promotion requires a non-empty client name, logo URI, verified client URI host, and at least one non-identity scope. */ visibility?: OauthClientsUpdateRequestVisibility | (string & {}); } export const PatchOauthClientRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), oauthClientId: S.String.pipe(T.Label("oauth_client_id")), allowedCorsOrigins: S.optional( OauthClientsUpdateRequestAllowedCorsOriginsList.pipe( T.Body("allowed_cors_origins"), ), ), clientName: S.optional(S.String.pipe(T.Body("client_name"))), clientUri: S.optional(S.String.pipe(T.Body("client_uri"))), grantTypes: S.optional( OauthClientsUpdateRequestGrantTypesList.pipe(T.Body("grant_types")), ), logoUri: S.optional(S.String.pipe(T.Body("logo_uri"))), policyUri: S.optional(S.String.pipe(T.Body("policy_uri"))), postLogoutRedirectUris: S.optional( OauthClientsUpdateRequestPostLogoutRedirectUrisList.pipe( T.Body("post_logout_redirect_uris"), ), ), redirectUris: S.optional( OauthClientsUpdateRequestRedirectUrisList.pipe(T.Body("redirect_uris")), ), responseTypes: S.optional( OauthClientsUpdateRequestResponseTypesList.pipe(T.Body("response_types")), ), scopes: S.optional(OauthClientsUpdateRequestScopesList), tokenEndpointAuthMethod: S.optional( OauthClientsUpdateRequestTokenEndpointAuthMethod.pipe( T.Body("token_endpoint_auth_method"), ), ), tosUri: S.optional(S.String.pipe(T.Body("tos_uri"))), visibility: S.optional(OauthClientsUpdateRequestVisibility), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/oauth_clients/{oauth_client_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchOauthClientRequest", }) as any as S.Schema; export type OauthClientsUpdateResponseVisibility = "public" | "private"; export const OauthClientsUpdateResponseVisibility = /*@__PURE__*/ S.String; export type OauthClientsUpdateResponseAllowedCorsOriginsList = Array; export const OauthClientsUpdateResponseAllowedCorsOriginsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsUpdateResponseClientUriVerificationStatus = | "pending" | "in_progress" | "verified" | "failed"; export const OauthClientsUpdateResponseClientUriVerificationStatus = /*@__PURE__*/ S.String; export interface OauthClientsUpdateResponseClientUriVerification { /** Current verification status for the client URI host. */ status?: OauthClientsUpdateResponseClientUriVerificationStatus | null; /** Exact TXT record value that must be added to DNS to prove ownership of the client URI host. */ text?: string | null; } export const OauthClientsUpdateResponseClientUriVerification = /*@__PURE__*/ S.suspend(() => S.Struct({ status: S.optional( S.NullOr(OauthClientsUpdateResponseClientUriVerificationStatus), ), text: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "OauthClientsUpdateResponseClientUriVerification", }) as any as S.Schema; export type OauthClientsUpdateResponseGrantTypesItem = | "authorization_code" | "refresh_token"; export const OauthClientsUpdateResponseGrantTypesItem = /*@__PURE__*/ S.String; export type OauthClientsUpdateResponseGrantTypesList = Array; export const OauthClientsUpdateResponseGrantTypesList = /*@__PURE__*/ S.Array( OauthClientsUpdateResponseGrantTypesItem, ) as any as S.Schema; export type OauthClientsUpdateResponsePostLogoutRedirectUrisList = Array; export const OauthClientsUpdateResponsePostLogoutRedirectUrisList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsUpdateResponseRedirectUrisList = Array; export const OauthClientsUpdateResponseRedirectUrisList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsUpdateResponseResponseTypesItem = | "token" | "id_token" | "code"; export const OauthClientsUpdateResponseResponseTypesItem = /*@__PURE__*/ S.String; export type OauthClientsUpdateResponseResponseTypesList = Array; export const OauthClientsUpdateResponseResponseTypesList = /*@__PURE__*/ S.Array( OauthClientsUpdateResponseResponseTypesItem, ) as any as S.Schema; export type OauthClientsUpdateResponseScopesList = Array; export const OauthClientsUpdateResponseScopesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OauthClientsUpdateResponseTokenEndpointAuthMethod = | "none" | "client_secret_basic" | "client_secret_post"; export const OauthClientsUpdateResponseTokenEndpointAuthMethod = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchOauthClientResponse { /** The unique identifier for an OAuth client. */ clientId: string; /** Visibility of the OAuth client. */ visibility: OauthClientsUpdateResponseVisibility; /** Array of allowed CORS origins. */ allowedCorsOrigins?: OauthClientsUpdateResponseAllowedCorsOriginsList | null; /** Human-readable name of the OAuth client. */ clientName?: string | null; /** URL of the home page of the client. */ clientUri?: string | null; /** Client URI domain control verification state. */ clientUriVerification?: OauthClientsUpdateResponseClientUriVerification | null; /** Timestamp when the OAuth client was created. */ createdAt?: string | null; /** Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally. */ grantTypes?: OauthClientsUpdateResponseGrantTypesList | null; /** Indicates whether the client has a rotated secret that has not yet been deleted. */ hasRotatedSecret?: boolean | null; /** URL of the client's logo. */ logoUri?: string | null; /** URL that points to a privacy policy document. */ policyUri?: string | null; /** Array of allowed post-logout redirect URIs. */ postLogoutRedirectUris?: OauthClientsUpdateResponsePostLogoutRedirectUrisList | null; /** Timestamp when the OAuth client was promoted to public visibility. */ promotedAt?: string | null; /** Array of allowed redirect URIs for the client. */ redirectUris?: OauthClientsUpdateResponseRedirectUrisList | null; /** Array of OAuth response types the client is allowed to use. */ responseTypes?: OauthClientsUpdateResponseResponseTypesList | null; /** Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`. */ scopes?: OauthClientsUpdateResponseScopesList | null; /** The authentication method the client uses at the token endpoint. */ tokenEndpointAuthMethod?: OauthClientsUpdateResponseTokenEndpointAuthMethod | null; /** URL that points to a terms of service document. */ tosUri?: string | null; /** Timestamp when the OAuth client was last updated. */ updatedAt?: string | null; } export const PatchOauthClientResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ clientId: S.String.pipe(T.Body("client_id")), visibility: OauthClientsUpdateResponseVisibility, allowedCorsOrigins: S.optional( S.NullOr(OauthClientsUpdateResponseAllowedCorsOriginsList).pipe( T.Body("allowed_cors_origins"), ), ), clientName: S.optional(S.NullOr(S.String).pipe(T.Body("client_name"))), clientUri: S.optional(S.NullOr(S.String).pipe(T.Body("client_uri"))), clientUriVerification: S.optional( S.NullOr(OauthClientsUpdateResponseClientUriVerification).pipe( T.Body("client_uri_verification"), ), ), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), grantTypes: S.optional( S.NullOr(OauthClientsUpdateResponseGrantTypesList).pipe( T.Body("grant_types"), ), ), hasRotatedSecret: S.optional( S.NullOr(S.Boolean).pipe(T.Body("has_rotated_secret")), ), logoUri: S.optional(S.NullOr(S.String).pipe(T.Body("logo_uri"))), policyUri: S.optional(S.NullOr(S.String).pipe(T.Body("policy_uri"))), postLogoutRedirectUris: S.optional( S.NullOr(OauthClientsUpdateResponsePostLogoutRedirectUrisList).pipe( T.Body("post_logout_redirect_uris"), ), ), promotedAt: S.optional(S.NullOr(S.String).pipe(T.Body("promoted_at"))), redirectUris: S.optional( S.NullOr(OauthClientsUpdateResponseRedirectUrisList).pipe( T.Body("redirect_uris"), ), ), responseTypes: S.optional( S.NullOr(OauthClientsUpdateResponseResponseTypesList).pipe( T.Body("response_types"), ), ), scopes: S.optional(S.NullOr(OauthClientsUpdateResponseScopesList)), tokenEndpointAuthMethod: S.optional( S.NullOr(OauthClientsUpdateResponseTokenEndpointAuthMethod).pipe( T.Body("token_endpoint_auth_method"), ), ), tosUri: S.optional(S.NullOr(S.String).pipe(T.Body("tos_uri"))), updatedAt: S.optional(S.NullOr(S.String).pipe(T.Body("updated_at"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchOauthClientResponse", }) as any as S.Schema; export interface PatchSsoRequest { /** Account identifier tag. */ accountId: string; /** SSO Connector identifier tag. */ ssoConnectorId: string; /** SSO Connector enabled state */ enabled?: boolean; /** Controls the display of FedRAMP language to the user during SSO login */ useFedrampLanguage?: boolean; } export const PatchSsoRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), ssoConnectorId: S.String.pipe(T.Label("sso_connector_id")), enabled: S.optional(S.Boolean), useFedrampLanguage: S.optional( S.Boolean.pipe(T.Body("use_fedramp_language")), ), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/sso_connectors/{sso_connector_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSsoRequest", }) as any as S.Schema; export type SsoUpdateResponseVerificationStatus = | "awaiting" | "pending" | "failed" | "verified"; export const SsoUpdateResponseVerificationStatus = /*@__PURE__*/ S.String; export interface SsoUpdateResponseVerification { /** DNS verification code. Add this entire string to the DNS TXT record of the email domain to validate ownership. */ code?: string | null; /** The status of the verification code from the verification process. */ status?: SsoUpdateResponseVerificationStatus | null; } export const SsoUpdateResponseVerification = /*@__PURE__*/ S.suspend(() => S.Struct({ code: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(SsoUpdateResponseVerificationStatus)), }), ).annotate({ identifier: "SsoUpdateResponseVerification", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchSsoResponse { /** SSO Connector identifier tag. */ id?: string | null; /** Timestamp for the creation of the SSO connector */ createdOn?: string | null; emailDomain?: string | null; enabled?: boolean | null; /** Timestamp for the last update of the SSO connector */ updatedOn?: string | null; /** Controls the display of FedRAMP language to the user during SSO login */ useFedrampLanguage?: boolean | null; verification?: SsoUpdateResponseVerification | null; } export const PatchSsoResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), emailDomain: S.optional(S.NullOr(S.String).pipe(T.Body("email_domain"))), enabled: S.optional(S.NullOr(S.Boolean)), updatedOn: S.optional(S.NullOr(S.String).pipe(T.Body("updated_on"))), useFedrampLanguage: S.optional( S.NullOr(S.Boolean).pipe(T.Body("use_fedramp_language")), ), verification: S.optional(S.NullOr(SsoUpdateResponseVerification)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSsoResponse", }) as any as S.Schema; export interface RotateSecretOauthClientRequest { /** Account identifier tag. */ accountId: string; /** The unique identifier for an OAuth client. */ oauthClientId: string; } export const RotateSecretOauthClientRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), oauthClientId: S.String.pipe(T.Label("oauth_client_id")), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/oauth_clients/{oauth_client_id}/rotate_secret", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "RotateSecretOauthClientRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface RotateSecretOauthClientResponse { /** The new client secret. */ clientSecret?: string | null; } export const RotateSecretOauthClientResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ clientSecret: S.optional(S.NullOr(S.String).pipe(T.Body("client_secret"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "RotateSecretOauthClientResponse", }) as any as S.Schema; export type ResourceGroupsUpdateRequestScopeObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export const ResourceGroupsUpdateRequestScopeObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export type ResourceGroupsUpdateRequestScopeObjectsList = Array; export const ResourceGroupsUpdateRequestScopeObjectsList = /*@__PURE__*/ S.Array( ResourceGroupsCreateRequestScopeObjectsItem, ) as any as S.Schema; export interface ResourceGroupsUpdateRequestScope { /** This is a combination of pre-defined resource name and identifier (like Account ID etc.) */ key: string; /** A list of scope objects for additional context. The number of Scope objects should not be zero. */ objects: ResourceGroupsUpdateRequestScopeObjectsList; } export const ResourceGroupsUpdateRequestScope = /*@__PURE__*/ S.suspend(() => S.Struct({ key: S.String, objects: ResourceGroupsUpdateRequestScopeObjectsList, }), ).annotate({ identifier: "ResourceGroupsUpdateRequestScope", }) as any as S.Schema; export interface UpdateResourceGroupRequest { /** Account identifier tag. */ accountId: string; /** Resource Group identifier tag. */ resourceGroupId: string; /** Name of the resource group */ name?: string; /** A scope is a combination of scope objects which provides additional context. */ scope?: ResourceGroupsUpdateRequestScope; } export const UpdateResourceGroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), resourceGroupId: S.String.pipe(T.Label("resource_group_id")), name: S.optional(S.String), scope: S.optional(ResourceGroupsUpdateRequestScope), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/iam/resource_groups/{resource_group_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateResourceGroupRequest", }) as any as S.Schema; export type ResourceGroupsUpdateResponseScopeItemObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export const ResourceGroupsUpdateResponseScopeItemObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export type ResourceGroupsUpdateResponseScopeItemObjectsList = Array; export const ResourceGroupsUpdateResponseScopeItemObjectsList = /*@__PURE__*/ S.Array( ResourceGroupsCreateRequestScopeObjectsItem, ) as any as S.Schema; export interface ResourceGroupsUpdateResponseScopeItem { /** This is a combination of pre-defined resource name and identifier (like Account ID etc.) */ key: string; /** A list of scope objects for additional context. */ objects: ResourceGroupsUpdateResponseScopeItemObjectsList; } export const ResourceGroupsUpdateResponseScopeItem = /*@__PURE__*/ S.suspend( () => S.Struct({ key: S.String, objects: ResourceGroupsUpdateResponseScopeItemObjectsList, }), ).annotate({ identifier: "ResourceGroupsUpdateResponseScopeItem", }) as any as S.Schema; export type ResourceGroupsUpdateResponseScopeList = Array; export const ResourceGroupsUpdateResponseScopeList = /*@__PURE__*/ S.Array( ResourceGroupsUpdateResponseScopeItem, ) as any as S.Schema; export type ResourceGroupsUpdateResponseMeta = ResourceGroupsCreateResponseMeta; export const ResourceGroupsUpdateResponseMeta = ResourceGroupsCreateResponseMeta; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateResourceGroupResponse { /** Identifier of the resource group. */ id: string; /** The scope associated to the resource group */ scope: ResourceGroupsUpdateResponseScopeList; /** Attributes associated to the resource group. */ meta?: ResourceGroupsCreateResponseMeta | null; /** Name of the resource group. */ name?: string | null; } export const UpdateResourceGroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, scope: ResourceGroupsUpdateResponseScopeList, meta: S.optional(S.NullOr(ResourceGroupsCreateResponseMeta)), name: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateResourceGroupResponse", }) as any as S.Schema; export type UserGroupsUpdateRequestPoliciesItemAccess = "allow" | "deny"; export const UserGroupsUpdateRequestPoliciesItemAccess = /*@__PURE__*/ S.String; export type UserGroupsUpdateRequestPoliciesItemPermissionGroupsItem = UserGroupsCreateRequestPoliciesItemPermissionGroupsItem; export const UserGroupsUpdateRequestPoliciesItemPermissionGroupsItem = UserGroupsCreateRequestPoliciesItemPermissionGroupsItem; export type UserGroupsUpdateRequestPoliciesItemPermissionGroupsList = Array; export const UserGroupsUpdateRequestPoliciesItemPermissionGroupsList = /*@__PURE__*/ S.Array( UserGroupsCreateRequestPoliciesItemPermissionGroupsItem, ) as any as S.Schema; export type UserGroupsUpdateRequestPoliciesItemResourceGroupsItem = UserGroupsCreateRequestPoliciesItemResourceGroupsItem; export const UserGroupsUpdateRequestPoliciesItemResourceGroupsItem = UserGroupsCreateRequestPoliciesItemResourceGroupsItem; export type UserGroupsUpdateRequestPoliciesItemResourceGroupsList = Array; export const UserGroupsUpdateRequestPoliciesItemResourceGroupsList = /*@__PURE__*/ S.Array( UserGroupsCreateRequestPoliciesItemResourceGroupsItem, ) as any as S.Schema; export interface UserGroupsUpdateRequestPoliciesItem { /** Policy identifier. */ id?: string; /** Allow or deny operations against the resources. */ access: UserGroupsUpdateRequestPoliciesItemAccess | (string & {}); /** A set of permission groups that are specified to the policy. */ permissionGroups: UserGroupsUpdateRequestPoliciesItemPermissionGroupsList; /** A set of resource groups that are specified to the policy. */ resourceGroups: UserGroupsUpdateRequestPoliciesItemResourceGroupsList; } export const UserGroupsUpdateRequestPoliciesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), access: UserGroupsUpdateRequestPoliciesItemAccess, permissionGroups: UserGroupsUpdateRequestPoliciesItemPermissionGroupsList.pipe( T.Body("permission_groups"), ), resourceGroups: UserGroupsUpdateRequestPoliciesItemResourceGroupsList.pipe( T.Body("resource_groups"), ), }), ).annotate({ identifier: "UserGroupsUpdateRequestPoliciesItem", }) as any as S.Schema; export type UserGroupsUpdateRequestPoliciesList = Array; export const UserGroupsUpdateRequestPoliciesList = /*@__PURE__*/ S.Array( UserGroupsUpdateRequestPoliciesItem, ) as any as S.Schema; export interface UpdateUserGroupRequest { /** Account identifier tag. */ accountId: string; /** User Group identifier tag. */ userGroupId: string; /** Name of the User group. */ name?: string; /** Policies attached to the User group */ policies?: UserGroupsUpdateRequestPoliciesList; } export const UpdateUserGroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), userGroupId: S.String.pipe(T.Label("user_group_id")), name: S.optional(S.String), policies: S.optional(UserGroupsUpdateRequestPoliciesList), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/iam/user_groups/{user_group_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateUserGroupRequest", }) as any as S.Schema; export type UserGroupsUpdateResponsePoliciesItemAccess = "allow" | "deny"; export const UserGroupsUpdateResponsePoliciesItemAccess = /*@__PURE__*/ S.String; export type UserGroupsUpdateResponsePoliciesItemPermissionGroupsItemMeta = ResourceGroupsCreateResponseMeta; export const UserGroupsUpdateResponsePoliciesItemPermissionGroupsItemMeta = ResourceGroupsCreateResponseMeta; export type UserGroupsUpdateResponsePoliciesItemPermissionGroupsItem = UserGroupsCreateResponsePoliciesItemPermissionGroupsItem; export const UserGroupsUpdateResponsePoliciesItemPermissionGroupsItem = UserGroupsCreateResponsePoliciesItemPermissionGroupsItem; export type UserGroupsUpdateResponsePoliciesItemPermissionGroupsList = Array; export const UserGroupsUpdateResponsePoliciesItemPermissionGroupsList = /*@__PURE__*/ S.Array( UserGroupsCreateResponsePoliciesItemPermissionGroupsItem, ) as any as S.Schema; export type UserGroupsUpdateResponsePoliciesItemResourceGroupsItemScopeItemObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export const UserGroupsUpdateResponsePoliciesItemResourceGroupsItemScopeItemObjectsItem = ResourceGroupsCreateRequestScopeObjectsItem; export type UserGroupsUpdateResponsePoliciesItemResourceGroupsItemScopeItemObjectsList = Array; export const UserGroupsUpdateResponsePoliciesItemResourceGroupsItemScopeItemObjectsList = /*@__PURE__*/ S.Array( ResourceGroupsCreateRequestScopeObjectsItem, ) as any as S.Schema; export interface UserGroupsUpdateResponsePoliciesItemResourceGroupsItemScopeItem { /** This is a combination of pre-defined resource name and identifier (like Account ID etc.) */ key: string; /** A list of scope objects for additional context. */ objects: UserGroupsUpdateResponsePoliciesItemResourceGroupsItemScopeItemObjectsList; } export const UserGroupsUpdateResponsePoliciesItemResourceGroupsItemScopeItem = /*@__PURE__*/ S.suspend(() => S.Struct({ key: S.String, objects: UserGroupsUpdateResponsePoliciesItemResourceGroupsItemScopeItemObjectsList, }), ).annotate({ identifier: "UserGroupsUpdateResponsePoliciesItemResourceGroupsItemScopeItem", }) as any as S.Schema; export type UserGroupsUpdateResponsePoliciesItemResourceGroupsItemScopeList = Array; export const UserGroupsUpdateResponsePoliciesItemResourceGroupsItemScopeList = /*@__PURE__*/ S.Array( UserGroupsUpdateResponsePoliciesItemResourceGroupsItemScopeItem, ) as any as S.Schema; export type UserGroupsUpdateResponsePoliciesItemResourceGroupsItemMeta = ResourceGroupsCreateResponseMeta; export const UserGroupsUpdateResponsePoliciesItemResourceGroupsItemMeta = ResourceGroupsCreateResponseMeta; export interface UserGroupsUpdateResponsePoliciesItemResourceGroupsItem { /** Identifier of the resource group. */ id: string; /** The scope associated to the resource group */ scope: UserGroupsUpdateResponsePoliciesItemResourceGroupsItemScopeList; /** Attributes associated to the resource group. */ meta?: ResourceGroupsCreateResponseMeta | null; /** Name of the resource group. */ name?: string | null; } export const UserGroupsUpdateResponsePoliciesItemResourceGroupsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, scope: UserGroupsUpdateResponsePoliciesItemResourceGroupsItemScopeList, meta: S.optional(S.NullOr(ResourceGroupsCreateResponseMeta)), name: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UserGroupsUpdateResponsePoliciesItemResourceGroupsItem", }) as any as S.Schema; export type UserGroupsUpdateResponsePoliciesItemResourceGroupsList = Array; export const UserGroupsUpdateResponsePoliciesItemResourceGroupsList = /*@__PURE__*/ S.Array( UserGroupsUpdateResponsePoliciesItemResourceGroupsItem, ) as any as S.Schema; export interface UserGroupsUpdateResponsePoliciesItem { /** Policy identifier. */ id?: string | null; /** Allow or deny operations against the resources. */ access?: UserGroupsUpdateResponsePoliciesItemAccess | null; /** A set of permission groups that are specified to the policy. */ permissionGroups?: UserGroupsUpdateResponsePoliciesItemPermissionGroupsList | null; /** A list of resource groups that the policy applies to. */ resourceGroups?: UserGroupsUpdateResponsePoliciesItemResourceGroupsList | null; } export const UserGroupsUpdateResponsePoliciesItem = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.NullOr(S.String)), access: S.optional(S.NullOr(UserGroupsUpdateResponsePoliciesItemAccess)), permissionGroups: S.optional( S.NullOr(UserGroupsUpdateResponsePoliciesItemPermissionGroupsList).pipe( T.Body("permission_groups"), ), ), resourceGroups: S.optional( S.NullOr(UserGroupsUpdateResponsePoliciesItemResourceGroupsList).pipe( T.Body("resource_groups"), ), ), }), ).annotate({ identifier: "UserGroupsUpdateResponsePoliciesItem", }) as any as S.Schema; export type UserGroupsUpdateResponsePoliciesList = Array; export const UserGroupsUpdateResponsePoliciesList = /*@__PURE__*/ S.Array( UserGroupsUpdateResponsePoliciesItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateUserGroupResponse { /** User Group identifier tag. */ id: string; /** Timestamp for the creation of the user group */ createdOn: string; /** Last time the user group was modified. */ modifiedOn: string; /** Name of the user group. */ name: string; /** Policies attached to the User group */ policies?: UserGroupsUpdateResponsePoliciesList | null; } export const UpdateUserGroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, policies: S.optional(S.NullOr(UserGroupsUpdateResponsePoliciesList)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateUserGroupResponse", }) as any as S.Schema; export type UserGroupsMembersUpdateRequestMembersItem = UserGroupsMembersCreateRequestMembersItem; export const UserGroupsMembersUpdateRequestMembersItem = UserGroupsMembersCreateRequestMembersItem; export type UserGroupsMembersUpdateRequestMembersList = Array; export const UserGroupsMembersUpdateRequestMembersList = /*@__PURE__*/ S.Array( UserGroupsMembersCreateRequestMembersItem, ) as any as S.Schema; export interface UpdateUserGroupMemberRequest { /** Account identifier tag. */ accountId: string; /** User Group identifier tag. */ userGroupId: string; /** Set/Replace members to a user group. */ members: UserGroupsMembersUpdateRequestMembersList; } export const UpdateUserGroupMemberRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), userGroupId: S.String.pipe(T.Label("user_group_id")), members: UserGroupsMembersUpdateRequestMembersList.pipe(T.HttpBody()), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/iam/user_groups/{user_group_id}/members", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateUserGroupMemberRequest", }) as any as S.Schema; export type UserGroupsMembersUpdateResultItemStatus = "accepted" | "pending"; export const UserGroupsMembersUpdateResultItemStatus = /*@__PURE__*/ S.String; export interface UserGroupsMembersUpdateResultItem { /** Account member identifier. */ id: string; /** The contact email address of the user. */ email?: string | null; /** The member's status in the account. */ status?: UserGroupsMembersUpdateResultItemStatus | null; } export const UserGroupsMembersUpdateResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, email: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(UserGroupsMembersUpdateResultItemStatus)), }), ).annotate({ identifier: "UserGroupsMembersUpdateResultItem", }) as any as S.Schema; export type UserGroupsMembersUpdateResultList = Array; export const UserGroupsMembersUpdateResultList = /*@__PURE__*/ S.Array( UserGroupsMembersUpdateResultItem, ) as any as S.Schema; export interface UpdateUserGroupMemberResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: UserGroupsMembersUpdateResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const UpdateUserGroupMemberResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: UserGroupsMembersUpdateResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateUserGroupMemberResponse", }) as any as S.Schema; export type BeginVerificationSsoError = CloudflareOpError; /** 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. */ export const beginVerificationSso: API.OperationMethod< BeginVerificationSsoRequest, BeginVerificationSsoResponse, BeginVerificationSsoError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: BeginVerificationSsoRequest, output: BeginVerificationSsoResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateOauthClientError = CloudflareOpError; /** Create a new OAuth client for an account. */ export const createOauthClient: API.OperationMethod< CreateOauthClientRequest, CreateOauthClientResponse, CreateOauthClientError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateOauthClientRequest, output: CreateOauthClientResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateResourceGroupError = CloudflareOpError; /** Create a new Resource Group under the specified account. */ export const createResourceGroup: API.OperationMethod< CreateResourceGroupRequest, CreateResourceGroupResponse, CreateResourceGroupError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateResourceGroupRequest, output: CreateResourceGroupResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateSsoError = CloudflareOpError; /** Creates a new SSO connector for logging into Cloudflare through an identity provider. */ export const createSso: API.OperationMethod< CreateSsoRequest, CreateSsoResponse, CreateSsoError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateSsoRequest, output: CreateSsoResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateUserGroupError = UserGroupNameInUse | CloudflareOpError; /** Create a new user group under the specified account. */ export const createUserGroup: API.OperationMethod< CreateUserGroupRequest, CreateUserGroupResponse, CreateUserGroupError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateUserGroupRequest, output: CreateUserGroupResponse, errors: [UserGroupNameInUse, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateUserGroupMemberError = | InvalidMember | UserGroupNotFound | CloudflareOpError; /** Add members to a User Group. */ export const createUserGroupMember: API.PaginatedOperationMethod< CreateUserGroupMemberRequest, CreateUserGroupMemberResponse, CreateUserGroupMemberError, CloudflareOpContext, UserGroupsMembersCreateResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: CreateUserGroupMemberRequest, output: CreateUserGroupMemberResponse, errors: [ InvalidMember, UserGroupNotFound, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type DeleteOauthClientError = CloudflareOpError; /** Delete an OAuth client. */ export const deleteOauthClient: API.OperationMethod< DeleteOauthClientRequest, DeleteOauthClientResponse, DeleteOauthClientError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteOauthClientRequest, output: DeleteOauthClientResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteResourceGroupError = | ResourceGroupNotFound | CloudflareOpError; /** Remove a resource group from an account. */ export const deleteResourceGroup: API.OperationMethod< DeleteResourceGroupRequest, DeleteResourceGroupResponse, DeleteResourceGroupError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteResourceGroupRequest, output: DeleteResourceGroupResponse, errors: [ResourceGroupNotFound, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteRotatedSecretOauthClientError = CloudflareOpError; /** Removes the old client secret after a rotation, keeping only the new one. Use this after you have updated your client configuration to use the new secret. The `has_rotated_secret` field on the client indicates whether there is an old secret to delete. */ export const deleteRotatedSecretOauthClient: API.OperationMethod< DeleteRotatedSecretOauthClientRequest, DeleteRotatedSecretOauthClientResponse, DeleteRotatedSecretOauthClientError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteRotatedSecretOauthClientRequest, output: DeleteRotatedSecretOauthClientResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteSsoError = CloudflareOpError; /** Deletes an SSO connector from the account. */ export const deleteSso: API.OperationMethod< DeleteSsoRequest, DeleteSsoResponse, DeleteSsoError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteSsoRequest, output: DeleteSsoResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteUserGroupError = UserGroupNotFound | CloudflareOpError; /** Remove a user group from an account. */ export const deleteUserGroup: API.OperationMethod< DeleteUserGroupRequest, DeleteUserGroupResponse, DeleteUserGroupError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteUserGroupRequest, output: DeleteUserGroupResponse, errors: [UserGroupNotFound, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteUserGroupMemberError = | InvalidMember | UserGroupMemberNotFound | UserGroupNotFound | CloudflareOpError; /** Remove a member from User Group */ export const deleteUserGroupMember: API.OperationMethod< DeleteUserGroupMemberRequest, DeleteUserGroupMemberResponse, DeleteUserGroupMemberError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteUserGroupMemberRequest, output: DeleteUserGroupMemberResponse, errors: [ InvalidMember, UserGroupMemberNotFound, UserGroupNotFound, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetOauthClientError = CloudflareOpError; /** Get details of a specific OAuth client. */ export const getOauthClient: API.OperationMethod< GetOauthClientRequest, GetOauthClientResponse, GetOauthClientError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetOauthClientRequest, output: GetOauthClientResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetPermissionGroupError = CloudflareOpError; /** Get information about a specific permission group in an account. */ export const getPermissionGroup: API.OperationMethod< GetPermissionGroupRequest, GetPermissionGroupResponse, GetPermissionGroupError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetPermissionGroupRequest, output: GetPermissionGroupResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetResourceGroupError = | ResourceGroupNotFound | Forbidden | CloudflareOpError; /** Get information about a specific resource group in an account. */ export const getResourceGroup: API.OperationMethod< GetResourceGroupRequest, GetResourceGroupResponse, GetResourceGroupError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetResourceGroupRequest, output: GetResourceGroupResponse, errors: [ ResourceGroupNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSsoError = CloudflareOpError; /** Retrieves details for a specific SSO connector. */ export const getSso: API.OperationMethod< GetSsoRequest, GetSsoResponse, GetSsoError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetSsoRequest, output: GetSsoResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetUserGroupError = | UserGroupNotFound | Forbidden | CloudflareOpError; /** Get information about a specific user group in an account. */ export const getUserGroup: API.OperationMethod< GetUserGroupRequest, GetUserGroupResponse, GetUserGroupError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetUserGroupRequest, output: GetUserGroupResponse, errors: [ UserGroupNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetUserGroupMemberError = | UserGroupMemberNotFound | UserGroupNotFound | Forbidden | CloudflareOpError; /** Get details of a specific member in a user group. */ export const getUserGroupMember: API.OperationMethod< GetUserGroupMemberRequest, GetUserGroupMemberResponse, GetUserGroupMemberError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetUserGroupMemberRequest, output: GetUserGroupMemberResponse, errors: [ UserGroupMemberNotFound, UserGroupNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListOauthClientsError = CloudflareOpError; /** List all OAuth clients for an account. */ export const listOauthClients: API.PaginatedOperationMethod< ListOauthClientsRequest, ListOauthClientsResponse, ListOauthClientsError, CloudflareOpContext, OauthClientsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListOauthClientsRequest, output: ListOauthClientsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListOauthScopesError = CloudflareOpError; /** List all available OAuth scopes. This endpoint requires authentication but has no authorization role requirements. */ export const listOauthScopes: API.PaginatedOperationMethod< ListOauthScopesRequest, ListOauthScopesResponse, ListOauthScopesError, CloudflareOpContext, OauthScopesListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListOauthScopesRequest, output: ListOauthScopesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListPermissionGroupsError = CloudflareOpError; /** List all the permissions groups for an account. */ export const listPermissionGroups: API.PaginatedOperationMethod< ListPermissionGroupsRequest, ListPermissionGroupsResponse, ListPermissionGroupsError, CloudflareOpContext, UserGroupsCreateResponsePoliciesItemPermissionGroupsItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListPermissionGroupsRequest, output: ListPermissionGroupsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListResourceGroupsError = CloudflareOpError; /** List all the resource groups for an account. */ export const listResourceGroups: API.PaginatedOperationMethod< ListResourceGroupsRequest, ListResourceGroupsResponse, ListResourceGroupsError, CloudflareOpContext, ResourceGroupsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListResourceGroupsRequest, output: ListResourceGroupsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListSsosError = CloudflareOpError; /** Lists all SSO connectors configured for the account. */ export const listSsos: API.PaginatedOperationMethod< ListSsosRequest, ListSsosResponse, ListSsosError, CloudflareOpContext, SsoListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListSsosRequest, output: ListSsosResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListUserGroupMembersError = | UserGroupNotFound | PolicyValidationFailed | CloudflareOpError; /** List all the members attached to a user group. */ export const listUserGroupMembers: API.PaginatedOperationMethod< ListUserGroupMembersRequest, ListUserGroupMembersResponse, ListUserGroupMembersError, CloudflareOpContext, UserGroupsMembersListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListUserGroupMembersRequest, output: ListUserGroupMembersResponse, errors: [ UserGroupNotFound, PolicyValidationFailed, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListUserGroupsError = CloudflareOpError; /** List all the user groups for an account. */ export const listUserGroups: API.PaginatedOperationMethod< ListUserGroupsRequest, ListUserGroupsResponse, ListUserGroupsError, CloudflareOpContext, UserGroupsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListUserGroupsRequest, output: ListUserGroupsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type PatchOauthClientError = CloudflareOpError; /** Update an existing OAuth client. Only include fields you want to update. */ export const patchOauthClient: API.OperationMethod< PatchOauthClientRequest, PatchOauthClientResponse, PatchOauthClientError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchOauthClientRequest, output: PatchOauthClientResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchSsoError = CloudflareOpError; /** Updates the state or configuration of an SSO connector. */ export const patchSso: API.OperationMethod< PatchSsoRequest, PatchSsoResponse, PatchSsoError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchSsoRequest, output: PatchSsoResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type RotateSecretOauthClientError = CloudflareOpError; /** Creates a second client secret so you can update your client configuration before deleting the old one. The `has_rotated_secret` field on the client will be set to `true`. */ export const rotateSecretOauthClient: API.OperationMethod< RotateSecretOauthClientRequest, RotateSecretOauthClientResponse, RotateSecretOauthClientError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: RotateSecretOauthClientRequest, output: RotateSecretOauthClientResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateResourceGroupError = | ResourceGroupNotFound | CloudflareOpError; /** Modify an existing resource group. */ export const updateResourceGroup: API.OperationMethod< UpdateResourceGroupRequest, UpdateResourceGroupResponse, UpdateResourceGroupError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateResourceGroupRequest, output: UpdateResourceGroupResponse, errors: [ResourceGroupNotFound, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateUserGroupError = | UserGroupNotFound | UserGroupNameInUse | CloudflareOpError; /** Modify an existing user group. */ export const updateUserGroup: API.OperationMethod< UpdateUserGroupRequest, UpdateUserGroupResponse, UpdateUserGroupError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateUserGroupRequest, output: UpdateUserGroupResponse, errors: [ UserGroupNotFound, UserGroupNameInUse, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateUserGroupMemberError = | InvalidMember | UserGroupNotFound | CloudflareOpError; /** Replace the set of members attached to a User Group. */ export const updateUserGroupMember: API.PaginatedOperationMethod< UpdateUserGroupMemberRequest, UpdateUserGroupMemberResponse, UpdateUserGroupMemberError, CloudflareOpContext, UserGroupsMembersUpdateResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: UpdateUserGroupMemberRequest, output: UpdateUserGroupMemberResponse, errors: [ InvalidMember, UserGroupNotFound, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any;