Skip to content

Commit

Permalink
feat(api): api update (#2192)
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 8aaf298 commit 92cf869
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 1,290 deletions.
4 changes: 2 additions & 2 deletions .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-96e28d4d04ac2f1a00dda1130ef53e8bd9f2f1590e5d7ba8bed38cad29f8b2de.yml
configured_endpoints: 1436
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-511887ff04241247ce592a1c095e403a0fc8b376f7072c28bc59ced11f82e547.yml
36 changes: 0 additions & 36 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7160,53 +7160,17 @@ Methods:
Types:

- <code><a href="./src/resources/resource-sharing/resource-sharing.ts">ResourceSharingCreateResponse</a></code>
- <code><a href="./src/resources/resource-sharing/resource-sharing.ts">ResourceSharingUpdateResponse</a></code>
- <code><a href="./src/resources/resource-sharing/resource-sharing.ts">ResourceSharingListResponse</a></code>
- <code><a href="./src/resources/resource-sharing/resource-sharing.ts">ResourceSharingDeleteResponse</a></code>
- <code><a href="./src/resources/resource-sharing/resource-sharing.ts">ResourceSharingGetResponse</a></code>

Methods:

- <code title="post /accounts/{account_id}/shares">client.resourceSharing.<a href="./src/resources/resource-sharing/resource-sharing.ts">create</a>({ ...params }) -> ResourceSharingCreateResponse</code>
- <code title="put /accounts/{account_id}/shares/{share_identifier}">client.resourceSharing.<a href="./src/resources/resource-sharing/resource-sharing.ts">update</a>(shareIdentifier, { ...params }) -> ResourceSharingUpdateResponse</code>
- <code title="get /accounts/{account_id}/shares">client.resourceSharing.<a href="./src/resources/resource-sharing/resource-sharing.ts">list</a>({ ...params }) -> ResourceSharingListResponsesV4PagePaginationArray</code>
- <code title="delete /accounts/{account_id}/shares/{share_identifier}">client.resourceSharing.<a href="./src/resources/resource-sharing/resource-sharing.ts">delete</a>(shareIdentifier, { ...params }) -> ResourceSharingDeleteResponse</code>
- <code title="get /accounts/{account_id}/shares/{share_identifier}">client.resourceSharing.<a href="./src/resources/resource-sharing/resource-sharing.ts">get</a>(shareIdentifier, { ...params }) -> ResourceSharingGetResponse</code>

## Recipients

Types:

- <code><a href="./src/resources/resource-sharing/recipients.ts">RecipientCreateResponse</a></code>
- <code><a href="./src/resources/resource-sharing/recipients.ts">RecipientListResponse</a></code>
- <code><a href="./src/resources/resource-sharing/recipients.ts">RecipientDeleteResponse</a></code>
- <code><a href="./src/resources/resource-sharing/recipients.ts">RecipientGetResponse</a></code>

Methods:

- <code title="post /accounts/{account_id}/shares/{share_identifier}/recipients">client.resourceSharing.recipients.<a href="./src/resources/resource-sharing/recipients.ts">create</a>(shareIdentifier, { ...params }) -> RecipientCreateResponse</code>
- <code title="get /accounts/{account_id}/shares/{share_identifier}/recipients">client.resourceSharing.recipients.<a href="./src/resources/resource-sharing/recipients.ts">list</a>(shareIdentifier, { ...params }) -> RecipientListResponsesV4PagePaginationArray</code>
- <code title="delete /accounts/{account_id}/shares/{share_identifier}/recipients/{recipient_identifier}">client.resourceSharing.recipients.<a href="./src/resources/resource-sharing/recipients.ts">delete</a>(shareIdentifier, recipientIdentifier, { ...params }) -> RecipientDeleteResponse</code>
- <code title="get /accounts/{account_id}/shares/{share_identifier}/recipients/{recipient_identifier}">client.resourceSharing.recipients.<a href="./src/resources/resource-sharing/recipients.ts">get</a>(shareIdentifier, recipientIdentifier, { ...params }) -> RecipientGetResponse</code>

## Resources

Types:

- <code><a href="./src/resources/resource-sharing/resources.ts">ResourceCreateResponse</a></code>
- <code><a href="./src/resources/resource-sharing/resources.ts">ResourceUpdateResponse</a></code>
- <code><a href="./src/resources/resource-sharing/resources.ts">ResourceListResponse</a></code>
- <code><a href="./src/resources/resource-sharing/resources.ts">ResourceDeleteResponse</a></code>
- <code><a href="./src/resources/resource-sharing/resources.ts">ResourceGetResponse</a></code>

Methods:

- <code title="post /accounts/{account_id}/shares/{share_identifier}/resources">client.resourceSharing.resources.<a href="./src/resources/resource-sharing/resources.ts">create</a>(shareIdentifier, { ...params }) -> ResourceCreateResponse</code>
- <code title="put /accounts/{account_id}/shares/{share_identifier}/resources/{resource_identifier}">client.resourceSharing.resources.<a href="./src/resources/resource-sharing/resources.ts">update</a>(shareIdentifier, resourceIdentifier, { ...params }) -> ResourceUpdateResponse</code>
- <code title="get /accounts/{account_id}/shares/{share_identifier}/resources">client.resourceSharing.resources.<a href="./src/resources/resource-sharing/resources.ts">list</a>(shareIdentifier, { ...params }) -> ResourceListResponsesV4PagePaginationArray</code>
- <code title="delete /accounts/{account_id}/shares/{share_identifier}/resources/{resource_identifier}">client.resourceSharing.resources.<a href="./src/resources/resource-sharing/resources.ts">delete</a>(shareIdentifier, resourceIdentifier, { ...params }) -> ResourceDeleteResponse</code>
- <code title="get /accounts/{account_id}/shares/{share_identifier}/resources/{resource_identifier}">client.resourceSharing.resources.<a href="./src/resources/resource-sharing/resources.ts">get</a>(shareIdentifier, resourceIdentifier, { ...params }) -> ResourceGetResponse</code>

# LeakedCredentialChecks

Types:
Expand Down
28 changes: 2 additions & 26 deletions src/resources/resource-sharing/index.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,5 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export {
RecipientListResponsesV4PagePaginationArray,
Recipients,
type RecipientCreateResponse,
type RecipientListResponse,
type RecipientDeleteResponse,
type RecipientGetResponse,
type RecipientCreateParams,
type RecipientListParams,
type RecipientDeleteParams,
type RecipientGetParams,
} from './recipients';
export {
ResourceListResponsesV4PagePaginationArray,
Resources,
type ResourceCreateResponse,
type ResourceUpdateResponse,
type ResourceListResponse,
type ResourceDeleteResponse,
type ResourceGetResponse,
type ResourceCreateParams,
type ResourceUpdateParams,
type ResourceListParams,
type ResourceDeleteParams,
type ResourceGetParams,
} from './resources';
export { Recipients } from './recipients';
export { ResourceSharing } from './resource-sharing';
export { Resources } from './resources';
258 changes: 1 addition & 257 deletions src/resources/resource-sharing/recipients.ts
Original file line number Diff line number Diff line change
@@ -1,261 +1,5 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { APIResource } from '../../resource';
import * as Core from '../../core';
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination';

export class Recipients extends APIResource {
/**
* Create a new share recipient
*/
create(
shareIdentifier: string,
params: RecipientCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise<RecipientCreateResponse> {
const { path_account_id, body_account_id, ...body } = params;
return (
this._client.post(`/accounts/${path_account_id}/shares/${shareIdentifier}/recipients`, {
body: { account_id: body_account_id, ...body },
...options,
}) as Core.APIPromise<{ result: RecipientCreateResponse }>
)._thenUnwrap((obj) => obj.result);
}

/**
* List share recipients by share ID.
*/
list(
shareIdentifier: string,
params: RecipientListParams,
options?: Core.RequestOptions,
): Core.PagePromise<RecipientListResponsesV4PagePaginationArray, RecipientListResponse> {
const { account_id, ...query } = params;
return this._client.getAPIList(
`/accounts/${account_id}/shares/${shareIdentifier}/recipients`,
RecipientListResponsesV4PagePaginationArray,
{ query, ...options },
);
}

/**
* Deletion is not immediate, an updated share recipient object with a new status
* will be returned.
*/
delete(
shareIdentifier: string,
recipientIdentifier: string,
params: RecipientDeleteParams,
options?: Core.RequestOptions,
): Core.APIPromise<RecipientDeleteResponse> {
const { account_id } = params;
return (
this._client.delete(
`/accounts/${account_id}/shares/${shareIdentifier}/recipients/${recipientIdentifier}`,
options,
) as Core.APIPromise<{ result: RecipientDeleteResponse }>
)._thenUnwrap((obj) => obj.result);
}

/**
* Get share recipient by ID.
*/
get(
shareIdentifier: string,
recipientIdentifier: string,
params: RecipientGetParams,
options?: Core.RequestOptions,
): Core.APIPromise<RecipientGetResponse> {
const { account_id } = params;
return (
this._client.get(
`/accounts/${account_id}/shares/${shareIdentifier}/recipients/${recipientIdentifier}`,
options,
) as Core.APIPromise<{ result: RecipientGetResponse }>
)._thenUnwrap((obj) => obj.result);
}
}

export class RecipientListResponsesV4PagePaginationArray extends V4PagePaginationArray<RecipientListResponse> {}

export interface RecipientCreateResponse {
/**
* Share Recipient identifier tag.
*/
id: string;

/**
* Account identifier.
*/
account_id: string;

/**
* Share Recipient association status.
*/
association_status: 'associating' | 'associated' | 'disassociating' | 'disassociated';

/**
* When the share was created.
*/
created: string;

/**
* When the share was modified.
*/
modified: string;

/**
* Share Recipient status message.
*/
status_message: string;
}

export interface RecipientListResponse {
/**
* Share Recipient identifier tag.
*/
id: string;

/**
* Account identifier.
*/
account_id: string;

/**
* Share Recipient association status.
*/
association_status: 'associating' | 'associated' | 'disassociating' | 'disassociated';

/**
* When the share was created.
*/
created: string;

/**
* When the share was modified.
*/
modified: string;

/**
* Share Recipient status message.
*/
status_message: string;
}

export interface RecipientDeleteResponse {
/**
* Share Recipient identifier tag.
*/
id: string;

/**
* Account identifier.
*/
account_id: string;

/**
* Share Recipient association status.
*/
association_status: 'associating' | 'associated' | 'disassociating' | 'disassociated';

/**
* When the share was created.
*/
created: string;

/**
* When the share was modified.
*/
modified: string;

/**
* Share Recipient status message.
*/
status_message: string;
}

export interface RecipientGetResponse {
/**
* Share Recipient identifier tag.
*/
id: string;

/**
* Account identifier.
*/
account_id: string;

/**
* Share Recipient association status.
*/
association_status: 'associating' | 'associated' | 'disassociating' | 'disassociated';

/**
* When the share was created.
*/
created: string;

/**
* When the share was modified.
*/
modified: string;

/**
* Share Recipient status message.
*/
status_message: string;
}

export interface RecipientCreateParams {
/**
* Path param: Account identifier.
*/
path_account_id: string;

/**
* Body param: Account identifier.
*/
body_account_id?: string;

/**
* Body param: Organization identifier.
*/
organization_id?: string;
}

export interface RecipientListParams extends V4PagePaginationArrayParams {
/**
* Path param: Account identifier.
*/
account_id: string;
}

export interface RecipientDeleteParams {
/**
* Account identifier.
*/
account_id: string;
}

export interface RecipientGetParams {
/**
* Account identifier.
*/
account_id: string;
}

Recipients.RecipientListResponsesV4PagePaginationArray = RecipientListResponsesV4PagePaginationArray;

export declare namespace Recipients {
export {
type RecipientCreateResponse as RecipientCreateResponse,
type RecipientListResponse as RecipientListResponse,
type RecipientDeleteResponse as RecipientDeleteResponse,
type RecipientGetResponse as RecipientGetResponse,
RecipientListResponsesV4PagePaginationArray as RecipientListResponsesV4PagePaginationArray,
type RecipientCreateParams as RecipientCreateParams,
type RecipientListParams as RecipientListParams,
type RecipientDeleteParams as RecipientDeleteParams,
type RecipientGetParams as RecipientGetParams,
};
}
export class Recipients extends APIResource {}
Loading

0 comments on commit 92cf869

Please sign in to comment.