import * as HttpClient from "effect/unstable/http/HttpClient";
import * as redacted from "effect/Redacted";
import * as S from "effect/Schema";
import * as stream from "effect/Stream";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import * as C from "../category.js";
import { SensitiveString } from "../sensitive.js";
const svc = T.AwsApiService({
    sdkId: "ConnectParticipant",
    serviceShapeName: "AmazonConnectParticipantServiceLambda",
});
const auth = T.AwsAuthSigv4({ name: "execute-api" });
const ver = T.ServiceVersion("2018-09-07");
const proto = T.AwsProtocolsRestJson1();
const rules = T.EndpointResolver((p, _) => {
    const { Region, UseDualStack = false, UseFIPS = false, Endpoint } = p;
    const e = (u, p = {}, h = {}) => ({
        type: "endpoint",
        endpoint: { url: u, properties: p, headers: h },
    });
    const err = (m) => ({
        type: "error",
        message: m,
    });
    if (Endpoint != null) {
        if (UseFIPS === true) {
            return err("Invalid Configuration: FIPS and custom endpoint are not supported");
        }
        if (UseDualStack === true) {
            return err("Invalid Configuration: Dualstack and custom endpoint are not supported");
        }
        return e(Endpoint);
    }
    if (Region != null) {
        {
            const PartitionResult = _.partition(Region);
            if (PartitionResult != null && PartitionResult !== false) {
                if (UseFIPS === true && UseDualStack === true) {
                    if (true === _.getAttr(PartitionResult, "supportsFIPS") &&
                        true === _.getAttr(PartitionResult, "supportsDualStack")) {
                        return e(`https://participant.connect-fips.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("FIPS and DualStack are enabled, but this partition does not support one or both");
                }
                if (UseFIPS === true) {
                    if (_.getAttr(PartitionResult, "supportsFIPS") === true) {
                        if (_.getAttr(PartitionResult, "name") === "aws-us-gov") {
                            return e(`https://participant.connect.${Region}.amazonaws.com`);
                        }
                        return e(`https://participant.connect-fips.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
                    }
                    return err("FIPS is enabled but this partition does not support FIPS");
                }
                if (UseDualStack === true) {
                    if (true === _.getAttr(PartitionResult, "supportsDualStack")) {
                        return e(`https://participant.connect.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("DualStack is enabled but this partition does not support DualStack");
                }
                return e(`https://participant.connect.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
            }
        }
    }
    return err("Invalid Configuration: Missing Region");
});
export const CancelParticipantAuthenticationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    SessionId: S.String,
    ConnectionToken: S.String.pipe(T.HttpHeader("X-Amz-Bearer")),
}).pipe(T.all(T.Http({ method: "POST", uri: "/participant/cancel-authentication" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CancelParticipantAuthenticationRequest",
});
export const CancelParticipantAuthenticationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "CancelParticipantAuthenticationResponse",
});
export const AttachmentIdList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const CompleteAttachmentUploadRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AttachmentIds: AttachmentIdList,
    ClientToken: S.String.pipe(T.IdempotencyToken()),
    ConnectionToken: S.String.pipe(T.HttpHeader("X-Amz-Bearer")),
}).pipe(T.all(T.Http({
    method: "POST",
    uri: "/participant/complete-attachment-upload",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "CompleteAttachmentUploadRequest",
});
export const CompleteAttachmentUploadResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "CompleteAttachmentUploadResponse",
});
export const ConnectionType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ConnectionTypeList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ConnectionType);
export const CreateParticipantConnectionRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Type: S.optional(ConnectionTypeList),
    ParticipantToken: S.String.pipe(T.HttpHeader("X-Amz-Bearer")),
    ConnectParticipant: S.optional(S.Boolean),
}).pipe(T.all(T.Http({ method: "POST", uri: "/participant/connection" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateParticipantConnectionRequest",
});
export const Websocket = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Url: S.optional(S.String),
    ConnectionExpiry: S.optional(S.String),
})).annotate({ identifier: "Websocket" });
export const ConnectionCredentials = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ConnectionToken: S.optional(S.String),
    Expiry: S.optional(S.String),
})).annotate({
    identifier: "ConnectionCredentials",
});
export const Attendee = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AttendeeId: S.optional(S.String),
    JoinToken: S.optional(SensitiveString),
})).annotate({ identifier: "Attendee" });
export const WebRTCMediaPlacement = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AudioHostUrl: S.optional(S.String),
    AudioFallbackUrl: S.optional(S.String),
    SignalingUrl: S.optional(S.String),
    EventIngestionUrl: S.optional(S.String),
})).annotate({
    identifier: "WebRTCMediaPlacement",
});
export const MeetingFeatureStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const AudioFeatures = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ EchoReduction: S.optional(MeetingFeatureStatus) })).annotate({ identifier: "AudioFeatures" });
export const MeetingFeaturesConfiguration = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Audio: S.optional(AudioFeatures) })).annotate({
    identifier: "MeetingFeaturesConfiguration",
});
export const WebRTCMeeting = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MediaPlacement: S.optional(WebRTCMediaPlacement),
    MeetingFeatures: S.optional(MeetingFeaturesConfiguration),
    MeetingId: S.optional(S.String),
})).annotate({ identifier: "WebRTCMeeting" });
export const WebRTCConnection = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Attendee: S.optional(Attendee),
    Meeting: S.optional(WebRTCMeeting),
})).annotate({
    identifier: "WebRTCConnection",
});
export const CreateParticipantConnectionResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Websocket: S.optional(Websocket),
    ConnectionCredentials: S.optional(ConnectionCredentials),
    WebRTCConnection: S.optional(WebRTCConnection),
})).annotate({
    identifier: "CreateParticipantConnectionResponse",
});
export const DescribeViewRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ViewToken: S.String.pipe(T.HttpLabel("ViewToken")),
    ConnectionToken: S.String.pipe(T.HttpHeader("X-Amz-Bearer")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/participant/views/{ViewToken}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribeViewRequest",
});
export const ViewActions = /*@__PURE__*/ /*#__PURE__*/ S.Array(SensitiveString);
export const ViewContent = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    InputSchema: S.optional(SensitiveString),
    Template: S.optional(SensitiveString),
    Actions: S.optional(ViewActions),
})).annotate({ identifier: "ViewContent" });
export const View = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Id: S.optional(S.String),
    Arn: S.optional(S.String),
    Name: S.optional(SensitiveString),
    Version: S.optional(S.Number),
    Content: S.optional(ViewContent),
})).annotate({ identifier: "View" });
export const DescribeViewResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ View: S.optional(View) })).annotate({
    identifier: "DescribeViewResponse",
});
export const ResourceType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const DisconnectParticipantRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
    ConnectionToken: S.String.pipe(T.HttpHeader("X-Amz-Bearer")),
}).pipe(T.all(T.Http({ method: "POST", uri: "/participant/disconnect" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DisconnectParticipantRequest",
});
export const DisconnectParticipantResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DisconnectParticipantResponse",
});
export const GetAttachmentRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AttachmentId: S.String,
    ConnectionToken: S.String.pipe(T.HttpHeader("X-Amz-Bearer")),
    UrlExpiryInSeconds: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/participant/attachment" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetAttachmentRequest",
});
export const GetAttachmentResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Url: S.optional(S.String),
    UrlExpiry: S.optional(S.String),
    AttachmentSizeInBytes: S.Number,
})).annotate({
    identifier: "GetAttachmentResponse",
});
export const GetAuthenticationUrlRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    SessionId: S.String,
    RedirectUri: S.String,
    ConnectionToken: S.String.pipe(T.HttpHeader("X-Amz-Bearer")),
}).pipe(T.all(T.Http({ method: "POST", uri: "/participant/authentication-url" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetAuthenticationUrlRequest",
});
export const GetAuthenticationUrlResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ AuthenticationUrl: S.optional(S.String) })).annotate({
    identifier: "GetAuthenticationUrlResponse",
});
export const ScanDirection = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const SortKey = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const StartPosition = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Id: S.optional(S.String),
    AbsoluteTime: S.optional(S.String),
    MostRecent: S.optional(S.Number),
})).annotate({ identifier: "StartPosition" });
export const GetTranscriptRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ContactId: S.optional(S.String),
    MaxResults: S.optional(S.Number),
    NextToken: S.optional(S.String),
    ScanDirection: S.optional(ScanDirection),
    SortOrder: S.optional(SortKey),
    StartPosition: S.optional(StartPosition),
    ConnectionToken: S.String.pipe(T.HttpHeader("X-Amz-Bearer")),
}).pipe(T.all(T.Http({ method: "POST", uri: "/participant/transcript" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTranscriptRequest",
});
export const ChatItemType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ParticipantRole = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ArtifactStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const AttachmentItem = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ContentType: S.optional(S.String),
    AttachmentId: S.optional(S.String),
    AttachmentName: S.optional(S.String),
    Status: S.optional(ArtifactStatus),
})).annotate({ identifier: "AttachmentItem" });
export const Attachments = /*@__PURE__*/ /*#__PURE__*/ S.Array(AttachmentItem);
export const Receipt = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DeliveredTimestamp: S.optional(S.String),
    ReadTimestamp: S.optional(S.String),
    RecipientParticipantId: S.optional(S.String),
})).annotate({ identifier: "Receipt" });
export const Receipts = /*@__PURE__*/ /*#__PURE__*/ S.Array(Receipt);
export const MessageProcessingStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const MessageMetadata = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MessageId: S.optional(S.String),
    Receipts: S.optional(Receipts),
    MessageProcessingStatus: S.optional(MessageProcessingStatus),
})).annotate({
    identifier: "MessageMetadata",
});
export const Item = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AbsoluteTime: S.optional(S.String),
    Content: S.optional(S.String),
    ContentType: S.optional(S.String),
    Id: S.optional(S.String),
    Type: S.optional(ChatItemType),
    ParticipantId: S.optional(S.String),
    DisplayName: S.optional(S.String),
    ParticipantRole: S.optional(ParticipantRole),
    Attachments: S.optional(Attachments),
    MessageMetadata: S.optional(MessageMetadata),
    RelatedContactId: S.optional(S.String),
    ContactId: S.optional(S.String),
})).annotate({ identifier: "Item" });
export const Transcript = /*@__PURE__*/ /*#__PURE__*/ S.Array(Item);
export const GetTranscriptResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    InitialContactId: S.optional(S.String),
    Transcript: S.optional(Transcript),
    NextToken: S.optional(S.String),
})).annotate({
    identifier: "GetTranscriptResponse",
});
export const SendEventRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ContentType: S.String,
    Content: S.optional(S.String),
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
    ConnectionToken: S.String.pipe(T.HttpHeader("X-Amz-Bearer")),
}).pipe(T.all(T.Http({ method: "POST", uri: "/participant/event" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "SendEventRequest",
});
export const SendEventResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Id: S.optional(S.String), AbsoluteTime: S.optional(S.String) })).annotate({
    identifier: "SendEventResponse",
});
export const SendMessageRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ContentType: S.String,
    Content: S.String,
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
    ConnectionToken: S.String.pipe(T.HttpHeader("X-Amz-Bearer")),
}).pipe(T.all(T.Http({ method: "POST", uri: "/participant/message" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "SendMessageRequest",
});
export const MessageProcessingMetadata = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ MessageProcessingStatus: S.optional(MessageProcessingStatus) })).annotate({
    identifier: "MessageProcessingMetadata",
});
export const SendMessageResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Id: S.optional(S.String),
    AbsoluteTime: S.optional(S.String),
    MessageMetadata: S.optional(MessageProcessingMetadata),
})).annotate({
    identifier: "SendMessageResponse",
});
export const StartAttachmentUploadRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ContentType: S.String,
    AttachmentSizeInBytes: S.Number,
    AttachmentName: S.String,
    ClientToken: S.String.pipe(T.IdempotencyToken()),
    ConnectionToken: S.String.pipe(T.HttpHeader("X-Amz-Bearer")),
}).pipe(T.all(T.Http({ method: "POST", uri: "/participant/start-attachment-upload" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "StartAttachmentUploadRequest",
});
export const UploadMetadataSignedHeaders = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.String.pipe(S.optional));
export const UploadMetadata = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Url: S.optional(S.String),
    UrlExpiry: S.optional(S.String),
    HeadersToInclude: S.optional(UploadMetadataSignedHeaders),
})).annotate({ identifier: "UploadMetadata" });
export const StartAttachmentUploadResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AttachmentId: S.optional(S.String),
    UploadMetadata: S.optional(UploadMetadata),
})).annotate({
    identifier: "StartAttachmentUploadResponse",
});
//# Errors
export class AccessDeniedException extends S.TaggedErrorClass()("AccessDeniedException", { Message: S.String }).pipe(C.withAuthError) {
}
export class InternalServerException extends S.TaggedErrorClass()("InternalServerException", { Message: S.String }).pipe(C.withServerError) {
}
export class ThrottlingException extends S.TaggedErrorClass()("ThrottlingException", { Message: S.String }).pipe(C.withThrottlingError) {
}
export class ValidationException extends S.TaggedErrorClass()("ValidationException", { Message: S.String }).pipe(C.withBadRequestError) {
}
export class ConflictException extends S.TaggedErrorClass()("ConflictException", { Message: S.String }).pipe(C.withConflictError) {
}
export class ServiceQuotaExceededException extends S.TaggedErrorClass()("ServiceQuotaExceededException", { Message: S.String }).pipe(C.withQuotaError) {
}
export class ResourceNotFoundException extends S.TaggedErrorClass()("ResourceNotFoundException", {
    Message: S.optional(S.String),
    ResourceId: S.optional(S.String),
    ResourceType: S.optional(ResourceType),
}).pipe(C.withBadRequestError) {
}
/**
 * Cancels the authentication session. The opted out branch of the Authenticate Customer
 * flow block will be taken.
 *
 * The current supported channel is chat. This API is not supported for Apple
 * Messages for Business, WhatsApp, or SMS chats.
 *
 * `ConnectionToken` is used for invoking this API instead of
 * `ParticipantToken`.
 *
 * The Amazon Connect Participant Service APIs do not use Signature Version 4
 * authentication.
 */
export const cancelParticipantAuthentication = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CancelParticipantAuthenticationRequest,
    output: CancelParticipantAuthenticationResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Allows you to confirm that the attachment has been uploaded using the pre-signed URL
 * provided in StartAttachmentUpload API. A conflict exception is thrown when an attachment
 * with that identifier is already being uploaded.
 *
 * For security recommendations, see Amazon Connect Chat security best practices.
 *
 * `ConnectionToken` is used for invoking this API instead of
 * `ParticipantToken`.
 *
 * The Amazon Connect Participant Service APIs do not use Signature Version 4
 * authentication.
 */
export const completeAttachmentUpload = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CompleteAttachmentUploadRequest,
    output: CompleteAttachmentUploadResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ServiceQuotaExceededException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Creates the participant's connection.
 *
 * For security recommendations, see Amazon Connect Chat security best practices.
 *
 * For WebRTC security recommendations, see Amazon Connect WebRTC security best practices.
 *
 * `ParticipantToken` is used for invoking this API instead of
 * `ConnectionToken`.
 *
 * The participant token is valid for the lifetime of the participant – until they are
 * part of a contact. For WebRTC participants, if they leave or are disconnected for 60
 * seconds, a new participant needs to be created using the CreateParticipant API.
 *
 * **For `WEBSOCKET` Type**:
 *
 * The response URL for has a connect expiry timeout of 100s. Clients must manually
 * connect to the returned websocket URL and subscribe to the desired topic.
 *
 * For chat, you need to publish the following on the established websocket
 * connection:
 *
 * `{"topic":"aws/subscribe","content":{"topics":["aws/chat"]}}`
 *
 * Upon websocket URL expiry, as specified in the response ConnectionExpiry parameter,
 * clients need to call this API again to obtain a new websocket URL and perform the same
 * steps as before.
 *
 * The expiry time for the connection token is different than the
 * `ChatDurationInMinutes`. Expiry time for the connection token is 1
 * day.
 *
 * **For `WEBRTC_CONNECTION` Type**:
 *
 * The response includes connection data required for the client application to join the
 * call using the Amazon Chime SDK client libraries. The WebRTCConnection response contains
 * Meeting and Attendee information needed to establish the media connection.
 *
 * The attendee join token in WebRTCConnection response is valid for the lifetime of the
 * participant in the call. If a participant leaves or is disconnected for 60 seconds,
 * their participant credentials will no longer be valid, and a new participant will need
 * to be created to rejoin the call.
 *
 * **Message streaming support**: This API can also be used
 * together with the StartContactStreaming API to create a participant connection for chat
 * contacts that are not using a websocket. For more information about message streaming,
 * Enable real-time chat
 * message streaming in the Amazon Connect Administrator
 * Guide.
 *
 * **Multi-user web, in-app, video calling support**:
 *
 * For WebRTC calls, this API is used in conjunction with the CreateParticipant API to
 * enable multi-party calling. The StartWebRTCContact API creates the initial contact and
 * routes it to an agent, while CreateParticipant adds additional participants to the
 * ongoing call. For more information about multi-party WebRTC calls, see Enable multi-user web, in-app, and video calling in the Amazon Connect
 * Administrator Guide.
 *
 * **Feature specifications**: For information about feature
 * specifications, such as the allowed number of open websocket connections per participant
 * or maximum number of WebRTC participants, see Feature specifications in the Amazon Connect Administrator
 * Guide.
 *
 * The Amazon Connect Participant Service APIs do not use Signature Version 4
 * authentication.
 */
export const createParticipantConnection = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateParticipantConnectionRequest,
    output: CreateParticipantConnectionResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Retrieves the view for the specified view token.
 *
 * For security recommendations, see Amazon Connect Chat security best practices.
 */
export const describeView = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DescribeViewRequest,
    output: DescribeViewResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Disconnects a participant.
 *
 * For security recommendations, see Amazon Connect Chat security best practices.
 *
 * `ConnectionToken` is used for invoking this API instead of
 * `ParticipantToken`.
 *
 * The Amazon Connect Participant Service APIs do not use Signature Version 4
 * authentication.
 */
export const disconnectParticipant = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DisconnectParticipantRequest,
    output: DisconnectParticipantResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Provides a pre-signed URL for download of a completed attachment. This is an
 * asynchronous API for use with active contacts.
 *
 * For security recommendations, see Amazon Connect Chat security best practices.
 *
 * - The participant role `CUSTOM_BOT` is not permitted to access
 * attachments customers may upload. An `AccessDeniedException` can
 * indicate that the participant may be a CUSTOM_BOT, and it doesn't have
 * access to attachments.
 *
 * - `ConnectionToken` is used for invoking this API instead of
 * `ParticipantToken`.
 *
 * The Amazon Connect Participant Service APIs do not use Signature Version 4
 * authentication.
 */
export const getAttachment = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetAttachmentRequest,
    output: GetAttachmentResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Retrieves the AuthenticationUrl for the current authentication session for the
 * AuthenticateCustomer flow block.
 *
 * For security recommendations, see Amazon Connect Chat security best practices.
 *
 * - This API can only be called within one minute of receiving the
 * authenticationInitiated event.
 *
 * - The current supported channel is chat. This API is not supported for Apple
 * Messages for Business, WhatsApp, or SMS chats.
 *
 * `ConnectionToken` is used for invoking this API instead of
 * `ParticipantToken`.
 *
 * The Amazon Connect Participant Service APIs do not use Signature Version 4
 * authentication.
 */
export const getAuthenticationUrl = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetAuthenticationUrlRequest,
    output: GetAuthenticationUrlResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Retrieves a transcript of the session, including details about any attachments. For
 * information about accessing past chat contact transcripts for a persistent chat, see
 * Enable persistent chat.
 *
 * For security recommendations, see Amazon Connect Chat security best practices.
 *
 * If you have a process that consumes events in the transcript of an chat that has
 * ended, note that chat transcripts contain the following event content types if the event
 * has occurred during the chat session:
 *
 * - `application/vnd.amazonaws.connect.event.participant.invited`
 *
 * - `application/vnd.amazonaws.connect.event.participant.joined`
 *
 * - `application/vnd.amazonaws.connect.event.participant.left`
 *
 * - `application/vnd.amazonaws.connect.event.chat.ended`
 *
 * - `application/vnd.amazonaws.connect.event.transfer.succeeded`
 *
 * - `application/vnd.amazonaws.connect.event.transfer.failed`
 *
 * `ConnectionToken` is used for invoking this API instead of
 * `ParticipantToken`.
 *
 * The Amazon Connect Participant Service APIs do not use Signature Version 4
 * authentication.
 */
export const getTranscript = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: GetTranscriptRequest,
    output: GetTranscriptResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        pageSize: "MaxResults",
    },
}));
/**
 * The `application/vnd.amazonaws.connect.event.connection.acknowledged`
 * ContentType is no longer maintained since December 31, 2024. This event has been
 * migrated to the CreateParticipantConnection API using the
 * `ConnectParticipant` field.
 *
 * Sends an event. Message receipts are not supported when there are more than two active
 * participants in the chat. Using the SendEvent API for message receipts when a supervisor
 * is barged-in will result in a conflict exception.
 *
 * For security recommendations, see Amazon Connect Chat security best practices.
 *
 * `ConnectionToken` is used for invoking this API instead of
 * `ParticipantToken`.
 *
 * The Amazon Connect Participant Service APIs do not use Signature Version 4
 * authentication.
 */
export const sendEvent = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: SendEventRequest,
    output: SendEventResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Sends a message.
 *
 * For security recommendations, see Amazon Connect Chat security best practices.
 *
 * `ConnectionToken` is used for invoking this API instead of
 * `ParticipantToken`.
 *
 * The Amazon Connect Participant Service APIs do not use Signature Version 4
 * authentication.
 */
export const sendMessage = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: SendMessageRequest,
    output: SendMessageResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Provides a pre-signed Amazon S3 URL in response for uploading the file directly to
 * S3.
 *
 * For security recommendations, see Amazon Connect Chat security best practices.
 *
 * `ConnectionToken` is used for invoking this API instead of
 * `ParticipantToken`.
 *
 * The Amazon Connect Participant Service APIs do not use Signature Version 4
 * authentication.
 */
export const startAttachmentUpload = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: StartAttachmentUploadRequest,
    output: StartAttachmentUploadResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ServiceQuotaExceededException,
        ThrottlingException,
        ValidationException,
    ],
}));
//# sourceMappingURL=connectparticipant.js.map