Skip to content

Commit 6750686

Browse files
chore(api): upload stainless config from cloudflare-config
1 parent e154418 commit 6750686

File tree

10 files changed

+99
-44
lines changed

10 files changed

+99
-44
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: 1781
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bd1bc86694bdc2e2deb05f0e743afa87b94ff96a55b10fdd6a15b11fa7ee34c0.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6eb17c94a367941ef4fd3ad0750ea42308813e96e904d31b776ed848d849be90.yml
33
openapi_spec_hash: 9fa312b08e4ba5659a03d7143210437f
4-
config_hash: cbc31befc4267a7deb9d79b1767a2b65
4+
config_hash: b5608440cfd3f75f7cfabd36fbc7cd88

api.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,16 +2120,17 @@ Methods:
21202120

21212121
Types:
21222122

2123-
- <code><a href="./src/resources/workers/scripts/deployments.ts">Deployment</a></code>
2123+
- <code><a href="./src/resources/workers/scripts/deployments.ts">DeploymentCreateResponse</a></code>
21242124
- <code><a href="./src/resources/workers/scripts/deployments.ts">DeploymentListResponse</a></code>
21252125
- <code><a href="./src/resources/workers/scripts/deployments.ts">DeploymentDeleteResponse</a></code>
2126+
- <code><a href="./src/resources/workers/scripts/deployments.ts">DeploymentGetResponse</a></code>
21262127

21272128
Methods:
21282129

2129-
- <code title="post /accounts/{account_id}/workers/scripts/{script_name}/deployments">client.workers.scripts.deployments.<a href="./src/resources/workers/scripts/deployments.ts">create</a>(scriptName, { ...params }) -> Deployment</code>
2130+
- <code title="post /accounts/{account_id}/workers/scripts/{script_name}/deployments">client.workers.scripts.deployments.<a href="./src/resources/workers/scripts/deployments.ts">create</a>(scriptName, { ...params }) -> DeploymentCreateResponse</code>
21302131
- <code title="get /accounts/{account_id}/workers/scripts/{script_name}/deployments">client.workers.scripts.deployments.<a href="./src/resources/workers/scripts/deployments.ts">list</a>(scriptName, { ...params }) -> DeploymentListResponse</code>
21312132
- <code title="delete /accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}">client.workers.scripts.deployments.<a href="./src/resources/workers/scripts/deployments.ts">delete</a>(scriptName, deploymentId, { ...params }) -> DeploymentDeleteResponse</code>
2132-
- <code title="get /accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}">client.workers.scripts.deployments.<a href="./src/resources/workers/scripts/deployments.ts">get</a>(scriptName, deploymentId, { ...params }) -> Deployment</code>
2133+
- <code title="get /accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}">client.workers.scripts.deployments.<a href="./src/resources/workers/scripts/deployments.ts">get</a>(scriptName, deploymentId, { ...params }) -> DeploymentGetResponse</code>
21332134

21342135
### Versions
21352136

src/resources/kv/namespaces/keys.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,6 @@ export interface Key {
117117
*/
118118
expiration?: number;
119119

120-
/**
121-
* Arbitrary JSON that is associated with a key.
122-
*/
123120
metadata?: unknown;
124121
}
125122

@@ -156,14 +153,8 @@ export namespace KeyBulkGetResponse {
156153

157154
export namespace WorkersKVBulkGetResultWithMetadata {
158155
export interface Values {
159-
/**
160-
* The metadata associated with the key.
161-
*/
162156
metadata: unknown;
163157

164-
/**
165-
* The value associated with the key.
166-
*/
167158
value: unknown;
168159

169160
/**
@@ -277,9 +268,6 @@ export namespace KeyBulkUpdateParams {
277268
*/
278269
expiration_ttl?: number;
279270

280-
/**
281-
* Arbitrary JSON that is associated with a key.
282-
*/
283271
metadata?: unknown;
284272
}
285273
}

src/resources/kv/namespaces/metadata.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ export class Metadata extends APIResource {
3434
}
3535
}
3636

37-
/**
38-
* Arbitrary JSON that is associated with a key.
39-
*/
4037
export type MetadataGetResponse = unknown;
4138

