Skip to content

Commit 994f114

Browse files
chore: more workers fixes
1 parent ee69ba2 commit 994f114

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
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-d13e18af00518479d8774a0c66749a4e5a317080942aa6614420af43945e9af5.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-98f41aa4c49f18669477c5df8f1a11eef97e6adfe618f2386f32605e00552ac2.yml
33
openapi_spec_hash: acc278ad012dd509fb7df437122aebec
4-
config_hash: eeb20f5baf7413300a9c66c97e454021
4+
config_hash: 67f412c990647f3cb598378fa22a9db5

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,14 @@ export class Scripts extends APIResource {
6464
params: ScriptUpdateParams,
6565
options?: Core.RequestOptions,
6666
): Core.APIPromise<ScriptUpdateResponse> {
67-
const { account_id, ...body } = params;
67+
const { account_id, files, ...body } = params;
6868
return (
6969
this._client.put(
7070
`/accounts/${account_id}/workers/dispatch/namespaces/${dispatchNamespace}/scripts/${scriptName}`,
7171
Core.maybeMultipartFormRequestOptions({
72-
body,
72+
body: { ...body, ...files },
7373
...options,
7474
headers: { 'Content-Type': 'application/javascript', ...options?.headers },
75-
__binaryRequest: true,
7675
}),
7776
) as Core.APIPromise<{ result: ScriptUpdateResponse }>
7877
)._thenUnwrap((obj) => obj.result);
@@ -240,6 +239,8 @@ export interface ScriptUpdateParams {
240239
* configuration.
241240
*/
242241
metadata: ScriptUpdateParams.Metadata;
242+
243+
files?: Record<string, Core.Uploadable>;
243244
}
244245

245246
export namespace ScriptUpdateParams {

src/resources/workers/scripts/scripts.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,14 @@ export class Scripts extends APIResource {
103103
params: ScriptUpdateParams,
104104
options?: Core.RequestOptions,
105105
): Core.APIPromise<ScriptUpdateResponse> {
106-
const { account_id, ...body } = params;
106+
const { account_id, files, ...body } = params;
107107
return (
108108
this._client.put(
109109
`/accounts/${account_id}/workers/scripts/${scriptName}`,
110110
Core.maybeMultipartFormRequestOptions({
111-
body,
111+
body: { ...body, ...files },
112112
...options,
113113
headers: { 'Content-Type': 'application/javascript', ...options?.headers },
114-
__binaryRequest: true,
115114
}),
116115
) as Core.APIPromise<{ result: ScriptUpdateResponse }>
117116
)._thenUnwrap((obj) => obj.result);
@@ -388,6 +387,8 @@ export interface ScriptUpdateParams {
388387
* configuration.
389388
*/
390389
metadata: ScriptUpdateParams.Metadata;
390+
391+
files?: Record<string, Core.Uploadable>;
391392
}
392393

393394
export namespace ScriptUpdateParams {

0 commit comments

Comments
 (0)