@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,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { Attachment, CardAction } from '@microsoft/agents-activity';
|
|
6
|
+
import { MediaUrl } from './mediaUrl';
|
|
7
|
+
import { AnimationCard } from './animationCard';
|
|
8
|
+
import { AudioCard } from './audioCard';
|
|
9
|
+
import { HeroCard } from './heroCard';
|
|
10
|
+
import { ReceiptCard } from './receiptCard';
|
|
11
|
+
import { O365ConnectorCard } from './o365ConnectorCard';
|
|
12
|
+
import { ThumbnailCard } from './thumbnailCard';
|
|
13
|
+
import { VideoCard } from './videoCard';
|
|
14
|
+
import { CardImage } from './cardImage';
|
|
15
|
+
import { SigningResource } from '../oauth/signingResource';
|
|
16
|
+
/**
|
|
17
|
+
* Factory class for creating various types of cards.
|
|
18
|
+
*/
|
|
19
|
+
export declare class CardFactory {
|
|
20
|
+
static contentTypes: any;
|
|
21
|
+
/**
|
|
22
|
+
* Creates an adaptive card attachment.
|
|
23
|
+
* @param card The adaptive card content.
|
|
24
|
+
* @returns The adaptive card attachment.
|
|
25
|
+
*/
|
|
26
|
+
static adaptiveCard(card: any): Attachment;
|
|
27
|
+
/**
|
|
28
|
+
* Creates an animation card attachment.
|
|
29
|
+
* @param title The title of the card.
|
|
30
|
+
* @param media The media URLs or objects.
|
|
31
|
+
* @param buttons The optional buttons for the card.
|
|
32
|
+
* @param other Additional properties for the card.
|
|
33
|
+
* @returns The animation card attachment.
|
|
34
|
+
*/
|
|
35
|
+
static animationCard(title: string, media: (MediaUrl | string)[], buttons?: (CardAction | string)[], other?: Partial<AnimationCard>): Attachment;
|
|
36
|
+
/**
|
|
37
|
+
* Creates an audio card attachment.
|
|
38
|
+
* @param title The title of the card.
|
|
39
|
+
* @param media The media URLs or objects.
|
|
40
|
+
* @param buttons The optional buttons for the card.
|
|
41
|
+
* @param other Additional properties for the card.
|
|
42
|
+
* @returns The audio card attachment.
|
|
43
|
+
*/
|
|
44
|
+
static audioCard(title: string, media: (MediaUrl | string)[], buttons?: (CardAction | string)[], other?: Partial<AudioCard>): Attachment;
|
|
45
|
+
/**
|
|
46
|
+
* Creates a hero card attachment.
|
|
47
|
+
* @param title The title of the card.
|
|
48
|
+
* @param text The optional text for the card.
|
|
49
|
+
* @param images The optional images for the card.
|
|
50
|
+
* @param buttons The optional buttons for the card.
|
|
51
|
+
* @param other Additional properties for the card.
|
|
52
|
+
* @returns The hero card attachment.
|
|
53
|
+
*/
|
|
54
|
+
static heroCard(title: string, text?: any, images?: any, buttons?: any, other?: Partial<HeroCard>): Attachment;
|
|
55
|
+
/**
|
|
56
|
+
* Creates a receipt card attachment.
|
|
57
|
+
* @param card The receipt card content.
|
|
58
|
+
* @returns The receipt card attachment.
|
|
59
|
+
*/
|
|
60
|
+
static receiptCard(card: ReceiptCard): Attachment;
|
|
61
|
+
/**
|
|
62
|
+
* Creates an O365 connector card attachment.
|
|
63
|
+
* @param card The O365 connector card content.
|
|
64
|
+
* @returns The O365 connector card attachment.
|
|
65
|
+
*/
|
|
66
|
+
static o365ConnectorCard(card: O365ConnectorCard): Attachment;
|
|
67
|
+
/**
|
|
68
|
+
* Creates a thumbnail card attachment.
|
|
69
|
+
* @param title The title of the card.
|
|
70
|
+
* @param text The optional text for the card.
|
|
71
|
+
* @param images The optional images for the card.
|
|
72
|
+
* @param buttons The optional buttons for the card.
|
|
73
|
+
* @param other Additional properties for the card.
|
|
74
|
+
* @returns The thumbnail card attachment.
|
|
75
|
+
*/
|
|
76
|
+
static thumbnailCard(title: string, text?: any, images?: any, buttons?: any, other?: Partial<ThumbnailCard>): Attachment;
|
|
77
|
+
/**
|
|
78
|
+
* Creates a video card attachment.
|
|
79
|
+
* @param title The title of the card.
|
|
80
|
+
* @param media The media URLs or objects.
|
|
81
|
+
* @param buttons The optional buttons for the card.
|
|
82
|
+
* @param other Additional properties for the card.
|
|
83
|
+
* @returns The video card attachment.
|
|
84
|
+
*/
|
|
85
|
+
static videoCard(title: string, media: (MediaUrl | string)[], buttons?: (CardAction | string)[], other?: Partial<VideoCard>): Attachment;
|
|
86
|
+
/**
|
|
87
|
+
* Converts an array of image URLs or objects to an array of CardImage objects.
|
|
88
|
+
* @param images The image URLs or objects.
|
|
89
|
+
* @returns The array of CardImage objects.
|
|
90
|
+
*/
|
|
91
|
+
static images(images: (CardImage | string)[] | undefined): CardImage[];
|
|
92
|
+
/**
|
|
93
|
+
* Converts an array of action URLs or objects to an array of CardAction objects.
|
|
94
|
+
* @param actions The action URLs or objects.
|
|
95
|
+
* @returns The array of CardAction objects.
|
|
96
|
+
*/
|
|
97
|
+
static actions(actions: (CardAction | string)[] | undefined): CardAction[];
|
|
98
|
+
/**
|
|
99
|
+
* Creates an OAuth card attachment.
|
|
100
|
+
* @param connectionName The connection name.
|
|
101
|
+
* @param title The title of the card.
|
|
102
|
+
* @param text The optional text for the card.
|
|
103
|
+
* @param signingResource The signing resource.
|
|
104
|
+
* @returns The OAuth card attachment.
|
|
105
|
+
*/
|
|
106
|
+
static oauthCard(connectionName: string, title: string, text: string, signingResource: SigningResource): Attachment;
|
|
107
|
+
/**
|
|
108
|
+
* Converts an array of media URLs or objects to an array of MediaUrl objects.
|
|
109
|
+
* @param links The media URLs or objects.
|
|
110
|
+
* @returns The array of MediaUrl objects.
|
|
111
|
+
*/
|
|
112
|
+
static media(links: (MediaUrl | string)[] | undefined): MediaUrl[];
|
|
113
|
+
/**
|
|
114
|
+
* Creates a media card attachment.
|
|
115
|
+
* @param contentType The content type of the card.
|
|
116
|
+
* @param title The title of the card.
|
|
117
|
+
* @param media The media URLs or objects.
|
|
118
|
+
* @param buttons The optional buttons for the card.
|
|
119
|
+
* @param other Additional properties for the card.
|
|
120
|
+
* @returns The media card attachment.
|
|
121
|
+
*/
|
|
122
|
+
private static mediaCard;
|
|
123
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.CardFactory = void 0;
|
|
8
|
+
const agents_activity_1 = require("@microsoft/agents-activity");
|
|
9
|
+
/**
|
|
10
|
+
* Factory class for creating various types of cards.
|
|
11
|
+
*/
|
|
12
|
+
class CardFactory {
|
|
13
|
+
/**
|
|
14
|
+
* Creates an adaptive card attachment.
|
|
15
|
+
* @param card The adaptive card content.
|
|
16
|
+
* @returns The adaptive card attachment.
|
|
17
|
+
*/
|
|
18
|
+
static adaptiveCard(card) {
|
|
19
|
+
return { contentType: CardFactory.contentTypes.adaptiveCard, content: card };
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Creates an animation card attachment.
|
|
23
|
+
* @param title The title of the card.
|
|
24
|
+
* @param media The media URLs or objects.
|
|
25
|
+
* @param buttons The optional buttons for the card.
|
|
26
|
+
* @param other Additional properties for the card.
|
|
27
|
+
* @returns The animation card attachment.
|
|
28
|
+
*/
|
|
29
|
+
static animationCard(title, media, buttons, other) {
|
|
30
|
+
return CardFactory.mediaCard(CardFactory.contentTypes.animationCard, title, media, buttons, other);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Creates an audio card attachment.
|
|
34
|
+
* @param title The title of the card.
|
|
35
|
+
* @param media The media URLs or objects.
|
|
36
|
+
* @param buttons The optional buttons for the card.
|
|
37
|
+
* @param other Additional properties for the card.
|
|
38
|
+
* @returns The audio card attachment.
|
|
39
|
+
*/
|
|
40
|
+
static audioCard(title, media, buttons, other) {
|
|
41
|
+
return CardFactory.mediaCard(CardFactory.contentTypes.audioCard, title, media, buttons, other);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Creates a hero card attachment.
|
|
45
|
+
* @param title The title of the card.
|
|
46
|
+
* @param text The optional text for the card.
|
|
47
|
+
* @param images The optional images for the card.
|
|
48
|
+
* @param buttons The optional buttons for the card.
|
|
49
|
+
* @param other Additional properties for the card.
|
|
50
|
+
* @returns The hero card attachment.
|
|
51
|
+
*/
|
|
52
|
+
static heroCard(title, text, images, buttons, other) {
|
|
53
|
+
const a = CardFactory.thumbnailCard(title, text, images, buttons, other);
|
|
54
|
+
a.contentType = CardFactory.contentTypes.heroCard;
|
|
55
|
+
return a;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Creates a receipt card attachment.
|
|
59
|
+
* @param card The receipt card content.
|
|
60
|
+
* @returns The receipt card attachment.
|
|
61
|
+
*/
|
|
62
|
+
static receiptCard(card) {
|
|
63
|
+
return { contentType: CardFactory.contentTypes.receiptCard, content: card };
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Creates an O365 connector card attachment.
|
|
67
|
+
* @param card The O365 connector card content.
|
|
68
|
+
* @returns The O365 connector card attachment.
|
|
69
|
+
*/
|
|
70
|
+
static o365ConnectorCard(card) {
|
|
71
|
+
return { contentType: CardFactory.contentTypes.o365ConnectorCard, content: card };
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Creates a thumbnail card attachment.
|
|
75
|
+
* @param title The title of the card.
|
|
76
|
+
* @param text The optional text for the card.
|
|
77
|
+
* @param images The optional images for the card.
|
|
78
|
+
* @param buttons The optional buttons for the card.
|
|
79
|
+
* @param other Additional properties for the card.
|
|
80
|
+
* @returns The thumbnail card attachment.
|
|
81
|
+
*/
|
|
82
|
+
static thumbnailCard(title, text, images, buttons, other) {
|
|
83
|
+
if (typeof text !== 'string') {
|
|
84
|
+
other = buttons;
|
|
85
|
+
buttons = images;
|
|
86
|
+
images = text;
|
|
87
|
+
text = undefined;
|
|
88
|
+
}
|
|
89
|
+
const card = { ...other };
|
|
90
|
+
if (title) {
|
|
91
|
+
card.title = title;
|
|
92
|
+
}
|
|
93
|
+
if (text) {
|
|
94
|
+
card.text = text;
|
|
95
|
+
}
|
|
96
|
+
if (images) {
|
|
97
|
+
card.images = CardFactory.images(images);
|
|
98
|
+
}
|
|
99
|
+
if (buttons) {
|
|
100
|
+
card.buttons = CardFactory.actions(buttons);
|
|
101
|
+
}
|
|
102
|
+
return { contentType: CardFactory.contentTypes.thumbnailCard, content: card };
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Creates a video card attachment.
|
|
106
|
+
* @param title The title of the card.
|
|
107
|
+
* @param media The media URLs or objects.
|
|
108
|
+
* @param buttons The optional buttons for the card.
|
|
109
|
+
* @param other Additional properties for the card.
|
|
110
|
+
* @returns The video card attachment.
|
|
111
|
+
*/
|
|
112
|
+
static videoCard(title, media, buttons, other) {
|
|
113
|
+
return CardFactory.mediaCard(CardFactory.contentTypes.videoCard, title, media, buttons, other);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Converts an array of image URLs or objects to an array of CardImage objects.
|
|
117
|
+
* @param images The image URLs or objects.
|
|
118
|
+
* @returns The array of CardImage objects.
|
|
119
|
+
*/
|
|
120
|
+
static images(images) {
|
|
121
|
+
const list = [];
|
|
122
|
+
(images || []).forEach((img) => {
|
|
123
|
+
if (typeof img === 'object') {
|
|
124
|
+
list.push(img);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
list.push({ url: img });
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
return list;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Converts an array of action URLs or objects to an array of CardAction objects.
|
|
134
|
+
* @param actions The action URLs or objects.
|
|
135
|
+
* @returns The array of CardAction objects.
|
|
136
|
+
*/
|
|
137
|
+
static actions(actions) {
|
|
138
|
+
const list = [];
|
|
139
|
+
(actions || []).forEach((a) => {
|
|
140
|
+
if (typeof a === 'object') {
|
|
141
|
+
list.push(a);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
list.push({
|
|
145
|
+
type: agents_activity_1.ActionTypes.ImBack,
|
|
146
|
+
value: a.toString(),
|
|
147
|
+
title: a.toString(),
|
|
148
|
+
channelData: undefined,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
return list;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Creates an OAuth card attachment.
|
|
156
|
+
* @param connectionName The connection name.
|
|
157
|
+
* @param title The title of the card.
|
|
158
|
+
* @param text The optional text for the card.
|
|
159
|
+
* @param signingResource The signing resource.
|
|
160
|
+
* @returns The OAuth card attachment.
|
|
161
|
+
*/
|
|
162
|
+
static oauthCard(connectionName, title, text, signingResource) {
|
|
163
|
+
const card = {
|
|
164
|
+
buttons: [{ type: agents_activity_1.ActionTypes.Signin, title, value: signingResource.singingLink, channelData: undefined }],
|
|
165
|
+
connectionName,
|
|
166
|
+
tokenExchangeResource: signingResource.tokenExchangeResource,
|
|
167
|
+
tokenPostResource: signingResource.tokenPostResource,
|
|
168
|
+
};
|
|
169
|
+
if (text) {
|
|
170
|
+
card.text = text;
|
|
171
|
+
}
|
|
172
|
+
return { contentType: CardFactory.contentTypes.oauthCard, content: card };
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Converts an array of media URLs or objects to an array of MediaUrl objects.
|
|
176
|
+
* @param links The media URLs or objects.
|
|
177
|
+
* @returns The array of MediaUrl objects.
|
|
178
|
+
*/
|
|
179
|
+
static media(links) {
|
|
180
|
+
const list = [];
|
|
181
|
+
(links || []).forEach((lnk) => {
|
|
182
|
+
if (typeof lnk === 'object') {
|
|
183
|
+
list.push(lnk);
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
list.push({ url: lnk });
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
return list;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Creates a media card attachment.
|
|
193
|
+
* @param contentType The content type of the card.
|
|
194
|
+
* @param title The title of the card.
|
|
195
|
+
* @param media The media URLs or objects.
|
|
196
|
+
* @param buttons The optional buttons for the card.
|
|
197
|
+
* @param other Additional properties for the card.
|
|
198
|
+
* @returns The media card attachment.
|
|
199
|
+
*/
|
|
200
|
+
static mediaCard(contentType, title, media, buttons, other) {
|
|
201
|
+
const card = { ...other };
|
|
202
|
+
if (title) {
|
|
203
|
+
card.title = title;
|
|
204
|
+
}
|
|
205
|
+
card.media = CardFactory.media(media);
|
|
206
|
+
if (buttons) {
|
|
207
|
+
card.buttons = CardFactory.actions(buttons);
|
|
208
|
+
}
|
|
209
|
+
return { contentType, content: card };
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
exports.CardFactory = CardFactory;
|
|
213
|
+
CardFactory.contentTypes = {
|
|
214
|
+
adaptiveCard: 'application/vnd.microsoft.card.adaptive',
|
|
215
|
+
animationCard: 'application/vnd.microsoft.card.animation',
|
|
216
|
+
audioCard: 'application/vnd.microsoft.card.audio',
|
|
217
|
+
heroCard: 'application/vnd.microsoft.card.hero',
|
|
218
|
+
receiptCard: 'application/vnd.microsoft.card.receipt',
|
|
219
|
+
o365ConnectorCard: 'application/vnd.microsoft.teams.card.o365connector',
|
|
220
|
+
thumbnailCard: 'application/vnd.microsoft.card.thumbnail',
|
|
221
|
+
videoCard: 'application/vnd.microsoft.card.video',
|
|
222
|
+
oauthCard: 'application/vnd.microsoft.card.oauth',
|
|
223
|
+
signinCard: 'application/vnd.microsoft.card.signin',
|
|
224
|
+
};
|
|
225
|
+
//# sourceMappingURL=cardFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cardFactory.js","sourceRoot":"","sources":["../../../src/cards/cardFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,gEAAgF;AAahF;;GAEG;AACH,MAAa,WAAW;IActB;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAE,IAAS;QAC5B,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;IAC9E,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,aAAa,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AAE,uCAAuC;CACpD,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright(c) Microsoft Corporation.All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { CardAction } from '@microsoft/agents-activity';
|
|
6
|
+
/**
|
|
7
|
+
* Interface representing a Card Image.
|
|
8
|
+
*/
|
|
9
|
+
export interface CardImage {
|
|
10
|
+
/** The URL of the image. */
|
|
11
|
+
url: string;
|
|
12
|
+
/** The alternative text for the image. */
|
|
13
|
+
alt?: string;
|
|
14
|
+
/** The action to be performed when the image is tapped. */
|
|
15
|
+
tap?: CardAction;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cardImage.js","sourceRoot":"","sources":["../../../src/cards/cardImage.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright(c) Microsoft Corporation.All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Interface representing a Fact.
|
|
7
|
+
*/
|
|
8
|
+
export interface Fact {
|
|
9
|
+
/** The key of the fact. */
|
|
10
|
+
key: string;
|
|
11
|
+
/** The value of the fact. */
|
|
12
|
+
value: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fact.js","sourceRoot":"","sources":["../../../src/cards/fact.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright(c) Microsoft Corporation.All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { CardAction } from '@microsoft/agents-activity';
|
|
6
|
+
import { CardImage } from './cardImage';
|
|
7
|
+
/**
|
|
8
|
+
* Interface representing a Hero Card.
|
|
9
|
+
*/
|
|
10
|
+
export interface HeroCard {
|
|
11
|
+
/** The title of the card. */
|
|
12
|
+
title: string;
|
|
13
|
+
/** The subtitle of the card. */
|
|
14
|
+
subtitle: string;
|
|
15
|
+
/** The text content of the card. */
|
|
16
|
+
text: string;
|
|
17
|
+
/** The images to be displayed on the card. */
|
|
18
|
+
images: CardImage[];
|
|
19
|
+
/** The buttons to be displayed on the card. */
|
|
20
|
+
buttons: CardAction[];
|
|
21
|
+
/** The action to be performed when the card is tapped. */
|
|
22
|
+
tap: CardAction;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heroCard.js","sourceRoot":"","sources":["../../../src/cards/heroCard.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './animationCard';
|
|
2
|
+
export * from './audioCard';
|
|
3
|
+
export * from './cardFactory';
|
|
4
|
+
export * from './cardImage';
|
|
5
|
+
export * from './fact';
|
|
6
|
+
export * from './heroCard';
|
|
7
|
+
export * from './mediaUrl';
|
|
8
|
+
export * from './o365ConnectorCard';
|
|
9
|
+
export * from './o365ConnectorCardActionBase';
|
|
10
|
+
export * from './o365ConnectorCardFact';
|
|
11
|
+
export * from './o365ConnectorCardImage';
|
|
12
|
+
export * from './o365ConnectorCardSection';
|
|
13
|
+
export * from './receiptCard';
|
|
14
|
+
export * from './receiptItem';
|
|
15
|
+
export * from './taskModuleAction';
|
|
16
|
+
export * from './thumbnailCard';
|
|
17
|
+
export * from './videoCard';
|
|
@@ -0,0 +1,34 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./animationCard"), exports);
|
|
18
|
+
__exportStar(require("./audioCard"), exports);
|
|
19
|
+
__exportStar(require("./cardFactory"), exports);
|
|
20
|
+
__exportStar(require("./cardImage"), exports);
|
|
21
|
+
__exportStar(require("./fact"), exports);
|
|
22
|
+
__exportStar(require("./heroCard"), exports);
|
|
23
|
+
__exportStar(require("./mediaUrl"), exports);
|
|
24
|
+
__exportStar(require("./o365ConnectorCard"), exports);
|
|
25
|
+
__exportStar(require("./o365ConnectorCardActionBase"), exports);
|
|
26
|
+
__exportStar(require("./o365ConnectorCardFact"), exports);
|
|
27
|
+
__exportStar(require("./o365ConnectorCardImage"), exports);
|
|
28
|
+
__exportStar(require("./o365ConnectorCardSection"), exports);
|
|
29
|
+
__exportStar(require("./receiptCard"), exports);
|
|
30
|
+
__exportStar(require("./receiptItem"), exports);
|
|
31
|
+
__exportStar(require("./taskModuleAction"), exports);
|
|
32
|
+
__exportStar(require("./thumbnailCard"), exports);
|
|
33
|
+
__exportStar(require("./videoCard"), exports);
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cards/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,8CAA2B;AAC3B,gDAA6B;AAC7B,8CAA2B;AAC3B,yCAAsB;AACtB,6CAA0B;AAC1B,6CAA0B;AAC1B,sDAAmC;AACnC,gEAA6C;AAC7C,0DAAuC;AACvC,2DAAwC;AACxC,6DAA0C;AAC1C,gDAA6B;AAC7B,gDAA6B;AAC7B,qDAAkC;AAClC,kDAA+B;AAC/B,8CAA2B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright(c) Microsoft Corporation.All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Represents a media URL.
|
|
7
|
+
*/
|
|
8
|
+
export interface MediaUrl {
|
|
9
|
+
/**
|
|
10
|
+
* The URL of the media.
|
|
11
|
+
*/
|
|
12
|
+
url: string;
|
|
13
|
+
/**
|
|
14
|
+
* The profile of the media.
|
|
15
|
+
*/
|
|
16
|
+
profile?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediaUrl.js","sourceRoot":"","sources":["../../../src/cards/mediaUrl.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright(c) Microsoft Corporation.All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { O365ConnectorCardActionBase } from './o365ConnectorCardActionBase';
|
|
6
|
+
import { O365ConnectorCardSection } from './o365ConnectorCardSection';
|
|
7
|
+
/**
|
|
8
|
+
* Represents an O365 connector card.
|
|
9
|
+
*/
|
|
10
|
+
export interface O365ConnectorCard {
|
|
11
|
+
/**
|
|
12
|
+
* The title of the card.
|
|
13
|
+
*/
|
|
14
|
+
title?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The text of the card.
|
|
17
|
+
*/
|
|
18
|
+
text?: string;
|
|
19
|
+
/**
|
|
20
|
+
* The summary of the card.
|
|
21
|
+
*/
|
|
22
|
+
summary?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The theme color of the card.
|
|
25
|
+
*/
|
|
26
|
+
themeColor?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The sections of the card.
|
|
29
|
+
*/
|
|
30
|
+
sections?: O365ConnectorCardSection[];
|
|
31
|
+
/**
|
|
32
|
+
* The potential actions of the card.
|
|
33
|
+
*/
|
|
34
|
+
potentialAction?: O365ConnectorCardActionBase[];
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"o365ConnectorCard.js","sourceRoot":"","sources":["../../../src/cards/o365ConnectorCard.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright(c) Microsoft Corporation.All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
export type O365ConnectorCardActionType = 'ViewAction' | 'OpenUri' | 'HttpPOST' | 'ActionCard';
|
|
6
|
+
/**
|
|
7
|
+
* Represents a base action in an O365 connector card.
|
|
8
|
+
*/
|
|
9
|
+
export interface O365ConnectorCardActionBase {
|
|
10
|
+
/**
|
|
11
|
+
* The type of the action.
|
|
12
|
+
*/
|
|
13
|
+
'@type'?: O365ConnectorCardActionType;
|
|
14
|
+
/**
|
|
15
|
+
* The name of the action.
|
|
16
|
+
*/
|
|
17
|
+
name?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The ID of the action.
|
|
20
|
+
*/
|
|
21
|
+
'@id'?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"o365ConnectorCardActionBase.js","sourceRoot":"","sources":["../../../src/cards/o365ConnectorCardActionBase.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright(c) Microsoft Corporation.All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Represents a fact in an O365 connector card.
|
|
7
|
+
*/
|
|
8
|
+
export interface O365ConnectorCardFact {
|
|
9
|
+
/**
|
|
10
|
+
* The name of the fact.
|
|
11
|
+
*/
|
|
12
|
+
name?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The value of the fact.
|
|
15
|
+
*/
|
|
16
|
+
value?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"o365ConnectorCardFact.js","sourceRoot":"","sources":["../../../src/cards/o365ConnectorCardFact.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|