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: "ConnectHealth",
    serviceShapeName: "ConnectHealth",
});
const auth = T.AwsAuthSigv4({ name: "health-agent" });
const ver = T.ServiceVersion("2025-01-29");
const proto = T.AwsProtocolsRestJson1();
const rules = T.EndpointResolver((p, _) => {
    const { UseFIPS = false, Endpoint, Region } = 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");
        }
        return e(Endpoint);
    }
    if (Region != null) {
        {
            const PartitionResult = _.partition(Region);
            if (PartitionResult != null && PartitionResult !== false) {
                if (UseFIPS === true) {
                    return e(`https://health-agent-fips.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                }
                return e(`https://health-agent.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
            }
        }
    }
    return err("Invalid Configuration: Missing Region");
});
export const ActivateSubscriptionInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    domainId: S.String.pipe(T.HttpLabel("domainId")),
    subscriptionId: S.String.pipe(T.HttpLabel("subscriptionId")),
}).pipe(T.all(T.Http({
    method: "POST",
    uri: "/domains/{domainId}/subscriptions/{subscriptionId}/activate",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "ActivateSubscriptionInput",
});
export const SubscriptionStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const SubscriptionDescription = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    domainId: S.String,
    subscriptionId: S.String,
    arn: S.String,
    status: SubscriptionStatus,
    createdAt: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    lastUpdatedAt: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    activatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    deactivatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "SubscriptionDescription",
});
export const ActivateSubscriptionOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ subscription: S.optional(SubscriptionDescription) })).annotate({
    identifier: "ActivateSubscriptionOutput",
});
export const CreateWebAppConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ehrRole: S.String,
    idcInstanceId: S.String,
    idcRegion: S.String,
})).annotate({
    identifier: "CreateWebAppConfiguration",
});
export const TagMap = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.String.pipe(S.optional));
export const CreateDomainInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    name: S.String,
    kmsKeyArn: S.optional(S.String),
    webAppSetupConfiguration: S.optional(CreateWebAppConfiguration),
    tags: S.optional(TagMap),
}).pipe(T.all(T.Http({ method: "POST", uri: "/domain" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateDomainInput",
});
export const EncryptionType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const EncryptionContext = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ encryptionType: EncryptionType, kmsKeyArn: S.optional(S.String) })).annotate({
    identifier: "EncryptionContext",
});
export const DomainStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const WebAppConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ehrRole: S.String,
    idcApplicationId: S.String,
    idcRegion: S.String,
})).annotate({
    identifier: "WebAppConfiguration",
});
export const CreateDomainOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    domainId: S.String,
    arn: S.String,
    name: S.String,
    kmsKeyArn: S.optional(S.String),
    encryptionContext: S.optional(EncryptionContext),
    status: DomainStatus,
    webAppUrl: S.optional(S.String),
    webAppConfiguration: S.optional(WebAppConfiguration),
    createdAt: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
})).annotate({
    identifier: "CreateDomainOutput",
});
export const CreateSubscriptionInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ domainId: S.String.pipe(T.HttpLabel("domainId")) }).pipe(T.all(T.Http({ method: "POST", uri: "/domains/{domainId}/subscriptions" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateSubscriptionInput",
});
export const CreateSubscriptionOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    domainId: S.String,
    subscriptionId: S.String,
    arn: S.String,
    status: SubscriptionStatus,
    createdAt: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    lastUpdatedAt: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    activatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    deactivatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "CreateSubscriptionOutput",
});
export const DeactivateSubscriptionInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    domainId: S.String.pipe(T.HttpLabel("domainId")),
    subscriptionId: S.String.pipe(T.HttpLabel("subscriptionId")),
}).pipe(T.all(T.Http({
    method: "POST",
    uri: "/domains/{domainId}/subscriptions/{subscriptionId}/deactivate",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeactivateSubscriptionInput",
});
export const DeactivateSubscriptionOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ subscription: S.optional(SubscriptionDescription) })).annotate({
    identifier: "DeactivateSubscriptionOutput",
});
export const DeleteDomainInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ domainId: S.String.pipe(T.HttpLabel("domainId")) }).pipe(T.all(T.Http({ method: "DELETE", uri: "/domain/{domainId}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteDomainInput",
});
export const DeleteDomainOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ domainId: S.String, arn: S.String, status: DomainStatus })).annotate({
    identifier: "DeleteDomainOutput",
});
export const GetDomainInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ domainId: S.String.pipe(T.HttpLabel("domainId")) }).pipe(T.all(T.Http({ method: "GET", uri: "/domain/{domainId}" }), svc, auth, proto, ver, rules))).annotate({ identifier: "GetDomainInput" });
export const GetDomainOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    domainId: S.String,
    arn: S.String,
    name: S.String,
    kmsKeyArn: S.optional(S.String),
    encryptionContext: S.optional(EncryptionContext),
    status: DomainStatus,
    webAppUrl: S.optional(S.String),
    webAppConfiguration: S.optional(WebAppConfiguration),
    createdAt: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    tags: S.optional(TagMap),
})).annotate({
    identifier: "GetDomainOutput",
});
export const GetMedicalScribeListeningSessionInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    sessionId: S.String.pipe(T.HttpLabel("sessionId")),
    domainId: S.String.pipe(T.HttpLabel("domainId")),
    subscriptionId: S.String.pipe(T.HttpLabel("subscriptionId")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/medical-scribe-stream/domain/{domainId}/subscription/{subscriptionId}/session/{sessionId}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetMedicalScribeListeningSessionInput",
});
export const MedicalScribeLanguageCode = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const MedicalScribeMediaEncoding = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const MedicalScribeParticipantRole = 
/*@__PURE__*/ /*#__PURE__*/ S.String;
export const MedicalScribeChannelDefinition = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    channelId: S.Number,
    participantRole: MedicalScribeParticipantRole,
})).annotate({
    identifier: "MedicalScribeChannelDefinition",
});
export const MedicalScribeChannelDefinitions = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(MedicalScribeChannelDefinition);
export const ManagedNoteTemplate = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ManagedTemplateResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ templateType: S.optional(ManagedNoteTemplate) })).annotate({
    identifier: "ManagedTemplateResponse",
});
export const CustomTemplateBase = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const CustomTemplateResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ templateType: S.optional(CustomTemplateBase) })).annotate({
    identifier: "CustomTemplateResponse",
});
export const NoteTemplateSettingsResponse = /*@__PURE__*/ /*#__PURE__*/ S.Union([
    S.Struct({ managedTemplate: ManagedTemplateResponse }),
    S.Struct({ customTemplate: CustomTemplateResponse }),
]);
export const ClinicalNoteGenerationSettingsResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    noteTemplateSettings: S.optional(NoteTemplateSettingsResponse),
})).annotate({
    identifier: "ClinicalNoteGenerationSettingsResponse",
});
export const MedicalScribePostStreamActionSettingsResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    outputS3Uri: S.String,
    clinicalNoteGenerationSettings: ClinicalNoteGenerationSettingsResponse,
})).annotate({
    identifier: "MedicalScribePostStreamActionSettingsResponse",
});
export const PostStreamArtifactGenerationStatus = 
/*@__PURE__*/ /*#__PURE__*/ S.String;
export const ArtifactDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    outputLocation: S.optional(S.String),
    status: S.optional(PostStreamArtifactGenerationStatus),
    failureReason: S.optional(S.String),
})).annotate({
    identifier: "ArtifactDetails",
});
export const ClinicalNoteGenerationResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    noteResult: S.optional(ArtifactDetails),
    transcriptResult: S.optional(ArtifactDetails),
    afterVisitSummaryResult: S.optional(ArtifactDetails),
})).annotate({
    identifier: "ClinicalNoteGenerationResult",
});
export const MedicalScribePostStreamActionsResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    clinicalNoteGenerationResult: S.optional(ClinicalNoteGenerationResult),
})).annotate({
    identifier: "MedicalScribePostStreamActionsResult",
});
export const MedicalScribeStreamStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const MedicalScribeListeningSessionDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    sessionId: S.optional(S.String),
    domainId: S.optional(S.String),
    subscriptionId: S.optional(S.String),
    languageCode: S.optional(MedicalScribeLanguageCode),
    mediaSampleRateHertz: S.optional(S.Number),
    mediaEncoding: S.optional(MedicalScribeMediaEncoding),
    channelDefinitions: S.optional(MedicalScribeChannelDefinitions),
    postStreamActionSettings: S.optional(MedicalScribePostStreamActionSettingsResponse),
    postStreamActionResult: S.optional(MedicalScribePostStreamActionsResult),
    encounterContextProvided: S.optional(S.Boolean),
    streamStatus: S.optional(MedicalScribeStreamStatus),
    streamCreationTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    streamEndTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "MedicalScribeListeningSessionDetails",
});
export const GetMedicalScribeListeningSessionOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    medicalScribeListeningSessionDetails: S.optional(MedicalScribeListeningSessionDetails),
})).annotate({
    identifier: "GetMedicalScribeListeningSessionOutput",
});
export const GetPatientInsightsJobRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    domainId: S.String.pipe(T.HttpLabel("domainId")),
    jobId: S.String.pipe(T.HttpLabel("jobId")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/domain/{domainId}/patient-insights-job/{jobId}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetPatientInsightsJobRequest",
});
export const JobStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const InsightsOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ uri: S.String })).annotate({ identifier: "InsightsOutput" });
export const Pronouns = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const PatientInsightsPatientContext = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    patientId: SensitiveString,
    dateOfBirth: S.optional(SensitiveString),
    pronouns: S.optional(Pronouns),
})).annotate({
    identifier: "PatientInsightsPatientContext",
});
export const InsightsType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const InsightsContext = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ insightsType: InsightsType })).annotate({
    identifier: "InsightsContext",
});
export const PatientInsightsEncounterContext = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ encounterReason: SensitiveString })).annotate({
    identifier: "PatientInsightsEncounterContext",
});
export const ProviderRole = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const Specialty = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const UserContext = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    role: ProviderRole,
    userId: SensitiveString,
    specialty: S.optional(Specialty),
})).annotate({ identifier: "UserContext" });
export const FHIRServer = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ fhirEndpoint: S.String, oauthToken: S.optional(SensitiveString) })).annotate({ identifier: "FHIRServer" });
export const S3Source = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ uri: S.String })).annotate({ identifier: "S3Source" });
export const S3Sources = /*@__PURE__*/ /*#__PURE__*/ S.Array(S3Source);
export const InputDataConfig = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    fhirServer: S.optional(FHIRServer),
    s3Sources: S.optional(S3Sources),
})).annotate({
    identifier: "InputDataConfig",
});
export const OutputDataConfig = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ s3OutputPath: S.String })).annotate({
    identifier: "OutputDataConfig",
});
export const GetPatientInsightsJobResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    jobId: S.String,
    jobArn: S.String,
    jobStatus: JobStatus,
    creationTime: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    updatedTime: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    insightsOutput: S.optional(InsightsOutput),
    statusDetails: S.optional(S.String),
    patientContext: PatientInsightsPatientContext,
    insightsContext: InsightsContext,
    encounterContext: PatientInsightsEncounterContext,
    userContext: UserContext,
    inputDataConfig: InputDataConfig,
    outputDataConfig: OutputDataConfig,
})).annotate({
    identifier: "GetPatientInsightsJobResponse",
});
export const GetSubscriptionInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    domainId: S.String.pipe(T.HttpLabel("domainId")),
    subscriptionId: S.String.pipe(T.HttpLabel("subscriptionId")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/domains/{domainId}/subscriptions/{subscriptionId}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetSubscriptionInput",
});
export const GetSubscriptionOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ subscription: S.optional(SubscriptionDescription) })).annotate({
    identifier: "GetSubscriptionOutput",
});
export const ListDomainsInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    status: S.optional(DomainStatus).pipe(T.HttpQuery("status")),
    maxResults: S.optional(S.Number).pipe(T.HttpQuery("maxResults")),
    nextToken: S.optional(S.String).pipe(T.HttpQuery("nextToken")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/domain" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListDomainsInput",
});
export const DomainSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    domainId: S.String,
    arn: S.String,
    name: S.String,
    status: DomainStatus,
    createdAt: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
})).annotate({ identifier: "DomainSummary" });
export const DomainSummaryList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(DomainSummary);
export const ListDomainsOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ domains: DomainSummaryList, nextToken: S.optional(S.String) })).annotate({
    identifier: "ListDomainsOutput",
});
export const ListSubscriptionsInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    domainId: S.String.pipe(T.HttpLabel("domainId")),
    maxResults: S.optional(S.Number).pipe(T.HttpQuery("maxResults")),
    nextToken: S.optional(S.String).pipe(T.HttpQuery("nextToken")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/domains/{domainId}/subscriptions" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListSubscriptionsInput",
});
export const SubscriptionList = /*@__PURE__*/ /*#__PURE__*/ S.Array(SubscriptionDescription);
export const ListSubscriptionsOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    subscriptions: SubscriptionList,
    nextToken: S.optional(S.String),
})).annotate({
    identifier: "ListSubscriptionsOutput",
});
export const ListTagsForResourceInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ resourceArn: S.String.pipe(T.HttpLabel("resourceArn")) }).pipe(T.all(T.Http({ method: "GET", uri: "/tags/{resourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListTagsForResourceInput",
});
export const ListTagsForResourceOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ tags: S.optional(TagMap) })).annotate({
    identifier: "ListTagsForResourceOutput",
});
export const MedicalScribeAudioEvent = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ audioChunk: T.Blob })).annotate({
    identifier: "MedicalScribeAudioEvent",
});
export const MedicalScribeSessionControlEventType = 
/*@__PURE__*/ /*#__PURE__*/ S.String;
export const MedicalScribeSessionControlEvent = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ type: S.optional(MedicalScribeSessionControlEventType) })).annotate({
    identifier: "MedicalScribeSessionControlEvent",
});
export const ManagedTemplate = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ templateType: ManagedNoteTemplate })).annotate({
    identifier: "ManagedTemplate",
});
export const TemplateSectionInstruction = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    sectionHeader: SensitiveString,
    sectionInstruction: SensitiveString,
})).annotate({
    identifier: "TemplateSectionInstruction",
});
export const TemplateInstructions = /*@__PURE__*/ /*#__PURE__*/ S.Array(TemplateSectionInstruction);
export const CustomTemplate = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    templateType: CustomTemplateBase,
    templateInstructions: TemplateInstructions,
})).annotate({ identifier: "CustomTemplate" });
export const NoteTemplateSettings = /*@__PURE__*/ /*#__PURE__*/ S.Union([
    S.Struct({ managedTemplate: ManagedTemplate }),
    S.Struct({ customTemplate: CustomTemplate }),
]);
export const ClinicalNoteGenerationSettings = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ noteTemplateSettings: NoteTemplateSettings })).annotate({
    identifier: "ClinicalNoteGenerationSettings",
});
export const MedicalScribePostStreamActionSettings = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    outputS3Uri: S.String,
    clinicalNoteGenerationSettings: ClinicalNoteGenerationSettings,
})).annotate({
    identifier: "MedicalScribePostStreamActionSettings",
});
export const EncounterContext = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ unstructuredContext: S.optional(SensitiveString) })).annotate({
    identifier: "EncounterContext",
});
export const MedicalScribeConfigurationEvent = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    postStreamActionSettings: MedicalScribePostStreamActionSettings,
    channelDefinitions: S.optional(MedicalScribeChannelDefinitions),
    encounterContext: S.optional(EncounterContext),
})).annotate({
    identifier: "MedicalScribeConfigurationEvent",
});
export const MedicalScribeInputStream = 
/*@__PURE__*/ /*#__PURE__*/ T.InputEventStream(S.Union([
    S.Struct({ audioEvent: MedicalScribeAudioEvent }),
    S.Struct({ sessionControlEvent: MedicalScribeSessionControlEvent }),
    S.Struct({ configurationEvent: MedicalScribeConfigurationEvent }),
]));
export const StartMedicalScribeListeningSessionInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    sessionId: S.String.pipe(T.HttpHeader("x-amzn-medscribe-session-id")),
    domainId: S.String.pipe(T.HttpHeader("x-amzn-medscribe-domain-id")),
    subscriptionId: S.String.pipe(T.HttpHeader("x-amzn-medscribe-subscription-id")),
    languageCode: MedicalScribeLanguageCode.pipe(T.HttpHeader("x-amzn-medscribe-language-code")),
    mediaSampleRateHertz: S.Number.pipe(T.HttpHeader("x-amzn-medscribe-sample-rate")),
    mediaEncoding: MedicalScribeMediaEncoding.pipe(T.HttpHeader("x-amzn-medscribe-media-encoding")),
    inputStream: S.optional(MedicalScribeInputStream).pipe(T.HttpPayload()),
}).pipe(T.all(T.Http({ method: "POST", uri: "/medical-scribe-stream/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "StartMedicalScribeListeningSessionInput",
});
export const MedicalScribeTranscriptSegment = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    segmentId: S.optional(S.String),
    audioBeginOffset: S.optional(S.Number),
    audioEndOffset: S.optional(S.Number),
    isPartial: S.optional(S.Boolean),
    channelId: S.optional(S.String),
    content: S.optional(S.String),
})).annotate({
    identifier: "MedicalScribeTranscriptSegment",
});
export const MedicalScribeTranscriptEvent = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ transcriptSegment: S.optional(MedicalScribeTranscriptSegment) })).annotate({
    identifier: "MedicalScribeTranscriptEvent",
});
export const MedicalScribeOutputStream = 
/*@__PURE__*/ /*#__PURE__*/ T.EventStream(S.Union([
    S.Struct({ transcriptEvent: MedicalScribeTranscriptEvent }),
    S.Struct({
        internalFailureException: S.suspend(() => InternalServerException).annotate({ identifier: "InternalServerException" }),
    }),
    S.Struct({
        validationException: S.suspend(() => ValidationException).annotate({
            identifier: "ValidationException",
        }),
    }),
]));
export const StartMedicalScribeListeningSessionOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    sessionId: S.optional(S.String).pipe(T.HttpHeader("x-amzn-medscribe-session-id")),
    domainId: S.optional(S.String).pipe(T.HttpHeader("x-amzn-medscribe-domain-id")),
    subscriptionId: S.optional(S.String).pipe(T.HttpHeader("x-amzn-medscribe-subscription-id")),
    requestId: S.optional(S.String).pipe(T.HttpHeader("x-amzn-request-id")),
    languageCode: S.optional(MedicalScribeLanguageCode).pipe(T.HttpHeader("x-amzn-medscribe-language-code")),
    mediaSampleRateHertz: S.optional(S.Number).pipe(T.HttpHeader("x-amzn-medscribe-sample-rate")),
    mediaEncoding: S.optional(MedicalScribeMediaEncoding).pipe(T.HttpHeader("x-amzn-medscribe-media-encoding")),
    responseStream: S.optional(MedicalScribeOutputStream).pipe(T.HttpPayload()),
})).annotate({
    identifier: "StartMedicalScribeListeningSessionOutput",
});
export const StartPatientInsightsJobRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    domainId: S.String.pipe(T.HttpLabel("domainId")),
    patientContext: PatientInsightsPatientContext,
    insightsContext: InsightsContext,
    encounterContext: PatientInsightsEncounterContext,
    userContext: UserContext,
    inputDataConfig: InputDataConfig,
    outputDataConfig: OutputDataConfig,
    clientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
}).pipe(T.all(T.Http({
    method: "POST",
    uri: "/domain/{domainId}/patient-insights-job",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "StartPatientInsightsJobRequest",
});
export const StartPatientInsightsJobResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    jobArn: S.String,
    jobId: S.String,
    creationTime: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
})).annotate({
    identifier: "StartPatientInsightsJobResponse",
});
export const TagResourceInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceArn: S.String.pipe(T.HttpLabel("resourceArn")),
    tags: TagMap,
}).pipe(T.all(T.Http({ method: "POST", uri: "/tags/{resourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "TagResourceInput",
});
export const TagResourceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "TagResourceResponse",
});
export const TagKeyList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const UntagResourceInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceArn: S.String.pipe(T.HttpLabel("resourceArn")),
    tagKeys: TagKeyList.pipe(T.HttpQuery("tagKeys")),
}).pipe(T.all(T.Http({ method: "DELETE", uri: "/tags/{resourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UntagResourceInput",
});
export const UntagResourceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UntagResourceResponse",
});
//# Errors
export class AccessDeniedException extends S.TaggedErrorClass()("AccessDeniedException", { message: S.optional(S.String) }).pipe(C.withAuthError) {
}
export class InternalServerException extends S.TaggedErrorClass()("InternalServerException", { message: S.optional(S.String) }, T.Retryable()).pipe(C.withServerError, C.withRetryableError) {
}
export class ResourceNotFoundException extends S.TaggedErrorClass()("ResourceNotFoundException", { message: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class ValidationException extends S.TaggedErrorClass()("ValidationException", { message: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class ServiceQuotaExceededException extends S.TaggedErrorClass()("ServiceQuotaExceededException", { message: S.optional(S.String) }).pipe(C.withQuotaError) {
}
export class ThrottlingException extends S.TaggedErrorClass()("ThrottlingException", { message: S.optional(S.String) }, T.Retryable({ throttling: true })).pipe(C.withThrottlingError, C.withRetryableError) {
}
export class ConflictException extends S.TaggedErrorClass()("ConflictException", { message: S.optional(S.String) }).pipe(C.withConflictError) {
}
/**
 * Activates a Subscription to enable billing for a user.
 */
export const activateSubscription = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ActivateSubscriptionInput,
    output: ActivateSubscriptionOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Creates a new Domain for managing HealthAgent resources.
 */
export const createDomain = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateDomainInput,
    output: CreateDomainOutput,
    errors: [ServiceQuotaExceededException],
}));
/**
 * Creates a new Subscription within a Domain for billing and user management.
 */
export const createSubscription = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateSubscriptionInput,
    output: CreateSubscriptionOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ServiceQuotaExceededException,
        ValidationException,
    ],
}));
/**
 * Deactivates a Subscription to stop billing for a user.
 */
