{
  "name": "twilio-cloud-function",
  "version": "0.0.5",
  "description": "Use the Twilio platform to send emails to your users, potentially after raising tickets, or simply to provide confirmation of their information.",
  "main": "index.js",
  "author": "Etnik Gashi <etnik@wbb.ai>",
  "scripts": {
    "start": "functions-framework --source=.webpack --target=handler",
    "debug": "node --inspect node_modules/.bin/functions-framework --source=.webpack --target=handler",
    "watch": "tsc -w",
    "build": "npx webpack --config ./webpack.config.js",
    "deploy-dev": "npm run build && gcloud config set project intelagent-stage && gcloud functions deploy wbb-twilio --source=.webpack --entry-point handler --runtime nodejs12 --trigger-http --allow-unauthenticated --region europe-west2 --env-vars-file env.yaml",
    "deploy-prod": "npm run build && gcloud config set project intelagent-prod && gcloud functions deploy wbb-twilio --source=.webpack --entry-point handler --runtime nodejs12 --trigger-http --allow-unauthenticated --region europe-west2 --env-vars-file env.yaml",
    "test:watch": "jest --watch --runInBand",
    "check-updates": "ncu",
    "format": "prettier --config .prettierrc 'src/**/*.ts' --write",
    "test": "jest ---coverage ",
    "lint-and-fix-staged": "eslint . --fix --cache --ext .ts",
    "lint": "eslint . --ext .ts"
  },
  "keywords": [
    "wbb-logicdialog"
  ],
  "wbb": {
    "name": "Twilio",
    "tags": [
      "SMS"
    ],
    "resources": [
      "twilio.json"
    ],
    "icon": {
      "url": "https://cdn.freebiesupply.com/logos/large/2x/twilio-logo-png-transparent.png"
    },
    "handlers": {
      "send-sms": {
        "config": [
          {
            "label": "Twilio Account SID",
            "key": "twilioAccountSid",
            "tooltip": "The account SID from the twilio account, that will be used to send the message",
            "type": "string",
            "required": true,
            "sensitive": false,
            "dependencies": []
          },
          {
            "label": "Twilio Authentication ID",
            "key": "twilioAuthId",
            "tooltip": "The account Auth ID from the twilio account, that will be used to send the message",
            "type": "string",
            "required": true,
            "sensitive": true,
            "dependencies": []
          },
          {
            "label": "Recipient (Form)",
            "key": "to_property",
            "tooltip": "The name of a property in a form, collecting a mobile phone number to send a message to",
            "type": "string",
            "required": false,
            "sensitive": false,
            "dependencies": []
          },
          {
            "label": "Recipient (Fixed)",
            "key": "to",
            "tooltip": "A fixed mobile phone number to send message to",
            "type": "string",
            "required": false,
            "sensitive": false,
            "dependencies": [],
            "validation": "^\\+?[0-9]{3}-?[0-9]{6,12}$"
          },
          {
            "label": "Sender",
            "key": "from",
            "tooltip": "The mobile phone number to send the message to",
            "type": "string",
            "required": true,
            "sensitive": false,
            "dependencies": [],
            "validation": "^\\+?[0-9]{3}-?[0-9]{6,12}$"
          },
          {
            "label": "Message",
            "key": "message",
            "tooltip": "The message to send, this can include parameters that will be substitudes when the message is created, for example 'Hello %%firstName%%' might end up as 'Hello Andy', if the user entered their first name as such",
            "type": "string",
            "required": true,
            "sensitive": false,
            "dependencies": []
          },
          {
            "label": "Error Response",
            "key": "errorBlock",
            "tooltip": "The Response to display to the user if an error occurs",
            "type": "reference",
            "required": true,
            "sensitive": false,
            "dependencies": []
          },
          {
            "label": "Confirmation Response",
            "key": "confirmationBlock",
            "tooltip": "The Response to display after the message has been sent",
            "type": "string",
            "required": true,
            "sensitive": false,
            "dependencies": []
          }
        ]
      }
    }
  },
  "husky": {
    "hooks": {
      "pre-commit": "pretty-quick --staged --bail && yarn run lint-and-fix-staged"
    }
  },
  "lint-staged": {
    "*.{ts,tsx}": [
      "eslint",
      "jest --passWithNoTests"
    ]
  },
  "devDependencies": {
    "@serverless/event-mocks": "^1.1.1",
    "@types/google-spreadsheet": "^3.0.2",
    "@types/jest": "^26.0.14",
    "@types/jsonwebtoken": "^8.5.0",
    "@types/md5": "^2.3.0",
    "@types/node": "^14.11.2",
    "@types/nodemailer": "^6.4.0",
    "@types/request-promise": "^4.1.46",
    "@typescript-eslint/eslint-plugin": "^4.15.2",
    "@typescript-eslint/parser": "^4.15.2",
    "copy-webpack-plugin": "^6.4.1",
    "eslint": "^7.10.0",
    "eslint-config-prettier": "^6.12.0",
    "eslint-plugin-prettier": "^3.1.4",
    "fork-ts-checker-webpack-plugin": "^5.2.0",
    "husky": "^4.3.0",
    "jest": "^26.4.2",
    "jest-extended": "^0.11.5",
    "lint-staged": "^10.4.0",
    "nock": "^13.0.5",
    "npm-check-updates": "^9.0.3",
    "prettier": "^2.1.2",
    "pretty-quick": "^3.1.0",
    "ts-jest": "^26.4.1",
    "ts-loader": "^8.0.4",
    "ts-node": "^9.1.1",
    "typescript": "4.1.3",
    "webpack": "^4.44.2",
    "webpack-node-externals": "^2.5.2"
  },
  "dependencies": {
    "@google-cloud/functions-framework": "^3.0.0",
    "@types/source-map-support": "^0.5.3",
    "@webpack-cli/init": "^1.1.3",
    "@webuildbots/webuildbots-sdk": "9.5.0",
    "algoliasearch": "^4.8.4",
    "cheerio": "^1.0.0-rc.6",
    "concurrently": "^7.0.0",
    "crypto": "^1.0.1",
    "deep-get-set": "^1.1.1",
    "deepmerge": "^4.2.2",
    "dotenv": "^16.0.0",
    "fast-xml-parser": "^3.17.4",
    "google-spreadsheet": "^3.1.15",
    "http-status-codes": "^2.1.4",
    "jsonwebtoken": "^8.5.1",
    "md5": "^2.3.0",
    "moment": "^2.29.1",
    "moment-timezone": "^0.5.34",
    "nodemailer": "^6.4.17",
    "postwoman": "^1.1.0",
    "request": "^2.88.2",
    "request-promise": "^4.2.6",
    "rss-parser": "^3.12.0",
    "source-map-support": "^0.5.19",
    "stopword": "^1.0.7",
    "supertest": "^6.2.4",
    "twilio": "^3.80.0",
    "wbb-logger": "^1.1.0",
    "webpack-cli": "^4.10.0",
    "yarn": "^1.22.17"
  }
}
