Skip to content

Commit d9ca485

Browse files
feat(api): api update
1 parent f136fa7 commit d9ca485

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

.stats.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1706
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5fae71ae89257df82dea89d7cf73d174ad9d3863f861d8ede030faeca964efd7.yml
3-
openapi_spec_hash: 20d30ef81b6c200bb01bdf67096ec2c3
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b44ed6f571ea485ad08bd1df3658cc1818bcf897c22cf2e5e43d52c23683d25a.yml
3+
openapi_spec_hash: 11c62a4ce5fa654da2e068da418c2924
44
config_hash: 67f412c990647f3cb598378fa22a9db5

src/resources/workers-for-platforms/dispatch/namespaces/scripts/asset-upload.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,20 @@ export interface AssetUploadCreateParams {
4747
* Body param: A manifest ([path]: {hash, size}) map of files to upload. As an
4848
* example, `/blog/hello-world.html` would be a valid path key.
4949
*/
50-
manifest?: Record<string, AssetUploadCreateParams.Manifest>;
50+
manifest: Record<string, AssetUploadCreateParams.Manifest>;
5151
}
5252

5353
export namespace AssetUploadCreateParams {
5454
export interface Manifest {
5555
/**
5656
* The hash of the file.
5757
*/
58-
hash?: string;
58+
hash: string;
5959

6060
/**
6161
* The size of the file in bytes.
6262
*/
63-
size?: number;
63+
size: number;
6464
}
6565
}
6666

src/resources/workers/scripts/assets/upload.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,20 @@ export interface UploadCreateParams {
4646
* Body param: A manifest ([path]: {hash, size}) map of files to upload. As an
4747
* example, `/blog/hello-world.html` would be a valid path key.
4848
*/
49-
manifest?: Record<string, UploadCreateParams.Manifest>;
49+
manifest: Record<string, UploadCreateParams.Manifest>;
5050
}
5151

5252
export namespace UploadCreateParams {
5353
export interface Manifest {
5454
/**
5555
* The hash of the file.
5656
*/
57-
hash?: string;
57+
hash: string;
5858

5959
/**
6060
* The size of the file in bytes.
6161
*/
62-
size?: number;
62+
size: number;
6363
}
6464
}
6565

tests/api-resources/workers-for-platforms/dispatch/namespaces/scripts/asset-upload.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe('resource assetUpload', () => {
1414
const responsePromise = client.workersForPlatforms.dispatch.namespaces.scripts.assetUpload.create(
1515
'my-dispatch-namespace',
1616
'this-is_my_script-01',
17-
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
17+
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353', manifest: { foo: { hash: 'hash', size: 0 } } },
1818
);
1919
const rawResponse = await responsePromise.asResponse();
2020
expect(rawResponse).toBeInstanceOf(Response);

tests/api-resources/workers/scripts/assets/upload.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ describe('resource upload', () => {
1313
test('create: only required params', async () => {
1414
const responsePromise = client.workers.scripts.assets.upload.create('this-is_my_script-01', {
1515
account_id: '023e105f4ecef8ad9ca31a8372d0c353',
16+
manifest: { foo: { hash: 'hash', size: 0 } },
1617
});
1718
const rawResponse = await responsePromise.asResponse();
1819
expect(rawResponse).toBeInstanceOf(Response);

0 commit comments

Comments
 (0)