export const deactivateSubscription = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeactivateSubscriptionInput,
    output: DeactivateSubscriptionOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Deletes a Domain and all associated resources.
 */
export const deleteDomain = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteDomainInput,
    output: DeleteDomainOutput,
    errors: [ResourceNotFoundException],
}));
/**
 * Retrieves information about a Domain.
 */
export const getDomain = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetDomainInput,
    output: GetDomainOutput,
    errors: [ResourceNotFoundException],
}));
/**
 * Retrieves details about an existing Medical Scribe listening session
 */
export const getMedicalScribeListeningSession = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetMedicalScribeListeningSessionInput,
    output: GetMedicalScribeListeningSessionOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ServiceQuotaExceededException,
        ThrottlingException,
    ],
}));
/**
 * Get details of a started patient insights job.
 */
export const getPatientInsightsJob = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetPatientInsightsJobRequest,
    output: GetPatientInsightsJobResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Retrieves information about a Subscription.
 */
export const getSubscription = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetSubscriptionInput,
    output: GetSubscriptionOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Lists Domains for a given account.
 */
export const listDomains = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListDomainsInput,
    output: ListDomainsOutput,
    errors: [],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "domains",
        pageSize: "maxResults",
    },
}));
/**
 * Lists all Subscriptions within a Domain.
 */
export const listSubscriptions = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListSubscriptionsInput,
    output: ListSubscriptionsOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ValidationException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "subscriptions",
        pageSize: "maxResults",
    },
}));
/**
 * Lists the tags associated with the specified resource
 */
export const listTagsForResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListTagsForResourceInput,
    output: ListTagsForResourceOutput,
    errors: [],
}));
/**
 * Starts a new Medical Scribe listening session for real-time audio transcription
 */
export const startMedicalScribeListeningSession = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: StartMedicalScribeListeningSessionInput,
    output: StartMedicalScribeListeningSessionOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ServiceQuotaExceededException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Starts a new patient insights job.
 */
export const startPatientInsightsJob = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: StartPatientInsightsJobRequest,
    output: StartPatientInsightsJobResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Associates the specified tags with the specified resource
 */
export const tagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: TagResourceInput,
    output: TagResourceResponse,
    errors: [],
}));
/**
 * Removes the specified tags from the specified resource
 */
export const untagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UntagResourceInput,
    output: UntagResourceResponse,
    errors: [],
}));
//# sourceMappingURL=connecthealth.js.map