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

feat(api): OpenAPI spec update via Stainless API #632

Merged
merged 1 commit into from
May 23, 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: 1296
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ec9f8eaec2fb4d1843f2a2ffc2c6ebaf8c45275c9a18f8ece252fd7fe4a7c946.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-11bbd045a344c1971dd533e157e71576ddd513fa22b13187a2bc2bf72a3c5164.yml
22 changes: 7 additions & 15 deletions src/resources/cloudforce-one/requests/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import * as Core from '../../../core';
import { APIResource } from '../../../resource';
import * as MessageAPI from './message';
import * as Shared from '../../shared';

export class MessageResource extends APIResource {
/**
Expand Down Expand Up @@ -52,10 +51,12 @@ export class MessageResource extends APIResource {
messageIdentifer: number,
options?: Core.RequestOptions,
): Core.APIPromise<MessageDeleteResponse> {
return this._client.delete(
`/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`,
options,
);
return (
this._client.delete(
`/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`,
options,
) as Core.APIPromise<{ result: MessageDeleteResponse }>
)._thenUnwrap((obj) => obj.result);
}

/**
Expand Down Expand Up @@ -108,16 +109,7 @@ export interface Message {
created?: string;
}

export interface MessageDeleteResponse {
errors: Array<Shared.ResponseInfo>;

messages: Array<Shared.ResponseInfo>;

/**
* Whether the API call was successful
*/
success: true;
}
export type MessageDeleteResponse = unknown | Array<unknown> | string;

export type MessageGetResponse = Array<Message>;

Expand Down
22 changes: 7 additions & 15 deletions src/resources/cloudforce-one/requests/priority.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import * as Core from '../../../core';
import { APIResource } from '../../../resource';
import * as PriorityAPI from './priority';
import * as Shared from '../../shared';
import * as RequestsAPI from './requests';

export class PriorityResource extends APIResource {
Expand Down Expand Up @@ -48,10 +47,12 @@ export class PriorityResource extends APIResource {
priorityIdentifer: string,
options?: Core.RequestOptions,
): Core.APIPromise<PriorityDeleteResponse> {
return this._client.delete(
`/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`,
options,
);
return (
this._client.delete(
`/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`,
options,
) as Core.APIPromise<{ result: PriorityDeleteResponse }>
)._thenUnwrap((obj) => obj.result);
}

/**
Expand Down Expand Up @@ -146,16 +147,7 @@ export interface PriorityEdit {
tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red';
}

export interface PriorityDeleteResponse {
errors: Array<Shared.ResponseInfo>;

messages: Array<Shared.ResponseInfo>;

/**
* Whether the API call was successful
*/
success: true;
}
export type PriorityDeleteResponse = unknown | Array<unknown> | string;

export interface PriorityCreateParams {
/**
Expand Down
22 changes: 7 additions & 15 deletions src/resources/cloudforce-one/requests/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import * as Core from '../../../core';
import { APIResource } from '../../../resource';
import * as RequestsAPI from './requests';
import * as Shared from '../../shared';
import * as MessageAPI from './message';
import * as PriorityAPI from './priority';
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination';
Expand Down Expand Up @@ -72,10 +71,12 @@ export class Requests extends APIResource {
requestIdentifier: string,
options?: Core.RequestOptions,
): Core.APIPromise<RequestDeleteResponse> {
return this._client.delete(
`/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`,
options,
);
return (
this._client.delete(
`/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`,
options,
) as Core.APIPromise<{ result: RequestDeleteResponse }>
)._thenUnwrap((obj) => obj.result);
}

/**
Expand Down Expand Up @@ -279,16 +280,7 @@ export interface RequestConstants {

export type RequestTypes = Array<string>;

export interface RequestDeleteResponse {
errors: Array<Shared.ResponseInfo>;

messages: Array<Shared.ResponseInfo>;

/**
* Whether the API call was successful
*/
success: true;
}
export type RequestDeleteResponse = unknown | Array<unknown> | string;

export interface RequestCreateParams {
/**
Expand Down