Skip to content

Commit

Permalink
feat(r2)!: rename cf-r2-jurisdiction to more usable jurisdiction
Browse files Browse the repository at this point in the history
…parameter (#2279)
  • Loading branch information
stainless-app[bot] authored and meorphis committed Jan 13, 2025
1 parent ba52017 commit 5aae807
Show file tree
Hide file tree
Showing 17 changed files with 102 additions and 102 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1490
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e1196991f4ef4ff059b3c665a34ec0b270d84b2f786f6a1c0ff43e5974e4c50.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ed8629c4fef78e6fd8669578fc4d3904f20620a1ea39a40d5d2b4adbc4ecad6d.yml
16 changes: 8 additions & 8 deletions src/resources/r2/buckets/buckets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ export class Buckets extends APIResource {
params: BucketDeleteParams,
options?: Core.RequestOptions,
): Core.APIPromise<BucketDeleteResponse> {
const { account_id, 'cf-r2-jurisdiction': cfR2Jurisdiction } = params;
const { account_id, jurisdiction } = params;
return (
this._client.delete(`/accounts/${account_id}/r2/buckets/${bucketName}`, {
...options,
headers: {
...(cfR2Jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': cfR2Jurisdiction?.toString() }
...(jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': jurisdiction?.toString() }
: undefined),
...options?.headers,
},
Expand All @@ -108,13 +108,13 @@ export class Buckets extends APIResource {
* Gets metadata for an existing R2 bucket.
*/
get(bucketName: string, params: BucketGetParams, options?: Core.RequestOptions): Core.APIPromise<Bucket> {
const { account_id, 'cf-r2-jurisdiction': cfR2Jurisdiction } = params;
const { account_id, jurisdiction } = params;
return (
this._client.get(`/accounts/${account_id}/r2/buckets/${bucketName}`, {
...options,
headers: {
...(cfR2Jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': cfR2Jurisdiction?.toString() }
...(jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': jurisdiction?.toString() }
: undefined),
...options?.headers,
},
Expand Down Expand Up @@ -236,7 +236,7 @@ export interface BucketDeleteParams {
/**
* Header param: The bucket jurisdiction
*/
'cf-r2-jurisdiction'?: 'default' | 'eu' | 'fedramp';
jurisdiction?: 'default' | 'eu' | 'fedramp';
}

export interface BucketGetParams {
Expand All @@ -248,7 +248,7 @@ export interface BucketGetParams {
/**
* Header param: The bucket jurisdiction
*/
'cf-r2-jurisdiction'?: 'default' | 'eu' | 'fedramp';
jurisdiction?: 'default' | 'eu' | 'fedramp';
}

Buckets.Lifecycle = Lifecycle;
Expand Down
24 changes: 12 additions & 12 deletions src/resources/r2/buckets/cors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ export class CORS extends APIResource {
params: CORSUpdateParams,
options?: Core.RequestOptions,
): Core.APIPromise<CORSUpdateResponse> {
const { account_id, 'cf-r2-jurisdiction': cfR2Jurisdiction, ...body } = params;
const { account_id, jurisdiction, ...body } = params;
return (
this._client.put(`/accounts/${account_id}/r2/buckets/${bucketName}/cors`, {
body,
...options,
headers: {
...(cfR2Jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': cfR2Jurisdiction?.toString() }
...(jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': jurisdiction?.toString() }
: undefined),
...options?.headers,
},
Expand All @@ -35,13 +35,13 @@ export class CORS extends APIResource {
params: CORSDeleteParams,
options?: Core.RequestOptions,
): Core.APIPromise<CORSDeleteResponse> {
const { account_id, 'cf-r2-jurisdiction': cfR2Jurisdiction } = params;
const { account_id, jurisdiction } = params;
return (
this._client.delete(`/accounts/${account_id}/r2/buckets/${bucketName}/cors`, {
...options,
headers: {
...(cfR2Jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': cfR2Jurisdiction?.toString() }
...(jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': jurisdiction?.toString() }
: undefined),
...options?.headers,
},
Expand All @@ -57,13 +57,13 @@ export class CORS extends APIResource {
params: CORSGetParams,
options?: Core.RequestOptions,
): Core.APIPromise<CORSGetResponse> {
const { account_id, 'cf-r2-jurisdiction': cfR2Jurisdiction } = params;
const { account_id, jurisdiction } = params;
return (
this._client.get(`/accounts/${account_id}/r2/buckets/${bucketName}/cors`, {
...options,
headers: {
...(cfR2Jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': cfR2Jurisdiction?.toString() }
...(jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': jurisdiction?.toString() }
: undefined),
...options?.headers,
},
Expand Down Expand Up @@ -150,7 +150,7 @@ export interface CORSUpdateParams {
/**
* Header param: The bucket jurisdiction
*/
'cf-r2-jurisdiction'?: 'default' | 'eu' | 'fedramp';
jurisdiction?: 'default' | 'eu' | 'fedramp';
}

export namespace CORSUpdateParams {
Expand Down Expand Up @@ -218,7 +218,7 @@ export interface CORSDeleteParams {
/**
* Header param: The bucket jurisdiction
*/
'cf-r2-jurisdiction'?: 'default' | 'eu' | 'fedramp';
jurisdiction?: 'default' | 'eu' | 'fedramp';
}

export interface CORSGetParams {
Expand All @@ -230,7 +230,7 @@ export interface CORSGetParams {
/**
* Header param: The bucket jurisdiction
*/
'cf-r2-jurisdiction'?: 'default' | 'eu' | 'fedramp';
jurisdiction?: 'default' | 'eu' | 'fedramp';
}

export declare namespace CORS {
Expand Down
40 changes: 20 additions & 20 deletions src/resources/r2/buckets/domains/custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ export class Custom extends APIResource {
params: CustomCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise<CustomCreateResponse> {
const { account_id, 'cf-r2-jurisdiction': cfR2Jurisdiction, ...body } = params;
const { account_id, jurisdiction, ...body } = params;
return (
this._client.post(`/accounts/${account_id}/r2/buckets/${bucketName}/domains/custom`, {
body,
...options,
headers: {
...(cfR2Jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': cfR2Jurisdiction?.toString() }
...(jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': jurisdiction?.toString() }
: undefined),
...options?.headers,
},
Expand All @@ -36,14 +36,14 @@ export class Custom extends APIResource {
params: CustomUpdateParams,
options?: Core.RequestOptions,
): Core.APIPromise<CustomUpdateResponse> {
const { account_id, 'cf-r2-jurisdiction': cfR2Jurisdiction, ...body } = params;
const { account_id, jurisdiction, ...body } = params;
return (
this._client.put(`/accounts/${account_id}/r2/buckets/${bucketName}/domains/custom/${domainName}`, {
body,
...options,
headers: {
...(cfR2Jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': cfR2Jurisdiction?.toString() }
...(jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': jurisdiction?.toString() }
: undefined),
...options?.headers,
},
Expand All @@ -59,13 +59,13 @@ export class Custom extends APIResource {
params: CustomListParams,
options?: Core.RequestOptions,
): Core.APIPromise<CustomListResponse> {
const { account_id, 'cf-r2-jurisdiction': cfR2Jurisdiction } = params;
const { account_id, jurisdiction } = params;
return (
this._client.get(`/accounts/${account_id}/r2/buckets/${bucketName}/domains/custom`, {
...options,
headers: {
...(cfR2Jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': cfR2Jurisdiction?.toString() }
...(jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': jurisdiction?.toString() }
: undefined),
...options?.headers,
},
Expand All @@ -82,13 +82,13 @@ export class Custom extends APIResource {
params: CustomDeleteParams,
options?: Core.RequestOptions,
): Core.APIPromise<CustomDeleteResponse> {
const { account_id, 'cf-r2-jurisdiction': cfR2Jurisdiction } = params;
const { account_id, jurisdiction } = params;
return (
this._client.delete(`/accounts/${account_id}/r2/buckets/${bucketName}/domains/custom/${domainName}`, {
...options,
headers: {
...(cfR2Jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': cfR2Jurisdiction?.toString() }
...(jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': jurisdiction?.toString() }
: undefined),
...options?.headers,
},
Expand All @@ -105,13 +105,13 @@ export class Custom extends APIResource {
params: CustomGetParams,
options?: Core.RequestOptions,
): Core.APIPromise<CustomGetResponse> {
const { account_id, 'cf-r2-jurisdiction': cfR2Jurisdiction } = params;
const { account_id, jurisdiction } = params;
return (
this._client.get(`/accounts/${account_id}/r2/buckets/${bucketName}/domains/custom/${domainName}`, {
...options,
headers: {
...(cfR2Jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': cfR2Jurisdiction?.toString() }
...(jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': jurisdiction?.toString() }
: undefined),
...options?.headers,
},
Expand Down Expand Up @@ -288,7 +288,7 @@ export interface CustomCreateParams {
/**
* Header param: The bucket jurisdiction
*/
'cf-r2-jurisdiction'?: 'default' | 'eu' | 'fedramp';
jurisdiction?: 'default' | 'eu' | 'fedramp';
}

export interface CustomUpdateParams {
Expand All @@ -312,7 +312,7 @@ export interface CustomUpdateParams {
/**
* Header param: The bucket jurisdiction
*/
'cf-r2-jurisdiction'?: 'default' | 'eu' | 'fedramp';
jurisdiction?: 'default' | 'eu' | 'fedramp';
}

export interface CustomListParams {
Expand All @@ -324,7 +324,7 @@ export interface CustomListParams {
/**
* Header param: The bucket jurisdiction
*/
'cf-r2-jurisdiction'?: 'default' | 'eu' | 'fedramp';
jurisdiction?: 'default' | 'eu' | 'fedramp';
}

export interface CustomDeleteParams {
Expand All @@ -336,7 +336,7 @@ export interface CustomDeleteParams {
/**
* Header param: The bucket jurisdiction
*/
'cf-r2-jurisdiction'?: 'default' | 'eu' | 'fedramp';
jurisdiction?: 'default' | 'eu' | 'fedramp';
}

export interface CustomGetParams {
Expand All @@ -348,7 +348,7 @@ export interface CustomGetParams {
/**
* Header param: The bucket jurisdiction
*/
'cf-r2-jurisdiction'?: 'default' | 'eu' | 'fedramp';
jurisdiction?: 'default' | 'eu' | 'fedramp';
}

export declare namespace Custom {
Expand Down
16 changes: 8 additions & 8 deletions src/resources/r2/buckets/domains/managed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ export class Managed extends APIResource {
params: ManagedUpdateParams,
options?: Core.RequestOptions,
): Core.APIPromise<ManagedUpdateResponse> {
const { account_id, 'cf-r2-jurisdiction': cfR2Jurisdiction, ...body } = params;
const { account_id, jurisdiction, ...body } = params;
return (
this._client.put(`/accounts/${account_id}/r2/buckets/${bucketName}/domains/managed`, {
body,
...options,
headers: {
...(cfR2Jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': cfR2Jurisdiction?.toString() }
...(jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': jurisdiction?.toString() }
: undefined),
...options?.headers,
},
Expand All @@ -35,13 +35,13 @@ export class Managed extends APIResource {
params: ManagedListParams,
options?: Core.RequestOptions,
): Core.APIPromise<ManagedListResponse> {
const { account_id, 'cf-r2-jurisdiction': cfR2Jurisdiction } = params;
const { account_id, jurisdiction } = params;
return (
this._client.get(`/accounts/${account_id}/r2/buckets/${bucketName}/domains/managed`, {
...options,
headers: {
...(cfR2Jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': cfR2Jurisdiction?.toString() }
...(jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': jurisdiction?.toString() }
: undefined),
...options?.headers,
},
Expand Down Expand Up @@ -98,7 +98,7 @@ export interface ManagedUpdateParams {
/**
* Header param: The bucket jurisdiction
*/
'cf-r2-jurisdiction'?: 'default' | 'eu' | 'fedramp';
jurisdiction?: 'default' | 'eu' | 'fedramp';
}

export interface ManagedListParams {
Expand All @@ -110,7 +110,7 @@ export interface ManagedListParams {
/**
* Header param: The bucket jurisdiction
*/
'cf-r2-jurisdiction'?: 'default' | 'eu' | 'fedramp';
jurisdiction?: 'default' | 'eu' | 'fedramp';
}

export declare namespace Managed {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ export class Configuration extends APIResource {
params: ConfigurationGetParams,
options?: Core.RequestOptions,
): Core.APIPromise<ConfigurationGetResponse> {
const { account_id, 'cf-r2-jurisdiction': cfR2Jurisdiction } = params;
const { account_id, jurisdiction } = params;
return (
this._client.get(`/accounts/${account_id}/event_notifications/r2/${bucketName}/configuration`, {
...options,
headers: {
...(cfR2Jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': cfR2Jurisdiction?.toString() }
...(jurisdiction?.toString() != null ?
{ 'cf-r2-jurisdiction': jurisdiction?.toString() }
: undefined),
...options?.headers,
},
Expand Down Expand Up @@ -111,7 +111,7 @@ export interface ConfigurationGetParams {
/**
* Header param: The bucket jurisdiction
*/
'cf-r2-jurisdiction'?: 'default' | 'eu' | 'fedramp';
jurisdiction?: 'default' | 'eu' | 'fedramp';
}

Configuration.Queues = Queues;
Expand Down
Loading

0 comments on commit 5aae807

Please sign in to comment.