Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Mar 21, 2024
1 parent bfa1ffd commit 4ecb631
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 46 deletions.
17 changes: 6 additions & 11 deletions src/resources/pages/projects/deployments/deployments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ export class Deployments extends APIResource {
params: DeploymentListParams,
options?: Core.RequestOptions,
): Core.APIPromise<DeploymentListResponse> {
const { account_id, ...query } = params;
const { account_id } = params;
return (
this._client.get(`/accounts/${account_id}/pages/projects/${projectName}/deployments`, {
query,
...options,
}) as Core.APIPromise<{ result: DeploymentListResponse }>
this._client.get(
`/accounts/${account_id}/pages/projects/${projectName}/deployments`,
options,
) as Core.APIPromise<{ result: DeploymentListResponse }>
)._thenUnwrap((obj) => obj.result);
}

Expand Down Expand Up @@ -136,14 +136,9 @@ export interface DeploymentCreateParams {

export interface DeploymentListParams {
/**
* Path param: Identifier
* Identifier
*/
account_id: string;

/**
* Query param: What type of deployments to fetch.
*/
env?: 'production' | 'preview';
}

export interface DeploymentDeleteParams {
Expand Down
20 changes: 0 additions & 20 deletions src/resources/pages/projects/projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -670,11 +670,6 @@ export namespace PagesProjects {
* Service binding.
*/
export interface ServiceBinding {
/**
* The entrypoint to bind to.
*/
entrypoint?: string | null;

/**
* The Service environment.
*/
Expand Down Expand Up @@ -1044,11 +1039,6 @@ export namespace PagesProjects {
* Service binding.
*/
export interface ServiceBinding {
/**
* The entrypoint to bind to.
*/
entrypoint?: string | null;

/**
* The Service environment.
*/
Expand Down Expand Up @@ -1520,11 +1510,6 @@ export namespace ProjectCreateParams {
* Service binding.
*/
export interface ServiceBinding {
/**
* The entrypoint to bind to.
*/
entrypoint?: string | null;

/**
* The Service environment.
*/
Expand Down Expand Up @@ -1894,11 +1879,6 @@ export namespace ProjectCreateParams {
* Service binding.
*/
export interface ServiceBinding {
/**
* The entrypoint to bind to.
*/
entrypoint?: string | null;

/**
* The Service environment.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ describe('resource deployments', () => {
test.skip('list: required and optional params', async () => {
const response = await cloudflare.pages.projects.deployments.list('this-is-my-project-01', {
account_id: '023e105f4ecef8ad9ca31a8372d0c353',
env: 'preview',
});
});

Expand Down
16 changes: 2 additions & 14 deletions tests/api-resources/pages/projects/projects.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,7 @@ describe('resource projects', () => {
placement: { mode: 'smart' },
queue_producers: { QUEUE_PRODUCER_BINDING: { name: 'some-queue' } },
r2_buckets: { R2_BINDING: { name: 'some-bucket' } },
services: {
SERVICE_BINDING: {
entrypoint: 'MyHandler',
environment: 'production',
service: 'example-worker',
},
},
services: { SERVICE_BINDING: { environment: 'production', service: 'example-worker' } },
vectorize_bindings: { VECTORIZE: { index_name: 'my_index' } },
},
production: {
Expand All @@ -77,13 +71,7 @@ describe('resource projects', () => {
placement: { mode: 'smart' },
queue_producers: { QUEUE_PRODUCER_BINDING: { name: 'some-queue' } },
r2_buckets: { R2_BINDING: { name: 'some-bucket' } },
services: {
SERVICE_BINDING: {
entrypoint: 'MyHandler',
environment: 'production',
service: 'example-worker',
},
},
services: { SERVICE_BINDING: { environment: 'production', service: 'example-worker' } },
vectorize_bindings: { VECTORIZE: { index_name: 'my_index' } },
},
},
Expand Down

0 comments on commit 4ecb631

Please sign in to comment.