/**
 * Cloudflare RESOURCE-SHARING API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service resource-sharing
 */
import * as Schema from "effect/Schema";
import type * as HttpClient from "effect/unstable/http/HttpClient";
import * as API from "../client/api.ts";
import type { Credentials } from "../credentials.ts";
import { type DefaultErrors } from "../errors.ts";
export interface GetRecipientRequest {
    shareId: string;
    recipientId: string;
    /** Path param: Account identifier. */
    accountId: string;
    /** Query param: Include resources in the response. */
    includeResources?: boolean;
}
export declare const GetRecipientRequest: Schema.Schema<GetRecipientRequest>;
export interface GetRecipientResponse {
    /** Share Recipient identifier tag. */
    id: string;
    /** Account identifier. */
    accountId: string;
    /** Share Recipient association status. */
    associationStatus: "associating" | "associated" | "disassociating" | "disassociated";
    /** When the share was created. */
    created: string;
    /** When the share was modified. */
    modified: string;
    resources?: {
        error: string;
        resourceId: string;
        resourceVersion: number;
        terminal: boolean;
    }[] | null;
}
export declare const GetRecipientResponse: Schema.Schema<GetRecipientResponse>;
export type GetRecipientError = DefaultErrors;
export declare const getRecipient: API.OperationMethod<GetRecipientRequest, GetRecipientResponse, GetRecipientError, Credentials | HttpClient.HttpClient>;
export interface ListRecipientsRequest {
    shareId: string;
    /** Path param: Account identifier. */
    accountId: string;
    page?: number;
    perPage?: number;
    /** Query param: Include resources in the response. */
    includeResources?: boolean;
}
export declare const ListRecipientsRequest: Schema.Schema<ListRecipientsRequest>;
export interface ListRecipientsResponse {
    result: {
        id: string;
        accountId: string;
        associationStatus: "associating" | "associated" | "disassociating" | "disassociated";
        created: string;
        modified: string;
        resources?: {
            error: string;
            resourceId: string;
            resourceVersion: number;
            terminal: boolean;
        }[] | null;
    }[];
    resultInfo?: {
        count?: number | null;
        page?: number | null;
        perPage?: number | null;
        totalCount?: number | null;
    } | null;
}
export declare const ListRecipientsResponse: Schema.Schema<ListRecipientsResponse>;
export type ListRecipientsError = DefaultErrors;
export declare const listRecipients: API.PaginatedOperationMethod<ListRecipientsRequest, ListRecipientsResponse, ListRecipientsError, Credentials | HttpClient.HttpClient>;
export interface CreateRecipientRequest {
    shareId: string;
    /** Path param: Account identifier. */
    pathAccountId: string;
    /** Body param: Account identifier. */
    bodyAccountId?: string;
    /** Body param: Organization identifier. */
    organizationId?: string;
}
export declare const CreateRecipientRequest: Schema.Schema<CreateRecipientRequest>;
export interface CreateRecipientResponse {
    /** Share Recipient identifier tag. */
    id: string;
    /** Account identifier. */
    accountId: string;
    /** Share Recipient association status. */
    associationStatus: "associating" | "associated" | "disassociating" | "disassociated";
    /** When the share was created. */
    created: string;
    /** When the share was modified. */
    modified: string;
    resources?: {
        error: string;
        resourceId: string;
        resourceVersion: number;
        terminal: boolean;
    }[] | null;
}
export declare const CreateRecipientResponse: Schema.Schema<CreateRecipientResponse>;
export type CreateRecipientError = DefaultErrors;
export declare const createRecipient: API.OperationMethod<CreateRecipientRequest, CreateRecipientResponse, CreateRecipientError, Credentials | HttpClient.HttpClient>;
export interface DeleteRecipientRequest {
    shareId: string;
    recipientId: string;
    /** Account identifier. */
    accountId: string;
}
export declare const DeleteRecipientRequest: Schema.Schema<DeleteRecipientRequest>;
export interface DeleteRecipientResponse {
    /** Share Recipient identifier tag. */
    id: string;
    /** Account identifier. */
    accountId: string;
    /** Share Recipient association status. */
    associationStatus: "associating" | "associated" | "disassociating" | "disassociated";
    /** When the share was created. */
    created: string;
    /** When the share was modified. */
    modified: string;
    resources?: {
        error: string;
        resourceId: string;
        resourceVersion: number;
        terminal: boolean;
    }[] | null;
}
export declare const DeleteRecipientResponse: Schema.Schema<DeleteRecipientResponse>;
export type DeleteRecipientError = DefaultErrors;
export declare const deleteRecipient: API.OperationMethod<DeleteRecipientRequest, DeleteRecipientResponse, DeleteRecipientError, Credentials | HttpClient.HttpClient>;
export interface GetResourceRequest {
    shareId: string;
    resourceId: string;
    /** Account identifier. */
    accountId: string;
}
export declare const GetResourceRequest: Schema.Schema<GetResourceRequest>;
export interface GetResourceResponse {
    /** Share Resource identifier. */
    id: string;
    /** When the share was created. */
    created: string;
    /** Resource Metadata. */
    meta: unknown;
    /** When the share was modified. */
    modified: string;
    /** Account identifier. */
    resourceAccountId: string;
    /** Share Resource identifier. */
    resourceId: string;
    /** Resource Type. */
    resourceType: "custom-ruleset" | "widget" | "gateway-policy" | "gateway-destination-ip" | "gateway-block-page-settings" | "gateway-extended-email-matching";
    /** Resource Version. */
    resourceVersion: number;
    /** Resource Status. */
    status: "active" | "deleting" | "deleted";
}
export declare const GetResourceResponse: Schema.Schema<GetResourceResponse>;
export type GetResourceError = DefaultErrors;
export declare const getResource: API.OperationMethod<GetResourceRequest, GetResourceResponse, GetResourceError, Credentials | HttpClient.HttpClient>;
export interface ListResourcesRequest {
    shareId: string;
    /** Path param: Account identifier. */
    accountId: string;
    page?: number;
    perPage?: number;
    /** Query param: Filter share resources by resource_type. */
    resourceType?: "custom-ruleset" | "widget" | "gateway-policy" | "gateway-destination-ip" | "gateway-block-page-settings" | "gateway-extended-email-matching";
    /** Query param: Filter share resources by status. */
    status?: "active" | "deleting" | "deleted";
}
export declare const ListResourcesRequest: Schema.Schema<ListResourcesRequest>;
export interface ListResourcesResponse {
    result: {
        id: string;
        created: string;
        meta: unknown;
        modified: string;
        resourceAccountId: string;
        resourceId: string;
        resourceType: "custom-ruleset" | "widget" | "gateway-policy" | "gateway-destination-ip" | "gateway-block-page-settings" | "gateway-extended-email-matching";
        resourceVersion: number;
        status: "active" | "deleting" | "deleted";
    }[];
    resultInfo?: {
        count?: number | null;
        page?: number | null;
        perPage?: number | null;
        totalCount?: number | null;
    } | null;
}
export declare const ListResourcesResponse: Schema.Schema<ListResourcesResponse>;
export type ListResourcesError = DefaultErrors;
export declare const listResources: API.PaginatedOperationMethod<ListResourcesRequest, ListResourcesResponse, ListResourcesError, Credentials | HttpClient.HttpClient>;
export interface CreateResourceRequest {
    shareId: string;
    /** Path param: Account identifier. */
    accountId: string;
    /** Body param: Resource Metadata. */
    meta: unknown;
    /** Body param: Account identifier. */
    resourceAccountId: string;
    /** Body param: Share Resource identifier. */
    resourceId: string;
    /** Body param: Resource Type. */
    resourceType: "custom-ruleset" | "widget" | "gateway-policy" | "gateway-destination-ip" | "gateway-block-page-settings" | "gateway-extended-email-matching";
}
export declare const CreateResourceRequest: Schema.Schema<CreateResourceRequest>;
export interface CreateResourceResponse {
    /** Share Resource identifier. */
    id: string;
    /** When the share was created. */
    created: string;
    /** Resource Metadata. */
    meta: unknown;
    /** When the share was modified. */
    modified: string;
    /** Account identifier. */
    resourceAccountId: string;
    /** Share Resource identifier. */
    resourceId: string;
    /** Resource Type. */
    resourceType: "custom-ruleset" | "widget" | "gateway-policy" | "gateway-destination-ip" | "gateway-block-page-settings" | "gateway-extended-email-matching";
    /** Resource Version. */
    resourceVersion: number;
    /** Resource Status. */
    status: "active" | "deleting" | "deleted";
}
export declare const CreateResourceResponse: Schema.Schema<CreateResourceResponse>;
export type CreateResourceError = DefaultErrors;
export declare const createResource: API.OperationMethod<CreateResourceRequest, CreateResourceResponse, CreateResourceError, Credentials | HttpClient.HttpClient>;
export interface UpdateResourceRequest {
    shareId: string;
    resourceId: string;
    /** Path param: Account identifier. */
    accountId: string;
    /** Body param: Resource Metadata. */
    meta: unknown;
}
export declare const UpdateResourceRequest: Schema.Schema<UpdateResourceRequest>;
export interface UpdateResourceResponse {
    /** Share Resource identifier. */
    id: string;
    /** When the share was created. */
    created: string;
    /** Resource Metadata. */
    meta: unknown;
    /** When the share was modified. */
    modified: string;
    /** Account identifier. */
    resourceAccountId: string;
    /** Share Resource identifier. */
    resourceId: string;
    /** Resource Type. */
    resourceType: "custom-ruleset" | "widget" | "gateway-policy" | "gateway-destination-ip" | "gateway-block-page-settings" | "gateway-extended-email-matching";
    /** Resource Version. */
    resourceVersion: number;
    /** Resource Status. */
    status: "active" | "deleting" | "deleted";
}
export declare const UpdateResourceResponse: Schema.Schema<UpdateResourceResponse>;
export type UpdateResourceError = DefaultErrors;
export declare const updateResource: API.OperationMethod<UpdateResourceRequest, UpdateResourceResponse, UpdateResourceError, Credentials | HttpClient.HttpClient>;
export interface DeleteResourceRequest {
    shareId: string;
    resourceId: string;
    /** Account identifier. */
    accountId: string;
}
export declare const DeleteResourceRequest: Schema.Schema<DeleteResourceRequest>;
export interface DeleteResourceResponse {
    /** Share Resource identifier. */
    id: string;
    /** When the share was created. */
    created: string;
    /** Resource Metadata. */
    meta: unknown;
    /** When the share was modified. */
    modified: string;
    /** Account identifier. */
    resourceAccountId: string;
    /** Share Resource identifier. */
    resourceId: string;
    /** Resource Type. */
    resourceType: "custom-ruleset" | "widget" | "gateway-policy" | "gateway-destination-ip" | "gateway-block-page-settings" | "gateway-extended-email-matching";
    /** Resource Version. */
    resourceVersion: number;
    /** Resource Status. */
    status: "active" | "deleting" | "deleted";
}
export declare const DeleteResourceResponse: Schema.Schema<DeleteResourceResponse>;
export type DeleteResourceError = DefaultErrors;
export declare const deleteResource: API.OperationMethod<DeleteResourceRequest, DeleteResourceResponse, DeleteResourceError, Credentials | HttpClient.HttpClient>;
export interface GetResourceSharingRequest {
    shareId: string;
    /** Path param: Account identifier. */
    accountId: string;
    /** Query param: Include recipient counts in the response. */
    includeRecipientCounts?: boolean;
    /** Query param: Include resources in the response. */
    includeResources?: boolean;
}
export declare const GetResourceSharingRequest: Schema.Schema<GetResourceSharingRequest>;
export interface GetResourceSharingResponse {
    /** Share identifier tag. */
    id: string;
    /** Account identifier. */
    accountId: string;
    /** The display name of an account. */
    accountName: string;
    /** When the share was created. */
    created: string;
    /** When the share was modified. */
    modified: string;
    /** The name of the share. */
    name: string;
    /** Organization identifier. */
    organizationId: string;
    status: "active" | "deleting" | "deleted";
    targetType: "account" | "organization";
    /** The number of recipients in the 'associated' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
    associatedRecipientCount?: number | null;
    /** The number of recipients in the 'associating' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
    associatingRecipientCount?: number | null;
    /** The number of recipients in the 'disassociated' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
    disassociatedRecipientCount?: number | null;
    /** The number of recipients in the 'disassociating' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
    disassociatingRecipientCount?: number | null;
    kind?: "sent" | "received" | null;
    /** A list of resources that are part of the share. This field is only included when requested via the 'include_resources' parameter. */
    resources?: {
        id: string;
        created: string;
        meta: unknown;
        modified: string;
        resourceAccountId: string;
        resourceId: string;
        resourceType: "custom-ruleset" | "widget" | "gateway-policy" | "gateway-destination-ip" | "gateway-block-page-settings" | "gateway-extended-email-matching";
        resourceVersion: number;
        status: "active" | "deleting" | "deleted";
    }[] | null;
}
export declare const GetResourceSharingResponse: Schema.Schema<GetResourceSharingResponse>;
export type GetResourceSharingError = DefaultErrors;
export declare const getResourceSharing: API.OperationMethod<GetResourceSharingRequest, GetResourceSharingResponse, GetResourceSharingError, Credentials | HttpClient.HttpClient>;
export interface ListResourceSharingsRequest {
    /** Path param: Account identifier. */
    accountId: string;
    page?: number;
    perPage?: number;
    /** Query param: Direction to sort objects. */
    direction?: "asc" | "desc";
    /** Query param: Include recipient counts in the response. */
    includeRecipientCounts?: boolean;
    /** Query param: Include resources in the response. */
    includeResources?: boolean;
    /** Query param: Filter shares by kind. */
    kind?: "sent" | "received";
    /** Query param: Order shares by values in the given field. */
    order?: "name" | "created";
    /** Query param: Filter share resources by resource_types. */
    resourceTypes?: ("custom-ruleset" | "widget" | "gateway-policy" | "gateway-destination-ip" | "gateway-block-page-settings" | "gateway-extended-email-matching")[];
    /** Query param: Filter shares by status. */
    status?: "active" | "deleting" | "deleted";
    /** Query param: Filter shares by target_type. */
    targetType?: "account" | "organization";
}
export declare const ListResourceSharingsRequest: Schema.Schema<ListResourceSharingsRequest>;
export interface ListResourceSharingsResponse {
    result: {
        id: string;
        accountId: string;
        accountName: string;
        created: string;
        modified: string;
        name: string;
        organizationId: string;
        status: "active" | "deleting" | "deleted";
        targetType: "account" | "organization";
        associatedRecipientCount?: number | null;
        associatingRecipientCount?: number | null;
        disassociatedRecipientCount?: number | null;
        disassociatingRecipientCount?: number | null;
        kind?: "sent" | "received" | null;
        resources?: {
            id: string;
            created: string;
            meta: unknown;
            modified: string;
            resourceAccountId: string;
            resourceId: string;
            resourceType: "custom-ruleset" | "widget" | "gateway-policy" | "gateway-destination-ip" | "gateway-block-page-settings" | "gateway-extended-email-matching";
            resourceVersion: number;
            status: "active" | "deleting" | "deleted";
        }[] | null;
    }[];
    resultInfo?: {
        count?: number | null;
        page?: number | null;
        perPage?: number | null;
        totalCount?: number | null;
    } | null;
}
export declare const ListResourceSharingsResponse: Schema.Schema<ListResourceSharingsResponse>;
export type ListResourceSharingsError = DefaultErrors;
export declare const listResourceSharings: API.PaginatedOperationMethod<ListResourceSharingsRequest, ListResourceSharingsResponse, ListResourceSharingsError, Credentials | HttpClient.HttpClient>;
export interface CreateResourceSharingRequest {
    /** Path param: Account identifier. */
    accountId: string;
    /** Body param: The name of the share. */
    name: string;
    /** Body param: */
    recipients: {
        accountId?: string;
        organizationId?: string;
    }[];
    /** Body param: */
    resources: {
        meta: unknown;
        resourceAccountId: string;
        resourceId: string;
        resourceType: "custom-ruleset" | "widget" | "gateway-policy" | "gateway-destination-ip" | "gateway-block-page-settings" | "gateway-extended-email-matching";
    }[];
}
export declare const CreateResourceSharingRequest: Schema.Schema<CreateResourceSharingRequest>;
export interface CreateResourceSharingResponse {
    /** Share identifier tag. */
    id: string;
    /** Account identifier. */
    accountId: string;
    /** The display name of an account. */
    accountName: string;
    /** When the share was created. */
    created: string;
    /** When the share was modified. */
    modified: string;
    /** The name of the share. */
    name: string;
    /** Organization identifier. */
    organizationId: string;
    status: "active" | "deleting" | "deleted";
    targetType: "account" | "organization";
    /** The number of recipients in the 'associated' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
    associatedRecipientCount?: number | null;
    /** The number of recipients in the 'associating' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
    associatingRecipientCount?: number | null;
    /** The number of recipients in the 'disassociated' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
    disassociatedRecipientCount?: number | null;
    /** The number of recipients in the 'disassociating' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
    disassociatingRecipientCount?: number | null;
    kind?: "sent" | "received" | null;
    /** A list of resources that are part of the share. This field is only included when requested via the 'include_resources' parameter. */
    resources?: {
        id: string;
        created: string;
        meta: unknown;
        modified: string;
        resourceAccountId: string;
        resourceId: string;
        resourceType: "custom-ruleset" | "widget" | "gateway-policy" | "gateway-destination-ip" | "gateway-block-page-settings" | "gateway-extended-email-matching";
        resourceVersion: number;
        status: "active" | "deleting" | "deleted";
    }[] | null;
}
export declare const CreateResourceSharingResponse: Schema.Schema<CreateResourceSharingResponse>;
export type CreateResourceSharingError = DefaultErrors;
export declare const createResourceSharing: API.OperationMethod<CreateResourceSharingRequest, CreateResourceSharingResponse, CreateResourceSharingError, Credentials | HttpClient.HttpClient>;
export interface UpdateResourceSharingRequest {
    shareId: string;
    /** Path param: Account identifier. */
    accountId: string;
    /** Body param: The name of the share. */
    name: string;
}
export declare const UpdateResourceSharingRequest: Schema.Schema<UpdateResourceSharingRequest>;
export interface UpdateResourceSharingResponse {
    /** Share identifier tag. */
    id: string;
    /** Account identifier. */
    accountId: string;
    /** The display name of an account. */
    accountName: string;
    /** When the share was created. */
    created: string;
    /** When the share was modified. */
    modified: string;
    /** The name of the share. */
    name: string;
    /** Organization identifier. */
    organizationId: string;
    status: "active" | "deleting" | "deleted";
    targetType: "account" | "organization";
    /** The number of recipients in the 'associated' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
    associatedRecipientCount?: number | null;
    /** The number of recipients in the 'associating' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
    associatingRecipientCount?: number | null;
    /** The number of recipients in the 'disassociated' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
    disassociatedRecipientCount?: number | null;
    /** The number of recipients in the 'disassociating' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
    disassociatingRecipientCount?: number | null;
    kind?: "sent" | "received" | null;
    /** A list of resources that are part of the share. This field is only included when requested via the 'include_resources' parameter. */
    resources?: {
        id: string;
        created: string;
        meta: unknown;
        modified: string;
        resourceAccountId: string;
        resourceId: string;
        resourceType: "custom-ruleset" | "widget" | "gateway-policy" | "gateway-destination-ip" | "gateway-block-page-settings" | "gateway-extended-email-matching";
        resourceVersion: number;
        status: "active" | "deleting" | "deleted";
    }[] | null;
}
export declare const UpdateResourceSharingResponse: Schema.Schema<UpdateResourceSharingResponse>;
export type UpdateResourceSharingError = DefaultErrors;
export declare const updateResourceSharing: API.OperationMethod<UpdateResourceSharingRequest, UpdateResourceSharingResponse, UpdateResourceSharingError, Credentials | HttpClient.HttpClient>;
export interface DeleteResourceSharingRequest {
    shareId: string;
    /** Account identifier. */
    accountId: string;
}
export declare const DeleteResourceSharingRequest: Schema.Schema<DeleteResourceSharingRequest>;
export interface DeleteResourceSharingResponse {
    /** Share identifier tag. */
    id: string;
    /** Account identifier. */
    accountId: string;
    /** The display name of an account. */
    accountName: string;
    /** When the share was created. */
    created: string;
    /** When the share was modified. */
    modified: string;
    /** The name of the share. */
    name: string;
    /** Organization identifier. */
    organizationId: string;
    status: "active" | "deleting" | "deleted";
    targetType: "account" | "organization";
    /** The number of recipients in the 'associated' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
    associatedRecipientCount?: number | null;
    /** The number of recipients in the 'associating' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
    associatingRecipientCount?: number | null;
    /** The number of recipients in the 'disassociated' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
    disassociatedRecipientCount?: number | null;
    /** The number of recipients in the 'disassociating' state. This field is only included when requested via the 'include_recipient_counts' parameter. */
    disassociatingRecipientCount?: number | null;
    kind?: "sent" | "received" | null;
    /** A list of resources that are part of the share. This field is only included when requested via the 'include_resources' parameter. */
    resources?: {
        id: string;
        created: string;
        meta: unknown;
        modified: string;
        resourceAccountId: string;
        resourceId: string;
        resourceType: "custom-ruleset" | "widget" | "gateway-policy" | "gateway-destination-ip" | "gateway-block-page-settings" | "gateway-extended-email-matching";
        resourceVersion: number;
        status: "active" | "deleting" | "deleted";
    }[] | null;
}
export declare const DeleteResourceSharingResponse: Schema.Schema<DeleteResourceSharingResponse>;
export type DeleteResourceSharingError = DefaultErrors;
export declare const deleteResourceSharing: API.OperationMethod<DeleteResourceSharingRequest, DeleteResourceSharingResponse, DeleteResourceSharingError, Credentials | HttpClient.HttpClient>;
//# sourceMappingURL=resource-sharing.d.ts.map