UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

70 lines 3.27 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.User = void 0; const resource_1 = require("cloudflare/resource"); const AuditLogsAPI = __importStar(require("cloudflare/resources/user/audit-logs")); const InvitesAPI = __importStar(require("cloudflare/resources/user/invites")); const OrganizationsAPI = __importStar(require("cloudflare/resources/user/organizations")); const SubscriptionsAPI = __importStar(require("cloudflare/resources/user/subscriptions")); const BillingAPI = __importStar(require("cloudflare/resources/user/billing/billing")); const TokensAPI = __importStar(require("cloudflare/resources/user/tokens/tokens")); class User extends resource_1.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); } } exports.User = User; (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 = exports.User || (exports.User = {})); //# sourceMappingURL=user.js.map