Skip to content

Commit 96f8384

Browse files
feat(api): update via SDK Studio (#360)
1 parent 669361c commit 96f8384

File tree

8 files changed

+18
-24
lines changed

8 files changed

+18
-24
lines changed

api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3051,11 +3051,11 @@ Methods:
30513051

30523052
Types:
30533053

3054-
- <code><a href="./src/resources/intel/asn/asn.ts">ASN</a></code>
3054+
- <code><a href="./src/resources/intel/asn/asn.ts">IntelASN</a></code>
30553055

30563056
Methods:
30573057

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 }) -> ASN</code>
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>
30593059

30603060
### Subnets
30613061

src/resources/intel/asn/asn.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ import { APIResource } from 'cloudflare/resource';
55
import * as ASNAPI from 'cloudflare/resources/intel/asn/asn';
66
import * as SubnetsAPI from 'cloudflare/resources/intel/asn/subnets';
77

8-
export class ASNResource extends APIResource {
8+
export class ASN extends APIResource {
99
subnets: SubnetsAPI.Subnets = new SubnetsAPI.Subnets(this._client);
1010

1111
/**
1212
* Get ASN Overview
1313
*/
14-
get(asn: ASN, params: ASNGetParams, options?: Core.RequestOptions): Core.APIPromise<ASN> {
14+
get(asn: IntelASN, params: ASNGetParams, options?: Core.RequestOptions): Core.APIPromise<IntelASN> {
1515
const { account_id } = params;
1616
return (
1717
this._client.get(`/accounts/${account_id}/intel/asn/${asn}`, options) as Core.APIPromise<{
18-
result: ASN;
18+
result: IntelASN;
1919
}>
2020
)._thenUnwrap((obj) => obj.result);
2121
}
2222
}
2323

24-
export type ASN = number;
24+
export type IntelASN = number;
2525

2626
export interface ASNGetParams {
2727
/**
@@ -30,8 +30,8 @@ export interface ASNGetParams {
3030
account_id: string;
3131
}
3232

33-
export namespace ASNResource {
34-
export import ASN = ASNAPI.ASN;
33+
export namespace ASN {
34+
export import IntelASN = ASNAPI.IntelASN;
3535
export import ASNGetParams = ASNAPI.ASNGetParams;
3636
export import Subnets = SubnetsAPI.Subnets;
3737
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 { ASN, ASNGetParams, ASNResource } from './asn';
3+
export { IntelASN, ASNGetParams, ASN } from './asn';
44
export { SubnetGetResponse, SubnetGetParams, Subnets } from './subnets';

src/resources/intel/asn/subnets.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class Subnets extends APIResource {
1010
* Get ASN Subnets
1111
*/
1212
get(
13-
asn: ASNAPI.ASN,
13+
asn: ASNAPI.IntelASN,
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.ASN;
23+
asn?: ASNAPI.IntelASN;
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,6 +1,5 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
export { ASN, ASNGetParams, ASNResource } from './asn/index';
43
export { AttackSurfaceReport } from './attack-surface-report/index';
54
export { DNS, DNSListResponse, DNSListParams, DNSListResponsesV4PagePagination } from './dns';
65
export { Domain, DomainGetParams, Domains } from './domains/index';
@@ -27,6 +26,7 @@ export {
2726
IndicatorFeeds,
2827
} from './indicator-feeds/index';
2928
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import * as DomainsAPI from 'cloudflare/resources/intel/domains/domains';
1414
import * as IndicatorFeedsAPI from 'cloudflare/resources/intel/indicator-feeds/indicator-feeds';
1515

1616
export class Intel extends APIResource {
17-
asn: ASNAPI.ASNResource = new ASNAPI.ASNResource(this._client);
17+
asn: ASNAPI.ASN = new ASNAPI.ASN(this._client);
1818
dns: DNSAPI.DNS = new DNSAPI.DNS(this._client);
1919
domains: DomainsAPI.Domains = new DomainsAPI.Domains(this._client);
2020
domainHistory: DomainHistoryAPI.DomainHistoryResource = new DomainHistoryAPI.DomainHistoryResource(
@@ -33,8 +33,8 @@ export class Intel extends APIResource {
3333
}
3434

3535
export namespace Intel {
36-
export import ASNResource = ASNAPI.ASNResource;
3736
export import ASN = ASNAPI.ASN;
37+
export import IntelASN = ASNAPI.IntelASN;
3838
export import ASNGetParams = ASNAPI.ASNGetParams;
3939
export import DNS = DNSAPI.DNS;
4040
export import DNSListResponse = DNSAPI.DNSListResponse;

src/resources/stream/captions/language/vtt.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ export class Vtt extends APIResource {
1414
params: VttGetParams,
1515
options?: Core.RequestOptions,
1616
): Core.APIPromise<string> {
17-
const { account_id, body } = params;
17+
const { account_id } = params;
1818
return this._client.get(`/accounts/${account_id}/stream/${identifier}/captions/${language}/vtt`, {
19-
body: body,
2019
...options,
2120
headers: { Accept: 'text/vtt', ...options?.headers },
2221
});
@@ -27,14 +26,9 @@ export type VttGetResponse = string;
2726

2827
export interface VttGetParams {
2928
/**
30-
* Path param: Identifier
29+
* Identifier
3130
*/
3231
account_id: string;
33-
34-
/**
35-
* Body param:
36-
*/
37-
body: unknown;
3832
}
3933

4034
export namespace Vtt {

tests/api-resources/stream/captions/language/vtt.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('resource vtt', () => {
1515
const responsePromise = cloudflare.stream.captions.language.vtt.get(
1616
'ea95132c15732412d22c1476fa83f27a',
1717
'tr',
18-
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353', body: {} },
18+
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
1919
);
2020
const rawResponse = await responsePromise.asResponse();
2121
expect(rawResponse).toBeInstanceOf(Response);
@@ -31,7 +31,7 @@ describe('resource vtt', () => {
3131
const response = await cloudflare.stream.captions.language.vtt.get(
3232
'ea95132c15732412d22c1476fa83f27a',
3333
'tr',
34-
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353', body: {} },
34+
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
3535
);
3636
});
3737
});

0 commit comments

Comments
 (0)