@microsoft/agents-hosting 0.1.49
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/README.md +57 -0
- package/dist/src/activityHandler.d.ts +108 -0
- package/dist/src/activityHandler.js +395 -0
- package/dist/src/activityHandler.js.map +1 -0
- package/dist/src/agent-client/agentClient.d.ts +13 -0
- package/dist/src/agent-client/agentClient.js +75 -0
- package/dist/src/agent-client/agentClient.js.map +1 -0
- package/dist/src/agent-client/expressApi.d.ts +4 -0
- package/dist/src/agent-client/expressApi.js +50 -0
- package/dist/src/agent-client/expressApi.js.map +1 -0
- package/dist/src/agent-client/index.d.ts +2 -0
- package/dist/src/agent-client/index.js +19 -0
- package/dist/src/agent-client/index.js.map +1 -0
- package/dist/src/app/agentApplication.d.ts +47 -0
- package/dist/src/app/agentApplication.js +317 -0
- package/dist/src/app/agentApplication.js.map +1 -0
- package/dist/src/app/appRoute.d.ts +11 -0
- package/dist/src/app/appRoute.js +7 -0
- package/dist/src/app/appRoute.js.map +1 -0
- package/dist/src/app/applicationBuilder.d.ts +18 -0
- package/dist/src/app/applicationBuilder.js +37 -0
- package/dist/src/app/applicationBuilder.js.map +1 -0
- package/dist/src/app/applicationOptions.d.ts +19 -0
- package/dist/src/app/applicationOptions.js +7 -0
- package/dist/src/app/applicationOptions.js.map +1 -0
- package/dist/src/app/attachmentDownloader.d.ts +13 -0
- package/dist/src/app/attachmentDownloader.js +72 -0
- package/dist/src/app/attachmentDownloader.js.map +1 -0
- package/dist/src/app/conversationUpdateEvents.d.ts +5 -0
- package/dist/src/app/conversationUpdateEvents.js +7 -0
- package/dist/src/app/conversationUpdateEvents.js.map +1 -0
- package/dist/src/app/index.d.ts +10 -0
- package/dist/src/app/index.js +27 -0
- package/dist/src/app/index.js.map +1 -0
- package/dist/src/app/inputFileDownloader.d.ts +14 -0
- package/dist/src/app/inputFileDownloader.js +7 -0
- package/dist/src/app/inputFileDownloader.js.map +1 -0
- package/dist/src/app/memory.d.ts +10 -0
- package/dist/src/app/memory.js +7 -0
- package/dist/src/app/memory.js.map +1 -0
- package/dist/src/app/oauth/authenticationOptions.d.ts +7 -0
- package/dist/src/app/oauth/authenticationOptions.js +7 -0
- package/dist/src/app/oauth/authenticationOptions.js.map +1 -0
- package/dist/src/app/oauth/webChatOAuthFlowAppStyle.d.ts +11 -0
- package/dist/src/app/oauth/webChatOAuthFlowAppStyle.js +85 -0
- package/dist/src/app/oauth/webChatOAuthFlowAppStyle.js.map +1 -0
- package/dist/src/app/routeHandler.d.ts +7 -0
- package/dist/src/app/routeHandler.js +7 -0
- package/dist/src/app/routeHandler.js.map +1 -0
- package/dist/src/app/routeSelector.d.ts +7 -0
- package/dist/src/app/routeSelector.js +7 -0
- package/dist/src/app/routeSelector.js.map +1 -0
- package/dist/src/app/turnEvents.d.ts +5 -0
- package/dist/src/app/turnEvents.js +7 -0
- package/dist/src/app/turnEvents.js.map +1 -0
- package/dist/src/app/turnState.d.ts +85 -0
- package/dist/src/app/turnState.js +274 -0
- package/dist/src/app/turnState.js.map +1 -0
- package/dist/src/app/turnStateEntry.d.ts +17 -0
- package/dist/src/app/turnStateEntry.js +39 -0
- package/dist/src/app/turnStateEntry.js.map +1 -0
- package/dist/src/auth/authConfiguration.d.ts +29 -0
- package/dist/src/auth/authConfiguration.js +58 -0
- package/dist/src/auth/authConfiguration.js.map +1 -0
- package/dist/src/auth/authProvider.d.ts +17 -0
- package/dist/src/auth/authProvider.js +7 -0
- package/dist/src/auth/authProvider.js.map +1 -0
- package/dist/src/auth/index.d.ts +4 -0
- package/dist/src/auth/index.js +21 -0
- package/dist/src/auth/index.js.map +1 -0
- package/dist/src/auth/jwt-middleware.d.ts +13 -0
- package/dist/src/auth/jwt-middleware.js +97 -0
- package/dist/src/auth/jwt-middleware.js.map +1 -0
- package/dist/src/auth/msalTokenProvider.d.ts +53 -0
- package/dist/src/auth/msalTokenProvider.js +198 -0
- package/dist/src/auth/msalTokenProvider.js.map +1 -0
- package/dist/src/auth/request.d.ts +15 -0
- package/dist/src/auth/request.js +7 -0
- package/dist/src/auth/request.js.map +1 -0
- package/dist/src/baseAdapter.d.ts +88 -0
- package/dist/src/baseAdapter.js +94 -0
- package/dist/src/baseAdapter.js.map +1 -0
- package/dist/src/cards/animationCard.d.ts +36 -0
- package/dist/src/cards/animationCard.js +7 -0
- package/dist/src/cards/animationCard.js.map +1 -0
- package/dist/src/cards/audioCard.d.ts +36 -0
- package/dist/src/cards/audioCard.js +7 -0
- package/dist/src/cards/audioCard.js.map +1 -0
- package/dist/src/cards/cardFactory.d.ts +123 -0
- package/dist/src/cards/cardFactory.js +225 -0
- package/dist/src/cards/cardFactory.js.map +1 -0
- package/dist/src/cards/cardImage.d.ts +16 -0
- package/dist/src/cards/cardImage.js +7 -0
- package/dist/src/cards/cardImage.js.map +1 -0
- package/dist/src/cards/fact.d.ts +13 -0
- package/dist/src/cards/fact.js +7 -0
- package/dist/src/cards/fact.js.map +1 -0
- package/dist/src/cards/heroCard.d.ts +23 -0
- package/dist/src/cards/heroCard.js +7 -0
- package/dist/src/cards/heroCard.js.map +1 -0
- package/dist/src/cards/index.d.ts +17 -0
- package/dist/src/cards/index.js +34 -0
- package/dist/src/cards/index.js.map +1 -0
- package/dist/src/cards/mediaUrl.d.ts +17 -0
- package/dist/src/cards/mediaUrl.js +7 -0
- package/dist/src/cards/mediaUrl.js.map +1 -0
- package/dist/src/cards/o365ConnectorCard.d.ts +35 -0
- package/dist/src/cards/o365ConnectorCard.js +7 -0
- package/dist/src/cards/o365ConnectorCard.js.map +1 -0
- package/dist/src/cards/o365ConnectorCardActionBase.d.ts +22 -0
- package/dist/src/cards/o365ConnectorCardActionBase.js +7 -0
- package/dist/src/cards/o365ConnectorCardActionBase.js.map +1 -0
- package/dist/src/cards/o365ConnectorCardFact.d.ts +17 -0
- package/dist/src/cards/o365ConnectorCardFact.js +7 -0
- package/dist/src/cards/o365ConnectorCardFact.js.map +1 -0
- package/dist/src/cards/o365ConnectorCardImage.d.ts +17 -0
- package/dist/src/cards/o365ConnectorCardImage.js +7 -0
- package/dist/src/cards/o365ConnectorCardImage.js.map +1 -0
- package/dist/src/cards/o365ConnectorCardSection.d.ts +57 -0
- package/dist/src/cards/o365ConnectorCardSection.js +7 -0
- package/dist/src/cards/o365ConnectorCardSection.js.map +1 -0
- package/dist/src/cards/receiptCard.d.ts +44 -0
- package/dist/src/cards/receiptCard.js +7 -0
- package/dist/src/cards/receiptCard.js.map +1 -0
- package/dist/src/cards/receiptItem.d.ts +39 -0
- package/dist/src/cards/receiptItem.js +7 -0
- package/dist/src/cards/receiptItem.js.map +1 -0
- package/dist/src/cards/signinCard.d.ts +14 -0
- package/dist/src/cards/signinCard.js +5 -0
- package/dist/src/cards/signinCard.js.map +1 -0
- package/dist/src/cards/taskModuleAction.d.ts +43 -0
- package/dist/src/cards/taskModuleAction.js +30 -0
- package/dist/src/cards/taskModuleAction.js.map +1 -0
- package/dist/src/cards/thumbnailCard.d.ts +35 -0
- package/dist/src/cards/thumbnailCard.js +7 -0
- package/dist/src/cards/thumbnailCard.js.map +1 -0
- package/dist/src/cards/thumbnailUrl.d.ts +17 -0
- package/dist/src/cards/thumbnailUrl.js +7 -0
- package/dist/src/cards/thumbnailUrl.js.map +1 -0
- package/dist/src/cards/videoCard.d.ts +60 -0
- package/dist/src/cards/videoCard.js +7 -0
- package/dist/src/cards/videoCard.js.map +1 -0
- package/dist/src/claimsIdentity.d.ts +35 -0
- package/dist/src/claimsIdentity.js +43 -0
- package/dist/src/claimsIdentity.js.map +1 -0
- package/dist/src/cloudAdapter.d.ts +128 -0
- package/dist/src/cloudAdapter.js +376 -0
- package/dist/src/cloudAdapter.js.map +1 -0
- package/dist/src/connector-client/attachmentData.d.ts +25 -0
- package/dist/src/connector-client/attachmentData.js +7 -0
- package/dist/src/connector-client/attachmentData.js.map +1 -0
- package/dist/src/connector-client/attachmentInfo.d.ts +22 -0
- package/dist/src/connector-client/attachmentInfo.js +7 -0
- package/dist/src/connector-client/attachmentInfo.js.map +1 -0
- package/dist/src/connector-client/attachmentView.d.ts +17 -0
- package/dist/src/connector-client/attachmentView.js +7 -0
- package/dist/src/connector-client/attachmentView.js.map +1 -0
- package/dist/src/connector-client/connectorClient.d.ts +93 -0
- package/dist/src/connector-client/connectorClient.js +249 -0
- package/dist/src/connector-client/connectorClient.js.map +1 -0
- package/dist/src/connector-client/conversationMembers.d.ts +18 -0
- package/dist/src/connector-client/conversationMembers.js +7 -0
- package/dist/src/connector-client/conversationMembers.js.map +1 -0
- package/dist/src/connector-client/conversationParameters.d.ts +38 -0
- package/dist/src/connector-client/conversationParameters.js +7 -0
- package/dist/src/connector-client/conversationParameters.js.map +1 -0
- package/dist/src/connector-client/conversationResourceResponse.d.ts +21 -0
- package/dist/src/connector-client/conversationResourceResponse.js +7 -0
- package/dist/src/connector-client/conversationResourceResponse.js.map +1 -0
- package/dist/src/connector-client/conversationsResult.d.ts +18 -0
- package/dist/src/connector-client/conversationsResult.js +7 -0
- package/dist/src/connector-client/conversationsResult.js.map +1 -0
- package/dist/src/connector-client/index.d.ts +9 -0
- package/dist/src/connector-client/index.js +26 -0
- package/dist/src/connector-client/index.js.map +1 -0
- package/dist/src/connector-client/resourceResponse.d.ts +13 -0
- package/dist/src/connector-client/resourceResponse.js +7 -0
- package/dist/src/connector-client/resourceResponse.js.map +1 -0
- package/dist/src/index.d.ts +26 -0
- package/dist/src/index.js +45 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/invoke/adaptiveCardAuthentication.d.ts +10 -0
- package/dist/src/invoke/adaptiveCardAuthentication.js +7 -0
- package/dist/src/invoke/adaptiveCardAuthentication.js.map +1 -0
- package/dist/src/invoke/adaptiveCardInvokeResponse.d.ts +21 -0
- package/dist/src/invoke/adaptiveCardInvokeResponse.js +7 -0
- package/dist/src/invoke/adaptiveCardInvokeResponse.js.map +1 -0
- package/dist/src/invoke/adaptiveCardInvokeValue.d.ts +23 -0
- package/dist/src/invoke/adaptiveCardInvokeValue.js +7 -0
- package/dist/src/invoke/adaptiveCardInvokeValue.js.map +1 -0
- package/dist/src/invoke/index.d.ts +9 -0
- package/dist/src/invoke/index.js +26 -0
- package/dist/src/invoke/index.js.map +1 -0
- package/dist/src/invoke/invokeException.d.ts +24 -0
- package/dist/src/invoke/invokeException.js +35 -0
- package/dist/src/invoke/invokeException.js.map +1 -0
- package/dist/src/invoke/invokeResponse.d.ts +17 -0
- package/dist/src/invoke/invokeResponse.js +7 -0
- package/dist/src/invoke/invokeResponse.js.map +1 -0
- package/dist/src/invoke/searchInvokeOptions.d.ts +17 -0
- package/dist/src/invoke/searchInvokeOptions.js +7 -0
- package/dist/src/invoke/searchInvokeOptions.js.map +1 -0
- package/dist/src/invoke/searchInvokeResponse.d.ts +10 -0
- package/dist/src/invoke/searchInvokeResponse.js +7 -0
- package/dist/src/invoke/searchInvokeResponse.js.map +1 -0
- package/dist/src/invoke/searchInvokeValue.d.ts +26 -0
- package/dist/src/invoke/searchInvokeValue.js +7 -0
- package/dist/src/invoke/searchInvokeValue.js.map +1 -0
- package/dist/src/invoke/tokenExchangeInvokeRequest.d.ts +21 -0
- package/dist/src/invoke/tokenExchangeInvokeRequest.js +7 -0
- package/dist/src/invoke/tokenExchangeInvokeRequest.js.map +1 -0
- package/dist/src/logger.d.ts +12 -0
- package/dist/src/logger.js +42 -0
- package/dist/src/logger.js.map +1 -0
- package/dist/src/messageFactory.d.ts +62 -0
- package/dist/src/messageFactory.js +143 -0
- package/dist/src/messageFactory.js.map +1 -0
- package/dist/src/middlewareSet.d.ts +43 -0
- package/dist/src/middlewareSet.js +57 -0
- package/dist/src/middlewareSet.js.map +1 -0
- package/dist/src/oauth/index.d.ts +7 -0
- package/dist/src/oauth/index.js +24 -0
- package/dist/src/oauth/index.js.map +1 -0
- package/dist/src/oauth/oauthCard.d.ts +28 -0
- package/dist/src/oauth/oauthCard.js +5 -0
- package/dist/src/oauth/oauthCard.js.map +1 -0
- package/dist/src/oauth/signingResource.d.ts +19 -0
- package/dist/src/oauth/signingResource.js +5 -0
- package/dist/src/oauth/signingResource.js.map +1 -0
- package/dist/src/oauth/tokenExchangeRequest.d.ts +17 -0
- package/dist/src/oauth/tokenExchangeRequest.js +5 -0
- package/dist/src/oauth/tokenExchangeRequest.js.map +1 -0
- package/dist/src/oauth/tokenExchangeResource.d.ts +17 -0
- package/dist/src/oauth/tokenExchangeResource.js +5 -0
- package/dist/src/oauth/tokenExchangeResource.js.map +1 -0
- package/dist/src/oauth/tokenPostResource.d.ts +9 -0
- package/dist/src/oauth/tokenPostResource.js +5 -0
- package/dist/src/oauth/tokenPostResource.js.map +1 -0
- package/dist/src/oauth/userTokenClient.d.ts +49 -0
- package/dist/src/oauth/userTokenClient.js +117 -0
- package/dist/src/oauth/userTokenClient.js.map +1 -0
- package/dist/src/oauth/webChatOAuthFlow.d.ts +41 -0
- package/dist/src/oauth/webChatOAuthFlow.js +117 -0
- package/dist/src/oauth/webChatOAuthFlow.js.map +1 -0
- package/dist/src/state/agentState.d.ts +71 -0
- package/dist/src/state/agentState.js +122 -0
- package/dist/src/state/agentState.js.map +1 -0
- package/dist/src/state/agentStatePropertyAccesor.d.ts +39 -0
- package/dist/src/state/agentStatePropertyAccesor.js +60 -0
- package/dist/src/state/agentStatePropertyAccesor.js.map +1 -0
- package/dist/src/state/conversationState.d.ts +18 -0
- package/dist/src/state/conversationState.js +38 -0
- package/dist/src/state/conversationState.js.map +1 -0
- package/dist/src/state/index.d.ts +4 -0
- package/dist/src/state/index.js +21 -0
- package/dist/src/state/index.js.map +1 -0
- package/dist/src/state/userState.d.ts +18 -0
- package/dist/src/state/userState.js +38 -0
- package/dist/src/state/userState.js.map +1 -0
- package/dist/src/statusCodes.d.ts +19 -0
- package/dist/src/statusCodes.js +24 -0
- package/dist/src/statusCodes.js.map +1 -0
- package/dist/src/storage/index.d.ts +2 -0
- package/dist/src/storage/index.js +19 -0
- package/dist/src/storage/index.js.map +1 -0
- package/dist/src/storage/memoryStorage.d.ts +50 -0
- package/dist/src/storage/memoryStorage.js +100 -0
- package/dist/src/storage/memoryStorage.js.map +1 -0
- package/dist/src/storage/storage.d.ts +47 -0
- package/dist/src/storage/storage.js +7 -0
- package/dist/src/storage/storage.js.map +1 -0
- package/dist/src/tokenResponseEventName.d.ts +5 -0
- package/dist/src/tokenResponseEventName.js +9 -0
- package/dist/src/tokenResponseEventName.js.map +1 -0
- package/dist/src/transcript/consoleTranscriptLogger.d.ts +13 -0
- package/dist/src/transcript/consoleTranscriptLogger.js +21 -0
- package/dist/src/transcript/consoleTranscriptLogger.js.map +1 -0
- package/dist/src/transcript/index.d.ts +4 -0
- package/dist/src/transcript/index.js +21 -0
- package/dist/src/transcript/index.js.map +1 -0
- package/dist/src/transcript/transcriptLogger.d.ts +42 -0
- package/dist/src/transcript/transcriptLogger.js +3 -0
- package/dist/src/transcript/transcriptLogger.js.map +1 -0
- package/dist/src/transcript/transcriptLoggerMiddleware.d.ts +38 -0
- package/dist/src/transcript/transcriptLoggerMiddleware.js +126 -0
- package/dist/src/transcript/transcriptLoggerMiddleware.js.map +1 -0
- package/dist/src/transcript/transcriptStore.d.ts +30 -0
- package/dist/src/transcript/transcriptStore.js +3 -0
- package/dist/src/transcript/transcriptStore.js.map +1 -0
- package/dist/src/turnContext.d.ts +160 -0
- package/dist/src/turnContext.js +286 -0
- package/dist/src/turnContext.js.map +1 -0
- package/dist/src/turnContextStateCollection.d.ts +29 -0
- package/dist/src/turnContextStateCollection.js +56 -0
- package/dist/src/turnContextStateCollection.js.map +1 -0
- package/package.json +48 -0
- package/src/activityHandler.ts +461 -0
- package/src/agent-client/agentClient.ts +84 -0
- package/src/agent-client/expressApi.ts +59 -0
- package/src/agent-client/index.ts +2 -0
- package/src/app/agentApplication.ts +401 -0
- package/src/app/appRoute.ts +13 -0
- package/src/app/applicationBuilder.ts +42 -0
- package/src/app/applicationOptions.ts +21 -0
- package/src/app/attachmentDownloader.ts +83 -0
- package/src/app/conversationUpdateEvents.ts +8 -0
- package/src/app/index.ts +10 -0
- package/src/app/inputFileDownloader.ts +17 -0
- package/src/app/memory.ts +14 -0
- package/src/app/oauth/authenticationOptions.ts +8 -0
- package/src/app/oauth/webChatOAuthFlowAppStyle.ts +90 -0
- package/src/app/routeHandler.ts +9 -0
- package/src/app/routeSelector.ts +10 -0
- package/src/app/turnEvents.ts +6 -0
- package/src/app/turnState.ts +338 -0
- package/src/app/turnStateEntry.ts +46 -0
- package/src/auth/authConfiguration.ts +68 -0
- package/src/auth/authProvider.ts +19 -0
- package/src/auth/index.ts +4 -0
- package/src/auth/jwt-middleware.ts +99 -0
- package/src/auth/msalTokenProvider.ts +202 -0
- package/src/auth/request.ts +20 -0
- package/src/baseAdapter.ts +174 -0
- package/src/cards/animationCard.ts +38 -0
- package/src/cards/audioCard.ts +38 -0
- package/src/cards/cardFactory.ts +276 -0
- package/src/cards/cardImage.ts +18 -0
- package/src/cards/fact.ts +14 -0
- package/src/cards/heroCard.ts +25 -0
- package/src/cards/index.ts +17 -0
- package/src/cards/mediaUrl.ts +18 -0
- package/src/cards/o365ConnectorCard.ts +37 -0
- package/src/cards/o365ConnectorCardActionBase.ts +24 -0
- package/src/cards/o365ConnectorCardFact.ts +18 -0
- package/src/cards/o365ConnectorCardImage.ts +18 -0
- package/src/cards/o365ConnectorCardSection.ts +60 -0
- package/src/cards/receiptCard.ts +46 -0
- package/src/cards/receiptItem.ts +41 -0
- package/src/cards/signinCard.ts +18 -0
- package/src/cards/taskModuleAction.ts +61 -0
- package/src/cards/thumbnailCard.ts +37 -0
- package/src/cards/thumbnailUrl.ts +18 -0
- package/src/cards/videoCard.ts +62 -0
- package/src/claimsIdentity.ts +47 -0
- package/src/cloudAdapter.ts +431 -0
- package/src/connector-client/attachmentData.ts +26 -0
- package/src/connector-client/attachmentInfo.ts +24 -0
- package/src/connector-client/attachmentView.ts +18 -0
- package/src/connector-client/connectorClient.ts +295 -0
- package/src/connector-client/conversationMembers.ts +20 -0
- package/src/connector-client/conversationParameters.ts +40 -0
- package/src/connector-client/conversationResourceResponse.ts +22 -0
- package/src/connector-client/conversationsResult.ts +20 -0
- package/src/connector-client/index.ts +9 -0
- package/src/connector-client/resourceResponse.ts +14 -0
- package/src/index.ts +31 -0
- package/src/invoke/adaptiveCardAuthentication.ts +13 -0
- package/src/invoke/adaptiveCardInvokeResponse.ts +22 -0
- package/src/invoke/adaptiveCardInvokeValue.ts +25 -0
- package/src/invoke/index.ts +9 -0
- package/src/invoke/invokeException.ts +33 -0
- package/src/invoke/invokeResponse.ts +18 -0
- package/src/invoke/searchInvokeOptions.ts +18 -0
- package/src/invoke/searchInvokeResponse.ts +11 -0
- package/src/invoke/searchInvokeValue.ts +28 -0
- package/src/invoke/tokenExchangeInvokeRequest.ts +22 -0
- package/src/logger.ts +43 -0
- package/src/messageFactory.ts +177 -0
- package/src/middlewareSet.ts +76 -0
- package/src/oauth/index.ts +7 -0
- package/src/oauth/oauthCard.ts +32 -0
- package/src/oauth/signingResource.ts +23 -0
- package/src/oauth/tokenExchangeRequest.ts +20 -0
- package/src/oauth/tokenExchangeResource.ts +20 -0
- package/src/oauth/tokenPostResource.ts +12 -0
- package/src/oauth/userTokenClient.ts +116 -0
- package/src/oauth/webChatOAuthFlow.ts +123 -0
- package/src/state/agentState.ts +142 -0
- package/src/state/agentStatePropertyAccesor.ts +61 -0
- package/src/state/conversationState.ts +42 -0
- package/src/state/index.ts +4 -0
- package/src/state/userState.ts +43 -0
- package/src/statusCodes.ts +20 -0
- package/src/storage/index.ts +2 -0
- package/src/storage/memoryStorage.ts +105 -0
- package/src/storage/storage.ts +52 -0
- package/src/tokenResponseEventName.ts +6 -0
- package/src/transcript/consoleTranscriptLogger.ts +20 -0
- package/src/transcript/index.ts +4 -0
- package/src/transcript/transcriptLogger.ts +45 -0
- package/src/transcript/transcriptLoggerMiddleware.ts +151 -0
- package/src/transcript/transcriptStore.ts +38 -0
- package/src/turnContext.ts +335 -0
- package/src/turnContextStateCollection.ts +69 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { ConfidentialClientApplication, LogLevel, ManagedIdentityApplication, NodeSystemOptions } from '@azure/msal-node'
|
|
7
|
+
import { AuthConfiguration } from './authConfiguration'
|
|
8
|
+
import { AuthProvider } from './authProvider'
|
|
9
|
+
import { debug } from '../logger'
|
|
10
|
+
import { v4 } from 'uuid'
|
|
11
|
+
|
|
12
|
+
import fs from 'fs'
|
|
13
|
+
import crypto from 'crypto'
|
|
14
|
+
|
|
15
|
+
const audience = 'api://AzureADTokenExchange'
|
|
16
|
+
const logger = debug('agents:msal-token-provider')
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Provides tokens using MSAL.
|
|
20
|
+
*/
|
|
21
|
+
export class MsalTokenProvider implements AuthProvider {
|
|
22
|
+
/**
|
|
23
|
+
* Gets an access token.
|
|
24
|
+
* @param authConfig The authentication configuration.
|
|
25
|
+
* @param scope The scope for the token.
|
|
26
|
+
* @returns A promise that resolves to the access token.
|
|
27
|
+
*/
|
|
28
|
+
async getAccessToken (authConfig: AuthConfiguration, scope: string): Promise<string> {
|
|
29
|
+
if (!authConfig.clientId && process.env.NODE_ENV !== 'production') {
|
|
30
|
+
return ''
|
|
31
|
+
}
|
|
32
|
+
let token
|
|
33
|
+
if (authConfig.FICClientId !== undefined) {
|
|
34
|
+
token = await this.acquireAccessTokenViaFIC(authConfig, scope)
|
|
35
|
+
} else if (authConfig.clientSecret !== undefined) {
|
|
36
|
+
token = await this.acquireAccessTokenViaSecret(authConfig, scope)
|
|
37
|
+
} else if (authConfig.certPemFile !== undefined &&
|
|
38
|
+
authConfig.certKeyFile !== undefined) {
|
|
39
|
+
token = await this.acquireTokenWithCertificate(authConfig, scope)
|
|
40
|
+
} else if (authConfig.clientSecret === undefined &&
|
|
41
|
+
authConfig.certPemFile === undefined &&
|
|
42
|
+
authConfig.certKeyFile === undefined) {
|
|
43
|
+
token = await this.acquireTokenWithUserAssignedIdentity(authConfig, scope)
|
|
44
|
+
} else {
|
|
45
|
+
throw new Error('Invalid authConfig. ')
|
|
46
|
+
}
|
|
47
|
+
if (token === undefined) {
|
|
48
|
+
throw new Error('Failed to acquire token')
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return token
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
private readonly sysOptions: NodeSystemOptions = {
|
|
55
|
+
loggerOptions: {
|
|
56
|
+
logLevel: LogLevel.Trace,
|
|
57
|
+
loggerCallback: (level, message, containsPii) => {
|
|
58
|
+
if (containsPii) {
|
|
59
|
+
return
|
|
60
|
+
}
|
|
61
|
+
switch (level) {
|
|
62
|
+
case LogLevel.Error:
|
|
63
|
+
logger.error(message)
|
|
64
|
+
return
|
|
65
|
+
case LogLevel.Info:
|
|
66
|
+
logger.info(message)
|
|
67
|
+
return
|
|
68
|
+
case LogLevel.Warning:
|
|
69
|
+
logger.warn(message)
|
|
70
|
+
return
|
|
71
|
+
case LogLevel.Verbose:
|
|
72
|
+
logger.debug(message)
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
piiLoggingEnabled: false
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Acquires a token using a user-assigned identity.
|
|
81
|
+
* @param authConfig The authentication configuration.
|
|
82
|
+
* @param scope The scope for the token.
|
|
83
|
+
* @returns A promise that resolves to the access token.
|
|
84
|
+
*/
|
|
85
|
+
private async acquireTokenWithUserAssignedIdentity (authConfig: AuthConfiguration, scope: string) {
|
|
86
|
+
const mia = new ManagedIdentityApplication({
|
|
87
|
+
managedIdentityIdParams: {
|
|
88
|
+
userAssignedClientId: authConfig.clientId || ''
|
|
89
|
+
},
|
|
90
|
+
system: this.sysOptions
|
|
91
|
+
})
|
|
92
|
+
const token = await mia.acquireToken({
|
|
93
|
+
resource: scope
|
|
94
|
+
})
|
|
95
|
+
return token?.accessToken
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Acquires a token using a certificate.
|
|
100
|
+
* @param authConfig The authentication configuration.
|
|
101
|
+
* @param scope The scope for the token.
|
|
102
|
+
* @returns A promise that resolves to the access token.
|
|
103
|
+
*/
|
|
104
|
+
private async acquireTokenWithCertificate (authConfig: AuthConfiguration, scope: string) {
|
|
105
|
+
const privateKeySource = fs.readFileSync(authConfig.certKeyFile as string)
|
|
106
|
+
|
|
107
|
+
const privateKeyObject = crypto.createPrivateKey({
|
|
108
|
+
key: privateKeySource,
|
|
109
|
+
format: 'pem'
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
const privateKey = privateKeyObject.export({
|
|
113
|
+
format: 'pem',
|
|
114
|
+
type: 'pkcs8'
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
const pubKeyObject = new crypto.X509Certificate(fs.readFileSync(authConfig.certPemFile as string))
|
|
118
|
+
|
|
119
|
+
const cca = new ConfidentialClientApplication({
|
|
120
|
+
auth: {
|
|
121
|
+
clientId: authConfig.clientId || '',
|
|
122
|
+
authority: `https://login.microsoftonline.com/${authConfig.tenantId || 'botframework.com'}`,
|
|
123
|
+
clientCertificate: {
|
|
124
|
+
privateKey: privateKey as string,
|
|
125
|
+
thumbprint: pubKeyObject.fingerprint.replaceAll(':', ''),
|
|
126
|
+
x5c: Buffer.from(authConfig.certPemFile as string, 'base64').toString()
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
system: this.sysOptions
|
|
130
|
+
})
|
|
131
|
+
const token = await cca.acquireTokenByClientCredential({
|
|
132
|
+
scopes: [`${scope}/.default`],
|
|
133
|
+
correlationId: v4()
|
|
134
|
+
})
|
|
135
|
+
return token?.accessToken as string
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Acquires a token using a client secret.
|
|
140
|
+
* @param authConfig The authentication configuration.
|
|
141
|
+
* @param scope The scope for the token.
|
|
142
|
+
* @returns A promise that resolves to the access token.
|
|
143
|
+
*/
|
|
144
|
+
private async acquireAccessTokenViaSecret (authConfig: AuthConfiguration, scope: string) {
|
|
145
|
+
const cca = new ConfidentialClientApplication({
|
|
146
|
+
auth: {
|
|
147
|
+
clientId: authConfig.clientId as string,
|
|
148
|
+
authority: `https://login.microsoftonline.com/${authConfig.tenantId || 'botframework.com'}`,
|
|
149
|
+
clientSecret: authConfig.clientSecret
|
|
150
|
+
},
|
|
151
|
+
system: this.sysOptions
|
|
152
|
+
})
|
|
153
|
+
const token = await cca.acquireTokenByClientCredential({
|
|
154
|
+
scopes: [`${scope}/.default`],
|
|
155
|
+
correlationId: v4()
|
|
156
|
+
})
|
|
157
|
+
return token?.accessToken as string
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Acquires a token using a FIC client assertion.
|
|
162
|
+
* @param authConfig The authentication configuration.
|
|
163
|
+
* @param scope The scope for the token.
|
|
164
|
+
* @returns A promise that resolves to the access token.
|
|
165
|
+
*/
|
|
166
|
+
private async acquireAccessTokenViaFIC (authConfig: AuthConfiguration, scope: string) : Promise<string> {
|
|
167
|
+
const scopes = [`${scope}/.default`]
|
|
168
|
+
const clientAssertion = await this.fetchExternalToken(authConfig.FICClientId as string)
|
|
169
|
+
const cca = new ConfidentialClientApplication({
|
|
170
|
+
auth: {
|
|
171
|
+
clientId: authConfig.clientId as string,
|
|
172
|
+
authority: `https://login.microsoftonline.com/${authConfig.tenantId}`,
|
|
173
|
+
clientAssertion
|
|
174
|
+
},
|
|
175
|
+
system: this.sysOptions
|
|
176
|
+
})
|
|
177
|
+
const token = await cca.acquireTokenByClientCredential({ scopes })
|
|
178
|
+
logger.info('got token using FIC client assertion')
|
|
179
|
+
return token?.accessToken as string
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Fetches an external token.
|
|
184
|
+
* @param FICClientId The FIC client ID.
|
|
185
|
+
* @returns A promise that resolves to the external token.
|
|
186
|
+
*/
|
|
187
|
+
private async fetchExternalToken (FICClientId: string) : Promise<string> {
|
|
188
|
+
const managedIdentityClientAssertion = new ManagedIdentityApplication({
|
|
189
|
+
managedIdentityIdParams: {
|
|
190
|
+
userAssignedClientId: FICClientId
|
|
191
|
+
},
|
|
192
|
+
system: this.sysOptions
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
const response = await managedIdentityClientAssertion.acquireToken({
|
|
196
|
+
resource: audience,
|
|
197
|
+
forceRefresh: true
|
|
198
|
+
})
|
|
199
|
+
logger.info('got token for FIC')
|
|
200
|
+
return response.accessToken
|
|
201
|
+
}
|
|
202
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { JwtPayload } from 'jsonwebtoken'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents a Node.js HTTP Request, including the minimal set of use properties.
|
|
10
|
+
* Compatible with Restify, Express, and Node.js core http.
|
|
11
|
+
*/
|
|
12
|
+
export interface Request<
|
|
13
|
+
Body extends Record<string, unknown> = Record<string, unknown>,
|
|
14
|
+
Headers extends Record<string, string[] | string | undefined> = Record<string, string[] | string | undefined>
|
|
15
|
+
> {
|
|
16
|
+
body?: Body
|
|
17
|
+
headers: Headers
|
|
18
|
+
method?: string
|
|
19
|
+
user?: JwtPayload
|
|
20
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { AuthConfiguration } from './auth/authConfiguration'
|
|
7
|
+
import { AuthProvider } from './auth/authProvider'
|
|
8
|
+
import { MsalTokenProvider } from './auth/msalTokenProvider'
|
|
9
|
+
import { Middleware, MiddlewareHandler, MiddlewareSet } from './middlewareSet'
|
|
10
|
+
import { TurnContext } from './turnContext'
|
|
11
|
+
import { debug } from './logger'
|
|
12
|
+
import { Activity, ConversationReference } from '@microsoft/agents-activity'
|
|
13
|
+
import { ResourceResponse } from './connector-client/resourceResponse'
|
|
14
|
+
import { AttachmentData } from './connector-client/attachmentData'
|
|
15
|
+
import { AttachmentInfo } from './connector-client/attachmentInfo'
|
|
16
|
+
|
|
17
|
+
const logger = debug('agents:base-adapter')
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Base class for all adapters, providing middleware and error handling capabilities.
|
|
21
|
+
*/
|
|
22
|
+
export abstract class BaseAdapter {
|
|
23
|
+
protected middleware: MiddlewareSet = new MiddlewareSet()
|
|
24
|
+
|
|
25
|
+
private turnError: (context: TurnContext, error: Error) => Promise<void> = async (context: TurnContext, error: Error) => {
|
|
26
|
+
logger.error(`\n [onTurnError] unhandled error: ${error}`)
|
|
27
|
+
|
|
28
|
+
// Send a trace activity, which will be displayed in Bot Framework Emulator
|
|
29
|
+
await context.sendTraceActivity(
|
|
30
|
+
'OnTurnError Trace',
|
|
31
|
+
`${error}`,
|
|
32
|
+
'https://www.botframework.com/schemas/error',
|
|
33
|
+
'TurnError'
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
// Send a message to the user
|
|
37
|
+
await context.sendActivity('The agent encountered an error or bug.')
|
|
38
|
+
await context.sendActivity('To continue to run this agent, please fix the source code.')
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
readonly AgentIdentityKey = Symbol('AgentIdentity')
|
|
42
|
+
readonly ConnectorClientKey = Symbol('ConnectorClient')
|
|
43
|
+
readonly OAuthScopeKey = Symbol('OAuthScope')
|
|
44
|
+
|
|
45
|
+
authProvider: AuthProvider = new MsalTokenProvider()
|
|
46
|
+
authConfig: AuthConfiguration = { issuers: [] }
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Sends a set of activities to the conversation.
|
|
50
|
+
* @param context - The TurnContext for the current turn.
|
|
51
|
+
* @param activities - The activities to send.
|
|
52
|
+
* @returns A promise representing the array of ResourceResponses for the sent activities.
|
|
53
|
+
*/
|
|
54
|
+
abstract sendActivities (context: TurnContext, activities: Activity[]): Promise<ResourceResponse[]>
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Updates an existing activity.
|
|
58
|
+
* @param context - The TurnContext for the current turn.
|
|
59
|
+
* @param activity - The activity to update.
|
|
60
|
+
* @returns A promise representing the ResourceResponse for the updated activity.
|
|
61
|
+
*/
|
|
62
|
+
abstract updateActivity (context: TurnContext, activity: Activity): Promise<ResourceResponse | void>
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Deletes an existing activity.
|
|
66
|
+
* @param context - The TurnContext for the current turn.
|
|
67
|
+
* @param reference - The conversation reference of the activity to delete.
|
|
68
|
+
* @returns A promise representing the completion of the delete operation.
|
|
69
|
+
*/
|
|
70
|
+
abstract deleteActivity (context: TurnContext, reference: Partial<ConversationReference>): Promise<void>
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Continues a conversation.
|
|
74
|
+
* @param reference - The conversation reference to continue.
|
|
75
|
+
* @param logic - The logic to execute.
|
|
76
|
+
* @returns A promise representing the completion of the continue operation.
|
|
77
|
+
*/
|
|
78
|
+
abstract continueConversation (
|
|
79
|
+
reference: Partial<ConversationReference>,
|
|
80
|
+
logic: (revocableContext: TurnContext) => Promise<void>
|
|
81
|
+
): Promise<void>
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Uploads an attachment.
|
|
85
|
+
* @param conversationId - The conversation ID.
|
|
86
|
+
* @param attachmentData - The attachment data.
|
|
87
|
+
* @returns A promise representing the ResourceResponse for the uploaded attachment.
|
|
88
|
+
*/
|
|
89
|
+
abstract uploadAttachment (conversationId: string, attachmentData: AttachmentData): Promise<ResourceResponse>
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Gets attachment information.
|
|
93
|
+
* @param attachmentId - The attachment ID.
|
|
94
|
+
* @returns A promise representing the AttachmentInfo for the requested attachment.
|
|
95
|
+
*/
|
|
96
|
+
abstract getAttachmentInfo (attachmentId: string): Promise<AttachmentInfo>
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Gets an attachment.
|
|
100
|
+
* @param attachmentId - The attachment ID.
|
|
101
|
+
* @param viewId - The view ID.
|
|
102
|
+
* @returns A promise representing the NodeJS.ReadableStream for the requested attachment.
|
|
103
|
+
*/
|
|
104
|
+
abstract getAttachment (attachmentId: string, viewId: string): Promise<NodeJS.ReadableStream>
|
|
105
|
+
|
|
106
|
+
get onTurnError (): (context: TurnContext, error: Error) => Promise<void> {
|
|
107
|
+
return this.turnError
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
set onTurnError (value: (context: TurnContext, error: Error) => Promise<void>) {
|
|
111
|
+
this.turnError = value
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Adds middleware to the adapter's middleware pipeline.
|
|
116
|
+
* @param middlewares - The middleware to add.
|
|
117
|
+
* @returns The adapter instance.
|
|
118
|
+
*/
|
|
119
|
+
use (...middlewares: Array<MiddlewareHandler | Middleware>): this {
|
|
120
|
+
this.middleware.use(...middlewares)
|
|
121
|
+
|
|
122
|
+
return this
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
private makeRevocable<T extends Record<string, any>>(
|
|
126
|
+
target: T,
|
|
127
|
+
handler?: ProxyHandler<T>
|
|
128
|
+
): { proxy: T, revoke: () => void } {
|
|
129
|
+
// Ensure proxy supported (some browsers don't)
|
|
130
|
+
if (typeof Proxy !== 'undefined' && Proxy.revocable) {
|
|
131
|
+
return Proxy.revocable(target, (handler != null) ? handler : {})
|
|
132
|
+
} else {
|
|
133
|
+
return {
|
|
134
|
+
proxy: target,
|
|
135
|
+
revoke: (): void => {
|
|
136
|
+
// noop
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Runs the middleware pipeline in sequence.
|
|
144
|
+
* @param context - The TurnContext for the current turn.
|
|
145
|
+
* @param next - The next function to call in the pipeline.
|
|
146
|
+
* @returns A promise representing the completion of the middleware pipeline.
|
|
147
|
+
*/
|
|
148
|
+
protected async runMiddleware (
|
|
149
|
+
context: TurnContext,
|
|
150
|
+
next: (revocableContext: TurnContext) => Promise<void>
|
|
151
|
+
): Promise<void> {
|
|
152
|
+
if (context && context.activity && context.activity.locale) {
|
|
153
|
+
context.locale = context.activity.locale
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const pContext = this.makeRevocable(context)
|
|
157
|
+
|
|
158
|
+
try {
|
|
159
|
+
await this.middleware.run(pContext.proxy, async () => await next(pContext.proxy))
|
|
160
|
+
} catch (err) {
|
|
161
|
+
if (this.onTurnError) {
|
|
162
|
+
if (err instanceof Error) {
|
|
163
|
+
await this.onTurnError(pContext.proxy, err)
|
|
164
|
+
} else {
|
|
165
|
+
throw new Error('Unknown error type')
|
|
166
|
+
}
|
|
167
|
+
} else {
|
|
168
|
+
throw err
|
|
169
|
+
}
|
|
170
|
+
} finally {
|
|
171
|
+
pContext.revoke()
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright(c) Microsoft Corporation.All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { CardAction } from '@microsoft/agents-activity'
|
|
7
|
+
import { MediaUrl } from './mediaUrl'
|
|
8
|
+
import { ThumbnailUrl } from './thumbnailUrl'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Interface representing an Animation Card.
|
|
12
|
+
*/
|
|
13
|
+
export interface AnimationCard {
|
|
14
|
+
/** The title of the card. */
|
|
15
|
+
title: string
|
|
16
|
+
/** The subtitle of the card. */
|
|
17
|
+
subtitle: string
|
|
18
|
+
/** The text content of the card. */
|
|
19
|
+
text: string
|
|
20
|
+
/** The image to be displayed on the card. */
|
|
21
|
+
image: ThumbnailUrl
|
|
22
|
+
/** The media URLs or objects. */
|
|
23
|
+
media: MediaUrl[]
|
|
24
|
+
/** The buttons to be displayed on the card. */
|
|
25
|
+
buttons: CardAction[]
|
|
26
|
+
/** Indicates whether the card is shareable. */
|
|
27
|
+
shareable: boolean
|
|
28
|
+
/** Indicates whether the card should auto-loop. */
|
|
29
|
+
autoloop: boolean
|
|
30
|
+
/** Indicates whether the card should auto-start. */
|
|
31
|
+
autostart: boolean
|
|
32
|
+
/** The aspect ratio of the card. */
|
|
33
|
+
aspect: string
|
|
34
|
+
/** The duration of the animation. */
|
|
35
|
+
duration: string
|
|
36
|
+
/** Additional value for the card. */
|
|
37
|
+
value: any
|
|
38
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright(c) Microsoft Corporation.All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { CardAction } from '@microsoft/agents-activity'
|
|
7
|
+
import { MediaUrl } from './mediaUrl'
|
|
8
|
+
import { ThumbnailUrl } from './thumbnailUrl'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Interface representing an Audio Card.
|
|
12
|
+
*/
|
|
13
|
+
export interface AudioCard {
|
|
14
|
+
/** The title of the card. */
|
|
15
|
+
title: string
|
|
16
|
+
/** The subtitle of the card. */
|
|
17
|
+
subtitle: string
|
|
18
|
+
/** The text content of the card. */
|
|
19
|
+
text: string
|
|
20
|
+
/** The image to be displayed on the card. */
|
|
21
|
+
image: ThumbnailUrl
|
|
22
|
+
/** The media URLs or objects. */
|
|
23
|
+
media: MediaUrl[]
|
|
24
|
+
/** The buttons to be displayed on the card. */
|
|
25
|
+
buttons: CardAction[]
|
|
26
|
+
/** Indicates whether the card is shareable. */
|
|
27
|
+
shareable: boolean
|
|
28
|
+
/** Indicates whether the card should auto-loop. */
|
|
29
|
+
autoloop: boolean
|
|
30
|
+
/** Indicates whether the card should auto-start. */
|
|
31
|
+
autostart: boolean
|
|
32
|
+
/** The aspect ratio of the card. */
|
|
33
|
+
aspect: string
|
|
34
|
+
/** The duration of the audio. */
|
|
35
|
+
duration: string
|
|
36
|
+
/** Additional value for the card. */
|
|
37
|
+
value: any
|
|
38
|
+
}
|