4239
export interface MetadataGetParams {

src/resources/kv/namespaces/namespaces.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -312,14 +312,8 @@ export namespace NamespaceBulkGetResponse {
312312

313313
export namespace WorkersKVBulkGetResultWithMetadata {
314314
export interface Values {
315-
/**
316-
* The metadata associated with the key.
317-
*/
318315
metadata: unknown;
319316

320-
/**
321-
* The value associated with the key.
322-
*/
323317
value: unknown;
324318

325319
/**
@@ -468,9 +462,6 @@ export namespace NamespaceBulkUpdateParams {
468462
*/
469463
expiration_ttl?: number;
470464

471-
/**
472-
* Arbitrary JSON that is associated with a key.
473-
*/
474465
metadata?: unknown;
475466
}
476467
}

src/resources/kv/namespaces/values.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export interface ValueUpdateParams {
134134
expiration_ttl?: number;
135135

136136
/**
137-
* Body param: Associates arbitrary JSON data with a key/value pair.
137+
* Body param:
138138
*/
139139
metadata?: unknown;
140140
}

src/resources/workers/scripts/deployments.ts

Lines changed: 85 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ export class Deployments extends APIResource {
3333
scriptName: string,
3434
params: DeploymentCreateParams,
3535
options?: Core.RequestOptions,
36-
): Core.APIPromise<Deployment> {
36+
): Core.APIPromise<DeploymentCreateResponse> {
3737
const { account_id, force, ...body } = params;
3838
return (
3939
this._client.post(`/accounts/${account_id}/workers/scripts/${scriptName}/deployments`, {
4040
query: { force },
4141
body,
4242
...options,
43-
}) as Core.APIPromise<{ result: Deployment }>
43+
}) as Core.APIPromise<{ result: DeploymentCreateResponse }>
4444
)._thenUnwrap((obj) => obj.result);
4545
}
4646

@@ -116,18 +116,18 @@ export class Deployments extends APIResource {
116116
deploymentId: string,
117117
params: DeploymentGetParams,
118118
options?: Core.RequestOptions,
119-
): Core.APIPromise<Deployment> {
119+
): Core.APIPromise<DeploymentGetResponse> {
120120
const { account_id } = params;
121121
return (
122122
this._client.get(
123123
`/accounts/${account_id}/workers/scripts/${scriptName}/deployments/${deploymentId}`,
124124
options,
125-
) as Core.APIPromise<{ result: Deployment }>
125+
) as Core.APIPromise<{ result: DeploymentGetResponse }>
126126
)._thenUnwrap((obj) => obj.result);
127127
}
128128
}
129129

