Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(internal): codegen related update #2169

Merged
merged 1 commit into from
Nov 20, 2024
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
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1448
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f15e70b4a7dca520735e2945ea3109ca12f0b2895a2b5a56112a02251d317085.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4acaaed718bd08d16e3866d5ad032fbf2bbfeb978df2cf5164edb81fe41e4f89.yml
20 changes: 19 additions & 1 deletion src/resources/workers/scripts/subdomain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,25 @@ export interface SubdomainCreateResponse {
* Whether the Worker is available on the workers.dev subdomain.
*/
enabled?: boolean;

/**
* Whether the Worker's Preview URLs should be available on the workers.dev
* subdomain.
*/
previews_enabled?: boolean;
}

export interface SubdomainGetResponse {
/**
* Whether the Worker is available on the workers.dev subdomain.
*/
enabled?: boolean;

/**
* Whether the Worker's Preview URLs should be available on the workers.dev
* subdomain.
*/
previews_enabled?: boolean;
}

export interface SubdomainCreateParams {
Expand All @@ -55,7 +67,13 @@ export interface SubdomainCreateParams {
/**
* Body param: Whether the Worker should be available on the workers.dev subdomain.
*/
enabled?: boolean;
enabled: boolean;

/**
* Body param: Whether the Worker's Preview URLs should be available on the
* workers.dev subdomain.
*/
previews_enabled?: boolean;
}

export interface SubdomainGetParams {
Expand Down
2 changes: 2 additions & 0 deletions tests/api-resources/workers/scripts/subdomain.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ describe('resource subdomain', () => {
test('create: only required params', async () => {
const responsePromise = client.workers.scripts.subdomain.create('this-is_my_script-01', {
account_id: '023e105f4ecef8ad9ca31a8372d0c353',
enabled: true,
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -27,6 +28,7 @@ describe('resource subdomain', () => {
const response = await client.workers.scripts.subdomain.create('this-is_my_script-01', {
account_id: '023e105f4ecef8ad9ca31a8372d0c353',
enabled: true,
previews_enabled: true,
});
});

Expand Down