From dcafa07b9fa7d1bec9b8b86e148fe1356bb4be27 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 22 Feb 2024 23:23:29 +0000
Subject: [PATCH] feat: update via SDK Studio (#67)
---
.github/workflows/ci.yml | 4 +-
.stats.yml | 2 +-
api.md | 423 ++++++++----------
src/index.ts | 41 +-
src/pagination.ts | 6 +-
src/resources/ai.ts | 16 +-
.../billings.ts => billing/billing.ts} | 6 +-
src/resources/{billings => billing}/index.ts | 2 +-
.../{billings => billing}/profiles.ts | 2 +-
src/resources/devices/devices.ts | 10 +-
src/resources/devices/dex-tests.ts | 36 +-
src/resources/devices/networks.ts | 31 +-
src/resources/devices/override-codes.ts | 11 +-
.../devices/policies/default-policy.ts | 4 +-
src/resources/devices/policies/excludes.ts | 8 +-
.../devices/policies/fallback-domains.ts | 12 +-
src/resources/devices/policies/includes.ts | 8 +-
src/resources/devices/policies/policies.ts | 26 +-
.../devices/postures/integrations.ts | 22 +-
src/resources/devices/postures/postures.ts | 86 +++-
src/resources/devices/revokes.ts | 4 +-
src/resources/devices/settings.ts | 8 +-
src/resources/devices/unrevokes.ts | 4 +-
src/resources/dns-firewall/index.ts | 15 -
src/resources/dns/dns.ts | 37 ++
.../firewall/analytics/analytics.ts} | 6 +-
.../firewall/analytics}/index.ts | 2 +-
.../firewall/analytics}/reports/bytimes.ts | 2 +-
.../firewall/analytics}/reports/index.ts | 0
.../firewall/analytics}/reports/reports.ts | 4 +-
.../firewall/firewall.ts} | 104 ++---
src/resources/dns/firewall/index.ts | 15 +
src/resources/dns/index.ts | 31 ++
.../{dns-records.ts => dns/records.ts} | 305 +++++++------
src/resources/hyperdrive/configs.ts | 41 ++
src/resources/hyperdrive/hyperdrive.ts | 2 +
src/resources/hyperdrive/index.ts | 2 +
src/resources/index.ts | 35 +-
src/resources/pcaps/pcaps.ts | 46 +-
src/resources/request-tracers/index.ts | 2 +-
.../request-tracers/request-tracers.ts | 1 +
src/resources/request-tracers/traces.ts | 83 +---
src/resources/url-scanner/url-scanner.ts | 20 +
src/resources/{users => user}/audit-logs.ts | 2 +-
.../billings.ts => user/billing/billing.ts} | 8 +-
.../billings => user/billing}/history.ts | 2 +-
.../{users/billings => user/billing}/index.ts | 2 +-
.../billings => user/billing}/profiles.ts | 2 +-
.../firewall/access-rules/access-rules.ts | 2 +-
.../firewall/access-rules/index.ts | 0
.../firewall/access-rules/rules.ts | 2 +-
.../{users => user}/firewall/firewall.ts | 2 +-
.../{users => user}/firewall/index.ts | 0
src/resources/{users => user}/index.ts | 4 +-
src/resources/{users => user}/invites.ts | 2 +-
.../{users => user}/load-balancers/index.ts | 13 +-
.../load-balancers/load-balancers.ts | 19 +-
.../load-balancers}/monitors.ts | 171 ++++++-
.../pools => user/load-balancers}/pools.ts | 190 +++++++-
.../load-balancers/preview.ts} | 8 +-
.../load-balancing-analytics/events.ts | 2 +-
.../load-balancing-analytics/index.ts | 0
.../load-balancing-analytics.ts | 2 +-
.../{users => user}/organizations.ts | 2 +-
.../{users => user}/subscriptions.ts | 2 +-
src/resources/{users => user}/tokens/index.ts | 0
.../tokens/permission-groups.ts | 2 +-
.../{users => user}/tokens/tokens.ts | 6 +-
.../{users => user}/tokens/values.ts | 2 +-
.../{users/users.ts => user/user.ts} | 34 +-
.../users/load-balancers/monitors/index.ts | 14 -
.../users/load-balancers/monitors/previews.ts | 137 ------
.../load-balancers/monitors/references.ts | 43 --
.../users/load-balancers/pools/health.ts | 28 --
.../users/load-balancers/pools/index.ts | 16 -
.../users/load-balancers/pools/previews.ts | 137 ------
.../users/load-balancers/pools/references.ts | 39 --
tests/api-resources/ai.test.ts | 8 +-
.../{billings => billing}/profiles.test.ts | 4 +-
.../analytics}/reports/bytimes.test.ts | 6 +-
.../analytics}/reports/reports.test.ts | 6 +-
.../firewall/firewall.test.ts} | 22 +-
.../records.test.ts} | 32 +-
.../api-resources/hyperdrive/configs.test.ts | 16 +
.../url-scanner/url-scanner.test.ts | 2 +
.../{users => user}/audit-logs.test.ts | 6 +-
.../billings => user/billing}/history.test.ts | 10 +-
.../billing}/profiles.test.ts | 8 +-
.../firewall/access-rules/rules.test.ts | 14 +-
.../{users => user}/invites.test.ts | 12 +-
.../load-balancers}/monitors.test.ts | 84 +++-
.../load-balancers}/pools.test.ts | 100 ++++-
.../load-balancers/preview.test.ts} | 6 +-
.../load-balancing-analytics/events.test.ts | 6 +-
.../{users => user}/organizations.test.ts | 12 +-
.../{users => user}/subscriptions.test.ts | 8 +-
.../tokens/permission-groups.test.ts | 4 +-
.../{users => user}/tokens/tokens.test.ts | 24 +-
.../{users => user}/tokens/values.test.ts | 4 +-
.../users.test.ts => user/user.test.ts} | 8 +-
.../load-balancers/monitors/previews.test.ts | 55 ---
.../monitors/references.test.ts | 41 --
.../users/load-balancers/pools/health.test.ts | 39 --
.../load-balancers/pools/previews.test.ts | 55 ---
.../load-balancers/pools/references.test.ts | 39 --
105 files changed, 1475 insertions(+), 1576 deletions(-)
rename src/resources/{billings/billings.ts => billing/billing.ts} (68%)
rename src/resources/{billings => billing}/index.ts (74%)
rename src/resources/{billings => billing}/profiles.ts (91%)
delete mode 100644 src/resources/dns-firewall/index.ts
create mode 100644 src/resources/dns/dns.ts
rename src/resources/{dns-firewall/dns-analytics/dns-analytics.ts => dns/firewall/analytics/analytics.ts} (67%)
rename src/resources/{dns-firewall/dns-analytics => dns/firewall/analytics}/index.ts (73%)
rename src/resources/{dns-firewall/dns-analytics => dns/firewall/analytics}/reports/bytimes.ts (98%)
rename src/resources/{dns-firewall/dns-analytics => dns/firewall/analytics}/reports/index.ts (100%)
rename src/resources/{dns-firewall/dns-analytics => dns/firewall/analytics}/reports/reports.ts (95%)
rename src/resources/{dns-firewall/dns-firewall.ts => dns/firewall/firewall.ts} (78%)
create mode 100644 src/resources/dns/firewall/index.ts
create mode 100644 src/resources/dns/index.ts
rename src/resources/{dns-records.ts => dns/records.ts} (96%)
rename src/resources/{users => user}/audit-logs.ts (98%)
rename src/resources/{users/billings/billings.ts => user/billing/billing.ts} (75%)
rename src/resources/{users/billings => user/billing}/history.ts (96%)
rename src/resources/{users/billings => user/billing}/index.ts (86%)
rename src/resources/{users/billings => user/billing}/profiles.ts (89%)
rename src/resources/{users => user}/firewall/access-rules/access-rules.ts (90%)
rename src/resources/{users => user}/firewall/access-rules/index.ts (100%)
rename src/resources/{users => user}/firewall/access-rules/rules.ts (99%)
rename src/resources/{users => user}/firewall/firewall.ts (77%)
rename src/resources/{users => user}/firewall/index.ts (100%)
rename src/resources/{users => user}/index.ts (94%)
rename src/resources/{users => user}/invites.ts (98%)
rename src/resources/{users => user}/load-balancers/index.ts (63%)
rename src/resources/{users => user}/load-balancers/load-balancers.ts (60%)
rename src/resources/{users/load-balancers/monitors => user/load-balancers}/monitors.ts (81%)
rename src/resources/{users/load-balancers/pools => user/load-balancers}/pools.ts (91%)
rename src/resources/{users/load-balancers/previews.ts => user/load-balancers/preview.ts} (84%)
rename src/resources/{users => user}/load-balancing-analytics/events.ts (95%)
rename src/resources/{users => user}/load-balancing-analytics/index.ts (100%)
rename src/resources/{users => user}/load-balancing-analytics/load-balancing-analytics.ts (83%)
rename src/resources/{users => user}/organizations.ts (97%)
rename src/resources/{users => user}/subscriptions.ts (98%)
rename src/resources/{users => user}/tokens/index.ts (100%)
rename src/resources/{users => user}/tokens/permission-groups.ts (89%)
rename src/resources/{users => user}/tokens/tokens.ts (97%)
rename src/resources/{users => user}/tokens/values.ts (92%)
rename src/resources/{users/users.ts => user/user.ts} (80%)
delete mode 100644 src/resources/users/load-balancers/monitors/index.ts
delete mode 100644 src/resources/users/load-balancers/monitors/previews.ts
delete mode 100644 src/resources/users/load-balancers/monitors/references.ts
delete mode 100644 src/resources/users/load-balancers/pools/health.ts
delete mode 100644 src/resources/users/load-balancers/pools/index.ts
delete mode 100644 src/resources/users/load-balancers/pools/previews.ts
delete mode 100644 src/resources/users/load-balancers/pools/references.ts
rename tests/api-resources/{billings => billing}/profiles.test.ts (88%)
rename tests/api-resources/{dns-firewall/dns-analytics => dns/firewall/analytics}/reports/bytimes.test.ts (92%)
rename tests/api-resources/{dns-firewall/dns-analytics => dns/firewall/analytics}/reports/reports.test.ts (92%)
rename tests/api-resources/{dns-firewall/dns-firewall.test.ts => dns/firewall/firewall.test.ts} (89%)
rename tests/api-resources/{dns-records.test.ts => dns/records.test.ts} (89%)
rename tests/api-resources/{users => user}/audit-logs.test.ts (91%)
rename tests/api-resources/{users/billings => user/billing}/history.test.ts (87%)
rename tests/api-resources/{users/billings => user/billing}/profiles.test.ts (85%)
rename tests/api-resources/{users => user}/firewall/access-rules/rules.test.ts (88%)
rename tests/api-resources/{users => user}/invites.test.ts (84%)
rename tests/api-resources/{users/load-balancers/monitors => user/load-balancers}/monitors.test.ts (60%)
rename tests/api-resources/{users/load-balancers/pools => user/load-balancers}/pools.test.ts (57%)
rename tests/api-resources/{users/load-balancers/previews.test.ts => user/load-balancers/preview.test.ts} (85%)
rename tests/api-resources/{users => user}/load-balancing-analytics/events.test.ts (89%)
rename tests/api-resources/{users => user}/organizations.test.ts (86%)
rename tests/api-resources/{users => user}/subscriptions.test.ts (85%)
rename tests/api-resources/{users => user}/tokens/permission-groups.test.ts (89%)
rename tests/api-resources/{users => user}/tokens/tokens.test.ts (92%)
rename tests/api-resources/{users => user}/tokens/values.test.ts (89%)
rename tests/api-resources/{users/users.test.ts => user/user.test.ts} (88%)
delete mode 100644 tests/api-resources/users/load-balancers/monitors/previews.test.ts
delete mode 100644 tests/api-resources/users/load-balancers/monitors/references.test.ts
delete mode 100644 tests/api-resources/users/load-balancers/pools/health.test.ts
delete mode 100644 tests/api-resources/users/load-balancers/pools/previews.test.ts
delete mode 100644 tests/api-resources/users/load-balancers/pools/references.test.ts
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index df99898b4b..2e6d1af638 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -14,10 +14,10 @@ jobs:
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Set up Node
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: '18'
diff --git a/.stats.yml b/.stats.yml
index ea03a65f6b..c94c2d387f 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1 +1 @@
-configured_endpoints: 1209
+configured_endpoints: 1210
diff --git a/api.md b/api.md
index 383c199378..31448570e8 100644
--- a/api.md
+++ b/api.md
@@ -54,49 +54,49 @@ Methods:
- client.memberships.delete(membershipId) -> MembershipDeleteResponse
- client.memberships.get(membershipId) -> MembershipGetResponse
-# Users
+# User
Types:
-- UserListResponse
-- UserEditResponse
+- UserListResponse
+- UserEditResponse
Methods:
-- client.users.list() -> UserListResponse
-- client.users.edit({ ...params }) -> UserEditResponse
+- client.user.list() -> UserListResponse
+- client.user.edit({ ...params }) -> UserEditResponse
## AuditLogs
Types:
-- AuditLogListResponse
+- AuditLogListResponse
Methods:
-- client.users.auditLogs.list({ ...params }) -> AuditLogListResponsesV4PagePaginationArray
+- client.user.auditLogs.list({ ...params }) -> AuditLogListResponsesV4PagePaginationArray
-## Billings
+## Billing
### History
Types:
-- HistoryListResponse
+- HistoryListResponse
Methods:
-- client.users.billings.history.list({ ...params }) -> HistoryListResponsesV4PagePaginationArray
+- client.user.billing.history.list({ ...params }) -> HistoryListResponsesV4PagePaginationArray
### Profiles
Types:
-- ProfileListResponse
+- ProfileListResponse
Methods:
-- client.users.billings.profiles.list() -> ProfileListResponse
+- client.user.billing.profiles.list() -> ProfileListResponse
## Firewall
@@ -106,31 +106,31 @@ Methods:
Types:
-- RuleCreateResponse
-- RuleListResponse
-- RuleDeleteResponse
-- RuleEditResponse
+- RuleCreateResponse
+- RuleListResponse
+- RuleDeleteResponse
+- RuleEditResponse
Methods:
-- client.users.firewall.accessRules.rules.create({ ...params }) -> RuleCreateResponse | null
-- client.users.firewall.accessRules.rules.list({ ...params }) -> RuleListResponsesV4PagePaginationArray
-- client.users.firewall.accessRules.rules.delete(identifier) -> RuleDeleteResponse | null
-- client.users.firewall.accessRules.rules.edit(identifier, { ...params }) -> RuleEditResponse | null
+- client.user.firewall.accessRules.rules.create({ ...params }) -> RuleCreateResponse | null
+- client.user.firewall.accessRules.rules.list({ ...params }) -> RuleListResponsesV4PagePaginationArray
+- client.user.firewall.accessRules.rules.delete(identifier) -> RuleDeleteResponse | null
+- client.user.firewall.accessRules.rules.edit(identifier, { ...params }) -> RuleEditResponse | null
## Invites
Types:
-- InviteListResponse
-- InviteEditResponse
-- InviteGetResponse
+- InviteListResponse
+- InviteEditResponse
+- InviteGetResponse
Methods:
-- client.users.invites.list() -> InviteListResponse | null
-- client.users.invites.edit(inviteId, { ...params }) -> InviteEditResponse
-- client.users.invites.get(inviteId) -> InviteGetResponse
+- client.user.invites.list() -> InviteListResponse | null
+- client.user.invites.edit(inviteId, { ...params }) -> InviteEditResponse
+- client.user.invites.get(inviteId) -> InviteGetResponse
## LoadBalancers
@@ -138,97 +138,57 @@ Methods:
Types:
-- MonitorCreateResponse
-- MonitorListResponse
-- MonitorDeleteResponse
-- MonitorEditResponse
-- MonitorGetResponse
+- MonitorCreateResponse
+- MonitorListResponse
+- MonitorDeleteResponse
+- MonitorEditResponse
+- MonitorGetResponse
+- MonitorPreviewResponse
+- MonitorReferencesResponse
Methods:
-- client.users.loadBalancers.monitors.create({ ...params }) -> MonitorCreateResponse
-- client.users.loadBalancers.monitors.list() -> MonitorListResponse | null
-- client.users.loadBalancers.monitors.delete(monitorId) -> MonitorDeleteResponse
-- client.users.loadBalancers.monitors.edit(monitorId, { ...params }) -> MonitorEditResponse
-- client.users.loadBalancers.monitors.get(monitorId) -> MonitorGetResponse
-
-#### Previews
-
-Types:
-
-- PreviewCreateResponse
-
-Methods:
-
-- client.users.loadBalancers.monitors.previews.create(monitorId, { ...params }) -> PreviewCreateResponse
-
-#### References
-
-Types:
-
-- ReferenceLoadBalancerMonitorsListMonitorReferencesResponse
-
-Methods:
-
-- client.users.loadBalancers.monitors.references.loadBalancerMonitorsListMonitorReferences(monitorId) -> ReferenceLoadBalancerMonitorsListMonitorReferencesResponse | null
+- client.user.loadBalancers.monitors.create({ ...params }) -> MonitorCreateResponse
+- client.user.loadBalancers.monitors.list() -> MonitorListResponse | null
+- client.user.loadBalancers.monitors.delete(monitorId) -> MonitorDeleteResponse
+- client.user.loadBalancers.monitors.edit(monitorId, { ...params }) -> MonitorEditResponse
+- client.user.loadBalancers.monitors.get(monitorId) -> MonitorGetResponse
+- client.user.loadBalancers.monitors.preview(monitorId, { ...params }) -> MonitorPreviewResponse
+- client.user.loadBalancers.monitors.references(monitorId) -> MonitorReferencesResponse | null
### Pools
Types:
-- PoolCreateResponse
-- PoolListResponse
-- PoolDeleteResponse
-- PoolEditResponse
-- PoolGetResponse
-
-Methods:
-
-- client.users.loadBalancers.pools.create({ ...params }) -> PoolCreateResponse
-- client.users.loadBalancers.pools.list({ ...params }) -> PoolListResponse | null
-- client.users.loadBalancers.pools.delete(poolId) -> PoolDeleteResponse
-- client.users.loadBalancers.pools.edit(poolId, { ...params }) -> PoolEditResponse
-- client.users.loadBalancers.pools.get(poolId) -> PoolGetResponse
-
-#### Health
-
-Types:
-
-- HealthListResponse
+- PoolCreateResponse
+- PoolListResponse
+- PoolDeleteResponse
+- PoolEditResponse
+- PoolGetResponse
+- PoolHealthResponse
+- PoolPreviewResponse
+- PoolReferencesResponse
Methods:
-- client.users.loadBalancers.pools.health.list(poolId) -> HealthListResponse
+- client.user.loadBalancers.pools.create({ ...params }) -> PoolCreateResponse
+- client.user.loadBalancers.pools.list({ ...params }) -> PoolListResponse | null
+- client.user.loadBalancers.pools.delete(poolId) -> PoolDeleteResponse
+- client.user.loadBalancers.pools.edit(poolId, { ...params }) -> PoolEditResponse
+- client.user.loadBalancers.pools.get(poolId) -> PoolGetResponse
+- client.user.loadBalancers.pools.health(poolId) -> PoolHealthResponse
+- client.user.loadBalancers.pools.preview(poolId, { ...params }) -> PoolPreviewResponse
+- client.user.loadBalancers.pools.references(poolId) -> PoolReferencesResponse | null
-#### Previews
+### Preview
Types:
-- PreviewCreateResponse
+- PreviewGetResponse
Methods:
-- client.users.loadBalancers.pools.previews.create(poolId, { ...params }) -> PreviewCreateResponse
-
-#### References
-
-Types:
-
-- ReferenceListResponse
-
-Methods:
-
-- client.users.loadBalancers.pools.references.list(poolId) -> ReferenceListResponse | null
-
-### Previews
-
-Types:
-
-- PreviewGetResponse
-
-Methods:
-
-- client.users.loadBalancers.previews.get(previewId) -> PreviewGetResponse
+- client.user.loadBalancers.preview.get(previewId) -> PreviewGetResponse
## LoadBalancingAnalytics
@@ -236,79 +196,79 @@ Methods:
Types:
-- EventListResponse
+- EventListResponse
Methods:
-- client.users.loadBalancingAnalytics.events.list({ ...params }) -> EventListResponse | null
+- client.user.loadBalancingAnalytics.events.list({ ...params }) -> EventListResponse | null
## Organizations
Types:
-- OrganizationListResponse
-- OrganizationDeleteResponse
-- OrganizationGetResponse
+- OrganizationListResponse
+- OrganizationDeleteResponse
+- OrganizationGetResponse
Methods:
-- client.users.organizations.list({ ...params }) -> OrganizationListResponsesV4PagePaginationArray
-- client.users.organizations.delete(organizationId) -> OrganizationDeleteResponse
-- client.users.organizations.get(organizationId) -> OrganizationGetResponse
+- client.user.organizations.list({ ...params }) -> OrganizationListResponsesV4PagePaginationArray
+- client.user.organizations.delete(organizationId) -> OrganizationDeleteResponse
+- client.user.organizations.get(organizationId) -> OrganizationGetResponse
## Subscriptions
Types:
-- SubscriptionUpdateResponse
-- SubscriptionListResponse
-- SubscriptionDeleteResponse
+- SubscriptionUpdateResponse
+- SubscriptionListResponse
+- SubscriptionDeleteResponse
Methods:
-- client.users.subscriptions.update(identifier, { ...params }) -> SubscriptionUpdateResponse
-- client.users.subscriptions.list() -> SubscriptionListResponse | null
-- client.users.subscriptions.delete(identifier) -> SubscriptionDeleteResponse
+- client.user.subscriptions.update(identifier, { ...params }) -> SubscriptionUpdateResponse
+- client.user.subscriptions.list() -> SubscriptionListResponse | null
+- client.user.subscriptions.delete(identifier) -> SubscriptionDeleteResponse
## Tokens
Types:
-- TokenCreateResponse
-- TokenUpdateResponse
-- TokenListResponse
-- TokenDeleteResponse
-- TokenGetResponse
-- TokenVerifyResponse
+- TokenCreateResponse
+- TokenUpdateResponse
+- TokenListResponse
+- TokenDeleteResponse
+- TokenGetResponse
+- TokenVerifyResponse
Methods:
-- client.users.tokens.create({ ...params }) -> TokenCreateResponse
-- client.users.tokens.update(tokenId, { ...params }) -> TokenUpdateResponse
-- client.users.tokens.list({ ...params }) -> TokenListResponsesV4PagePaginationArray
-- client.users.tokens.delete(tokenId) -> TokenDeleteResponse | null
-- client.users.tokens.get(tokenId) -> TokenGetResponse
-- client.users.tokens.verify() -> TokenVerifyResponse
+- client.user.tokens.create({ ...params }) -> TokenCreateResponse
+- client.user.tokens.update(tokenId, { ...params }) -> TokenUpdateResponse
+- client.user.tokens.list({ ...params }) -> TokenListResponsesV4PagePaginationArray
+- client.user.tokens.delete(tokenId) -> TokenDeleteResponse | null
+- client.user.tokens.get(tokenId) -> TokenGetResponse
+- client.user.tokens.verify() -> TokenVerifyResponse
### PermissionGroups
Types:
-- PermissionGroupListResponse
+- PermissionGroupListResponse
Methods:
-- client.users.tokens.permissionGroups.list() -> PermissionGroupListResponse | null
+- client.user.tokens.permissionGroups.list() -> PermissionGroupListResponse | null
### Values
Types:
-- ValueUpdateResponse
+- ValueUpdateResponse
Methods:
-- client.users.tokens.values.update(tokenId, { ...params }) -> ValueUpdateResponse
+- client.user.tokens.values.update(tokenId, { ...params }) -> ValueUpdateResponse
# Zones
@@ -346,11 +306,11 @@ Methods:
Types:
-- AICreateResponse
+- AIRunResponse
Methods:
-- client.ai.create(accountId, modelName, { ...params }) -> AICreateResponse
+- client.ai.run(accountId, modelName, { ...params }) -> AIRunResponse
# LoadBalancers
@@ -1140,29 +1100,71 @@ Methods:
- client.customNameservers.availabilty(accountId) -> CustomNameserverAvailabiltyResponse | null
- client.customNameservers.verify(accountId) -> CustomNameserverVerifyResponse | null
-# DNSRecords
+# DNS
+
+## Records
Types:
-- DNSRecordCreateResponse
-- DNSRecordUpdateResponse
-- DNSRecordListResponse
-- DNSRecordDeleteResponse
-- DNSRecordExportResponse
-- DNSRecordGetResponse
-- DNSRecordImportResponse
-- DNSRecordScanResponse
+- RecordCreateResponse
+- RecordUpdateResponse
+- RecordListResponse
+- RecordDeleteResponse
+- RecordExportResponse
+- RecordGetResponse
+- RecordImportResponse
+- RecordScanResponse
Methods:
-- client.dnsRecords.create(zoneId, { ...params }) -> DNSRecordCreateResponse
-- client.dnsRecords.update(zoneId, dnsRecordId, { ...params }) -> DNSRecordUpdateResponse
-- client.dnsRecords.list(zoneId, { ...params }) -> DNSRecordListResponsesV4PagePaginationArray
-- client.dnsRecords.delete(zoneId, dnsRecordId) -> DNSRecordDeleteResponse
-- client.dnsRecords.export(zoneId) -> string
-- client.dnsRecords.get(zoneId, dnsRecordId) -> DNSRecordGetResponse
-- client.dnsRecords.import(zoneId, { ...params }) -> DNSRecordImportResponse
-- client.dnsRecords.scan(zoneId) -> DNSRecordScanResponse
+- client.dns.records.create(zoneId, { ...params }) -> RecordCreateResponse
+- client.dns.records.update(zoneId, dnsRecordId, { ...params }) -> RecordUpdateResponse
+- client.dns.records.list(zoneId, { ...params }) -> RecordListResponsesV4PagePaginationArray
+- client.dns.records.delete(zoneId, dnsRecordId) -> RecordDeleteResponse
+- client.dns.records.export(zoneId) -> string
+- client.dns.records.get(zoneId, dnsRecordId) -> RecordGetResponse
+- client.dns.records.import(zoneId, { ...params }) -> RecordImportResponse
+- client.dns.records.scan(zoneId) -> RecordScanResponse
+
+## Firewall
+
+Types:
+
+- FirewallCreateResponse
+- FirewallListResponse
+- FirewallDeleteResponse
+- FirewallEditResponse
+- FirewallGetResponse
+
+Methods:
+
+- client.dns.firewall.create(accountId, { ...params }) -> FirewallCreateResponse
+- client.dns.firewall.list(accountId, { ...params }) -> FirewallListResponsesV4PagePaginationArray
+- client.dns.firewall.delete(accountId, dnsFirewallId) -> FirewallDeleteResponse
+- client.dns.firewall.edit(accountId, dnsFirewallId, { ...params }) -> FirewallEditResponse
+- client.dns.firewall.get(accountId, dnsFirewallId) -> FirewallGetResponse
+
+### Analytics
+
+#### Reports
+
+Types:
+
+- ReportListResponse
+
+Methods:
+
+- client.dns.firewall.analytics.reports.list(accountIdentifier, identifier, { ...params }) -> ReportListResponse
+
+##### Bytimes
+
+Types:
+
+- BytimeListResponse
+
+Methods:
+
+- client.dns.firewall.analytics.reports.bytimes.list(accountIdentifier, identifier, { ...params }) -> BytimeListResponse
# DNSSEC
@@ -3182,17 +3184,17 @@ Methods:
- client.auditLogs.list(accountIdentifier, { ...params }) -> AuditLogListResponsesV4PagePaginationArray
-# Billings
+# Billing
## Profiles
Types:
-- ProfileGetResponse
+- ProfileGetResponse
Methods:
-- client.billings.profiles.get(accountIdentifier) -> ProfileGetResponse
+- client.billing.profiles.get(accountIdentifier) -> ProfileGetResponse
# BrandProtection
@@ -3393,46 +3395,6 @@ Methods:
- client.dlp.profiles.predefineds.update(accountId, profileId, { ...params }) -> PredefinedUpdateResponse
- client.dlp.profiles.predefineds.get(accountId, profileId) -> PredefinedGetResponse
-# DNSFirewall
-
-Types:
-
-- DNSFirewallCreateResponse
-- DNSFirewallListResponse
-- DNSFirewallDeleteResponse
-- DNSFirewallEditResponse
-- DNSFirewallGetResponse
-
-Methods:
-
-- client.dnsFirewall.create(accountId, { ...params }) -> DNSFirewallCreateResponse
-- client.dnsFirewall.list(accountId, { ...params }) -> DNSFirewallListResponsesV4PagePaginationArray
-- client.dnsFirewall.delete(accountId, dnsFirewallId) -> DNSFirewallDeleteResponse
-- client.dnsFirewall.edit(accountId, dnsFirewallId, { ...params }) -> DNSFirewallEditResponse
-- client.dnsFirewall.get(accountId, dnsFirewallId) -> DNSFirewallGetResponse
-
-## DNSAnalytics
-
-### Reports
-
-Types:
-
-- ReportListResponse
-
-Methods:
-
-- client.dnsFirewall.dnsAnalytics.reports.list(accountIdentifier, identifier, { ...params }) -> ReportListResponse
-
-#### Bytimes
-
-Types:
-
-- BytimeListResponse
-
-Methods:
-
-- client.dnsFirewall.dnsAnalytics.reports.bytimes.list(accountIdentifier, identifier, { ...params }) -> BytimeListResponse
-
# Images
## V1s
@@ -3975,6 +3937,7 @@ Methods:
Types:
+- IT1w6UlbTrace
- TraceCreateResponse
Methods:
@@ -4610,8 +4573,8 @@ Types:
Methods:
-- client.devices.devicesListDevices(identifier) -> DeviceDevicesListDevicesResponse | null
-- client.devices.get(identifier, uuid) -> DeviceGetResponse | null
+- client.devices.devicesListDevices(accountId) -> DeviceDevicesListDevicesResponse | null
+- client.devices.get(accountId, deviceId) -> DeviceGetResponse | null
## DEXTests
@@ -4625,11 +4588,11 @@ Types:
Methods:
-- client.devices.dexTests.create(identifier, { ...params }) -> DEXTestCreateResponse | null
-- client.devices.dexTests.update(identifier, uuid, { ...params }) -> DEXTestUpdateResponse | null
-- client.devices.dexTests.list(identifier) -> DEXTestListResponse | null
-- client.devices.dexTests.delete(identifier, uuid) -> DEXTestDeleteResponse | null
-- client.devices.dexTests.get(identifier, uuid) -> DEXTestGetResponse | null
+- client.devices.dexTests.create(accountId, { ...params }) -> DEXTestCreateResponse | null
+- client.devices.dexTests.update(accountId, dexTestId, { ...params }) -> DEXTestUpdateResponse | null
+- client.devices.dexTests.list(accountId) -> DEXTestListResponse | null
+- client.devices.dexTests.delete(accountId, dexTestId) -> DEXTestDeleteResponse | null
+- client.devices.dexTests.get(accountId, dexTestId) -> DEXTestGetResponse | null
## Networks
@@ -4643,11 +4606,11 @@ Types:
Methods:
-- client.devices.networks.create(identifier, { ...params }) -> NetworkCreateResponse | null
-- client.devices.networks.update(identifier, uuid, { ...params }) -> NetworkUpdateResponse | null
-- client.devices.networks.list(identifier) -> NetworkListResponse | null
-- client.devices.networks.delete(identifier, uuid) -> NetworkDeleteResponse | null
-- client.devices.networks.get(identifier, uuid) -> NetworkGetResponse | null
+- client.devices.networks.create(accountId, { ...params }) -> NetworkCreateResponse | null
+- client.devices.networks.update(accountId, networkId, { ...params }) -> NetworkUpdateResponse | null
+- client.devices.networks.list(accountId) -> NetworkListResponse | null
+- client.devices.networks.delete(accountId, networkId) -> NetworkDeleteResponse | null
+- client.devices.networks.get(accountId, networkId) -> NetworkGetResponse | null
## Policies
@@ -4661,11 +4624,11 @@ Types:
Methods:
-- client.devices.policies.create(identifier, { ...params }) -> PolicyCreateResponse | null
-- client.devices.policies.list(identifier) -> PolicyListResponse | null
-- client.devices.policies.delete(identifier, uuid) -> PolicyDeleteResponse | null
-- client.devices.policies.edit(identifier, uuid, { ...params }) -> PolicyEditResponse | null
-- client.devices.policies.get(identifier, uuid) -> PolicyGetResponse | null
+- client.devices.policies.create(accountId, { ...params }) -> PolicyCreateResponse | null
+- client.devices.policies.list(accountId) -> PolicyListResponse | null
+- client.devices.policies.delete(accountId, policyId) -> PolicyDeleteResponse | null
+- client.devices.policies.edit(accountId, policyId, { ...params }) -> PolicyEditResponse | null
+- client.devices.policies.get(accountId, policyId) -> PolicyGetResponse | null
### DefaultPolicy
@@ -4675,7 +4638,7 @@ Types:
Methods:
-- client.devices.policies.defaultPolicy.get(identifier) -> DefaultPolicyGetResponse | null
+- client.devices.policies.defaultPolicy.get(accountId) -> DefaultPolicyGetResponse | null
### Excludes
@@ -4686,8 +4649,8 @@ Types:
Methods:
-- client.devices.policies.excludes.update(identifier, [ ...body ]) -> ExcludeUpdateResponse | null
-- client.devices.policies.excludes.list(identifier) -> ExcludeListResponse | null
+- client.devices.policies.excludes.update(accountId, [ ...body ]) -> ExcludeUpdateResponse | null
+- client.devices.policies.excludes.list(accountId) -> ExcludeListResponse | null
### FallbackDomains
@@ -4698,8 +4661,8 @@ Types:
Methods:
-- client.devices.policies.fallbackDomains.update(identifier, uuid, [ ...body ]) -> FallbackDomainUpdateResponse | null
-- client.devices.policies.fallbackDomains.list(identifier, uuid) -> FallbackDomainListResponse | null
+- client.devices.policies.fallbackDomains.update(accountId, policyId, [ ...body ]) -> FallbackDomainUpdateResponse | null
+- client.devices.policies.fallbackDomains.list(accountId, policyId) -> FallbackDomainListResponse | null
### Includes
@@ -4710,8 +4673,8 @@ Types:
Methods:
-- client.devices.policies.includes.update(identifier, [ ...body ]) -> IncludeUpdateResponse | null
-- client.devices.policies.includes.list(identifier) -> IncludeListResponse | null
+- client.devices.policies.includes.update(accountId, [ ...body ]) -> IncludeUpdateResponse | null
+- client.devices.policies.includes.list(accountId) -> IncludeListResponse | null
## Postures
@@ -4725,11 +4688,11 @@ Types:
Methods:
-- client.devices.postures.create(identifier, { ...params }) -> PostureCreateResponse | null
-- client.devices.postures.update(identifier, uuid, { ...params }) -> PostureUpdateResponse | null
-- client.devices.postures.list(identifier) -> PostureListResponse | null
-- client.devices.postures.delete(identifier, uuid) -> PostureDeleteResponse | null
-- client.devices.postures.get(identifier, uuid) -> PostureGetResponse | null
+- client.devices.postures.create(accountId, { ...params }) -> PostureCreateResponse | null
+- client.devices.postures.update(accountId, ruleId, { ...params }) -> PostureUpdateResponse | null
+- client.devices.postures.list(accountId) -> PostureListResponse | null
+- client.devices.postures.delete(accountId, ruleId) -> PostureDeleteResponse | null
+- client.devices.postures.get(accountId, ruleId) -> PostureGetResponse | null
### Integrations
@@ -4742,10 +4705,10 @@ Types:
Methods:
-- client.devices.postures.integrations.create(identifier, { ...params }) -> IntegrationCreateResponse | null
-- client.devices.postures.integrations.delete(identifier, uuid) -> IntegrationDeleteResponse | null
-- client.devices.postures.integrations.edit(identifier, uuid, { ...params }) -> IntegrationEditResponse | null
-- client.devices.postures.integrations.get(identifier, uuid) -> IntegrationGetResponse | null
+- client.devices.postures.integrations.create(accountId, { ...params }) -> IntegrationCreateResponse | null
+- client.devices.postures.integrations.delete(accountId, integrationId) -> IntegrationDeleteResponse | null
+- client.devices.postures.integrations.edit(accountId, integrationId, { ...params }) -> IntegrationEditResponse | null
+- client.devices.postures.integrations.get(accountId, integrationId) -> IntegrationGetResponse | null
## Revokes
@@ -4755,7 +4718,7 @@ Types:
Methods:
-- client.devices.revokes.create(identifier, [ ...body ]) -> RevokeCreateResponse | null
+- client.devices.revokes.create(accountId, [ ...body ]) -> RevokeCreateResponse | null
## Settings
@@ -4766,8 +4729,8 @@ Types:
Methods:
-- client.devices.settings.update(identifier, { ...params }) -> SettingUpdateResponse | null
-- client.devices.settings.list(identifier) -> SettingListResponse | null
+- client.devices.settings.update(accountId, { ...params }) -> SettingUpdateResponse | null
+- client.devices.settings.list(accountId) -> SettingListResponse | null
## Unrevokes
@@ -4777,7 +4740,7 @@ Types:
Methods:
-- client.devices.unrevokes.create(identifier, [ ...body ]) -> UnrevokeCreateResponse | null
+- client.devices.unrevokes.create(accountId, [ ...body ]) -> UnrevokeCreateResponse | null
## OverrideCodes
@@ -4787,7 +4750,7 @@ Types:
Methods:
-- client.devices.overrideCodes.list(identifier, uuid) -> OverrideCodeListResponse | null
+- client.devices.overrideCodes.list(accountId, deviceId) -> OverrideCodeListResponse | null
# D1
@@ -5166,6 +5129,7 @@ Types:
- ConfigUpdateResponse
- ConfigListResponse
- ConfigDeleteResponse
+- ConfigEditResponse
- ConfigGetResponse
Methods:
@@ -5174,6 +5138,7 @@ Methods:
- client.hyperdrive.configs.update(accountId, hyperdriveId, { ...params }) -> ConfigUpdateResponse | null
- client.hyperdrive.configs.list(accountId) -> ConfigListResponse
- client.hyperdrive.configs.delete(accountId, hyperdriveId) -> ConfigDeleteResponse | null
+- client.hyperdrive.configs.edit(accountId, hyperdriveId, { ...params }) -> ConfigEditResponse | null
- client.hyperdrive.configs.get(accountId, hyperdriveId) -> ConfigGetResponse | null
# RUM
diff --git a/src/index.ts b/src/index.ts
index 36c0cfed10..b44f3b2b54 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -167,7 +167,7 @@ export class Cloudflare extends Core.APIClient {
certificates: API.Certificates = new API.Certificates(this);
ips: API.IPs = new API.IPs(this);
memberships: API.Memberships = new API.Memberships(this);
- users: API.Users = new API.Users(this);
+ user: API.User = new API.User(this);
zones: API.Zones = new API.Zones(this);
ai: API.AI = new API.AI(this);
loadBalancers: API.LoadBalancers = new API.LoadBalancers(this);
@@ -185,7 +185,7 @@ export class Cloudflare extends Core.APIClient {
customCertificates: API.CustomCertificates = new API.CustomCertificates(this);
customHostnames: API.CustomHostnames = new API.CustomHostnames(this);
customNameservers: API.CustomNameservers = new API.CustomNameservers(this);
- dnsRecords: API.DNSRecords = new API.DNSRecords(this);
+ dns: API.DNS = new API.DNS(this);
dnssec: API.DNSSEC = new API.DNSSEC(this);
emails: API.Emails = new API.Emails(this);
filters: API.Filters = new API.Filters(this);
@@ -210,12 +210,11 @@ export class Cloudflare extends Core.APIClient {
spectrum: API.Spectrum = new API.Spectrum(this);
addresses: API.Addresses = new API.Addresses(this);
auditLogs: API.AuditLogs = new API.AuditLogs(this);
- billings: API.Billings = new API.Billings(this);
+ billing: API.Billing = new API.Billing(this);
brandProtection: API.BrandProtection = new API.BrandProtection(this);
tunnels: API.Tunnels = new API.Tunnels(this);
diagnostics: API.Diagnostics = new API.Diagnostics(this);
dlp: API.DLP = new API.DLP(this);
- dnsFirewall: API.DNSFirewall = new API.DNSFirewall(this);
images: API.Images = new API.Images(this);
intel: API.Intel = new API.Intel(this);
magics: API.Magics = new API.Magics(this);
@@ -380,7 +379,7 @@ export namespace Cloudflare {
export import MembershipUpdateParams = API.MembershipUpdateParams;
export import MembershipListParams = API.MembershipListParams;
- export import Users = API.Users;
+ export import User = API.User;
export import UserListResponse = API.UserListResponse;
export import UserEditResponse = API.UserEditResponse;
export import UserEditParams = API.UserEditParams;
@@ -397,8 +396,8 @@ export namespace Cloudflare {
export import ZoneEditParams = API.ZoneEditParams;
export import AI = API.AI;
- export import AICreateResponse = API.AICreateResponse;
- export import AICreateParams = API.AICreateParams;
+ export import AIRunResponse = API.AIRunResponse;
+ export import AIRunParams = API.AIRunParams;
export import LoadBalancers = API.LoadBalancers;
export import LoadBalancerCreateResponse = API.LoadBalancerCreateResponse;
@@ -481,20 +480,7 @@ export namespace Cloudflare {
export import CustomNameserverVerifyResponse = API.CustomNameserverVerifyResponse;
export import CustomNameserverCreateParams = API.CustomNameserverCreateParams;
- export import DNSRecords = API.DNSRecords;
- export import DNSRecordCreateResponse = API.DNSRecordCreateResponse;
- export import DNSRecordUpdateResponse = API.DNSRecordUpdateResponse;
- export import DNSRecordListResponse = API.DNSRecordListResponse;
- export import DNSRecordDeleteResponse = API.DNSRecordDeleteResponse;
- export import DNSRecordExportResponse = API.DNSRecordExportResponse;
- export import DNSRecordGetResponse = API.DNSRecordGetResponse;
- export import DNSRecordImportResponse = API.DNSRecordImportResponse;
- export import DNSRecordScanResponse = API.DNSRecordScanResponse;
- export import DNSRecordListResponsesV4PagePaginationArray = API.DNSRecordListResponsesV4PagePaginationArray;
- export import DNSRecordCreateParams = API.DNSRecordCreateParams;
- export import DNSRecordUpdateParams = API.DNSRecordUpdateParams;
- export import DNSRecordListParams = API.DNSRecordListParams;
- export import DNSRecordImportParams = API.DNSRecordImportParams;
+ export import DNS = API.DNS;
export import DNSSEC = API.DNSSEC;
export import DNSSECDeleteResponse = API.DNSSECDeleteResponse;
@@ -627,7 +613,7 @@ export namespace Cloudflare {
export import AuditLogListResponsesV4PagePaginationArray = API.AuditLogListResponsesV4PagePaginationArray;
export import AuditLogListParams = API.AuditLogListParams;
- export import Billings = API.Billings;
+ export import Billing = API.Billing;
export import BrandProtection = API.BrandProtection;
@@ -647,17 +633,6 @@ export namespace Cloudflare {
export import DLP = API.DLP;
- export import DNSFirewall = API.DNSFirewall;
- export import DNSFirewallCreateResponse = API.DNSFirewallCreateResponse;
- export import DNSFirewallListResponse = API.DNSFirewallListResponse;
- export import DNSFirewallDeleteResponse = API.DNSFirewallDeleteResponse;
- export import DNSFirewallEditResponse = API.DNSFirewallEditResponse;
- export import DNSFirewallGetResponse = API.DNSFirewallGetResponse;
- export import DNSFirewallListResponsesV4PagePaginationArray = API.DNSFirewallListResponsesV4PagePaginationArray;
- export import DNSFirewallCreateParams = API.DNSFirewallCreateParams;
- export import DNSFirewallListParams = API.DNSFirewallListParams;
- export import DNSFirewallEditParams = API.DNSFirewallEditParams;
-
export import Images = API.Images;
export import Intel = API.Intel;
diff --git a/src/pagination.ts b/src/pagination.ts
index d09459c926..dfe446319f 100644
--- a/src/pagination.ts
+++ b/src/pagination.ts
@@ -3,13 +3,13 @@
import { AbstractPage, Response, APIClient, FinalRequestOptions, PageInfo } from './core';
export interface V4PagePaginationResponse- {
- result: V4PagePaginationResponse.Result;
+ result: V4PagePaginationResponse.Result
- ;
result_info: V4PagePaginationResponse.ResultInfo;
}
export namespace V4PagePaginationResponse {
- export interface Result {
+ export interface Result
- {
items?: Array
- ;
}
@@ -27,7 +27,7 @@ export interface V4PagePaginationParams {
}
export class V4PagePagination
- extends AbstractPage
- implements V4PagePaginationResponse
- {
- result: V4PagePaginationResponse.Result;
+ result: V4PagePaginationResponse.Result
- ;
result_info: V4PagePaginationResponse.ResultInfo;
diff --git a/src/resources/ai.ts b/src/resources/ai.ts
index 2d96c31165..14bf81e430 100644
--- a/src/resources/ai.ts
+++ b/src/resources/ai.ts
@@ -13,26 +13,26 @@ export class AI extends APIResource {
* or results generated by the chosen AI model. The endpoint supports various AI
* model types, ensuring flexibility and adaptability for diverse use cases.
*/
- create(
+ run(
accountId: string,
modelName: string,
- body: AICreateParams,
+ body: AIRunParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.post(`/accounts/${accountId}/ai/run/${modelName}`, {
body,
...options,
- }) as Core.APIPromise<{ result: AICreateResponse }>
+ }) as Core.APIPromise<{ result: AIRunResponse }>
)._thenUnwrap((obj) => obj.result);
}
}
-export type AICreateResponse = unknown;
+export type AIRunResponse = unknown;
-export type AICreateParams = unknown;
+export type AIRunParams = unknown;
export namespace AI {
- export import AICreateResponse = AIAPI.AICreateResponse;
- export import AICreateParams = AIAPI.AICreateParams;
+ export import AIRunResponse = AIAPI.AIRunResponse;
+ export import AIRunParams = AIAPI.AIRunParams;
}
diff --git a/src/resources/billings/billings.ts b/src/resources/billing/billing.ts
similarity index 68%
rename from src/resources/billings/billings.ts
rename to src/resources/billing/billing.ts
index ad224c0cf2..9f14a7657d 100644
--- a/src/resources/billings/billings.ts
+++ b/src/resources/billing/billing.ts
@@ -1,13 +1,13 @@
// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
-import * as ProfilesAPI from 'cloudflare/resources/billings/profiles';
+import * as ProfilesAPI from 'cloudflare/resources/billing/profiles';
-export class Billings extends APIResource {
+export class Billing extends APIResource {
profiles: ProfilesAPI.Profiles = new ProfilesAPI.Profiles(this._client);
}
-export namespace Billings {
+export namespace Billing {
export import Profiles = ProfilesAPI.Profiles;
export import ProfileGetResponse = ProfilesAPI.ProfileGetResponse;
}
diff --git a/src/resources/billings/index.ts b/src/resources/billing/index.ts
similarity index 74%
rename from src/resources/billings/index.ts
rename to src/resources/billing/index.ts
index c11be8c2ec..cd46c35df7 100644
--- a/src/resources/billings/index.ts
+++ b/src/resources/billing/index.ts
@@ -1,4 +1,4 @@
// File generated from our OpenAPI spec by Stainless.
-export { Billings } from './billings';
+export { Billing } from './billing';
export { ProfileGetResponse, Profiles } from './profiles';
diff --git a/src/resources/billings/profiles.ts b/src/resources/billing/profiles.ts
similarity index 91%
rename from src/resources/billings/profiles.ts
rename to src/resources/billing/profiles.ts
index 6d093985dd..36419bcf9b 100644
--- a/src/resources/billings/profiles.ts
+++ b/src/resources/billing/profiles.ts
@@ -2,7 +2,7 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
-import * as ProfilesAPI from 'cloudflare/resources/billings/profiles';
+import * as ProfilesAPI from 'cloudflare/resources/billing/profiles';
export class Profiles extends APIResource {
/**
diff --git a/src/resources/devices/devices.ts b/src/resources/devices/devices.ts
index 4eff880a6b..b22b07c093 100644
--- a/src/resources/devices/devices.ts
+++ b/src/resources/devices/devices.ts
@@ -26,11 +26,11 @@ export class Devices extends APIResource {
* Fetches a list of enrolled devices.
*/
devicesListDevices(
- identifier: unknown,
+ accountId: unknown,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.get(`/accounts/${identifier}/devices`, options) as Core.APIPromise<{
+ this._client.get(`/accounts/${accountId}/devices`, options) as Core.APIPromise<{
result: DeviceDevicesListDevicesResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
@@ -40,12 +40,12 @@ export class Devices extends APIResource {
* Fetches details for a single device.
*/
get(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ deviceId: string,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.get(`/accounts/${identifier}/devices/${uuid}`, options) as Core.APIPromise<{
+ this._client.get(`/accounts/${accountId}/devices/${deviceId}`, options) as Core.APIPromise<{
result: DeviceGetResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
diff --git a/src/resources/devices/dex-tests.ts b/src/resources/devices/dex-tests.ts
index 42fdc2f3db..c7e3b3ed96 100644
--- a/src/resources/devices/dex-tests.ts
+++ b/src/resources/devices/dex-tests.ts
@@ -9,15 +9,14 @@ export class DEXTests extends APIResource {
* Create a DEX test.
*/
create(
- identifier: unknown,
+ accountId: unknown,
body: DEXTestCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.post(`/accounts/${identifier}/devices/dex_tests`, {
- body,
- ...options,
- }) as Core.APIPromise<{ result: DEXTestCreateResponse | null }>
+ this._client.post(`/accounts/${accountId}/devices/dex_tests`, { body, ...options }) as Core.APIPromise<{
+ result: DEXTestCreateResponse | null;
+ }>
)._thenUnwrap((obj) => obj.result);
}
@@ -25,13 +24,13 @@ export class DEXTests extends APIResource {
* Update a DEX test.
*/
update(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ dexTestId: string,
body: DEXTestUpdateParams,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.put(`/accounts/${identifier}/devices/dex_tests/${uuid}`, {
+ this._client.put(`/accounts/${accountId}/devices/dex_tests/${dexTestId}`, {
body,
...options,
}) as Core.APIPromise<{ result: DEXTestUpdateResponse | null }>
@@ -41,9 +40,9 @@ export class DEXTests extends APIResource {
/**
* Fetch all DEX tests.
*/
- list(identifier: unknown, options?: Core.RequestOptions): Core.APIPromise {
+ list(accountId: unknown, options?: Core.RequestOptions): Core.APIPromise {
return (
- this._client.get(`/accounts/${identifier}/devices/dex_tests`, options) as Core.APIPromise<{
+ this._client.get(`/accounts/${accountId}/devices/dex_tests`, options) as Core.APIPromise<{
result: DEXTestListResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
@@ -54,14 +53,15 @@ export class DEXTests extends APIResource {
* account.
*/
delete(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ dexTestId: string,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.delete(`/accounts/${identifier}/devices/dex_tests/${uuid}`, options) as Core.APIPromise<{
- result: DEXTestDeleteResponse | null;
- }>
+ this._client.delete(
+ `/accounts/${accountId}/devices/dex_tests/${dexTestId}`,
+ options,
+ ) as Core.APIPromise<{ result: DEXTestDeleteResponse | null }>
)._thenUnwrap((obj) => obj.result);
}
@@ -69,12 +69,12 @@ export class DEXTests extends APIResource {
* Fetch a single DEX test.
*/
get(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ dexTestId: string,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.get(`/accounts/${identifier}/devices/dex_tests/${uuid}`, options) as Core.APIPromise<{
+ this._client.get(`/accounts/${accountId}/devices/dex_tests/${dexTestId}`, options) as Core.APIPromise<{
result: DEXTestGetResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
diff --git a/src/resources/devices/networks.ts b/src/resources/devices/networks.ts
index cf96406d03..beb62829c9 100644
--- a/src/resources/devices/networks.ts
+++ b/src/resources/devices/networks.ts
@@ -9,12 +9,12 @@ export class Networks extends APIResource {
* Creates a new device managed network.
*/
create(
- identifier: unknown,
+ accountId: unknown,
body: NetworkCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.post(`/accounts/${identifier}/devices/networks`, { body, ...options }) as Core.APIPromise<{
+ this._client.post(`/accounts/${accountId}/devices/networks`, { body, ...options }) as Core.APIPromise<{
result: NetworkCreateResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
@@ -24,13 +24,13 @@ export class Networks extends APIResource {
* Updates a configured device managed network.
*/
update(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ networkId: string,
body: NetworkUpdateParams,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.put(`/accounts/${identifier}/devices/networks/${uuid}`, {
+ this._client.put(`/accounts/${accountId}/devices/networks/${networkId}`, {
body,
...options,
}) as Core.APIPromise<{ result: NetworkUpdateResponse | null }>
@@ -40,9 +40,9 @@ export class Networks extends APIResource {
/**
* Fetches a list of managed networks for an account.
*/
- list(identifier: unknown, options?: Core.RequestOptions): Core.APIPromise {
+ list(accountId: unknown, options?: Core.RequestOptions): Core.APIPromise {
return (
- this._client.get(`/accounts/${identifier}/devices/networks`, options) as Core.APIPromise<{
+ this._client.get(`/accounts/${accountId}/devices/networks`, options) as Core.APIPromise<{
result: NetworkListResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
@@ -53,14 +53,15 @@ export class Networks extends APIResource {
* managed networks for an account.
*/
delete(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ networkId: string,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.delete(`/accounts/${identifier}/devices/networks/${uuid}`, options) as Core.APIPromise<{
- result: NetworkDeleteResponse | null;
- }>
+ this._client.delete(
+ `/accounts/${accountId}/devices/networks/${networkId}`,
+ options,
+ ) as Core.APIPromise<{ result: NetworkDeleteResponse | null }>
)._thenUnwrap((obj) => obj.result);
}
@@ -68,12 +69,12 @@ export class Networks extends APIResource {
* Fetches details for a single managed network.
*/
get(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ networkId: string,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.get(`/accounts/${identifier}/devices/networks/${uuid}`, options) as Core.APIPromise<{
+ this._client.get(`/accounts/${accountId}/devices/networks/${networkId}`, options) as Core.APIPromise<{
result: NetworkGetResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
diff --git a/src/resources/devices/override-codes.ts b/src/resources/devices/override-codes.ts
index 259d1000a3..8a6f5aec29 100644
--- a/src/resources/devices/override-codes.ts
+++ b/src/resources/devices/override-codes.ts
@@ -10,14 +10,15 @@ export class OverrideCodes extends APIResource {
* **Admin Override** setting being enabled in your device configuration.
*/
list(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ deviceId: string,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.get(`/accounts/${identifier}/devices/${uuid}/override_codes`, options) as Core.APIPromise<{
- result: OverrideCodeListResponse | null;
- }>
+ this._client.get(
+ `/accounts/${accountId}/devices/${deviceId}/override_codes`,
+ options,
+ ) as Core.APIPromise<{ result: OverrideCodeListResponse | null }>
)._thenUnwrap((obj) => obj.result);
}
}
diff --git a/src/resources/devices/policies/default-policy.ts b/src/resources/devices/policies/default-policy.ts
index 365842d48a..dca7847732 100644
--- a/src/resources/devices/policies/default-policy.ts
+++ b/src/resources/devices/policies/default-policy.ts
@@ -8,9 +8,9 @@ export class DefaultPolicy extends APIResource {
/**
* Fetches the default device settings profile for an account.
*/
- get(identifier: unknown, options?: Core.RequestOptions): Core.APIPromise {
+ get(accountId: unknown, options?: Core.RequestOptions): Core.APIPromise {
return (
- this._client.get(`/accounts/${identifier}/devices/policy`, options) as Core.APIPromise<{
+ this._client.get(`/accounts/${accountId}/devices/policy`, options) as Core.APIPromise<{
result: DefaultPolicyGetResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
diff --git a/src/resources/devices/policies/excludes.ts b/src/resources/devices/policies/excludes.ts
index 8972d7fec6..17a02b9d8e 100644
--- a/src/resources/devices/policies/excludes.ts
+++ b/src/resources/devices/policies/excludes.ts
@@ -9,12 +9,12 @@ export class Excludes extends APIResource {
* Sets the list of routes excluded from the WARP client's tunnel.
*/
update(
- identifier: unknown,
+ accountId: unknown,
body: ExcludeUpdateParams,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.put(`/accounts/${identifier}/devices/policy/exclude`, {
+ this._client.put(`/accounts/${accountId}/devices/policy/exclude`, {
body,
...options,
}) as Core.APIPromise<{ result: ExcludeUpdateResponse | null }>
@@ -24,9 +24,9 @@ export class Excludes extends APIResource {
/**
* Fetches the list of routes excluded from the WARP client's tunnel.
*/
- list(identifier: unknown, options?: Core.RequestOptions): Core.APIPromise {
+ list(accountId: unknown, options?: Core.RequestOptions): Core.APIPromise {
return (
- this._client.get(`/accounts/${identifier}/devices/policy/exclude`, options) as Core.APIPromise<{
+ this._client.get(`/accounts/${accountId}/devices/policy/exclude`, options) as Core.APIPromise<{
result: ExcludeListResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
diff --git a/src/resources/devices/policies/fallback-domains.ts b/src/resources/devices/policies/fallback-domains.ts
index bebbca5f06..f4f48a70a6 100644
--- a/src/resources/devices/policies/fallback-domains.ts
+++ b/src/resources/devices/policies/fallback-domains.ts
@@ -11,13 +11,13 @@ export class FallbackDomains extends APIResource {
* specified device settings profile.
*/
update(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ policyId: string,
body: FallbackDomainUpdateParams,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.put(`/accounts/${identifier}/devices/policy/${uuid}/fallback_domains`, {
+ this._client.put(`/accounts/${accountId}/devices/policy/${policyId}/fallback_domains`, {
body,
...options,
}) as Core.APIPromise<{ result: FallbackDomainUpdateResponse | null }>
@@ -30,13 +30,13 @@ export class FallbackDomains extends APIResource {
* instead.
*/
list(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ policyId: string,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
this._client.get(
- `/accounts/${identifier}/devices/policy/${uuid}/fallback_domains`,
+ `/accounts/${accountId}/devices/policy/${policyId}/fallback_domains`,
options,
) as Core.APIPromise<{ result: FallbackDomainListResponse | null }>
)._thenUnwrap((obj) => obj.result);
diff --git a/src/resources/devices/policies/includes.ts b/src/resources/devices/policies/includes.ts
index 3c0f0de2a3..8f79dff97b 100644
--- a/src/resources/devices/policies/includes.ts
+++ b/src/resources/devices/policies/includes.ts
@@ -9,12 +9,12 @@ export class Includes extends APIResource {
* Sets the list of routes included in the WARP client's tunnel.
*/
update(
- identifier: unknown,
+ accountId: unknown,
body: IncludeUpdateParams,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.put(`/accounts/${identifier}/devices/policy/include`, {
+ this._client.put(`/accounts/${accountId}/devices/policy/include`, {
body,
...options,
}) as Core.APIPromise<{ result: IncludeUpdateResponse | null }>
@@ -24,9 +24,9 @@ export class Includes extends APIResource {
/**
* Fetches the list of routes included in the WARP client's tunnel.
*/
- list(identifier: unknown, options?: Core.RequestOptions): Core.APIPromise {
+ list(accountId: unknown, options?: Core.RequestOptions): Core.APIPromise {
return (
- this._client.get(`/accounts/${identifier}/devices/policy/include`, options) as Core.APIPromise<{
+ this._client.get(`/accounts/${accountId}/devices/policy/include`, options) as Core.APIPromise<{
result: IncludeListResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
diff --git a/src/resources/devices/policies/policies.ts b/src/resources/devices/policies/policies.ts
index 2af4ac4316..b46f7f28d9 100644
--- a/src/resources/devices/policies/policies.ts
+++ b/src/resources/devices/policies/policies.ts
@@ -19,12 +19,12 @@ export class Policies extends APIResource {
* criteria.
*/
create(
- identifier: unknown,
+ accountId: unknown,
body: PolicyCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.post(`/accounts/${identifier}/devices/policy`, { body, ...options }) as Core.APIPromise<{
+ this._client.post(`/accounts/${accountId}/devices/policy`, { body, ...options }) as Core.APIPromise<{
result: PolicyCreateResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
@@ -33,9 +33,9 @@ export class Policies extends APIResource {
/**
* Fetches a list of the device settings profiles for an account.
*/
- list(identifier: unknown, options?: Core.RequestOptions): Core.APIPromise {
+ list(accountId: unknown, options?: Core.RequestOptions): Core.APIPromise {
return (
- this._client.get(`/accounts/${identifier}/devices/policies`, options) as Core.APIPromise<{
+ this._client.get(`/accounts/${accountId}/devices/policies`, options) as Core.APIPromise<{
result: PolicyListResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
@@ -46,12 +46,12 @@ export class Policies extends APIResource {
* for an account.
*/
delete(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ policyId: string,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.delete(`/accounts/${identifier}/devices/policy/${uuid}`, options) as Core.APIPromise<{
+ this._client.delete(`/accounts/${accountId}/devices/policy/${policyId}`, options) as Core.APIPromise<{
result: PolicyDeleteResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
@@ -61,13 +61,13 @@ export class Policies extends APIResource {
* Updates a configured device settings profile.
*/
edit(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ policyId: string,
body: PolicyEditParams,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.patch(`/accounts/${identifier}/devices/policy/${uuid}`, {
+ this._client.patch(`/accounts/${accountId}/devices/policy/${policyId}`, {
body,
...options,
}) as Core.APIPromise<{ result: PolicyEditResponse | null }>
@@ -78,12 +78,12 @@ export class Policies extends APIResource {
* Fetches a device settings profile by ID.
*/
get(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ policyId: string,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.get(`/accounts/${identifier}/devices/policy/${uuid}`, options) as Core.APIPromise<{
+ this._client.get(`/accounts/${accountId}/devices/policy/${policyId}`, options) as Core.APIPromise<{
result: PolicyGetResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
diff --git a/src/resources/devices/postures/integrations.ts b/src/resources/devices/postures/integrations.ts
index 40bac4d725..29b4bdd4ad 100644
--- a/src/resources/devices/postures/integrations.ts
+++ b/src/resources/devices/postures/integrations.ts
@@ -9,12 +9,12 @@ export class Integrations extends APIResource {
* Create a new device posture integration.
*/
create(
- identifier: unknown,
+ accountId: unknown,
body: IntegrationCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.post(`/accounts/${identifier}/devices/posture/integration`, {
+ this._client.post(`/accounts/${accountId}/devices/posture/integration`, {
body,
...options,
}) as Core.APIPromise<{ result: IntegrationCreateResponse | null }>
@@ -25,13 +25,13 @@ export class Integrations extends APIResource {
* Delete a configured device posture integration.
*/
delete(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ integrationId: string,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
this._client.delete(
- `/accounts/${identifier}/devices/posture/integration/${uuid}`,
+ `/accounts/${accountId}/devices/posture/integration/${integrationId}`,
options,
) as Core.APIPromise<{ result: IntegrationDeleteResponse | null }>
)._thenUnwrap((obj) => obj.result);
@@ -41,13 +41,13 @@ export class Integrations extends APIResource {
* Updates a configured device posture integration.
*/
edit(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ integrationId: string,
body: IntegrationEditParams,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.patch(`/accounts/${identifier}/devices/posture/integration/${uuid}`, {
+ this._client.patch(`/accounts/${accountId}/devices/posture/integration/${integrationId}`, {
body,
...options,
}) as Core.APIPromise<{ result: IntegrationEditResponse | null }>
@@ -58,13 +58,13 @@ export class Integrations extends APIResource {
* Fetches details for a single device posture integration.
*/
get(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ integrationId: string,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
this._client.get(
- `/accounts/${identifier}/devices/posture/integration/${uuid}`,
+ `/accounts/${accountId}/devices/posture/integration/${integrationId}`,
options,
) as Core.APIPromise<{ result: IntegrationGetResponse | null }>
)._thenUnwrap((obj) => obj.result);
diff --git a/src/resources/devices/postures/postures.ts b/src/resources/devices/postures/postures.ts
index 0ae012402e..ccc8446b0d 100644
--- a/src/resources/devices/postures/postures.ts
+++ b/src/resources/devices/postures/postures.ts
@@ -12,12 +12,12 @@ export class Postures extends APIResource {
* Creates a new device posture rule.
*/
create(
- identifier: unknown,
+ accountId: unknown,
body: PostureCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.post(`/accounts/${identifier}/devices/posture`, { body, ...options }) as Core.APIPromise<{
+ this._client.post(`/accounts/${accountId}/devices/posture`, { body, ...options }) as Core.APIPromise<{
result: PostureCreateResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
@@ -27,13 +27,13 @@ export class Postures extends APIResource {
* Updates a device posture rule.
*/
update(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ ruleId: string,
body: PostureUpdateParams,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.put(`/accounts/${identifier}/devices/posture/${uuid}`, {
+ this._client.put(`/accounts/${accountId}/devices/posture/${ruleId}`, {
body,
...options,
}) as Core.APIPromise<{ result: PostureUpdateResponse | null }>
@@ -43,9 +43,9 @@ export class Postures extends APIResource {
/**
* Fetches device posture rules for a Zero Trust account.
*/
- list(identifier: unknown, options?: Core.RequestOptions): Core.APIPromise {
+ list(accountId: unknown, options?: Core.RequestOptions): Core.APIPromise {
return (
- this._client.get(`/accounts/${identifier}/devices/posture`, options) as Core.APIPromise<{
+ this._client.get(`/accounts/${accountId}/devices/posture`, options) as Core.APIPromise<{
result: PostureListResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
@@ -55,12 +55,12 @@ export class Postures extends APIResource {
* Deletes a device posture rule.
*/
delete(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ ruleId: string,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.delete(`/accounts/${identifier}/devices/posture/${uuid}`, options) as Core.APIPromise<{
+ this._client.delete(`/accounts/${accountId}/devices/posture/${ruleId}`, options) as Core.APIPromise<{
result: PostureDeleteResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
@@ -70,12 +70,12 @@ export class Postures extends APIResource {
* Fetches a single device posture rule.
*/
get(
- identifier: unknown,
- uuid: string,
+ accountId: unknown,
+ ruleId: string,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.get(`/accounts/${identifier}/devices/posture/${uuid}`, options) as Core.APIPromise<{
+ this._client.get(`/accounts/${accountId}/devices/posture/${ruleId}`, options) as Core.APIPromise<{
result: PostureGetResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
@@ -366,6 +366,11 @@ export namespace PostureCreateResponse {
*/
connection_id: string;
+ /**
+ * For more details on last seen, please refer to the Crowdstrike documentation.
+ */
+ last_seen?: string;
+
/**
* Operator
*/
@@ -386,6 +391,11 @@ export namespace PostureCreateResponse {
*/
sensor_config?: string;
+ /**
+ * For more details on state, please refer to the Crowdstrike documentation.
+ */
+ state?: 'online' | 'offline' | 'unknown';
+
/**
* Version
*/
@@ -779,6 +789,11 @@ export namespace PostureUpdateResponse {
*/
connection_id: string;
+ /**
+ * For more details on last seen, please refer to the Crowdstrike documentation.
+ */
+ last_seen?: string;
+
/**
* Operator
*/
@@ -799,6 +814,11 @@ export namespace PostureUpdateResponse {
*/
sensor_config?: string;
+ /**
+ * For more details on state, please refer to the Crowdstrike documentation.
+ */
+ state?: 'online' | 'offline' | 'unknown';
+
/**
* Version
*/
@@ -1195,6 +1215,11 @@ export namespace PostureListResponse {
*/
connection_id: string;
+ /**
+ * For more details on last seen, please refer to the Crowdstrike documentation.
+ */
+ last_seen?: string;
+
/**
* Operator
*/
@@ -1215,6 +1240,11 @@ export namespace PostureListResponse {
*/
sensor_config?: string;
+ /**
+ * For more details on state, please refer to the Crowdstrike documentation.
+ */
+ state?: 'online' | 'offline' | 'unknown';
+
/**
* Version
*/
@@ -1622,6 +1652,11 @@ export namespace PostureGetResponse {
*/
connection_id: string;
+ /**
+ * For more details on last seen, please refer to the Crowdstrike documentation.
+ */
+ last_seen?: string;
+
/**
* Operator
*/
@@ -1642,6 +1677,11 @@ export namespace PostureGetResponse {
*/
sensor_config?: string;
+ /**
+ * For more details on state, please refer to the Crowdstrike documentation.
+ */
+ state?: 'online' | 'offline' | 'unknown';
+
/**
* Version
*/
@@ -2030,6 +2070,11 @@ export namespace PostureCreateParams {
*/
connection_id: string;
+ /**
+ * For more details on last seen, please refer to the Crowdstrike documentation.
+ */
+ last_seen?: string;
+
/**
* Operator
*/
@@ -2050,6 +2095,11 @@ export namespace PostureCreateParams {
*/
sensor_config?: string;
+ /**
+ * For more details on state, please refer to the Crowdstrike documentation.
+ */
+ state?: 'online' | 'offline' | 'unknown';
+
/**
* Version
*/
@@ -2438,6 +2488,11 @@ export namespace PostureUpdateParams {
*/
connection_id: string;
+ /**
+ * For more details on last seen, please refer to the Crowdstrike documentation.
+ */
+ last_seen?: string;
+
/**
* Operator
*/
@@ -2458,6 +2513,11 @@ export namespace PostureUpdateParams {
*/
sensor_config?: string;
+ /**
+ * For more details on state, please refer to the Crowdstrike documentation.
+ */
+ state?: 'online' | 'offline' | 'unknown';
+
/**
* Version
*/
diff --git a/src/resources/devices/revokes.ts b/src/resources/devices/revokes.ts
index 709431d92f..c11c6f51df 100644
--- a/src/resources/devices/revokes.ts
+++ b/src/resources/devices/revokes.ts
@@ -9,12 +9,12 @@ export class Revokes extends APIResource {
* Revokes a list of devices.
*/
create(
- identifier: unknown,
+ accountId: unknown,
body: RevokeCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.post(`/accounts/${identifier}/devices/revoke`, { body, ...options }) as Core.APIPromise<{
+ this._client.post(`/accounts/${accountId}/devices/revoke`, { body, ...options }) as Core.APIPromise<{
result: RevokeCreateResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
diff --git a/src/resources/devices/settings.ts b/src/resources/devices/settings.ts
index 75504e929e..a163a8c1c0 100644
--- a/src/resources/devices/settings.ts
+++ b/src/resources/devices/settings.ts
@@ -9,12 +9,12 @@ export class Settings extends APIResource {
* Updates the current device settings for a Zero Trust account.
*/
update(
- identifier: unknown,
+ accountId: unknown,
body: SettingUpdateParams,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.put(`/accounts/${identifier}/devices/settings`, { body, ...options }) as Core.APIPromise<{
+ this._client.put(`/accounts/${accountId}/devices/settings`, { body, ...options }) as Core.APIPromise<{
result: SettingUpdateResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
@@ -23,9 +23,9 @@ export class Settings extends APIResource {
/**
* Describes the current device settings for a Zero Trust account.
*/
- list(identifier: unknown, options?: Core.RequestOptions): Core.APIPromise {
+ list(accountId: unknown, options?: Core.RequestOptions): Core.APIPromise {
return (
- this._client.get(`/accounts/${identifier}/devices/settings`, options) as Core.APIPromise<{
+ this._client.get(`/accounts/${accountId}/devices/settings`, options) as Core.APIPromise<{
result: SettingListResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
diff --git a/src/resources/devices/unrevokes.ts b/src/resources/devices/unrevokes.ts
index 24c47f1d08..116005aaa7 100644
--- a/src/resources/devices/unrevokes.ts
+++ b/src/resources/devices/unrevokes.ts
@@ -9,12 +9,12 @@ export class Unrevokes extends APIResource {
* Unrevokes a list of devices.
*/
create(
- identifier: unknown,
+ accountId: unknown,
body: UnrevokeCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise {
return (
- this._client.post(`/accounts/${identifier}/devices/unrevoke`, { body, ...options }) as Core.APIPromise<{
+ this._client.post(`/accounts/${accountId}/devices/unrevoke`, { body, ...options }) as Core.APIPromise<{
result: UnrevokeCreateResponse | null;
}>
)._thenUnwrap((obj) => obj.result);
diff --git a/src/resources/dns-firewall/index.ts b/src/resources/dns-firewall/index.ts
deleted file mode 100644
index b30bb1468c..0000000000
--- a/src/resources/dns-firewall/index.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-export { DNSAnalytics } from './dns-analytics/index';
-export {
- DNSFirewallCreateResponse,
- DNSFirewallListResponse,
- DNSFirewallDeleteResponse,
- DNSFirewallEditResponse,
- DNSFirewallGetResponse,
- DNSFirewallCreateParams,
- DNSFirewallListParams,
- DNSFirewallEditParams,
- DNSFirewallListResponsesV4PagePaginationArray,
- DNSFirewall,
-} from './dns-firewall';
diff --git a/src/resources/dns/dns.ts b/src/resources/dns/dns.ts
new file mode 100644
index 0000000000..9fb8c52b68
--- /dev/null
+++ b/src/resources/dns/dns.ts
@@ -0,0 +1,37 @@
+// File generated from our OpenAPI spec by Stainless.
+
+import { APIResource } from 'cloudflare/resource';
+import * as RecordsAPI from 'cloudflare/resources/dns/records';
+import * as FirewallAPI from 'cloudflare/resources/dns/firewall/firewall';
+
+export class DNS extends APIResource {
+ records: RecordsAPI.Records = new RecordsAPI.Records(this._client);
+ firewall: FirewallAPI.Firewall = new FirewallAPI.Firewall(this._client);
+}
+
+export namespace DNS {
+ export import Records = RecordsAPI.Records;
+ export import RecordCreateResponse = RecordsAPI.RecordCreateResponse;
+ export import RecordUpdateResponse = RecordsAPI.RecordUpdateResponse;
+ export import RecordListResponse = RecordsAPI.RecordListResponse;
+ export import RecordDeleteResponse = RecordsAPI.RecordDeleteResponse;
+ export import RecordExportResponse = RecordsAPI.RecordExportResponse;
+ export import RecordGetResponse = RecordsAPI.RecordGetResponse;
+ export import RecordImportResponse = RecordsAPI.RecordImportResponse;
+ export import RecordScanResponse = RecordsAPI.RecordScanResponse;
+ export import RecordListResponsesV4PagePaginationArray = RecordsAPI.RecordListResponsesV4PagePaginationArray;
+ export import RecordCreateParams = RecordsAPI.RecordCreateParams;
+ export import RecordUpdateParams = RecordsAPI.RecordUpdateParams;
+ export import RecordListParams = RecordsAPI.RecordListParams;
+ export import RecordImportParams = RecordsAPI.RecordImportParams;
+ export import Firewall = FirewallAPI.Firewall;
+ export import FirewallCreateResponse = FirewallAPI.FirewallCreateResponse;
+ export import FirewallListResponse = FirewallAPI.FirewallListResponse;
+ export import FirewallDeleteResponse = FirewallAPI.FirewallDeleteResponse;
+ export import FirewallEditResponse = FirewallAPI.FirewallEditResponse;
+ export import FirewallGetResponse = FirewallAPI.FirewallGetResponse;
+ export import FirewallListResponsesV4PagePaginationArray = FirewallAPI.FirewallListResponsesV4PagePaginationArray;
+ export import FirewallCreateParams = FirewallAPI.FirewallCreateParams;
+ export import FirewallListParams = FirewallAPI.FirewallListParams;
+ export import FirewallEditParams = FirewallAPI.FirewallEditParams;
+}
diff --git a/src/resources/dns-firewall/dns-analytics/dns-analytics.ts b/src/resources/dns/firewall/analytics/analytics.ts
similarity index 67%
rename from src/resources/dns-firewall/dns-analytics/dns-analytics.ts
rename to src/resources/dns/firewall/analytics/analytics.ts
index 72b4f521e8..111bdb2981 100644
--- a/src/resources/dns-firewall/dns-analytics/dns-analytics.ts
+++ b/src/resources/dns/firewall/analytics/analytics.ts
@@ -1,13 +1,13 @@
// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
-import * as ReportsAPI from 'cloudflare/resources/dns-firewall/dns-analytics/reports/reports';
+import * as ReportsAPI from 'cloudflare/resources/dns/firewall/analytics/reports/reports';
-export class DNSAnalytics extends APIResource {
+export class Analytics extends APIResource {
reports: ReportsAPI.Reports = new ReportsAPI.Reports(this._client);
}
-export namespace DNSAnalytics {
+export namespace Analytics {
export import Reports = ReportsAPI.Reports;
export import ReportListResponse = ReportsAPI.ReportListResponse;
export import ReportListParams = ReportsAPI.ReportListParams;
diff --git a/src/resources/dns-firewall/dns-analytics/index.ts b/src/resources/dns/firewall/analytics/index.ts
similarity index 73%
rename from src/resources/dns-firewall/dns-analytics/index.ts
rename to src/resources/dns/firewall/analytics/index.ts
index 6b9374aa86..3fc3d7806a 100644
--- a/src/resources/dns-firewall/dns-analytics/index.ts
+++ b/src/resources/dns/firewall/analytics/index.ts
@@ -1,4 +1,4 @@
// File generated from our OpenAPI spec by Stainless.
-export { DNSAnalytics } from './dns-analytics';
+export { Analytics } from './analytics';
export { ReportListResponse, ReportListParams, Reports } from './reports/index';
diff --git a/src/resources/dns-firewall/dns-analytics/reports/bytimes.ts b/src/resources/dns/firewall/analytics/reports/bytimes.ts
similarity index 98%
rename from src/resources/dns-firewall/dns-analytics/reports/bytimes.ts
rename to src/resources/dns/firewall/analytics/reports/bytimes.ts
index aa6ae5e94f..14dec30b37 100644
--- a/src/resources/dns-firewall/dns-analytics/reports/bytimes.ts
+++ b/src/resources/dns/firewall/analytics/reports/bytimes.ts
@@ -3,7 +3,7 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
-import * as BytimesAPI from 'cloudflare/resources/dns-firewall/dns-analytics/reports/bytimes';
+import * as BytimesAPI from 'cloudflare/resources/dns/firewall/analytics/reports/bytimes';
export class Bytimes extends APIResource {
/**
diff --git a/src/resources/dns-firewall/dns-analytics/reports/index.ts b/src/resources/dns/firewall/analytics/reports/index.ts
similarity index 100%
rename from src/resources/dns-firewall/dns-analytics/reports/index.ts
rename to src/resources/dns/firewall/analytics/reports/index.ts
diff --git a/src/resources/dns-firewall/dns-analytics/reports/reports.ts b/src/resources/dns/firewall/analytics/reports/reports.ts
similarity index 95%
rename from src/resources/dns-firewall/dns-analytics/reports/reports.ts
rename to src/resources/dns/firewall/analytics/reports/reports.ts
index 4417f3fda6..fe010dc3e4 100644
--- a/src/resources/dns-firewall/dns-analytics/reports/reports.ts
+++ b/src/resources/dns/firewall/analytics/reports/reports.ts
@@ -3,8 +3,8 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
-import * as ReportsAPI from 'cloudflare/resources/dns-firewall/dns-analytics/reports/reports';
-import * as BytimesAPI from 'cloudflare/resources/dns-firewall/dns-analytics/reports/bytimes';
+import * as ReportsAPI from 'cloudflare/resources/dns/firewall/analytics/reports/reports';
+import * as BytimesAPI from 'cloudflare/resources/dns/firewall/analytics/reports/bytimes';
export class Reports extends APIResource {
bytimes: BytimesAPI.Bytimes = new BytimesAPI.Bytimes(this._client);
diff --git a/src/resources/dns-firewall/dns-firewall.ts b/src/resources/dns/firewall/firewall.ts
similarity index 78%
rename from src/resources/dns-firewall/dns-firewall.ts
rename to src/resources/dns/firewall/firewall.ts
index 4a6e496134..72e4e96645 100644
--- a/src/resources/dns-firewall/dns-firewall.ts
+++ b/src/resources/dns/firewall/firewall.ts
@@ -3,24 +3,24 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
-import * as DNSFirewallAPI from 'cloudflare/resources/dns-firewall/dns-firewall';
-import * as DNSAnalyticsAPI from 'cloudflare/resources/dns-firewall/dns-analytics/dns-analytics';
+import * as FirewallAPI from 'cloudflare/resources/dns/firewall/firewall';
+import * as AnalyticsAPI from 'cloudflare/resources/dns/firewall/analytics/analytics';
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination';
-export class DNSFirewall extends APIResource {
- dnsAnalytics: DNSAnalyticsAPI.DNSAnalytics = new DNSAnalyticsAPI.DNSAnalytics(this._client);
+export class Firewall extends APIResource {
+ analytics: AnalyticsAPI.Analytics = new AnalyticsAPI.Analytics(this._client);
/**
* Create a configured DNS Firewall Cluster.
*/
create(
accountId: string,
- body: DNSFirewallCreateParams,
+ body: FirewallCreateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.post(`/accounts/${accountId}/dns_firewall`, { body, ...options }) as Core.APIPromise<{
- result: DNSFirewallCreateResponse;
+ result: FirewallCreateResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -30,24 +30,24 @@ export class DNSFirewall extends APIResource {
*/
list(
accountId: string,
- query?: DNSFirewallListParams,
+ query?: FirewallListParams,
options?: Core.RequestOptions,
- ): Core.PagePromise;
+ ): Core.PagePromise;
list(
accountId: string,
options?: Core.RequestOptions,
- ): Core.PagePromise;
+ ): Core.PagePromise;
list(
accountId: string,
- query: DNSFirewallListParams | Core.RequestOptions = {},
+ query: FirewallListParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
- ): Core.PagePromise {
+ ): Core.PagePromise {
if (isRequestOptions(query)) {
return this.list(accountId, {}, query);
}
return this._client.getAPIList(
`/accounts/${accountId}/dns_firewall`,
- DNSFirewallListResponsesV4PagePaginationArray,
+ FirewallListResponsesV4PagePaginationArray,
{ query, ...options },
);
}
@@ -59,12 +59,12 @@ export class DNSFirewall extends APIResource {
accountId: string,
dnsFirewallId: string,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.delete(
`/accounts/${accountId}/dns_firewall/${dnsFirewallId}`,
options,
- ) as Core.APIPromise<{ result: DNSFirewallDeleteResponse }>
+ ) as Core.APIPromise<{ result: FirewallDeleteResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -74,14 +74,14 @@ export class DNSFirewall extends APIResource {
edit(
accountId: string,
dnsFirewallId: string,
- body: DNSFirewallEditParams,
+ body: FirewallEditParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.patch(`/accounts/${accountId}/dns_firewall/${dnsFirewallId}`, {
body,
...options,
- }) as Core.APIPromise<{ result: DNSFirewallEditResponse }>
+ }) as Core.APIPromise<{ result: FirewallEditResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -92,18 +92,18 @@ export class DNSFirewall extends APIResource {
accountId: string,
dnsFirewallId: string,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.get(`/accounts/${accountId}/dns_firewall/${dnsFirewallId}`, options) as Core.APIPromise<{
- result: DNSFirewallGetResponse;
+ result: FirewallGetResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
}
-export class DNSFirewallListResponsesV4PagePaginationArray extends V4PagePaginationArray {}
+export class FirewallListResponsesV4PagePaginationArray extends V4PagePaginationArray {}
-export interface DNSFirewallCreateResponse {
+export interface FirewallCreateResponse {
/**
* Identifier
*/
@@ -146,7 +146,7 @@ export interface DNSFirewallCreateResponse {
/**
* Attack mitigation settings.
*/
- attack_mitigation?: DNSFirewallCreateResponse.AttackMitigation | null;
+ attack_mitigation?: FirewallCreateResponse.AttackMitigation | null;
/**
* Negative DNS Cache TTL.
@@ -171,7 +171,7 @@ export interface DNSFirewallCreateResponse {
retries?: number;
}
-export namespace DNSFirewallCreateResponse {
+export namespace FirewallCreateResponse {
/**
* Attack mitigation settings.
*/
@@ -194,7 +194,7 @@ export namespace DNSFirewallCreateResponse {
}
}
-export interface DNSFirewallListResponse {
+export interface FirewallListResponse {
/**
* Identifier
*/
@@ -237,7 +237,7 @@ export interface DNSFirewallListResponse {
/**
* Attack mitigation settings.
*/
- attack_mitigation?: DNSFirewallListResponse.AttackMitigation | null;
+ attack_mitigation?: FirewallListResponse.AttackMitigation | null;
/**
* Negative DNS Cache TTL.
@@ -262,7 +262,7 @@ export interface DNSFirewallListResponse {
retries?: number;
}
-export namespace DNSFirewallListResponse {
+export namespace FirewallListResponse {
/**
* Attack mitigation settings.
*/
@@ -285,14 +285,14 @@ export namespace DNSFirewallListResponse {
}
}
-export interface DNSFirewallDeleteResponse {
+export interface FirewallDeleteResponse {
/**
* Identifier
*/
id?: string;
}
-export interface DNSFirewallEditResponse {
+export interface FirewallEditResponse {
/**
* Identifier
*/
@@ -335,7 +335,7 @@ export interface DNSFirewallEditResponse {
/**
* Attack mitigation settings.
*/
- attack_mitigation?: DNSFirewallEditResponse.AttackMitigation | null;
+ attack_mitigation?: FirewallEditResponse.AttackMitigation | null;
/**
* Negative DNS Cache TTL.
@@ -360,7 +360,7 @@ export interface DNSFirewallEditResponse {
retries?: number;
}
-export namespace DNSFirewallEditResponse {
+export namespace FirewallEditResponse {
/**
* Attack mitigation settings.
*/
@@ -383,7 +383,7 @@ export namespace DNSFirewallEditResponse {
}
}
-export interface DNSFirewallGetResponse {
+export interface FirewallGetResponse {
/**
* Identifier
*/
@@ -426,7 +426,7 @@ export interface DNSFirewallGetResponse {
/**
* Attack mitigation settings.
*/
- attack_mitigation?: DNSFirewallGetResponse.AttackMitigation | null;
+ attack_mitigation?: FirewallGetResponse.AttackMitigation | null;
/**
* Negative DNS Cache TTL.
@@ -451,7 +451,7 @@ export interface DNSFirewallGetResponse {
retries?: number;
}
-export namespace DNSFirewallGetResponse {
+export namespace FirewallGetResponse {
/**
* Attack mitigation settings.
*/
@@ -474,7 +474,7 @@ export namespace DNSFirewallGetResponse {
}
}
-export interface DNSFirewallCreateParams {
+export interface FirewallCreateParams {
/**
* DNS Firewall Cluster Name.
*/
@@ -485,7 +485,7 @@ export interface DNSFirewallCreateParams {
/**
* Attack mitigation settings.
*/
- attack_mitigation?: DNSFirewallCreateParams.AttackMitigation | null;
+ attack_mitigation?: FirewallCreateParams.AttackMitigation | null;
/**
* Deprecate the response to ANY requests.
@@ -530,7 +530,7 @@ export interface DNSFirewallCreateParams {
retries?: number;
}
-export namespace DNSFirewallCreateParams {
+export namespace FirewallCreateParams {
/**
* Attack mitigation settings.
*/
@@ -553,9 +553,9 @@ export namespace DNSFirewallCreateParams {
}
}
-export interface DNSFirewallListParams extends V4PagePaginationArrayParams {}
+export interface FirewallListParams extends V4PagePaginationArrayParams {}
-export interface DNSFirewallEditParams {
+export interface FirewallEditParams {
/**
* Deprecate the response to ANY requests.
*/
@@ -588,7 +588,7 @@ export interface DNSFirewallEditParams {
/**
* Attack mitigation settings.
*/
- attack_mitigation?: DNSFirewallEditParams.AttackMitigation | null;
+ attack_mitigation?: FirewallEditParams.AttackMitigation | null;
/**
* Negative DNS Cache TTL.
@@ -613,7 +613,7 @@ export interface DNSFirewallEditParams {
retries?: number;
}
-export namespace DNSFirewallEditParams {
+export namespace FirewallEditParams {
/**
* Attack mitigation settings.
*/
@@ -636,15 +636,15 @@ export namespace DNSFirewallEditParams {
}
}
-export namespace DNSFirewall {
- export import DNSFirewallCreateResponse = DNSFirewallAPI.DNSFirewallCreateResponse;
- export import DNSFirewallListResponse = DNSFirewallAPI.DNSFirewallListResponse;
- export import DNSFirewallDeleteResponse = DNSFirewallAPI.DNSFirewallDeleteResponse;
- export import DNSFirewallEditResponse = DNSFirewallAPI.DNSFirewallEditResponse;
- export import DNSFirewallGetResponse = DNSFirewallAPI.DNSFirewallGetResponse;
- export import DNSFirewallListResponsesV4PagePaginationArray = DNSFirewallAPI.DNSFirewallListResponsesV4PagePaginationArray;
- export import DNSFirewallCreateParams = DNSFirewallAPI.DNSFirewallCreateParams;
- export import DNSFirewallListParams = DNSFirewallAPI.DNSFirewallListParams;
- export import DNSFirewallEditParams = DNSFirewallAPI.DNSFirewallEditParams;
- export import DNSAnalytics = DNSAnalyticsAPI.DNSAnalytics;
+export namespace Firewall {
+ export import FirewallCreateResponse = FirewallAPI.FirewallCreateResponse;
+ export import FirewallListResponse = FirewallAPI.FirewallListResponse;
+ export import FirewallDeleteResponse = FirewallAPI.FirewallDeleteResponse;
+ export import FirewallEditResponse = FirewallAPI.FirewallEditResponse;
+ export import FirewallGetResponse = FirewallAPI.FirewallGetResponse;
+ export import FirewallListResponsesV4PagePaginationArray = FirewallAPI.FirewallListResponsesV4PagePaginationArray;
+ export import FirewallCreateParams = FirewallAPI.FirewallCreateParams;
+ export import FirewallListParams = FirewallAPI.FirewallListParams;
+ export import FirewallEditParams = FirewallAPI.FirewallEditParams;
+ export import Analytics = AnalyticsAPI.Analytics;
}
diff --git a/src/resources/dns/firewall/index.ts b/src/resources/dns/firewall/index.ts
new file mode 100644
index 0000000000..54014d8001
--- /dev/null
+++ b/src/resources/dns/firewall/index.ts
@@ -0,0 +1,15 @@
+// File generated from our OpenAPI spec by Stainless.
+
+export { Analytics } from './analytics/index';
+export {
+ FirewallCreateResponse,
+ FirewallListResponse,
+ FirewallDeleteResponse,
+ FirewallEditResponse,
+ FirewallGetResponse,
+ FirewallCreateParams,
+ FirewallListParams,
+ FirewallEditParams,
+ FirewallListResponsesV4PagePaginationArray,
+ Firewall,
+} from './firewall';
diff --git a/src/resources/dns/index.ts b/src/resources/dns/index.ts
new file mode 100644
index 0000000000..bc9885ccf8
--- /dev/null
+++ b/src/resources/dns/index.ts
@@ -0,0 +1,31 @@
+// File generated from our OpenAPI spec by Stainless.
+
+export { DNS } from './dns';
+export {
+ FirewallCreateResponse,
+ FirewallListResponse,
+ FirewallDeleteResponse,
+ FirewallEditResponse,
+ FirewallGetResponse,
+ FirewallCreateParams,
+ FirewallListParams,
+ FirewallEditParams,
+ FirewallListResponsesV4PagePaginationArray,
+ Firewall,
+} from './firewall/index';
+export {
+ RecordCreateResponse,
+ RecordUpdateResponse,
+ RecordListResponse,
+ RecordDeleteResponse,
+ RecordExportResponse,
+ RecordGetResponse,
+ RecordImportResponse,
+ RecordScanResponse,
+ RecordCreateParams,
+ RecordUpdateParams,
+ RecordListParams,
+ RecordImportParams,
+ RecordListResponsesV4PagePaginationArray,
+ Records,
+} from './records';
diff --git a/src/resources/dns-records.ts b/src/resources/dns/records.ts
similarity index 96%
rename from src/resources/dns-records.ts
rename to src/resources/dns/records.ts
index 3db58c76be..b9b0fd156c 100644
--- a/src/resources/dns-records.ts
+++ b/src/resources/dns/records.ts
@@ -3,11 +3,11 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
-import * as DNSRecordsAPI from 'cloudflare/resources/dns-records';
+import * as RecordsAPI from 'cloudflare/resources/dns/records';
import { multipartFormRequestOptions } from 'cloudflare/core';
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination';
-export class DNSRecords extends APIResource {
+export class Records extends APIResource {
/**
* Create a new DNS record for a zone.
*
@@ -20,12 +20,12 @@ export class DNSRecords extends APIResource {
*/
create(
zoneId: string,
- body: DNSRecordCreateParams,
+ body: RecordCreateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.post(`/zones/${zoneId}/dns_records`, { body, ...options }) as Core.APIPromise<{
- result: DNSRecordCreateResponse;
+ result: RecordCreateResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -41,14 +41,14 @@ export class DNSRecords extends APIResource {
update(
zoneId: string,
dnsRecordId: string,
- body: DNSRecordUpdateParams,
+ body: RecordUpdateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.put(`/zones/${zoneId}/dns_records/${dnsRecordId}`, {
body,
...options,
- }) as Core.APIPromise<{ result: DNSRecordUpdateResponse }>
+ }) as Core.APIPromise<{ result: RecordUpdateResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -57,26 +57,25 @@ export class DNSRecords extends APIResource {
*/
list(
zoneId: string,
- query?: DNSRecordListParams,
+ query?: RecordListParams,
options?: Core.RequestOptions,
- ): Core.PagePromise;
+ ): Core.PagePromise;
list(
zoneId: string,
options?: Core.RequestOptions,
- ): Core.PagePromise;
+ ): Core.PagePromise;
list(
zoneId: string,
- query: DNSRecordListParams | Core.RequestOptions = {},
+ query: RecordListParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
- ): Core.PagePromise {
+ ): Core.PagePromise {
if (isRequestOptions(query)) {
return this.list(zoneId, {}, query);
}
- return this._client.getAPIList(
- `/zones/${zoneId}/dns_records`,
- DNSRecordListResponsesV4PagePaginationArray,
- { query, ...options },
- );
+ return this._client.getAPIList(`/zones/${zoneId}/dns_records`, RecordListResponsesV4PagePaginationArray, {
+ query,
+ ...options,
+ });
}
/**
@@ -86,10 +85,10 @@ export class DNSRecords extends APIResource {
zoneId: string,
dnsRecordId: string,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.delete(`/zones/${zoneId}/dns_records/${dnsRecordId}`, options) as Core.APIPromise<{
- result: DNSRecordDeleteResponse;
+ result: RecordDeleteResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -117,10 +116,10 @@ export class DNSRecords extends APIResource {
zoneId: string,
dnsRecordId: string,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.get(`/zones/${zoneId}/dns_records/${dnsRecordId}`, options) as Core.APIPromise<{
- result: DNSRecordGetResponse;
+ result: RecordGetResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -137,14 +136,14 @@ export class DNSRecords extends APIResource {
*/
import(
zoneId: string,
- body: DNSRecordImportParams,
+ body: RecordImportParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.post(
`/zones/${zoneId}/dns_records/import`,
multipartFormRequestOptions({ body, ...options }),
- ) as Core.APIPromise<{ result: DNSRecordImportResponse }>
+ ) as Core.APIPromise<{ result: RecordImportResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -152,40 +151,40 @@ export class DNSRecords extends APIResource {
* Scan for common DNS records on your domain and automatically add them to your
* zone. Useful if you haven't updated your nameservers yet.
*/
- scan(zoneId: string, options?: Core.RequestOptions): Core.APIPromise {
+ scan(zoneId: string, options?: Core.RequestOptions): Core.APIPromise {
return (
this._client.post(`/zones/${zoneId}/dns_records/scan`, options) as Core.APIPromise<{
- result: DNSRecordScanResponse;
+ result: RecordScanResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
}
-export class DNSRecordListResponsesV4PagePaginationArray extends V4PagePaginationArray {}
-
-export type DNSRecordCreateResponse =
- | DNSRecordCreateResponse.DNSRecordsARecord
- | DNSRecordCreateResponse.DNSRecordsAaaaRecord
- | DNSRecordCreateResponse.DNSRecordsCaaRecord
- | DNSRecordCreateResponse.DNSRecordsCertRecord
- | DNSRecordCreateResponse.DNSRecordsCnameRecord
- | DNSRecordCreateResponse.DNSRecordsDnskeyRecord
- | DNSRecordCreateResponse.DNSRecordsDsRecord
- | DNSRecordCreateResponse.DNSRecordsHTTPSRecord
- | DNSRecordCreateResponse.DNSRecordsLocRecord
- | DNSRecordCreateResponse.DNSRecordsMxRecord
- | DNSRecordCreateResponse.DNSRecordsNaptrRecord
- | DNSRecordCreateResponse.DNSRecordsNsRecord
- | DNSRecordCreateResponse.DNSRecordsPtrRecord
- | DNSRecordCreateResponse.DNSRecordsSmimeaRecord
- | DNSRecordCreateResponse.DNSRecordsSrvRecord
- | DNSRecordCreateResponse.DNSRecordsSshfpRecord
- | DNSRecordCreateResponse.DNSRecordsSvcbRecord
- | DNSRecordCreateResponse.DNSRecordsTlsaRecord
- | DNSRecordCreateResponse.DNSRecordsTxtRecord
- | DNSRecordCreateResponse.DNSRecordsUriRecord;
-
-export namespace DNSRecordCreateResponse {
+export class RecordListResponsesV4PagePaginationArray extends V4PagePaginationArray {}
+
+export type RecordCreateResponse =
+ | RecordCreateResponse.DNSRecordsARecord
+ | RecordCreateResponse.DNSRecordsAaaaRecord
+ | RecordCreateResponse.DNSRecordsCaaRecord
+ | RecordCreateResponse.DNSRecordsCertRecord
+ | RecordCreateResponse.DNSRecordsCnameRecord
+ | RecordCreateResponse.DNSRecordsDnskeyRecord
+ | RecordCreateResponse.DNSRecordsDsRecord
+ | RecordCreateResponse.DNSRecordsHTTPSRecord
+ | RecordCreateResponse.DNSRecordsLocRecord
+ | RecordCreateResponse.DNSRecordsMxRecord
+ | RecordCreateResponse.DNSRecordsNaptrRecord
+ | RecordCreateResponse.DNSRecordsNsRecord
+ | RecordCreateResponse.DNSRecordsPtrRecord
+ | RecordCreateResponse.DNSRecordsSmimeaRecord
+ | RecordCreateResponse.DNSRecordsSrvRecord
+ | RecordCreateResponse.DNSRecordsSshfpRecord
+ | RecordCreateResponse.DNSRecordsSvcbRecord
+ | RecordCreateResponse.DNSRecordsTlsaRecord
+ | RecordCreateResponse.DNSRecordsTxtRecord
+ | RecordCreateResponse.DNSRecordsUriRecord;
+
+export namespace RecordCreateResponse {
export interface DNSRecordsARecord {
/**
* A valid IPv4 address.
@@ -2532,29 +2531,29 @@ export namespace DNSRecordCreateResponse {
}
}
-export type DNSRecordUpdateResponse =
- | DNSRecordUpdateResponse.DNSRecordsARecord
- | DNSRecordUpdateResponse.DNSRecordsAaaaRecord
- | DNSRecordUpdateResponse.DNSRecordsCaaRecord
- | DNSRecordUpdateResponse.DNSRecordsCertRecord
- | DNSRecordUpdateResponse.DNSRecordsCnameRecord
- | DNSRecordUpdateResponse.DNSRecordsDnskeyRecord
- | DNSRecordUpdateResponse.DNSRecordsDsRecord
- | DNSRecordUpdateResponse.DNSRecordsHTTPSRecord
- | DNSRecordUpdateResponse.DNSRecordsLocRecord
- | DNSRecordUpdateResponse.DNSRecordsMxRecord
- | DNSRecordUpdateResponse.DNSRecordsNaptrRecord
- | DNSRecordUpdateResponse.DNSRecordsNsRecord
- | DNSRecordUpdateResponse.DNSRecordsPtrRecord
- | DNSRecordUpdateResponse.DNSRecordsSmimeaRecord
- | DNSRecordUpdateResponse.DNSRecordsSrvRecord
- | DNSRecordUpdateResponse.DNSRecordsSshfpRecord
- | DNSRecordUpdateResponse.DNSRecordsSvcbRecord
- | DNSRecordUpdateResponse.DNSRecordsTlsaRecord
- | DNSRecordUpdateResponse.DNSRecordsTxtRecord
- | DNSRecordUpdateResponse.DNSRecordsUriRecord;
-
-export namespace DNSRecordUpdateResponse {
+export type RecordUpdateResponse =
+ | RecordUpdateResponse.DNSRecordsARecord
+ | RecordUpdateResponse.DNSRecordsAaaaRecord
+ | RecordUpdateResponse.DNSRecordsCaaRecord
+ | RecordUpdateResponse.DNSRecordsCertRecord
+ | RecordUpdateResponse.DNSRecordsCnameRecord
+ | RecordUpdateResponse.DNSRecordsDnskeyRecord
+ | RecordUpdateResponse.DNSRecordsDsRecord
+ | RecordUpdateResponse.DNSRecordsHTTPSRecord
+ | RecordUpdateResponse.DNSRecordsLocRecord
+ | RecordUpdateResponse.DNSRecordsMxRecord
+ | RecordUpdateResponse.DNSRecordsNaptrRecord
+ | RecordUpdateResponse.DNSRecordsNsRecord
+ | RecordUpdateResponse.DNSRecordsPtrRecord
+ | RecordUpdateResponse.DNSRecordsSmimeaRecord
+ | RecordUpdateResponse.DNSRecordsSrvRecord
+ | RecordUpdateResponse.DNSRecordsSshfpRecord
+ | RecordUpdateResponse.DNSRecordsSvcbRecord
+ | RecordUpdateResponse.DNSRecordsTlsaRecord
+ | RecordUpdateResponse.DNSRecordsTxtRecord
+ | RecordUpdateResponse.DNSRecordsUriRecord;
+
+export namespace RecordUpdateResponse {
export interface DNSRecordsARecord {
/**
* A valid IPv4 address.
@@ -4901,29 +4900,29 @@ export namespace DNSRecordUpdateResponse {
}
}
-export type DNSRecordListResponse =
- | DNSRecordListResponse.DNSRecordsARecord
- | DNSRecordListResponse.DNSRecordsAaaaRecord
- | DNSRecordListResponse.DNSRecordsCaaRecord
- | DNSRecordListResponse.DNSRecordsCertRecord
- | DNSRecordListResponse.DNSRecordsCnameRecord
- | DNSRecordListResponse.DNSRecordsDnskeyRecord
- | DNSRecordListResponse.DNSRecordsDsRecord
- | DNSRecordListResponse.DNSRecordsHTTPSRecord
- | DNSRecordListResponse.DNSRecordsLocRecord
- | DNSRecordListResponse.DNSRecordsMxRecord
- | DNSRecordListResponse.DNSRecordsNaptrRecord
- | DNSRecordListResponse.DNSRecordsNsRecord
- | DNSRecordListResponse.DNSRecordsPtrRecord
- | DNSRecordListResponse.DNSRecordsSmimeaRecord
- | DNSRecordListResponse.DNSRecordsSrvRecord
- | DNSRecordListResponse.DNSRecordsSshfpRecord
- | DNSRecordListResponse.DNSRecordsSvcbRecord
- | DNSRecordListResponse.DNSRecordsTlsaRecord
- | DNSRecordListResponse.DNSRecordsTxtRecord
- | DNSRecordListResponse.DNSRecordsUriRecord;
-
-export namespace DNSRecordListResponse {
+export type RecordListResponse =
+ | RecordListResponse.DNSRecordsARecord
+ | RecordListResponse.DNSRecordsAaaaRecord
+ | RecordListResponse.DNSRecordsCaaRecord
+ | RecordListResponse.DNSRecordsCertRecord
+ | RecordListResponse.DNSRecordsCnameRecord
+ | RecordListResponse.DNSRecordsDnskeyRecord
+ | RecordListResponse.DNSRecordsDsRecord
+ | RecordListResponse.DNSRecordsHTTPSRecord
+ | RecordListResponse.DNSRecordsLocRecord
+ | RecordListResponse.DNSRecordsMxRecord
+ | RecordListResponse.DNSRecordsNaptrRecord
+ | RecordListResponse.DNSRecordsNsRecord
+ | RecordListResponse.DNSRecordsPtrRecord
+ | RecordListResponse.DNSRecordsSmimeaRecord
+ | RecordListResponse.DNSRecordsSrvRecord
+ | RecordListResponse.DNSRecordsSshfpRecord
+ | RecordListResponse.DNSRecordsSvcbRecord
+ | RecordListResponse.DNSRecordsTlsaRecord
+ | RecordListResponse.DNSRecordsTxtRecord
+ | RecordListResponse.DNSRecordsUriRecord;
+
+export namespace RecordListResponse {
export interface DNSRecordsARecord {
/**
* A valid IPv4 address.
@@ -7270,7 +7269,7 @@ export namespace DNSRecordListResponse {
}
}
-export interface DNSRecordDeleteResponse {
+export interface RecordDeleteResponse {
/**
* Identifier
*/
@@ -7280,31 +7279,31 @@ export interface DNSRecordDeleteResponse {
/**
* Exported BIND zone file.
*/
-export type DNSRecordExportResponse = string;
-
-export type DNSRecordGetResponse =
- | DNSRecordGetResponse.DNSRecordsARecord
- | DNSRecordGetResponse.DNSRecordsAaaaRecord
- | DNSRecordGetResponse.DNSRecordsCaaRecord
- | DNSRecordGetResponse.DNSRecordsCertRecord
- | DNSRecordGetResponse.DNSRecordsCnameRecord
- | DNSRecordGetResponse.DNSRecordsDnskeyRecord
- | DNSRecordGetResponse.DNSRecordsDsRecord
- | DNSRecordGetResponse.DNSRecordsHTTPSRecord
- | DNSRecordGetResponse.DNSRecordsLocRecord
- | DNSRecordGetResponse.DNSRecordsMxRecord
- | DNSRecordGetResponse.DNSRecordsNaptrRecord
- | DNSRecordGetResponse.DNSRecordsNsRecord
- | DNSRecordGetResponse.DNSRecordsPtrRecord
- | DNSRecordGetResponse.DNSRecordsSmimeaRecord
- | DNSRecordGetResponse.DNSRecordsSrvRecord
- | DNSRecordGetResponse.DNSRecordsSshfpRecord
- | DNSRecordGetResponse.DNSRecordsSvcbRecord
- | DNSRecordGetResponse.DNSRecordsTlsaRecord
- | DNSRecordGetResponse.DNSRecordsTxtRecord
- | DNSRecordGetResponse.DNSRecordsUriRecord;
-
-export namespace DNSRecordGetResponse {
+export type RecordExportResponse = string;
+
+export type RecordGetResponse =
+ | RecordGetResponse.DNSRecordsARecord
+ | RecordGetResponse.DNSRecordsAaaaRecord
+ | RecordGetResponse.DNSRecordsCaaRecord
+ | RecordGetResponse.DNSRecordsCertRecord
+ | RecordGetResponse.DNSRecordsCnameRecord
+ | RecordGetResponse.DNSRecordsDnskeyRecord
+ | RecordGetResponse.DNSRecordsDsRecord
+ | RecordGetResponse.DNSRecordsHTTPSRecord
+ | RecordGetResponse.DNSRecordsLocRecord
+ | RecordGetResponse.DNSRecordsMxRecord
+ | RecordGetResponse.DNSRecordsNaptrRecord
+ | RecordGetResponse.DNSRecordsNsRecord
+ | RecordGetResponse.DNSRecordsPtrRecord
+ | RecordGetResponse.DNSRecordsSmimeaRecord
+ | RecordGetResponse.DNSRecordsSrvRecord
+ | RecordGetResponse.DNSRecordsSshfpRecord
+ | RecordGetResponse.DNSRecordsSvcbRecord
+ | RecordGetResponse.DNSRecordsTlsaRecord
+ | RecordGetResponse.DNSRecordsTxtRecord
+ | RecordGetResponse.DNSRecordsUriRecord;
+
+export namespace RecordGetResponse {
export interface DNSRecordsARecord {
/**
* A valid IPv4 address.
@@ -9651,7 +9650,7 @@ export namespace DNSRecordGetResponse {
}
}
-export interface DNSRecordImportResponse {
+export interface RecordImportResponse {
/**
* Number of DNS records added.
*/
@@ -9663,7 +9662,7 @@ export interface DNSRecordImportResponse {
total_records_parsed?: number;
}
-export interface DNSRecordScanResponse {
+export interface RecordScanResponse {
/**
* Number of DNS records added.
*/
@@ -9675,7 +9674,7 @@ export interface DNSRecordScanResponse {
total_records_parsed?: number;
}
-export interface DNSRecordCreateParams {
+export interface RecordCreateParams {
/**
* DNS record name (or @ for the zone apex) in Punycode.
*/
@@ -9692,9 +9691,9 @@ export interface DNSRecordCreateParams {
*/
comment?: string;
- data?: DNSRecordCreateParams.Data;
+ data?: RecordCreateParams.Data;
- meta?: DNSRecordCreateParams.Meta;
+ meta?: RecordCreateParams.Meta;
/**
* Required for MX, SRV and URI records; unused by other record types. Records with
@@ -9721,7 +9720,7 @@ export interface DNSRecordCreateParams {
ttl?: number | 1;
}
-export namespace DNSRecordCreateParams {
+export namespace RecordCreateParams {
export interface Data {
/**
* algorithm.
@@ -9939,7 +9938,7 @@ export namespace DNSRecordCreateParams {
}
}
-export interface DNSRecordUpdateParams {
+export interface RecordUpdateParams {
/**
* DNS record name (or @ for the zone apex) in Punycode.
*/
@@ -9956,9 +9955,9 @@ export interface DNSRecordUpdateParams {
*/
comment?: string;
- data?: DNSRecordUpdateParams.Data;
+ data?: RecordUpdateParams.Data;
- meta?: DNSRecordUpdateParams.Meta;
+ meta?: RecordUpdateParams.Meta;
/**
* Required for MX, SRV and URI records; unused by other record types. Records with
@@ -9985,7 +9984,7 @@ export interface DNSRecordUpdateParams {
ttl?: number | 1;
}
-export namespace DNSRecordUpdateParams {
+export namespace RecordUpdateParams {
export interface Data {
/**
* algorithm.
@@ -10203,8 +10202,8 @@ export namespace DNSRecordUpdateParams {
}
}
-export interface DNSRecordListParams extends V4PagePaginationArrayParams {
- comment?: DNSRecordListParams.Comment;
+export interface RecordListParams extends V4PagePaginationArrayParams {
+ comment?: RecordListParams.Comment;
/**
* DNS record content.
@@ -10249,7 +10248,7 @@ export interface DNSRecordListParams extends V4PagePaginationArrayParams {
*/
search?: string;
- tag?: DNSRecordListParams.Tag;
+ tag?: RecordListParams.Tag;
/**
* Whether to match all tag search requirements or at least one (any). If set to
@@ -10285,7 +10284,7 @@ export interface DNSRecordListParams extends V4PagePaginationArrayParams {
| 'URI';
}
-export namespace DNSRecordListParams {
+export namespace RecordListParams {
export interface Comment {
/**
* If this parameter is present, only records _without_ a comment are returned.
@@ -10361,7 +10360,7 @@ export namespace DNSRecordListParams {
}
}
-export interface DNSRecordImportParams {
+export interface RecordImportParams {
/**
* BIND config to import.
*
@@ -10379,18 +10378,18 @@ export interface DNSRecordImportParams {
proxied?: string;
}
-export namespace DNSRecords {
- export import DNSRecordCreateResponse = DNSRecordsAPI.DNSRecordCreateResponse;
- export import DNSRecordUpdateResponse = DNSRecordsAPI.DNSRecordUpdateResponse;
- export import DNSRecordListResponse = DNSRecordsAPI.DNSRecordListResponse;
- export import DNSRecordDeleteResponse = DNSRecordsAPI.DNSRecordDeleteResponse;
- export import DNSRecordExportResponse = DNSRecordsAPI.DNSRecordExportResponse;
- export import DNSRecordGetResponse = DNSRecordsAPI.DNSRecordGetResponse;
- export import DNSRecordImportResponse = DNSRecordsAPI.DNSRecordImportResponse;
- export import DNSRecordScanResponse = DNSRecordsAPI.DNSRecordScanResponse;
- export import DNSRecordListResponsesV4PagePaginationArray = DNSRecordsAPI.DNSRecordListResponsesV4PagePaginationArray;
- export import DNSRecordCreateParams = DNSRecordsAPI.DNSRecordCreateParams;
- export import DNSRecordUpdateParams = DNSRecordsAPI.DNSRecordUpdateParams;
- export import DNSRecordListParams = DNSRecordsAPI.DNSRecordListParams;
- export import DNSRecordImportParams = DNSRecordsAPI.DNSRecordImportParams;
+export namespace Records {
+ export import RecordCreateResponse = RecordsAPI.RecordCreateResponse;
+ export import RecordUpdateResponse = RecordsAPI.RecordUpdateResponse;
+ export import RecordListResponse = RecordsAPI.RecordListResponse;
+ export import RecordDeleteResponse = RecordsAPI.RecordDeleteResponse;
+ export import RecordExportResponse = RecordsAPI.RecordExportResponse;
+ export import RecordGetResponse = RecordsAPI.RecordGetResponse;
+ export import RecordImportResponse = RecordsAPI.RecordImportResponse;
+ export import RecordScanResponse = RecordsAPI.RecordScanResponse;
+ export import RecordListResponsesV4PagePaginationArray = RecordsAPI.RecordListResponsesV4PagePaginationArray;
+ export import RecordCreateParams = RecordsAPI.RecordCreateParams;
+ export import RecordUpdateParams = RecordsAPI.RecordUpdateParams;
+ export import RecordListParams = RecordsAPI.RecordListParams;
+ export import RecordImportParams = RecordsAPI.RecordImportParams;
}
diff --git a/src/resources/hyperdrive/configs.ts b/src/resources/hyperdrive/configs.ts
index d11ec2afdc..5f2b1b8d37 100644
--- a/src/resources/hyperdrive/configs.ts
+++ b/src/resources/hyperdrive/configs.ts
@@ -65,6 +65,24 @@ export class Configs extends APIResource {
)._thenUnwrap((obj) => obj.result);
}
+ /**
+ * Patches and returns the specified Hyperdrive configuration. Updates to the
+ * origin and caching settings are applied with an all-or-nothing approach.
+ */
+ edit(
+ accountId: string,
+ hyperdriveId: string,
+ body: ConfigEditParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return (
+ this._client.patch(`/accounts/${accountId}/hyperdrive/configs/${hyperdriveId}`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: ConfigEditResponse | null }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
/**
* Returns the specified Hyperdrive configuration.
*/
@@ -109,6 +127,13 @@ export namespace ConfigListResponse {
export type ConfigDeleteResponse = unknown | string;
+export interface ConfigEditResponse {
+ /**
+ * Identifier
+ */
+ id?: string;
+}
+
export interface ConfigGetResponse {
/**
* Identifier
@@ -144,12 +169,28 @@ export namespace ConfigUpdateParams {
}
}
+export interface ConfigEditParams {
+ origin?: ConfigEditParams.Origin;
+}
+
+export namespace ConfigEditParams {
+ export interface Origin {
+ /**
+ * The password required to access your origin database. This value is write-only
+ * and never returned by the API.
+ */
+ password: string;
+ }
+}
+
export namespace Configs {
export import ConfigCreateResponse = ConfigsAPI.ConfigCreateResponse;
export import ConfigUpdateResponse = ConfigsAPI.ConfigUpdateResponse;
export import ConfigListResponse = ConfigsAPI.ConfigListResponse;
export import ConfigDeleteResponse = ConfigsAPI.ConfigDeleteResponse;
+ export import ConfigEditResponse = ConfigsAPI.ConfigEditResponse;
export import ConfigGetResponse = ConfigsAPI.ConfigGetResponse;
export import ConfigCreateParams = ConfigsAPI.ConfigCreateParams;
export import ConfigUpdateParams = ConfigsAPI.ConfigUpdateParams;
+ export import ConfigEditParams = ConfigsAPI.ConfigEditParams;
}
diff --git a/src/resources/hyperdrive/hyperdrive.ts b/src/resources/hyperdrive/hyperdrive.ts
index 4cb274c8e1..2dc4676ab5 100644
--- a/src/resources/hyperdrive/hyperdrive.ts
+++ b/src/resources/hyperdrive/hyperdrive.ts
@@ -13,7 +13,9 @@ export namespace Hyperdrive {
export import ConfigUpdateResponse = ConfigsAPI.ConfigUpdateResponse;
export import ConfigListResponse = ConfigsAPI.ConfigListResponse;
export import ConfigDeleteResponse = ConfigsAPI.ConfigDeleteResponse;
+ export import ConfigEditResponse = ConfigsAPI.ConfigEditResponse;
export import ConfigGetResponse = ConfigsAPI.ConfigGetResponse;
export import ConfigCreateParams = ConfigsAPI.ConfigCreateParams;
export import ConfigUpdateParams = ConfigsAPI.ConfigUpdateParams;
+ export import ConfigEditParams = ConfigsAPI.ConfigEditParams;
}
diff --git a/src/resources/hyperdrive/index.ts b/src/resources/hyperdrive/index.ts
index 48308b2245..347cde1921 100644
--- a/src/resources/hyperdrive/index.ts
+++ b/src/resources/hyperdrive/index.ts
@@ -5,9 +5,11 @@ export {
ConfigUpdateResponse,
ConfigListResponse,
ConfigDeleteResponse,
+ ConfigEditResponse,
ConfigGetResponse,
ConfigCreateParams,
ConfigUpdateParams,
+ ConfigEditParams,
Configs,
} from './configs';
export { Hyperdrive } from './hyperdrive';
diff --git a/src/resources/index.ts b/src/resources/index.ts
index a73f063d67..3358b0cf87 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -1,7 +1,7 @@
// File generated from our OpenAPI spec by Stainless.
export { ACM } from './acm/acm';
-export { AICreateResponse, AICreateParams, AI } from './ai';
+export { AIRunResponse, AIRunParams, AI } from './ai';
export { Access } from './access/access';
export {
AccountMemberCreateResponse,
@@ -37,7 +37,7 @@ export {
} from './audit-logs';
export { AvailablePlanListResponse, AvailablePlanGetResponse, AvailablePlans } from './available-plans';
export { AvailableRatePlanListResponse, AvailableRatePlans } from './available-rate-plans';
-export { Billings } from './billings/billings';
+export { Billing } from './billing/billing';
export {
BotManagementUpdateResponse,
BotManagementGetResponse,
@@ -113,35 +113,8 @@ export {
export { D1 } from './d1/d1';
export { DEX } from './dex/dex';
export { DLP } from './dlp/dlp';
+export { DNS } from './dns/dns';
export { DNSAnalytics } from './dns-analytics/dns-analytics';
-export {
- DNSFirewallCreateResponse,
- DNSFirewallListResponse,
- DNSFirewallDeleteResponse,
- DNSFirewallEditResponse,
- DNSFirewallGetResponse,
- DNSFirewallCreateParams,
- DNSFirewallListParams,
- DNSFirewallEditParams,
- DNSFirewallListResponsesV4PagePaginationArray,
- DNSFirewall,
-} from './dns-firewall/dns-firewall';
-export {
- DNSRecordCreateResponse,
- DNSRecordUpdateResponse,
- DNSRecordListResponse,
- DNSRecordDeleteResponse,
- DNSRecordExportResponse,
- DNSRecordGetResponse,
- DNSRecordImportResponse,
- DNSRecordScanResponse,
- DNSRecordCreateParams,
- DNSRecordUpdateParams,
- DNSRecordListParams,
- DNSRecordImportParams,
- DNSRecordListResponsesV4PagePaginationArray,
- DNSRecords,
-} from './dns-records';
export {
DNSSECDeleteResponse,
DNSSECEditResponse,
@@ -366,7 +339,7 @@ export {
URLNormalizations,
} from './url-normalizations';
export { URLScannerScanResponse, URLScannerScanParams, URLScanner } from './url-scanner/url-scanner';
-export { UserListResponse, UserEditResponse, UserEditParams, Users } from './users/users';
+export { UserListResponse, UserEditResponse, UserEditParams, User } from './user/user';
export { Vectorize } from './vectorize/vectorize';
export {
WARPConnectorCreateResponse,
diff --git a/src/resources/pcaps/pcaps.ts b/src/resources/pcaps/pcaps.ts
index 8c0ca5efb2..6ffd2da4e5 100644
--- a/src/resources/pcaps/pcaps.ts
+++ b/src/resources/pcaps/pcaps.ts
@@ -53,11 +53,11 @@ export class PCAPs extends APIResource {
}
export type PCAPCreateResponse =
- | PCAPCreateResponse.AGiBwgNdPCAPsResponseSimple
- | PCAPCreateResponse.AGiBwgNdPCAPsResponseFull;
+ | PCAPCreateResponse._5aubKvqtPCAPsResponseSimple
+ | PCAPCreateResponse._5aubKvqtPCAPsResponseFull;
export namespace PCAPCreateResponse {
- export interface AGiBwgNdPCAPsResponseSimple {
+ export interface _5aubKvqtPCAPsResponseSimple {
/**
* The ID for the packet capture.
*/
@@ -66,7 +66,7 @@ export namespace PCAPCreateResponse {
/**
* The packet capture filter. When this field is empty, all packets are captured.
*/
- filter_v1?: AGiBwgNdPCAPsResponseSimple.FilterV1;
+ filter_v1?: _5aubKvqtPCAPsResponseSimple.FilterV1;
/**
* The status of the packet capture request.
@@ -103,7 +103,7 @@ export namespace PCAPCreateResponse {
type?: 'simple' | 'full';
}
- export namespace AGiBwgNdPCAPsResponseSimple {
+ export namespace _5aubKvqtPCAPsResponseSimple {
/**
* The packet capture filter. When this field is empty, all packets are captured.
*/
@@ -135,7 +135,7 @@ export namespace PCAPCreateResponse {
}
}
- export interface AGiBwgNdPCAPsResponseFull {
+ export interface _5aubKvqtPCAPsResponseFull {
/**
* The ID for the packet capture.
*/
@@ -168,7 +168,7 @@ export namespace PCAPCreateResponse {
/**
* The packet capture filter. When this field is empty, all packets are captured.
*/
- filter_v1?: AGiBwgNdPCAPsResponseFull.FilterV1;
+ filter_v1?: _5aubKvqtPCAPsResponseFull.FilterV1;
/**
* The status of the packet capture request.
@@ -205,7 +205,7 @@ export namespace PCAPCreateResponse {
type?: 'simple' | 'full';
}
- export namespace AGiBwgNdPCAPsResponseFull {
+ export namespace _5aubKvqtPCAPsResponseFull {
/**
* The packet capture filter. When this field is empty, all packets are captured.
*/
@@ -239,11 +239,11 @@ export namespace PCAPCreateResponse {
}
export type PCAPListResponse = Array<
- PCAPListResponse.AGiBwgNdPCAPsResponseSimple | PCAPListResponse.AGiBwgNdPCAPsResponseFull
+ PCAPListResponse._5aubKvqtPCAPsResponseSimple | PCAPListResponse._5aubKvqtPCAPsResponseFull
>;
export namespace PCAPListResponse {
- export interface AGiBwgNdPCAPsResponseSimple {
+ export interface _5aubKvqtPCAPsResponseSimple {
/**
* The ID for the packet capture.
*/
@@ -252,7 +252,7 @@ export namespace PCAPListResponse {
/**
* The packet capture filter. When this field is empty, all packets are captured.
*/
- filter_v1?: AGiBwgNdPCAPsResponseSimple.FilterV1;
+ filter_v1?: _5aubKvqtPCAPsResponseSimple.FilterV1;
/**
* The status of the packet capture request.
@@ -289,7 +289,7 @@ export namespace PCAPListResponse {
type?: 'simple' | 'full';
}
- export namespace AGiBwgNdPCAPsResponseSimple {
+ export namespace _5aubKvqtPCAPsResponseSimple {
/**
* The packet capture filter. When this field is empty, all packets are captured.
*/
@@ -321,7 +321,7 @@ export namespace PCAPListResponse {
}
}
- export interface AGiBwgNdPCAPsResponseFull {
+ export interface _5aubKvqtPCAPsResponseFull {
/**
* The ID for the packet capture.
*/
@@ -354,7 +354,7 @@ export namespace PCAPListResponse {
/**
* The packet capture filter. When this field is empty, all packets are captured.
*/
- filter_v1?: AGiBwgNdPCAPsResponseFull.FilterV1;
+ filter_v1?: _5aubKvqtPCAPsResponseFull.FilterV1;
/**
* The status of the packet capture request.
@@ -391,7 +391,7 @@ export namespace PCAPListResponse {
type?: 'simple' | 'full';
}
- export namespace AGiBwgNdPCAPsResponseFull {
+ export namespace _5aubKvqtPCAPsResponseFull {
/**
* The packet capture filter. When this field is empty, all packets are captured.
*/
@@ -425,11 +425,11 @@ export namespace PCAPListResponse {
}
export type PCAPGetResponse =
- | PCAPGetResponse.AGiBwgNdPCAPsResponseSimple
- | PCAPGetResponse.AGiBwgNdPCAPsResponseFull;
+ | PCAPGetResponse._5aubKvqtPCAPsResponseSimple
+ | PCAPGetResponse._5aubKvqtPCAPsResponseFull;
export namespace PCAPGetResponse {
- export interface AGiBwgNdPCAPsResponseSimple {
+ export interface _5aubKvqtPCAPsResponseSimple {
/**
* The ID for the packet capture.
*/
@@ -438,7 +438,7 @@ export namespace PCAPGetResponse {
/**
* The packet capture filter. When this field is empty, all packets are captured.
*/
- filter_v1?: AGiBwgNdPCAPsResponseSimple.FilterV1;
+ filter_v1?: _5aubKvqtPCAPsResponseSimple.FilterV1;
/**
* The status of the packet capture request.
@@ -475,7 +475,7 @@ export namespace PCAPGetResponse {
type?: 'simple' | 'full';
}
- export namespace AGiBwgNdPCAPsResponseSimple {
+ export namespace _5aubKvqtPCAPsResponseSimple {
/**
* The packet capture filter. When this field is empty, all packets are captured.
*/
@@ -507,7 +507,7 @@ export namespace PCAPGetResponse {
}
}
- export interface AGiBwgNdPCAPsResponseFull {
+ export interface _5aubKvqtPCAPsResponseFull {
/**
* The ID for the packet capture.
*/
@@ -540,7 +540,7 @@ export namespace PCAPGetResponse {
/**
* The packet capture filter. When this field is empty, all packets are captured.
*/
- filter_v1?: AGiBwgNdPCAPsResponseFull.FilterV1;
+ filter_v1?: _5aubKvqtPCAPsResponseFull.FilterV1;
/**
* The status of the packet capture request.
@@ -577,7 +577,7 @@ export namespace PCAPGetResponse {
type?: 'simple' | 'full';
}
- export namespace AGiBwgNdPCAPsResponseFull {
+ export namespace _5aubKvqtPCAPsResponseFull {
/**
* The packet capture filter. When this field is empty, all packets are captured.
*/
diff --git a/src/resources/request-tracers/index.ts b/src/resources/request-tracers/index.ts
index abc216df83..44c43cd3f6 100644
--- a/src/resources/request-tracers/index.ts
+++ b/src/resources/request-tracers/index.ts
@@ -1,4 +1,4 @@
// File generated from our OpenAPI spec by Stainless.
+export { IT1w6UlbTrace, TraceCreateResponse, TraceCreateParams, Traces } from './traces';
export { RequestTracers } from './request-tracers';
-export { TraceCreateResponse, TraceCreateParams, Traces } from './traces';
diff --git a/src/resources/request-tracers/request-tracers.ts b/src/resources/request-tracers/request-tracers.ts
index 2c2204a2c1..3ff1b5de07 100644
--- a/src/resources/request-tracers/request-tracers.ts
+++ b/src/resources/request-tracers/request-tracers.ts
@@ -9,6 +9,7 @@ export class RequestTracers extends APIResource {
export namespace RequestTracers {
export import Traces = TracesAPI.Traces;
+ export import IT1w6UlbTrace = TracesAPI.IT1w6UlbTrace;
export import TraceCreateResponse = TracesAPI.TraceCreateResponse;
export import TraceCreateParams = TracesAPI.TraceCreateParams;
}
diff --git a/src/resources/request-tracers/traces.ts b/src/resources/request-tracers/traces.ts
index 06e250fd31..1465f003d2 100644
--- a/src/resources/request-tracers/traces.ts
+++ b/src/resources/request-tracers/traces.ts
@@ -22,23 +22,13 @@ export class Traces extends APIResource {
}
}
-/**
- * Trace result with an origin status code
- */
-export interface TraceCreateResponse {
- /**
- * HTTP Status code of zone response
- */
- status_code?: number;
-
- trace?: Array;
-}
+export type IT1w6UlbTrace = Array;
-export namespace TraceCreateResponse {
+export namespace IT1w6UlbTrace {
/**
* List of steps acting on request/response
*/
- export interface Trace {
+ export interface It1w6UlbTraceItem {
/**
* If step type is rule, then action performed by this rule
*/
@@ -79,67 +69,25 @@ export namespace TraceCreateResponse {
*/
step_name?: string;
- trace?: Array;
+ trace?: TracesAPI.IT1w6UlbTrace;
/**
* Tracing step type
*/
type?: string;
}
+}
- export namespace Trace {
- /**
- * List of steps acting on request/response
- */
- export interface Trace {
- /**
- * If step type is rule, then action performed by this rule
- */
- action?: string;
-
- /**
- * If step type is rule, then action parameters of this rule as JSON
- */
- action_parameters?: unknown;
-
- /**
- * If step type is rule or ruleset, the description of this entity
- */
- description?: string;
-
- /**
- * If step type is rule, then expression used to match for this rule
- */
- expression?: string;
-
- /**
- * If step type is ruleset, then kind of this ruleset
- */
- kind?: string;
-
- /**
- * Whether tracing step affected tracing request/response
- */
- matched?: boolean;
-
- /**
- * If step type is ruleset, then name of this ruleset
- */
- name?: string;
-
- /**
- * Tracing step identifying name
- */
- step_name?: string;
-
- trace?: unknown;
-
- /**
- * Tracing step type
- */
- type?: string;
- }
- }
+/**
+ * Trace result with an origin status code
+ */
+export interface TraceCreateResponse {
+ /**
+ * HTTP Status code of zone response
+ */
+ status_code?: number;
+
+ trace?: IT1w6UlbTrace;
}
export interface TraceCreateParams {
@@ -253,6 +201,7 @@ export namespace TraceCreateParams {
}
export namespace Traces {
+ export import IT1w6UlbTrace = TracesAPI.IT1w6UlbTrace;
export import TraceCreateResponse = TracesAPI.TraceCreateResponse;
export import TraceCreateParams = TracesAPI.TraceCreateParams;
}
diff --git a/src/resources/url-scanner/url-scanner.ts b/src/resources/url-scanner/url-scanner.ts
index 0db26019ac..6172b6597c 100644
--- a/src/resources/url-scanner/url-scanner.ts
+++ b/src/resources/url-scanner/url-scanner.ts
@@ -45,6 +45,11 @@ export interface URLScannerScanResponse {
export namespace URLScannerScanResponse {
export interface Task {
+ /**
+ * Alpha-2 country code
+ */
+ country: string;
+
/**
* Whether scan was successful or not
*/
@@ -64,6 +69,11 @@ export namespace URLScannerScanResponse {
* Scan id
*/
uuid: string;
+
+ /**
+ * Visibility status.
+ */
+ visibility: string;
}
}
@@ -88,6 +98,11 @@ export interface URLScannerScanParams {
*/
hostname?: string;
+ /**
+ * Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage.
+ */
+ ip?: string;
+
/**
* Limit the number of objects in the response.
*/
@@ -103,6 +118,11 @@ export interface URLScannerScanParams {
*/
page_hostname?: string;
+ /**
+ * Filter scans by main page IP address (IPv4 or IPv6).
+ */
+ page_ip?: string;
+
/**
* Filter scans by exact match URL path (also supports suffix search).
*/
diff --git a/src/resources/users/audit-logs.ts b/src/resources/user/audit-logs.ts
similarity index 98%
rename from src/resources/users/audit-logs.ts
rename to src/resources/user/audit-logs.ts
index 862125ea58..f27a59888d 100644
--- a/src/resources/users/audit-logs.ts
+++ b/src/resources/user/audit-logs.ts
@@ -3,7 +3,7 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
-import * as AuditLogsAPI from 'cloudflare/resources/users/audit-logs';
+import * as AuditLogsAPI from 'cloudflare/resources/user/audit-logs';
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination';
export class AuditLogs extends APIResource {
diff --git a/src/resources/users/billings/billings.ts b/src/resources/user/billing/billing.ts
similarity index 75%
rename from src/resources/users/billings/billings.ts
rename to src/resources/user/billing/billing.ts
index df55c81d02..f05d3bc02c 100644
--- a/src/resources/users/billings/billings.ts
+++ b/src/resources/user/billing/billing.ts
@@ -1,15 +1,15 @@
// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
-import * as HistoryAPI from 'cloudflare/resources/users/billings/history';
-import * as ProfilesAPI from 'cloudflare/resources/users/billings/profiles';
+import * as HistoryAPI from 'cloudflare/resources/user/billing/history';
+import * as ProfilesAPI from 'cloudflare/resources/user/billing/profiles';
-export class Billings extends APIResource {
+export class Billing extends APIResource {
history: HistoryAPI.History = new HistoryAPI.History(this._client);
profiles: ProfilesAPI.Profiles = new ProfilesAPI.Profiles(this._client);
}
-export namespace Billings {
+export namespace Billing {
export import History = HistoryAPI.History;
export import HistoryListResponse = HistoryAPI.HistoryListResponse;
export import HistoryListResponsesV4PagePaginationArray = HistoryAPI.HistoryListResponsesV4PagePaginationArray;
diff --git a/src/resources/users/billings/history.ts b/src/resources/user/billing/history.ts
similarity index 96%
rename from src/resources/users/billings/history.ts
rename to src/resources/user/billing/history.ts
index 169f566ac7..5972545f23 100644
--- a/src/resources/users/billings/history.ts
+++ b/src/resources/user/billing/history.ts
@@ -3,7 +3,7 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
-import * as HistoryAPI from 'cloudflare/resources/users/billings/history';
+import * as HistoryAPI from 'cloudflare/resources/user/billing/history';
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination';
export class History extends APIResource {
diff --git a/src/resources/users/billings/index.ts b/src/resources/user/billing/index.ts
similarity index 86%
rename from src/resources/users/billings/index.ts
rename to src/resources/user/billing/index.ts
index 700e1bc7ed..f4b1b27624 100644
--- a/src/resources/users/billings/index.ts
+++ b/src/resources/user/billing/index.ts
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless.
-export { Billings } from './billings';
+export { Billing } from './billing';
export {
HistoryListResponse,
HistoryListParams,
diff --git a/src/resources/users/billings/profiles.ts b/src/resources/user/billing/profiles.ts
similarity index 89%
rename from src/resources/users/billings/profiles.ts
rename to src/resources/user/billing/profiles.ts
index 9b438bbbd7..4b74876c58 100644
--- a/src/resources/users/billings/profiles.ts
+++ b/src/resources/user/billing/profiles.ts
@@ -2,7 +2,7 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
-import * as ProfilesAPI from 'cloudflare/resources/users/billings/profiles';
+import * as ProfilesAPI from 'cloudflare/resources/user/billing/profiles';
export class Profiles extends APIResource {
/**
diff --git a/src/resources/users/firewall/access-rules/access-rules.ts b/src/resources/user/firewall/access-rules/access-rules.ts
similarity index 90%
rename from src/resources/users/firewall/access-rules/access-rules.ts
rename to src/resources/user/firewall/access-rules/access-rules.ts
index 1a608bf7e1..b11f5d4012 100644
--- a/src/resources/users/firewall/access-rules/access-rules.ts
+++ b/src/resources/user/firewall/access-rules/access-rules.ts
@@ -1,7 +1,7 @@
// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
-import * as RulesAPI from 'cloudflare/resources/users/firewall/access-rules/rules';
+import * as RulesAPI from 'cloudflare/resources/user/firewall/access-rules/rules';
export class AccessRules extends APIResource {
rules: RulesAPI.Rules = new RulesAPI.Rules(this._client);
diff --git a/src/resources/users/firewall/access-rules/index.ts b/src/resources/user/firewall/access-rules/index.ts
similarity index 100%
rename from src/resources/users/firewall/access-rules/index.ts
rename to src/resources/user/firewall/access-rules/index.ts
diff --git a/src/resources/users/firewall/access-rules/rules.ts b/src/resources/user/firewall/access-rules/rules.ts
similarity index 99%
rename from src/resources/users/firewall/access-rules/rules.ts
rename to src/resources/user/firewall/access-rules/rules.ts
index 8ecbabd2a9..41e081dacd 100644
--- a/src/resources/users/firewall/access-rules/rules.ts
+++ b/src/resources/user/firewall/access-rules/rules.ts
@@ -3,7 +3,7 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
-import * as RulesAPI from 'cloudflare/resources/users/firewall/access-rules/rules';
+import * as RulesAPI from 'cloudflare/resources/user/firewall/access-rules/rules';
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination';
export class Rules extends APIResource {
diff --git a/src/resources/users/firewall/firewall.ts b/src/resources/user/firewall/firewall.ts
similarity index 77%
rename from src/resources/users/firewall/firewall.ts
rename to src/resources/user/firewall/firewall.ts
index 9ed5fb40a4..57286af4fd 100644
--- a/src/resources/users/firewall/firewall.ts
+++ b/src/resources/user/firewall/firewall.ts
@@ -1,7 +1,7 @@
// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
-import * as AccessRulesAPI from 'cloudflare/resources/users/firewall/access-rules/access-rules';
+import * as AccessRulesAPI from 'cloudflare/resources/user/firewall/access-rules/access-rules';
export class Firewall extends APIResource {
accessRules: AccessRulesAPI.AccessRules = new AccessRulesAPI.AccessRules(this._client);
diff --git a/src/resources/users/firewall/index.ts b/src/resources/user/firewall/index.ts
similarity index 100%
rename from src/resources/users/firewall/index.ts
rename to src/resources/user/firewall/index.ts
diff --git a/src/resources/users/index.ts b/src/resources/user/index.ts
similarity index 94%
rename from src/resources/users/index.ts
rename to src/resources/user/index.ts
index 081b3e66b2..e33cbe00ed 100644
--- a/src/resources/users/index.ts
+++ b/src/resources/user/index.ts
@@ -6,7 +6,7 @@ export {
AuditLogListResponsesV4PagePaginationArray,
AuditLogs,
} from './audit-logs';
-export { Billings } from './billings/index';
+export { Billing } from './billing/index';
export { Firewall } from './firewall/index';
export {
InviteListResponse,
@@ -45,4 +45,4 @@ export {
TokenListResponsesV4PagePaginationArray,
Tokens,
} from './tokens/index';
-export { UserListResponse, UserEditResponse, UserEditParams, Users } from './users';
+export { UserListResponse, UserEditResponse, UserEditParams, User } from './user';
diff --git a/src/resources/users/invites.ts b/src/resources/user/invites.ts
similarity index 98%
rename from src/resources/users/invites.ts
rename to src/resources/user/invites.ts
index 0dff794fe3..a49aeb04ec 100644
--- a/src/resources/users/invites.ts
+++ b/src/resources/user/invites.ts
@@ -2,7 +2,7 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
-import * as InvitesAPI from 'cloudflare/resources/users/invites';
+import * as InvitesAPI from 'cloudflare/resources/user/invites';
export class Invites extends APIResource {
/**
diff --git a/src/resources/users/load-balancers/index.ts b/src/resources/user/load-balancers/index.ts
similarity index 63%
rename from src/resources/users/load-balancers/index.ts
rename to src/resources/user/load-balancers/index.ts
index bf390770c3..43cd899079 100644
--- a/src/resources/users/load-balancers/index.ts
+++ b/src/resources/user/load-balancers/index.ts
@@ -7,19 +7,26 @@ export {
MonitorDeleteResponse,
MonitorEditResponse,
MonitorGetResponse,
+ MonitorPreviewResponse,
+ MonitorReferencesResponse,
MonitorCreateParams,
MonitorEditParams,
+ MonitorPreviewParams,
Monitors,
-} from './monitors/index';
+} from './monitors';
export {
PoolCreateResponse,
PoolListResponse,
PoolDeleteResponse,
PoolEditResponse,
PoolGetResponse,
+ PoolHealthResponse,
+ PoolPreviewResponse,
+ PoolReferencesResponse,
PoolCreateParams,
PoolListParams,
PoolEditParams,
+ PoolPreviewParams,
Pools,
-} from './pools/index';
-export { PreviewGetResponse, Previews } from './previews';
+} from './pools';
+export { PreviewGetResponse, Preview } from './preview';
diff --git a/src/resources/users/load-balancers/load-balancers.ts b/src/resources/user/load-balancers/load-balancers.ts
similarity index 60%
rename from src/resources/users/load-balancers/load-balancers.ts
rename to src/resources/user/load-balancers/load-balancers.ts
index 5de856e07c..becb5a6f3f 100644
--- a/src/resources/users/load-balancers/load-balancers.ts
+++ b/src/resources/user/load-balancers/load-balancers.ts
@@ -1,14 +1,14 @@
// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
-import * as PreviewsAPI from 'cloudflare/resources/users/load-balancers/previews';
-import * as MonitorsAPI from 'cloudflare/resources/users/load-balancers/monitors/monitors';
-import * as PoolsAPI from 'cloudflare/resources/users/load-balancers/pools/pools';
+import * as MonitorsAPI from 'cloudflare/resources/user/load-balancers/monitors';
+import * as PoolsAPI from 'cloudflare/resources/user/load-balancers/pools';
+import * as PreviewAPI from 'cloudflare/resources/user/load-balancers/preview';
export class LoadBalancers extends APIResource {
monitors: MonitorsAPI.Monitors = new MonitorsAPI.Monitors(this._client);
pools: PoolsAPI.Pools = new PoolsAPI.Pools(this._client);
- previews: PreviewsAPI.Previews = new PreviewsAPI.Previews(this._client);
+ preview: PreviewAPI.Preview = new PreviewAPI.Preview(this._client);
}
export namespace LoadBalancers {
@@ -18,17 +18,24 @@ export namespace LoadBalancers {
export import MonitorDeleteResponse = MonitorsAPI.MonitorDeleteResponse;
export import MonitorEditResponse = MonitorsAPI.MonitorEditResponse;
export import MonitorGetResponse = MonitorsAPI.MonitorGetResponse;
+ export import MonitorPreviewResponse = MonitorsAPI.MonitorPreviewResponse;
+ export import MonitorReferencesResponse = MonitorsAPI.MonitorReferencesResponse;
export import MonitorCreateParams = MonitorsAPI.MonitorCreateParams;
export import MonitorEditParams = MonitorsAPI.MonitorEditParams;
+ export import MonitorPreviewParams = MonitorsAPI.MonitorPreviewParams;
export import Pools = PoolsAPI.Pools;
export import PoolCreateResponse = PoolsAPI.PoolCreateResponse;
export import PoolListResponse = PoolsAPI.PoolListResponse;
export import PoolDeleteResponse = PoolsAPI.PoolDeleteResponse;
export import PoolEditResponse = PoolsAPI.PoolEditResponse;
export import PoolGetResponse = PoolsAPI.PoolGetResponse;
+ export import PoolHealthResponse = PoolsAPI.PoolHealthResponse;
+ export import PoolPreviewResponse = PoolsAPI.PoolPreviewResponse;
+ export import PoolReferencesResponse = PoolsAPI.PoolReferencesResponse;
export import PoolCreateParams = PoolsAPI.PoolCreateParams;
export import PoolListParams = PoolsAPI.PoolListParams;
export import PoolEditParams = PoolsAPI.PoolEditParams;
- export import Previews = PreviewsAPI.Previews;
- export import PreviewGetResponse = PreviewsAPI.PreviewGetResponse;
+ export import PoolPreviewParams = PoolsAPI.PoolPreviewParams;
+ export import Preview = PreviewAPI.Preview;
+ export import PreviewGetResponse = PreviewAPI.PreviewGetResponse;
}
diff --git a/src/resources/users/load-balancers/monitors/monitors.ts b/src/resources/user/load-balancers/monitors.ts
similarity index 81%
rename from src/resources/users/load-balancers/monitors/monitors.ts
rename to src/resources/user/load-balancers/monitors.ts
index f40acb1bdd..97d4f0d543 100644
--- a/src/resources/users/load-balancers/monitors/monitors.ts
+++ b/src/resources/user/load-balancers/monitors.ts
@@ -2,14 +2,9 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
-import * as MonitorsAPI from 'cloudflare/resources/users/load-balancers/monitors/monitors';
-import * as PreviewsAPI from 'cloudflare/resources/users/load-balancers/monitors/previews';
-import * as ReferencesAPI from 'cloudflare/resources/users/load-balancers/monitors/references';
+import * as MonitorsAPI from 'cloudflare/resources/user/load-balancers/monitors';
export class Monitors extends APIResource {
- previews: PreviewsAPI.Previews = new PreviewsAPI.Previews(this._client);
- references: ReferencesAPI.References = new ReferencesAPI.References(this._client);
-
/**
* Create a configured monitor.
*/
@@ -69,6 +64,37 @@ export class Monitors extends APIResource {
}>
)._thenUnwrap((obj) => obj.result);
}
+
+ /**
+ * Preview pools using the specified monitor with provided monitor details. The
+ * returned preview_id can be used in the preview endpoint to retrieve the results.
+ */
+ preview(
+ monitorId: string,
+ body: MonitorPreviewParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return (
+ this._client.post(`/user/load_balancers/monitors/${monitorId}/preview`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: MonitorPreviewResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Get the list of resources that reference the provided monitor.
+ */
+ references(
+ monitorId: string,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return (
+ this._client.get(`/user/load_balancers/monitors/${monitorId}/references`, options) as Core.APIPromise<{
+ result: MonitorReferencesResponse | null;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
}
export interface MonitorCreateResponse {
@@ -499,6 +525,32 @@ export interface MonitorGetResponse {
type?: 'http' | 'https' | 'tcp' | 'udp_icmp' | 'icmp_ping' | 'smtp';
}
+export interface MonitorPreviewResponse {
+ /**
+ * Monitored pool IDs mapped to their respective names.
+ */
+ pools?: Record;
+
+ preview_id?: string;
+}
+
+/**
+ * List of resources that reference a given monitor.
+ */
+export type MonitorReferencesResponse = Array;
+
+export namespace MonitorReferencesResponse {
+ export interface MonitorReferencesResponseItem {
+ reference_type?: '*' | 'referral' | 'referrer';
+
+ resource_id?: string;
+
+ resource_name?: string;
+
+ resource_type?: string;
+ }
+}
+
export interface MonitorCreateParams {
/**
* The expected HTTP response code or code range of the health check. This
@@ -697,17 +749,114 @@ export interface MonitorEditParams {
type?: 'http' | 'https' | 'tcp' | 'udp_icmp' | 'icmp_ping' | 'smtp';
}
+export interface MonitorPreviewParams {
+ /**
+ * The expected HTTP response code or code range of the health check. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ expected_codes: string;
+
+ /**
+ * Do not validate the certificate when monitor use HTTPS. This parameter is
+ * currently only valid for HTTP and HTTPS monitors.
+ */
+ allow_insecure?: boolean;
+
+ /**
+ * To be marked unhealthy the monitored origin must fail this healthcheck N
+ * consecutive times.
+ */
+ consecutive_down?: number;
+
+ /**
+ * To be marked healthy the monitored origin must pass this healthcheck N
+ * consecutive times.
+ */
+ consecutive_up?: number;
+
+ /**
+ * Object description.
+ */
+ description?: string;
+
+ /**
+ * A case-insensitive sub-string to look for in the response body. If this string
+ * is not found, the origin will be marked as unhealthy. This parameter is only
+ * valid for HTTP and HTTPS monitors.
+ */
+ expected_body?: string;
+
+ /**
+ * Follow redirects if returned by the origin. This parameter is only valid for
+ * HTTP and HTTPS monitors.
+ */
+ follow_redirects?: boolean;
+
+ /**
+ * The HTTP request headers to send in the health check. It is recommended you set
+ * a Host header by default. The User-Agent header cannot be overridden. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ header?: unknown;
+
+ /**
+ * The interval between each health check. Shorter intervals may improve failover
+ * time, but will increase load on the origins as we check from multiple locations.
+ */
+ interval?: number;
+
+ /**
+ * The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS
+ * based checks and 'connection_established' for TCP based health checks.
+ */
+ method?: string;
+
+ /**
+ * The endpoint path you want to conduct a health check against. This parameter is
+ * only valid for HTTP and HTTPS monitors.
+ */
+ path?: string;
+
+ /**
+ * The port number to connect to for the health check. Required for TCP, UDP, and
+ * SMTP checks. HTTP and HTTPS checks should only define the port when using a
+ * non-standard port (HTTP: default 80, HTTPS: default 443).
+ */
+ port?: number;
+
+ /**
+ * Assign this monitor to emulate the specified zone while probing. This parameter
+ * is only valid for HTTP and HTTPS monitors.
+ */
+ probe_zone?: string;
+
+ /**
+ * The number of retries to attempt in case of a timeout before marking the origin
+ * as unhealthy. Retries are attempted immediately.
+ */
+ retries?: number;
+
+ /**
+ * The timeout (in seconds) before marking the health check as failed.
+ */
+ timeout?: number;
+
+ /**
+ * The protocol to use for the health check. Currently supported protocols are
+ * 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
+ */
+ type?: 'http' | 'https' | 'tcp' | 'udp_icmp' | 'icmp_ping' | 'smtp';
+}
+
export namespace Monitors {
export import MonitorCreateResponse = MonitorsAPI.MonitorCreateResponse;
export import MonitorListResponse = MonitorsAPI.MonitorListResponse;
export import MonitorDeleteResponse = MonitorsAPI.MonitorDeleteResponse;
export import MonitorEditResponse = MonitorsAPI.MonitorEditResponse;
export import MonitorGetResponse = MonitorsAPI.MonitorGetResponse;
+ export import MonitorPreviewResponse = MonitorsAPI.MonitorPreviewResponse;
+ export import MonitorReferencesResponse = MonitorsAPI.MonitorReferencesResponse;
export import MonitorCreateParams = MonitorsAPI.MonitorCreateParams;
export import MonitorEditParams = MonitorsAPI.MonitorEditParams;
- export import Previews = PreviewsAPI.Previews;
- export import PreviewCreateResponse = PreviewsAPI.PreviewCreateResponse;
- export import PreviewCreateParams = PreviewsAPI.PreviewCreateParams;
- export import References = ReferencesAPI.References;
- export import ReferenceLoadBalancerMonitorsListMonitorReferencesResponse = ReferencesAPI.ReferenceLoadBalancerMonitorsListMonitorReferencesResponse;
+ export import MonitorPreviewParams = MonitorsAPI.MonitorPreviewParams;
}
diff --git a/src/resources/users/load-balancers/pools/pools.ts b/src/resources/user/load-balancers/pools.ts
similarity index 91%
rename from src/resources/users/load-balancers/pools/pools.ts
rename to src/resources/user/load-balancers/pools.ts
index 708c55fd6a..f3b5842c86 100644
--- a/src/resources/users/load-balancers/pools/pools.ts
+++ b/src/resources/user/load-balancers/pools.ts
@@ -3,16 +3,9 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
-import * as PoolsAPI from 'cloudflare/resources/users/load-balancers/pools/pools';
-import * as HealthAPI from 'cloudflare/resources/users/load-balancers/pools/health';
-import * as PreviewsAPI from 'cloudflare/resources/users/load-balancers/pools/previews';
-import * as ReferencesAPI from 'cloudflare/resources/users/load-balancers/pools/references';
+import * as PoolsAPI from 'cloudflare/resources/user/load-balancers/pools';
export class Pools extends APIResource {
- health: HealthAPI.Health = new HealthAPI.Health(this._client);
- previews: PreviewsAPI.Previews = new PreviewsAPI.Previews(this._client);
- references: ReferencesAPI.References = new ReferencesAPI.References(this._client);
-
/**
* Create a new pool.
*/
@@ -79,6 +72,45 @@ export class Pools extends APIResource {
}>
)._thenUnwrap((obj) => obj.result);
}
+
+ /**
+ * Fetch the latest pool health status for a single pool.
+ */
+ health(poolId: string, options?: Core.RequestOptions): Core.APIPromise {
+ return (
+ this._client.get(`/user/load_balancers/pools/${poolId}/health`, options) as Core.APIPromise<{
+ result: PoolHealthResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Preview pool health using provided monitor details. The returned preview_id can
+ * be used in the preview endpoint to retrieve the results.
+ */
+ preview(
+ poolId: string,
+ body: PoolPreviewParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return (
+ this._client.post(`/user/load_balancers/pools/${poolId}/preview`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: PoolPreviewResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Get the list of resources that reference the provided pool.
+ */
+ references(poolId: string, options?: Core.RequestOptions): Core.APIPromise {
+ return (
+ this._client.get(`/user/load_balancers/pools/${poolId}/references`, options) as Core.APIPromise<{
+ result: PoolReferencesResponse | null;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
}
export interface PoolCreateResponse {
@@ -1233,6 +1265,38 @@ export namespace PoolGetResponse {
}
}
+/**
+ * A list of regions from which to run health checks. Null means every Cloudflare
+ * data center.
+ */
+export type PoolHealthResponse = unknown | string | null;
+
+export interface PoolPreviewResponse {
+ /**
+ * Monitored pool IDs mapped to their respective names.
+ */
+ pools?: Record;
+
+ preview_id?: string;
+}
+
+/**
+ * List of resources that reference a given pool.
+ */
+export type PoolReferencesResponse = Array;
+
+export namespace PoolReferencesResponse {
+ export interface PoolReferencesResponseItem {
+ reference_type?: '*' | 'referral' | 'referrer';
+
+ resource_id?: string;
+
+ resource_name?: string;
+
+ resource_type?: string;
+ }
+}
+
export interface PoolCreateParams {
/**
* A short name (tag) for the pool. Only alphanumeric characters, hyphens, and
@@ -1777,20 +1841,116 @@ export namespace PoolEditParams {
}
}
+export interface PoolPreviewParams {
+ /**
+ * The expected HTTP response code or code range of the health check. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ expected_codes: string;
+
+ /**
+ * Do not validate the certificate when monitor use HTTPS. This parameter is
+ * currently only valid for HTTP and HTTPS monitors.
+ */
+ allow_insecure?: boolean;
+
+ /**
+ * To be marked unhealthy the monitored origin must fail this healthcheck N
+ * consecutive times.
+ */
+ consecutive_down?: number;
+
+ /**
+ * To be marked healthy the monitored origin must pass this healthcheck N
+ * consecutive times.
+ */
+ consecutive_up?: number;
+
+ /**
+ * Object description.
+ */
+ description?: string;
+
+ /**
+ * A case-insensitive sub-string to look for in the response body. If this string
+ * is not found, the origin will be marked as unhealthy. This parameter is only
+ * valid for HTTP and HTTPS monitors.
+ */
+ expected_body?: string;
+
+ /**
+ * Follow redirects if returned by the origin. This parameter is only valid for
+ * HTTP and HTTPS monitors.
+ */
+ follow_redirects?: boolean;
+
+ /**
+ * The HTTP request headers to send in the health check. It is recommended you set
+ * a Host header by default. The User-Agent header cannot be overridden. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ header?: unknown;
+
+ /**
+ * The interval between each health check. Shorter intervals may improve failover
+ * time, but will increase load on the origins as we check from multiple locations.
+ */
+ interval?: number;
+
+ /**
+ * The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS
+ * based checks and 'connection_established' for TCP based health checks.
+ */
+ method?: string;
+
+ /**
+ * The endpoint path you want to conduct a health check against. This parameter is
+ * only valid for HTTP and HTTPS monitors.
+ */
+ path?: string;
+
+ /**
+ * The port number to connect to for the health check. Required for TCP, UDP, and
+ * SMTP checks. HTTP and HTTPS checks should only define the port when using a
+ * non-standard port (HTTP: default 80, HTTPS: default 443).
+ */
+ port?: number;
+
+ /**
+ * Assign this monitor to emulate the specified zone while probing. This parameter
+ * is only valid for HTTP and HTTPS monitors.
+ */
+ probe_zone?: string;
+
+ /**
+ * The number of retries to attempt in case of a timeout before marking the origin
+ * as unhealthy. Retries are attempted immediately.
+ */
+ retries?: number;
+
+ /**
+ * The timeout (in seconds) before marking the health check as failed.
+ */
+ timeout?: number;
+
+ /**
+ * The protocol to use for the health check. Currently supported protocols are
+ * 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
+ */
+ type?: 'http' | 'https' | 'tcp' | 'udp_icmp' | 'icmp_ping' | 'smtp';
+}
+
export namespace Pools {
export import PoolCreateResponse = PoolsAPI.PoolCreateResponse;
export import PoolListResponse = PoolsAPI.PoolListResponse;
export import PoolDeleteResponse = PoolsAPI.PoolDeleteResponse;
export import PoolEditResponse = PoolsAPI.PoolEditResponse;
export import PoolGetResponse = PoolsAPI.PoolGetResponse;
+ export import PoolHealthResponse = PoolsAPI.PoolHealthResponse;
+ export import PoolPreviewResponse = PoolsAPI.PoolPreviewResponse;
+ export import PoolReferencesResponse = PoolsAPI.PoolReferencesResponse;
export import PoolCreateParams = PoolsAPI.PoolCreateParams;
export import PoolListParams = PoolsAPI.PoolListParams;
export import PoolEditParams = PoolsAPI.PoolEditParams;
- export import Health = HealthAPI.Health;
- export import HealthListResponse = HealthAPI.HealthListResponse;
- export import Previews = PreviewsAPI.Previews;
- export import PreviewCreateResponse = PreviewsAPI.PreviewCreateResponse;
- export import PreviewCreateParams = PreviewsAPI.PreviewCreateParams;
- export import References = ReferencesAPI.References;
- export import ReferenceListResponse = ReferencesAPI.ReferenceListResponse;
+ export import PoolPreviewParams = PoolsAPI.PoolPreviewParams;
}
diff --git a/src/resources/users/load-balancers/previews.ts b/src/resources/user/load-balancers/preview.ts
similarity index 84%
rename from src/resources/users/load-balancers/previews.ts
rename to src/resources/user/load-balancers/preview.ts
index d153eab592..fe0e98f934 100644
--- a/src/resources/users/load-balancers/previews.ts
+++ b/src/resources/user/load-balancers/preview.ts
@@ -2,9 +2,9 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
-import * as PreviewsAPI from 'cloudflare/resources/users/load-balancers/previews';
+import * as PreviewAPI from 'cloudflare/resources/user/load-balancers/preview';
-export class Previews extends APIResource {
+export class Preview extends APIResource {
/**
* Get the result of a previous preview operation using the provided preview_id.
*/
@@ -45,6 +45,6 @@ export namespace PreviewGetResponse {
}
}
-export namespace Previews {
- export import PreviewGetResponse = PreviewsAPI.PreviewGetResponse;
+export namespace Preview {
+ export import PreviewGetResponse = PreviewAPI.PreviewGetResponse;
}
diff --git a/src/resources/users/load-balancing-analytics/events.ts b/src/resources/user/load-balancing-analytics/events.ts
similarity index 95%
rename from src/resources/users/load-balancing-analytics/events.ts
rename to src/resources/user/load-balancing-analytics/events.ts
index 79ea2cb7cc..61d34319a3 100644
--- a/src/resources/users/load-balancing-analytics/events.ts
+++ b/src/resources/user/load-balancing-analytics/events.ts
@@ -3,7 +3,7 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
-import * as EventsAPI from 'cloudflare/resources/users/load-balancing-analytics/events';
+import * as EventsAPI from 'cloudflare/resources/user/load-balancing-analytics/events';
export class Events extends APIResource {
/**
diff --git a/src/resources/users/load-balancing-analytics/index.ts b/src/resources/user/load-balancing-analytics/index.ts
similarity index 100%
rename from src/resources/users/load-balancing-analytics/index.ts
rename to src/resources/user/load-balancing-analytics/index.ts
diff --git a/src/resources/users/load-balancing-analytics/load-balancing-analytics.ts b/src/resources/user/load-balancing-analytics/load-balancing-analytics.ts
similarity index 83%
rename from src/resources/users/load-balancing-analytics/load-balancing-analytics.ts
rename to src/resources/user/load-balancing-analytics/load-balancing-analytics.ts
index 2056d929e8..b4914f1494 100644
--- a/src/resources/users/load-balancing-analytics/load-balancing-analytics.ts
+++ b/src/resources/user/load-balancing-analytics/load-balancing-analytics.ts
@@ -1,7 +1,7 @@
// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
-import * as EventsAPI from 'cloudflare/resources/users/load-balancing-analytics/events';
+import * as EventsAPI from 'cloudflare/resources/user/load-balancing-analytics/events';
export class LoadBalancingAnalytics extends APIResource {
events: EventsAPI.Events = new EventsAPI.Events(this._client);
diff --git a/src/resources/users/organizations.ts b/src/resources/user/organizations.ts
similarity index 97%
rename from src/resources/users/organizations.ts
rename to src/resources/user/organizations.ts
index b694e35da1..b3046dec85 100644
--- a/src/resources/users/organizations.ts
+++ b/src/resources/user/organizations.ts
@@ -3,7 +3,7 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
-import * as OrganizationsAPI from 'cloudflare/resources/users/organizations';
+import * as OrganizationsAPI from 'cloudflare/resources/user/organizations';
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination';
export class Organizations extends APIResource {
diff --git a/src/resources/users/subscriptions.ts b/src/resources/user/subscriptions.ts
similarity index 98%
rename from src/resources/users/subscriptions.ts
rename to src/resources/user/subscriptions.ts
index 22eec0d5fc..f06b33b4d4 100644
--- a/src/resources/users/subscriptions.ts
+++ b/src/resources/user/subscriptions.ts
@@ -2,7 +2,7 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
-import * as SubscriptionsAPI from 'cloudflare/resources/users/subscriptions';
+import * as SubscriptionsAPI from 'cloudflare/resources/user/subscriptions';
export class Subscriptions extends APIResource {
/**
diff --git a/src/resources/users/tokens/index.ts b/src/resources/user/tokens/index.ts
similarity index 100%
rename from src/resources/users/tokens/index.ts
rename to src/resources/user/tokens/index.ts
diff --git a/src/resources/users/tokens/permission-groups.ts b/src/resources/user/tokens/permission-groups.ts
similarity index 89%
rename from src/resources/users/tokens/permission-groups.ts
rename to src/resources/user/tokens/permission-groups.ts
index 8894c60211..d2d9c21f20 100644
--- a/src/resources/users/tokens/permission-groups.ts
+++ b/src/resources/user/tokens/permission-groups.ts
@@ -2,7 +2,7 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
-import * as PermissionGroupsAPI from 'cloudflare/resources/users/tokens/permission-groups';
+import * as PermissionGroupsAPI from 'cloudflare/resources/user/tokens/permission-groups';
export class PermissionGroups extends APIResource {
/**
diff --git a/src/resources/users/tokens/tokens.ts b/src/resources/user/tokens/tokens.ts
similarity index 97%
rename from src/resources/users/tokens/tokens.ts
rename to src/resources/user/tokens/tokens.ts
index b7f76d4fda..999182c4c4 100644
--- a/src/resources/users/tokens/tokens.ts
+++ b/src/resources/user/tokens/tokens.ts
@@ -3,9 +3,9 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
-import * as TokensAPI from 'cloudflare/resources/users/tokens/tokens';
-import * as PermissionGroupsAPI from 'cloudflare/resources/users/tokens/permission-groups';
-import * as ValuesAPI from 'cloudflare/resources/users/tokens/values';
+import * as TokensAPI from 'cloudflare/resources/user/tokens/tokens';
+import * as PermissionGroupsAPI from 'cloudflare/resources/user/tokens/permission-groups';
+import * as ValuesAPI from 'cloudflare/resources/user/tokens/values';
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination';
export class Tokens extends APIResource {
diff --git a/src/resources/users/tokens/values.ts b/src/resources/user/tokens/values.ts
similarity index 92%
rename from src/resources/users/tokens/values.ts
rename to src/resources/user/tokens/values.ts
index 225b24d0b4..bcb971777d 100644
--- a/src/resources/users/tokens/values.ts
+++ b/src/resources/user/tokens/values.ts
@@ -2,7 +2,7 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
-import * as ValuesAPI from 'cloudflare/resources/users/tokens/values';
+import * as ValuesAPI from 'cloudflare/resources/user/tokens/values';
export class Values extends APIResource {
/**
diff --git a/src/resources/users/users.ts b/src/resources/user/user.ts
similarity index 80%
rename from src/resources/users/users.ts
rename to src/resources/user/user.ts
index bf543bbf98..89027f782b 100644
--- a/src/resources/users/users.ts
+++ b/src/resources/user/user.ts
@@ -2,20 +2,20 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
-import * as UsersAPI from 'cloudflare/resources/users/users';
-import * as AuditLogsAPI from 'cloudflare/resources/users/audit-logs';
-import * as InvitesAPI from 'cloudflare/resources/users/invites';
-import * as OrganizationsAPI from 'cloudflare/resources/users/organizations';
-import * as SubscriptionsAPI from 'cloudflare/resources/users/subscriptions';
-import * as BillingsAPI from 'cloudflare/resources/users/billings/billings';
-import * as FirewallAPI from 'cloudflare/resources/users/firewall/firewall';
-import * as LoadBalancersAPI from 'cloudflare/resources/users/load-balancers/load-balancers';
-import * as LoadBalancingAnalyticsAPI from 'cloudflare/resources/users/load-balancing-analytics/load-balancing-analytics';
-import * as TokensAPI from 'cloudflare/resources/users/tokens/tokens';
+import * as UserAPI from 'cloudflare/resources/user/user';
+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 FirewallAPI from 'cloudflare/resources/user/firewall/firewall';
+import * as LoadBalancersAPI from 'cloudflare/resources/user/load-balancers/load-balancers';
+import * as LoadBalancingAnalyticsAPI from 'cloudflare/resources/user/load-balancing-analytics/load-balancing-analytics';
+import * as TokensAPI from 'cloudflare/resources/user/tokens/tokens';
-export class Users extends APIResource {
+export class User extends APIResource {
auditLogs: AuditLogsAPI.AuditLogs = new AuditLogsAPI.AuditLogs(this._client);
- billings: BillingsAPI.Billings = new BillingsAPI.Billings(this._client);
+ billing: BillingAPI.Billing = new BillingAPI.Billing(this._client);
firewall: FirewallAPI.Firewall = new FirewallAPI.Firewall(this._client);
invites: InvitesAPI.Invites = new InvitesAPI.Invites(this._client);
loadBalancers: LoadBalancersAPI.LoadBalancers = new LoadBalancersAPI.LoadBalancers(this._client);
@@ -75,15 +75,15 @@ export interface UserEditParams {
zipcode?: string | null;
}
-export namespace Users {
- export import UserListResponse = UsersAPI.UserListResponse;
- export import UserEditResponse = UsersAPI.UserEditResponse;
- export import UserEditParams = UsersAPI.UserEditParams;
+export namespace User {
+ export import UserListResponse = UserAPI.UserListResponse;
+ export import UserEditResponse = UserAPI.UserEditResponse;
+ export import UserEditParams = UserAPI.UserEditParams;
export import AuditLogs = AuditLogsAPI.AuditLogs;
export import AuditLogListResponse = AuditLogsAPI.AuditLogListResponse;
export import AuditLogListResponsesV4PagePaginationArray = AuditLogsAPI.AuditLogListResponsesV4PagePaginationArray;
export import AuditLogListParams = AuditLogsAPI.AuditLogListParams;
- export import Billings = BillingsAPI.Billings;
+ export import Billing = BillingAPI.Billing;
export import Firewall = FirewallAPI.Firewall;
export import Invites = InvitesAPI.Invites;
export import InviteListResponse = InvitesAPI.InviteListResponse;
diff --git a/src/resources/users/load-balancers/monitors/index.ts b/src/resources/users/load-balancers/monitors/index.ts
deleted file mode 100644
index 24e3aea065..0000000000
--- a/src/resources/users/load-balancers/monitors/index.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-export {
- MonitorCreateResponse,
- MonitorListResponse,
- MonitorDeleteResponse,
- MonitorEditResponse,
- MonitorGetResponse,
- MonitorCreateParams,
- MonitorEditParams,
- Monitors,
-} from './monitors';
-export { PreviewCreateResponse, PreviewCreateParams, Previews } from './previews';
-export { ReferenceLoadBalancerMonitorsListMonitorReferencesResponse, References } from './references';
diff --git a/src/resources/users/load-balancers/monitors/previews.ts b/src/resources/users/load-balancers/monitors/previews.ts
deleted file mode 100644
index d9c4099612..0000000000
--- a/src/resources/users/load-balancers/monitors/previews.ts
+++ /dev/null
@@ -1,137 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-import * as Core from 'cloudflare/core';
-import { APIResource } from 'cloudflare/resource';
-import * as PreviewsAPI from 'cloudflare/resources/users/load-balancers/monitors/previews';
-
-export class Previews extends APIResource {
- /**
- * Preview pools using the specified monitor with provided monitor details. The
- * returned preview_id can be used in the preview endpoint to retrieve the results.
- */
- create(
- monitorId: string,
- body: PreviewCreateParams,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
- return (
- this._client.post(`/user/load_balancers/monitors/${monitorId}/preview`, {
- body,
- ...options,
- }) as Core.APIPromise<{ result: PreviewCreateResponse }>
- )._thenUnwrap((obj) => obj.result);
- }
-}
-
-export interface PreviewCreateResponse {
- /**
- * Monitored pool IDs mapped to their respective names.
- */
- pools?: Record;
-
- preview_id?: string;
-}
-
-export interface PreviewCreateParams {
- /**
- * The expected HTTP response code or code range of the health check. This
- * parameter is only valid for HTTP and HTTPS monitors.
- */
- expected_codes: string;
-
- /**
- * Do not validate the certificate when monitor use HTTPS. This parameter is
- * currently only valid for HTTP and HTTPS monitors.
- */
- allow_insecure?: boolean;
-
- /**
- * To be marked unhealthy the monitored origin must fail this healthcheck N
- * consecutive times.
- */
- consecutive_down?: number;
-
- /**
- * To be marked healthy the monitored origin must pass this healthcheck N
- * consecutive times.
- */
- consecutive_up?: number;
-
- /**
- * Object description.
- */
- description?: string;
-
- /**
- * A case-insensitive sub-string to look for in the response body. If this string
- * is not found, the origin will be marked as unhealthy. This parameter is only
- * valid for HTTP and HTTPS monitors.
- */
- expected_body?: string;
-
- /**
- * Follow redirects if returned by the origin. This parameter is only valid for
- * HTTP and HTTPS monitors.
- */
- follow_redirects?: boolean;
-
- /**
- * The HTTP request headers to send in the health check. It is recommended you set
- * a Host header by default. The User-Agent header cannot be overridden. This
- * parameter is only valid for HTTP and HTTPS monitors.
- */
- header?: unknown;
-
- /**
- * The interval between each health check. Shorter intervals may improve failover
- * time, but will increase load on the origins as we check from multiple locations.
- */
- interval?: number;
-
- /**
- * The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS
- * based checks and 'connection_established' for TCP based health checks.
- */
- method?: string;
-
- /**
- * The endpoint path you want to conduct a health check against. This parameter is
- * only valid for HTTP and HTTPS monitors.
- */
- path?: string;
-
- /**
- * The port number to connect to for the health check. Required for TCP, UDP, and
- * SMTP checks. HTTP and HTTPS checks should only define the port when using a
- * non-standard port (HTTP: default 80, HTTPS: default 443).
- */
- port?: number;
-
- /**
- * Assign this monitor to emulate the specified zone while probing. This parameter
- * is only valid for HTTP and HTTPS monitors.
- */
- probe_zone?: string;
-
- /**
- * The number of retries to attempt in case of a timeout before marking the origin
- * as unhealthy. Retries are attempted immediately.
- */
- retries?: number;
-
- /**
- * The timeout (in seconds) before marking the health check as failed.
- */
- timeout?: number;
-
- /**
- * The protocol to use for the health check. Currently supported protocols are
- * 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
- */
- type?: 'http' | 'https' | 'tcp' | 'udp_icmp' | 'icmp_ping' | 'smtp';
-}
-
-export namespace Previews {
- export import PreviewCreateResponse = PreviewsAPI.PreviewCreateResponse;
- export import PreviewCreateParams = PreviewsAPI.PreviewCreateParams;
-}
diff --git a/src/resources/users/load-balancers/monitors/references.ts b/src/resources/users/load-balancers/monitors/references.ts
deleted file mode 100644
index c48b1b5d0b..0000000000
--- a/src/resources/users/load-balancers/monitors/references.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-import * as Core from 'cloudflare/core';
-import { APIResource } from 'cloudflare/resource';
-import * as ReferencesAPI from 'cloudflare/resources/users/load-balancers/monitors/references';
-
-export class References extends APIResource {
- /**
- * Get the list of resources that reference the provided monitor.
- */
- loadBalancerMonitorsListMonitorReferences(
- monitorId: string,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
- return (
- this._client.get(`/user/load_balancers/monitors/${monitorId}/references`, options) as Core.APIPromise<{
- result: ReferenceLoadBalancerMonitorsListMonitorReferencesResponse | null;
- }>
- )._thenUnwrap((obj) => obj.result);
- }
-}
-
-/**
- * List of resources that reference a given monitor.
- */
-export type ReferenceLoadBalancerMonitorsListMonitorReferencesResponse =
- Array;
-
-export namespace ReferenceLoadBalancerMonitorsListMonitorReferencesResponse {
- export interface ReferenceLoadBalancerMonitorsListMonitorReferencesResponseItem {
- reference_type?: '*' | 'referral' | 'referrer';
-
- resource_id?: string;
-
- resource_name?: string;
-
- resource_type?: string;
- }
-}
-
-export namespace References {
- export import ReferenceLoadBalancerMonitorsListMonitorReferencesResponse = ReferencesAPI.ReferenceLoadBalancerMonitorsListMonitorReferencesResponse;
-}
diff --git a/src/resources/users/load-balancers/pools/health.ts b/src/resources/users/load-balancers/pools/health.ts
deleted file mode 100644
index 4f3c2ceacd..0000000000
--- a/src/resources/users/load-balancers/pools/health.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-import * as Core from 'cloudflare/core';
-import { APIResource } from 'cloudflare/resource';
-import * as HealthAPI from 'cloudflare/resources/users/load-balancers/pools/health';
-
-export class Health extends APIResource {
- /**
- * Fetch the latest pool health status for a single pool.
- */
- list(poolId: string, options?: Core.RequestOptions): Core.APIPromise {
- return (
- this._client.get(`/user/load_balancers/pools/${poolId}/health`, options) as Core.APIPromise<{
- result: HealthListResponse;
- }>
- )._thenUnwrap((obj) => obj.result);
- }
-}
-
-/**
- * A list of regions from which to run health checks. Null means every Cloudflare
- * data center.
- */
-export type HealthListResponse = unknown | string | null;
-
-export namespace Health {
- export import HealthListResponse = HealthAPI.HealthListResponse;
-}
diff --git a/src/resources/users/load-balancers/pools/index.ts b/src/resources/users/load-balancers/pools/index.ts
deleted file mode 100644
index 4e75a0fed9..0000000000
--- a/src/resources/users/load-balancers/pools/index.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-export { HealthListResponse, Health } from './health';
-export {
- PoolCreateResponse,
- PoolListResponse,
- PoolDeleteResponse,
- PoolEditResponse,
- PoolGetResponse,
- PoolCreateParams,
- PoolListParams,
- PoolEditParams,
- Pools,
-} from './pools';
-export { PreviewCreateResponse, PreviewCreateParams, Previews } from './previews';
-export { ReferenceListResponse, References } from './references';
diff --git a/src/resources/users/load-balancers/pools/previews.ts b/src/resources/users/load-balancers/pools/previews.ts
deleted file mode 100644
index 121f112dd6..0000000000
--- a/src/resources/users/load-balancers/pools/previews.ts
+++ /dev/null
@@ -1,137 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-import * as Core from 'cloudflare/core';
-import { APIResource } from 'cloudflare/resource';
-import * as PreviewsAPI from 'cloudflare/resources/users/load-balancers/pools/previews';
-
-export class Previews extends APIResource {
- /**
- * Preview pool health using provided monitor details. The returned preview_id can
- * be used in the preview endpoint to retrieve the results.
- */
- create(
- poolId: string,
- body: PreviewCreateParams,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
- return (
- this._client.post(`/user/load_balancers/pools/${poolId}/preview`, {
- body,
- ...options,
- }) as Core.APIPromise<{ result: PreviewCreateResponse }>
- )._thenUnwrap((obj) => obj.result);
- }
-}
-
-export interface PreviewCreateResponse {
- /**
- * Monitored pool IDs mapped to their respective names.
- */
- pools?: Record;
-
- preview_id?: string;
-}
-
-export interface PreviewCreateParams {
- /**
- * The expected HTTP response code or code range of the health check. This
- * parameter is only valid for HTTP and HTTPS monitors.
- */
- expected_codes: string;
-
- /**
- * Do not validate the certificate when monitor use HTTPS. This parameter is
- * currently only valid for HTTP and HTTPS monitors.
- */
- allow_insecure?: boolean;
-
- /**
- * To be marked unhealthy the monitored origin must fail this healthcheck N
- * consecutive times.
- */
- consecutive_down?: number;
-
- /**
- * To be marked healthy the monitored origin must pass this healthcheck N
- * consecutive times.
- */
- consecutive_up?: number;
-
- /**
- * Object description.
- */
- description?: string;
-
- /**
- * A case-insensitive sub-string to look for in the response body. If this string
- * is not found, the origin will be marked as unhealthy. This parameter is only
- * valid for HTTP and HTTPS monitors.
- */
- expected_body?: string;
-
- /**
- * Follow redirects if returned by the origin. This parameter is only valid for
- * HTTP and HTTPS monitors.
- */
- follow_redirects?: boolean;
-
- /**
- * The HTTP request headers to send in the health check. It is recommended you set
- * a Host header by default. The User-Agent header cannot be overridden. This
- * parameter is only valid for HTTP and HTTPS monitors.
- */
- header?: unknown;
-
- /**
- * The interval between each health check. Shorter intervals may improve failover
- * time, but will increase load on the origins as we check from multiple locations.
- */
- interval?: number;
-
- /**
- * The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS
- * based checks and 'connection_established' for TCP based health checks.
- */
- method?: string;
-
- /**
- * The endpoint path you want to conduct a health check against. This parameter is
- * only valid for HTTP and HTTPS monitors.
- */
- path?: string;
-
- /**
- * The port number to connect to for the health check. Required for TCP, UDP, and
- * SMTP checks. HTTP and HTTPS checks should only define the port when using a
- * non-standard port (HTTP: default 80, HTTPS: default 443).
- */
- port?: number;
-
- /**
- * Assign this monitor to emulate the specified zone while probing. This parameter
- * is only valid for HTTP and HTTPS monitors.
- */
- probe_zone?: string;
-
- /**
- * The number of retries to attempt in case of a timeout before marking the origin
- * as unhealthy. Retries are attempted immediately.
- */
- retries?: number;
-
- /**
- * The timeout (in seconds) before marking the health check as failed.
- */
- timeout?: number;
-
- /**
- * The protocol to use for the health check. Currently supported protocols are
- * 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
- */
- type?: 'http' | 'https' | 'tcp' | 'udp_icmp' | 'icmp_ping' | 'smtp';
-}
-
-export namespace Previews {
- export import PreviewCreateResponse = PreviewsAPI.PreviewCreateResponse;
- export import PreviewCreateParams = PreviewsAPI.PreviewCreateParams;
-}
diff --git a/src/resources/users/load-balancers/pools/references.ts b/src/resources/users/load-balancers/pools/references.ts
deleted file mode 100644
index de6e50aff9..0000000000
--- a/src/resources/users/load-balancers/pools/references.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-import * as Core from 'cloudflare/core';
-import { APIResource } from 'cloudflare/resource';
-import * as ReferencesAPI from 'cloudflare/resources/users/load-balancers/pools/references';
-
-export class References extends APIResource {
- /**
- * Get the list of resources that reference the provided pool.
- */
- list(poolId: string, options?: Core.RequestOptions): Core.APIPromise {
- return (
- this._client.get(`/user/load_balancers/pools/${poolId}/references`, options) as Core.APIPromise<{
- result: ReferenceListResponse | null;
- }>
- )._thenUnwrap((obj) => obj.result);
- }
-}
-
-/**
- * List of resources that reference a given pool.
- */
-export type ReferenceListResponse = Array;
-
-export namespace ReferenceListResponse {
- export interface ReferenceListResponseItem {
- reference_type?: '*' | 'referral' | 'referrer';
-
- resource_id?: string;
-
- resource_name?: string;
-
- resource_type?: string;
- }
-}
-
-export namespace References {
- export import ReferenceListResponse = ReferencesAPI.ReferenceListResponse;
-}
diff --git a/tests/api-resources/ai.test.ts b/tests/api-resources/ai.test.ts
index 0589ca0130..3c09b2e4b4 100644
--- a/tests/api-resources/ai.test.ts
+++ b/tests/api-resources/ai.test.ts
@@ -14,8 +14,8 @@ const cloudflare = new Cloudflare({
describe('resource ai', () => {
// skipped: tests are disabled for the time being
- test.skip('create: only required params', async () => {
- const responsePromise = cloudflare.ai.create('023e105f4ecef8ad9ca31a8372d0c353', 'string', {});
+ test.skip('run: only required params', async () => {
+ const responsePromise = cloudflare.ai.run('023e105f4ecef8ad9ca31a8372d0c353', 'string', {});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -26,7 +26,7 @@ describe('resource ai', () => {
});
// skipped: tests are disabled for the time being
- test.skip('create: required and optional params', async () => {
- const response = await cloudflare.ai.create('023e105f4ecef8ad9ca31a8372d0c353', 'string', {});
+ test.skip('run: required and optional params', async () => {
+ const response = await cloudflare.ai.run('023e105f4ecef8ad9ca31a8372d0c353', 'string', {});
});
});
diff --git a/tests/api-resources/billings/profiles.test.ts b/tests/api-resources/billing/profiles.test.ts
similarity index 88%
rename from tests/api-resources/billings/profiles.test.ts
rename to tests/api-resources/billing/profiles.test.ts
index ebb477bbce..62a190c4b3 100644
--- a/tests/api-resources/billings/profiles.test.ts
+++ b/tests/api-resources/billing/profiles.test.ts
@@ -15,7 +15,7 @@ const cloudflare = new Cloudflare({
describe('resource profiles', () => {
// skipped: tests are disabled for the time being
test.skip('get', async () => {
- const responsePromise = cloudflare.billings.profiles.get({});
+ const responsePromise = cloudflare.billing.profiles.get({});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -28,7 +28,7 @@ describe('resource profiles', () => {
// skipped: tests are disabled for the time being
test.skip('get: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(cloudflare.billings.profiles.get({}, { path: '/_stainless_unknown_path' })).rejects.toThrow(
+ await expect(cloudflare.billing.profiles.get({}, { path: '/_stainless_unknown_path' })).rejects.toThrow(
Cloudflare.NotFoundError,
);
});
diff --git a/tests/api-resources/dns-firewall/dns-analytics/reports/bytimes.test.ts b/tests/api-resources/dns/firewall/analytics/reports/bytimes.test.ts
similarity index 92%
rename from tests/api-resources/dns-firewall/dns-analytics/reports/bytimes.test.ts
rename to tests/api-resources/dns/firewall/analytics/reports/bytimes.test.ts
index ecfccd4a09..0a30806704 100644
--- a/tests/api-resources/dns-firewall/dns-analytics/reports/bytimes.test.ts
+++ b/tests/api-resources/dns/firewall/analytics/reports/bytimes.test.ts
@@ -15,7 +15,7 @@ const cloudflare = new Cloudflare({
describe('resource bytimes', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.dnsFirewall.dnsAnalytics.reports.bytimes.list(
+ const responsePromise = cloudflare.dns.firewall.analytics.reports.bytimes.list(
'023e105f4ecef8ad9ca31a8372d0c353',
'023e105f4ecef8ad9ca31a8372d0c353',
);
@@ -32,7 +32,7 @@ describe('resource bytimes', () => {
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.dnsFirewall.dnsAnalytics.reports.bytimes.list(
+ cloudflare.dns.firewall.analytics.reports.bytimes.list(
'023e105f4ecef8ad9ca31a8372d0c353',
'023e105f4ecef8ad9ca31a8372d0c353',
{ path: '/_stainless_unknown_path' },
@@ -44,7 +44,7 @@ describe('resource bytimes', () => {
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.dnsFirewall.dnsAnalytics.reports.bytimes.list(
+ cloudflare.dns.firewall.analytics.reports.bytimes.list(
'023e105f4ecef8ad9ca31a8372d0c353',
'023e105f4ecef8ad9ca31a8372d0c353',
{
diff --git a/tests/api-resources/dns-firewall/dns-analytics/reports/reports.test.ts b/tests/api-resources/dns/firewall/analytics/reports/reports.test.ts
similarity index 92%
rename from tests/api-resources/dns-firewall/dns-analytics/reports/reports.test.ts
rename to tests/api-resources/dns/firewall/analytics/reports/reports.test.ts
index 064d6973cf..e5dd2abad7 100644
--- a/tests/api-resources/dns-firewall/dns-analytics/reports/reports.test.ts
+++ b/tests/api-resources/dns/firewall/analytics/reports/reports.test.ts
@@ -15,7 +15,7 @@ const cloudflare = new Cloudflare({
describe('resource reports', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.dnsFirewall.dnsAnalytics.reports.list(
+ const responsePromise = cloudflare.dns.firewall.analytics.reports.list(
'023e105f4ecef8ad9ca31a8372d0c353',
'023e105f4ecef8ad9ca31a8372d0c353',
);
@@ -32,7 +32,7 @@ describe('resource reports', () => {
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.dnsFirewall.dnsAnalytics.reports.list(
+ cloudflare.dns.firewall.analytics.reports.list(
'023e105f4ecef8ad9ca31a8372d0c353',
'023e105f4ecef8ad9ca31a8372d0c353',
{ path: '/_stainless_unknown_path' },
@@ -44,7 +44,7 @@ describe('resource reports', () => {
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.dnsFirewall.dnsAnalytics.reports.list(
+ cloudflare.dns.firewall.analytics.reports.list(
'023e105f4ecef8ad9ca31a8372d0c353',
'023e105f4ecef8ad9ca31a8372d0c353',
{
diff --git a/tests/api-resources/dns-firewall/dns-firewall.test.ts b/tests/api-resources/dns/firewall/firewall.test.ts
similarity index 89%
rename from tests/api-resources/dns-firewall/dns-firewall.test.ts
rename to tests/api-resources/dns/firewall/firewall.test.ts
index e53389e95a..9e85ceabb9 100644
--- a/tests/api-resources/dns-firewall/dns-firewall.test.ts
+++ b/tests/api-resources/dns/firewall/firewall.test.ts
@@ -12,10 +12,10 @@ const cloudflare = new Cloudflare({
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
});
-describe('resource dnsFirewall', () => {
+describe('resource firewall', () => {
// skipped: tests are disabled for the time being
test.skip('create: only required params', async () => {
- const responsePromise = cloudflare.dnsFirewall.create('023e105f4ecef8ad9ca31a8372d0c353', {
+ const responsePromise = cloudflare.dns.firewall.create('023e105f4ecef8ad9ca31a8372d0c353', {
name: 'My Awesome DNS Firewall cluster',
upstream_ips: ['192.0.2.1', '198.51.100.1', '2001:DB8:100::CF'],
});
@@ -30,7 +30,7 @@ describe('resource dnsFirewall', () => {
// skipped: tests are disabled for the time being
test.skip('create: required and optional params', async () => {
- const response = await cloudflare.dnsFirewall.create('023e105f4ecef8ad9ca31a8372d0c353', {
+ const response = await cloudflare.dns.firewall.create('023e105f4ecef8ad9ca31a8372d0c353', {
name: 'My Awesome DNS Firewall cluster',
upstream_ips: ['192.0.2.1', '198.51.100.1', '2001:DB8:100::CF'],
attack_mitigation: {
@@ -51,7 +51,7 @@ describe('resource dnsFirewall', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.dnsFirewall.list('023e105f4ecef8ad9ca31a8372d0c353');
+ const responsePromise = cloudflare.dns.firewall.list('023e105f4ecef8ad9ca31a8372d0c353');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -65,7 +65,7 @@ describe('resource dnsFirewall', () => {
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.dnsFirewall.list('023e105f4ecef8ad9ca31a8372d0c353', { path: '/_stainless_unknown_path' }),
+ cloudflare.dns.firewall.list('023e105f4ecef8ad9ca31a8372d0c353', { path: '/_stainless_unknown_path' }),
).rejects.toThrow(Cloudflare.NotFoundError);
});
@@ -73,7 +73,7 @@ describe('resource dnsFirewall', () => {
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.dnsFirewall.list(
+ cloudflare.dns.firewall.list(
'023e105f4ecef8ad9ca31a8372d0c353',
{ page: 1, per_page: 1 },
{ path: '/_stainless_unknown_path' },
@@ -83,7 +83,7 @@ describe('resource dnsFirewall', () => {
// skipped: tests are disabled for the time being
test.skip('delete', async () => {
- const responsePromise = cloudflare.dnsFirewall.delete(
+ const responsePromise = cloudflare.dns.firewall.delete(
'023e105f4ecef8ad9ca31a8372d0c353',
'023e105f4ecef8ad9ca31a8372d0c353',
);
@@ -98,7 +98,7 @@ describe('resource dnsFirewall', () => {
// skipped: tests are disabled for the time being
test.skip('edit: only required params', async () => {
- const responsePromise = cloudflare.dnsFirewall.edit(
+ const responsePromise = cloudflare.dns.firewall.edit(
'023e105f4ecef8ad9ca31a8372d0c353',
'023e105f4ecef8ad9ca31a8372d0c353',
{
@@ -122,7 +122,7 @@ describe('resource dnsFirewall', () => {
// skipped: tests are disabled for the time being
test.skip('edit: required and optional params', async () => {
- const response = await cloudflare.dnsFirewall.edit(
+ const response = await cloudflare.dns.firewall.edit(
'023e105f4ecef8ad9ca31a8372d0c353',
'023e105f4ecef8ad9ca31a8372d0c353',
{
@@ -148,7 +148,7 @@ describe('resource dnsFirewall', () => {
// skipped: tests are disabled for the time being
test.skip('get', async () => {
- const responsePromise = cloudflare.dnsFirewall.get(
+ const responsePromise = cloudflare.dns.firewall.get(
'023e105f4ecef8ad9ca31a8372d0c353',
'023e105f4ecef8ad9ca31a8372d0c353',
);
@@ -165,7 +165,7 @@ describe('resource dnsFirewall', () => {
test.skip('get: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.dnsFirewall.get('023e105f4ecef8ad9ca31a8372d0c353', '023e105f4ecef8ad9ca31a8372d0c353', {
+ cloudflare.dns.firewall.get('023e105f4ecef8ad9ca31a8372d0c353', '023e105f4ecef8ad9ca31a8372d0c353', {
path: '/_stainless_unknown_path',
}),
).rejects.toThrow(Cloudflare.NotFoundError);
diff --git a/tests/api-resources/dns-records.test.ts b/tests/api-resources/dns/records.test.ts
similarity index 89%
rename from tests/api-resources/dns-records.test.ts
rename to tests/api-resources/dns/records.test.ts
index f7b157f7a4..81f93dcab5 100644
--- a/tests/api-resources/dns-records.test.ts
+++ b/tests/api-resources/dns/records.test.ts
@@ -12,10 +12,10 @@ const cloudflare = new Cloudflare({
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
});
-describe('resource dnsRecords', () => {
+describe('resource records', () => {
// skipped: tests are disabled for the time being
test.skip('create: only required params', async () => {
- const responsePromise = cloudflare.dnsRecords.create('023e105f4ecef8ad9ca31a8372d0c353', {
+ const responsePromise = cloudflare.dns.records.create('023e105f4ecef8ad9ca31a8372d0c353', {
name: 'example.com',
type: 'URI',
});
@@ -30,7 +30,7 @@ describe('resource dnsRecords', () => {
// skipped: tests are disabled for the time being
test.skip('create: required and optional params', async () => {
- const response = await cloudflare.dnsRecords.create('023e105f4ecef8ad9ca31a8372d0c353', {
+ const response = await cloudflare.dns.records.create('023e105f4ecef8ad9ca31a8372d0c353', {
name: 'example.com',
type: 'URI',
comment: 'Domain verification record',
@@ -85,7 +85,7 @@ describe('resource dnsRecords', () => {
// skipped: tests are disabled for the time being
test.skip('update: only required params', async () => {
- const responsePromise = cloudflare.dnsRecords.update(
+ const responsePromise = cloudflare.dns.records.update(
'023e105f4ecef8ad9ca31a8372d0c353',
'023e105f4ecef8ad9ca31a8372d0c353',
{ name: 'example.com', type: 'URI' },
@@ -101,7 +101,7 @@ describe('resource dnsRecords', () => {
// skipped: tests are disabled for the time being
test.skip('update: required and optional params', async () => {
- const response = await cloudflare.dnsRecords.update(
+ const response = await cloudflare.dns.records.update(
'023e105f4ecef8ad9ca31a8372d0c353',
'023e105f4ecef8ad9ca31a8372d0c353',
{
@@ -160,7 +160,7 @@ describe('resource dnsRecords', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.dnsRecords.list('023e105f4ecef8ad9ca31a8372d0c353');
+ const responsePromise = cloudflare.dns.records.list('023e105f4ecef8ad9ca31a8372d0c353');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -174,7 +174,7 @@ describe('resource dnsRecords', () => {
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.dnsRecords.list('023e105f4ecef8ad9ca31a8372d0c353', { path: '/_stainless_unknown_path' }),
+ cloudflare.dns.records.list('023e105f4ecef8ad9ca31a8372d0c353', { path: '/_stainless_unknown_path' }),
).rejects.toThrow(Cloudflare.NotFoundError);
});
@@ -182,7 +182,7 @@ describe('resource dnsRecords', () => {
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.dnsRecords.list(
+ cloudflare.dns.records.list(
'023e105f4ecef8ad9ca31a8372d0c353',
{
comment: {
@@ -220,7 +220,7 @@ describe('resource dnsRecords', () => {
// skipped: tests are disabled for the time being
test.skip('delete', async () => {
- const responsePromise = cloudflare.dnsRecords.delete(
+ const responsePromise = cloudflare.dns.records.delete(
'023e105f4ecef8ad9ca31a8372d0c353',
'023e105f4ecef8ad9ca31a8372d0c353',
);
@@ -235,7 +235,7 @@ describe('resource dnsRecords', () => {
// skipped: tests are disabled for the time being
test.skip('export', async () => {
- const responsePromise = cloudflare.dnsRecords.export('023e105f4ecef8ad9ca31a8372d0c353');
+ const responsePromise = cloudflare.dns.records.export('023e105f4ecef8ad9ca31a8372d0c353');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -249,13 +249,13 @@ describe('resource dnsRecords', () => {
test.skip('export: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.dnsRecords.export('023e105f4ecef8ad9ca31a8372d0c353', { path: '/_stainless_unknown_path' }),
+ cloudflare.dns.records.export('023e105f4ecef8ad9ca31a8372d0c353', { path: '/_stainless_unknown_path' }),
).rejects.toThrow(Cloudflare.NotFoundError);
});
// skipped: tests are disabled for the time being
test.skip('get', async () => {
- const responsePromise = cloudflare.dnsRecords.get(
+ const responsePromise = cloudflare.dns.records.get(
'023e105f4ecef8ad9ca31a8372d0c353',
'023e105f4ecef8ad9ca31a8372d0c353',
);
@@ -272,7 +272,7 @@ describe('resource dnsRecords', () => {
test.skip('get: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.dnsRecords.get('023e105f4ecef8ad9ca31a8372d0c353', '023e105f4ecef8ad9ca31a8372d0c353', {
+ cloudflare.dns.records.get('023e105f4ecef8ad9ca31a8372d0c353', '023e105f4ecef8ad9ca31a8372d0c353', {
path: '/_stainless_unknown_path',
}),
).rejects.toThrow(Cloudflare.NotFoundError);
@@ -280,7 +280,7 @@ describe('resource dnsRecords', () => {
// skipped: tests are disabled for the time being
test.skip('import: only required params', async () => {
- const responsePromise = cloudflare.dnsRecords.import('023e105f4ecef8ad9ca31a8372d0c353', {
+ const responsePromise = cloudflare.dns.records.import('023e105f4ecef8ad9ca31a8372d0c353', {
file: 'www.example.com. 300 IN A 127.0.0.1',
});
const rawResponse = await responsePromise.asResponse();
@@ -294,7 +294,7 @@ describe('resource dnsRecords', () => {
// skipped: tests are disabled for the time being
test.skip('import: required and optional params', async () => {
- const response = await cloudflare.dnsRecords.import('023e105f4ecef8ad9ca31a8372d0c353', {
+ const response = await cloudflare.dns.records.import('023e105f4ecef8ad9ca31a8372d0c353', {
file: 'www.example.com. 300 IN A 127.0.0.1',
proxied: 'true',
});
@@ -302,7 +302,7 @@ describe('resource dnsRecords', () => {
// skipped: tests are disabled for the time being
test.skip('scan', async () => {
- const responsePromise = cloudflare.dnsRecords.scan('023e105f4ecef8ad9ca31a8372d0c353');
+ const responsePromise = cloudflare.dns.records.scan('023e105f4ecef8ad9ca31a8372d0c353');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
diff --git a/tests/api-resources/hyperdrive/configs.test.ts b/tests/api-resources/hyperdrive/configs.test.ts
index 03799e4ce1..74999c5ba5 100644
--- a/tests/api-resources/hyperdrive/configs.test.ts
+++ b/tests/api-resources/hyperdrive/configs.test.ts
@@ -108,6 +108,22 @@ describe('resource configs', () => {
).rejects.toThrow(Cloudflare.NotFoundError);
});
+ // skipped: tests are disabled for the time being
+ test.skip('edit', async () => {
+ const responsePromise = cloudflare.hyperdrive.configs.edit(
+ '023e105f4ecef8ad9ca31a8372d0c353',
+ '023e105f4ecef8ad9ca31a8372d0c353',
+ {},
+ );
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
// skipped: tests are disabled for the time being
test.skip('get', async () => {
const responsePromise = cloudflare.hyperdrive.configs.get(
diff --git a/tests/api-resources/url-scanner/url-scanner.test.ts b/tests/api-resources/url-scanner/url-scanner.test.ts
index 7851288289..c58f2d1a99 100644
--- a/tests/api-resources/url-scanner/url-scanner.test.ts
+++ b/tests/api-resources/url-scanner/url-scanner.test.ts
@@ -44,9 +44,11 @@ describe('resource urlScanner', () => {
date_end: '2019-12-27T18:11:19.117Z',
date_start: '2019-12-27T18:11:19.117Z',
hostname: 'example.com',
+ ip: '1.1.1.1',
limit: 100,
next_cursor: 'string',
page_hostname: 'string',
+ page_ip: 'string',
page_path: 'string',
page_url: 'string',
path: '/samples/subresource-integrity/',
diff --git a/tests/api-resources/users/audit-logs.test.ts b/tests/api-resources/user/audit-logs.test.ts
similarity index 91%
rename from tests/api-resources/users/audit-logs.test.ts
rename to tests/api-resources/user/audit-logs.test.ts
index 745a250f31..68cced17dd 100644
--- a/tests/api-resources/users/audit-logs.test.ts
+++ b/tests/api-resources/user/audit-logs.test.ts
@@ -15,7 +15,7 @@ const cloudflare = new Cloudflare({
describe('resource auditLogs', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.users.auditLogs.list();
+ const responsePromise = cloudflare.user.auditLogs.list();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -28,7 +28,7 @@ describe('resource auditLogs', () => {
// skipped: tests are disabled for the time being
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(cloudflare.users.auditLogs.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
+ await expect(cloudflare.user.auditLogs.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
Cloudflare.NotFoundError,
);
});
@@ -37,7 +37,7 @@ describe('resource auditLogs', () => {
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.users.auditLogs.list(
+ cloudflare.user.auditLogs.list(
{
id: 'f174be97-19b1-40d6-954d-70cd5fbd52db',
action: { type: 'add' },
diff --git a/tests/api-resources/users/billings/history.test.ts b/tests/api-resources/user/billing/history.test.ts
similarity index 87%
rename from tests/api-resources/users/billings/history.test.ts
rename to tests/api-resources/user/billing/history.test.ts
index 28c9cf502b..d85b629f93 100644
--- a/tests/api-resources/users/billings/history.test.ts
+++ b/tests/api-resources/user/billing/history.test.ts
@@ -15,7 +15,7 @@ const cloudflare = new Cloudflare({
describe('resource history', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.users.billings.history.list();
+ const responsePromise = cloudflare.user.billing.history.list();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -28,16 +28,16 @@ describe('resource history', () => {
// skipped: tests are disabled for the time being
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(
- cloudflare.users.billings.history.list({ path: '/_stainless_unknown_path' }),
- ).rejects.toThrow(Cloudflare.NotFoundError);
+ await expect(cloudflare.user.billing.history.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
+ Cloudflare.NotFoundError,
+ );
});
// skipped: tests are disabled for the time being
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.users.billings.history.list(
+ cloudflare.user.billing.history.list(
{ order: 'occured_at', page: 1, per_page: 5 },
{ path: '/_stainless_unknown_path' },
),
diff --git a/tests/api-resources/users/billings/profiles.test.ts b/tests/api-resources/user/billing/profiles.test.ts
similarity index 85%
rename from tests/api-resources/users/billings/profiles.test.ts
rename to tests/api-resources/user/billing/profiles.test.ts
index 2a391b8a74..3355be999b 100644
--- a/tests/api-resources/users/billings/profiles.test.ts
+++ b/tests/api-resources/user/billing/profiles.test.ts
@@ -15,7 +15,7 @@ const cloudflare = new Cloudflare({
describe('resource profiles', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.users.billings.profiles.list();
+ const responsePromise = cloudflare.user.billing.profiles.list();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -28,8 +28,8 @@ describe('resource profiles', () => {
// skipped: tests are disabled for the time being
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(
- cloudflare.users.billings.profiles.list({ path: '/_stainless_unknown_path' }),
- ).rejects.toThrow(Cloudflare.NotFoundError);
+ await expect(cloudflare.user.billing.profiles.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
+ Cloudflare.NotFoundError,
+ );
});
});
diff --git a/tests/api-resources/users/firewall/access-rules/rules.test.ts b/tests/api-resources/user/firewall/access-rules/rules.test.ts
similarity index 88%
rename from tests/api-resources/users/firewall/access-rules/rules.test.ts
rename to tests/api-resources/user/firewall/access-rules/rules.test.ts
index 8e6701c5bc..fb78484f69 100644
--- a/tests/api-resources/users/firewall/access-rules/rules.test.ts
+++ b/tests/api-resources/user/firewall/access-rules/rules.test.ts
@@ -15,7 +15,7 @@ const cloudflare = new Cloudflare({
describe('resource rules', () => {
// skipped: tests are disabled for the time being
test.skip('create: only required params', async () => {
- const responsePromise = cloudflare.users.firewall.accessRules.rules.create({
+ const responsePromise = cloudflare.user.firewall.accessRules.rules.create({
configuration: {},
mode: 'challenge',
});
@@ -30,7 +30,7 @@ describe('resource rules', () => {
// skipped: tests are disabled for the time being
test.skip('create: required and optional params', async () => {
- const response = await cloudflare.users.firewall.accessRules.rules.create({
+ const response = await cloudflare.user.firewall.accessRules.rules.create({
configuration: { target: 'ip', value: '198.51.100.4' },
mode: 'challenge',
notes: 'This rule is enabled because of an event that occurred on date X.',
@@ -39,7 +39,7 @@ describe('resource rules', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.users.firewall.accessRules.rules.list();
+ const responsePromise = cloudflare.user.firewall.accessRules.rules.list();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -53,7 +53,7 @@ describe('resource rules', () => {
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.users.firewall.accessRules.rules.list({ path: '/_stainless_unknown_path' }),
+ cloudflare.user.firewall.accessRules.rules.list({ path: '/_stainless_unknown_path' }),
).rejects.toThrow(Cloudflare.NotFoundError);
});
@@ -61,7 +61,7 @@ describe('resource rules', () => {
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.users.firewall.accessRules.rules.list(
+ cloudflare.user.firewall.accessRules.rules.list(
{
direction: 'desc',
'egs-pagination': { json: { page: 1, per_page: 1 } },
@@ -83,7 +83,7 @@ describe('resource rules', () => {
// skipped: tests are disabled for the time being
test.skip('delete', async () => {
- const responsePromise = cloudflare.users.firewall.accessRules.rules.delete(
+ const responsePromise = cloudflare.user.firewall.accessRules.rules.delete(
'92f17202ed8bd63d69a66b86a49a8f6b',
);
const rawResponse = await responsePromise.asResponse();
@@ -97,7 +97,7 @@ describe('resource rules', () => {
// skipped: tests are disabled for the time being
test.skip('edit', async () => {
- const responsePromise = cloudflare.users.firewall.accessRules.rules.edit(
+ const responsePromise = cloudflare.user.firewall.accessRules.rules.edit(
'92f17202ed8bd63d69a66b86a49a8f6b',
{},
);
diff --git a/tests/api-resources/users/invites.test.ts b/tests/api-resources/user/invites.test.ts
similarity index 84%
rename from tests/api-resources/users/invites.test.ts
rename to tests/api-resources/user/invites.test.ts
index 74acb91b1c..a2eff985e1 100644
--- a/tests/api-resources/users/invites.test.ts
+++ b/tests/api-resources/user/invites.test.ts
@@ -15,7 +15,7 @@ const cloudflare = new Cloudflare({
describe('resource invites', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.users.invites.list();
+ const responsePromise = cloudflare.user.invites.list();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -28,14 +28,14 @@ describe('resource invites', () => {
// skipped: tests are disabled for the time being
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(cloudflare.users.invites.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
+ await expect(cloudflare.user.invites.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
Cloudflare.NotFoundError,
);
});
// skipped: tests are disabled for the time being
test.skip('edit: only required params', async () => {
- const responsePromise = cloudflare.users.invites.edit('4f5f0c14a2a41d5063dd301b2f829f04', {
+ const responsePromise = cloudflare.user.invites.edit('4f5f0c14a2a41d5063dd301b2f829f04', {
status: 'accepted',
});
const rawResponse = await responsePromise.asResponse();
@@ -49,14 +49,14 @@ describe('resource invites', () => {
// skipped: tests are disabled for the time being
test.skip('edit: required and optional params', async () => {
- const response = await cloudflare.users.invites.edit('4f5f0c14a2a41d5063dd301b2f829f04', {
+ const response = await cloudflare.user.invites.edit('4f5f0c14a2a41d5063dd301b2f829f04', {
status: 'accepted',
});
});
// skipped: tests are disabled for the time being
test.skip('get', async () => {
- const responsePromise = cloudflare.users.invites.get('4f5f0c14a2a41d5063dd301b2f829f04');
+ const responsePromise = cloudflare.user.invites.get('4f5f0c14a2a41d5063dd301b2f829f04');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -70,7 +70,7 @@ describe('resource invites', () => {
test.skip('get: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.users.invites.get('4f5f0c14a2a41d5063dd301b2f829f04', { path: '/_stainless_unknown_path' }),
+ cloudflare.user.invites.get('4f5f0c14a2a41d5063dd301b2f829f04', { path: '/_stainless_unknown_path' }),
).rejects.toThrow(Cloudflare.NotFoundError);
});
});
diff --git a/tests/api-resources/users/load-balancers/monitors/monitors.test.ts b/tests/api-resources/user/load-balancers/monitors.test.ts
similarity index 60%
rename from tests/api-resources/users/load-balancers/monitors/monitors.test.ts
rename to tests/api-resources/user/load-balancers/monitors.test.ts
index 915f037c19..9ccfd104d8 100644
--- a/tests/api-resources/users/load-balancers/monitors/monitors.test.ts
+++ b/tests/api-resources/user/load-balancers/monitors.test.ts
@@ -15,7 +15,7 @@ const cloudflare = new Cloudflare({
describe('resource monitors', () => {
// skipped: tests are disabled for the time being
test.skip('create: only required params', async () => {
- const responsePromise = cloudflare.users.loadBalancers.monitors.create({ expected_codes: '2xx' });
+ const responsePromise = cloudflare.user.loadBalancers.monitors.create({ expected_codes: '2xx' });
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -27,7 +27,7 @@ describe('resource monitors', () => {
// skipped: tests are disabled for the time being
test.skip('create: required and optional params', async () => {
- const response = await cloudflare.users.loadBalancers.monitors.create({
+ const response = await cloudflare.user.loadBalancers.monitors.create({
expected_codes: '2xx',
allow_insecure: true,
consecutive_down: 0,
@@ -49,7 +49,7 @@ describe('resource monitors', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.users.loadBalancers.monitors.list();
+ const responsePromise = cloudflare.user.loadBalancers.monitors.list();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -63,15 +63,13 @@ describe('resource monitors', () => {
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.users.loadBalancers.monitors.list({ path: '/_stainless_unknown_path' }),
+ cloudflare.user.loadBalancers.monitors.list({ path: '/_stainless_unknown_path' }),
).rejects.toThrow(Cloudflare.NotFoundError);
});
// skipped: tests are disabled for the time being
test.skip('delete', async () => {
- const responsePromise = cloudflare.users.loadBalancers.monitors.delete(
- 'f1aba936b94213e5b8dca0c0dbf1f9cc',
- );
+ const responsePromise = cloudflare.user.loadBalancers.monitors.delete('f1aba936b94213e5b8dca0c0dbf1f9cc');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -83,7 +81,7 @@ describe('resource monitors', () => {
// skipped: tests are disabled for the time being
test.skip('edit: only required params', async () => {
- const responsePromise = cloudflare.users.loadBalancers.monitors.edit('f1aba936b94213e5b8dca0c0dbf1f9cc', {
+ const responsePromise = cloudflare.user.loadBalancers.monitors.edit('f1aba936b94213e5b8dca0c0dbf1f9cc', {
expected_codes: '2xx',
});
const rawResponse = await responsePromise.asResponse();
@@ -97,7 +95,7 @@ describe('resource monitors', () => {
// skipped: tests are disabled for the time being
test.skip('edit: required and optional params', async () => {
- const response = await cloudflare.users.loadBalancers.monitors.edit('f1aba936b94213e5b8dca0c0dbf1f9cc', {
+ const response = await cloudflare.user.loadBalancers.monitors.edit('f1aba936b94213e5b8dca0c0dbf1f9cc', {
expected_codes: '2xx',
allow_insecure: true,
consecutive_down: 0,
@@ -119,7 +117,7 @@ describe('resource monitors', () => {
// skipped: tests are disabled for the time being
test.skip('get', async () => {
- const responsePromise = cloudflare.users.loadBalancers.monitors.get('f1aba936b94213e5b8dca0c0dbf1f9cc');
+ const responsePromise = cloudflare.user.loadBalancers.monitors.get('f1aba936b94213e5b8dca0c0dbf1f9cc');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -133,7 +131,71 @@ describe('resource monitors', () => {
test.skip('get: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.users.loadBalancers.monitors.get('f1aba936b94213e5b8dca0c0dbf1f9cc', {
+ cloudflare.user.loadBalancers.monitors.get('f1aba936b94213e5b8dca0c0dbf1f9cc', {
+ path: '/_stainless_unknown_path',
+ }),
+ ).rejects.toThrow(Cloudflare.NotFoundError);
+ });
+
+ // skipped: tests are disabled for the time being
+ test.skip('preview: only required params', async () => {
+ const responsePromise = cloudflare.user.loadBalancers.monitors.preview(
+ 'f1aba936b94213e5b8dca0c0dbf1f9cc',
+ { expected_codes: '2xx' },
+ );
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // skipped: tests are disabled for the time being
+ test.skip('preview: required and optional params', async () => {
+ const response = await cloudflare.user.loadBalancers.monitors.preview(
+ 'f1aba936b94213e5b8dca0c0dbf1f9cc',
+ {
+ expected_codes: '2xx',
+ allow_insecure: true,
+ consecutive_down: 0,
+ consecutive_up: 0,
+ description: 'Login page monitor',
+ expected_body: 'alive',
+ follow_redirects: true,
+ header: { Host: ['example.com'], 'X-App-ID': ['abc123'] },
+ interval: 0,
+ method: 'GET',
+ path: '/health',
+ port: 0,
+ probe_zone: 'example.com',
+ retries: 0,
+ timeout: 0,
+ type: 'https',
+ },
+ );
+ });
+
+ // skipped: tests are disabled for the time being
+ test.skip('references', async () => {
+ const responsePromise = cloudflare.user.loadBalancers.monitors.references(
+ 'f1aba936b94213e5b8dca0c0dbf1f9cc',
+ );
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // skipped: tests are disabled for the time being
+ test.skip('references: request options instead of params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ cloudflare.user.loadBalancers.monitors.references('f1aba936b94213e5b8dca0c0dbf1f9cc', {
path: '/_stainless_unknown_path',
}),
).rejects.toThrow(Cloudflare.NotFoundError);
diff --git a/tests/api-resources/users/load-balancers/pools/pools.test.ts b/tests/api-resources/user/load-balancers/pools.test.ts
similarity index 57%
rename from tests/api-resources/users/load-balancers/pools/pools.test.ts
rename to tests/api-resources/user/load-balancers/pools.test.ts
index c90c5f758b..1d7ff02100 100644
--- a/tests/api-resources/users/load-balancers/pools/pools.test.ts
+++ b/tests/api-resources/user/load-balancers/pools.test.ts
@@ -15,7 +15,7 @@ const cloudflare = new Cloudflare({
describe('resource pools', () => {
// skipped: tests are disabled for the time being
test.skip('create: only required params', async () => {
- const responsePromise = cloudflare.users.loadBalancers.pools.create({
+ const responsePromise = cloudflare.user.loadBalancers.pools.create({
name: 'primary-dc-1',
origins: [{}, {}, {}],
});
@@ -30,7 +30,7 @@ describe('resource pools', () => {
// skipped: tests are disabled for the time being
test.skip('create: required and optional params', async () => {
- const response = await cloudflare.users.loadBalancers.pools.create({
+ const response = await cloudflare.user.loadBalancers.pools.create({
name: 'primary-dc-1',
origins: [
{
@@ -82,7 +82,7 @@ describe('resource pools', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.users.loadBalancers.pools.list();
+ const responsePromise = cloudflare.user.loadBalancers.pools.list();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -96,7 +96,7 @@ describe('resource pools', () => {
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.users.loadBalancers.pools.list({ path: '/_stainless_unknown_path' }),
+ cloudflare.user.loadBalancers.pools.list({ path: '/_stainless_unknown_path' }),
).rejects.toThrow(Cloudflare.NotFoundError);
});
@@ -104,13 +104,13 @@ describe('resource pools', () => {
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.users.loadBalancers.pools.list({ monitor: {} }, { path: '/_stainless_unknown_path' }),
+ cloudflare.user.loadBalancers.pools.list({ monitor: {} }, { path: '/_stainless_unknown_path' }),
).rejects.toThrow(Cloudflare.NotFoundError);
});
// skipped: tests are disabled for the time being
test.skip('delete', async () => {
- const responsePromise = cloudflare.users.loadBalancers.pools.delete('17b5962d775c646f3f9725cbc7a53df4');
+ const responsePromise = cloudflare.user.loadBalancers.pools.delete('17b5962d775c646f3f9725cbc7a53df4');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -122,7 +122,7 @@ describe('resource pools', () => {
// skipped: tests are disabled for the time being
test.skip('edit', async () => {
- const responsePromise = cloudflare.users.loadBalancers.pools.edit('17b5962d775c646f3f9725cbc7a53df4', {});
+ const responsePromise = cloudflare.user.loadBalancers.pools.edit('17b5962d775c646f3f9725cbc7a53df4', {});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -134,7 +134,7 @@ describe('resource pools', () => {
// skipped: tests are disabled for the time being
test.skip('get', async () => {
- const responsePromise = cloudflare.users.loadBalancers.pools.get('17b5962d775c646f3f9725cbc7a53df4');
+ const responsePromise = cloudflare.user.loadBalancers.pools.get('17b5962d775c646f3f9725cbc7a53df4');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -148,7 +148,89 @@ describe('resource pools', () => {
test.skip('get: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.users.loadBalancers.pools.get('17b5962d775c646f3f9725cbc7a53df4', {
+ cloudflare.user.loadBalancers.pools.get('17b5962d775c646f3f9725cbc7a53df4', {
+ path: '/_stainless_unknown_path',
+ }),
+ ).rejects.toThrow(Cloudflare.NotFoundError);
+ });
+
+ // skipped: tests are disabled for the time being
+ test.skip('health', async () => {
+ const responsePromise = cloudflare.user.loadBalancers.pools.health('17b5962d775c646f3f9725cbc7a53df4');
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // skipped: tests are disabled for the time being
+ test.skip('health: request options instead of params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ cloudflare.user.loadBalancers.pools.health('17b5962d775c646f3f9725cbc7a53df4', {
+ path: '/_stainless_unknown_path',
+ }),
+ ).rejects.toThrow(Cloudflare.NotFoundError);
+ });
+
+ // skipped: tests are disabled for the time being
+ test.skip('preview: only required params', async () => {
+ const responsePromise = cloudflare.user.loadBalancers.pools.preview('17b5962d775c646f3f9725cbc7a53df4', {
+ expected_codes: '2xx',
+ });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // skipped: tests are disabled for the time being
+ test.skip('preview: required and optional params', async () => {
+ const response = await cloudflare.user.loadBalancers.pools.preview('17b5962d775c646f3f9725cbc7a53df4', {
+ expected_codes: '2xx',
+ allow_insecure: true,
+ consecutive_down: 0,
+ consecutive_up: 0,
+ description: 'Login page monitor',
+ expected_body: 'alive',
+ follow_redirects: true,
+ header: { Host: ['example.com'], 'X-App-ID': ['abc123'] },
+ interval: 0,
+ method: 'GET',
+ path: '/health',
+ port: 0,
+ probe_zone: 'example.com',
+ retries: 0,
+ timeout: 0,
+ type: 'https',
+ });
+ });
+
+ // skipped: tests are disabled for the time being
+ test.skip('references', async () => {
+ const responsePromise = cloudflare.user.loadBalancers.pools.references(
+ '17b5962d775c646f3f9725cbc7a53df4',
+ );
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // skipped: tests are disabled for the time being
+ test.skip('references: request options instead of params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ cloudflare.user.loadBalancers.pools.references('17b5962d775c646f3f9725cbc7a53df4', {
path: '/_stainless_unknown_path',
}),
).rejects.toThrow(Cloudflare.NotFoundError);
diff --git a/tests/api-resources/users/load-balancers/previews.test.ts b/tests/api-resources/user/load-balancers/preview.test.ts
similarity index 85%
rename from tests/api-resources/users/load-balancers/previews.test.ts
rename to tests/api-resources/user/load-balancers/preview.test.ts
index fdfa7f256d..dcfdd1283f 100644
--- a/tests/api-resources/users/load-balancers/previews.test.ts
+++ b/tests/api-resources/user/load-balancers/preview.test.ts
@@ -12,10 +12,10 @@ const cloudflare = new Cloudflare({
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
});
-describe('resource previews', () => {
+describe('resource preview', () => {
// skipped: tests are disabled for the time being
test.skip('get', async () => {
- const responsePromise = cloudflare.users.loadBalancers.previews.get('f1aba936b94213e5b8dca0c0dbf1f9cc');
+ const responsePromise = cloudflare.user.loadBalancers.preview.get('f1aba936b94213e5b8dca0c0dbf1f9cc');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -29,7 +29,7 @@ describe('resource previews', () => {
test.skip('get: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.users.loadBalancers.previews.get('f1aba936b94213e5b8dca0c0dbf1f9cc', {
+ cloudflare.user.loadBalancers.preview.get('f1aba936b94213e5b8dca0c0dbf1f9cc', {
path: '/_stainless_unknown_path',
}),
).rejects.toThrow(Cloudflare.NotFoundError);
diff --git a/tests/api-resources/users/load-balancing-analytics/events.test.ts b/tests/api-resources/user/load-balancing-analytics/events.test.ts
similarity index 89%
rename from tests/api-resources/users/load-balancing-analytics/events.test.ts
rename to tests/api-resources/user/load-balancing-analytics/events.test.ts
index 931fcc48c9..35d9089d5d 100644
--- a/tests/api-resources/users/load-balancing-analytics/events.test.ts
+++ b/tests/api-resources/user/load-balancing-analytics/events.test.ts
@@ -15,7 +15,7 @@ const cloudflare = new Cloudflare({
describe('resource events', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.users.loadBalancingAnalytics.events.list();
+ const responsePromise = cloudflare.user.loadBalancingAnalytics.events.list();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -29,7 +29,7 @@ describe('resource events', () => {
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.users.loadBalancingAnalytics.events.list({ path: '/_stainless_unknown_path' }),
+ cloudflare.user.loadBalancingAnalytics.events.list({ path: '/_stainless_unknown_path' }),
).rejects.toThrow(Cloudflare.NotFoundError);
});
@@ -37,7 +37,7 @@ describe('resource events', () => {
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.users.loadBalancingAnalytics.events.list(
+ cloudflare.user.loadBalancingAnalytics.events.list(
{
origin_healthy: true,
origin_name: 'primary-dc-1',
diff --git a/tests/api-resources/users/organizations.test.ts b/tests/api-resources/user/organizations.test.ts
similarity index 86%
rename from tests/api-resources/users/organizations.test.ts
rename to tests/api-resources/user/organizations.test.ts
index f19bf3f769..fa07292929 100644
--- a/tests/api-resources/users/organizations.test.ts
+++ b/tests/api-resources/user/organizations.test.ts
@@ -15,7 +15,7 @@ const cloudflare = new Cloudflare({
describe('resource organizations', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.users.organizations.list();
+ const responsePromise = cloudflare.user.organizations.list();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -28,7 +28,7 @@ describe('resource organizations', () => {
// skipped: tests are disabled for the time being
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(cloudflare.users.organizations.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
+ await expect(cloudflare.user.organizations.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
Cloudflare.NotFoundError,
);
});
@@ -37,7 +37,7 @@ describe('resource organizations', () => {
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.users.organizations.list(
+ cloudflare.user.organizations.list(
{
direction: 'desc',
match: 'any',
@@ -54,7 +54,7 @@ describe('resource organizations', () => {
// skipped: tests are disabled for the time being
test.skip('delete', async () => {
- const responsePromise = cloudflare.users.organizations.delete('023e105f4ecef8ad9ca31a8372d0c353');
+ const responsePromise = cloudflare.user.organizations.delete('023e105f4ecef8ad9ca31a8372d0c353');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -66,7 +66,7 @@ describe('resource organizations', () => {
// skipped: tests are disabled for the time being
test.skip('get', async () => {
- const responsePromise = cloudflare.users.organizations.get('023e105f4ecef8ad9ca31a8372d0c353');
+ const responsePromise = cloudflare.user.organizations.get('023e105f4ecef8ad9ca31a8372d0c353');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -80,7 +80,7 @@ describe('resource organizations', () => {
test.skip('get: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.users.organizations.get('023e105f4ecef8ad9ca31a8372d0c353', {
+ cloudflare.user.organizations.get('023e105f4ecef8ad9ca31a8372d0c353', {
path: '/_stainless_unknown_path',
}),
).rejects.toThrow(Cloudflare.NotFoundError);
diff --git a/tests/api-resources/users/subscriptions.test.ts b/tests/api-resources/user/subscriptions.test.ts
similarity index 85%
rename from tests/api-resources/users/subscriptions.test.ts
rename to tests/api-resources/user/subscriptions.test.ts
index 738cb520b6..8bbdeefe3c 100644
--- a/tests/api-resources/users/subscriptions.test.ts
+++ b/tests/api-resources/user/subscriptions.test.ts
@@ -15,7 +15,7 @@ const cloudflare = new Cloudflare({
describe('resource subscriptions', () => {
// skipped: tests are disabled for the time being
test.skip('update', async () => {
- const responsePromise = cloudflare.users.subscriptions.update('506e3185e9c882d175a2d0cb0093d9f2', {});
+ const responsePromise = cloudflare.user.subscriptions.update('506e3185e9c882d175a2d0cb0093d9f2', {});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -27,7 +27,7 @@ describe('resource subscriptions', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.users.subscriptions.list();
+ const responsePromise = cloudflare.user.subscriptions.list();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -40,14 +40,14 @@ describe('resource subscriptions', () => {
// skipped: tests are disabled for the time being
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(cloudflare.users.subscriptions.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
+ await expect(cloudflare.user.subscriptions.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
Cloudflare.NotFoundError,
);
});
// skipped: tests are disabled for the time being
test.skip('delete', async () => {
- const responsePromise = cloudflare.users.subscriptions.delete('506e3185e9c882d175a2d0cb0093d9f2');
+ const responsePromise = cloudflare.user.subscriptions.delete('506e3185e9c882d175a2d0cb0093d9f2');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
diff --git a/tests/api-resources/users/tokens/permission-groups.test.ts b/tests/api-resources/user/tokens/permission-groups.test.ts
similarity index 89%
rename from tests/api-resources/users/tokens/permission-groups.test.ts
rename to tests/api-resources/user/tokens/permission-groups.test.ts
index 7731ae06a2..941286f464 100644
--- a/tests/api-resources/users/tokens/permission-groups.test.ts
+++ b/tests/api-resources/user/tokens/permission-groups.test.ts
@@ -15,7 +15,7 @@ const cloudflare = new Cloudflare({
describe('resource permissionGroups', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.users.tokens.permissionGroups.list();
+ const responsePromise = cloudflare.user.tokens.permissionGroups.list();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -29,7 +29,7 @@ describe('resource permissionGroups', () => {
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.users.tokens.permissionGroups.list({ path: '/_stainless_unknown_path' }),
+ cloudflare.user.tokens.permissionGroups.list({ path: '/_stainless_unknown_path' }),
).rejects.toThrow(Cloudflare.NotFoundError);
});
});
diff --git a/tests/api-resources/users/tokens/tokens.test.ts b/tests/api-resources/user/tokens/tokens.test.ts
similarity index 92%
rename from tests/api-resources/users/tokens/tokens.test.ts
rename to tests/api-resources/user/tokens/tokens.test.ts
index 6ffd81d822..fabec80069 100644
--- a/tests/api-resources/users/tokens/tokens.test.ts
+++ b/tests/api-resources/user/tokens/tokens.test.ts
@@ -15,7 +15,7 @@ const cloudflare = new Cloudflare({
describe('resource tokens', () => {
// skipped: tests are disabled for the time being
test.skip('create: only required params', async () => {
- const responsePromise = cloudflare.users.tokens.create({
+ const responsePromise = cloudflare.user.tokens.create({
name: 'readonly token',
policies: [
{
@@ -55,7 +55,7 @@ describe('resource tokens', () => {
// skipped: tests are disabled for the time being
test.skip('create: required and optional params', async () => {
- const response = await cloudflare.users.tokens.create({
+ const response = await cloudflare.user.tokens.create({
name: 'readonly token',
policies: [
{
@@ -96,7 +96,7 @@ describe('resource tokens', () => {
// skipped: tests are disabled for the time being
test.skip('update: only required params', async () => {
- const responsePromise = cloudflare.users.tokens.update(
+ const responsePromise = cloudflare.user.tokens.update(
{},
{
name: 'readonly token',
@@ -140,7 +140,7 @@ describe('resource tokens', () => {
// skipped: tests are disabled for the time being
test.skip('update: required and optional params', async () => {
- const response = await cloudflare.users.tokens.update(
+ const response = await cloudflare.user.tokens.update(
{},
{
name: 'readonly token',
@@ -185,7 +185,7 @@ describe('resource tokens', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.users.tokens.list();
+ const responsePromise = cloudflare.user.tokens.list();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -198,7 +198,7 @@ describe('resource tokens', () => {
// skipped: tests are disabled for the time being
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(cloudflare.users.tokens.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
+ await expect(cloudflare.user.tokens.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
Cloudflare.NotFoundError,
);
});
@@ -207,7 +207,7 @@ describe('resource tokens', () => {
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- cloudflare.users.tokens.list(
+ cloudflare.user.tokens.list(
{ direction: 'desc', page: 1, per_page: 5 },
{ path: '/_stainless_unknown_path' },
),
@@ -216,7 +216,7 @@ describe('resource tokens', () => {
// skipped: tests are disabled for the time being
test.skip('delete', async () => {
- const responsePromise = cloudflare.users.tokens.delete({});
+ const responsePromise = cloudflare.user.tokens.delete({});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -228,7 +228,7 @@ describe('resource tokens', () => {
// skipped: tests are disabled for the time being
test.skip('get', async () => {
- const responsePromise = cloudflare.users.tokens.get({});
+ const responsePromise = cloudflare.user.tokens.get({});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -241,14 +241,14 @@ describe('resource tokens', () => {
// skipped: tests are disabled for the time being
test.skip('get: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(cloudflare.users.tokens.get({}, { path: '/_stainless_unknown_path' })).rejects.toThrow(
+ await expect(cloudflare.user.tokens.get({}, { path: '/_stainless_unknown_path' })).rejects.toThrow(
Cloudflare.NotFoundError,
);
});
// skipped: tests are disabled for the time being
test.skip('verify', async () => {
- const responsePromise = cloudflare.users.tokens.verify();
+ const responsePromise = cloudflare.user.tokens.verify();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -261,7 +261,7 @@ describe('resource tokens', () => {
// skipped: tests are disabled for the time being
test.skip('verify: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(cloudflare.users.tokens.verify({ path: '/_stainless_unknown_path' })).rejects.toThrow(
+ await expect(cloudflare.user.tokens.verify({ path: '/_stainless_unknown_path' })).rejects.toThrow(
Cloudflare.NotFoundError,
);
});
diff --git a/tests/api-resources/users/tokens/values.test.ts b/tests/api-resources/user/tokens/values.test.ts
similarity index 89%
rename from tests/api-resources/users/tokens/values.test.ts
rename to tests/api-resources/user/tokens/values.test.ts
index 6a8caf611b..53c42c43d4 100644
--- a/tests/api-resources/users/tokens/values.test.ts
+++ b/tests/api-resources/user/tokens/values.test.ts
@@ -15,7 +15,7 @@ const cloudflare = new Cloudflare({
describe('resource values', () => {
// skipped: tests are disabled for the time being
test.skip('update: only required params', async () => {
- const responsePromise = cloudflare.users.tokens.values.update({}, {});
+ const responsePromise = cloudflare.user.tokens.values.update({}, {});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -27,6 +27,6 @@ describe('resource values', () => {
// skipped: tests are disabled for the time being
test.skip('update: required and optional params', async () => {
- const response = await cloudflare.users.tokens.values.update({}, {});
+ const response = await cloudflare.user.tokens.values.update({}, {});
});
});
diff --git a/tests/api-resources/users/users.test.ts b/tests/api-resources/user/user.test.ts
similarity index 88%
rename from tests/api-resources/users/users.test.ts
rename to tests/api-resources/user/user.test.ts
index 7257e08714..b3107b2f4e 100644
--- a/tests/api-resources/users/users.test.ts
+++ b/tests/api-resources/user/user.test.ts
@@ -12,10 +12,10 @@ const cloudflare = new Cloudflare({
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
});
-describe('resource users', () => {
+describe('resource user', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
- const responsePromise = cloudflare.users.list();
+ const responsePromise = cloudflare.user.list();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -28,14 +28,14 @@ describe('resource users', () => {
// skipped: tests are disabled for the time being
test.skip('list: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(cloudflare.users.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
+ await expect(cloudflare.user.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
Cloudflare.NotFoundError,
);
});
// skipped: tests are disabled for the time being
test.skip('edit', async () => {
- const responsePromise = cloudflare.users.edit({});
+ const responsePromise = cloudflare.user.edit({});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
diff --git a/tests/api-resources/users/load-balancers/monitors/previews.test.ts b/tests/api-resources/users/load-balancers/monitors/previews.test.ts
deleted file mode 100644
index 486ed65cb6..0000000000
--- a/tests/api-resources/users/load-balancers/monitors/previews.test.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-import Cloudflare from 'cloudflare';
-import { Response } from 'node-fetch';
-
-const cloudflare = new Cloudflare({
- apiKey: '144c9defac04969c7bfad8efaa8ea194',
- apiEmail: 'user@example.com',
- apiToken: 'Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY',
- userServiceKey:
- 'v1.0-144c9defac04969c7bfad8ef-631a41d003a32d25fe878081ef365c49503f7fada600da935e2851a1c7326084b85cbf6429c4b859de8475731dc92a9c329631e6d59e6c73da7b198497172b4cefe071d90d0f5d2719',
- baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
-});
-
-describe('resource previews', () => {
- // skipped: tests are disabled for the time being
- test.skip('create: only required params', async () => {
- const responsePromise = cloudflare.users.loadBalancers.monitors.previews.create(
- 'f1aba936b94213e5b8dca0c0dbf1f9cc',
- { expected_codes: '2xx' },
- );
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('create: required and optional params', async () => {
- const response = await cloudflare.users.loadBalancers.monitors.previews.create(
- 'f1aba936b94213e5b8dca0c0dbf1f9cc',
- {
- expected_codes: '2xx',
- allow_insecure: true,
- consecutive_down: 0,
- consecutive_up: 0,
- description: 'Login page monitor',
- expected_body: 'alive',
- follow_redirects: true,
- header: { Host: ['example.com'], 'X-App-ID': ['abc123'] },
- interval: 0,
- method: 'GET',
- path: '/health',
- port: 0,
- probe_zone: 'example.com',
- retries: 0,
- timeout: 0,
- type: 'https',
- },
- );
- });
-});
diff --git a/tests/api-resources/users/load-balancers/monitors/references.test.ts b/tests/api-resources/users/load-balancers/monitors/references.test.ts
deleted file mode 100644
index c13b655665..0000000000
--- a/tests/api-resources/users/load-balancers/monitors/references.test.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-import Cloudflare from 'cloudflare';
-import { Response } from 'node-fetch';
-
-const cloudflare = new Cloudflare({
- apiKey: '144c9defac04969c7bfad8efaa8ea194',
- apiEmail: 'user@example.com',
- apiToken: 'Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY',
- userServiceKey:
- 'v1.0-144c9defac04969c7bfad8ef-631a41d003a32d25fe878081ef365c49503f7fada600da935e2851a1c7326084b85cbf6429c4b859de8475731dc92a9c329631e6d59e6c73da7b198497172b4cefe071d90d0f5d2719',
- baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
-});
-
-describe('resource references', () => {
- // skipped: tests are disabled for the time being
- test.skip('loadBalancerMonitorsListMonitorReferences', async () => {
- const responsePromise =
- cloudflare.users.loadBalancers.monitors.references.loadBalancerMonitorsListMonitorReferences(
- 'f1aba936b94213e5b8dca0c0dbf1f9cc',
- );
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('loadBalancerMonitorsListMonitorReferences: request options instead of params are passed correctly', async () => {
- // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(
- cloudflare.users.loadBalancers.monitors.references.loadBalancerMonitorsListMonitorReferences(
- 'f1aba936b94213e5b8dca0c0dbf1f9cc',
- { path: '/_stainless_unknown_path' },
- ),
- ).rejects.toThrow(Cloudflare.NotFoundError);
- });
-});
diff --git a/tests/api-resources/users/load-balancers/pools/health.test.ts b/tests/api-resources/users/load-balancers/pools/health.test.ts
deleted file mode 100644
index 122b19d287..0000000000
--- a/tests/api-resources/users/load-balancers/pools/health.test.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-import Cloudflare from 'cloudflare';
-import { Response } from 'node-fetch';
-
-const cloudflare = new Cloudflare({
- apiKey: '144c9defac04969c7bfad8efaa8ea194',
- apiEmail: 'user@example.com',
- apiToken: 'Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY',
- userServiceKey:
- 'v1.0-144c9defac04969c7bfad8ef-631a41d003a32d25fe878081ef365c49503f7fada600da935e2851a1c7326084b85cbf6429c4b859de8475731dc92a9c329631e6d59e6c73da7b198497172b4cefe071d90d0f5d2719',
- baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
-});
-
-describe('resource health', () => {
- // skipped: tests are disabled for the time being
- test.skip('list', async () => {
- const responsePromise = cloudflare.users.loadBalancers.pools.health.list(
- '17b5962d775c646f3f9725cbc7a53df4',
- );
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('list: request options instead of params are passed correctly', async () => {
- // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(
- cloudflare.users.loadBalancers.pools.health.list('17b5962d775c646f3f9725cbc7a53df4', {
- path: '/_stainless_unknown_path',
- }),
- ).rejects.toThrow(Cloudflare.NotFoundError);
- });
-});
diff --git a/tests/api-resources/users/load-balancers/pools/previews.test.ts b/tests/api-resources/users/load-balancers/pools/previews.test.ts
deleted file mode 100644
index f086025823..0000000000
--- a/tests/api-resources/users/load-balancers/pools/previews.test.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-import Cloudflare from 'cloudflare';
-import { Response } from 'node-fetch';
-
-const cloudflare = new Cloudflare({
- apiKey: '144c9defac04969c7bfad8efaa8ea194',
- apiEmail: 'user@example.com',
- apiToken: 'Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY',
- userServiceKey:
- 'v1.0-144c9defac04969c7bfad8ef-631a41d003a32d25fe878081ef365c49503f7fada600da935e2851a1c7326084b85cbf6429c4b859de8475731dc92a9c329631e6d59e6c73da7b198497172b4cefe071d90d0f5d2719',
- baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
-});
-
-describe('resource previews', () => {
- // skipped: tests are disabled for the time being
- test.skip('create: only required params', async () => {
- const responsePromise = cloudflare.users.loadBalancers.pools.previews.create(
- '17b5962d775c646f3f9725cbc7a53df4',
- { expected_codes: '2xx' },
- );
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('create: required and optional params', async () => {
- const response = await cloudflare.users.loadBalancers.pools.previews.create(
- '17b5962d775c646f3f9725cbc7a53df4',
- {
- expected_codes: '2xx',
- allow_insecure: true,
- consecutive_down: 0,
- consecutive_up: 0,
- description: 'Login page monitor',
- expected_body: 'alive',
- follow_redirects: true,
- header: { Host: ['example.com'], 'X-App-ID': ['abc123'] },
- interval: 0,
- method: 'GET',
- path: '/health',
- port: 0,
- probe_zone: 'example.com',
- retries: 0,
- timeout: 0,
- type: 'https',
- },
- );
- });
-});
diff --git a/tests/api-resources/users/load-balancers/pools/references.test.ts b/tests/api-resources/users/load-balancers/pools/references.test.ts
deleted file mode 100644
index 1fd024eb80..0000000000
--- a/tests/api-resources/users/load-balancers/pools/references.test.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-import Cloudflare from 'cloudflare';
-import { Response } from 'node-fetch';
-
-const cloudflare = new Cloudflare({
- apiKey: '144c9defac04969c7bfad8efaa8ea194',
- apiEmail: 'user@example.com',
- apiToken: 'Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY',
- userServiceKey:
- 'v1.0-144c9defac04969c7bfad8ef-631a41d003a32d25fe878081ef365c49503f7fada600da935e2851a1c7326084b85cbf6429c4b859de8475731dc92a9c329631e6d59e6c73da7b198497172b4cefe071d90d0f5d2719',
- baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
-});
-
-describe('resource references', () => {
- // skipped: tests are disabled for the time being
- test.skip('list', async () => {
- const responsePromise = cloudflare.users.loadBalancers.pools.references.list(
- '17b5962d775c646f3f9725cbc7a53df4',
- );
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('list: request options instead of params are passed correctly', async () => {
- // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(
- cloudflare.users.loadBalancers.pools.references.list('17b5962d775c646f3f9725cbc7a53df4', {
- path: '/_stainless_unknown_path',
- }),
- ).rejects.toThrow(Cloudflare.NotFoundError);
- });
-});