Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Apr 24, 2024
1 parent 48f478f commit 13f14f7
Show file tree
Hide file tree
Showing 23 changed files with 141 additions and 263 deletions.
13 changes: 5 additions & 8 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Methods:
Types:

- <code><a href="./src/resources/accounts/members.ts">Member</a></code>
- <code><a href="./src/resources/accounts/members.ts">MemberRoles</a></code>
- <code><a href="./src/resources/accounts/members.ts">MemberWithInviteCode</a></code>
- <code><a href="./src/resources/accounts/members.ts">Roles</a></code>
- <code><a href="./src/resources/accounts/members.ts">MemberListResponse</a></code>
- <code><a href="./src/resources/accounts/members.ts">MemberDeleteResponse</a></code>

Expand Down Expand Up @@ -192,7 +192,6 @@ Methods:

Types:

- <code><a href="./src/resources/user/load-balancers/pools.ts">Pool</a></code>
- <code><a href="./src/resources/user/load-balancers/pools.ts">PoolDeleteResponse</a></code>
- <code><a href="./src/resources/user/load-balancers/pools.ts">PoolHealthResponse</a></code>
- <code><a href="./src/resources/user/load-balancers/pools.ts">PoolPreviewResponse</a></code>
Expand Down Expand Up @@ -1592,10 +1591,10 @@ Methods:

Types:

- <code><a href="./src/resources/firewall/lockdowns.ts">CIDRConfiguration</a></code>
- <code><a href="./src/resources/firewall/lockdowns.ts">Configuration</a></code>
- <code><a href="./src/resources/firewall/lockdowns.ts">IPConfiguration</a></code>
- <code><a href="./src/resources/firewall/lockdowns.ts">Lockdown</a></code>
- <code><a href="./src/resources/firewall/lockdowns.ts">LockdownCIDRConfiguration</a></code>
- <code><a href="./src/resources/firewall/lockdowns.ts">LockdownIPConfiguration</a></code>
- <code><a href="./src/resources/firewall/lockdowns.ts">URLsItem</a></code>
- <code><a href="./src/resources/firewall/lockdowns.ts">LockdownDeleteResponse</a></code>

Expand Down Expand Up @@ -1630,10 +1629,10 @@ Methods:

Types:

- <code><a href="./src/resources/firewall/access-rules.ts">AccessRuleCIDRConfiguration</a></code>
- <code><a href="./src/resources/firewall/access-rules.ts">AccessRuleIPConfiguration</a></code>
- <code><a href="./src/resources/firewall/access-rules.ts">ASNConfiguration</a></code>
- <code><a href="./src/resources/firewall/access-rules.ts">CIDRConfiguration</a></code>
- <code><a href="./src/resources/firewall/access-rules.ts">CountryConfiguration</a></code>
- <code><a href="./src/resources/firewall/access-rules.ts">IPConfiguration</a></code>
- <code><a href="./src/resources/firewall/access-rules.ts">IPV6Configuration</a></code>
- <code><a href="./src/resources/firewall/access-rules.ts">AccessRuleListResponse</a></code>
- <code><a href="./src/resources/firewall/access-rules.ts">AccessRuleDeleteResponse</a></code>
Expand Down Expand Up @@ -4813,8 +4812,6 @@ Methods:
Types:

