UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

80 lines • 3.41 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../core/resource.mjs"; import * as AuditLogsAPI from "./audit-logs.mjs"; import { AuditLogs, BaseAuditLogs } from "./audit-logs.mjs"; import * as InvitesAPI from "./invites.mjs"; import { BaseInvites, Invites } from "./invites.mjs"; import * as OrganizationsAPI from "./organizations.mjs"; import { BaseOrganizations, Organizations, } from "./organizations.mjs"; import * as SubscriptionsAPI from "./subscriptions.mjs"; import { BaseSubscriptions, Subscriptions, } from "./subscriptions.mjs"; import * as TenantsAPI from "./tenants.mjs"; import { BaseTenants, Tenants } from "./tenants.mjs"; import * as BillingAPI from "./billing/billing.mjs"; import { BaseBilling, Billing } from "./billing/billing.mjs"; import * as SpectrumAnalyticsAPI from "./spectrum-analytics/spectrum-analytics.mjs"; import { BaseSpectrumAnalytics, SpectrumAnalytics } from "./spectrum-analytics/spectrum-analytics.mjs"; import * as TokensAPI from "./tokens/tokens.mjs"; import { BaseTokens, Tokens, } from "./tokens/tokens.mjs"; export var BaseUser = /* @__PURE__ */ (() => { class BaseUser extends APIResource { /** * Edit part of your user details. * * @example * ```ts * const response = await client.user.edit(); * ``` */ edit(body, options) { return this._client.patch('/user', { body, ...options })._thenUnwrap((obj) => obj.result); } /** * Retrieves detailed information about the currently authenticated user, including * email, name, and account memberships. * * @example * ```ts * const user = await client.user.get(); * ``` */ get(options) { return this._client.get('/user', options)._thenUnwrap((obj) => obj.result); } } BaseUser._key = Object.freeze(['user']); return BaseUser; })(); export var User = /* @__PURE__ */ (() => { class User extends BaseUser { constructor() { super(...arguments); this.auditLogs = new AuditLogsAPI.AuditLogs(this._client); this.billing = new BillingAPI.Billing(this._client); this.invites = new InvitesAPI.Invites(this._client); this.organizations = new OrganizationsAPI.Organizations(this._client); this.spectrumAnalytics = new SpectrumAnalyticsAPI.SpectrumAnalytics(this._client); this.subscriptions = new SubscriptionsAPI.Subscriptions(this._client); this.tenants = new TenantsAPI.Tenants(this._client); this.tokens = new TokensAPI.Tokens(this._client); } } User.AuditLogs = AuditLogs; User.BaseAuditLogs = BaseAuditLogs; User.Billing = Billing; User.BaseBilling = BaseBilling; User.Invites = Invites; User.BaseInvites = BaseInvites; User.Organizations = Organizations; User.BaseOrganizations = BaseOrganizations; User.SpectrumAnalytics = SpectrumAnalytics; User.BaseSpectrumAnalytics = BaseSpectrumAnalytics; User.Subscriptions = Subscriptions; User.BaseSubscriptions = BaseSubscriptions; User.Tenants = Tenants; User.BaseTenants = BaseTenants; User.Tokens = Tokens; User.BaseTokens = BaseTokens; return User; })(); //# sourceMappingURL=user.mjs.map