@corti/sdk 0.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +231 -0
- package/dist/cjs/api/errors/BadRequestError.d.ts +8 -0
- package/dist/cjs/api/errors/BadRequestError.js +52 -0
- package/dist/cjs/api/errors/ForbiddenError.d.ts +9 -0
- package/dist/cjs/api/errors/ForbiddenError.js +52 -0
- package/dist/cjs/api/errors/GatewayTimeoutError.d.ts +9 -0
- package/dist/cjs/api/errors/GatewayTimeoutError.js +52 -0
- package/dist/cjs/api/errors/InternalServerError.d.ts +8 -0
- package/dist/cjs/api/errors/InternalServerError.js +52 -0
- package/dist/cjs/api/errors/NotFoundError.d.ts +9 -0
- package/dist/cjs/api/errors/NotFoundError.js +52 -0
- package/dist/cjs/api/errors/UnauthorizedError.d.ts +8 -0
- package/dist/cjs/api/errors/UnauthorizedError.js +52 -0
- package/dist/cjs/api/errors/index.d.ts +6 -0
- package/dist/cjs/api/errors/index.js +22 -0
- package/dist/cjs/api/index.d.ts +3 -0
- package/dist/cjs/api/index.js +19 -0
- package/dist/cjs/api/resources/auth/client/Client.d.ts +49 -0
- package/dist/cjs/api/resources/auth/client/Client.js +129 -0
- package/dist/cjs/api/resources/auth/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/auth/client/index.js +17 -0
- package/dist/cjs/api/resources/auth/client/requests/AuthGetTokenRequest.d.ts +14 -0
- package/dist/cjs/api/resources/auth/client/requests/AuthGetTokenRequest.js +5 -0
- package/dist/cjs/api/resources/auth/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/auth/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/auth/index.d.ts +2 -0
- package/dist/cjs/api/resources/auth/index.js +18 -0
- package/dist/cjs/api/resources/auth/types/GetTokenResponse.d.ts +10 -0
- package/dist/cjs/api/resources/auth/types/GetTokenResponse.js +5 -0
- package/dist/cjs/api/resources/auth/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/auth/types/index.js +17 -0
- package/dist/cjs/api/resources/documents/client/Client.d.ts +127 -0
- package/dist/cjs/api/resources/documents/client/Client.js +440 -0
- package/dist/cjs/api/resources/documents/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/documents/client/index.js +17 -0
- package/dist/cjs/api/resources/documents/client/requests/DocumentsGetRequest.d.ts +13 -0
- package/dist/cjs/api/resources/documents/client/requests/DocumentsGetRequest.js +5 -0
- package/dist/cjs/api/resources/documents/client/requests/RequestDocumentCreate.d.ts +31 -0
- package/dist/cjs/api/resources/documents/client/requests/RequestDocumentCreate.js +5 -0
- package/dist/cjs/api/resources/documents/client/requests/RequestDocumentUpdate.d.ts +13 -0
- package/dist/cjs/api/resources/documents/client/requests/RequestDocumentUpdate.js +5 -0
- package/dist/cjs/api/resources/documents/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/documents/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/documents/index.d.ts +2 -0
- package/dist/cjs/api/resources/documents/index.js +18 -0
- package/dist/cjs/api/resources/documents/types/RequestDocumentCreateContextItem.d.ts +10 -0
- package/dist/cjs/api/resources/documents/types/RequestDocumentCreateContextItem.js +5 -0
- package/dist/cjs/api/resources/documents/types/RequestDocumentUpdateSectionsItem.d.ts +9 -0
- package/dist/cjs/api/resources/documents/types/RequestDocumentUpdateSectionsItem.js +5 -0
- package/dist/cjs/api/resources/documents/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/documents/types/index.js +18 -0
- package/dist/cjs/api/resources/facts/client/Client.d.ts +113 -0
- package/dist/cjs/api/resources/facts/client/Client.js +393 -0
- package/dist/cjs/api/resources/facts/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/facts/client/index.js +17 -0
- package/dist/cjs/api/resources/facts/client/requests/RequestFactUpdate.d.ts +21 -0
- package/dist/cjs/api/resources/facts/client/requests/RequestFactUpdate.js +5 -0
- package/dist/cjs/api/resources/facts/client/requests/RequestFactsCreate.d.ts +17 -0
- package/dist/cjs/api/resources/facts/client/requests/RequestFactsCreate.js +5 -0
- package/dist/cjs/api/resources/facts/client/requests/RequestFactsUpdate.d.ts +16 -0
- package/dist/cjs/api/resources/facts/client/requests/RequestFactsUpdate.js +5 -0
- package/dist/cjs/api/resources/facts/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/facts/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/facts/index.d.ts +2 -0
- package/dist/cjs/api/resources/facts/index.js +18 -0
- package/dist/cjs/api/resources/facts/types/RequestFactsCreateFactsItem.d.ts +12 -0
- package/dist/cjs/api/resources/facts/types/RequestFactsCreateFactsItem.js +5 -0
- package/dist/cjs/api/resources/facts/types/RequestFactsUpdateFactsItem.d.ts +14 -0
- package/dist/cjs/api/resources/facts/types/RequestFactsUpdateFactsItem.js +5 -0
- package/dist/cjs/api/resources/facts/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/facts/types/index.js +18 -0
- package/dist/cjs/api/resources/index.d.ts +20 -0
- package/dist/cjs/api/resources/index.js +59 -0
- package/dist/cjs/api/resources/interactions/client/Client.d.ts +113 -0
- package/dist/cjs/api/resources/interactions/client/Client.js +442 -0
- package/dist/cjs/api/resources/interactions/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/interactions/client/index.js +17 -0
- package/dist/cjs/api/resources/interactions/client/requests/InteractionsListRequest.d.ts +34 -0
- package/dist/cjs/api/resources/interactions/client/requests/InteractionsListRequest.js +5 -0
- package/dist/cjs/api/resources/interactions/client/requests/RequestInteractionCreate.d.ts +22 -0
- package/dist/cjs/api/resources/interactions/client/requests/RequestInteractionCreate.js +5 -0
- package/dist/cjs/api/resources/interactions/client/requests/RequestInteractionUpdate.d.ts +16 -0
- package/dist/cjs/api/resources/interactions/client/requests/RequestInteractionUpdate.js +5 -0
- package/dist/cjs/api/resources/interactions/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/interactions/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/interactions/index.d.ts +2 -0
- package/dist/cjs/api/resources/interactions/index.js +18 -0
- package/dist/cjs/api/resources/interactions/types/InteractionsListRequestDirection.d.ts +11 -0
- package/dist/cjs/api/resources/interactions/types/InteractionsListRequestDirection.js +10 -0
- package/dist/cjs/api/resources/interactions/types/InteractionsListRequestSort.d.ts +12 -0
- package/dist/cjs/api/resources/interactions/types/InteractionsListRequestSort.js +11 -0
- package/dist/cjs/api/resources/interactions/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/interactions/types/index.js +18 -0
- package/dist/cjs/api/resources/recordings/client/Client.d.ts +94 -0
- package/dist/cjs/api/resources/recordings/client/Client.js +347 -0
- package/dist/cjs/api/resources/recordings/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/recordings/client/index.js +2 -0
- package/dist/cjs/api/resources/recordings/index.d.ts +1 -0
- package/dist/cjs/api/resources/recordings/index.js +17 -0
- package/dist/cjs/api/resources/stream/client/Client.d.ts +35 -0
- package/dist/cjs/api/resources/stream/client/Client.js +82 -0
- package/dist/cjs/api/resources/stream/client/Socket.d.ts +54 -0
- package/dist/cjs/api/resources/stream/client/Socket.js +160 -0
- package/dist/cjs/api/resources/stream/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/stream/client/index.js +17 -0
- package/dist/cjs/api/resources/stream/index.d.ts +1 -0
- package/dist/cjs/api/resources/stream/index.js +17 -0
- package/dist/cjs/api/resources/templates/client/Client.d.ts +77 -0
- package/dist/cjs/api/resources/templates/client/Client.js +281 -0
- package/dist/cjs/api/resources/templates/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/templates/client/index.js +17 -0
- package/dist/cjs/api/resources/templates/client/requests/TemplatesListRequest.d.ts +21 -0
- package/dist/cjs/api/resources/templates/client/requests/TemplatesListRequest.js +5 -0
- package/dist/cjs/api/resources/templates/client/requests/TemplatesSectionsListRequest.d.ts +17 -0
- package/dist/cjs/api/resources/templates/client/requests/TemplatesSectionsListRequest.js +5 -0
- package/dist/cjs/api/resources/templates/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/templates/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/templates/index.d.ts +1 -0
- package/dist/cjs/api/resources/templates/index.js +17 -0
- package/dist/cjs/api/resources/transcribe/client/Client.d.ts +34 -0
- package/dist/cjs/api/resources/transcribe/client/Client.js +82 -0
- package/dist/cjs/api/resources/transcribe/client/Socket.d.ts +54 -0
- package/dist/cjs/api/resources/transcribe/client/Socket.js +160 -0
- package/dist/cjs/api/resources/transcribe/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/transcribe/client/index.js +17 -0
- package/dist/cjs/api/resources/transcribe/index.d.ts +1 -0
- package/dist/cjs/api/resources/transcribe/index.js +17 -0
- package/dist/cjs/api/resources/transcripts/client/Client.d.ts +110 -0
- package/dist/cjs/api/resources/transcripts/client/Client.js +402 -0
- package/dist/cjs/api/resources/transcripts/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/transcripts/client/index.js +17 -0
- package/dist/cjs/api/resources/transcripts/client/requests/TranscriptCreate.d.ts +28 -0
- package/dist/cjs/api/resources/transcripts/client/requests/TranscriptCreate.js +5 -0
- package/dist/cjs/api/resources/transcripts/client/requests/TranscriptsListRequest.d.ts +30 -0
- package/dist/cjs/api/resources/transcripts/client/requests/TranscriptsListRequest.js +5 -0
- package/dist/cjs/api/resources/transcripts/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/transcripts/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/transcripts/index.d.ts +2 -0
- package/dist/cjs/api/resources/transcripts/index.js +18 -0
- package/dist/cjs/api/resources/transcripts/types/RequestTranscriptCreateModelName.d.ts +12 -0
- package/dist/cjs/api/resources/transcripts/types/RequestTranscriptCreateModelName.js +11 -0
- package/dist/cjs/api/resources/transcripts/types/RequestTranscriptCreateParticipantsItem.d.ts +10 -0
- package/dist/cjs/api/resources/transcripts/types/RequestTranscriptCreateParticipantsItem.js +5 -0
- package/dist/cjs/api/resources/transcripts/types/RequestTranscriptCreatePrimaryLanguage.d.ts +21 -0
- package/dist/cjs/api/resources/transcripts/types/RequestTranscriptCreatePrimaryLanguage.js +20 -0
- package/dist/cjs/api/resources/transcripts/types/TranscriptsListRequestDirection.d.ts +11 -0
- package/dist/cjs/api/resources/transcripts/types/TranscriptsListRequestDirection.js +10 -0
- package/dist/cjs/api/resources/transcripts/types/TranscriptsListRequestSort.d.ts +11 -0
- package/dist/cjs/api/resources/transcripts/types/TranscriptsListRequestSort.js +10 -0
- package/dist/cjs/api/resources/transcripts/types/index.d.ts +5 -0
- package/dist/cjs/api/resources/transcripts/types/index.js +21 -0
- package/dist/cjs/api/types/DocumentContextData.d.ts +14 -0
- package/dist/cjs/api/types/DocumentContextData.js +5 -0
- package/dist/cjs/api/types/DocumentTemplate.d.ts +14 -0
- package/dist/cjs/api/types/DocumentTemplate.js +5 -0
- package/dist/cjs/api/types/Encounter.d.ts +16 -0
- package/dist/cjs/api/types/Encounter.js +5 -0
- package/dist/cjs/api/types/EncounterPeriod.d.ts +9 -0
- package/dist/cjs/api/types/EncounterPeriod.js +5 -0
- package/dist/cjs/api/types/EncounterStatus.d.ts +12 -0
- package/dist/cjs/api/types/EncounterStatus.js +14 -0
- package/dist/cjs/api/types/EncounterType.d.ts +11 -0
- package/dist/cjs/api/types/EncounterType.js +13 -0
- package/dist/cjs/api/types/EncounterUpdate.d.ts +16 -0
- package/dist/cjs/api/types/EncounterUpdate.js +5 -0
- package/dist/cjs/api/types/ErrorResponse.d.ts +11 -0
- package/dist/cjs/api/types/ErrorResponse.js +5 -0
- package/dist/cjs/api/types/FactContext.d.ts +12 -0
- package/dist/cjs/api/types/FactContext.js +5 -0
- package/dist/cjs/api/types/GenderEnum.d.ts +10 -0
- package/dist/cjs/api/types/GenderEnum.js +12 -0
- package/dist/cjs/api/types/ParticipantRoleEnum.d.ts +9 -0
- package/dist/cjs/api/types/ParticipantRoleEnum.js +11 -0
- package/dist/cjs/api/types/Patient.d.ts +16 -0
- package/dist/cjs/api/types/Patient.js +5 -0
- package/dist/cjs/api/types/PatientUpdate.d.ts +16 -0
- package/dist/cjs/api/types/PatientUpdate.js +5 -0
- package/dist/cjs/api/types/ResponseAllTemplateSections.d.ts +8 -0
- package/dist/cjs/api/types/ResponseAllTemplateSections.js +5 -0
- package/dist/cjs/api/types/ResponseAllTemplates.d.ts +8 -0
- package/dist/cjs/api/types/ResponseAllTemplates.js +5 -0
- package/dist/cjs/api/types/ResponseAllTemplatesDataItem.d.ts +20 -0
- package/dist/cjs/api/types/ResponseAllTemplatesDataItem.js +5 -0
- package/dist/cjs/api/types/ResponseAllTemplatesDataItemTemplateSectionsItem.d.ts +10 -0
- package/dist/cjs/api/types/ResponseAllTemplatesDataItemTemplateSectionsItem.js +5 -0
- package/dist/cjs/api/types/ResponseAllTemplatesDataItemTranslationsItem.d.ts +11 -0
- package/dist/cjs/api/types/ResponseAllTemplatesDataItemTranslationsItem.js +5 -0
- package/dist/cjs/api/types/ResponseDocumentList.d.ts +7 -0
- package/dist/cjs/api/types/ResponseDocumentList.js +5 -0
- package/dist/cjs/api/types/ResponseDocumentRead.d.ts +22 -0
- package/dist/cjs/api/types/ResponseDocumentRead.js +5 -0
- package/dist/cjs/api/types/ResponseDocumentReadSectionsItem.d.ts +17 -0
- package/dist/cjs/api/types/ResponseDocumentReadSectionsItem.js +5 -0
- package/dist/cjs/api/types/ResponseFactGroupsFiltered.d.ts +7 -0
- package/dist/cjs/api/types/ResponseFactGroupsFiltered.js +5 -0
- package/dist/cjs/api/types/ResponseFactGroupsFilteredDataItem.d.ts +9 -0
- package/dist/cjs/api/types/ResponseFactGroupsFilteredDataItem.js +5 -0
- package/dist/cjs/api/types/ResponseFactGroupsFilteredDataItemTranslationsItem.d.ts +8 -0
- package/dist/cjs/api/types/ResponseFactGroupsFilteredDataItemTranslationsItem.js +5 -0
- package/dist/cjs/api/types/ResponseFactUpdate.d.ts +22 -0
- package/dist/cjs/api/types/ResponseFactUpdate.js +5 -0
- package/dist/cjs/api/types/ResponseFactsCreate.d.ts +8 -0
- package/dist/cjs/api/types/ResponseFactsCreate.js +5 -0
- package/dist/cjs/api/types/ResponseFactsCreateFactsItem.d.ts +20 -0
- package/dist/cjs/api/types/ResponseFactsCreateFactsItem.js +5 -0
- package/dist/cjs/api/types/ResponseFactsList.d.ts +8 -0
- package/dist/cjs/api/types/ResponseFactsList.js +5 -0
- package/dist/cjs/api/types/ResponseFactsListFactsItem.d.ts +23 -0
- package/dist/cjs/api/types/ResponseFactsListFactsItem.js +5 -0
- package/dist/cjs/api/types/ResponseFactsListFactsItemEvidenceItem.d.ts +11 -0
- package/dist/cjs/api/types/ResponseFactsListFactsItemEvidenceItem.js +5 -0
- package/dist/cjs/api/types/ResponseFactsUpdate.d.ts +8 -0
- package/dist/cjs/api/types/ResponseFactsUpdate.js +5 -0
- package/dist/cjs/api/types/ResponseFactsUpdateFactsItem.d.ts +22 -0
- package/dist/cjs/api/types/ResponseFactsUpdateFactsItem.js +5 -0
- package/dist/cjs/api/types/ResponseInteraction.d.ts +24 -0
- package/dist/cjs/api/types/ResponseInteraction.js +5 -0
- package/dist/cjs/api/types/ResponseInteractionCreate.d.ts +10 -0
- package/dist/cjs/api/types/ResponseInteractionCreate.js +5 -0
- package/dist/cjs/api/types/ResponseInteractions.d.ts +7 -0
- package/dist/cjs/api/types/ResponseInteractions.js +5 -0
- package/dist/cjs/api/types/ResponseMetadataCreate.d.ts +7 -0
- package/dist/cjs/api/types/ResponseMetadataCreate.js +5 -0
- package/dist/cjs/api/types/ResponseMetadataCreateParticipantsRolesItem.d.ts +10 -0
- package/dist/cjs/api/types/ResponseMetadataCreateParticipantsRolesItem.js +5 -0
- package/dist/cjs/api/types/ResponseRecordingCreate.d.ts +8 -0
- package/dist/cjs/api/types/ResponseRecordingCreate.js +5 -0
- package/dist/cjs/api/types/ResponseRecordingList.d.ts +8 -0
- package/dist/cjs/api/types/ResponseRecordingList.js +5 -0
- package/dist/cjs/api/types/ResponseTranscriptCreate.d.ts +13 -0
- package/dist/cjs/api/types/ResponseTranscriptCreate.js +5 -0
- package/dist/cjs/api/types/ResponseTranscriptCreateTranscriptsItem.d.ts +17 -0
- package/dist/cjs/api/types/ResponseTranscriptCreateTranscriptsItem.js +5 -0
- package/dist/cjs/api/types/ResponseTranscriptListAll.d.ts +7 -0
- package/dist/cjs/api/types/ResponseTranscriptListAll.js +5 -0
- package/dist/cjs/api/types/ResponseTranscriptListAllTranscriptsItem.d.ts +9 -0
- package/dist/cjs/api/types/ResponseTranscriptListAllTranscriptsItem.js +5 -0
- package/dist/cjs/api/types/Section.d.ts +22 -0
- package/dist/cjs/api/types/Section.js +5 -0
- package/dist/cjs/api/types/SectionTranslationsItem.d.ts +11 -0
- package/dist/cjs/api/types/SectionTranslationsItem.js +5 -0
- package/dist/cjs/api/types/StreamConfigData.d.ts +8 -0
- package/dist/cjs/api/types/StreamConfigData.js +5 -0
- package/dist/cjs/api/types/StreamConfigMode.d.ts +10 -0
- package/dist/cjs/api/types/StreamConfigMode.js +5 -0
- package/dist/cjs/api/types/StreamConfigModeOutputLocale.d.ts +21 -0
- package/dist/cjs/api/types/StreamConfigModeOutputLocale.js +20 -0
- package/dist/cjs/api/types/StreamConfigModeType.d.ts +11 -0
- package/dist/cjs/api/types/StreamConfigModeType.js +10 -0
- package/dist/cjs/api/types/StreamConfigStatusMessage.d.ts +12 -0
- package/dist/cjs/api/types/StreamConfigStatusMessage.js +5 -0
- package/dist/cjs/api/types/StreamConfigStatusMessageType.d.ts +15 -0
- package/dist/cjs/api/types/StreamConfigStatusMessageType.js +14 -0
- package/dist/cjs/api/types/StreamConfigTranscription.d.ts +14 -0
- package/dist/cjs/api/types/StreamConfigTranscription.js +5 -0
- package/dist/cjs/api/types/StreamConfigTranscriptionPrimaryLanguage.d.ts +21 -0
- package/dist/cjs/api/types/StreamConfigTranscriptionPrimaryLanguage.js +20 -0
- package/dist/cjs/api/types/StreamConfigurationMessage.d.ts +8 -0
- package/dist/cjs/api/types/StreamConfigurationMessage.js +5 -0
- package/dist/cjs/api/types/StreamEndMessage.d.ts +6 -0
- package/dist/cjs/api/types/StreamEndMessage.js +5 -0
- package/dist/cjs/api/types/StreamEndedMessage.d.ts +6 -0
- package/dist/cjs/api/types/StreamEndedMessage.js +5 -0
- package/dist/cjs/api/types/StreamErrorDetail.d.ts +15 -0
- package/dist/cjs/api/types/StreamErrorDetail.js +5 -0
- package/dist/cjs/api/types/StreamErrorMessage.d.ts +8 -0
- package/dist/cjs/api/types/StreamErrorMessage.js +5 -0
- package/dist/cjs/api/types/StreamFact.d.ts +21 -0
- package/dist/cjs/api/types/StreamFact.js +5 -0
- package/dist/cjs/api/types/StreamFactsMessage.d.ts +8 -0
- package/dist/cjs/api/types/StreamFactsMessage.js +5 -0
- package/dist/cjs/api/types/StreamParticipant.d.ts +10 -0
- package/dist/cjs/api/types/StreamParticipant.js +5 -0
- package/dist/cjs/api/types/StreamParticipantRole.d.ts +12 -0
- package/dist/cjs/api/types/StreamParticipantRole.js +11 -0
- package/dist/cjs/api/types/StreamTranscript.d.ts +16 -0
- package/dist/cjs/api/types/StreamTranscript.js +5 -0
- package/dist/cjs/api/types/StreamTranscriptMessage.d.ts +8 -0
- package/dist/cjs/api/types/StreamTranscriptMessage.js +5 -0
- package/dist/cjs/api/types/StreamTranscriptTime.d.ts +9 -0
- package/dist/cjs/api/types/StreamTranscriptTime.js +5 -0
- package/dist/cjs/api/types/StreamUsageMessage.d.ts +8 -0
- package/dist/cjs/api/types/StreamUsageMessage.js +5 -0
- package/dist/cjs/api/types/TemplateFiltered.d.ts +20 -0
- package/dist/cjs/api/types/TemplateFiltered.js +5 -0
- package/dist/cjs/api/types/TemplateFilteredTemplateSectionsItem.d.ts +10 -0
- package/dist/cjs/api/types/TemplateFilteredTemplateSectionsItem.js +5 -0
- package/dist/cjs/api/types/TemplateFilteredTranslationsItem.d.ts +11 -0
- package/dist/cjs/api/types/TemplateFilteredTranslationsItem.js +5 -0
- package/dist/cjs/api/types/TranscribeCommand.d.ts +12 -0
- package/dist/cjs/api/types/TranscribeCommand.js +5 -0
- package/dist/cjs/api/types/TranscribeCommandData.d.ts +15 -0
- package/dist/cjs/api/types/TranscribeCommandData.js +5 -0
- package/dist/cjs/api/types/TranscribeCommandMessage.d.ts +8 -0
- package/dist/cjs/api/types/TranscribeCommandMessage.js +5 -0
- package/dist/cjs/api/types/TranscribeCommandVariable.d.ts +11 -0
- package/dist/cjs/api/types/TranscribeCommandVariable.js +5 -0
- package/dist/cjs/api/types/TranscribeConfigStatusMessage.d.ts +12 -0
- package/dist/cjs/api/types/TranscribeConfigStatusMessage.js +5 -0
- package/dist/cjs/api/types/TranscribeConfigStatusMessageType.d.ts +12 -0
- package/dist/cjs/api/types/TranscribeConfigStatusMessageType.js +11 -0
- package/dist/cjs/api/types/TranscribeConfigurationMessage.d.ts +8 -0
- package/dist/cjs/api/types/TranscribeConfigurationMessage.js +5 -0
- package/dist/cjs/api/types/TranscribeConfigurationMessageConfiguration.d.ts +16 -0
- package/dist/cjs/api/types/TranscribeConfigurationMessageConfiguration.js +5 -0
- package/dist/cjs/api/types/TranscribeConfigurationMessageConfigurationPrimaryLanguage.d.ts +21 -0
- package/dist/cjs/api/types/TranscribeConfigurationMessageConfigurationPrimaryLanguage.js +20 -0
- package/dist/cjs/api/types/TranscribeEndMessage.d.ts +6 -0
- package/dist/cjs/api/types/TranscribeEndMessage.js +5 -0
- package/dist/cjs/api/types/TranscribeEndedMessage.d.ts +6 -0
- package/dist/cjs/api/types/TranscribeEndedMessage.js +5 -0
- package/dist/cjs/api/types/TranscribeErrorMessage.d.ts +8 -0
- package/dist/cjs/api/types/TranscribeErrorMessage.js +5 -0
- package/dist/cjs/api/types/TranscribeErrorMessageError.d.ts +15 -0
- package/dist/cjs/api/types/TranscribeErrorMessageError.js +5 -0
- package/dist/cjs/api/types/TranscribeTranscriptData.d.ts +15 -0
- package/dist/cjs/api/types/TranscribeTranscriptData.js +5 -0
- package/dist/cjs/api/types/TranscribeTranscriptMessage.d.ts +8 -0
- package/dist/cjs/api/types/TranscribeTranscriptMessage.js +5 -0
- package/dist/cjs/api/types/TranscribeUsageMessage.d.ts +8 -0
- package/dist/cjs/api/types/TranscribeUsageMessage.js +5 -0
- package/dist/cjs/api/types/Transcript.d.ts +17 -0
- package/dist/cjs/api/types/Transcript.js +5 -0
- package/dist/cjs/api/types/UsageInfo.d.ts +6 -0
- package/dist/cjs/api/types/UsageInfo.js +5 -0
- package/dist/cjs/api/types/Uuid.d.ts +4 -0
- package/dist/cjs/api/types/Uuid.js +5 -0
- package/dist/cjs/api/types/V2DocumentContextTypeEnum.d.ts +9 -0
- package/dist/cjs/api/types/V2DocumentContextTypeEnum.js +11 -0
- package/dist/cjs/api/types/V2SourceEnum.d.ts +9 -0
- package/dist/cjs/api/types/V2SourceEnum.js +11 -0
- package/dist/cjs/api/types/WritingStyle.d.ts +7 -0
- package/dist/cjs/api/types/WritingStyle.js +5 -0
- package/dist/cjs/api/types/index.d.ts +91 -0
- package/dist/cjs/api/types/index.js +107 -0
- package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
- package/dist/cjs/core/auth/BasicAuth.js +26 -0
- package/dist/cjs/core/auth/BearerToken.d.ts +5 -0
- package/dist/cjs/core/auth/BearerToken.js +15 -0
- package/dist/cjs/core/auth/OAuthTokenProvider.d.ts +25 -0
- package/dist/cjs/core/auth/OAuthTokenProvider.js +86 -0
- package/dist/cjs/core/auth/index.d.ts +3 -0
- package/dist/cjs/core/auth/index.js +9 -0
- package/dist/cjs/core/fetcher/APIResponse.d.ts +20 -0
- package/dist/cjs/core/fetcher/APIResponse.js +2 -0
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +17 -0
- package/dist/cjs/core/fetcher/BinaryResponse.js +14 -0
- package/dist/cjs/core/fetcher/Fetcher.d.ts +40 -0
- package/dist/cjs/core/fetcher/Fetcher.js +120 -0
- package/dist/cjs/core/fetcher/Headers.d.ts +2 -0
- package/dist/cjs/core/fetcher/Headers.js +84 -0
- package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/cjs/core/fetcher/HttpResponsePromise.js +103 -0
- package/dist/cjs/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/cjs/core/fetcher/RawResponse.js +44 -0
- package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +4 -0
- package/dist/cjs/core/fetcher/ResponseWithBody.js +6 -0
- package/dist/cjs/core/fetcher/Supplier.d.ts +4 -0
- package/dist/cjs/core/fetcher/Supplier.js +22 -0
- package/dist/cjs/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/cjs/core/fetcher/createRequestUrl.js +12 -0
- package/dist/cjs/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/cjs/core/fetcher/getFetchFn.js +68 -0
- package/dist/cjs/core/fetcher/getHeader.d.ts +1 -0
- package/dist/cjs/core/fetcher/getHeader.js +11 -0
- package/dist/cjs/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/cjs/core/fetcher/getRequestBody.js +23 -0
- package/dist/cjs/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/cjs/core/fetcher/getResponseBody.js +54 -0
- package/dist/cjs/core/fetcher/index.d.ts +9 -0
- package/dist/cjs/core/fetcher/index.js +15 -0
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/cjs/core/fetcher/makeRequest.js +42 -0
- package/dist/cjs/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/cjs/core/fetcher/requestWithRetries.js +40 -0
- package/dist/cjs/core/fetcher/signals.d.ts +11 -0
- package/dist/cjs/core/fetcher/signals.js +36 -0
- package/dist/cjs/core/headers.d.ts +3 -0
- package/dist/cjs/core/headers.js +29 -0
- package/dist/cjs/core/index.d.ts +6 -0
- package/dist/cjs/core/index.js +22 -0
- package/dist/cjs/core/json.d.ts +15 -0
- package/dist/cjs/core/json.js +24 -0
- package/dist/cjs/core/pagination/Page.d.ts +32 -0
- package/dist/cjs/core/pagination/Page.js +100 -0
- package/dist/cjs/core/pagination/Pageable.d.ts +14 -0
- package/dist/cjs/core/pagination/Pageable.js +10 -0
- package/dist/cjs/core/pagination/index.d.ts +2 -0
- package/dist/cjs/core/pagination/index.js +7 -0
- package/dist/cjs/core/runtime/index.d.ts +1 -0
- package/dist/cjs/core/runtime/index.js +5 -0
- package/dist/cjs/core/runtime/runtime.d.ts +9 -0
- package/dist/cjs/core/runtime/runtime.js +102 -0
- package/dist/cjs/core/utils/index.d.ts +1 -0
- package/dist/cjs/core/utils/index.js +5 -0
- package/dist/cjs/core/utils/setObjectProperty.d.ts +11 -0
- package/dist/cjs/core/utils/setObjectProperty.js +42 -0
- package/dist/cjs/core/websocket/events.d.ts +36 -0
- package/dist/cjs/core/websocket/events.js +27 -0
- package/dist/cjs/core/websocket/index.d.ts +1 -0
- package/dist/cjs/core/websocket/index.js +17 -0
- package/dist/cjs/core/websocket/ws.d.ts +137 -0
- package/dist/cjs/core/websocket/ws.js +452 -0
- package/dist/cjs/custom/CortiAuth.d.ts +57 -0
- package/dist/cjs/custom/CortiAuth.js +185 -0
- package/dist/cjs/custom/CortiClient.d.ts +113 -0
- package/dist/cjs/custom/CortiClient.js +148 -0
- package/dist/cjs/custom/CustomStream.d.ts +15 -0
- package/dist/cjs/custom/CustomStream.js +82 -0
- package/dist/cjs/custom/CustomStreamSocket.d.ts +11 -0
- package/dist/cjs/custom/CustomStreamSocket.js +62 -0
- package/dist/cjs/custom/CustomTranscribe.d.ts +15 -0
- package/dist/cjs/custom/CustomTranscribe.js +82 -0
- package/dist/cjs/custom/CustomTranscribeSocket.d.ts +11 -0
- package/dist/cjs/custom/CustomTranscribeSocket.js +62 -0
- package/dist/cjs/custom/RefreshBearerProvider.d.ts +23 -0
- package/dist/cjs/custom/RefreshBearerProvider.js +85 -0
- package/dist/cjs/environments.d.ts +26 -0
- package/dist/cjs/environments.js +23 -0
- package/dist/cjs/errors/CortiError.d.ts +15 -0
- package/dist/cjs/errors/CortiError.js +30 -0
- package/dist/cjs/errors/CortiTimeoutError.d.ts +6 -0
- package/dist/cjs/errors/CortiTimeoutError.js +13 -0
- package/dist/cjs/errors/index.d.ts +2 -0
- package/dist/cjs/errors/index.js +7 -0
- package/dist/cjs/index.d.ts +14 -0
- package/dist/cjs/index.js +56 -0
- package/dist/cjs/version.d.ts +1 -0
- package/dist/cjs/version.js +4 -0
- package/dist/esm/api/errors/BadRequestError.d.mts +8 -0
- package/dist/esm/api/errors/BadRequestError.mjs +15 -0
- package/dist/esm/api/errors/ForbiddenError.d.mts +9 -0
- package/dist/esm/api/errors/ForbiddenError.mjs +15 -0
- package/dist/esm/api/errors/GatewayTimeoutError.d.mts +9 -0
- package/dist/esm/api/errors/GatewayTimeoutError.mjs +15 -0
- package/dist/esm/api/errors/InternalServerError.d.mts +8 -0
- package/dist/esm/api/errors/InternalServerError.mjs +15 -0
- package/dist/esm/api/errors/NotFoundError.d.mts +9 -0
- package/dist/esm/api/errors/NotFoundError.mjs +15 -0
- package/dist/esm/api/errors/UnauthorizedError.d.mts +8 -0
- package/dist/esm/api/errors/UnauthorizedError.mjs +15 -0
- package/dist/esm/api/errors/index.d.mts +6 -0
- package/dist/esm/api/errors/index.mjs +6 -0
- package/dist/esm/api/index.d.mts +3 -0
- package/dist/esm/api/index.mjs +3 -0
- package/dist/esm/api/resources/auth/client/Client.d.mts +49 -0
- package/dist/esm/api/resources/auth/client/Client.mjs +89 -0
- package/dist/esm/api/resources/auth/client/index.d.mts +2 -0
- package/dist/esm/api/resources/auth/client/index.mjs +1 -0
- package/dist/esm/api/resources/auth/client/requests/AuthGetTokenRequest.d.mts +14 -0
- package/dist/esm/api/resources/auth/client/requests/AuthGetTokenRequest.mjs +4 -0
- package/dist/esm/api/resources/auth/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/auth/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/auth/index.d.mts +2 -0
- package/dist/esm/api/resources/auth/index.mjs +2 -0
- package/dist/esm/api/resources/auth/types/GetTokenResponse.d.mts +10 -0
- package/dist/esm/api/resources/auth/types/GetTokenResponse.mjs +4 -0
- package/dist/esm/api/resources/auth/types/index.d.mts +1 -0
- package/dist/esm/api/resources/auth/types/index.mjs +1 -0
- package/dist/esm/api/resources/documents/client/Client.d.mts +127 -0
- package/dist/esm/api/resources/documents/client/Client.mjs +400 -0
- package/dist/esm/api/resources/documents/client/index.d.mts +2 -0
- package/dist/esm/api/resources/documents/client/index.mjs +1 -0
- package/dist/esm/api/resources/documents/client/requests/DocumentsGetRequest.d.mts +13 -0
- package/dist/esm/api/resources/documents/client/requests/DocumentsGetRequest.mjs +4 -0
- package/dist/esm/api/resources/documents/client/requests/RequestDocumentCreate.d.mts +31 -0
- package/dist/esm/api/resources/documents/client/requests/RequestDocumentCreate.mjs +4 -0
- package/dist/esm/api/resources/documents/client/requests/RequestDocumentUpdate.d.mts +13 -0
- package/dist/esm/api/resources/documents/client/requests/RequestDocumentUpdate.mjs +4 -0
- package/dist/esm/api/resources/documents/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/documents/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/documents/index.d.mts +2 -0
- package/dist/esm/api/resources/documents/index.mjs +2 -0
- package/dist/esm/api/resources/documents/types/RequestDocumentCreateContextItem.d.mts +10 -0
- package/dist/esm/api/resources/documents/types/RequestDocumentCreateContextItem.mjs +4 -0
- package/dist/esm/api/resources/documents/types/RequestDocumentUpdateSectionsItem.d.mts +9 -0
- package/dist/esm/api/resources/documents/types/RequestDocumentUpdateSectionsItem.mjs +4 -0
- package/dist/esm/api/resources/documents/types/index.d.mts +2 -0
- package/dist/esm/api/resources/documents/types/index.mjs +2 -0
- package/dist/esm/api/resources/facts/client/Client.d.mts +113 -0
- package/dist/esm/api/resources/facts/client/Client.mjs +353 -0
- package/dist/esm/api/resources/facts/client/index.d.mts +2 -0
- package/dist/esm/api/resources/facts/client/index.mjs +1 -0
- package/dist/esm/api/resources/facts/client/requests/RequestFactUpdate.d.mts +21 -0
- package/dist/esm/api/resources/facts/client/requests/RequestFactUpdate.mjs +4 -0
- package/dist/esm/api/resources/facts/client/requests/RequestFactsCreate.d.mts +17 -0
- package/dist/esm/api/resources/facts/client/requests/RequestFactsCreate.mjs +4 -0
- package/dist/esm/api/resources/facts/client/requests/RequestFactsUpdate.d.mts +16 -0
- package/dist/esm/api/resources/facts/client/requests/RequestFactsUpdate.mjs +4 -0
- package/dist/esm/api/resources/facts/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/facts/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/facts/index.d.mts +2 -0
- package/dist/esm/api/resources/facts/index.mjs +2 -0
- package/dist/esm/api/resources/facts/types/RequestFactsCreateFactsItem.d.mts +12 -0
- package/dist/esm/api/resources/facts/types/RequestFactsCreateFactsItem.mjs +4 -0
- package/dist/esm/api/resources/facts/types/RequestFactsUpdateFactsItem.d.mts +14 -0
- package/dist/esm/api/resources/facts/types/RequestFactsUpdateFactsItem.mjs +4 -0
- package/dist/esm/api/resources/facts/types/index.d.mts +2 -0
- package/dist/esm/api/resources/facts/types/index.mjs +2 -0
- package/dist/esm/api/resources/index.d.mts +20 -0
- package/dist/esm/api/resources/index.mjs +20 -0
- package/dist/esm/api/resources/interactions/client/Client.d.mts +113 -0
- package/dist/esm/api/resources/interactions/client/Client.mjs +402 -0
- package/dist/esm/api/resources/interactions/client/index.d.mts +2 -0
- package/dist/esm/api/resources/interactions/client/index.mjs +1 -0
- package/dist/esm/api/resources/interactions/client/requests/InteractionsListRequest.d.mts +34 -0
- package/dist/esm/api/resources/interactions/client/requests/InteractionsListRequest.mjs +4 -0
- package/dist/esm/api/resources/interactions/client/requests/RequestInteractionCreate.d.mts +22 -0
- package/dist/esm/api/resources/interactions/client/requests/RequestInteractionCreate.mjs +4 -0
- package/dist/esm/api/resources/interactions/client/requests/RequestInteractionUpdate.d.mts +16 -0
- package/dist/esm/api/resources/interactions/client/requests/RequestInteractionUpdate.mjs +4 -0
- package/dist/esm/api/resources/interactions/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/interactions/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/interactions/index.d.mts +2 -0
- package/dist/esm/api/resources/interactions/index.mjs +2 -0
- package/dist/esm/api/resources/interactions/types/InteractionsListRequestDirection.d.mts +11 -0
- package/dist/esm/api/resources/interactions/types/InteractionsListRequestDirection.mjs +7 -0
- package/dist/esm/api/resources/interactions/types/InteractionsListRequestSort.d.mts +12 -0
- package/dist/esm/api/resources/interactions/types/InteractionsListRequestSort.mjs +8 -0
- package/dist/esm/api/resources/interactions/types/index.d.mts +2 -0
- package/dist/esm/api/resources/interactions/types/index.mjs +2 -0
- package/dist/esm/api/resources/recordings/client/Client.d.mts +94 -0
- package/dist/esm/api/resources/recordings/client/Client.mjs +307 -0
- package/dist/esm/api/resources/recordings/client/index.d.mts +1 -0
- package/dist/esm/api/resources/recordings/client/index.mjs +1 -0
- package/dist/esm/api/resources/recordings/index.d.mts +1 -0
- package/dist/esm/api/resources/recordings/index.mjs +1 -0
- package/dist/esm/api/resources/stream/client/Client.d.mts +35 -0
- package/dist/esm/api/resources/stream/client/Client.mjs +45 -0
- package/dist/esm/api/resources/stream/client/Socket.d.mts +54 -0
- package/dist/esm/api/resources/stream/client/Socket.mjs +123 -0
- package/dist/esm/api/resources/stream/client/index.d.mts +1 -0
- package/dist/esm/api/resources/stream/client/index.mjs +1 -0
- package/dist/esm/api/resources/stream/index.d.mts +1 -0
- package/dist/esm/api/resources/stream/index.mjs +1 -0
- package/dist/esm/api/resources/templates/client/Client.d.mts +77 -0
- package/dist/esm/api/resources/templates/client/Client.mjs +241 -0
- package/dist/esm/api/resources/templates/client/index.d.mts +2 -0
- package/dist/esm/api/resources/templates/client/index.mjs +1 -0
- package/dist/esm/api/resources/templates/client/requests/TemplatesListRequest.d.mts +21 -0
- package/dist/esm/api/resources/templates/client/requests/TemplatesListRequest.mjs +4 -0
- package/dist/esm/api/resources/templates/client/requests/TemplatesSectionsListRequest.d.mts +17 -0
- package/dist/esm/api/resources/templates/client/requests/TemplatesSectionsListRequest.mjs +4 -0
- package/dist/esm/api/resources/templates/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/templates/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/templates/index.d.mts +1 -0
- package/dist/esm/api/resources/templates/index.mjs +1 -0
- package/dist/esm/api/resources/transcribe/client/Client.d.mts +34 -0
- package/dist/esm/api/resources/transcribe/client/Client.mjs +45 -0
- package/dist/esm/api/resources/transcribe/client/Socket.d.mts +54 -0
- package/dist/esm/api/resources/transcribe/client/Socket.mjs +123 -0
- package/dist/esm/api/resources/transcribe/client/index.d.mts +1 -0
- package/dist/esm/api/resources/transcribe/client/index.mjs +1 -0
- package/dist/esm/api/resources/transcribe/index.d.mts +1 -0
- package/dist/esm/api/resources/transcribe/index.mjs +1 -0
- package/dist/esm/api/resources/transcripts/client/Client.d.mts +110 -0
- package/dist/esm/api/resources/transcripts/client/Client.mjs +362 -0
- package/dist/esm/api/resources/transcripts/client/index.d.mts +2 -0
- package/dist/esm/api/resources/transcripts/client/index.mjs +1 -0
- package/dist/esm/api/resources/transcripts/client/requests/TranscriptCreate.d.mts +28 -0
- package/dist/esm/api/resources/transcripts/client/requests/TranscriptCreate.mjs +4 -0
- package/dist/esm/api/resources/transcripts/client/requests/TranscriptsListRequest.d.mts +30 -0
- package/dist/esm/api/resources/transcripts/client/requests/TranscriptsListRequest.mjs +4 -0
- package/dist/esm/api/resources/transcripts/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/transcripts/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/transcripts/index.d.mts +2 -0
- package/dist/esm/api/resources/transcripts/index.mjs +2 -0
- package/dist/esm/api/resources/transcripts/types/RequestTranscriptCreateModelName.d.mts +12 -0
- package/dist/esm/api/resources/transcripts/types/RequestTranscriptCreateModelName.mjs +8 -0
- package/dist/esm/api/resources/transcripts/types/RequestTranscriptCreateParticipantsItem.d.mts +10 -0
- package/dist/esm/api/resources/transcripts/types/RequestTranscriptCreateParticipantsItem.mjs +4 -0
- package/dist/esm/api/resources/transcripts/types/RequestTranscriptCreatePrimaryLanguage.d.mts +21 -0
- package/dist/esm/api/resources/transcripts/types/RequestTranscriptCreatePrimaryLanguage.mjs +17 -0
- package/dist/esm/api/resources/transcripts/types/TranscriptsListRequestDirection.d.mts +11 -0
- package/dist/esm/api/resources/transcripts/types/TranscriptsListRequestDirection.mjs +7 -0
- package/dist/esm/api/resources/transcripts/types/TranscriptsListRequestSort.d.mts +11 -0
- package/dist/esm/api/resources/transcripts/types/TranscriptsListRequestSort.mjs +7 -0
- package/dist/esm/api/resources/transcripts/types/index.d.mts +5 -0
- package/dist/esm/api/resources/transcripts/types/index.mjs +5 -0
- package/dist/esm/api/types/DocumentContextData.d.mts +14 -0
- package/dist/esm/api/types/DocumentContextData.mjs +4 -0
- package/dist/esm/api/types/DocumentTemplate.d.mts +14 -0
- package/dist/esm/api/types/DocumentTemplate.mjs +4 -0
- package/dist/esm/api/types/Encounter.d.mts +16 -0
- package/dist/esm/api/types/Encounter.mjs +4 -0
- package/dist/esm/api/types/EncounterPeriod.d.mts +9 -0
- package/dist/esm/api/types/EncounterPeriod.mjs +4 -0
- package/dist/esm/api/types/EncounterStatus.d.mts +12 -0
- package/dist/esm/api/types/EncounterStatus.mjs +11 -0
- package/dist/esm/api/types/EncounterType.d.mts +11 -0
- package/dist/esm/api/types/EncounterType.mjs +10 -0
- package/dist/esm/api/types/EncounterUpdate.d.mts +16 -0
- package/dist/esm/api/types/EncounterUpdate.mjs +4 -0
- package/dist/esm/api/types/ErrorResponse.d.mts +11 -0
- package/dist/esm/api/types/ErrorResponse.mjs +4 -0
- package/dist/esm/api/types/FactContext.d.mts +12 -0
- package/dist/esm/api/types/FactContext.mjs +4 -0
- package/dist/esm/api/types/GenderEnum.d.mts +10 -0
- package/dist/esm/api/types/GenderEnum.mjs +9 -0
- package/dist/esm/api/types/ParticipantRoleEnum.d.mts +9 -0
- package/dist/esm/api/types/ParticipantRoleEnum.mjs +8 -0
- package/dist/esm/api/types/Patient.d.mts +16 -0
- package/dist/esm/api/types/Patient.mjs +4 -0
- package/dist/esm/api/types/PatientUpdate.d.mts +16 -0
- package/dist/esm/api/types/PatientUpdate.mjs +4 -0
- package/dist/esm/api/types/ResponseAllTemplateSections.d.mts +8 -0
- package/dist/esm/api/types/ResponseAllTemplateSections.mjs +4 -0
- package/dist/esm/api/types/ResponseAllTemplates.d.mts +8 -0
- package/dist/esm/api/types/ResponseAllTemplates.mjs +4 -0
- package/dist/esm/api/types/ResponseAllTemplatesDataItem.d.mts +20 -0
- package/dist/esm/api/types/ResponseAllTemplatesDataItem.mjs +4 -0
- package/dist/esm/api/types/ResponseAllTemplatesDataItemTemplateSectionsItem.d.mts +10 -0
- package/dist/esm/api/types/ResponseAllTemplatesDataItemTemplateSectionsItem.mjs +4 -0
- package/dist/esm/api/types/ResponseAllTemplatesDataItemTranslationsItem.d.mts +11 -0
- package/dist/esm/api/types/ResponseAllTemplatesDataItemTranslationsItem.mjs +4 -0
- package/dist/esm/api/types/ResponseDocumentList.d.mts +7 -0
- package/dist/esm/api/types/ResponseDocumentList.mjs +4 -0
- package/dist/esm/api/types/ResponseDocumentRead.d.mts +22 -0
- package/dist/esm/api/types/ResponseDocumentRead.mjs +4 -0
- package/dist/esm/api/types/ResponseDocumentReadSectionsItem.d.mts +17 -0
- package/dist/esm/api/types/ResponseDocumentReadSectionsItem.mjs +4 -0
- package/dist/esm/api/types/ResponseFactGroupsFiltered.d.mts +7 -0
- package/dist/esm/api/types/ResponseFactGroupsFiltered.mjs +4 -0
- package/dist/esm/api/types/ResponseFactGroupsFilteredDataItem.d.mts +9 -0
- package/dist/esm/api/types/ResponseFactGroupsFilteredDataItem.mjs +4 -0
- package/dist/esm/api/types/ResponseFactGroupsFilteredDataItemTranslationsItem.d.mts +8 -0
- package/dist/esm/api/types/ResponseFactGroupsFilteredDataItemTranslationsItem.mjs +4 -0
- package/dist/esm/api/types/ResponseFactUpdate.d.mts +22 -0
- package/dist/esm/api/types/ResponseFactUpdate.mjs +4 -0
- package/dist/esm/api/types/ResponseFactsCreate.d.mts +8 -0
- package/dist/esm/api/types/ResponseFactsCreate.mjs +4 -0
- package/dist/esm/api/types/ResponseFactsCreateFactsItem.d.mts +20 -0
- package/dist/esm/api/types/ResponseFactsCreateFactsItem.mjs +4 -0
- package/dist/esm/api/types/ResponseFactsList.d.mts +8 -0
- package/dist/esm/api/types/ResponseFactsList.mjs +4 -0
- package/dist/esm/api/types/ResponseFactsListFactsItem.d.mts +23 -0
- package/dist/esm/api/types/ResponseFactsListFactsItem.mjs +4 -0
- package/dist/esm/api/types/ResponseFactsListFactsItemEvidenceItem.d.mts +11 -0
- package/dist/esm/api/types/ResponseFactsListFactsItemEvidenceItem.mjs +4 -0
- package/dist/esm/api/types/ResponseFactsUpdate.d.mts +8 -0
- package/dist/esm/api/types/ResponseFactsUpdate.mjs +4 -0
- package/dist/esm/api/types/ResponseFactsUpdateFactsItem.d.mts +22 -0
- package/dist/esm/api/types/ResponseFactsUpdateFactsItem.mjs +4 -0
- package/dist/esm/api/types/ResponseInteraction.d.mts +24 -0
- package/dist/esm/api/types/ResponseInteraction.mjs +4 -0
- package/dist/esm/api/types/ResponseInteractionCreate.d.mts +10 -0
- package/dist/esm/api/types/ResponseInteractionCreate.mjs +4 -0
- package/dist/esm/api/types/ResponseInteractions.d.mts +7 -0
- package/dist/esm/api/types/ResponseInteractions.mjs +4 -0
- package/dist/esm/api/types/ResponseMetadataCreate.d.mts +7 -0
- package/dist/esm/api/types/ResponseMetadataCreate.mjs +4 -0
- package/dist/esm/api/types/ResponseMetadataCreateParticipantsRolesItem.d.mts +10 -0
- package/dist/esm/api/types/ResponseMetadataCreateParticipantsRolesItem.mjs +4 -0
- package/dist/esm/api/types/ResponseRecordingCreate.d.mts +8 -0
- package/dist/esm/api/types/ResponseRecordingCreate.mjs +4 -0
- package/dist/esm/api/types/ResponseRecordingList.d.mts +8 -0
- package/dist/esm/api/types/ResponseRecordingList.mjs +4 -0
- package/dist/esm/api/types/ResponseTranscriptCreate.d.mts +13 -0
- package/dist/esm/api/types/ResponseTranscriptCreate.mjs +4 -0
- package/dist/esm/api/types/ResponseTranscriptCreateTranscriptsItem.d.mts +17 -0
- package/dist/esm/api/types/ResponseTranscriptCreateTranscriptsItem.mjs +4 -0
- package/dist/esm/api/types/ResponseTranscriptListAll.d.mts +7 -0
- package/dist/esm/api/types/ResponseTranscriptListAll.mjs +4 -0
- package/dist/esm/api/types/ResponseTranscriptListAllTranscriptsItem.d.mts +9 -0
- package/dist/esm/api/types/ResponseTranscriptListAllTranscriptsItem.mjs +4 -0
- package/dist/esm/api/types/Section.d.mts +22 -0
- package/dist/esm/api/types/Section.mjs +4 -0
- package/dist/esm/api/types/SectionTranslationsItem.d.mts +11 -0
- package/dist/esm/api/types/SectionTranslationsItem.mjs +4 -0
- package/dist/esm/api/types/StreamConfigData.d.mts +8 -0
- package/dist/esm/api/types/StreamConfigData.mjs +4 -0
- package/dist/esm/api/types/StreamConfigMode.d.mts +10 -0
- package/dist/esm/api/types/StreamConfigMode.mjs +4 -0
- package/dist/esm/api/types/StreamConfigModeOutputLocale.d.mts +21 -0
- package/dist/esm/api/types/StreamConfigModeOutputLocale.mjs +17 -0
- package/dist/esm/api/types/StreamConfigModeType.d.mts +11 -0
- package/dist/esm/api/types/StreamConfigModeType.mjs +7 -0
- package/dist/esm/api/types/StreamConfigStatusMessage.d.mts +12 -0
- package/dist/esm/api/types/StreamConfigStatusMessage.mjs +4 -0
- package/dist/esm/api/types/StreamConfigStatusMessageType.d.mts +15 -0
- package/dist/esm/api/types/StreamConfigStatusMessageType.mjs +11 -0
- package/dist/esm/api/types/StreamConfigTranscription.d.mts +14 -0
- package/dist/esm/api/types/StreamConfigTranscription.mjs +4 -0
- package/dist/esm/api/types/StreamConfigTranscriptionPrimaryLanguage.d.mts +21 -0
- package/dist/esm/api/types/StreamConfigTranscriptionPrimaryLanguage.mjs +17 -0
- package/dist/esm/api/types/StreamConfigurationMessage.d.mts +8 -0
- package/dist/esm/api/types/StreamConfigurationMessage.mjs +4 -0
- package/dist/esm/api/types/StreamEndMessage.d.mts +6 -0
- package/dist/esm/api/types/StreamEndMessage.mjs +4 -0
- package/dist/esm/api/types/StreamEndedMessage.d.mts +6 -0
- package/dist/esm/api/types/StreamEndedMessage.mjs +4 -0
- package/dist/esm/api/types/StreamErrorDetail.d.mts +15 -0
- package/dist/esm/api/types/StreamErrorDetail.mjs +4 -0
- package/dist/esm/api/types/StreamErrorMessage.d.mts +8 -0
- package/dist/esm/api/types/StreamErrorMessage.mjs +4 -0
- package/dist/esm/api/types/StreamFact.d.mts +21 -0
- package/dist/esm/api/types/StreamFact.mjs +4 -0
- package/dist/esm/api/types/StreamFactsMessage.d.mts +8 -0
- package/dist/esm/api/types/StreamFactsMessage.mjs +4 -0
- package/dist/esm/api/types/StreamParticipant.d.mts +10 -0
- package/dist/esm/api/types/StreamParticipant.mjs +4 -0
- package/dist/esm/api/types/StreamParticipantRole.d.mts +12 -0
- package/dist/esm/api/types/StreamParticipantRole.mjs +8 -0
- package/dist/esm/api/types/StreamTranscript.d.mts +16 -0
- package/dist/esm/api/types/StreamTranscript.mjs +4 -0
- package/dist/esm/api/types/StreamTranscriptMessage.d.mts +8 -0
- package/dist/esm/api/types/StreamTranscriptMessage.mjs +4 -0
- package/dist/esm/api/types/StreamTranscriptTime.d.mts +9 -0
- package/dist/esm/api/types/StreamTranscriptTime.mjs +4 -0
- package/dist/esm/api/types/StreamUsageMessage.d.mts +8 -0
- package/dist/esm/api/types/StreamUsageMessage.mjs +4 -0
- package/dist/esm/api/types/TemplateFiltered.d.mts +20 -0
- package/dist/esm/api/types/TemplateFiltered.mjs +4 -0
- package/dist/esm/api/types/TemplateFilteredTemplateSectionsItem.d.mts +10 -0
- package/dist/esm/api/types/TemplateFilteredTemplateSectionsItem.mjs +4 -0
- package/dist/esm/api/types/TemplateFilteredTranslationsItem.d.mts +11 -0
- package/dist/esm/api/types/TemplateFilteredTranslationsItem.mjs +4 -0
- package/dist/esm/api/types/TranscribeCommand.d.mts +12 -0
- package/dist/esm/api/types/TranscribeCommand.mjs +4 -0
- package/dist/esm/api/types/TranscribeCommandData.d.mts +15 -0
- package/dist/esm/api/types/TranscribeCommandData.mjs +4 -0
- package/dist/esm/api/types/TranscribeCommandMessage.d.mts +8 -0
- package/dist/esm/api/types/TranscribeCommandMessage.mjs +4 -0
- package/dist/esm/api/types/TranscribeCommandVariable.d.mts +11 -0
- package/dist/esm/api/types/TranscribeCommandVariable.mjs +4 -0
- package/dist/esm/api/types/TranscribeConfigStatusMessage.d.mts +12 -0
- package/dist/esm/api/types/TranscribeConfigStatusMessage.mjs +4 -0
- package/dist/esm/api/types/TranscribeConfigStatusMessageType.d.mts +12 -0
- package/dist/esm/api/types/TranscribeConfigStatusMessageType.mjs +8 -0
- package/dist/esm/api/types/TranscribeConfigurationMessage.d.mts +8 -0
- package/dist/esm/api/types/TranscribeConfigurationMessage.mjs +4 -0
- package/dist/esm/api/types/TranscribeConfigurationMessageConfiguration.d.mts +16 -0
- package/dist/esm/api/types/TranscribeConfigurationMessageConfiguration.mjs +4 -0
- package/dist/esm/api/types/TranscribeConfigurationMessageConfigurationPrimaryLanguage.d.mts +21 -0
- package/dist/esm/api/types/TranscribeConfigurationMessageConfigurationPrimaryLanguage.mjs +17 -0
- package/dist/esm/api/types/TranscribeEndMessage.d.mts +6 -0
- package/dist/esm/api/types/TranscribeEndMessage.mjs +4 -0
- package/dist/esm/api/types/TranscribeEndedMessage.d.mts +6 -0
- package/dist/esm/api/types/TranscribeEndedMessage.mjs +4 -0
- package/dist/esm/api/types/TranscribeErrorMessage.d.mts +8 -0
- package/dist/esm/api/types/TranscribeErrorMessage.mjs +4 -0
- package/dist/esm/api/types/TranscribeErrorMessageError.d.mts +15 -0
- package/dist/esm/api/types/TranscribeErrorMessageError.mjs +4 -0
- package/dist/esm/api/types/TranscribeTranscriptData.d.mts +15 -0
- package/dist/esm/api/types/TranscribeTranscriptData.mjs +4 -0
- package/dist/esm/api/types/TranscribeTranscriptMessage.d.mts +8 -0
- package/dist/esm/api/types/TranscribeTranscriptMessage.mjs +4 -0
- package/dist/esm/api/types/TranscribeUsageMessage.d.mts +8 -0
- package/dist/esm/api/types/TranscribeUsageMessage.mjs +4 -0
- package/dist/esm/api/types/Transcript.d.mts +17 -0
- package/dist/esm/api/types/Transcript.mjs +4 -0
- package/dist/esm/api/types/UsageInfo.d.mts +6 -0
- package/dist/esm/api/types/UsageInfo.mjs +4 -0
- package/dist/esm/api/types/Uuid.d.mts +4 -0
- package/dist/esm/api/types/Uuid.mjs +4 -0
- package/dist/esm/api/types/V2DocumentContextTypeEnum.d.mts +9 -0
- package/dist/esm/api/types/V2DocumentContextTypeEnum.mjs +8 -0
- package/dist/esm/api/types/V2SourceEnum.d.mts +9 -0
- package/dist/esm/api/types/V2SourceEnum.mjs +8 -0
- package/dist/esm/api/types/WritingStyle.d.mts +7 -0
- package/dist/esm/api/types/WritingStyle.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +91 -0
- package/dist/esm/api/types/index.mjs +91 -0
- package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
- package/dist/esm/core/auth/BasicAuth.mjs +23 -0
- package/dist/esm/core/auth/BearerToken.d.mts +5 -0
- package/dist/esm/core/auth/BearerToken.mjs +12 -0
- package/dist/esm/core/auth/OAuthTokenProvider.d.mts +25 -0
- package/dist/esm/core/auth/OAuthTokenProvider.mjs +49 -0
- package/dist/esm/core/auth/index.d.mts +3 -0
- package/dist/esm/core/auth/index.mjs +3 -0
- package/dist/esm/core/fetcher/APIResponse.d.mts +20 -0
- package/dist/esm/core/fetcher/APIResponse.mjs +1 -0
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +17 -0
- package/dist/esm/core/fetcher/BinaryResponse.mjs +11 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +40 -0
- package/dist/esm/core/fetcher/Fetcher.mjs +116 -0
- package/dist/esm/core/fetcher/Headers.d.mts +2 -0
- package/dist/esm/core/fetcher/Headers.mjs +82 -0
- package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +58 -0
- package/dist/esm/core/fetcher/HttpResponsePromise.mjs +99 -0
- package/dist/esm/core/fetcher/RawResponse.d.mts +29 -0
- package/dist/esm/core/fetcher/RawResponse.mjs +40 -0
- package/dist/esm/core/fetcher/ResponseWithBody.d.mts +4 -0
- package/dist/esm/core/fetcher/ResponseWithBody.mjs +3 -0
- package/dist/esm/core/fetcher/Supplier.d.mts +4 -0
- package/dist/esm/core/fetcher/Supplier.mjs +19 -0
- package/dist/esm/core/fetcher/createRequestUrl.d.mts +1 -0
- package/dist/esm/core/fetcher/createRequestUrl.mjs +6 -0
- package/dist/esm/core/fetcher/getFetchFn.d.mts +4 -0
- package/dist/esm/core/fetcher/getFetchFn.mjs +32 -0
- package/dist/esm/core/fetcher/getHeader.d.mts +1 -0
- package/dist/esm/core/fetcher/getHeader.mjs +8 -0
- package/dist/esm/core/fetcher/getRequestBody.d.mts +7 -0
- package/dist/esm/core/fetcher/getRequestBody.mjs +20 -0
- package/dist/esm/core/fetcher/getResponseBody.d.mts +1 -0
- package/dist/esm/core/fetcher/getResponseBody.mjs +51 -0
- package/dist/esm/core/fetcher/index.d.mts +9 -0
- package/dist/esm/core/fetcher/index.mjs +5 -0
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -0
- package/dist/esm/core/fetcher/makeRequest.mjs +38 -0
- package/dist/esm/core/fetcher/requestWithRetries.d.mts +1 -0
- package/dist/esm/core/fetcher/requestWithRetries.mjs +37 -0
- package/dist/esm/core/fetcher/signals.d.mts +11 -0
- package/dist/esm/core/fetcher/signals.mjs +32 -0
- package/dist/esm/core/headers.d.mts +3 -0
- package/dist/esm/core/headers.mjs +25 -0
- package/dist/esm/core/index.d.mts +6 -0
- package/dist/esm/core/index.mjs +6 -0
- package/dist/esm/core/json.d.mts +15 -0
- package/dist/esm/core/json.mjs +19 -0
- package/dist/esm/core/pagination/Page.d.mts +32 -0
- package/dist/esm/core/pagination/Page.mjs +96 -0
- package/dist/esm/core/pagination/Pageable.d.mts +14 -0
- package/dist/esm/core/pagination/Pageable.mjs +6 -0
- package/dist/esm/core/pagination/index.d.mts +2 -0
- package/dist/esm/core/pagination/index.mjs +2 -0
- package/dist/esm/core/runtime/index.d.mts +1 -0
- package/dist/esm/core/runtime/index.mjs +1 -0
- package/dist/esm/core/runtime/runtime.d.mts +9 -0
- package/dist/esm/core/runtime/runtime.mjs +99 -0
- package/dist/esm/core/utils/index.d.mts +1 -0
- package/dist/esm/core/utils/index.mjs +1 -0
- package/dist/esm/core/utils/setObjectProperty.d.mts +11 -0
- package/dist/esm/core/utils/setObjectProperty.mjs +39 -0
- package/dist/esm/core/websocket/events.d.mts +36 -0
- package/dist/esm/core/websocket/events.mjs +21 -0
- package/dist/esm/core/websocket/index.d.mts +1 -0
- package/dist/esm/core/websocket/index.mjs +1 -0
- package/dist/esm/core/websocket/ws.d.mts +137 -0
- package/dist/esm/core/websocket/ws.mjs +415 -0
- package/dist/esm/custom/CortiAuth.d.mts +57 -0
- package/dist/esm/custom/CortiAuth.mjs +145 -0
- package/dist/esm/custom/CortiClient.d.mts +113 -0
- package/dist/esm/custom/CortiClient.mjs +111 -0
- package/dist/esm/custom/CustomStream.d.mts +15 -0
- package/dist/esm/custom/CustomStream.mjs +45 -0
- package/dist/esm/custom/CustomStreamSocket.d.mts +11 -0
- package/dist/esm/custom/CustomStreamSocket.mjs +25 -0
- package/dist/esm/custom/CustomTranscribe.d.mts +15 -0
- package/dist/esm/custom/CustomTranscribe.mjs +45 -0
- package/dist/esm/custom/CustomTranscribeSocket.d.mts +11 -0
- package/dist/esm/custom/CustomTranscribeSocket.mjs +25 -0
- package/dist/esm/custom/RefreshBearerProvider.d.mts +23 -0
- package/dist/esm/custom/RefreshBearerProvider.mjs +48 -0
- package/dist/esm/environments.d.mts +26 -0
- package/dist/esm/environments.mjs +20 -0
- package/dist/esm/errors/CortiError.d.mts +15 -0
- package/dist/esm/errors/CortiError.mjs +26 -0
- package/dist/esm/errors/CortiTimeoutError.d.mts +6 -0
- package/dist/esm/errors/CortiTimeoutError.mjs +9 -0
- package/dist/esm/errors/index.d.mts +2 -0
- package/dist/esm/errors/index.mjs +2 -0
- package/dist/esm/index.d.mts +14 -0
- package/dist/esm/index.mjs +15 -0
- package/dist/esm/version.d.mts +1 -0
- package/dist/esm/version.mjs +1 -0
- package/package.json +71 -0
- package/reference.md +1726 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type AuthGetTokenRequest } from "./AuthGetTokenRequest.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./GetTokenResponse.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./GetTokenResponse.mjs";
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments.mjs";
|
|
5
|
+
import * as core from "../../../../core/index.mjs";
|
|
6
|
+
import * as Corti from "../../../index.mjs";
|
|
7
|
+
export declare namespace Documents {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment: core.Supplier<environments.CortiEnvironment | environments.CortiEnvironmentUrls>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
+
/** Override the Tenant-Name header */
|
|
14
|
+
tenantName: core.Supplier<string>;
|
|
15
|
+
/** Additional headers to include in requests. */
|
|
16
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
17
|
+
}
|
|
18
|
+
interface RequestOptions {
|
|
19
|
+
/** The maximum time to wait for a response in seconds. */
|
|
20
|
+
timeoutInSeconds?: number;
|
|
21
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
22
|
+
maxRetries?: number;
|
|
23
|
+
/** A hook to abort the request. */
|
|
24
|
+
abortSignal?: AbortSignal;
|
|
25
|
+
/** Override the Tenant-Name header */
|
|
26
|
+
tenantName?: string;
|
|
27
|
+
/** Additional headers to include in the request. */
|
|
28
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export declare class Documents {
|
|
32
|
+
protected readonly _options: Documents.Options;
|
|
33
|
+
constructor(_options: Documents.Options);
|
|
34
|
+
/**
|
|
35
|
+
* List Documents
|
|
36
|
+
*
|
|
37
|
+
* @param {Corti.Uuid} id - The interaction ID representing the context for the request. Must be a valid UUID.
|
|
38
|
+
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
|
+
*
|
|
40
|
+
* @throws {@link Corti.BadRequestError}
|
|
41
|
+
* @throws {@link Corti.ForbiddenError}
|
|
42
|
+
* @throws {@link Corti.InternalServerError}
|
|
43
|
+
* @throws {@link Corti.GatewayTimeoutError}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* await client.documents.list("f47ac10b-58cc-4372-a567-0e02b2c3d479")
|
|
47
|
+
*/
|
|
48
|
+
list(id: Corti.Uuid, requestOptions?: Documents.RequestOptions): core.HttpResponsePromise<Corti.ResponseDocumentList>;
|
|
49
|
+
private __list;
|
|
50
|
+
/**
|
|
51
|
+
* Generate Document.
|
|
52
|
+
*
|
|
53
|
+
* @param {Corti.Uuid} id - The interaction ID representing the context for the request. Must be a valid UUID.
|
|
54
|
+
* @param {Corti.RequestDocumentCreate} request
|
|
55
|
+
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
|
+
*
|
|
57
|
+
* @throws {@link Corti.BadRequestError}
|
|
58
|
+
* @throws {@link Corti.ForbiddenError}
|
|
59
|
+
* @throws {@link Corti.InternalServerError}
|
|
60
|
+
* @throws {@link Corti.GatewayTimeoutError}
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* await client.documents.create("f47ac10b-58cc-4372-a567-0e02b2c3d479", {
|
|
64
|
+
* context: [{
|
|
65
|
+
* type: "facts",
|
|
66
|
+
* data: [{
|
|
67
|
+
* text: "text",
|
|
68
|
+
* source: "core"
|
|
69
|
+
* }]
|
|
70
|
+
* }],
|
|
71
|
+
* templateKey: "templateKey",
|
|
72
|
+
* outputLanguage: "outputLanguage"
|
|
73
|
+
* })
|
|
74
|
+
*/
|
|
75
|
+
create(id: Corti.Uuid, request: Corti.RequestDocumentCreate, requestOptions?: Documents.RequestOptions): core.HttpResponsePromise<Corti.ResponseDocumentRead>;
|
|
76
|
+
private __create;
|
|
77
|
+
/**
|
|
78
|
+
* Get Document.
|
|
79
|
+
*
|
|
80
|
+
* @param {Corti.Uuid} id - The interaction ID representing the context for the request. Must be a valid UUID.
|
|
81
|
+
* @param {Corti.Uuid} documentId - The document ID representing the context for the request. Must be a valid UUID.
|
|
82
|
+
* @param {Corti.DocumentsGetRequest} request
|
|
83
|
+
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
84
|
+
*
|
|
85
|
+
* @throws {@link Corti.BadRequestError}
|
|
86
|
+
* @throws {@link Corti.ForbiddenError}
|
|
87
|
+
* @throws {@link Corti.InternalServerError}
|
|
88
|
+
* @throws {@link Corti.GatewayTimeoutError}
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* await client.documents.get("f47ac10b-58cc-4372-a567-0e02b2c3d479", "f47ac10b-58cc-4372-a567-0e02b2c3d479")
|
|
92
|
+
*/
|
|
93
|
+
get(id: Corti.Uuid, documentId: Corti.Uuid, request?: Corti.DocumentsGetRequest, requestOptions?: Documents.RequestOptions): core.HttpResponsePromise<Corti.ResponseDocumentRead>;
|
|
94
|
+
private __get;
|
|
95
|
+
/**
|
|
96
|
+
* @param {Corti.Uuid} id - The interaction ID representing the context for the request. Must be a valid UUID.
|
|
97
|
+
* @param {Corti.Uuid} documentId - The document ID representing the context for the request. Must be a valid UUID.
|
|
98
|
+
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
99
|
+
*
|
|
100
|
+
* @throws {@link Corti.ForbiddenError}
|
|
101
|
+
* @throws {@link Corti.NotFoundError}
|
|
102
|
+
* @throws {@link Corti.InternalServerError}
|
|
103
|
+
* @throws {@link Corti.GatewayTimeoutError}
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* await client.documents.delete("f47ac10b-58cc-4372-a567-0e02b2c3d479", "f47ac10b-58cc-4372-a567-0e02b2c3d479")
|
|
107
|
+
*/
|
|
108
|
+
delete(id: Corti.Uuid, documentId: Corti.Uuid, requestOptions?: Documents.RequestOptions): core.HttpResponsePromise<void>;
|
|
109
|
+
private __delete;
|
|
110
|
+
/**
|
|
111
|
+
* @param {Corti.Uuid} id - The interaction ID representing the context for the request. Must be a valid UUID.
|
|
112
|
+
* @param {Corti.Uuid} documentId - The document ID representing the context for the request. Must be a valid UUID.
|
|
113
|
+
* @param {Corti.RequestDocumentUpdate} request
|
|
114
|
+
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
115
|
+
*
|
|
116
|
+
* @throws {@link Corti.BadRequestError}
|
|
117
|
+
* @throws {@link Corti.ForbiddenError}
|
|
118
|
+
* @throws {@link Corti.InternalServerError}
|
|
119
|
+
* @throws {@link Corti.GatewayTimeoutError}
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* await client.documents.update("f47ac10b-58cc-4372-a567-0e02b2c3d479", "f47ac10b-58cc-4372-a567-0e02b2c3d479")
|
|
123
|
+
*/
|
|
124
|
+
update(id: Corti.Uuid, documentId: Corti.Uuid, request?: Corti.RequestDocumentUpdate, requestOptions?: Documents.RequestOptions): core.HttpResponsePromise<Corti.ResponseDocumentRead>;
|
|
125
|
+
private __update;
|
|
126
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
127
|
+
}
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
import * as core from "../../../../core/index.mjs";
|
|
14
|
+
import * as Corti from "../../../index.mjs";
|
|
15
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
16
|
+
import urlJoin from "url-join";
|
|
17
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
18
|
+
export class Documents {
|
|
19
|
+
constructor(_options) {
|
|
20
|
+
this._options = _options;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* List Documents
|
|
24
|
+
*
|
|
25
|
+
* @param {Corti.Uuid} id - The interaction ID representing the context for the request. Must be a valid UUID.
|
|
26
|
+
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
+
*
|
|
28
|
+
* @throws {@link Corti.BadRequestError}
|
|
29
|
+
* @throws {@link Corti.ForbiddenError}
|
|
30
|
+
* @throws {@link Corti.InternalServerError}
|
|
31
|
+
* @throws {@link Corti.GatewayTimeoutError}
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* await client.documents.list("f47ac10b-58cc-4372-a567-0e02b2c3d479")
|
|
35
|
+
*/
|
|
36
|
+
list(id, requestOptions) {
|
|
37
|
+
return core.HttpResponsePromise.fromPromise(this.__list(id, requestOptions));
|
|
38
|
+
}
|
|
39
|
+
__list(id, requestOptions) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
var _a, _b;
|
|
42
|
+
const _response = yield core.fetcher({
|
|
43
|
+
url: urlJoin((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)).base, `interactions/${encodeURIComponent(id)}/documents/`),
|
|
44
|
+
method: "GET",
|
|
45
|
+
headers: mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({
|
|
46
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
47
|
+
"Tenant-Name": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName,
|
|
48
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
49
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
50
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
51
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
52
|
+
});
|
|
53
|
+
if (_response.ok) {
|
|
54
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
55
|
+
}
|
|
56
|
+
if (_response.error.reason === "status-code") {
|
|
57
|
+
switch (_response.error.statusCode) {
|
|
58
|
+
case 400:
|
|
59
|
+
throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
|
|
60
|
+
case 403:
|
|
61
|
+
throw new Corti.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
62
|
+
case 500:
|
|
63
|
+
throw new Corti.InternalServerError(_response.error.body, _response.rawResponse);
|
|
64
|
+
case 504:
|
|
65
|
+
throw new Corti.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
66
|
+
default:
|
|
67
|
+
throw new errors.CortiError({
|
|
68
|
+
statusCode: _response.error.statusCode,
|
|
69
|
+
body: _response.error.body,
|
|
70
|
+
rawResponse: _response.rawResponse,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
switch (_response.error.reason) {
|
|
75
|
+
case "non-json":
|
|
76
|
+
throw new errors.CortiError({
|
|
77
|
+
statusCode: _response.error.statusCode,
|
|
78
|
+
body: _response.error.rawBody,
|
|
79
|
+
rawResponse: _response.rawResponse,
|
|
80
|
+
});
|
|
81
|
+
case "timeout":
|
|
82
|
+
throw new errors.CortiTimeoutError("Timeout exceeded when calling GET /interactions/{id}/documents/.");
|
|
83
|
+
case "unknown":
|
|
84
|
+
throw new errors.CortiError({
|
|
85
|
+
message: _response.error.errorMessage,
|
|
86
|
+
rawResponse: _response.rawResponse,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Generate Document.
|
|
93
|
+
*
|
|
94
|
+
* @param {Corti.Uuid} id - The interaction ID representing the context for the request. Must be a valid UUID.
|
|
95
|
+
* @param {Corti.RequestDocumentCreate} request
|
|
96
|
+
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
97
|
+
*
|
|
98
|
+
* @throws {@link Corti.BadRequestError}
|
|
99
|
+
* @throws {@link Corti.ForbiddenError}
|
|
100
|
+
* @throws {@link Corti.InternalServerError}
|
|
101
|
+
* @throws {@link Corti.GatewayTimeoutError}
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* await client.documents.create("f47ac10b-58cc-4372-a567-0e02b2c3d479", {
|
|
105
|
+
* context: [{
|
|
106
|
+
* type: "facts",
|
|
107
|
+
* data: [{
|
|
108
|
+
* text: "text",
|
|
109
|
+
* source: "core"
|
|
110
|
+
* }]
|
|
111
|
+
* }],
|
|
112
|
+
* templateKey: "templateKey",
|
|
113
|
+
* outputLanguage: "outputLanguage"
|
|
114
|
+
* })
|
|
115
|
+
*/
|
|
116
|
+
create(id, request, requestOptions) {
|
|
117
|
+
return core.HttpResponsePromise.fromPromise(this.__create(id, request, requestOptions));
|
|
118
|
+
}
|
|
119
|
+
__create(id, request, requestOptions) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
var _a, _b;
|
|
122
|
+
const _response = yield core.fetcher({
|
|
123
|
+
url: urlJoin((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)).base, `interactions/${encodeURIComponent(id)}/documents/`),
|
|
124
|
+
method: "POST",
|
|
125
|
+
headers: mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({
|
|
126
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
127
|
+
"Tenant-Name": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName,
|
|
128
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
129
|
+
contentType: "application/json",
|
|
130
|
+
requestType: "json",
|
|
131
|
+
body: request,
|
|
132
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
133
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
134
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
135
|
+
});
|
|
136
|
+
if (_response.ok) {
|
|
137
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
138
|
+
}
|
|
139
|
+
if (_response.error.reason === "status-code") {
|
|
140
|
+
switch (_response.error.statusCode) {
|
|
141
|
+
case 400:
|
|
142
|
+
throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
|
|
143
|
+
case 403:
|
|
144
|
+
throw new Corti.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
145
|
+
case 500:
|
|
146
|
+
throw new Corti.InternalServerError(_response.error.body, _response.rawResponse);
|
|
147
|
+
case 504:
|
|
148
|
+
throw new Corti.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
149
|
+
default:
|
|
150
|
+
throw new errors.CortiError({
|
|
151
|
+
statusCode: _response.error.statusCode,
|
|
152
|
+
body: _response.error.body,
|
|
153
|
+
rawResponse: _response.rawResponse,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
switch (_response.error.reason) {
|
|
158
|
+
case "non-json":
|
|
159
|
+
throw new errors.CortiError({
|
|
160
|
+
statusCode: _response.error.statusCode,
|
|
161
|
+
body: _response.error.rawBody,
|
|
162
|
+
rawResponse: _response.rawResponse,
|
|
163
|
+
});
|
|
164
|
+
case "timeout":
|
|
165
|
+
throw new errors.CortiTimeoutError("Timeout exceeded when calling POST /interactions/{id}/documents/.");
|
|
166
|
+
case "unknown":
|
|
167
|
+
throw new errors.CortiError({
|
|
168
|
+
message: _response.error.errorMessage,
|
|
169
|
+
rawResponse: _response.rawResponse,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Get Document.
|
|
176
|
+
*
|
|
177
|
+
* @param {Corti.Uuid} id - The interaction ID representing the context for the request. Must be a valid UUID.
|
|
178
|
+
* @param {Corti.Uuid} documentId - The document ID representing the context for the request. Must be a valid UUID.
|
|
179
|
+
* @param {Corti.DocumentsGetRequest} request
|
|
180
|
+
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
181
|
+
*
|
|
182
|
+
* @throws {@link Corti.BadRequestError}
|
|
183
|
+
* @throws {@link Corti.ForbiddenError}
|
|
184
|
+
* @throws {@link Corti.InternalServerError}
|
|
185
|
+
* @throws {@link Corti.GatewayTimeoutError}
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* await client.documents.get("f47ac10b-58cc-4372-a567-0e02b2c3d479", "f47ac10b-58cc-4372-a567-0e02b2c3d479")
|
|
189
|
+
*/
|
|
190
|
+
get(id, documentId, request = {}, requestOptions) {
|
|
191
|
+
return core.HttpResponsePromise.fromPromise(this.__get(id, documentId, request, requestOptions));
|
|
192
|
+
}
|
|
193
|
+
__get(id_1, documentId_1) {
|
|
194
|
+
return __awaiter(this, arguments, void 0, function* (id, documentId, request = {}, requestOptions) {
|
|
195
|
+
var _a, _b;
|
|
196
|
+
const { context } = request;
|
|
197
|
+
const _queryParams = {};
|
|
198
|
+
if (context != null) {
|
|
199
|
+
_queryParams["context"] = context.toString();
|
|
200
|
+
}
|
|
201
|
+
const _response = yield core.fetcher({
|
|
202
|
+
url: urlJoin((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)).base, `interactions/${encodeURIComponent(id)}/documents/${encodeURIComponent(documentId)}`),
|
|
203
|
+
method: "GET",
|
|
204
|
+
headers: mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({
|
|
205
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
206
|
+
"Tenant-Name": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName,
|
|
207
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
208
|
+
queryParameters: _queryParams,
|
|
209
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
210
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
211
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
212
|
+
});
|
|
213
|
+
if (_response.ok) {
|
|
214
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
215
|
+
}
|
|
216
|
+
if (_response.error.reason === "status-code") {
|
|
217
|
+
switch (_response.error.statusCode) {
|
|
218
|
+
case 400:
|
|
219
|
+
throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
|
|
220
|
+
case 403:
|
|
221
|
+
throw new Corti.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
222
|
+
case 500:
|
|
223
|
+
throw new Corti.InternalServerError(_response.error.body, _response.rawResponse);
|
|
224
|
+
case 504:
|
|
225
|
+
throw new Corti.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
226
|
+
default:
|
|
227
|
+
throw new errors.CortiError({
|
|
228
|
+
statusCode: _response.error.statusCode,
|
|
229
|
+
body: _response.error.body,
|
|
230
|
+
rawResponse: _response.rawResponse,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
switch (_response.error.reason) {
|
|
235
|
+
case "non-json":
|
|
236
|
+
throw new errors.CortiError({
|
|
237
|
+
statusCode: _response.error.statusCode,
|
|
238
|
+
body: _response.error.rawBody,
|
|
239
|
+
rawResponse: _response.rawResponse,
|
|
240
|
+
});
|
|
241
|
+
case "timeout":
|
|
242
|
+
throw new errors.CortiTimeoutError("Timeout exceeded when calling GET /interactions/{id}/documents/{documentId}.");
|
|
243
|
+
case "unknown":
|
|
244
|
+
throw new errors.CortiError({
|
|
245
|
+
message: _response.error.errorMessage,
|
|
246
|
+
rawResponse: _response.rawResponse,
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* @param {Corti.Uuid} id - The interaction ID representing the context for the request. Must be a valid UUID.
|
|
253
|
+
* @param {Corti.Uuid} documentId - The document ID representing the context for the request. Must be a valid UUID.
|
|
254
|
+
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
255
|
+
*
|
|
256
|
+
* @throws {@link Corti.ForbiddenError}
|
|
257
|
+
* @throws {@link Corti.NotFoundError}
|
|
258
|
+
* @throws {@link Corti.InternalServerError}
|
|
259
|
+
* @throws {@link Corti.GatewayTimeoutError}
|
|
260
|
+
*
|
|
261
|
+
* @example
|
|
262
|
+
* await client.documents.delete("f47ac10b-58cc-4372-a567-0e02b2c3d479", "f47ac10b-58cc-4372-a567-0e02b2c3d479")
|
|
263
|
+
*/
|
|
264
|
+
delete(id, documentId, requestOptions) {
|
|
265
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(id, documentId, requestOptions));
|
|
266
|
+
}
|
|
267
|
+
__delete(id, documentId, requestOptions) {
|
|
268
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
269
|
+
var _a, _b;
|
|
270
|
+
const _response = yield core.fetcher({
|
|
271
|
+
url: urlJoin((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)).base, `interactions/${encodeURIComponent(id)}/documents/${encodeURIComponent(documentId)}`),
|
|
272
|
+
method: "DELETE",
|
|
273
|
+
headers: mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({
|
|
274
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
275
|
+
"Tenant-Name": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName,
|
|
276
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
277
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
278
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
279
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
280
|
+
});
|
|
281
|
+
if (_response.ok) {
|
|
282
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
283
|
+
}
|
|
284
|
+
if (_response.error.reason === "status-code") {
|
|
285
|
+
switch (_response.error.statusCode) {
|
|
286
|
+
case 403:
|
|
287
|
+
throw new Corti.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
288
|
+
case 404:
|
|
289
|
+
throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
|
|
290
|
+
case 500:
|
|
291
|
+
throw new Corti.InternalServerError(_response.error.body, _response.rawResponse);
|
|
292
|
+
case 504:
|
|
293
|
+
throw new Corti.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
294
|
+
default:
|
|
295
|
+
throw new errors.CortiError({
|
|
296
|
+
statusCode: _response.error.statusCode,
|
|
297
|
+
body: _response.error.body,
|
|
298
|
+
rawResponse: _response.rawResponse,
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
switch (_response.error.reason) {
|
|
303
|
+
case "non-json":
|
|
304
|
+
throw new errors.CortiError({
|
|
305
|
+
statusCode: _response.error.statusCode,
|
|
306
|
+
body: _response.error.rawBody,
|
|
307
|
+
rawResponse: _response.rawResponse,
|
|
308
|
+
});
|
|
309
|
+
case "timeout":
|
|
310
|
+
throw new errors.CortiTimeoutError("Timeout exceeded when calling DELETE /interactions/{id}/documents/{documentId}.");
|
|
311
|
+
case "unknown":
|
|
312
|
+
throw new errors.CortiError({
|
|
313
|
+
message: _response.error.errorMessage,
|
|
314
|
+
rawResponse: _response.rawResponse,
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* @param {Corti.Uuid} id - The interaction ID representing the context for the request. Must be a valid UUID.
|
|
321
|
+
* @param {Corti.Uuid} documentId - The document ID representing the context for the request. Must be a valid UUID.
|
|
322
|
+
* @param {Corti.RequestDocumentUpdate} request
|
|
323
|
+
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
324
|
+
*
|
|
325
|
+
* @throws {@link Corti.BadRequestError}
|
|
326
|
+
* @throws {@link Corti.ForbiddenError}
|
|
327
|
+
* @throws {@link Corti.InternalServerError}
|
|
328
|
+
* @throws {@link Corti.GatewayTimeoutError}
|
|
329
|
+
*
|
|
330
|
+
* @example
|
|
331
|
+
* await client.documents.update("f47ac10b-58cc-4372-a567-0e02b2c3d479", "f47ac10b-58cc-4372-a567-0e02b2c3d479")
|
|
332
|
+
*/
|
|
333
|
+
update(id, documentId, request = {}, requestOptions) {
|
|
334
|
+
return core.HttpResponsePromise.fromPromise(this.__update(id, documentId, request, requestOptions));
|
|
335
|
+
}
|
|
336
|
+
__update(id_1, documentId_1) {
|
|
337
|
+
return __awaiter(this, arguments, void 0, function* (id, documentId, request = {}, requestOptions) {
|
|
338
|
+
var _a, _b;
|
|
339
|
+
const _response = yield core.fetcher({
|
|
340
|
+
url: urlJoin((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)).base, `interactions/${encodeURIComponent(id)}/documents/${encodeURIComponent(documentId)}`),
|
|
341
|
+
method: "PATCH",
|
|
342
|
+
headers: mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({
|
|
343
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
344
|
+
"Tenant-Name": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName,
|
|
345
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
346
|
+
contentType: "application/json",
|
|
347
|
+
requestType: "json",
|
|
348
|
+
body: request,
|
|
349
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
350
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
351
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
352
|
+
});
|
|
353
|
+
if (_response.ok) {
|
|
354
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
355
|
+
}
|
|
356
|
+
if (_response.error.reason === "status-code") {
|
|
357
|
+
switch (_response.error.statusCode) {
|
|
358
|
+
case 400:
|
|
359
|
+
throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
|
|
360
|
+
case 403:
|
|
361
|
+
throw new Corti.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
362
|
+
case 500:
|
|
363
|
+
throw new Corti.InternalServerError(_response.error.body, _response.rawResponse);
|
|
364
|
+
case 504:
|
|
365
|
+
throw new Corti.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
366
|
+
default:
|
|
367
|
+
throw new errors.CortiError({
|
|
368
|
+
statusCode: _response.error.statusCode,
|
|
369
|
+
body: _response.error.body,
|
|
370
|
+
rawResponse: _response.rawResponse,
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
switch (_response.error.reason) {
|
|
375
|
+
case "non-json":
|
|
376
|
+
throw new errors.CortiError({
|
|
377
|
+
statusCode: _response.error.statusCode,
|
|
378
|
+
body: _response.error.rawBody,
|
|
379
|
+
rawResponse: _response.rawResponse,
|
|
380
|
+
});
|
|
381
|
+
case "timeout":
|
|
382
|
+
throw new errors.CortiTimeoutError("Timeout exceeded when calling PATCH /interactions/{id}/documents/{documentId}.");
|
|
383
|
+
case "unknown":
|
|
384
|
+
throw new errors.CortiError({
|
|
385
|
+
message: _response.error.errorMessage,
|
|
386
|
+
rawResponse: _response.rawResponse,
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
_getAuthorizationHeader() {
|
|
392
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
393
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
394
|
+
if (bearer != null) {
|
|
395
|
+
return `Bearer ${bearer}`;
|
|
396
|
+
}
|
|
397
|
+
return undefined;
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {}
|
|
7
|
+
*/
|
|
8
|
+
export interface DocumentsGetRequest {
|
|
9
|
+
/**
|
|
10
|
+
* If true the response contains the context used to generated the document, such as fact, transcript or string.
|
|
11
|
+
*/
|
|
12
|
+
context?: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Corti from "../../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* context: [{
|
|
9
|
+
* type: "facts",
|
|
10
|
+
* data: [{
|
|
11
|
+
* text: "text",
|
|
12
|
+
* source: "core"
|
|
13
|
+
* }]
|
|
14
|
+
* }],
|
|
15
|
+
* templateKey: "templateKey",
|
|
16
|
+
* outputLanguage: "outputLanguage"
|
|
17
|
+
* }
|
|
18
|
+
*/
|
|
19
|
+
export interface RequestDocumentCreate {
|
|
20
|
+
/** An array of context objects. */
|
|
21
|
+
context: Corti.RequestDocumentCreateContextItem[];
|
|
22
|
+
/** The key of the template that informs on what kind of document is to be generated. */
|
|
23
|
+
templateKey: string;
|
|
24
|
+
/** Template details if the template should be generated during the request. */
|
|
25
|
+
template?: Corti.DocumentTemplate;
|
|
26
|
+
/** An optional name for the document. */
|
|
27
|
+
name?: string;
|
|
28
|
+
modelName?: string;
|
|
29
|
+
/** The language in which the document will be generated. Check https://docs.corti.ai/about/languages for more. */
|
|
30
|
+
outputLanguage: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Corti from "../../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {}
|
|
8
|
+
*/
|
|
9
|
+
export interface RequestDocumentUpdate {
|
|
10
|
+
/** An optional name for the document. */
|
|
11
|
+
name?: string;
|
|
12
|
+
sections?: Corti.RequestDocumentUpdateSectionsItem[];
|
|
13
|
+
}
|