cloudflare
Version:
The official TypeScript library for the Cloudflare API
57 lines • 3.3 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflare/resource';
import * as AppTypesAPI from 'cloudflare/resources/zero-trust/gateway/app-types';
import * as AuditSSHSettingsAPI from 'cloudflare/resources/zero-trust/gateway/audit-ssh-settings';
import * as CategoriesAPI from 'cloudflare/resources/zero-trust/gateway/categories';
import * as ConfigurationsAPI from 'cloudflare/resources/zero-trust/gateway/configurations';
import * as LocationsAPI from 'cloudflare/resources/zero-trust/gateway/locations';
import * as LoggingAPI from 'cloudflare/resources/zero-trust/gateway/logging';
import * as ProxyEndpointsAPI from 'cloudflare/resources/zero-trust/gateway/proxy-endpoints';
import * as RulesAPI from 'cloudflare/resources/zero-trust/gateway/rules';
import * as ListsAPI from 'cloudflare/resources/zero-trust/gateway/lists/lists';
export class Gateway extends APIResource {
constructor() {
super(...arguments);
this.auditSSHSettings = new AuditSSHSettingsAPI.AuditSSHSettings(this._client);
this.categories = new CategoriesAPI.Categories(this._client);
this.appTypes = new AppTypesAPI.AppTypes(this._client);
this.configurations = new ConfigurationsAPI.Configurations(this._client);
this.lists = new ListsAPI.Lists(this._client);
this.locations = new LocationsAPI.Locations(this._client);
this.logging = new LoggingAPI.Logging(this._client);
this.proxyEndpoints = new ProxyEndpointsAPI.ProxyEndpoints(this._client);
this.rules = new RulesAPI.Rules(this._client);
}
/**
* Creates a Zero Trust account with an existing Cloudflare account.
*/
create(params, options) {
const { account_id } = params;
return this._client.post(`/accounts/${account_id}/gateway`, options)._thenUnwrap((obj) => obj.result);
}
/**
* Gets information about the current Zero Trust account.
*/
list(params, options) {
const { account_id } = params;
return this._client.get(`/accounts/${account_id}/gateway`, options)._thenUnwrap((obj) => obj.result);
}
}
(function (Gateway) {
Gateway.AuditSSHSettings = AuditSSHSettingsAPI.AuditSSHSettings;
Gateway.Categories = CategoriesAPI.Categories;
Gateway.ZeroTrustGatewayCategoriesSinglePage = CategoriesAPI.ZeroTrustGatewayCategoriesSinglePage;
Gateway.AppTypes = AppTypesAPI.AppTypes;
Gateway.ZeroTrustGatewayAppTypesSinglePage = AppTypesAPI.ZeroTrustGatewayAppTypesSinglePage;
Gateway.Configurations = ConfigurationsAPI.Configurations;
Gateway.Lists = ListsAPI.Lists;
Gateway.ZeroTrustGatewayListsSinglePage = ListsAPI.ZeroTrustGatewayListsSinglePage;
Gateway.Locations = LocationsAPI.Locations;
Gateway.ZeroTrustGatewayLocationsSinglePage = LocationsAPI.ZeroTrustGatewayLocationsSinglePage;
Gateway.Logging = LoggingAPI.Logging;
Gateway.ProxyEndpoints = ProxyEndpointsAPI.ProxyEndpoints;
Gateway.ZeroTrustGatewayProxyEndpointsSinglePage = ProxyEndpointsAPI.ZeroTrustGatewayProxyEndpointsSinglePage;
Gateway.Rules = RulesAPI.Rules;
Gateway.ZeroTrustGatewayRulesSinglePage = RulesAPI.ZeroTrustGatewayRulesSinglePage;
})(Gateway || (Gateway = {}));
//# sourceMappingURL=gateway.mjs.map