Skip to content

Commit

Permalink
feat(api): api update (#2095)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and meorphis committed Jan 13, 2025
1 parent 00cc010 commit 8bc3925
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1397
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cef7124dd7d5ad71437e997f848c36260ce9c9230f6f5f6368ab3acb49fcff5f.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-fe729b42d8f4cdf418646a3db49b6486b2e5f33f7acb74f0c48f4c43e16b1c52.yml
3 changes: 1 addition & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6628,13 +6628,12 @@ Types:

- <code><a href="./src/resources/calls/calls.ts">CallsApp</a></code>
- <code><a href="./src/resources/calls/calls.ts">CallsAppWithSecret</a></code>
- <code><a href="./src/resources/calls/calls.ts">CallListResponse</a></code>

Methods:

- <code title="post /accounts/{account_id}/calls/apps">client.calls.<a href="./src/resources/calls/calls.ts">create</a>({ ...params }) -> CallsAppWithSecret</code>
- <code title="put /accounts/{account_id}/calls/apps/{app_id}">client.calls.<a href="./src/resources/calls/calls.ts">update</a>(appId, { ...params }) -> CallsApp</code>
- <code title="get /accounts/{account_id}/calls/apps">client.calls.<a href="./src/resources/calls/calls.ts">list</a>({ ...params }) -> CallListResponsesSinglePage</code>
- <code title="get /accounts/{account_id}/calls/apps">client.calls.<a href="./src/resources/calls/calls.ts">list</a>({ ...params }) -> CallsAppsSinglePage</code>
- <code title="delete /accounts/{account_id}/calls/apps/{app_id}">client.calls.<a href="./src/resources/calls/calls.ts">delete</a>(appId, { ...params }) -> CallsApp</code>
- <code title="get /accounts/{account_id}/calls/apps/{app_id}">client.calls.<a href="./src/resources/calls/calls.ts">get</a>(appId, { ...params }) -> CallsApp</code>

Expand Down
15 changes: 3 additions & 12 deletions src/resources/calls/calls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,9 @@ export class Calls extends APIResource {
list(
params: CallListParams,
options?: Core.RequestOptions,
): Core.PagePromise<CallListResponsesSinglePage, CallListResponse> {
): Core.PagePromise<CallsAppsSinglePage, CallsApp> {
const { account_id } = params;
return this._client.getAPIList(
`/accounts/${account_id}/calls/apps`,
CallListResponsesSinglePage,
options,
);
return this._client.getAPIList(`/accounts/${account_id}/calls/apps`, CallsAppsSinglePage, options);
}

/**
Expand Down Expand Up @@ -75,7 +71,7 @@ export class Calls extends APIResource {
}
}

export class CallListResponsesSinglePage extends SinglePage<CallListResponse> {}
export class CallsAppsSinglePage extends SinglePage<CallsApp> {}

export interface CallsApp {
/**
Expand Down Expand Up @@ -126,11 +122,6 @@ export interface CallsAppWithSecret {
uid?: string;
}

/**
* Bearer token
*/
export type CallListResponse = string;

export interface CallCreateParams {
/**
* Path param: The account identifier tag.
Expand Down
106 changes: 87 additions & 19 deletions src/resources/calls/turn/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,25 +103,93 @@ export interface KeyCreateResponse {
uid?: string;
}

/**
* Bearer token
*/
export type KeyUpdateResponse = string;

/**
* Bearer token
*/
export type KeyListResponse = string;

/**
* Bearer token
*/
export type KeyDeleteResponse = string;

/**
* Bearer token
*/
export type KeyGetResponse = string;
export interface KeyUpdateResponse {
/**
* The date and time the item was created.
*/
created?: string;

/**
* The date and time the item was last modified.
*/
modified?: string;

/**
* A short description of Calls app, not shown to end users.
*/
name?: string;

/**
* A Cloudflare-generated unique identifier for a item.
*/
uid?: string;
}

export interface KeyListResponse {
/**
* The date and time the item was created.
*/
created?: string;

/**
* The date and time the item was last modified.
*/
modified?: string;

/**
* A short description of Calls app, not shown to end users.
*/
name?: string;

/**
* A Cloudflare-generated unique identifier for a item.
*/
uid?: string;
}

export interface KeyDeleteResponse {
/**
* The date and time the item was created.
*/
created?: string;

/**
* The date and time the item was last modified.
*/
modified?: string;

/**
* A short description of Calls app, not shown to end users.
*/
name?: string;

/**
* A Cloudflare-generated unique identifier for a item.
*/
uid?: string;
}

export interface KeyGetResponse {
/**
* The date and time the item was created.
*/
created?: string;

/**
* The date and time the item was last modified.
*/
modified?: string;

/**
* A short description of Calls app, not shown to end users.
*/
name?: string;

/**
* A Cloudflare-generated unique identifier for a item.
*/
uid?: string;
}

export interface KeyCreateParams {
/**
Expand Down

0 comments on commit 8bc3925

Please sign in to comment.