cloudflare
Version:
The official TypeScript library for the Cloudflare API
43 lines • 2.01 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflare/resource';
import * as AuditLogsAPI from 'cloudflare/resources/user/audit-logs';
import * as InvitesAPI from 'cloudflare/resources/user/invites';
import * as OrganizationsAPI from 'cloudflare/resources/user/organizations';
import * as SubscriptionsAPI from 'cloudflare/resources/user/subscriptions';
import * as BillingAPI from 'cloudflare/resources/user/billing/billing';
import * as TokensAPI from 'cloudflare/resources/user/tokens/tokens';
export class User extends APIResource {
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.subscriptions = new SubscriptionsAPI.Subscriptions(this._client);
this.tokens = new TokensAPI.Tokens(this._client);
}
/**
* Edit part of your user details.
*/
edit(body, options) {
return this._client.patch('/user', { body, ...options })._thenUnwrap((obj) => obj.result);
}
/**
* User Details
*/
get(options) {
return this._client.get('/user', options)._thenUnwrap((obj) => obj.result);
}
}
(function (User) {
User.AuditLogs = AuditLogsAPI.AuditLogs;
User.Billing = BillingAPI.Billing;
User.Invites = InvitesAPI.Invites;
User.InvitesSinglePage = InvitesAPI.InvitesSinglePage;
User.Organizations = OrganizationsAPI.Organizations;
User.OrganizationsV4PagePaginationArray = OrganizationsAPI.OrganizationsV4PagePaginationArray;
User.Subscriptions = SubscriptionsAPI.Subscriptions;
User.Tokens = TokensAPI.Tokens;
User.TokenListResponsesV4PagePaginationArray = TokensAPI.TokenListResponsesV4PagePaginationArray;
})(User || (User = {}));
//# sourceMappingURL=user.mjs.map