Skip to content

Commit 587eda7

Browse files
stainless-app[bot]meorphis
authored andcommitted
feat(api): update via SDK Studio (#2170)
1 parent 062b84d commit 587eda7

File tree

9 files changed

+574
-312
lines changed

9 files changed

+574
-312
lines changed

api.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2321,7 +2321,6 @@ Methods:
23212321

23222322
Types:
23232323

2324-
- <code><a href="./src/resources/api-gateway/discovery/discovery.ts">DiscoveryOperation</a></code>
23252324
- <code><a href="./src/resources/api-gateway/discovery/discovery.ts">DiscoveryGetResponse</a></code>
23262325

23272326
Methods:
@@ -2332,20 +2331,21 @@ Methods:
23322331

23332332
Types:
23342333

2334+
- <code><a href="./src/resources/api-gateway/discovery/operations.ts">OperationListResponse</a></code>
23352335
- <code><a href="./src/resources/api-gateway/discovery/operations.ts">OperationBulkEditResponse</a></code>
23362336
- <code><a href="./src/resources/api-gateway/discovery/operations.ts">OperationEditResponse</a></code>
23372337

23382338
Methods:
23392339

2340-
- <code title="get /zones/{zone_id}/api_gateway/discovery/operations">client.apiGateway.discovery.operations.<a href="./src/resources/api-gateway/discovery/operations.ts">list</a>({ ...params }) -> DiscoveryOperationsV4PagePaginationArray</code>
2340+
- <code title="get /zones/{zone_id}/api_gateway/discovery/operations">client.apiGateway.discovery.operations.<a href="./src/resources/api-gateway/discovery/operations.ts">list</a>({ ...params }) -> OperationListResponsesV4PagePaginationArray</code>
23412341
- <code title="patch /zones/{zone_id}/api_gateway/discovery/operations">client.apiGateway.discovery.operations.<a href="./src/resources/api-gateway/discovery/operations.ts">bulkEdit</a>({ ...params }) -> OperationBulkEditResponse</code>
23422342
- <code title="patch /zones/{zone_id}/api_gateway/discovery/operations/{operation_id}">client.apiGateway.discovery.operations.<a href="./src/resources/api-gateway/discovery/operations.ts">edit</a>(operationId, { ...params }) -> OperationEditResponse</code>
23432343

23442344
## Operations
23452345

23462346
Types:
23472347

2348-
- <code><a href="./src/resources/api-gateway/operations/operations.ts">APIShield</a></code>
2348+
- <code><a href="./src/resources/api-gateway/operations/operations.ts">APIShieldOperation</a></code>
23492349
- <code><a href="./src/resources/api-gateway/operations/operations.ts">OperationCreateResponse</a></code>
23502350
- <code><a href="./src/resources/api-gateway/operations/operations.ts">OperationListResponse</a></code>
23512351
- <code><a href="./src/resources/api-gateway/operations/operations.ts">OperationDeleteResponse</a></code>

src/resources/api-gateway/api-gateway.ts

+3-9
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,12 @@ import {
1212
import * as SchemasAPI from './schemas';
1313
import { SchemaListParams, SchemaListResponse, Schemas } from './schemas';
1414
import * as DiscoveryAPI from './discovery/discovery';
15-
import {
16-
Discovery,
17-
DiscoveryGetParams,
18-
DiscoveryGetResponse,
19-
DiscoveryOperation,
20-
} from './discovery/discovery';
15+
import { Discovery, DiscoveryGetParams, DiscoveryGetResponse } from './discovery/discovery';
2116
import * as ExpressionTemplateAPI from './expression-template/expression-template';
2217
import { ExpressionTemplate } from './expression-template/expression-template';
2318
import * as OperationsAPI from './operations/operations';
2419
import {
25-
APIShield,
20+
APIShieldOperation,
2621
OperationBulkDeleteParams,
2722
OperationBulkDeleteResponse,
2823
OperationCreateParams,
@@ -85,14 +80,13 @@ export declare namespace APIGateway {
8580

8681
export {
8782
Discovery as Discovery,
88-
type DiscoveryOperation as DiscoveryOperation,
8983
type DiscoveryGetResponse as DiscoveryGetResponse,
9084
type DiscoveryGetParams as DiscoveryGetParams,
9185
};
9286

9387
export {
9488
Operations as Operations,
95-
type APIShield as APIShield,
89+
type APIShieldOperation as APIShieldOperation,
9690
type OperationCreateResponse as OperationCreateResponse,
9791
type OperationListResponse as OperationListResponse,
9892
type OperationDeleteResponse as OperationDeleteResponse,

src/resources/api-gateway/discovery/discovery.ts

+6-73
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ import {
99
OperationEditParams,
1010
OperationEditResponse,
1111
OperationListParams,
12+
OperationListResponse,
13+
OperationListResponsesV4PagePaginationArray,
1214
Operations,
1315
} from './operations';
14-
import { V4PagePaginationArray } from '../../../pagination';
1516

1617
export class Discovery extends APIResource {
1718
operations: OperationsAPI.Operations = new OperationsAPI.Operations(this._client);
@@ -30,73 +31,6 @@ export class Discovery extends APIResource {
3031
}
3132
}
3233

33-
export class DiscoveryOperationsV4PagePaginationArray extends V4PagePaginationArray<DiscoveryOperation> {}
34-
35-
export interface DiscoveryOperation {
36-
/**
37-
* UUID
38-
*/
39-
id: string;
40-
41-
/**
42-
* The endpoint which can contain path parameter templates in curly braces, each
43-
* will be replaced from left to right with {varN}, starting with {var1}, during
44-
* insertion. This will further be Cloudflare-normalized upon insertion. See:
45-
* https://developers.cloudflare.com/rules/normalization/how-it-works/.
46-
*/
47-
endpoint: string;
48-
49-
/**
50-
* RFC3986-compliant host.
51-
*/
52-
host: string;
53-
54-
last_updated: string;
55-
56-
/**
57-
* The HTTP method used to access the endpoint.
58-
*/
59-
method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE';
60-
61-
/**
62-
* API discovery engine(s) that discovered this operation
63-
*/
64-
origin: Array<'ML' | 'SessionIdentifier'>;
65-
66-
/**
67-
* State of operation in API Discovery
68-
*
69-
* - `review` - Operation is not saved into API Shield Endpoint Management
70-
* - `saved` - Operation is saved into API Shield Endpoint Management
71-
* - `ignored` - Operation is marked as ignored
72-
*/
73-
state: 'review' | 'saved' | 'ignored';
74-
75-
features?: DiscoveryOperation.Features;
76-
}
77-
78-
export namespace DiscoveryOperation {
79-
export interface Features {
80-
traffic_stats?: Features.TrafficStats;
81-
}
82-
83-
export namespace Features {
84-
export interface TrafficStats {
85-
last_updated: string;
86-
87-
/**
88-
* The period in seconds these statistics were computed over
89-
*/
90-
period_seconds: number;
91-
92-
/**
93-
* The average number of requests seen during this period
94-
*/
95-
requests: number;
96-
}
97-
}
98-
}
99-
10034
export interface DiscoveryGetResponse {
10135
schemas: Array<unknown>;
10236

@@ -111,18 +45,17 @@ export interface DiscoveryGetParams {
11145
}
11246

11347
Discovery.Operations = Operations;
48+
Discovery.OperationListResponsesV4PagePaginationArray = OperationListResponsesV4PagePaginationArray;
11449

11550
export declare namespace Discovery {
116-
export {
117-
type DiscoveryOperation as DiscoveryOperation,
118-
type DiscoveryGetResponse as DiscoveryGetResponse,
119-
type DiscoveryGetParams as DiscoveryGetParams,
120-
};
51+
export { type DiscoveryGetResponse as DiscoveryGetResponse, type DiscoveryGetParams as DiscoveryGetParams };
12152

12253
export {
12354
Operations as Operations,
55+
type OperationListResponse as OperationListResponse,
12456
type OperationBulkEditResponse as OperationBulkEditResponse,
12557
type OperationEditResponse as OperationEditResponse,
58+
OperationListResponsesV4PagePaginationArray as OperationListResponsesV4PagePaginationArray,
12659
type OperationListParams as OperationListParams,
12760
type OperationBulkEditParams as OperationBulkEditParams,
12861
type OperationEditParams as OperationEditParams,

src/resources/api-gateway/discovery/index.ts

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
export { Discovery, type DiscoveryGetResponse, type DiscoveryGetParams } from './discovery';
34
export {
4-
DiscoveryOperationsV4PagePaginationArray,
5-
Discovery,
6-
type DiscoveryOperation,
7-
type DiscoveryGetResponse,
8-
type DiscoveryGetParams,
9-
} from './discovery';
10-
export {
5+
OperationListResponsesV4PagePaginationArray,
116
Operations,
7+
type OperationListResponse,
128
type OperationBulkEditResponse,
139
type OperationEditResponse,
1410
type OperationListParams,

src/resources/api-gateway/discovery/operations.ts

+74-7
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
import { APIResource } from '../../../resource';
44
import * as Core from '../../../core';
5-
import * as DiscoveryAPI from './discovery';
6-
import { DiscoveryOperationsV4PagePaginationArray } from './discovery';
7-
import { type V4PagePaginationArrayParams } from '../../../pagination';
5+
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination';
86

97
export class Operations extends APIResource {
108
/**
@@ -13,11 +11,11 @@ export class Operations extends APIResource {
1311
list(
1412
params: OperationListParams,
1513
options?: Core.RequestOptions,
16-
): Core.PagePromise<DiscoveryOperationsV4PagePaginationArray, DiscoveryAPI.DiscoveryOperation> {
14+
): Core.PagePromise<OperationListResponsesV4PagePaginationArray, OperationListResponse> {
1715
const { zone_id, ...query } = params;
1816
return this._client.getAPIList(
1917
`/zones/${zone_id}/api_gateway/discovery/operations`,
20-
DiscoveryOperationsV4PagePaginationArray,
18+
OperationListResponsesV4PagePaginationArray,
2119
{ query, ...options },
2220
);
2321
}
@@ -56,6 +54,73 @@ export class Operations extends APIResource {
5654
}
5755
}
5856

57+
export class OperationListResponsesV4PagePaginationArray extends V4PagePaginationArray<OperationListResponse> {}
58+
59+
export interface OperationListResponse {
60+
/**
61+
* UUID
62+
*/
63+
id: string;
64+
65+
/**
66+
* The endpoint which can contain path parameter templates in curly braces, each
67+
* will be replaced from left to right with {varN}, starting with {var1}, during
68+
* insertion. This will further be Cloudflare-normalized upon insertion. See:
69+
* https://developers.cloudflare.com/rules/normalization/how-it-works/.
70+
*/
71+
endpoint: string;
72+
73+
/**
74+
* RFC3986-compliant host.
75+
*/
76+
host: string;
77+
78+
last_updated: string;
79+
80+
/**
81+
* The HTTP method used to access the endpoint.
82+
*/
83+
method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE';
84+
85+
/**
86+
* API discovery engine(s) that discovered this operation
87+
*/
88+
origin: Array<'ML' | 'SessionIdentifier'>;
89+
90+
/**
91+
* State of operation in API Discovery
92+
*
93+
* - `review` - Operation is not saved into API Shield Endpoint Management
94+
* - `saved` - Operation is saved into API Shield Endpoint Management
95+
* - `ignored` - Operation is marked as ignored
96+
*/
97+
state: 'review' | 'saved' | 'ignored';
98+
99+
features?: OperationListResponse.Features;
100+
}
101+
102+
export namespace OperationListResponse {
103+
export interface Features {
104+
traffic_stats?: Features.TrafficStats;
105+
}
106+
107+
export namespace Features {
108+
export interface TrafficStats {
109+
last_updated: string;
110+
111+
/**
112+
* The period in seconds these statistics were computed over
113+
*/
114+
period_seconds: number;
115+
116+
/**
117+
* The average number of requests seen during this period
118+
*/
119+
requests: number;
120+
}
121+
}
122+
}
123+
59124
export type OperationBulkEditResponse = Record<string, OperationBulkEditResponse.item>;
60125

61126
export namespace OperationBulkEditResponse {
@@ -186,14 +251,16 @@ export interface OperationEditParams {
186251
state?: 'review' | 'ignored';
187252
}
188253

254+
Operations.OperationListResponsesV4PagePaginationArray = OperationListResponsesV4PagePaginationArray;
255+
189256
export declare namespace Operations {
190257
export {
258+
type OperationListResponse as OperationListResponse,
191259
type OperationBulkEditResponse as OperationBulkEditResponse,
192260
type OperationEditResponse as OperationEditResponse,
261+
OperationListResponsesV4PagePaginationArray as OperationListResponsesV4PagePaginationArray,
193262
type OperationListParams as OperationListParams,
194263
type OperationBulkEditParams as OperationBulkEditParams,
195264
type OperationEditParams as OperationEditParams,
196265
};
197266
}
198-
199-
export { DiscoveryOperationsV4PagePaginationArray };

src/resources/api-gateway/index.ts

+2-8
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,12 @@ export {
88
type ConfigurationUpdateParams,
99
type ConfigurationGetParams,
1010
} from './configurations';
11-
export {
12-
DiscoveryOperationsV4PagePaginationArray,
13-
Discovery,
14-
type DiscoveryOperation,
15-
type DiscoveryGetResponse,
16-
type DiscoveryGetParams,
17-
} from './discovery/index';
11+
export { Discovery, type DiscoveryGetResponse, type DiscoveryGetParams } from './discovery/index';
1812
export { ExpressionTemplate } from './expression-template/index';
1913
export {
2014
OperationListResponsesV4PagePaginationArray,
2115
Operations,
22-
type APIShield,
16+
type APIShieldOperation,
2317
type OperationCreateResponse,
2418
type OperationListResponse,
2519
type OperationDeleteResponse,

src/resources/api-gateway/operations/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
export {
44
OperationListResponsesV4PagePaginationArray,
55
Operations,
6-
type APIShield,
6+
type APIShieldOperation,
77
type OperationCreateResponse,
88
type OperationListResponse,
99
type OperationDeleteResponse,

0 commit comments

Comments
 (0)