-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8aaf298
commit 92cf869
Showing
9 changed files
with
12 additions
and
1,290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 {} |
Oops, something went wrong.