Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/resources/kv/namespaces/values.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ export class Values extends APIResource {
return (
this._client.put(
`/accounts/${account_id}/storage/kv/namespaces/${namespaceId}/values/${keyName}`,
Core.multipartFormRequestOptions({ query: { expiration, expiration_ttl }, body,
__multipartSyntax: 'json', ...options }),
Core.multipartFormRequestOptions({
query: { expiration, expiration_ttl },
body,
__multipartSyntax: 'json',
...options,
}),
) as Core.APIPromise<{ result: ValueUpdateResponse | null }>
)._thenUnwrap((obj) => obj.result);
}
Expand Down
4 changes: 2 additions & 2 deletions src/resources/organizations/organization-profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ export class OrganizationProfileResource extends APIResource {
* Get an organizations profile if it exists. (Currently in Closed Beta - see
* https://developers.cloudflare.com/fundamentals/organizations/)
*/
get(organizationId: string, options?: Core.RequestOptions): Core.APIPromise<unnamed_schema_0.Result> {
get(organizationId: string, options?: Core.RequestOptions): Core.APIPromise<OrganizationProfile> {
return (
this._client.get(`/organizations/${organizationId}/profile`, options) as Core.APIPromise<{
result: unnamed_schema_0.Result;
result: OrganizationProfile;
}>
)._thenUnwrap((obj) => obj.result);
}
Expand Down
10 changes: 10 additions & 0 deletions tests/api-resources/workers/beta/workers/workers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ describe('resource workers', () => {
const responsePromise = client.workers.beta.workers.create({
account_id: '023e105f4ecef8ad9ca31a8372d0c353',
name: 'my-worker',
logpush: false,
observability: {},
subdomain: {},
tags: [],
tail_consumers: [],
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand Down Expand Up @@ -44,6 +49,11 @@ describe('resource workers', () => {
const responsePromise = client.workers.beta.workers.update('worker_id', {
account_id: '023e105f4ecef8ad9ca31a8372d0c353',
name: 'my-worker',
logpush: false,
observability: {},
subdomain: {},
tags: [],
tail_consumers: [],
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand Down