From 25bf71722c1a12fa0c12b5208ebb47d4b95cc835 Mon Sep 17 00:00:00 2001 From: Tanner Barlow Date: Thu, 7 May 2020 11:32:10 -0700 Subject: [PATCH] ci: Merge master back into dev (#440) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: ConfigService for centralizing configuration and simplifying BaseService (#338) `ConfigService` and its usage. This removes the configuration logic from `BaseService` and keeps it all in one place. Also adds some constants for default configuration. * release: Update prerelease version to 1.0.2-0 ***NO_CI*** * fix: Sync triggers on external package deployment (#339) Fix updating of function app settings (SDK call wasn't working) and syncing triggers for function apps running from external package. * release: Update prerelease version to 1.0.2-1 ***NO_CI*** * ci: fix failing Node 8 builds on windows agent (#345) Hosted agent roll out a fix that broke our builds: 1. Previously, npm wasn’t getting packaged with the version of node in the tool cache, ie. npm 5.6.0 should be used alongside Node 8.10.0. 1. The fix is to pin to a later version of Node 8 (e.g. 8.16.1) which comes with npm 6+ - https://nodejs.org/en/download/releases/. * This will probably slow the build down a little bit since the agent will have to download the version (instead of it being pre-installed), but we'll get the right version of npm for free. * fix job name * fix job name restrictiosn * still trying to get the right job name format * clean up job name * release: Update prerelease version to 1.0.2-2 ***NO_CI*** * release: Update prerelease version to 1.0.2-3 ***NO_CI*** * fix: Fix typing errors in ARM params and add interfaces (#347) * release: Update prerelease version to 1.0.2-4 ***NO_CI*** * fix: Update to support CosmosDB bindings (#350) Updatings the binding schema that is generated to support the changes made to Cosmos DB * release: Update prerelease version to 1.0.2-5 ***NO_CI*** * feat: Refactor runtime configuration to allow for non-node runtimes (#348) - Added `FunctionRuntime` configuration to provider - Extracting `FunctionRuntime` from `runtime` property of configuration within `ConfigService` - Refactored node-specific code in ARM template generation * release: Update prerelease version to 1.0.2-6 ***NO_CI*** * fix: Update GitHub Issue and PR templates (#353) * release: Update prerelease version to 1.0.2-7 ***NO_CI*** * fix: Sort deployments in descending order and fix APIM arm template (#354) - Updated parameter name in APIM arm template - Fixed bug of sorting deployments in ascending order, when it should have been descending. This would have pretty serious consequences, because it means that the comparison of ARM templates would always be targeting the first ever deployment, not the most recent. - Because the `sort()` function sorts the array in place, this bug was not being detected by the tests. Updated `resourceService` tests to create copies of the array rather than using the original reference when testing the validity of the result. * release: Update prerelease version to 1.0.2-8 ***NO_CI*** * release: Update patch version to 1.0.2 ***NO_CI*** * ci: Add GitHub workflow to move new issues to "To triage" column (#381) * build(deps): bump handlebars from 4.1.2 to 4.5.3 (#400) Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.2 to 4.5.3. - [Release notes](https://github.com/wycats/handlebars.js/releases) - [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md) - [Commits](https://github.com/wycats/handlebars.js/compare/v4.1.2...v4.5.3) Signed-off-by: dependabot[bot] * Fix displayName for cosmosDBTrigger (#399) * Update bindings.json Co-authored-by: sls-az@microsoft.com Co-authored-by: My Co-authored-by: Wallace Breza Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ofek Bashan --- .github/workflows/main.yml | 13 + package-lock.json | 21 +- src/armTemplates/resources/appServicePlan.ts | 6 + src/services/configService.ts | 1 - src/shared/bindings.json | 2521 +++++++----------- src/shared/bindings.ts | 18 +- 6 files changed, 954 insertions(+), 1626 deletions(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..5ba5ab97 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,13 @@ +name: "Add new issues to 'To triage' column" +on: + issues: + types: [opened] +jobs: + Add_New_Issue_To_Project: + runs-on: ubuntu-latest + steps: + - uses: konradpabjan/actions-add-new-issue-to-column@v1.1 + with: + action-token: "${{ secrets.ACCESS_TOKEN }}" + project-url: "https://github.com/serverless/serverless-azure-functions/projects/1" + column-name: "To triage" diff --git a/package-lock.json b/package-lock.json index ef46e18c..719e14a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6622,9 +6622,9 @@ "dev": true }, "handlebars": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", - "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz", + "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==", "dev": true, "requires": { "neo-async": "^2.6.0", @@ -6633,6 +6633,13 @@ "uglify-js": "^3.1.4" }, "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "optional": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -6640,13 +6647,13 @@ "dev": true }, "uglify-js": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", - "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.3.tgz", + "integrity": "sha512-7tINm46/3puUA4hCkKYo4Xdts+JDaVC9ZPRcG8Xw9R4nhO/gZgUM3TENq8IF4Vatk8qCig4MzP/c8G4u2BkVQg==", "dev": true, "optional": true, "requires": { - "commander": "~2.20.0", + "commander": "~2.20.3", "source-map": "~0.6.1" } } diff --git a/src/armTemplates/resources/appServicePlan.ts b/src/armTemplates/resources/appServicePlan.ts index 7209e564..14d747dc 100644 --- a/src/armTemplates/resources/appServicePlan.ts +++ b/src/armTemplates/resources/appServicePlan.ts @@ -16,6 +16,12 @@ interface AppServicePlanParams extends DefaultArmParams { appServicePlanReserved: ArmParameter; } +interface AppServicePlanParams extends DefaultArmParams { + appServicePlanName: ArmParameter; + appServicePlanSkuName: ArmParameter; + appServicePlanSkuTier: ArmParameter; +} + export class AppServicePlanResource implements ArmResourceTemplateGenerator { public static getResourceName(config: ServerlessAzureConfig) { const options: AzureNamingServiceOptions = { diff --git a/src/services/configService.ts b/src/services/configService.ts index 000f5cc8..62cf362d 100644 --- a/src/services/configService.ts +++ b/src/services/configService.ts @@ -150,7 +150,6 @@ export class ConfigService { if (!providerRegion || providerRegion === awsRegion) { config.provider.region = this.serverless.service.provider["location"] || region; } - if (!config.provider.stage) { config.provider.stage = stage; } diff --git a/src/shared/bindings.json b/src/shared/bindings.json index 828a5625..ea3253bc 100644 --- a/src/shared/bindings.json +++ b/src/shared/bindings.json @@ -56,6 +56,122 @@ } ] }, + { + "type": "eventHubTrigger", + "displayName": "$eventHubTrigger_displayName", + "direction": "trigger", + "enabledInTryMode": false, + "documentation": "$content=Documentation\\eventHubTrigger.md", + "settings": [ + { + "name": "name", + "value": "string", + "defaultValue": "myEventHubMessage", + "required": true, + "label": "$eventHubTrigger_name_label", + "help": "$eventHubTrigger_name_help", + "validators": [ + { + "expression": "^[a-zA-Z][a-zA-Z0-9]{0,127}$", + "errorText": "[variables('parameterName')]" + } + ] + }, + { + "name": "eventHubName", + "value": "string", + "defaultValue": "myeventhub", + "required": true, + "label": "$eventHubOut_path_label", + "help": "$eventHubTrigger_path_help", + "validators": [ + { + "expression": "^[a-z0-9]$|^[a-z0-9][a-z0-9-_.]{0,48}[a-z0-9]$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", + "errorText": "$eventHubTrigger_path_errorText" + } + ] + }, + { + "name": "consumerGroup", + "value": "string", + "defaultValue": "$Default", + "required": false, + "label": "$eventHubTrigger_consumerGroup_label", + "help": "$eventHubTrigger_consumerGroup_help", + "validators": [ + { + "expression": "(^[a-z0-9]$|^[a-z0-9][a-z0-9-_.]{0,48}[a-z0-9]$)|^\\$Default$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", + "errorText": "$eventHubTrigger_consumerGroup_errorText" + } + ] + }, + { + "name": "connection", + "value": "string", + "resource": "EventHub", + "required": true, + "label": "$eventHubTrigger_connection_label", + "help": "$eventHubTrigger_connection_help", + "placeholder": "[variables('selectConnection')]" + } + ] + }, + { + "type": "eventHub", + "displayName": "$eventHubOut_displayName", + "direction": "out", + "enabledInTryMode": false, + "actions": [ + { + "template": "EventHubTrigger", + "binding": "eventHubTrigger", + "settings": [ + "path", + "connection" + ] + } + ], + "documentation": "$content=Documentation\\eventHubOut.md", + "settings": [ + { + "name": "name", + "value": "string", + "defaultValue": "outputEventHubMessage", + "required": true, + "label": "$eventHubOut_name_label", + "help": "$eventHubOut_name_help", + "validators": [ + { + "expression": "(^[a-zA-Z][a-zA-Z0-9]{0,127}$)|^\\$return$", + "errorText": "[variables('parameterName')]" + } + ] + }, + { + "name": "path", + "value": "string", + "defaultValue": "outeventhub", + "required": true, + "label": "$eventHubOut_path_label", + "help": "$eventHubOut_path_help", + "validators": [ + { + "expression": "^[a-z0-9]$|^[a-z0-9][a-z0-9-_.]{0,48}[a-z0-9]$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", + "errorText": "$eventHubOut_path_errorText" + } + ] + }, + { + "name": "connection", + "value": "string", + "resource": "EventHub", + "required": true, + "label": "$eventHubOut_connection_label", + "help": "$eventHubOut_connection_help", + "placeholder": "[variables('selectConnection')]" + } + ] + }, { "type": "queue", "displayName": "$queueOut_displayName", @@ -72,10 +188,6 @@ } ], "documentation": "$content=Documentation\\queueOut.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.Storage", - "version": "3.0.4" - }, "settings": [ { "name": "name", @@ -122,10 +234,6 @@ "direction": "trigger", "enabledInTryMode": true, "documentation": "$content=Documentation\\queueTrigger.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.Storage", - "version": "3.0.4" - }, "settings": [ { "name": "name", @@ -182,10 +290,6 @@ } ], "documentation": "$content=Documentation\\blobOut.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.Storage", - "version": "3.0.4" - }, "settings": [ { "name": "name", @@ -210,7 +314,7 @@ "help": "$blobOut_path_help", "validators": [ { - "expression": "((^[a-z0-9](?:[a-z0-9]|(?:\\-(?!\\-))){1,61}[a-z0-9])|(^[{][a-zA-Z0-9]{1,126}[}])|(^[%][a-zA-Z0-9]{1,126}[%]))[\\/](\\S){0,1023}[^\\/]$|(^[{][a-zA-Z0-9]{1,126}[}]$)|(^[%][a-zA-Z0-9]{1,126}[%]$)", + "expression": "^[a-z0-9{](?:[a-z0-9{}]|(?:\\-(?!\\-))){1,61}[a-z0-9{}][\\/](\\S){0,1023}[^\\/]$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", "errorText": "$blobOut_path_errorText" } ] @@ -232,10 +336,6 @@ "direction": "in", "enabledInTryMode": true, "documentation": "$content=Documentation\\blobIn.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.Storage", - "version": "3.0.4" - }, "settings": [ { "name": "name", @@ -260,7 +360,7 @@ "help": "$blobIn_path_help", "validators": [ { - "expression": "((^[a-z0-9](?:[a-z0-9]|(?:\\-(?!\\-))){1,61}[a-z0-9])|(^[{][a-zA-Z0-9]{1,126}[}])|(^[%][a-zA-Z0-9]{1,126}[%]))[\\/](\\S){0,1023}[^\\/]$|(^[{][a-zA-Z0-9]{1,126}[}]$)|(^[%][a-zA-Z0-9]{1,126}[%]$)", + "expression": "^[a-z0-9{](?:[a-z0-9{}]|(?:\\-(?!\\-))){1,61}[a-z0-9{}][\\/](\\S){0,1023}[^\\/]$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", "errorText": "$blobIn_patherrorText" } ] @@ -282,10 +382,6 @@ "direction": "trigger", "enabledInTryMode": true, "documentation": "$content=Documentation\\blobTrigger.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.Storage", - "version": "3.0.4" - }, "settings": [ { "name": "name", @@ -310,7 +406,7 @@ "help": "$blobTrigger_path_help", "validators": [ { - "expression": "(((^[a-z0-9](?:[a-z0-9]|(?:\\-(?!\\-))){1,61}[a-z0-9])|(^[{][a-zA-Z0-9]{1,126}[}])|(^[%][a-zA-Z0-9]{1,126}[%]))[\\/](\\S){0,1023}[^\\/]$)|(((^[a-z0-9](?:[a-z0-9]|(?:\\-(?!\\-))){1,61}[a-z0-9]$)|(^[{][a-zA-Z0-9]{1,126}[}]$)|(^[%][a-zA-Z0-9]{1,126}[%]$)))", + "expression": "(^[a-z0-9{](?:[a-z0-9{}]|(?:\\-(?!\\-))){1,61}[a-z0-9{}]$)|(^[a-z0-9{](?:[a-z0-9{}]|(?:\\-(?!\\-))){1,61}[a-z0-9{}][\\/](\\S){0,1023}[^\\/]$)|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", "errorText": "$blobTrigger_path_errorText" } ] @@ -327,19 +423,19 @@ ] }, { - "type": "httpTrigger", - "displayName": "$httpTrigger_displayName", - "direction": "trigger", - "enabledInTryMode": true, - "documentation": "$content=Documentation\\httpTrigger.md", + "type": "apiHubFile", + "displayName": "$apiHubFileIn_displayName", + "direction": "in", + "enabledInTryMode": false, + "documentation": "$content=Documentation\\apiHubFileIn.md", "settings": [ { "name": "name", "value": "string", - "defaultValue": "req", + "defaultValue": "inputFile", "required": true, - "label": "$httpTrigger_name_label", - "help": "$httpTrigger_name_help", + "label": "$apiHubFileIn_name_label", + "help": "$apiHubFileIn_name_help", "validators": [ { "expression": "^[a-zA-Z][a-zA-Z0-9]{0,127}$", @@ -348,152 +444,84 @@ ] }, { - "name": "route", + "name": "path", "value": "string", - "required": false, - "label": "$httpTrigger_route_label", - "help": "$httpTrigger_route_help", + "defaultValue": "path/{file}", + "required": true, + "label": "$apiHubFileIn_path_label", + "help": "$apiHubFileIn_path_help", "validators": [] }, { - "name": "authLevel", - "value": "enum", - "enum": [ - { - "value": "function", - "display": "Function" - }, - { - "value": "anonymous", - "display": "Anonymous" - }, - { - "value": "admin", - "display": "Admin" - } - ], - "label": "$httpTrigger_authLevel_label", - "help": "$httpTrigger_authLevel_help" - }, - { - "name": "methods", - "value": "checkBoxList", - "defaultValue": [ - "get", - "post", - "delete", - "head", - "patch", - "put", - "options", - "trace" - ], - "enum": [ - { - "value": "get", - "display": "GET" - }, - { - "value": "post", - "display": "POST" - }, - { - "value": "delete", - "display": "DELETE" - }, - { - "value": "head", - "display": "HEAD" - }, - { - "value": "patch", - "display": "PATCH" - }, - { - "value": "put", - "display": "PUT" - }, - { - "value": "options", - "display": "OPTIONS" - }, - { - "value": "trace", - "display": "TRACE" - } - ], - "label": "$httpTrigger_methods_label", - "help": "$httpTrigger_methods_help" - } - ], - "rules": [ - { - "name": "methodRule", - "type": "exclusivity", - "values": [ - { - "value": "allMethods", - "display": "All methods", - "hiddenSettings": [ - "methods" - ], - "shownSettings": [] - }, - { - "value": "methods", - "display": "Selected methods", - "hiddenSettings": [], - "shownSettings": [ - "methods" - ] - } - ], - "label": "$httpTrigger_methodRule_label", - "help": "$httpTrigger_methodRule_help" + "name": "connection", + "value": "string", + "resource": "ApiHub", + "required": true, + "label": "$apiHubFileIn_connection_label", + "help": "$apiHubFileIn_connection_help", + "metadata": { + "capability": "blob" + } } ] }, { - "type": "http", - "displayName": "$httpOut_displayName", + "type": "apiHubFile", + "displayName": "$apiHubFileIn_displayName", "direction": "out", - "enabledInTryMode": true, - "documentation": "$content=Documentation\\httpOut.md", + "enabledInTryMode": false, + "documentation": "$content=Documentation\\apiHubFileOut.md", "settings": [ { "name": "name", "value": "string", - "defaultValue": "res", + "defaultValue": "outputFile", "required": true, - "label": "$httpOut_name_label", - "help": "$httpOut_name_help", + "label": "$apiHubFileIn_name_label", + "help": "$apiHubFileIn_name_help", "validators": [ { "expression": "(^[a-zA-Z][a-zA-Z0-9]{0,127}$)|^\\$return$", "errorText": "[variables('parameterName')]" } ] + }, + { + "name": "path", + "value": "string", + "defaultValue": "path/{file}", + "required": true, + "label": "$apiHubFileIn_path_label", + "help": "$apiHubFileIn_path_help", + "validators": [] + }, + { + "name": "connection", + "value": "string", + "resource": "ApiHub", + "required": true, + "label": "$apiHubFileIn_connection_label", + "help": "$apiHubFileIn_connection_help", + "metadata": { + "capability": "blob" + } } ] }, { - "type": "serviceBusTrigger", - "displayName": "$serviceBusTrigger_displayName", + "type": "apiHubFileTrigger", + "displayName": "$apiHubFileTrigger_displayName", "direction": "trigger", "enabledInTryMode": false, - "documentation": "$content=Documentation\\serviceBusTrigger.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.ServiceBus", - "version": "3.0.3" - }, + "documentation": "$content=Documentation\\apiHubFileTrigger.md", "settings": [ { "name": "name", "value": "string", - "defaultValue": "mySbMsg", + "defaultValue": "inputFile", "required": true, - "label": "$serviceBusTrigger_name_label", - "help": "$serviceBusTrigger_name_help", + "label": "$apiHubFileTrigger_name_label", + "help": "$apiHubFileTrigger_name_help", "validators": [ { "expression": "^[a-zA-Z][a-zA-Z0-9]{0,127}$", @@ -502,541 +530,106 @@ ] }, { - "name": "connection", + "name": "path", "value": "string", - "resource": "ServiceBus", + "defaultValue": "path/{file}", "required": true, - "label": "$serviceBusTrigger_connection_label", - "help": "$serviceBusTrigger_connection_help", - "placeholder": "[variables('selectConnection')]" - }, - { - "name": "queueName", - "value": "string", - "defaultValue": "mysbqueue", - "required": true, - "label": "$serviceBusTrigger_queueName_label", - "help": "$serviceBusTrigger_queueName_help", - "validators": [ - { - "expression": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][a-zA-Z0-9-_.]{0,48}([a-zA-Z0-9]$|[a-zA-Z0-9][\\/]\\$DeadLetterQueue$)|^[{][a-zA-Z0-9]{1,126}([}]$|[}][\\/]\\$DeadLetterQueue$)|^[%][a-zA-Z0-9]{1,126}([%]$|[%][\\/]\\$DeadLetterQueue$)", - "errorText": "$serviceBusTrigger_queueName_errorText" - } - ] - }, - { - "name": "topicName", - "value": "string", - "defaultValue": "mysbtopic", - "required": true, - "label": "$serviceBusTrigger_topicName_label", - "help": "$serviceBusTrigger_topicName_help", - "validators": [ - { - "expression": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][a-zA-Z0-9-_.]{0,48}[a-zA-Z0-9]$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", - "errorText": "$serviceBusTrigger_topicName_errorText" - } - ] - }, - { - "name": "subscriptionName", - "value": "string", - "defaultValue": "mysubscription", - "required": true, - "label": "$serviceBusTrigger_subscriptionName_label", - "help": "$serviceBusTrigger_subscriptionName_help", - "validators": [ - { - "expression": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][a-zA-Z0-9-_.]{0,48}([a-zA-Z0-9]$|[a-zA-Z0-9][\\/]\\$DeadLetterQueue$)|^[{][a-zA-Z0-9]{1,126}([}]$|[}][\\/]\\$DeadLetterQueue$)|^[%][a-zA-Z0-9]{1,126}([%]$|[%][\\/]\\$DeadLetterQueue$)", - "errorText": "$serviceBusTrigger_subscriptionName_errorText" - } - ] - } - ], - "rules": [ - { - "name": "messageType", - "type": "exclusivity", - "values": [ - { - "value": "queueName", - "display": "$serviceBusTrigger_messageType_queueName", - "hiddenSettings": [ - "topicName", - "subscriptionName" - ], - "shownSettings": [ - "queueName" - ] - }, - { - "value": "topicName", - "display": "$serviceBusTrigger_messageType_topicName", - "hiddenSettings": [ - "queueName" - ], - "shownSettings": [ - "topicName", - "subscriptionName" - ] - } - ], - "label": "$serviceBusTrigger_messageType_label", - "help": "$serviceBusTrigger_messageType_help" - } - ] - }, - { - "type": "serviceBus", - "displayName": "$serviceBusOut_displayName", - "direction": "out", - "enabledInTryMode": false, - "documentation": "$content=Documentation\\serviceBusOut.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.ServiceBus", - "version": "3.0.3" - }, - "settings": [ - { - "name": "connection", - "value": "string", - "resource": "ServiceBus", - "required": true, - "label": "$serviceBusOut_connection_label", - "help": "$serviceBusOut_connection_help", - "placeholder": "[variables('selectConnection')]" - }, - { - "name": "name", - "value": "string", - "defaultValue": "outputSbMsg", - "required": true, - "label": "$serviceBusOut_name_label", - "help": "$serviceBusOut_name_help", - "validators": [ - { - "expression": "(^[a-zA-Z][a-zA-Z0-9]{0,127}$)|^\\$return$", - "errorText": "[variables('parameterName')]" - } - ] - }, - { - "name": "queueName", - "value": "string", - "defaultValue": "outqueue", - "required": true, - "label": "$serviceBusOut_queueName_label", - "help": "$serviceBusOut_queueName_help", - "validators": [ - { - "expression": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][a-zA-Z0-9-_.]{0,48}([a-zA-Z0-9]$|[a-zA-Z0-9][\\/]\\$DeadLetterQueue$)|^[{][a-zA-Z0-9]{1,126}([}]$|[}][\\/]\\$DeadLetterQueue$)|^[%][a-zA-Z0-9]{1,126}([%]$|[%][\\/]\\$DeadLetterQueue$)", - "errorText": "$serviceBusOut_queueName_errorText" - } - ] - }, - { - "name": "topicName", - "value": "string", - "defaultValue": "outtopic", - "required": true, - "label": "$serviceBusOut_topicName_label", - "help": "$serviceBusOut_topicName_help", - "validators": [ - { - "expression": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][a-zA-Z0-9-_.]{0,48}[a-zA-Z0-9]$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", - "errorText": "$serviceBusOut_topicName_errorText" - } - ] - } - ], - "rules": [ - { - "name": "messageType", - "type": "exclusivity", - "values": [ - { - "value": "queueName", - "display": "$serviceBusOut_messageType_queueName", - "hiddenSettings": [ - "topicName" - ], - "shownSettings": [ - "queueName" - ] - }, - { - "value": "topicName", - "display": "$serviceBusOut_messageType_topicName", - "hiddenSettings": [ - "queueName" - ], - "shownSettings": [ - "topicName" - ] - } - ], - "label": "$serviceBusOut_messageType_label", - "help": "$serviceBusOut_messageType_help" - } - ] - }, - { - "type": "table", - "displayName": "$tableout_displayName", - "direction": "out", - "enabledInTryMode": true, - "documentation": "$content=Documentation\\tableOut.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.Storage", - "version": "3.0.4" - }, - "settings": [ - { - "name": "name", - "value": "string", - "defaultValue": "outputTable", - "required": true, - "label": "$tableout_name_label", - "help": "$tableout_name_help", - "validators": [ - { - "expression": "(^[a-zA-Z][a-zA-Z0-9]{0,127}$)|^\\$return$", - "errorText": "[variables('parameterName')]" - } - ] - }, - { - "name": "tableName", - "value": "string", - "defaultValue": "outTable", - "required": true, - "label": "$table_tableName_label", - "help": "$table_tableName_help", - "validators": [ - { - "expression": "^[A-Za-z][A-Za-z0-9]{2,62}$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", - "errorText": "$table_tableName_errorText" - } - ] - }, - { - "name": "connection", - "value": "string", - "resource": "Storage", - "required": true, - "label": "[variables('storageConnStringLabel')]", - "help": "[variables('appSettingsHelp')]", - "placeholder": "[variables('selectConnection')]" - } - ] - }, - { - "type": "table", - "displayName": "$tableIn_displayName", - "direction": "in", - "enabledInTryMode": true, - "documentation": "$content=Documentation\\tableIn.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.Storage", - "version": "3.0.4" - }, - "settings": [ - { - "name": "name", - "value": "string", - "defaultValue": "inputTable", - "required": true, - "label": "$tableIn_name_label", - "help": "$tableIn_name_help", - "validators": [ - { - "expression": "^[a-zA-Z][a-zA-Z0-9]{0,127}$", - "errorText": "[variables('parameterName')]" - } - ] - }, - { - "name": "tableName", - "value": "string", - "defaultValue": "inTable", - "required": true, - "label": "$tableIn_tableName_label", - "help": "$tableIn_tableName_help", - "validators": [ - { - "expression": "^[A-Za-z][A-Za-z0-9]{2,62}$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", - "errorText": "$tableIn_tableName_errorText" - } - ] - }, - { - "name": "partitionKey", - "value": "string", - "required": false, - "label": "$tableIn_partitionKey_label", - "help": "$tableIn_partitionKey_help" - }, - { - "name": "rowKey", - "value": "string", - "required": false, - "label": "$tableIn_rowKey_label", - "help": "$tableIn_rowKey_help" - }, - { - "name": "take", - "value": "int", - "defaultValue": 50, - "required": false, - "label": "$tableIn_take_label", - "help": "$tableIn_take_help" - }, - { - "name": "filter", - "value": "string", - "required": false, - "label": "$tableIn_filter_label", - "help": "$tableIn_filter_help" - }, - { - "name": "connection", - "value": "string", - "resource": "Storage", - "required": true, - "label": "[variables('storageConnStringLabel')]", - "help": "[variables('appSettingsHelp')]", - "placeholder": "[variables('selectConnection')]" - } - ] - }, - { - "type": "eventHubTrigger", - "displayName": "$eventHubTrigger_displayName", - "direction": "trigger", - "enabledInTryMode": false, - "documentation": "$content=Documentation\\eventHubTrigger.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.EventHubs", - "version": "3.0.3" - }, - "settings": [ - { - "name": "name", - "value": "string", - "defaultValue": "myEventHubMessage", - "required": true, - "label": "$eventHubTrigger_name_label", - "help": "$eventHubTrigger_name_help", - "validators": [ - { - "expression": "^[a-zA-Z][a-zA-Z0-9]{0,127}$", - "errorText": "[variables('parameterName')]" - } - ] - }, - { - "name": "connection", - "value": "string", - "resource": "EventHub", - "required": true, - "label": "$eventHubTrigger_connection_label", - "help": "$eventHubTrigger_connection_help", - "placeholder": "[variables('selectConnection')]" - }, - { - "name": "eventHubName", - "value": "string", - "defaultValue": "myeventhub", - "required": true, - "label": "$eventHubOut_path_label", - "help": "$eventHubTrigger_path_help", - "validators": [ - { - "expression": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][a-zA-Z0-9-_.]{0,48}[a-zA-Z0-9]$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", - "errorText": "$eventHubTrigger_path_errorText" - } - ] - }, - { - "name": "consumerGroup", - "value": "string", - "defaultValue": "$Default", - "required": false, - "label": "$eventHubTrigger_consumerGroup_label", - "help": "$eventHubTrigger_consumerGroup_help", - "validators": [ - { - "expression": "(^[a-zA-Z0-9]$|^[a-zA-Z0-9][a-zA-Z0-9-_.]{0,48}[a-zA-Z0-9]$)|^\\$Default$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", - "errorText": "$eventHubTrigger_consumerGroup_errorText" - } - ] - }, - { - "name": "cardinality", - "value": "enum", - "required": false, - "defaultValue": "many", - "enum": [ - { - "value": "one", - "display": "One" - }, - { - "value": "many", - "display": "Many" - } - ], - "label": "$eventHubTrigger_cardinality_label", - "help": "$eventHubTrigger_cardinality_help" - } - ] - }, - { - "type": "eventHub", - "displayName": "$eventHubOut_displayName", - "direction": "out", - "enabledInTryMode": false, - "actions": [ - { - "template": "EventHubTrigger", - "binding": "eventHubTrigger", - "settings": [ - "connection", - "path" - ] - } - ], - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.EventHubs", - "version": "3.0.3" - }, - "documentation": "$content=Documentation\\eventHubOut.md", - "settings": [ - { - "name": "name", - "value": "string", - "defaultValue": "outputEventHubMessage", - "required": true, - "label": "$eventHubOut_name_label", - "help": "$eventHubOut_name_help", - "validators": [ - { - "expression": "(^[a-zA-Z][a-zA-Z0-9]{0,127}$)|^\\$return$", - "errorText": "[variables('parameterName')]" - } - ] + "label": "$apiHubFileTrigger_path_label", + "help": "$apiHubFileTrigger_path_help", + "validators": [] }, { "name": "connection", "value": "string", - "resource": "EventHub", - "required": true, - "label": "$eventHubOut_connection_label", - "help": "$eventHubOut_connection_help", - "placeholder": "[variables('selectConnection')]" - }, - { - "name": "eventHubName", - "value": "string", - "defaultValue": "outeventhub", - "required": true, - "label": "$eventHubOut_path_label", - "help": "$eventHubOut_path_help", - "validators": [ - { - "expression": "^[a-zA-Z0-9]$|^[a-zA-Z0-9][a-zA-Z0-9-_.]{0,48}[a-zA-Z0-9]$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", - "errorText": "$eventHubOut_path_errorText" - } - ] + "resource": "ApiHub", + "required": true, + "label": "$apiHubFileTrigger_connection_label", + "help": "$apiHubFileTrigger_connection_help", + "metadata": { + "capability": "blob", + "excluded": [ + "googledrive", + "azureblob" + ] + } } ] }, { - "type": "sendGrid", - "displayName": "$sendGrid_displayName", - "direction": "out", + "type": "apiHubTable", + "displayName": "$apiHubTableIn_displayName", + "direction": "in", "enabledInTryMode": false, - "documentation": "$content=Documentation\\sendGridOut.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.SendGrid", - "version": "3.0.0" - }, + "documentation": "$content=Documentation\\apiHubTable.md", "settings": [ { "name": "name", "value": "string", - "defaultValue": "message", + "defaultValue": "inputTable", "required": true, - "label": "$sendGrid_name_label", - "help": "$sendGrid_name_help", + "label": "[variables('paramNameLabel')]", + "help": "[variables('paramNameInputHelp')]", "validators": [ { - "expression": "(^[a-zA-Z][a-zA-Z0-9]{0,127}$)|^\\$return$", + "expression": "^[a-zA-Z][a-zA-Z0-9]{0,127}$", "errorText": "[variables('parameterName')]" } ] }, { - "name": "apiKey", - "resource": "AppSetting", - "value": "string", - "defaultValue": "SendGridApiKey", - "required": true, - "label": "$sendGrid_apiKey_label", - "help": "$sendGrid_apiKey_help" - }, - { - "name": "to", + "name": "dataSetName", "value": "string", - "defaultValue": "", + "defaultValue": "default", "required": false, - "label": "$sendGrid_to_label", - "help": "$sendGrid_to_help" + "label": "[variables('apiHubTableDataSetLabel')]", + "help": "[variables('apiHubTableDataSetHelp')]", + "validators": [] }, { - "name": "from", + "name": "tableName", "value": "string", - "defaultValue": "", + "defaultValue": null, "required": false, - "label": "$sendGrid_from_label", - "help": "$sendGrid_from_help" + "label": "[variables('apiHubTableNameLabel')]", + "help": "[variables('apiHubTableHelp')]", + "validators": [] }, { - "name": "subject", + "name": "entityId", "value": "string", - "defaultValue": "", + "defaultValue": null, "required": false, - "label": "$sendGrid_subject_label", - "help": "$sendGrid_subject_help" + "label": "[variables('apiHubTableEntityLabel')]", + "help": "[variables('apiHubTableEntityHelp')]", + "validators": [] }, { - "name": "text", + "name": "connection", "value": "string", - "defaultValue": "", - "required": false, - "label": "$sendGrid_text_label", - "help": "$sendGrid_text_help" + "resource": "ApiHub", + "required": true, + "label": "[variables('apiHubTableConnectionLabel')]", + "help": "[variables('apiHubTableConnectionHelp')]", + "metadata": { + "capability": "tabular" + } } ] }, { - "type": "twilioSms", - "displayName": "$twilioSms_displayName", + "type": "apiHubTable", + "displayName": "$apiHubTableOut_displayName", "direction": "out", "enabledInTryMode": false, - "documentation": "$content=Documentation\\twilioSmsOut.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.Twilio", - "version": "3.0.0" - }, + "documentation": "$content=Documentation\\apiHubTableOut.md", "settings": [ { "name": "name", "value": "string", - "defaultValue": "message", + "defaultValue": "outputTable", "required": true, - "label": "$twilioSms_name_label", - "help": "$twilioSms_name_help", + "label": "[variables('paramNameLabel')]", + "help": "[variables('paramNameOutputHelp')]", "validators": [ { "expression": "(^[a-zA-Z][a-zA-Z0-9]{0,127}$)|^\\$return$", @@ -1045,975 +638,685 @@ ] }, { - "name": "accountSidSetting", - "value": "string", - "defaultValue": "TwilioAccountSid", - "required": true, - "label": "$twilioSms_accountsid_label", - "help": "$twilioSms_accountsid_help" - }, - { - "name": "authTokenSetting", - "value": "string", - "defaultValue": "TwilioAuthToken", - "required": true, - "label": "$twilioSms_authtoken_label", - "help": "$twilioSms_authtoken_help" - }, - { - "name": "from", - "value": "string", - "defaultValue": "", - "required": false, - "label": "$twilioSms_from_label", - "help": "$twilioSms_from_help" - }, - { - "name": "body", + "name": "dataSetName", "value": "string", - "defaultValue": "", + "defaultValue": "default", "required": false, - "label": "$twilioSms_body_label", - "help": "$twilioSms_body_help" - } - ] - }, - { - "type": "token", - "displayName": "$token_displayName", - "direction": "in", - "enabledInTryMode": false, - "documentation": "$content=Documentation\\Token.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.AuthTokens", - "version": "1.0.0-beta6" - }, - "AADPermissions": [ - { - "resourceAppId": "00000002-0000-0000-c000-000000000000", - "resourceAccess": [ - { - "type": "Scope", - "id": "311a71cc-e848-46a1-bdf8-97ff7156d8e6" - } - ] - } - ], - "settings": [ - { - "name": "name", - "value": "string", - "defaultValue": "token", - "required": true, - "label": "$token_in_name_label", - "help": "$token_in_name_help" - }, - { - "name": "resource", - "value": "string", - "required": true, - "label": "$token_in_resource_label", - "help": "$token_in_resource_help" + "label": "[variables('apiHubTableDataSetLabel')]", + "help": "[variables('apiHubTableDataSetHelp')]", + "validators": [] }, { - "name": "userId", + "name": "tableName", "value": "string", + "defaultValue": null, "required": false, - "label": "$userid_label", - "help": "$userid_help" + "label": "[variables('apiHubTableNameLabel')]", + "help": "[variables('apiHubTableHelp')]", + "validators": [] }, { - "name": "userToken", + "name": "entityId", "value": "string", + "defaultValue": null, "required": false, - "label": "$usertoken_label", - "help": "$usertoken_help" - } - ], - "rules": [ - { - "name": "identity", - "type": "exclusivitySave", - "values": [ - { - "value": "UserFromRequest", - "display": "$identity_option_userFromRequest_label", - "hiddenSettings": [ - "userId", - "userToken" - ], - "shownSettings": [] - }, - { - "value": "userFromId", - "display": "$identity_option_userFromId_label", - "hiddenSettings": [ - "userToken" - ], - "shownSettings": [ - "userId" - ] - }, - { - "value": "userFromToken", - "display": "$identity_option_userFromToken_label", - "hiddenSettings": [ - "userId" - ], - "shownSettings": [ - "userToken" - ] - }, - { - "value": "ClientCredentials", - "display": "$identity_option_clientCredentials_label", - "hiddenSettings": [ - "userId", - "userToken" - ], - "shownSettings": [] - } - ], - "label": "$Identity_label", - "help": "$Identity_help" - } - ] - }, - { - "type": "excel", - "displayName": "$excel_in_displayName", - "direction": "in", - "enabledInTryMode": false, - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.MicrosoftGraph", - "version": "1.0.0-beta6" - }, - "AADPermissions": [ - { - "resourceAppId": "00000002-0000-0000-c000-000000000000", - "resourceAccess": [ - { - "type": "Scope", - "id": "311a71cc-e848-46a1-bdf8-97ff7156d8e6" - } - ] - }, - { - "resourceAppId": "00000003-0000-0000-c000-000000000000", - "resourceAccess": [ - { - "type": "Scope", - "id": "10465720-29dd-4523-a11a-6a75c743c9d9" - } - ] - } - ], - "documentation": "$content=Documentation\\ExcelIn.md", - "settings": [ - { - "name": "name", - "value": "string", - "defaultValue": "inputTable", - "required": true, - "label": "$excel_in_name_label", - "help": "$excel_in_name_help" + "label": "[variables('apiHubTableEntityLabel')]", + "help": "[variables('apiHubTableEntityHelp')]", + "validators": [] }, { - "name": "path", + "name": "connection", "value": "string", - "defaultValue": "Workbook.xlsx", + "resource": "ApiHub", "required": true, - "label": "$excel_in_path_label", - "help": "$excel_in_path_help" - }, - { - "name": "worksheetName", - "value": "string", - "defaultValue": "Sheet1", - "label": "$excel_in_worksheetName_label", - "help": "$excel_in_worksheetName_help" - }, - { - "name": "tableName", - "value": "string", - "defaultValue": "Table1", - "label": "$excel_in_tableName_label", - "help": "$excel_in_tableName_help" - }, - { - "name": "userId", - "value": "string", - "label": "$userid_label", - "help": "$userid_help" - }, - { - "name": "userToken", - "value": "string", - "label": "$usertoken_label", - "help": "$usertoken_help" - } - ], - "rules": [ - { - "name": "identity", - "type": "exclusivitySave", - "values": [ - { - "value": "UserFromRequest", - "display": "$identity_option_userFromRequest_label", - "hiddenSettings": [ - "userId", - "userToken" - ], - "shownSettings": [] - }, - { - "value": "userFromId", - "display": "$identity_option_userFromId_label", - "hiddenSettings": [ - "userToken" - ], - "shownSettings": [ - "userId" - ] - }, - { - "value": "userFromToken", - "display": "$identity_option_userFromToken_label", - "hiddenSettings": [ - "userId" - ], - "shownSettings": [ - "userToken" - ] - }, - { - "value": "ClientCredentials", - "display": "$identity_option_clientCredentials_label", - "hiddenSettings": [ - "userId", - "userToken" - ], - "shownSettings": [] - } - ], - "label": "$Identity_label", - "help": "$Identity_help" + "label": "[variables('apiHubTableConnectionLabel')]", + "help": "[variables('apiHubTableConnectionHelp')]", + "metadata": { + "capability": "tabular" + } } ] }, { - "type": "excel", - "displayName": "$excel_out_displayName", - "direction": "out", - "enabledInTryMode": false, - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.MicrosoftGraph", - "version": "1.0.0-beta6" - }, - "documentation": "$content=Documentation\\ExcelOut.md", - "AADPermissions": [ - { - "resourceAppId": "00000002-0000-0000-c000-000000000000", - "resourceAccess": [ - { - "type": "Scope", - "id": "311a71cc-e848-46a1-bdf8-97ff7156d8e6" - } - ] - }, - { - "resourceAppId": "00000003-0000-0000-c000-000000000000", - "resourceAccess": [ - { - "type": "Scope", - "id": "5c28f0bf-8a70-41f1-8ab2-9032436ddb65" - } - ] - } - ], + "type": "httpTrigger", + "displayName": "$httpTrigger_displayName", + "direction": "trigger", + "enabledInTryMode": true, + "documentation": "$content=Documentation\\httpTrigger.md", "settings": [ { "name": "name", "value": "string", - "defaultValue": "outputTable", - "required": true, - "label": "$excel_out_name_label", - "help": "$excel_out_name_help" - }, - { - "name": "path", - "value": "string", - "defaultValue": "path/to/file.xlsx", + "defaultValue": "req", "required": true, - "label": "$excel_out_path_label", - "help": "$excel_out_path_help" - }, - { - "name": "worksheetName", - "value": "string", - "defaultValue": "Sheet1", - "label": "$excel_out_worksheetName_label", - "help": "$excel_out_worksheetName_help" + "label": "$httpTrigger_name_label", + "help": "$httpTrigger_name_help", + "validators": [ + { + "expression": "^[a-zA-Z][a-zA-Z0-9]{0,127}$", + "errorText": "[variables('parameterName')]" + } + ] }, { - "name": "tableName", + "name": "route", "value": "string", - "defaultValue": "Table1", - "label": "$excel_out_tableName_label", - "help": "$excel_out_tableName_help" + "required": false, + "label": "$httpTrigger_route_label", + "help": "$httpTrigger_route_help", + "validators": [] }, { - "name": "updateType", + "name": "webHookType", "value": "enum", - "defaultValue": "Append", "enum": [ { - "value": "Append", - "display": "Append" + "value": "github", + "display": "GitHub" + }, + { + "value": "genericJson", + "display": "Generic JSON" }, { - "value": "Update", - "display": "Update" + "value": "slack", + "display": "Slack" } ], - "required": true, - "label": "$excel_out_updateType_label", - "help": "$excel_out_updateType_help" + "label": "$httpTrigger_webHookType_label", + "help": "$httpTrigger_webHookType_help" }, { - "name": "userId", - "value": "string", - "label": "$userid_label", - "help": "$userid_help" + "name": "authLevel", + "value": "enum", + "enum": [ + { + "value": "function", + "display": "Function" + }, + { + "value": "anonymous", + "display": "Anonymous" + }, + { + "value": "admin", + "display": "Admin" + } + ], + "label": "$httpTrigger_authLevel_label", + "help": "$httpTrigger_authLevel_help" }, { - "name": "userToken", - "value": "string", - "label": "$usertoken_label", - "help": "$usertoken_help" + "name": "methods", + "value": "checkBoxList", + "defaultValue": [ + "get", + "post", + "delete", + "head", + "patch", + "put", + "options", + "trace" + ], + "enum": [ + { + "value": "get", + "display": "GET" + }, + { + "value": "post", + "display": "POST" + }, + { + "value": "delete", + "display": "DELETE" + }, + { + "value": "head", + "display": "HEAD" + }, + { + "value": "patch", + "display": "PATCH" + }, + { + "value": "put", + "display": "PUT" + }, + { + "value": "options", + "display": "OPTIONS" + }, + { + "value": "trace", + "display": "TRACE" + } + ], + "label": "$httpTrigger_methods_label", + "help": "$httpTrigger_methods_help" } ], "rules": [ { - "name": "identity", - "type": "exclusivitySave", + "name": "mode", + "type": "exclusivity", "values": [ { - "value": "UserFromRequest", - "display": "$identity_option_userFromRequest_label", - "hiddenSettings": [ - "userId", - "userToken" - ], - "shownSettings": [] - }, - { - "value": "userFromId", - "display": "$identity_option_userFromId_label", + "value": "authLevel", + "display": "Standard", "hiddenSettings": [ - "userToken" + "webHookType" ], "shownSettings": [ - "userId" + "authLevel" ] }, { - "value": "userFromToken", - "display": "$identity_option_userFromToken_label", + "value": "webHookType", + "display": "Webhook", "hiddenSettings": [ - "userId" + "authLevel" ], "shownSettings": [ - "userToken" + "webHookType" ] - }, + } + ], + "label": "$httpTrigger_mode_label", + "help": "$httpTrigger_mode_help" + }, + { + "name": "methodRule", + "type": "exclusivity", + "values": [ { - "value": "ClientCredentials", - "display": "$identity_option_clientCredentials_label", + "value": "allMethods", + "display": "All methods", "hiddenSettings": [ - "userId", - "userToken" + "methods" ], "shownSettings": [] + }, + { + "value": "methods", + "display": "Selected methods", + "hiddenSettings": [], + "shownSettings": [ + "methods" + ] } ], - "label": "$Identity_label", - "help": "$Identity_help" + "label": "$httpTrigger_methodRule_label", + "help": "$httpTrigger_methodRule_help" } ] }, { - "type": "outlook", - "displayName": "$outlook_displayName", + "type": "http", + "displayName": "$httpOut_displayName", "direction": "out", - "enabledInTryMode": false, - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.MicrosoftGraph", - "version": "1.0.0-beta6" - }, - "documentation": "$content=Documentation\\OutlookOut.md", - "AADPermissions": [ - { - "resourceAppId": "00000002-0000-0000-c000-000000000000", - "resourceAccess": [ - { - "type": "Scope", - "id": "311a71cc-e848-46a1-bdf8-97ff7156d8e6" - } - ] - }, + "enabledInTryMode": true, + "documentation": "$content=Documentation\\httpOut.md", + "settings": [ { - "resourceAppId": "00000003-0000-0000-c000-000000000000", - "resourceAccess": [ + "name": "name", + "value": "string", + "defaultValue": "res", + "required": true, + "label": "$httpOut_name_label", + "help": "$httpOut_name_help", + "validators": [ { - "type": "Scope", - "id": "e383f46e-2787-4529-855e-0e479a3ffac0" + "expression": "(^[a-zA-Z][a-zA-Z0-9]{0,127}$)|^\\$return$", + "errorText": "[variables('parameterName')]" } ] } - ], + ] + }, + { + "type": "serviceBusTrigger", + "displayName": "$serviceBusTrigger_displayName", + "direction": "trigger", + "enabledInTryMode": false, + "documentation": "$content=Documentation\\serviceBusTrigger.md", "settings": [ { "name": "name", "value": "string", - "defaultValue": "email", + "defaultValue": "mySbMsg", "required": true, - "label": "$outlook_out_name_label", - "help": "$outlook_out_name_help" + "label": "$serviceBusTrigger_name_label", + "help": "$serviceBusTrigger_name_help", + "validators": [ + { + "expression": "^[a-zA-Z][a-zA-Z0-9]{0,127}$", + "errorText": "[variables('parameterName')]" + } + ] }, { - "name": "userId", + "name": "queueName", "value": "string", - "label": "$userid_label", - "help": "$userid_help" + "defaultValue": "mysbqueue", + "required": false, + "label": "$serviceBusTrigger_queueName_label", + "help": "$serviceBusTrigger_queueName_help", + "validators": [ + { + "expression": "^[0-9a-z][a-z0-9_.-]{1,48}[0-9a-z]$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", + "errorText": "$serviceBusTrigger_queueName_errorText" + } + ] }, { - "name": "userToken", + "name": "topicName", "value": "string", - "label": "$usertoken_label", - "help": "$usertoken_help" - } - ], - "rules": [ - { - "name": "identity", - "type": "exclusivitySave", - "values": [ - { - "value": "UserFromRequest", - "display": "$identity_option_userFromRequest_label", - "hiddenSettings": [ - "userId", - "userToken" - ], - "shownSettings": [] - }, - { - "value": "userFromId", - "display": "$identity_option_userFromId_label", - "hiddenSettings": [ - "userToken" - ], - "shownSettings": [ - "userId" - ] - }, - { - "value": "userFromToken", - "display": "$identity_option_userFromToken_label", - "hiddenSettings": [ - "userId" - ], - "shownSettings": [ - "userToken" - ] - }, + "defaultValue": "mysbtopic", + "required": false, + "label": "$serviceBusTrigger_topicName_label", + "help": "$serviceBusTrigger_topicName_help", + "validators": [ { - "value": "ClientCredentials", - "display": "$identity_option_clientCredentials_label", - "hiddenSettings": [ - "userId", - "userToken" - ], - "shownSettings": [] - } - ], - "label": "$Identity_label", - "help": "$Identity_help" - } - ] - }, - { - "type": "onedrive", - "displayName": "$oneDrive_in_displayName", - "direction": "in", - "enabledInTryMode": false, - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.MicrosoftGraph", - "version": "1.0.0-beta6" - }, - "documentation": "$content=Documentation\\OneDriveIn.md", - "AADPermissions": [ - { - "resourceAppId": "00000002-0000-0000-c000-000000000000", - "resourceAccess": [ - { - "type": "Scope", - "id": "311a71cc-e848-46a1-bdf8-97ff7156d8e6" + "expression": "^[0-9a-z][a-z0-9_.-]{1,48}[0-9a-z]$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", + "errorText": "$serviceBusTrigger_topicName_errorText" } ] }, { - "resourceAppId": "00000003-0000-0000-c000-000000000000", - "resourceAccess": [ + "name": "subscriptionName", + "value": "string", + "defaultValue": "mysubscription", + "required": false, + "label": "$serviceBusTrigger_subscriptionName_label", + "help": "$serviceBusTrigger_subscriptionName_help", + "validators": [ { - "type": "Scope", - "id": "10465720-29dd-4523-a11a-6a75c743c9d9" + "expression": "^[0-9a-zA-Z][a-zA-Z0-9_.-]{1,48}[0-9a-zA-Z]$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", + "errorText": "$serviceBusTrigger_subscriptionName_errorText" } ] - } - ], - "settings": [ - { - "name": "name", - "value": "string", - "defaultValue": "file", - "required": true, - "label": "$oneDrive_in_name_label", - "help": "$oneDrive_in_name_help" }, { - "name": "path", + "name": "connection", "value": "string", - "defaultValue": "Documents/test.txt", + "resource": "EventHub", "required": true, - "label": "$oneDrive_in_path_label", - "help": "$oneDrive_in_path_help" - }, - { - "name": "userId", - "value": "string", - "label": "$userid_label", - "help": "$userid_help" + "label": "$serviceBusTrigger_connection_label", + "help": "$serviceBusTrigger_connection_help", + "placeholder": "[variables('selectConnection')]" }, { - "name": "userToken", - "value": "string", - "label": "$usertoken_label", - "help": "$usertoken_help" + "name": "accessRights", + "value": "enum", + "enum": [ + { + "value": "Manage", + "display": "Manage" + }, + { + "value": "Listen", + "display": "Listen" + } + ], + "label": "$serviceBusTrigger_accessRights_label", + "help": "$serviceBusTrigger_accessRights_help" } ], "rules": [ { - "name": "identity", - "type": "exclusivitySave", + "name": "messageType", + "type": "exclusivity", "values": [ { - "value": "UserFromRequest", - "display": "$identity_option_userFromRequest_label", - "hiddenSettings": [ - "userId", - "userToken" - ], - "shownSettings": [] - }, - { - "value": "userFromId", - "display": "$identity_option_userFromId_label", + "value": "queueName", + "display": "$serviceBusTrigger_messageType_queueName", "hiddenSettings": [ - "userToken" + "topicName", + "subscriptionName" ], "shownSettings": [ - "userId" + "queueName" ] }, { - "value": "userFromToken", - "display": "$identity_option_userFromToken_label", + "value": "topicName", + "display": "$serviceBusTrigger_messageType_topicName", "hiddenSettings": [ - "userId" + "queueName" ], "shownSettings": [ - "userToken" + "topicName", + "subscriptionName" ] - }, - { - "value": "ClientCredentials", - "display": "$identity_option_clientCredentials_label", - "hiddenSettings": [ - "userId", - "userToken" - ], - "shownSettings": [] } ], - "label": "$Identity_label", - "help": "$Identity_help" + "label": "$serviceBusTrigger_messageType_label", + "help": "$serviceBusTrigger_messageType_help" } ] }, { - "type": "onedrive", - "displayName": "$oneDrive_out_displayName", + "type": "serviceBus", + "displayName": "$serviceBusOut_displayName", "direction": "out", - "enabledInTryMode": false, - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.MicrosoftGraph", - "version": "1.0.0-beta6" - }, - "documentation": "$content=Documentation\\OneDriveOut.md", - "AADPermissions": [ - { - "resourceAppId": "00000002-0000-0000-c000-000000000000", - "resourceAccess": [ - { - "type": "Scope", - "id": "311a71cc-e848-46a1-bdf8-97ff7156d8e6" - } - ] - }, + "enabledInTryMode": false, + "documentation": "$content=Documentation\\serviceBusOut.md", + "settings": [ { - "resourceAppId": "00000003-0000-0000-c000-000000000000", - "resourceAccess": [ + "name": "name", + "value": "string", + "defaultValue": "outputSbMsg", + "required": true, + "label": "$serviceBusOut_name_label", + "help": "$serviceBusOut_name_help", + "validators": [ { - "type": "Scope", - "id": "5c28f0bf-8a70-41f1-8ab2-9032436ddb65" + "expression": "(^[a-zA-Z][a-zA-Z0-9]{0,127}$)|^\\$return$", + "errorText": "[variables('parameterName')]" } ] - } - ], - "settings": [ + }, { - "name": "name", + "name": "queueName", "value": "string", - "defaultValue": "file", + "defaultValue": "outqueue", "required": true, - "label": "$oneDrive_out_name_label", - "help": "$oneDrive_out_name_help" + "label": "$serviceBusOut_queueName_label", + "help": "$serviceBusOut_queueName_help", + "validators": [ + { + "expression": "^[0-9a-z][a-z0-9_.-]{1,48}[0-9a-z]$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", + "errorText": "$serviceBusOut_queueName_errorText" + } + ] }, { - "name": "path", + "name": "topicName", "value": "string", - "defaultValue": "Documents/test.txt", + "defaultValue": "outtopic", "required": true, - "label": "$oneDrive_out_path_label", - "help": "$oneDrive_out_path_help" + "label": "$serviceBusOut_topicName_label", + "help": "$serviceBusOut_topicName_help", + "validators": [ + { + "expression": "^[0-9a-z][a-z0-9_.-]{1,48}[0-9a-z]$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", + "errorText": "$serviceBusOut_topicName_errorText" + } + ] }, { - "name": "userId", + "name": "connection", "value": "string", - "label": "$userid_label", - "help": "$userid_help" + "resource": "EventHub", + "required": true, + "label": "$serviceBusOut_connection_label", + "help": "$serviceBusOut_connection_help", + "placeholder": "[variables('selectConnection')]" }, { - "name": "userToken", - "value": "string", - "label": "$usertoken_label", - "help": "$usertoken_help" + "name": "accessRights_", + "value": "enum", + "enum": [ + { + "value": "Manage", + "display": "Manage" + }, + { + "value": "Send", + "display": "Send" + } + ], + "label": "$serviceBusOut_accessRights_label", + "help": "$serviceBusOut_accessRights_help" } ], "rules": [ { - "name": "identity", - "type": "exclusivitySave", + "name": "messageType", + "type": "exclusivity", "values": [ { - "value": "UserFromRequest", - "display": "$identity_option_userFromRequest_label", - "hiddenSettings": [ - "userId", - "userToken" - ], - "shownSettings": [] - }, - { - "value": "userFromId", - "display": "$identity_option_userFromId_label", + "value": "queueName", + "display": "$serviceBusOut_messageType_queueName", "hiddenSettings": [ - "userToken" + "topicName" ], "shownSettings": [ - "userId" + "queueName" ] }, { - "value": "userFromToken", - "display": "$identity_option_userFromToken_label", + "value": "topicName", + "display": "$serviceBusOut_messageType_topicName", "hiddenSettings": [ - "userId" + "queueName" ], "shownSettings": [ - "userToken" + "topicName" ] - }, - { - "value": "ClientCredentials", - "display": "$identity_option_clientCredentials_label", - "hiddenSettings": [ - "userId", - "userToken" - ], - "shownSettings": [] } ], - "label": "$Identity_label", - "help": "$Identity_help" + "label": "$serviceBusOut_messageType_label", + "help": "$serviceBusOut_messageType_help" } ] }, { - "type": "graphWebhookSubscription", - "displayName": "$MSGraphWebhook_displayName", - "direction": "in", - "enabledInTryMode": false, - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.MicrosoftGraph", - "version": "1.0.0-beta6" - }, - "documentation": "$content=Documentation\\GraphWebhookIn.md", - "AADPermissions": [ - { - "resourceAppId": "00000002-0000-0000-c000-000000000000", - "resourceAccess": [ - { - "type": "Scope", - "id": "311a71cc-e848-46a1-bdf8-97ff7156d8e6" + "type": "manualTrigger", + "displayName": "Manual", + "direction": "trigger", + "enabledInTryMode": true, + "documentation": "$content=Documentation\\manualTrigger.md", + "settings": [ + { + "name": "name", + "value": "string", + "defaultValue": "input", + "required": true, + "label": "$manualTrigger_name_label", + "help": "$manualTrigger_name_help", + "validators": [ + { + "expression": "^[a-zA-Z][a-zA-Z0-9]{0,127}$", + "errorText": "[variables('parameterName')]" } ] } - ], + ] + }, + { + "type": "table", + "displayName": "$tableout_displayName", + "direction": "out", + "enabledInTryMode": true, + "documentation": "$content=Documentation\\tableOut.md", "settings": [ { "name": "name", "value": "string", - "defaultValue": "webhook", + "defaultValue": "outputTable", + "required": true, + "label": "$tableout_name_label", + "help": "$tableout_name_help", + "validators": [ + { + "expression": "(^[a-zA-Z][a-zA-Z0-9]{0,127}$)|^\\$return$", + "errorText": "[variables('parameterName')]" + } + ] + }, + { + "name": "tableName", + "value": "string", + "defaultValue": "outTable", "required": true, - "label": "$MSGraphWebhook_in_name_label", - "help": "$MSGraphWebhook_in_name_help" + "label": "$table_tableName_label", + "help": "$table_tableName_help", + "validators": [ + { + "expression": "^[A-Za-z][A-Za-z0-9]{2,62}$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", + "errorText": "$table_tableName_errorText" + } + ] }, { - "name": "filter", + "name": "connection", "value": "string", - "label": "$GraphWebhookSubscription_in_filter_label", - "help": "$GraphWebhookSubscription_in_filter_help" + "resource": "Storage", + "required": true, + "label": "[variables('storageConnStringLabel')]", + "help": "[variables('appSettingsHelp')]", + "placeholder": "[variables('selectConnection')]" } ] }, { - "type": "graphWebhookSubscription", - "displayName": "$MSGraphWebhookCreator_displayName", - "direction": "out", - "enabledInTryMode": false, - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.MicrosoftGraph", - "version": "1.0.0-beta6" - }, - "documentation": "$content=Documentation\\GraphWebhookOut.md", - "AADPermissions": [ - { - "resourceAppId": "00000002-0000-0000-c000-000000000000", - "resourceAccess": [ - { - "type": "Scope", - "id": "311a71cc-e848-46a1-bdf8-97ff7156d8e6" - } - ] - } - ], + "type": "table", + "displayName": "$tableIn_displayName", + "direction": "in", + "enabledInTryMode": true, + "documentation": "$content=Documentation\\tableIn.md", "settings": [ { "name": "name", "value": "string", - "defaultValue": "creator", + "defaultValue": "inputTable", "required": true, - "label": "$MSGraphWebhookCreator_in_name_label", - "help": "$MSGraphWebhookCreator_in_name_help" - }, - { - "name": "changeTypes", - "value": "checkBoxList", - "enum": [ - { - "value": "created", - "display": "Created" - }, - { - "value": "updated", - "display": "Updated" - }, + "label": "$tableIn_name_label", + "help": "$tableIn_name_help", + "validators": [ { - "value": "deleted", - "display": "Deleted" + "expression": "^[a-zA-Z][a-zA-Z0-9]{0,127}$", + "errorText": "[variables('parameterName')]" } - ], - "required": true, - "label": "$MSGraphWebhook_in_changeType_label", - "help": "$MSGraphWebhook_in_changeType_help" + ] }, { - "name": "action", - "value": "enum", - "enum": [ - { - "value": "create", - "display": "Create" - }, - { - "value": "refresh", - "display": "Refresh" - }, + "name": "tableName", + "value": "string", + "defaultValue": "inTable", + "required": true, + "label": "$tableIn_tableName_label", + "help": "$tableIn_tableName_help", + "validators": [ { - "value": "delete", - "display": "Delete" + "expression": "^[A-Za-z][A-Za-z0-9]{2,62}$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$", + "errorText": "$tableIn_tableName_errorText" } - ], - "label": "$MSGraphWebhook_out_action_label", - "help": "$MSGraphWebhook_out_action_help" + ] }, { - "name": "subscriptionResource", + "name": "partitionKey", "value": "string", - "label": "$MSGraphWebhook_in_listen_label", - "help": "$MSGraphWebhook_in_listen_help" + "required": false, + "label": "$tableIn_partitionKey_label", + "help": "$tableIn_partitionKey_help" }, { - "name": "userId", + "name": "rowKey", "value": "string", - "label": "$userid_label", - "help": "$userid_help" + "required": false, + "label": "$tableIn_rowKey_label", + "help": "$tableIn_rowKey_help" + }, + { + "name": "take", + "value": "int", + "defaultValue": 50, + "required": false, + "label": "$tableIn_take_label", + "help": "$tableIn_take_help" }, { - "name": "userToken", + "name": "filter", "value": "string", - "label": "$usertoken_label", - "help": "$usertoken_help" - } - ], - "rules": [ + "required": false, + "label": "$tableIn_filter_label", + "help": "$tableIn_filter_help" + }, { - "name": "identity", - "type": "exclusivitySave", - "values": [ - { - "value": "UserFromRequest", - "display": "$identity_option_userFromRequest_label", - "hiddenSettings": [ - "userId", - "userToken" - ], - "shownSettings": [] - }, - { - "value": "userFromId", - "display": "$identity_option_userFromId_label", - "hiddenSettings": [ - "userToken" - ], - "shownSettings": [ - "userId" - ] - }, - { - "value": "userFromToken", - "display": "$identity_option_userFromToken_label", - "hiddenSettings": [ - "userId" - ], - "shownSettings": [ - "userToken" - ] - }, - { - "value": "ClientCredentials", - "display": "$identity_option_clientCredentials_label", - "hiddenSettings": [ - "userId", - "userToken" - ], - "shownSettings": [] - } - ], - "label": "$Identity_label", - "help": "$Identity_help" + "name": "connection", + "value": "string", + "resource": "Storage", + "required": true, + "label": "[variables('storageConnStringLabel')]", + "help": "[variables('appSettingsHelp')]", + "placeholder": "[variables('selectConnection')]" } ] }, { - "type": "graphWebhookTrigger", - "direction": "trigger", - "displayName": "$MSGraphWebhookTrigger_displayName", - "documentation": "$content=Documentation\\GraphWebhookTrigger.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.MicrosoftGraph", - "version": "1.0.0-beta6" - }, + "type": "cosmosDB", + "displayName": "$cosmosDBOut_displayName", + "direction": "out", "enabledInTryMode": false, - "AADPermissions": [ + "documentation": "$content=Documentation\\cosmosDBOut.md", + "settings": [ { - "resourceAppId": "00000002-0000-0000-c000-000000000000", - "resourceAccess": [ + "name": "name", + "value": "string", + "defaultValue": "outputDocument", + "required": true, + "label": "$cosmosDBOut_name_label", + "help": "$cosmosDBOut_name_help", + "validators": [ { - "type": "Scope", - "id": "311a71cc-e848-46a1-bdf8-97ff7156d8e6" + "expression": "(^[a-zA-Z][a-zA-Z0-9]{0,127}$)|^\\$return$", + "errorText": "[variables('parameterName')]" } ] - } - ], - "settings": [ + }, { - "name": "name", + "name": "databaseName", "value": "string", - "defaultValue": "notification", + "defaultValue": "outDatabase", + "required": true, + "label": "$cosmosDBOut_databaseName_label", + "help": "$cosmosDBOut_databaseName_help" + }, + { + "name": "collectionName", + "value": "string", + "defaultValue": "MyCollection", "required": true, - "label": "$MSGraphWebhookTrigger_in_name_label", - "help": "$MSGraphWebhookTrigger_in_help_label" + "label": "$cosmosDBOut_collectionName_label", + "help": "$cosmosDBOut_collectionName_help" + }, + { + "name": "createIfNotExists", + "value": "boolean", + "defaultValue": true, + "required": false, + "label": "$cosmosDBOut_createIfNotExists_label", + "help": "$cosmosDBOut_createIfNotExists_help" }, { - "name": "resourceType", - "value": "enum", + "name": "connectionStringSetting", + "value": "string", + "resource": "CosmosDB", "required": true, - "label": "$MSGraphWebhook_in_listen_label", - "help": "$MSGraphWebhook_in_listen_help", - "enum": [ - { - "value": "#Microsoft.Graph.Message", - "display": "Microsoft Graph Message" - }, - { - "value": "#Microsoft.Graph.DriveItem", - "display": "Microsoft Graph DriveItem" - }, - { - "value": "#Microsoft.Graph.Contact", - "display": "Microsoft Graph Contact" - }, - { - "value": "#Microsoft.Graph.Event", - "display": "Microsoft Graph Event" - } - ] + "label": "$cosmosDBOut_connection_label", + "help": "$cosmosDBOut_connection_help", + "placeholder": "[variables('selectConnection')]" } ] }, { - "type": "activityTrigger", - "displayName": "$activityTrigger_displayName", + "type": "cosmosDBTrigger", + "displayName": "$cosmosDBTriggerIn_displayName", "direction": "trigger", "enabledInTryMode": false, - "documentation": "$content=Documentation\\activityTrigger.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.DurableTask", - "version": "1.8.2" - }, + "documentation": "$content=Documentation\\cosmosDBTrigger.md", "settings": [ { "name": "name", "value": "string", - "defaultValue": "context", + "defaultValue": "inputDocument", "required": true, - "label": "$activityTrigger_name_label", - "help": "$activityTrigger_name_help", + "label": "$cosmosDBIn_name_label", + "help": "$cosmosDBIn_name_help", "validators": [ { "expression": "^[a-zA-Z][a-zA-Z0-9]{0,127}$", @@ -2022,187 +1325,247 @@ ] }, { - "name": "activity", + "name": "databaseName", + "value": "string", + "defaultValue": "inDatabase", + "required": true, + "label": "$cosmosDBIn_databaseName_label", + "help": "$cosmosDBIn_databaseName_help" + }, + { + "name": "collectionName", + "value": "string", + "defaultValue": "MyCollection", + "required": true, + "label": "$cosmosDBIn_collectionName_label", + "help": "$cosmosDBIn_collectionName_help" + }, + { + "name": "leaseCollectionName", "value": "string", + "defaultValue": "leases", + "required": true, + "label": "$cosmosDBIn_leaseCollectionName_label", + "help": "$cosmosDBIn_leaseCollectionName_help" + }, + { + "name": "createLeaseCollectionIfNotExists", + "value": "boolean", "required": false, - "label": "$activityTrigger_activity_label", - "help": "$activityTrigger_activity_help" + "defaultValue": true, + "label": "$cosmosDBIn_createLeaseCollectionIfNotExists_label", + "help": "$cosmosDBIn_createLeaseCollectionIfNotExists_help" + }, + { + "name": "connectionStringSetting", + "value": "string", + "resource": "CosmosDB", + "required": true, + "label": "$cosmosDBIn_connection_label", + "help": "$cosmosDBIn_connection_help", + "placeholder": "[variables('selectConnection')]" } ] }, { - "type": "orchestrationTrigger", - "displayName": "$orchestrationTrigger_displayName", - "direction": "trigger", + "type": "mobileTable", + "displayName": "$mobileTableOut_displayName", + "direction": "out", "enabledInTryMode": false, - "documentation": "$content=Documentation\\orchestrationTrigger.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.DurableTask", - "version": "1.8.2" - }, + "documentation": "$content=Documentation\\mobileTableOut.md", "settings": [ { "name": "name", "value": "string", - "defaultValue": "context", + "defaultValue": "outputRecord", "required": true, - "label": "$orchestrationTrigger_name_label", - "help": "$orchestrationTrigger_name_help", + "label": "$mobileTableOut_name_label", + "help": "$mobileTableOut_name_help", "validators": [ { - "expression": "^[a-zA-Z][a-zA-Z0-9]{0,127}$", + "expression": "(^[a-zA-Z][a-zA-Z0-9]{0,127}$)|^\\$return$", "errorText": "[variables('parameterName')]" } ] }, { - "name": "orchestration", + "name": "tableName", + "value": "string", + "defaultValue": "outTable", + "required": true, + "label": "$mobileTableOut_tableName_label", + "help": "$mobileTableOut_tableName_help" + }, + { + "name": "connection", + "value": "string", + "defaultValue": "My_MobileApp_Uri", + "required": true, + "label": "$mobileTableOut_connection_label", + "help": "$mobileTableOut_connection_help" + }, + { + "name": "apiKey", "value": "string", "required": false, - "label": "$orchestrationTrigger_orchestration_label", - "help": "$orchestrationTrigger_orchestration_help" + "label": "$mobileTableOut_apiKey_label", + "help": "$mobileTableOut_apiKey_help" } ] }, { - "type": "orchestrationClient", - "displayName": "$orchestrationClientIn_displayName", + "type": "mobileTable", + "displayName": "$mobileTableIn_displayName", "direction": "in", "enabledInTryMode": false, - "documentation": "$content=Documentation\\orchestrationClientIn.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.DurableTask", - "version": "1.8.2" - }, + "documentation": "$content=Documentation\\mobileTableIn.md", "settings": [ { "name": "name", "value": "string", - "defaultValue": "client", + "defaultValue": "inputRecord", "required": true, - "label": "$orchestrationClientIn_name_label", - "help": "$orchestrationClientIn_name_help", + "label": "$mobileTableIn_name_label", + "help": "$mobileTableIn_name_help", "validators": [ { "expression": "^[a-zA-Z][a-zA-Z0-9]{0,127}$", "errorText": "[variables('parameterName')]" } ] - } - ] - }, - { - "type": "eventGridTrigger", - "displayName": "$eventGrid_trigger_displayName", - "direction": "trigger", - "enabledInTryMode": false, - "documentation": "$content=Documentation\\eventGridTrigger.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.EventGrid", - "version": "2.0.0" - }, - "settings": [ + }, { - "name": "name", + "name": "tableName", "value": "string", - "defaultValue": "EventGridTrigger", + "defaultValue": "inTable", "required": true, - "label": "$eventGrid_trigger_name_label", - "help": "$eventGrid_trigger_name_help", - "validators": [ - { - "expression": "(^[a-zA-Z][a-zA-Z0-9]{0,127}$)|^\\$return$", - "errorText": "[variables('parameterName')]" - } - ] + "label": "$mobileTableIn_tableName_label", + "help": "$mobileTableIn_tableName_help" + }, + { + "name": "id", + "value": "string", + "defaultValue": "{itemId}", + "required": true, + "label": "$mobileTableIn_id_label", + "help": "$mobileTableIn_id_help" + }, + { + "name": "connection", + "value": "string", + "defaultValue": "My_MobileApp_Uri", + "required": true, + "label": "$mobileTableIn_connection_label", + "help": "$mobileTableIn_connection_help" + }, + { + "name": "apiKey", + "value": "string", + "required": false, + "label": "$mobileTableIn_apiKey_label", + "help": "$mobileTableIn_apiKey_help" } ] }, { - "type": "cosmosDBTrigger", - "displayName": "$cosmosDB_trigger_displayName", - "direction": "trigger", + "type": "notificationHub", + "displayName": "$notificationHubOut_displayName", + "direction": "out", "enabledInTryMode": false, - "documentation": "$content=Documentation\\cosmosDBTrigger.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.CosmosDB", - "version": "3.0.3" - }, + "documentation": "$content=Documentation\\notificationHubOut.md", "settings": [ { "name": "name", "value": "string", - "defaultValue": "inputDocuments", + "defaultValue": "notification", "required": true, - "label": "$cosmosDBIn_name_label", - "help": "$cosmosDBIn_name_help", + "label": "$notificationHubOut_name_label", + "help": "$notificationHubOut_name_help", "validators": [ { - "expression": "^[a-zA-Z][a-zA-Z0-9]{0,127}$", + "expression": "(^[a-zA-Z][a-zA-Z0-9]{0,127}$)|^\\$return$", "errorText": "[variables('parameterName')]" } ] }, { - "name": "connectionStringSetting", + "name": "hubName", "value": "string", "required": true, - "resource": "DocumentDB", - "label": "$cosmosDBIn_connection_label", - "help": "$cosmosDBIn_connection_help", - "placeholder": "[variables('selectConnection')]" + "label": "$notificationHubOut_hubName_label", + "help": "$notificationHubOut_hubName_help" }, { - "name": "databaseName", + "name": "connection", "value": "string", - "defaultValue": "", + "resource": "ServiceBus", "required": true, - "label": "$cosmosDBIn_databaseName_label", - "help": "$cosmosDBIn_databaseName_help" + "label": "$notificationHubOut_connection_label", + "help": "$notificationHubOut_connection_help", + "placeholder": "[variables('selectConnection')]" }, { - "name": "collectionName", + "name": "tagExpression", "value": "string", - "defaultValue": "", - "required": true, - "label": "$cosmosDBIn_collectionName_label", - "help": "$cosmosDBIn_collectionName_help" + "required": false, + "label": "$notificationHubOut_tagExpression_label", + "help": "$notificationHubOut_tagExpression_help" }, { - "name": "leaseCollectionName", - "value": "string", - "required": true, - "label": "$cosmosDBIn_leaseCollectionName_label", - "help": "$cosmosDBIn_leaseCollectionName_help" + "name": "enableTestSend", + "value": "boolean", + "required": false, + "label": "$notificationHubOut_enableTestSend_label", + "help": "$notificationHubOut_enableTestSend_help" }, { - "name": "createLeaseCollectionIfNotExists", - "value": "boolean", - "defaultValue": true, - "required": true, - "label": "$cosmosDBIn_createIfNotExists_label", - "help": "$cosmosDBIn_createIfNotExists_help" + "name": "platform", + "value": "enum", + "enum": [ + { + "value": "", + "display": "Template" + }, + { + "value": "apns", + "display": "Apple (APNS)" + }, + { + "value": "adm", + "display": "Amazon (ADM)" + }, + { + "value": "gcm", + "display": "Google (GCM)" + }, + { + "value": "wns", + "display": "Windows (WNS)" + }, + { + "value": "mpns", + "display": "Windows Phone (MPNS)" + } + ], + "label": "$notificationHubOut_platform_label", + "help": "$notificationHubOut_platform_help" } ] }, { - "type": "cosmosDB", - "displayName": "$documentDBOut_displayName", + "type": "sendGrid", + "displayName": "$sendGrid_displayName", "direction": "out", "enabledInTryMode": false, - "documentation": "$content=Documentation\\documentDBOut.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.CosmosDB", - "version": "3.0.3" - }, + "documentation": "$content=Documentation\\sendGridOut.md", "settings": [ { "name": "name", "value": "string", - "defaultValue": "outputDocument", + "defaultValue": "message", "required": true, - "label": "$documentDBOut_name_label", - "help": "$documentDBOut_name_help", + "label": "$sendGrid_name_label", + "help": "$sendGrid_name_help", "validators": [ { "expression": "(^[a-zA-Z][a-zA-Z0-9]{0,127}$)|^\\$return$", @@ -2211,197 +1574,161 @@ ] }, { - "name": "databaseName", + "name": "apiKey", "value": "string", - "defaultValue": "outDatabase", + "defaultValue": "SendGridApiKey", "required": true, - "label": "$documentDBOut_databaseName_label", - "help": "$documentDBOut_databaseName_help" + "label": "$sendGrid_apiKey_label", + "help": "$sendGrid_apiKey_help" }, { - "name": "collectionName", + "name": "to", "value": "string", - "defaultValue": "MyCollection", - "required": true, - "label": "$documentDBOut_collectionName_label", - "help": "$documentDBOut_collectionName_help" - }, - { - "name": "createIfNotExists", - "value": "boolean", - "defaultValue": false, - "required": true, - "label": "$documentDBOut_createIfNotExists_label", - "help": "$documentDBOut_createIfNotExists_help" + "defaultValue": "", + "required": false, + "label": "$sendGrid_to_label", + "help": "$sendGrid_to_help" }, { - "name": "connectionStringSetting", + "name": "from", "value": "string", - "resource": "DocumentDB", - "required": true, - "label": "$documentDBOut_connection_label", - "help": "$documentDBOut_connection_help", - "placeholder": "[variables('selectConnection')]" + "defaultValue": "", + "required": false, + "label": "$sendGrid_from_label", + "help": "$sendGrid_from_help" }, { - "name": "partitionKey", + "name": "subject", "value": "string", + "defaultValue": "", "required": false, - "label": "$documentDB_partitionKey_label", - "help": "$documentDBOut_partitionKey_help" + "label": "$sendGrid_subject_label", + "help": "$sendGrid_subject_help" }, { - "name": "collectionThroughput", - "value": "int", + "name": "text", + "value": "string", + "defaultValue": "", "required": false, - "label": "$cosmosDB_collectionThroughput_label", - "help": "$cosmosDBOut_collectionThroughput_help" + "label": "$sendGrid_text_label", + "help": "$sendGrid_text_help" } ] }, { - "type": "cosmosDB", - "displayName": "$documentDBIn_displayName", - "direction": "in", + "type": "twilioSms", + "displayName": "$twilioSms_displayName", + "direction": "out", "enabledInTryMode": false, - "documentation": "$content=Documentation\\documentDBIn.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.CosmosDB", - "version": "3.0.3" - }, + "documentation": "$content=Documentation\\twilioSmsOut.md", "settings": [ { "name": "name", "value": "string", - "defaultValue": "inputDocument", + "defaultValue": "message", "required": true, - "label": "$documentDBIn_name_label", - "help": "$documentDBIn_name_help", + "label": "$twilioSms_name_label", + "help": "$twilioSms_name_help", "validators": [ { - "expression": "^[a-zA-Z][a-zA-Z0-9]{0,127}$", + "expression": "(^[a-zA-Z][a-zA-Z0-9]{0,127}$)|^\\$return$", "errorText": "[variables('parameterName')]" } ] }, { - "name": "databaseName", - "value": "string", - "defaultValue": "inDatabase", - "required": true, - "label": "$documentDBIn_databaseName_label", - "help": "$documentDBIn_databaseName_help" - }, - { - "name": "collectionName", + "name": "accountSid", "value": "string", - "defaultValue": "MyCollection", + "defaultValue": "TwilioAccountSid", "required": true, - "label": "$documentDBIn_collectionName_label", - "help": "$documentDBIn_collectionName_help" + "label": "$twilioSms_accountsid_label", + "help": "$twilioSms_accountsid_help" }, { - "name": "connectionStringSetting", + "name": "authToken", "value": "string", - "resource": "DocumentDB", + "defaultValue": "TwilioAuthToken", "required": true, - "label": "$documentDBIn_connection_label", - "help": "$documentDBIn_connection_help", - "placeholder": "[variables('selectConnection')]" + "label": "$twilioSms_authtoken_label", + "help": "$twilioSms_authtoken_help" }, { - "name": "id", + "name": "to", "value": "string", "defaultValue": "", "required": false, - "label": "$documentDBIn_id_label", - "help": "$documentDBIn_id_help" + "label": "$twilioSms_to_label", + "help": "$twilioSms_to_help" }, { - "name": "partitionKey", + "name": "from", "value": "string", + "defaultValue": "", "required": false, - "label": "$documentDB_partitionKey_label", - "help": "$documentDBIn_partitionKey_help" + "label": "$twilioSms_from_label", + "help": "$twilioSms_from_help" }, { - "name": "sqlQuery", + "name": "body", "value": "string", "defaultValue": "", "required": false, - "label": "$documentDBIn_sqlQuery_label", - "help": "$documentDBIn_sqlQuery_help" + "label": "$twilioSms_body_label", + "help": "$twilioSms_body_help" } ] }, { - "type": "signalRConnectionInfo", - "displayName": "$signalRConnectionInfoIn_displayName", - "direction": "in", + "type": "bot", + "displayName": "$bot_out_displayName", + "direction": "out", "enabledInTryMode": false, - "documentation": "$content=Documentation\\signalRConnectionInfo.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.SignalRService", - "version": "1.0.0" - }, + "documentation": "$content=Documentation\\botOut.md", "settings": [ { "name": "name", "value": "string", - "defaultValue": "connectionInfo", + "defaultValue": "$return", "required": true, - "label": "$signalRConnectionInfoIn_name_label", - "help": "$signalRConnectionInfoIn_name_help", + "label": "$bot_out_name_label", + "help": "$bot_out_name_help", "validators": [ { - "expression": "^[a-zA-Z][a-zA-Z0-9]{0,127}$", + "expression": "(^[a-zA-Z][a-zA-Z0-9]{0,127}$)|^\\$return$", "errorText": "[variables('parameterName')]" } ] }, { - "name": "hubName", + "name": "botId", "value": "string", - "defaultValue": "chat", "required": true, - "label": "$signalRConnectionInfoIn_hubName_label", - "help": "$signalRConnectionInfoIn_hubName_help" - }, - { - "name": "userId", - "value": "string", - "defaultValue": "", - "required": false, - "label": "$signalRConnectionInfoIn_userId_label", - "help": "$signalRConnectionInfoIn_userId_help" + "label": "$bot_botId_label", + "help": "$bot_botId_help" }, { - "name": "connectionStringSetting", + "name": "secret", "value": "string", "required": false, - "label": "$signalRConnectionInfoIn_connectionString_label", - "help": "$signalRConnectionInfoIn_connectionString_help" + "label": "$bot_out_secret_label", + "help": "$bot_out_secret_help" } ] }, { - "type": "signalR", - "displayName": "$signalROut_displayName", - "direction": "out", + "type": "bot", + "displayName": "$bot_in_displayName", + "direction": "in", "enabledInTryMode": false, - "documentation": "$content=Documentation\\signalR.md", - "extension": { - "id": "Microsoft.Azure.WebJobs.Extensions.SignalRService", - "version": "1.0.0" - }, + "documentation": "$content=Documentation\\botIn.md", "settings": [ { "name": "name", "value": "string", - "defaultValue": "signalRMessages", + "defaultValue": "bot", "required": true, - "label": "$signalROut_name_label", - "help": "$signalROut_name_help", + "label": "$bot_in_name_label", + "help": "$bot_in_name_help", "validators": [ { "expression": "^[a-zA-Z][a-zA-Z0-9]{0,127}$", @@ -2410,21 +1737,13 @@ ] }, { - "name": "hubName", - "value": "string", - "defaultValue": "chat", - "required": true, - "label": "$signalROut_hubName_label", - "help": "$signalROut_hubName_help" - }, - { - "name": "connectionStringSetting", + "name": "secret", "value": "string", "required": false, - "label": "$signalROut_connectionString_label", - "help": "$signalROut_connectionString_help" + "label": "$bot_in_secret_label", + "help": "$bot_in_secret_help" } ] } ] -} \ No newline at end of file +} diff --git a/src/shared/bindings.ts b/src/shared/bindings.ts index 96af42d7..cbef53dd 100644 --- a/src/shared/bindings.ts +++ b/src/shared/bindings.ts @@ -13,7 +13,7 @@ export class BindingUtils { serverless.cli.log("Parsing Azure Functions Bindings.json..."); - const bindingsJson = await this.getBindingsJson(); + const bindingsJson = defaultBindingsJson; for (let bindingsIndex = 0; bindingsIndex < bindingsJson[constants.bindings].length; bindingsIndex++) { const settingsNames = []; @@ -114,20 +114,4 @@ export class BindingUtils { return binding; } - - /** - * Tries to fetch current bindings.json from GitHub - * If it can't be reached, it uses the local JSON file - */ - private static async getBindingsJson() { - try { - const { data } = await axios({ - method: "get", - url: configConstants.bindingsJsonUrl, - }); - return data; - } catch (err) { - return defaultBindingsJson; - } - } }