Skip to content

Commit 335625d

Browse files
feat(api): update via SDK Studio (#361)
1 parent 96f8384 commit 335625d

File tree

8 files changed

+13
-16
lines changed

8 files changed

+13
-16
lines changed

api.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
Types:
44

5+
- <code><a href="./src/resources/shared.ts">ASN</a></code>
56
- <code><a href="./src/resources/shared.ts">AuditLog</a></code>
67
- <code><a href="./src/resources/shared.ts">CloudflareTunnel</a></code>
78
- <code><a href="./src/resources/shared.ts">ErrorData</a></code>
@@ -3049,13 +3050,9 @@ Methods:
30493050

30503051
## ASN
30513052

3052-
Types:
3053-
3054-
- <code><a href="./src/resources/intel/asn/asn.ts">IntelASN</a></code>
3055-
30563053
Methods:
30573054

3058-
- <code title="get /accounts/{account_id}/intel/asn/{asn}">client.intel.asn.<a href="./src/resources/intel/asn/asn.ts">get</a>(asn, { ...params }) -> IntelASN</code>
3055+
- <code title="get /accounts/{account_id}/intel/asn/{asn}">client.intel.asn.<a href="./src/resources/intel/asn/asn.ts">get</a>(asn, { ...params }) -> ASN</code>
30593056

30603057
### Subnets
30613058

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,7 @@ export namespace Cloudflare {
552552

553553
export import EventNotifications = API.EventNotifications;
554554

555+
export import ASN = API.ASN;
555556
export import AuditLog = API.AuditLog;
556557
export import CloudflareTunnel = API.CloudflareTunnel;
557558
export import ErrorData = API.ErrorData;

src/resources/intel/asn/asn.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import * as Core from 'cloudflare/core';
44
import { APIResource } from 'cloudflare/resource';
55
import * as ASNAPI from 'cloudflare/resources/intel/asn/asn';
6+
import * as Shared from 'cloudflare/resources/shared';
67
import * as SubnetsAPI from 'cloudflare/resources/intel/asn/subnets';
78

89
export class ASN extends APIResource {
@@ -11,18 +12,16 @@ export class ASN extends APIResource {
1112
/**
1213
* Get ASN Overview
1314
*/
14-
get(asn: IntelASN, params: ASNGetParams, options?: Core.RequestOptions): Core.APIPromise<IntelASN> {
15+
get(asn: Shared.ASN, params: ASNGetParams, options?: Core.RequestOptions): Core.APIPromise<Shared.ASN> {
1516
const { account_id } = params;
1617
return (
1718
this._client.get(`/accounts/${account_id}/intel/asn/${asn}`, options) as Core.APIPromise<{
18-
result: IntelASN;
19+
result: Shared.ASN;
1920
}>
2021
)._thenUnwrap((obj) => obj.result);
2122
}
2223
}
2324

24-
export type IntelASN = number;
25-
2625
export interface ASNGetParams {
2726
/**
2827
* Identifier
@@ -31,7 +30,6 @@ export interface ASNGetParams {
3130
}
3231

3332
export namespace ASN {
34-
export import IntelASN = ASNAPI.IntelASN;
3533
export import ASNGetParams = ASNAPI.ASNGetParams;
3634
export import Subnets = SubnetsAPI.Subnets;
3735
export import SubnetGetResponse = SubnetsAPI.SubnetGetResponse;

src/resources/intel/asn/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
export { IntelASN, ASNGetParams, ASN } from './asn';
3+
export { ASNGetParams, ASN } from './asn';
44
export { SubnetGetResponse, SubnetGetParams, Subnets } from './subnets';

src/resources/intel/asn/subnets.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
import * as Core from 'cloudflare/core';
44
import { APIResource } from 'cloudflare/resource';
55
import * as SubnetsAPI from 'cloudflare/resources/intel/asn/subnets';
6-
import * as ASNAPI from 'cloudflare/resources/intel/asn/asn';
6+
import * as Shared from 'cloudflare/resources/shared';
77

88
export class Subnets extends APIResource {
99
/**
1010
* Get ASN Subnets
1111
*/
1212
get(
13-
asn: ASNAPI.IntelASN,
13+
asn: Shared.ASN,
1414
params: SubnetGetParams,
1515
options?: Core.RequestOptions,
1616
): Core.APIPromise<SubnetGetResponse> {
@@ -20,7 +20,7 @@ export class Subnets extends APIResource {
2020
}
2121

2222
export interface SubnetGetResponse {
23-
asn?: ASNAPI.IntelASN;
23+
asn?: Shared.ASN;
2424

2525
/**
2626
* Total results returned based on your search parameters.

src/resources/intel/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
export { ASNGetParams, ASN } from './asn/index';
34
export { AttackSurfaceReport } from './attack-surface-report/index';
45
export { DNS, DNSListResponse, DNSListParams, DNSListResponsesV4PagePagination } from './dns';
56
export { Domain, DomainGetParams, Domains } from './domains/index';
@@ -26,7 +27,6 @@ export {
2627
IndicatorFeeds,
2728
} from './indicator-feeds/index';
2829
export { Intel } from './intel';
29-
export { IntelASN, ASNGetParams, ASN } from './asn/index';
3030
export {
3131
MiscategorizationCreateResponse,
3232
MiscategorizationCreateParams,

src/resources/intel/intel.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export class Intel extends APIResource {
3434

3535
export namespace Intel {
3636
export import ASN = ASNAPI.ASN;
37-
export import IntelASN = ASNAPI.IntelASN;
3837
export import ASNGetParams = ASNAPI.ASNGetParams;
3938
export import DNS = DNSAPI.DNS;
4039
export import DNSListResponse = DNSAPI.DNSListResponse;

src/resources/shared.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import * as Shared from 'cloudflare/resources/shared';
44
import { SinglePage, V4PagePaginationArray } from 'cloudflare/pagination';
55

6+
export type ASN = number;
7+
68
export interface AuditLog {
79
/**
810
* A string that uniquely identifies the audit log.

0 commit comments

Comments
 (0)