Skip to content

Commit d5ea2ed

Browse files
feat(api): api update
1 parent 1d86ec6 commit d5ea2ed

File tree

4 files changed

+71
-12
lines changed

4 files changed

+71
-12
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1711
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-754b3d6c20be885a6e5cca1a08426ade38db83402bdf7f7b647dc8a6eaf33211.yml
3-
openapi_spec_hash: 94e8596cc159bdc1037af5f2af3853b0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-081c85aaff4176a6887a5cd88d02e125ba9de863a7cdf30ee28fc65ddafe6c35.yml
3+
openapi_spec_hash: 96411a46013095a31ff6b4cb1000e19d
44
config_hash: 67f412c990647f3cb598378fa22a9db5

src/resources/addressing/regional-hostnames/regional-hostnames.ts

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

33
import { APIResource } from '../../../resource';
44
import * as Core from '../../../core';
5-
import * as Shared from '../../shared';
65
import * as RegionsAPI from './regions';
76
import { RegionListParams, RegionListResponse, RegionListResponsesSinglePage, Regions } from './regions';
87
import { SinglePage } from '../../../pagination';
@@ -110,6 +109,11 @@ export interface RegionalHostnameCreateResponse {
110109
* Identifying key for the region
111110
*/
112111
region_key: string;
112+
113+
/**
114+
* Configure which routing method to use for the regional hostname
115+
*/
116+
routing?: string;
113117
}
114118

115119
export interface RegionalHostnameListResponse {
@@ -128,19 +132,58 @@ export interface RegionalHostnameListResponse {
128132
* Identifying key for the region
129133
*/
130134
region_key: string;
135+
136+
/**
137+
* Configure which routing method to use for the regional hostname
138+
*/
139+
routing?: string;
131140
}
132141

133142
export interface RegionalHostnameDeleteResponse {
134-
errors: Array<Shared.ResponseInfo>;
143+
errors: Array<RegionalHostnameDeleteResponse.Error>;
135144

136-
messages: Array<Shared.ResponseInfo>;
145+
messages: Array<RegionalHostnameDeleteResponse.Message>;
137146

138147
/**
139-
* Whether the API call was successful
148+
* Whether the API call was successful.
140149
*/
141150
success: true;
142151
}
143152

153+
export namespace RegionalHostnameDeleteResponse {
154+
export interface Error {
155+
code: number;
156+
157+
message: string;
158+
159+
documentation_url?: string;
160+
161+
source?: Error.Source;
162+
}
163+
164+
export namespace Error {
165+
export interface Source {
166+
pointer?: string;
167+
}
168+
}
169+
170+
export interface Message {
171+
code: number;
172+
173+
message: string;
174+
175+
documentation_url?: string;
176+
177+
source?: Message.Source;
178+
}
179+
180+
export namespace Message {
181+
export interface Source {
182+
pointer?: string;
183+
}
184+
}
185+
}
186+
144187
export interface RegionalHostnameEditResponse {
145188
/**
146189
* When the regional hostname was created
@@ -157,6 +200,11 @@ export interface RegionalHostnameEditResponse {
157200
* Identifying key for the region
158201
*/
159202
region_key: string;
203+
204+
/**
205+
* Configure which routing method to use for the regional hostname
206+
*/
207+
routing?: string;
160208
}
161209

162210
export interface RegionalHostnameGetResponse {
@@ -175,11 +223,16 @@ export interface RegionalHostnameGetResponse {
175223
* Identifying key for the region
176224
*/
177225
region_key: string;
226+
227+
/**
228+
* Configure which routing method to use for the regional hostname
229+
*/
230+
routing?: string;
178231
}
179232

180233
export interface RegionalHostnameCreateParams {
181234
/**
182-
* Path param: Identifier
235+
* Path param: Identifier.
183236
*/
184237
zone_id: string;
185238

@@ -193,25 +246,30 @@ export interface RegionalHostnameCreateParams {
193246
* Body param: Identifying key for the region
194247
*/
195248
region_key: string;
249+
250+
/**
251+
* Body param: Configure which routing method to use for the regional hostname
252+
*/
253+
routing?: string;
196254
}
197255

198256
export interface RegionalHostnameListParams {
199257
/**
200-
* Identifier
258+
* Identifier.
201259
*/
202260
zone_id: string;
203261
}
204262

205263
export interface RegionalHostnameDeleteParams {
206264
/**
207-
* Identifier
265+
* Identifier.
208266
*/
209267
zone_id: string;
210268
}
211269

212270
export interface RegionalHostnameEditParams {
213271
/**
214-
* Path param: Identifier
272+
* Path param: Identifier.
215273
*/
216274
zone_id: string;
217275

@@ -223,7 +281,7 @@ export interface RegionalHostnameEditParams {
223281

224282
export interface RegionalHostnameGetParams {
225283
/**
226-
* Identifier
284+
* Identifier.
227285
*/
228286
zone_id: string;
229287
}

src/resources/addressing/regional-hostnames/regions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export interface RegionListResponse {
3737

3838
export interface RegionListParams {
3939
/**
40-
* Identifier
40+
* Identifier.
4141
*/
4242
account_id: string;
4343
}

tests/api-resources/addressing/regional-hostnames/regional-hostnames.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ describe('resource regionalHostnames', () => {
3030
zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
3131
hostname: 'foo.example.com',
3232
region_key: 'ca',
33+
routing: 'routing',
3334
});
3435
});
3536

0 commit comments

Comments
 (0)