@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,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is the custom implementation of the main CortiClient class (src/Client.ts)
|
|
3
|
+
*
|
|
4
|
+
* It's (almost) handwritten, and it replaces the auto-generated version, and here is why:
|
|
5
|
+
*
|
|
6
|
+
* 1. The auto-generated version uses direct client imports -> we can not always easily replace them without a patch in Main client
|
|
7
|
+
* 2. The auto-generated version produces TypeScript error when initializes authClient in `_oauthTokenProvider`
|
|
8
|
+
* 3. `_oauthTokenProvider` is a private field in the auto-generated version,
|
|
9
|
+
* so we cannot easily rewrite it in the custom implementation. We can use another field for OAuthProvider,
|
|
10
|
+
* but then we need to rewrite all the methods anyway => it will be easier to forget,
|
|
11
|
+
* since it would exist in the class, but not properly implemented
|
|
12
|
+
*
|
|
13
|
+
* => Must be manually synced with src/Client.ts (which is auto-generated).
|
|
14
|
+
*
|
|
15
|
+
* All the patches marked with `// Patch: ...` comments.
|
|
16
|
+
*/
|
|
17
|
+
import * as environments from "../environments.js";
|
|
18
|
+
import * as core from "../core/index.js";
|
|
19
|
+
import { Interactions } from "../api/resources/interactions/client/Client.js";
|
|
20
|
+
import { Recordings } from "../api/resources/recordings/client/Client.js";
|
|
21
|
+
import { Transcripts } from "../api/resources/transcripts/client/Client.js";
|
|
22
|
+
import { Facts } from "../api/resources/facts/client/Client.js";
|
|
23
|
+
import { Documents } from "../api/resources/documents/client/Client.js";
|
|
24
|
+
import { Templates } from "../api/resources/templates/client/Client.js";
|
|
25
|
+
/**
|
|
26
|
+
* Patch: changed import to custom Stream and Transcribe implementations
|
|
27
|
+
*/
|
|
28
|
+
import { Stream } from "./CustomStream.js";
|
|
29
|
+
import { Transcribe } from "./CustomTranscribe.js";
|
|
30
|
+
/**
|
|
31
|
+
* Patch: added custom RefreshBearerProvider
|
|
32
|
+
*/
|
|
33
|
+
import { BearerOptions } from "./RefreshBearerProvider.js";
|
|
34
|
+
export declare namespace CortiClient {
|
|
35
|
+
/**
|
|
36
|
+
* Patch: added new public interface for `Options` (+ `ClientCredentials` interface)
|
|
37
|
+
*/
|
|
38
|
+
interface ClientCredentials {
|
|
39
|
+
clientId: core.Supplier<string>;
|
|
40
|
+
clientSecret: core.Supplier<string>;
|
|
41
|
+
}
|
|
42
|
+
interface Options {
|
|
43
|
+
environment: core.Supplier<environments.CortiEnvironment | environments.CortiEnvironmentUrls>;
|
|
44
|
+
/** Override the Tenant-Name header */
|
|
45
|
+
tenantName: core.Supplier<string>;
|
|
46
|
+
/** Additional headers to include in requests. */
|
|
47
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
48
|
+
auth: ClientCredentials | BearerOptions;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Patch:
|
|
52
|
+
* - renamed `Options` to `InternalOptions`
|
|
53
|
+
* - added `token` field to support BearerProvider
|
|
54
|
+
* - made clientId and clientSecret optional
|
|
55
|
+
*/
|
|
56
|
+
interface InternalOptions {
|
|
57
|
+
environment: core.Supplier<environments.CortiEnvironment | environments.CortiEnvironmentUrls>;
|
|
58
|
+
/** Specify a custom URL to connect the client to. */
|
|
59
|
+
baseUrl?: core.Supplier<string>;
|
|
60
|
+
clientId?: core.Supplier<string>;
|
|
61
|
+
clientSecret?: core.Supplier<string>;
|
|
62
|
+
token?: core.Supplier<string>;
|
|
63
|
+
/** Override the Tenant-Name header */
|
|
64
|
+
tenantName: core.Supplier<string>;
|
|
65
|
+
/** Additional headers to include in requests. */
|
|
66
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
67
|
+
}
|
|
68
|
+
interface RequestOptions {
|
|
69
|
+
/** The maximum time to wait for a response in seconds. */
|
|
70
|
+
timeoutInSeconds?: number;
|
|
71
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
72
|
+
maxRetries?: number;
|
|
73
|
+
/** A hook to abort the request. */
|
|
74
|
+
abortSignal?: AbortSignal;
|
|
75
|
+
/** Override the Tenant-Name header */
|
|
76
|
+
tenantName?: string;
|
|
77
|
+
/** Additional headers to include in the request. */
|
|
78
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
export declare class CortiClient {
|
|
82
|
+
/**
|
|
83
|
+
* Patch: this._options is now of type `CortiClient.InternalOptions` (which matches generated implementation)
|
|
84
|
+
*/
|
|
85
|
+
protected readonly _options: CortiClient.InternalOptions;
|
|
86
|
+
/**
|
|
87
|
+
* Patch: extended `_oauthTokenProvider` to support both `RefreshBearerProvider` and `OAuthTokenProvider` options
|
|
88
|
+
*/
|
|
89
|
+
private readonly _oauthTokenProvider;
|
|
90
|
+
protected _interactions: Interactions | undefined;
|
|
91
|
+
protected _recordings: Recordings | undefined;
|
|
92
|
+
protected _transcripts: Transcripts | undefined;
|
|
93
|
+
protected _facts: Facts | undefined;
|
|
94
|
+
protected _templates: Templates | undefined;
|
|
95
|
+
protected _documents: Documents | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Patch: removed `auth` field
|
|
98
|
+
* `_oauthTokenProvider` uses Auth module directly to get the token,
|
|
99
|
+
* and our client also don't need to use it within the main client.
|
|
100
|
+
* For other cases they can use `CortiAuth` module directly.
|
|
101
|
+
*/
|
|
102
|
+
protected _stream: Stream | undefined;
|
|
103
|
+
protected _transcribe: Transcribe | undefined;
|
|
104
|
+
constructor(_options: CortiClient.Options);
|
|
105
|
+
get interactions(): Interactions;
|
|
106
|
+
get recordings(): Recordings;
|
|
107
|
+
get transcripts(): Transcripts;
|
|
108
|
+
get facts(): Facts;
|
|
109
|
+
get documents(): Documents;
|
|
110
|
+
get templates(): Templates;
|
|
111
|
+
get stream(): Stream;
|
|
112
|
+
get transcribe(): Transcribe;
|
|
113
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file is the custom implementation of the main CortiClient class (src/Client.ts)
|
|
4
|
+
*
|
|
5
|
+
* It's (almost) handwritten, and it replaces the auto-generated version, and here is why:
|
|
6
|
+
*
|
|
7
|
+
* 1. The auto-generated version uses direct client imports -> we can not always easily replace them without a patch in Main client
|
|
8
|
+
* 2. The auto-generated version produces TypeScript error when initializes authClient in `_oauthTokenProvider`
|
|
9
|
+
* 3. `_oauthTokenProvider` is a private field in the auto-generated version,
|
|
10
|
+
* so we cannot easily rewrite it in the custom implementation. We can use another field for OAuthProvider,
|
|
11
|
+
* but then we need to rewrite all the methods anyway => it will be easier to forget,
|
|
12
|
+
* since it would exist in the class, but not properly implemented
|
|
13
|
+
*
|
|
14
|
+
* => Must be manually synced with src/Client.ts (which is auto-generated).
|
|
15
|
+
*
|
|
16
|
+
* All the patches marked with `// Patch: ...` comments.
|
|
17
|
+
*/
|
|
18
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
19
|
+
if (k2 === undefined) k2 = k;
|
|
20
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
21
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
22
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
23
|
+
}
|
|
24
|
+
Object.defineProperty(o, k2, desc);
|
|
25
|
+
}) : (function(o, m, k, k2) {
|
|
26
|
+
if (k2 === undefined) k2 = k;
|
|
27
|
+
o[k2] = m[k];
|
|
28
|
+
}));
|
|
29
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
30
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
31
|
+
}) : function(o, v) {
|
|
32
|
+
o["default"] = v;
|
|
33
|
+
});
|
|
34
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
35
|
+
var ownKeys = function(o) {
|
|
36
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
37
|
+
var ar = [];
|
|
38
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
39
|
+
return ar;
|
|
40
|
+
};
|
|
41
|
+
return ownKeys(o);
|
|
42
|
+
};
|
|
43
|
+
return function (mod) {
|
|
44
|
+
if (mod && mod.__esModule) return mod;
|
|
45
|
+
var result = {};
|
|
46
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
47
|
+
__setModuleDefault(result, mod);
|
|
48
|
+
return result;
|
|
49
|
+
};
|
|
50
|
+
})();
|
|
51
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
52
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
53
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
54
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
55
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
56
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
57
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61
|
+
exports.CortiClient = void 0;
|
|
62
|
+
const core = __importStar(require("../core/index.js"));
|
|
63
|
+
/**
|
|
64
|
+
* Patch: changed import to custom Auth implementation
|
|
65
|
+
*/
|
|
66
|
+
const CortiAuth_js_1 = require("./CortiAuth.js");
|
|
67
|
+
const headers_js_1 = require("../core/headers.js");
|
|
68
|
+
const Client_js_1 = require("../api/resources/interactions/client/Client.js");
|
|
69
|
+
const Client_js_2 = require("../api/resources/recordings/client/Client.js");
|
|
70
|
+
const Client_js_3 = require("../api/resources/transcripts/client/Client.js");
|
|
71
|
+
const Client_js_4 = require("../api/resources/facts/client/Client.js");
|
|
72
|
+
const Client_js_5 = require("../api/resources/documents/client/Client.js");
|
|
73
|
+
const Client_js_6 = require("../api/resources/templates/client/Client.js");
|
|
74
|
+
/**
|
|
75
|
+
* Patch: changed import to custom Stream and Transcribe implementations
|
|
76
|
+
*/
|
|
77
|
+
const CustomStream_js_1 = require("./CustomStream.js");
|
|
78
|
+
const CustomTranscribe_js_1 = require("./CustomTranscribe.js");
|
|
79
|
+
/**
|
|
80
|
+
* Patch: added custom RefreshBearerProvider
|
|
81
|
+
*/
|
|
82
|
+
const RefreshBearerProvider_js_1 = require("./RefreshBearerProvider.js");
|
|
83
|
+
/**
|
|
84
|
+
* Patch: added SDK_VERSION import
|
|
85
|
+
*/
|
|
86
|
+
const version_js_1 = require("../version.js");
|
|
87
|
+
class CortiClient {
|
|
88
|
+
constructor(_options) {
|
|
89
|
+
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
90
|
+
"Tenant-Name": _options === null || _options === void 0 ? void 0 : _options.tenantName,
|
|
91
|
+
"X-Fern-Language": "JavaScript",
|
|
92
|
+
"X-Fern-SDK-Name": "@corti/sdk",
|
|
93
|
+
/**
|
|
94
|
+
* Patch: replaced hardcoded SDK version with imported one
|
|
95
|
+
*/
|
|
96
|
+
"X-Fern-SDK-Version": version_js_1.SDK_VERSION,
|
|
97
|
+
"User-Agent": `@corti/sdk/${version_js_1.SDK_VERSION}`,
|
|
98
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
99
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
100
|
+
}, _options === null || _options === void 0 ? void 0 : _options.headers), clientId: "clientId" in _options.auth ? _options.auth.clientId : undefined, clientSecret: "clientSecret" in _options.auth ? _options.auth.clientSecret : undefined, token: "access_token" in _options.auth ? _options.auth.access_token : undefined });
|
|
101
|
+
/**
|
|
102
|
+
* Patch: if `accessToken` is provided, use BearerProvider, otherwise use OAuthTokenProvider
|
|
103
|
+
*/
|
|
104
|
+
this._oauthTokenProvider = "access_token" in _options.auth ?
|
|
105
|
+
new RefreshBearerProvider_js_1.RefreshBearerProvider(_options.auth) :
|
|
106
|
+
new core.OAuthTokenProvider({
|
|
107
|
+
clientId: _options.auth.clientId,
|
|
108
|
+
clientSecret: _options.auth.clientSecret,
|
|
109
|
+
/**
|
|
110
|
+
* Patch: provide whole `options` object to the Auth client, since it depends on both tenantName and environment
|
|
111
|
+
*/
|
|
112
|
+
authClient: new CortiAuth_js_1.Auth(this._options),
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
get interactions() {
|
|
116
|
+
var _a;
|
|
117
|
+
return ((_a = this._interactions) !== null && _a !== void 0 ? _a : (this._interactions = new Client_js_1.Interactions(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
|
|
118
|
+
}
|
|
119
|
+
get recordings() {
|
|
120
|
+
var _a;
|
|
121
|
+
return ((_a = this._recordings) !== null && _a !== void 0 ? _a : (this._recordings = new Client_js_2.Recordings(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
|
|
122
|
+
}
|
|
123
|
+
get transcripts() {
|
|
124
|
+
var _a;
|
|
125
|
+
return ((_a = this._transcripts) !== null && _a !== void 0 ? _a : (this._transcripts = new Client_js_3.Transcripts(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
|
|
126
|
+
}
|
|
127
|
+
get facts() {
|
|
128
|
+
var _a;
|
|
129
|
+
return ((_a = this._facts) !== null && _a !== void 0 ? _a : (this._facts = new Client_js_4.Facts(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
|
|
130
|
+
}
|
|
131
|
+
get documents() {
|
|
132
|
+
var _a;
|
|
133
|
+
return ((_a = this._documents) !== null && _a !== void 0 ? _a : (this._documents = new Client_js_5.Documents(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
|
|
134
|
+
}
|
|
135
|
+
get templates() {
|
|
136
|
+
var _a;
|
|
137
|
+
return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_js_6.Templates(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
|
|
138
|
+
}
|
|
139
|
+
get stream() {
|
|
140
|
+
var _a;
|
|
141
|
+
return ((_a = this._stream) !== null && _a !== void 0 ? _a : (this._stream = new CustomStream_js_1.Stream(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
|
|
142
|
+
}
|
|
143
|
+
get transcribe() {
|
|
144
|
+
var _a;
|
|
145
|
+
return ((_a = this._transcribe) !== null && _a !== void 0 ? _a : (this._transcribe = new CustomTranscribe_js_1.Transcribe(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
exports.CortiClient = CortiClient;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Patch: use custom Stream implementation to support passing _options parameters to connection function
|
|
3
|
+
*/
|
|
4
|
+
import { Stream as FernStream } from "../api/resources/stream/client/Client.js";
|
|
5
|
+
/**
|
|
6
|
+
* Patch: changed import to custom StreamSocket implementation
|
|
7
|
+
*/
|
|
8
|
+
import { StreamSocket } from "./CustomStreamSocket.js";
|
|
9
|
+
export declare class Stream extends FernStream {
|
|
10
|
+
connect(args: Omit<FernStream.ConnectArgs, 'token' | 'tenant-name'>): Promise<StreamSocket>;
|
|
11
|
+
/**
|
|
12
|
+
* Patch: temporary fix of WS URL generation, while it doesn't work from Ferns side
|
|
13
|
+
*/
|
|
14
|
+
private __connect_patch;
|
|
15
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.Stream = void 0;
|
|
46
|
+
/**
|
|
47
|
+
* Patch: use custom Stream implementation to support passing _options parameters to connection function
|
|
48
|
+
*/
|
|
49
|
+
const Client_js_1 = require("../api/resources/stream/client/Client.js");
|
|
50
|
+
const core = __importStar(require("../core/index.js"));
|
|
51
|
+
/**
|
|
52
|
+
* Patch: changed import to custom StreamSocket implementation
|
|
53
|
+
*/
|
|
54
|
+
const CustomStreamSocket_js_1 = require("./CustomStreamSocket.js");
|
|
55
|
+
const qs = __importStar(require("qs"));
|
|
56
|
+
class Stream extends Client_js_1.Stream {
|
|
57
|
+
connect(args) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
return this.__connect_patch(Object.assign(Object.assign({}, args), { token: yield this._getAuthorizationHeader(), "tenant-name": yield core.Supplier.get(this._options.tenantName) }));
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Patch: temporary fix of WS URL generation, while it doesn't work from Ferns side
|
|
64
|
+
*/
|
|
65
|
+
__connect_patch(args) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
var _a, _b, _c;
|
|
68
|
+
const queryParams = {};
|
|
69
|
+
if (args["tenant-name"] != null) {
|
|
70
|
+
queryParams["tenant-name"] = args["tenant-name"];
|
|
71
|
+
}
|
|
72
|
+
if (args["token"] != null) {
|
|
73
|
+
queryParams["token"] = args["token"];
|
|
74
|
+
}
|
|
75
|
+
let websocketHeaders = {};
|
|
76
|
+
websocketHeaders = Object.assign(Object.assign({}, websocketHeaders), args["headers"]);
|
|
77
|
+
const socket = new core.ReconnectingWebSocket(`${(_a = (yield core.Supplier.get(this._options["baseUrl"]))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options["environment"])).wss}/audio-bridge/v2/interactions/${encodeURIComponent(args["id"])}/streams?${qs.stringify(queryParams, { arrayFormat: "repeat" })}`, [], { debug: (_b = args["debug"]) !== null && _b !== void 0 ? _b : false, maxRetries: (_c = args["reconnectAttempts"]) !== null && _c !== void 0 ? _c : 30 }, websocketHeaders);
|
|
78
|
+
return new CustomStreamSocket_js_1.StreamSocket({ socket });
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.Stream = Stream;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Patch: file patches disability of auto-generating binary data methods for sending data to the socket
|
|
3
|
+
*/
|
|
4
|
+
import { StreamSocket as FernStreamSocket } from '../api/resources/stream/client/Socket.js';
|
|
5
|
+
export declare class StreamSocket extends FernStreamSocket {
|
|
6
|
+
sendAudio(message: ArrayBuffer | string): void;
|
|
7
|
+
/**
|
|
8
|
+
* Patch: have to repeat this method, because it is private in the base class
|
|
9
|
+
*/
|
|
10
|
+
private __assertSocketIsOpen;
|
|
11
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.StreamSocket = void 0;
|
|
37
|
+
/**
|
|
38
|
+
* Patch: file patches disability of auto-generating binary data methods for sending data to the socket
|
|
39
|
+
*/
|
|
40
|
+
const Socket_js_1 = require("../api/resources/stream/client/Socket.js");
|
|
41
|
+
const core = __importStar(require("../core/index.js"));
|
|
42
|
+
class StreamSocket extends Socket_js_1.StreamSocket {
|
|
43
|
+
sendAudio(message) {
|
|
44
|
+
if (typeof message === 'string') {
|
|
45
|
+
return super.sendAudio(message);
|
|
46
|
+
}
|
|
47
|
+
this.__assertSocketIsOpen();
|
|
48
|
+
this.socket.send(message);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Patch: have to repeat this method, because it is private in the base class
|
|
52
|
+
*/
|
|
53
|
+
__assertSocketIsOpen() {
|
|
54
|
+
if (!this.socket) {
|
|
55
|
+
throw new Error("Socket is not connected.");
|
|
56
|
+
}
|
|
57
|
+
if (this.socket.readyState !== core.ReconnectingWebSocket.OPEN) {
|
|
58
|
+
throw new Error("Socket is not open.");
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.StreamSocket = StreamSocket;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Patch: use custom Transcribe implementation to support passing _options parameters to connection function
|
|
3
|
+
*/
|
|
4
|
+
import { Transcribe as FernTranscribe } from "../api/resources/transcribe/client/Client.js";
|
|
5
|
+
/**
|
|
6
|
+
* Patch: changed import to custom TranscribeSocket implementation
|
|
7
|
+
*/
|
|
8
|
+
import { TranscribeSocket } from "./CustomTranscribeSocket.js";
|
|
9
|
+
export declare class Transcribe extends FernTranscribe {
|
|
10
|
+
connect(args?: Omit<FernTranscribe.ConnectArgs, 'token' | 'tenant-name'>): Promise<TranscribeSocket>;
|
|
11
|
+
/**
|
|
12
|
+
* Patch: temporary fix of WS generation, while binary type isn't supported from Ferns side
|
|
13
|
+
*/
|
|
14
|
+
private __connect_patch;
|
|
15
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.Transcribe = void 0;
|
|
46
|
+
/**
|
|
47
|
+
* Patch: use custom Transcribe implementation to support passing _options parameters to connection function
|
|
48
|
+
*/
|
|
49
|
+
const Client_js_1 = require("../api/resources/transcribe/client/Client.js");
|
|
50
|
+
const core = __importStar(require("../core/index.js"));
|
|
51
|
+
/**
|
|
52
|
+
* Patch: changed import to custom TranscribeSocket implementation
|
|
53
|
+
*/
|
|
54
|
+
const CustomTranscribeSocket_js_1 = require("./CustomTranscribeSocket.js");
|
|
55
|
+
const qs = __importStar(require("qs"));
|
|
56
|
+
class Transcribe extends Client_js_1.Transcribe {
|
|
57
|
+
connect() {
|
|
58
|
+
return __awaiter(this, arguments, void 0, function* (args = {}) {
|
|
59
|
+
return this.__connect_patch(Object.assign(Object.assign({}, args), { token: yield this._getAuthorizationHeader(), "tenant-name": yield core.Supplier.get(this._options.tenantName) }));
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Patch: temporary fix of WS generation, while binary type isn't supported from Ferns side
|
|
64
|
+
*/
|
|
65
|
+
__connect_patch(args) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
var _a, _b, _c;
|
|
68
|
+
const queryParams = {};
|
|
69
|
+
if (args["tenant-name"] != null) {
|
|
70
|
+
queryParams["tenant-name"] = args["tenant-name"];
|
|
71
|
+
}
|
|
72
|
+
if (args["token"] != null) {
|
|
73
|
+
queryParams["token"] = args["token"];
|
|
74
|
+
}
|
|
75
|
+
let websocketHeaders = {};
|
|
76
|
+
websocketHeaders = Object.assign(Object.assign({}, websocketHeaders), args["headers"]);
|
|
77
|
+
const socket = new core.ReconnectingWebSocket(`${(_a = (yield core.Supplier.get(this._options["baseUrl"]))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options["environment"])).wss}/audio-bridge/v2/transcribe?${qs.stringify(queryParams, { arrayFormat: "repeat" })}`, [], { debug: (_b = args["debug"]) !== null && _b !== void 0 ? _b : false, maxRetries: (_c = args["reconnectAttempts"]) !== null && _c !== void 0 ? _c : 30 }, websocketHeaders);
|
|
78
|
+
return new CustomTranscribeSocket_js_1.TranscribeSocket({ socket });
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.Transcribe = Transcribe;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Patch: file patches disability of auto-generating binary data methods for sending data to the socket
|
|
3
|
+
*/
|
|
4
|
+
import { TranscribeSocket as FernTranscribeSocket } from '../api/resources/transcribe/client/Socket.js';
|
|
5
|
+
export declare class TranscribeSocket extends FernTranscribeSocket {
|
|
6
|
+
sendAudio(message: ArrayBuffer | string): void;
|
|
7
|
+
/**
|
|
8
|
+
* Patch: have to repeat this method, because it is private in the base class
|
|
9
|
+
*/
|
|
10
|
+
private __assertSocketIsOpen;
|
|
11
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.TranscribeSocket = void 0;
|
|
37
|
+
/**
|
|
38
|
+
* Patch: file patches disability of auto-generating binary data methods for sending data to the socket
|
|
39
|
+
*/
|
|
40
|
+
const Socket_js_1 = require("../api/resources/transcribe/client/Socket.js");
|
|
41
|
+
const core = __importStar(require("../core/index.js"));
|
|
42
|
+
class TranscribeSocket extends Socket_js_1.TranscribeSocket {
|
|
43
|
+
sendAudio(message) {
|
|
44
|
+
if (typeof message === 'string') {
|
|
45
|
+
return super.sendAudio(message);
|
|
46
|
+
}
|
|
47
|
+
this.__assertSocketIsOpen();
|
|
48
|
+
this.socket.send(message);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Patch: have to repeat this method, because it is private in the base class
|
|
52
|
+
*/
|
|
53
|
+
__assertSocketIsOpen() {
|
|
54
|
+
if (!this.socket) {
|
|
55
|
+
throw new Error("Socket is not connected.");
|
|
56
|
+
}
|
|
57
|
+
if (this.socket.readyState !== core.ReconnectingWebSocket.OPEN) {
|
|
58
|
+
throw new Error("Socket is not open.");
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.TranscribeSocket = TranscribeSocket;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RefreshBearerProvider used as a replacement of OAuthTokenProvider, in case when accessToken from outside of library was used instead of Client credentials.
|
|
3
|
+
*/
|
|
4
|
+
import * as core from "../core/index.js";
|
|
5
|
+
import * as api from "../api/index.js";
|
|
6
|
+
type RefreshAccessTokenFunction = (refreshToken?: string) => Promise<api.GetTokenResponse> | api.GetTokenResponse;
|
|
7
|
+
export type BearerOptions = Partial<Omit<api.GetTokenResponse, 'access_token'>> & {
|
|
8
|
+
refreshAccessToken?: RefreshAccessTokenFunction;
|
|
9
|
+
access_token: core.Supplier<string>;
|
|
10
|
+
};
|
|
11
|
+
export declare class RefreshBearerProvider {
|
|
12
|
+
private readonly BUFFER_IN_MINUTES;
|
|
13
|
+
private _accessToken;
|
|
14
|
+
private _refreshToken;
|
|
15
|
+
private _refreshAccessToken;
|
|
16
|
+
private _expiresAt;
|
|
17
|
+
private _refreshExpiresAt;
|
|
18
|
+
constructor({ access_token, refreshAccessToken, refresh_token, refresh_expires_in, expires_in, }: BearerOptions);
|
|
19
|
+
getToken(): Promise<string>;
|
|
20
|
+
private refresh;
|
|
21
|
+
private getExpiresAt;
|
|
22
|
+
}
|
|
23
|
+
export {};
|