import { APIResource } from "../../resource.js"; import * as Core from "../../core.js"; import * as OrganizationProfileAPI from "./organization-profile.js"; import { OrganizationProfile, OrganizationProfileResource, OrganizationProfileUpdateParams } from "./organization-profile.js"; import * as BillingAPI from "./billing/billing.js"; import { Billing } from "./billing/billing.js"; import * as LogsAPI from "./logs/logs.js"; import { Logs } from "./logs/logs.js"; import { SinglePage } from "../../pagination.js"; export declare class Organizations extends APIResource { organizationProfile: OrganizationProfileAPI.OrganizationProfileResource; logs: LogsAPI.Logs; billing: BillingAPI.Billing; /** * Create a new organization for a user. (Currently in Public Beta - see * https://developers.cloudflare.com/fundamentals/organizations/) */ create(body: OrganizationCreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Modify organization. (Currently in Public Beta - see * https://developers.cloudflare.com/fundamentals/organizations/) */ update(organizationId: string, body: OrganizationUpdateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Retrieve a list of organizations a particular user has access to. (Currently in * Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/) */ list(query?: OrganizationListParams, options?: Core.RequestOptions): Core.PagePromise; list(options?: Core.RequestOptions): Core.PagePromise; /** * Delete an organization. The organization MUST be empty before deleting. It must * not contain any sub-organizations, accounts, members or users. (Currently in * Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/) */ delete(organizationId: string, options?: Core.RequestOptions): Core.APIPromise; /** * Retrieve the details of a certain organization. (Currently in Public Beta - see * https://developers.cloudflare.com/fundamentals/organizations/) */ get(organizationId: string, options?: Core.RequestOptions): Core.APIPromise; } export declare class OrganizationsSinglePage extends SinglePage { } /** * References an Organization in the Cloudflare data model. */ export interface Organization { id: string; create_time: string; meta: Organization.Meta; name: string; parent?: Organization.Parent; profile?: Organization.Profile; } export declare namespace Organization { interface Meta { /** * Enable features for Organizations. */ flags?: Meta.Flags; managed_by?: string; [k: string]: unknown; } namespace Meta { /** * Enable features for Organizations. */ interface Flags { account_creation: string; account_deletion: string; account_migration: string; account_mobility: string; sub_org_creation: string; } } interface Parent { id: string; name: string; } interface Profile { business_address: string; business_email: string; business_name: string; business_phone: string; external_metadata: string; } } export interface OrganizationDeleteResponse { id: string; } export interface OrganizationCreateParams { name: string; parent?: OrganizationCreateParams.Parent; profile?: OrganizationCreateParams.Profile; } export declare namespace OrganizationCreateParams { interface Parent { id: string; } interface Profile { business_address: string; business_email: string; business_name: string; business_phone: string; external_metadata: string; } } export interface OrganizationUpdateParams { name: string; parent?: OrganizationUpdateParams.Parent; profile?: OrganizationUpdateParams.Profile; } export declare namespace OrganizationUpdateParams { interface Parent { id: string; } interface Profile { business_address: string; business_email: string; business_name: string; business_phone: string; external_metadata: string; } } export interface OrganizationListParams { /** * Only return organizations with the specified IDs (ex. id=foo&id=bar). Send * multiple elements by repeating the query value. */ id?: Array; containing?: OrganizationListParams.Containing; name?: OrganizationListParams.Name; /** * The amount of items to return. Defaults to 10. */ page_size?: number; /** * An opaque token returned from the last list response that when provided will * retrieve the next page. * * Parameters used to filter the retrieved list must remain in subsequent requests * with a page token. */ page_token?: string; parent?: OrganizationListParams.Parent; } export declare namespace OrganizationListParams { interface Containing { /** * Filter the list of organizations to the ones that contain this particular * account. */ account?: string; /** * Filter the list of organizations to the ones that contain this particular * organization. */ organization?: string; /** * Filter the list of organizations to the ones that contain this particular user. * * IMPORTANT: Just because an organization "contains" a user is not a * representation of any authorization or privilege to manage any resources * therein. An organization "containing" a user simply means the user is managed by * that organization. */ user?: string; } interface Name { /** * (case-insensitive) Filter the list of organizations to where the name contains a * particular string. */ contains?: string; /** * (case-insensitive) Filter the list of organizations to where the name ends with * a particular string. */ endsWith?: string; /** * (case-insensitive) Filter the list of organizations to where the name starts * with a particular string. */ startsWith?: string; } interface Parent { /** * Filter the list of organizations to the ones that are a sub-organization of the * specified organization. * * "null" is a valid value to provide for this parameter. It means "where an * organization has no parent (i.e. it is a 'root' organization)." */ id?: (string & {}) | 'null'; } } export declare namespace Organizations { export { type Organization as Organization, type OrganizationDeleteResponse as OrganizationDeleteResponse, OrganizationsSinglePage as OrganizationsSinglePage, type OrganizationCreateParams as OrganizationCreateParams, type OrganizationUpdateParams as OrganizationUpdateParams, type OrganizationListParams as OrganizationListParams, }; export { OrganizationProfileResource as OrganizationProfileResource, type OrganizationProfile as OrganizationProfile, type OrganizationProfileUpdateParams as OrganizationProfileUpdateParams, }; export { Logs as Logs }; export { Billing as Billing }; } //# sourceMappingURL=organizations.d.ts.map