import { APIResource } from "../../core/resource.js"; import { APIPromise } from "../../core/api-promise.js"; import { PagePromise, V4PagePaginationArray, type V4PagePaginationArrayParams } from "../../core/pagination.js"; import { RequestOptions } from "../../internal/request-options.js"; export declare class BaseRecipients extends APIResource { static readonly _key: readonly ['resourceSharing', 'recipients']; /** * Adds a recipient to a resource share, granting them access to the shared * resources. * * @example * ```ts * const recipient = * await client.resourceSharing.recipients.create( * '3fd85f74b32742f1bff64a85009dda07', * { path_account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ create(shareID: string, params: RecipientCreateParams, options?: RequestOptions): APIPromise; /** * List share recipients by share ID. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const recipientListResponse of client.resourceSharing.recipients.list( * '3fd85f74b32742f1bff64a85009dda07', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * )) { * // ... * } * ``` */ list(shareID: string, params: RecipientListParams, options?: RequestOptions): PagePromise; /** * Deletion is not immediate, an updated share recipient object with a new status * will be returned. * * @example * ```ts * const recipient = * await client.resourceSharing.recipients.delete( * '3fd85f74b32742f1bff64a85009dda07', * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * share_id: '3fd85f74b32742f1bff64a85009dda07', * }, * ); * ``` */ delete(recipientID: string, params: RecipientDeleteParams, options?: RequestOptions): APIPromise; /** * Get share recipient by ID. * * @example * ```ts * const recipient = * await client.resourceSharing.recipients.get( * '3fd85f74b32742f1bff64a85009dda07', * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * share_id: '3fd85f74b32742f1bff64a85009dda07', * }, * ); * ``` */ get(recipientID: string, params: RecipientGetParams, options?: RequestOptions): APIPromise; } export declare class Recipients extends BaseRecipients { } export type RecipientListResponsesV4PagePaginationArray = V4PagePaginationArray; 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; resources?: Array; } export declare namespace RecipientCreateResponse { interface Resource { /** * Share Recipient error message. */ error: string; /** * Share Resource identifier. */ resource_id: string; /** * Resource Version. */ resource_version: number; /** * Whether the error is terminal or will be continually retried. */ terminal: boolean; } } 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; resources?: Array; } export declare namespace RecipientListResponse { interface Resource { /** * Share Recipient error message. */ error: string; /** * Share Resource identifier. */ resource_id: string; /** * Resource Version. */ resource_version: number; /** * Whether the error is terminal or will be continually retried. */ terminal: boolean; } } 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; resources?: Array; } export declare namespace RecipientDeleteResponse { interface Resource { /** * Share Recipient error message. */ error: string; /** * Share Resource identifier. */ resource_id: string; /** * Resource Version. */ resource_version: number; /** * Whether the error is terminal or will be continually retried. */ terminal: boolean; } } 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; resources?: Array; } export declare namespace RecipientGetResponse { interface Resource { /** * Share Recipient error message. */ error: string; /** * Share Resource identifier. */ resource_id: string; /** * Resource Version. */ resource_version: number; /** * Whether the error is terminal or will be continually retried. */ terminal: boolean; } } export interface RecipientCreateParams { /** * Path param: Account identifier. */ path_account_id: string; /** * @deprecated This field has been renamed to `recipient_account_id`. Both names * are accepted during the deprecation period. */ body_account_id?: string; /** * Body param: Organization identifier. */ organization_id?: string; /** * Body param: The account that will receive the share. */ recipient_account_id?: string; } export interface RecipientListParams extends V4PagePaginationArrayParams { /** * Path param: Account identifier. */ account_id: string; /** * Query param: Include resources in the response. */ include_resources?: boolean; } export interface RecipientDeleteParams { /** * Account identifier. */ account_id: string; /** * Share identifier tag. */ share_id: string; } export interface RecipientGetParams { /** * Path param: Account identifier. */ account_id: string; /** * Path param: Share identifier tag. */ share_id: string; /** * Query param: Include resources in the response. */ include_resources?: boolean; } export declare namespace Recipients { export { type RecipientCreateResponse as RecipientCreateResponse, type RecipientListResponse as RecipientListResponse, type RecipientDeleteResponse as RecipientDeleteResponse, type RecipientGetResponse as RecipientGetResponse, type RecipientListResponsesV4PagePaginationArray as RecipientListResponsesV4PagePaginationArray, type RecipientCreateParams as RecipientCreateParams, type RecipientListParams as RecipientListParams, type RecipientDeleteParams as RecipientDeleteParams, type RecipientGetParams as RecipientGetParams, }; } //# sourceMappingURL=recipients.d.ts.map