130-
export interface Deployment {
130+
export interface DeploymentCreateResponse {
131131
id: string;
132132

133133
created_on: string;
@@ -136,14 +136,14 @@ export interface Deployment {
136136

137137
strategy: 'percentage';
138138

139-
versions: Array<Deployment.Version>;
139+
versions: Array<DeploymentCreateResponse.Version>;
140140

141-
annotations?: Deployment.Annotations;
141+
annotations?: DeploymentCreateResponse.Annotations;
142142

143143
author_email?: string;
144144
}
145145

146-
export namespace Deployment {
146+
export namespace DeploymentCreateResponse {
147147
export interface Version {
148148
percentage: number;
149149

@@ -164,7 +164,45 @@ export namespace Deployment {
164164
}
165165

166166
export interface DeploymentListResponse {
167-
deployments: Array<Deployment>;
167+
deployments: Array<DeploymentListResponse.Deployment>;
168+
}
169+
170+
export namespace DeploymentListResponse {
171+
export interface Deployment {
172+
id: string;
173+
174+
created_on: string;
175+
176+
source: string;
177+
178+
strategy: 'percentage';
179+
180+
versions: Array<Deployment.Version>;
181+
182+
annotations?: Deployment.Annotations;
183+
184+
author_email?: string;
185+
}
186+
187+
export namespace Deployment {
188+
export interface Version {
189+
percentage: number;
190+
191+
version_id: string;
192+
}
193+
194+
export interface Annotations {
195+
/**
196+
* Human-readable message about the deployment. Truncated to 100 bytes.
197+
*/
198+
'workers/message'?: string;
199+
200+
/**
201+
* Operation that triggered the creation of the deployment.
202+
*/
203+
'workers/triggered_by'?: string;
204+
}
205+
}
168206
}
169207

170208
export interface DeploymentDeleteResponse {
@@ -212,6 +250,42 @@ export namespace DeploymentDeleteResponse {
212250
}
213251
}
214252

253+
export interface DeploymentGetResponse {
254+
id: string;
255+
256+
created_on: string;
257+
258+
source: string;
259+
260+
strategy: 'percentage';
261+
262+
versions: Array<DeploymentGetResponse.Version>;
263+
264+
annotations?: DeploymentGetResponse.Annotations;
265+
266+
author_email?: string;
267+
}
268+
269+
export namespace DeploymentGetResponse {
270+
export interface Version {
271+
percentage: number;
272+
273+
version_id: string;
274+
}
275+
276+
export interface Annotations {
277+
/**
278+
* Human-readable message about the deployment. Truncated to 100 bytes.
279+
*/
280+
'workers/message'?: string;
281+
282+
/**
283+
* Operation that triggered the creation of the deployment.
284+
*/
285+
'workers/triggered_by'?: string;
286+
}
287+
}
288+
215289
export interface DeploymentCreateParams {
216290
/**
217291
* Path param: Identifier.
@@ -279,9 +353,10 @@ export interface DeploymentGetParams {
279353

280354
export declare namespace Deployments {
281355
export {
282-
type Deployment as Deployment,
356+
type DeploymentCreateResponse as DeploymentCreateResponse,
283357
type DeploymentListResponse as DeploymentListResponse,
284358
type DeploymentDeleteResponse as DeploymentDeleteResponse,
359+
type DeploymentGetResponse as DeploymentGetResponse,
285360
type DeploymentCreateParams as DeploymentCreateParams,
286361
type DeploymentListParams as DeploymentListParams,
287362
type DeploymentDeleteParams as DeploymentDeleteParams,

src/resources/workers/scripts/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ export { Assets } from './assets/index';
44
export { Content, type ContentUpdateParams, type ContentGetParams } from './content';
55
export {
66
Deployments,
7-
type Deployment,
7+
type DeploymentCreateResponse,
88
type DeploymentListResponse,
99
type DeploymentDeleteResponse,
10+
type DeploymentGetResponse,
1011
type DeploymentCreateParams,
1112
type DeploymentListParams,
1213
type DeploymentDeleteParams,

src/resources/workers/scripts/scripts.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import * as ContentAPI from './content';
77
import { Content, ContentGetParams, ContentUpdateParams } from './content';
88
import * as DeploymentsAPI from './deployments';
99
import {
10-
Deployment,
1110
DeploymentCreateParams,
11+
DeploymentCreateResponse,
1212
DeploymentDeleteParams,
1313
DeploymentDeleteResponse,
1414
DeploymentGetParams,
15+
DeploymentGetResponse,
1516
DeploymentListParams,
1617
DeploymentListResponse,
1718
Deployments,
@@ -1310,9 +1311,10 @@ export declare namespace Scripts {
13101311

13111312
export {
13121313
Deployments as Deployments,
1313-
type Deployment as Deployment,
1314+
type DeploymentCreateResponse as DeploymentCreateResponse,
13141315
type DeploymentListResponse as DeploymentListResponse,
13151316
type DeploymentDeleteResponse as DeploymentDeleteResponse,
1317+
type DeploymentGetResponse as DeploymentGetResponse,
13161318
type DeploymentCreateParams as DeploymentCreateParams,
13171319
type DeploymentListParams as DeploymentListParams,
13181320
type DeploymentDeleteParams as DeploymentDeleteParams,

tests/api-resources/kv/namespaces/values.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('resource values', () => {
3232
value: 'Some Value',
3333
expiration: 1578435000,
3434
expiration_ttl: 300,
35-
metadata: {},
35+
metadata: { someMetadataKey: 'someMetadataValue' },
3636
});
3737
});
3838

0 commit comments

Comments
 (0)