- <code><a href="./src/resources/zero-trust/dlp/profiles/profiles.ts">ContextAwareness</a></code>
- <code><a href="./src/resources/zero-trust/dlp/profiles/profiles.ts">CustomProfile</a></code>
- <code><a href="./src/resources/zero-trust/dlp/profiles/profiles.ts">PredefinedProfile</a></code>
- <code><a href="./src/resources/zero-trust/dlp/profiles/profiles.ts">Profile</a></code>
- <code><a href="./src/resources/zero-trust/dlp/profiles/profiles.ts">SkipConfiguration</a></code>
- <code><a href="./src/resources/zero-trust/dlp/profiles/profiles.ts">ProfileGetResponse</a></code>
Expand Down
3 changes: 2 additions & 1 deletion src/resources/accounts/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ export interface AccountGetParams {
export namespace Accounts {
export import Members = MembersAPI.Members;
export import Member = MembersAPI.Member;
export import MemberRoles = MembersAPI.MemberRoles;
export import MemberWithInviteCode = MembersAPI.MemberWithInviteCode;
export import Roles = MembersAPI.Roles;
export import MemberListResponse = MembersAPI.MemberListResponse;
export import MemberDeleteResponse = MembersAPI.MemberDeleteResponse;
export import MemberListResponsesV4PagePaginationArray = MembersAPI.MemberListResponsesV4PagePaginationArray;
Expand All @@ -208,6 +208,7 @@ export namespace Accounts {
export import MemberListParams = MembersAPI.MemberListParams;
export import MemberDeleteParams = MembersAPI.MemberDeleteParams;
export import MemberGetParams = MembersAPI.MemberGetParams;
export import Roles = RolesAPI.Roles;
export import PermissionGrant = RolesAPI.PermissionGrant;
export import Role = RolesAPI.Role;
export import RolesSinglePage = RolesAPI.RolesSinglePage;
Expand Down
2 changes: 1 addition & 1 deletion src/resources/accounts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
export { Accounts } from './accounts';
export {
Member,
MemberRoles,
MemberWithInviteCode,
Roles,
MemberListResponse,
MemberDeleteResponse,
MemberCreateParams,
Expand Down
12 changes: 6 additions & 6 deletions src/resources/accounts/members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ export namespace Member {
}
}

/**
* List of role names for the user at the account.
*/
export type MemberRoles = Array<string>;

export interface MemberWithInviteCode {
/**
* Membership identifier tag.
Expand Down Expand Up @@ -219,11 +224,6 @@ export namespace MemberWithInviteCode {
}
}

/**
* List of role names for the user at the account.
*/
export type Roles = Array<string>;

export interface MemberListResponse {
/**
* Identifier
Expand Down Expand Up @@ -341,8 +341,8 @@ export interface MemberGetParams {

export namespace Members {
export import Member = MembersAPI.Member;
export import MemberRoles = MembersAPI.MemberRoles;
export import MemberWithInviteCode = MembersAPI.MemberWithInviteCode;
export import Roles = MembersAPI.Roles;
export import MemberListResponse = MembersAPI.MemberListResponse;
export import MemberDeleteResponse = MembersAPI.MemberDeleteResponse;
export import MemberListResponsesV4PagePaginationArray = MembersAPI.MemberListResponsesV4PagePaginationArray;
Expand Down
58 changes: 29 additions & 29 deletions src/resources/firewall/access-rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,57 +206,57 @@ export class AccessRules extends APIResource {

export class AccessRuleListResponsesV4PagePaginationArray extends V4PagePaginationArray<AccessRuleListResponse> {}

export interface ASNConfiguration {
export interface AccessRuleCIDRConfiguration {
/**
* The configuration target. You must set the target to `asn` when specifying an
* Autonomous System Number (ASN) in the rule.
* The configuration target. You must set the target to `ip_range` when specifying
* an IP address range in the rule.
*/
target?: 'asn';
target?: 'ip_range';

/**
* The AS number to match.
* The IP address range to match. You can only use prefix lengths `/16` and `/24`
* for IPv4 ranges, and prefix lengths `/32`, `/48`, and `/64` for IPv6 ranges.
*/
value?: string;
}

export interface CIDRConfiguration {
export interface AccessRuleIPConfiguration {
/**
* The configuration target. You must set the target to `ip_range` when specifying
* an IP address range in the rule.
* The configuration target. You must set the target to `ip` when specifying an IP
* address in the rule.
*/
target?: 'ip_range';
target?: 'ip';

/**
* The IP address range to match. You can only use prefix lengths `/16` and `/24`
* for IPv4 ranges, and prefix lengths `/32`, `/48`, and `/64` for IPv6 ranges.
* The IP address to match. This address will be compared to the IP address of
* incoming requests.
*/
value?: string;
}

export interface CountryConfiguration {
export interface ASNConfiguration {
/**
* The configuration target. You must set the target to `country` when specifying a
* country code in the rule.
* The configuration target. You must set the target to `asn` when specifying an
* Autonomous System Number (ASN) in the rule.
*/
target?: 'country';
target?: 'asn';

/**
* The two-letter ISO-3166-1 alpha-2 code to match. For more information, refer to
* [IP Access rules: Parameters](https://developers.cloudflare.com/waf/tools/ip-access-rules/parameters/#country).
* The AS number to match.
*/
value?: string;
}

export interface IPConfiguration {
export interface CountryConfiguration {
/**
* The configuration target. You must set the target to `ip` when specifying an IP
* address in the rule.
* The configuration target. You must set the target to `country` when specifying a
* country code in the rule.
*/
target?: 'ip';
target?: 'country';

/**
* The IP address to match. This address will be compared to the IP address of
* incoming requests.
* The two-letter ISO-3166-1 alpha-2 code to match. For more information, refer to
* [IP Access rules: Parameters](https://developers.cloudflare.com/waf/tools/ip-access-rules/parameters/#country).
*/
value?: string;
}
Expand Down Expand Up @@ -288,9 +288,9 @@ export interface AccessRuleCreateParams {
* Body param: The rule configuration.
*/
configuration:
| IPConfiguration
| AccessRuleIPConfiguration
| IPV6Configuration
| CIDRConfiguration
| AccessRuleCIDRConfiguration
| ASNConfiguration
| CountryConfiguration;

Expand Down Expand Up @@ -430,9 +430,9 @@ export interface AccessRuleEditParams {
* Body param: The rule configuration.
*/
configuration:
| IPConfiguration
| AccessRuleIPConfiguration
| IPV6Configuration
| CIDRConfiguration
| AccessRuleCIDRConfiguration
| ASNConfiguration
| CountryConfiguration;

Expand Down Expand Up @@ -473,10 +473,10 @@ export interface AccessRuleGetParams {
}

export namespace AccessRules {
export import AccessRuleCIDRConfiguration = AccessRulesAPI.AccessRuleCIDRConfiguration;
export import AccessRuleIPConfiguration = AccessRulesAPI.AccessRuleIPConfiguration;
export import ASNConfiguration = AccessRulesAPI.ASNConfiguration;
export import CIDRConfiguration = AccessRulesAPI.CIDRConfiguration;
export import CountryConfiguration = AccessRulesAPI.CountryConfiguration;
export import IPConfiguration = AccessRulesAPI.IPConfiguration;
export import IPV6Configuration = AccessRulesAPI.IPV6Configuration;
export import AccessRuleListResponse = AccessRulesAPI.AccessRuleListResponse;
export import AccessRuleDeleteResponse = AccessRulesAPI.AccessRuleDeleteResponse;
Expand Down
6 changes: 4 additions & 2 deletions src/resources/firewall/firewall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export class Firewall extends APIResource {

export namespace Firewall {
export import Lockdowns = LockdownsAPI.Lockdowns;
export import CIDRConfiguration = LockdownsAPI.CIDRConfiguration;
export import Configuration = LockdownsAPI.Configuration;
export import IPConfiguration = LockdownsAPI.IPConfiguration;
export import Lockdown = LockdownsAPI.Lockdown;
export import LockdownCIDRConfiguration = LockdownsAPI.LockdownCIDRConfiguration;
export import LockdownIPConfiguration = LockdownsAPI.LockdownIPConfiguration;
export import URLsItem = LockdownsAPI.URLsItem;
export import LockdownDeleteResponse = LockdownsAPI.LockdownDeleteResponse;
export import LockdownsV4PagePaginationArray = LockdownsAPI.LockdownsV4PagePaginationArray;
Expand All @@ -42,6 +42,8 @@ export namespace Firewall {
export import RuleEditParams = RulesAPI.RuleEditParams;
export import RuleGetParams = RulesAPI.RuleGetParams;
export import AccessRules = AccessRulesAPI.AccessRules;
export import AccessRuleCIDRConfiguration = AccessRulesAPI.AccessRuleCIDRConfiguration;
export import AccessRuleIPConfiguration = AccessRulesAPI.AccessRuleIPConfiguration;
export import ASNConfiguration = AccessRulesAPI.ASNConfiguration;
export import CountryConfiguration = AccessRulesAPI.CountryConfiguration;
export import IPV6Configuration = AccessRulesAPI.IPV6Configuration;
Expand Down
8 changes: 4 additions & 4 deletions src/resources/firewall/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export {
AccessRuleCIDRConfiguration,
AccessRuleIPConfiguration,
ASNConfiguration,
CIDRConfiguration,
CountryConfiguration,
IPConfiguration,
IPV6Configuration,
AccessRuleListResponse,
AccessRuleDeleteResponse,
Expand All @@ -17,10 +17,10 @@ export {
AccessRules,
} from './access-rules';
export {
CIDRConfiguration,
Configuration,
IPConfiguration,
Lockdown,
LockdownCIDRConfiguration,
LockdownIPConfiguration,
URLsItem,
LockdownDeleteResponse,
LockdownCreateParams,
Expand Down
60 changes: 30 additions & 30 deletions src/resources/firewall/lockdowns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,39 +99,12 @@ export class Lockdowns extends APIResource {

export class LockdownsV4PagePaginationArray extends V4PagePaginationArray<Lockdown> {}

export interface CIDRConfiguration {
/**
* The configuration target. You must set the target to `ip_range` when specifying
* an IP address range in the Zone Lockdown rule.
*/
target?: 'ip_range';

/**
* The IP address range to match. You can only use prefix lengths `/16` and `/24`.
*/
value?: string;
}

/**
* A list of IP addresses or CIDR ranges that will be allowed to access the URLs
* specified in the Zone Lockdown rule. You can include any number of `ip` or
* `ip_range` configurations.
*/
export type Configuration = IPConfiguration | CIDRConfiguration;

export interface IPConfiguration {
/**
* The configuration target. You must set the target to `ip` when specifying an IP
* address in the Zone Lockdown rule.
*/
target?: 'ip';

/**
* The IP address to match. This address will be compared to the IP address of
* incoming requests.
*/
value?: string;
}
export type Configuration = LockdownIPConfiguration | LockdownCIDRConfiguration;

export interface Lockdown {
/**
Expand Down Expand Up @@ -174,6 +147,33 @@ export interface Lockdown {
urls: Array<URLsItem>;
}

export interface LockdownCIDRConfiguration {
/**
* The configuration target. You must set the target to `ip_range` when specifying
* an IP address range in the Zone Lockdown rule.
*/
target?: 'ip_range';

/**
* The IP address range to match. You can only use prefix lengths `/16` and `/24`.
*/
value?: string;
}

export interface LockdownIPConfiguration {
/**
* The configuration target. You must set the target to `ip` when specifying an IP
* address in the Zone Lockdown rule.
*/
target?: 'ip';

/**
* The IP address to match. This address will be compared to the IP address of
* incoming requests.
*/
value?: string;
}

export type URLsItem = string;

export interface LockdownDeleteResponse {
Expand Down Expand Up @@ -239,10 +239,10 @@ export interface LockdownListParams extends V4PagePaginationArrayParams {
export type LockdownDeleteParams = unknown;

export namespace Lockdowns {
export import CIDRConfiguration = LockdownsAPI.CIDRConfiguration;
export import Configuration = LockdownsAPI.Configuration;
export import IPConfiguration = LockdownsAPI.IPConfiguration;
export import Lockdown = LockdownsAPI.Lockdown;
export import LockdownCIDRConfiguration = LockdownsAPI.LockdownCIDRConfiguration;
export import LockdownIPConfiguration = LockdownsAPI.LockdownIPConfiguration;
export import URLsItem = LockdownsAPI.URLsItem;
export import LockdownDeleteResponse = LockdownsAPI.LockdownDeleteResponse;
export import LockdownsV4PagePaginationArray = LockdownsAPI.LockdownsV4PagePaginationArray;
Expand Down
1 change: 1 addition & 0 deletions src/resources/load-balancers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export {
PoolDeleteParams,
PoolEditParams,
PoolGetParams,
PoolsSinglePage,
Pools,
} from './pools/index';
export { PreviewGetParams, Previews } from './previews';
Expand Down
1 change: 1 addition & 0 deletions src/resources/load-balancers/load-balancers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1448,6 +1448,7 @@ export namespace LoadBalancers {
export import Pools = PoolsAPI.Pools;
export import Pool = PoolsAPI.Pool;
export import PoolDeleteResponse = PoolsAPI.PoolDeleteResponse;
export import PoolsSinglePage = PoolsAPI.PoolsSinglePage;
export import PoolCreateParams = PoolsAPI.PoolCreateParams;
export import PoolUpdateParams = PoolsAPI.PoolUpdateParams;
export import PoolListParams = PoolsAPI.PoolListParams;
Expand Down
1 change: 1 addition & 0 deletions src/resources/load-balancers/pools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export {
PoolDeleteParams,
PoolEditParams,
PoolGetParams,
PoolsSinglePage,
Pools,
} from './pools';
export { ReferenceGetResponse, ReferenceGetParams, References } from './references';
Loading

0 comments on commit 13f14f7

Please sign in to comment.