UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

77 lines 4 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.UserResource = 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 FirewallAPI = __importStar(require("cloudflare/resources/user/firewall/firewall")); const LoadBalancersAPI = __importStar(require("cloudflare/resources/user/load-balancers/load-balancers")); const TokensAPI = __importStar(require("cloudflare/resources/user/tokens/tokens")); class UserResource extends resource_1.APIResource { constructor() { super(...arguments); this.auditLogs = new AuditLogsAPI.AuditLogs(this._client); this.billing = new BillingAPI.Billing(this._client); this.firewall = new FirewallAPI.Firewall(this._client); this.invites = new InvitesAPI.Invites(this._client); this.loadBalancers = new LoadBalancersAPI.LoadBalancers(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.UserResource = UserResource; (function (UserResource) { UserResource.AuditLogs = AuditLogsAPI.AuditLogs; UserResource.AuditLogListResponsesV4PagePaginationArray = AuditLogsAPI.AuditLogListResponsesV4PagePaginationArray; UserResource.Billing = BillingAPI.Billing; UserResource.Firewall = FirewallAPI.Firewall; UserResource.Invites = InvitesAPI.Invites; UserResource.InviteListResponsesSinglePage = InvitesAPI.InviteListResponsesSinglePage; UserResource.LoadBalancers = LoadBalancersAPI.LoadBalancers; UserResource.Organizations = OrganizationsAPI.Organizations; UserResource.OrganizationsV4PagePaginationArray = OrganizationsAPI.OrganizationsV4PagePaginationArray; UserResource.Subscriptions = SubscriptionsAPI.Subscriptions; UserResource.Tokens = TokensAPI.Tokens; UserResource.TokenListResponsesV4PagePaginationArray = TokensAPI.TokenListResponsesV4PagePaginationArray; })(UserResource = exports.UserResource || (exports.UserResource = {})); //# sourceMappingURL=user.js.map